bug修复
This commit is contained in:
parent
a8a14f7b5a
commit
a421fb3be7
@ -7,9 +7,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.base.entity.vo.TrendVo;
|
||||
import com.zhgd.xmgl.enums.ParamEnum;
|
||||
import com.zhgd.xmgl.modules.frontier.entity.FrontierProtectionDevAlarm;
|
||||
import com.zhgd.xmgl.modules.frontier.entity.vo.CountFrontierProtectionDevAlarmVo;
|
||||
import com.zhgd.xmgl.modules.frontier.entity.vo.CountFrontierProtectionVo;
|
||||
import com.zhgd.xmgl.modules.frontier.enums.AlarmEnum;
|
||||
import com.zhgd.xmgl.modules.frontier.service.IFrontierProtectionDevAlarmService;
|
||||
import com.zhgd.xmgl.security.entity.UserInfo;
|
||||
import com.zhgd.xmgl.security.util.SecurityUtils;
|
||||
@ -190,5 +192,10 @@ public class FrontierProtectionDevAlarmController {
|
||||
return Result.success(frontierProtectionDevAlarmService.countFrontierProtectionDevAlarmTrend(paramMap));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "获取临边防护报警类型枚举信息", notes = "获取临边防护报警类型枚举信息")
|
||||
@GetMapping(value = "/getFrontierProtectionAlarmTypeEnum")
|
||||
public Result<AlarmEnum[]> getFrontierProtectionAlarmTypeEnum() {
|
||||
AlarmEnum[] values = AlarmEnum.values();
|
||||
return Result.success(values);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
package com.zhgd.xmgl.modules.frontier.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||
public enum AlarmEnum {
|
||||
PROXIMITY("人员靠近", 2, "入侵", 1),
|
||||
PORT_STATUS1("线锁1", 2, "断开", 2),
|
||||
|
||||
@ -276,7 +276,7 @@ public class WorkerApiController {
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
|
||||
})
|
||||
@PostMapping(value = "/selectWorkerInfoList")
|
||||
public Result<IPage<EntityMap>> selectWorkerInfoList(@RequestBody Map<String,Object> map) {
|
||||
public Result<IPage<WorkerInfo>> selectWorkerInfoList(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(workerInfoService.selectWorkerInfoList(map));
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,9 +140,10 @@ public class WorkerInfoController {
|
||||
@ApiImplicitParam(name = "chargePersonName", value = "负责人姓名(部门)", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "belongingSection", value = "所属标段(部门)", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSnList", value = "项目SN列表", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "orderBy", value = "排序:1退场时间倒序2进场日期倒序", paramType = "body", required = false, dataType = "Integer"),
|
||||
})
|
||||
@PostMapping(value = "/selectWorkerInfoList")
|
||||
public Result<IPage<EntityMap>> selectWorkerInfoList(@RequestBody Map<String, Object> map) {
|
||||
public Result<IPage<WorkerInfo>> selectWorkerInfoList(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(workerInfoService.selectWorkerInfoList(map));
|
||||
}
|
||||
|
||||
@ -165,7 +166,7 @@ public class WorkerInfoController {
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/selectPersonList")
|
||||
public Result<IPage<EntityMap>> selectPersonList(WorkerInfo workerInfo) {
|
||||
public Result<IPage<WorkerInfo>> selectPersonList(WorkerInfo workerInfo) {
|
||||
Map<String, Object> map = BeanUtil.beanToMap(workerInfo);
|
||||
return Result.success(workerInfoService.selectWorkerInfoList(map));
|
||||
}
|
||||
@ -189,7 +190,7 @@ public class WorkerInfoController {
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/selectPersonListZW")
|
||||
public Result<Set<IPage<EntityMap>>> selectPersonListZW(WorkerInfo workerInfo) {
|
||||
public Result<Set<IPage<WorkerInfo>>> selectPersonListZW(WorkerInfo workerInfo) {
|
||||
Map<String, Object> map = BeanUtil.beanToMap(workerInfo);
|
||||
return Result.success(Collections.singleton(workerInfoService.selectWorkerInfoList(map)));
|
||||
}
|
||||
@ -628,4 +629,14 @@ public class WorkerInfoController {
|
||||
return Result.success(workerInfoService.statisticsWorkerAge(map));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "统计出场人数和进场人数", notes = "统计出场人数和进场人数", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String")
|
||||
})
|
||||
@PostMapping("/countEntryAndExitNum")
|
||||
public Result<CountEntryAndExitNumVo> countEntryAndExitNum(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
return Result.success(workerInfoService.countEntryAndExitNum(map));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -360,6 +360,21 @@ public class WorkerInfo implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private java.lang.Integer count;
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String enterpriseName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String age;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String jobTypeName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String jobNameValue;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String vvaccineStatusName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String codeStateName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String acidStatusName;
|
||||
|
||||
public String toExistString() {
|
||||
return "WorkerInfo{" +
|
||||
", workerName='" + workerName + '\'' +
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
package com.zhgd.xmgl.modules.worker.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CountEntryAndExitNumVo {
|
||||
@ApiModelProperty("进场人数")
|
||||
private Integer entryTodayNum;
|
||||
@ApiModelProperty("出场人数")
|
||||
private Integer exitTodayNum;
|
||||
}
|
||||
@ -24,7 +24,7 @@ import java.util.Map;
|
||||
@Repository
|
||||
public interface WorkerInfoMapper extends BaseMapper<WorkerInfo> {
|
||||
|
||||
List<EntityMap> selectWorkerInfoList(Page<EntityMap> page, @Param("param") Map<String, Object> map);
|
||||
List<WorkerInfo> selectWorkerInfoList(Page<WorkerInfo> page, @Param("param") Map<String, Object> map);
|
||||
|
||||
EntityMap getWorkerNumByPersonType(Map<String, Object> map);
|
||||
|
||||
@ -230,4 +230,6 @@ public interface WorkerInfoMapper extends BaseMapper<WorkerInfo> {
|
||||
List<TypeNumVo> countWorkerNumGroupByWorkerType(Map<String, Object> map);
|
||||
|
||||
SpecialWorkerStaticsVo getSpecialWorkerStatics(HashMap<String, Object> map);
|
||||
|
||||
CountEntryAndExitNumVo countEntryAndExitNum(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper">
|
||||
<select id="selectWorkerInfoList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
<select id="selectWorkerInfoList" resultType="com.zhgd.xmgl.modules.worker.entity.WorkerInfo">
|
||||
SELECT a.*,
|
||||
b.team_name,
|
||||
c.department_name,
|
||||
@ -160,7 +160,17 @@
|
||||
<if test="param.selectType == '12'.toString()">
|
||||
and a.vaccine_status = 3
|
||||
</if>
|
||||
<choose>
|
||||
<when test="param.orderBy == '1'.toString()">
|
||||
order by a.exit_date desc
|
||||
</when>
|
||||
<when test="param.orderBy == '2'.toString()">
|
||||
order by a.enter_date desc
|
||||
</when>
|
||||
<otherwise>
|
||||
order by a.add_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="getWorkerNumByPersonType" resultType="com.zhgd.jeecg.common.mybatis.EntityMap" parameterType="map">
|
||||
SELECT COUNT(1) total_worker_num,
|
||||
@ -2418,4 +2428,13 @@
|
||||
AND wt.project_sn = #{projectSn}
|
||||
AND w.project_sn = #{projectSn}
|
||||
</select>
|
||||
|
||||
<select id="countEntryAndExitNum" resultType="com.zhgd.xmgl.modules.worker.entity.vo.CountEntryAndExitNumVo">
|
||||
select
|
||||
count(distinct wa.person_sn,if(pass_type=1,1,null)) entryTodayNum,
|
||||
count(distinct wa.person_sn,if(pass_type=2,1,null)) exitTodayNum
|
||||
from worker_info wi
|
||||
join worker_attendance wa on wa.person_sn=wi.person_sn
|
||||
where wa.project_sn=#{projectSn} and update_time>=current_date
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -22,7 +22,7 @@ import java.util.Map;
|
||||
*/
|
||||
public interface IWorkerInfoService extends IService<WorkerInfo> {
|
||||
|
||||
IPage<EntityMap> selectWorkerInfoList(Map<String, Object> map);
|
||||
IPage<WorkerInfo> selectWorkerInfoList(Map<String, Object> map);
|
||||
|
||||
void updateWorkerTeam(Map<String, Object> map);
|
||||
|
||||
@ -124,4 +124,6 @@ public interface IWorkerInfoService extends IService<WorkerInfo> {
|
||||
WorkerAgeVo statisticsWorkerAge(Map<String, Object> map);
|
||||
|
||||
GetWorkerInfoByDevVo getWorkerInfoByDev(GetWorkerInfoByDevDto dto);
|
||||
|
||||
CountEntryAndExitNumVo countEntryAndExitNum(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -143,11 +143,11 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<EntityMap> selectWorkerInfoList(Map<String, Object> map) {
|
||||
public IPage<WorkerInfo> selectWorkerInfoList(Map<String, Object> map) {
|
||||
int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString());
|
||||
int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10000).toString());
|
||||
Page<EntityMap> page = new Page<>(pageNo, pageSize);
|
||||
List<EntityMap> list = workerInfoMapper.selectWorkerInfoList(page, map);
|
||||
Page<WorkerInfo> page = new Page<>(pageNo, pageSize);
|
||||
List<WorkerInfo> list = workerInfoMapper.selectWorkerInfoList(page, map);
|
||||
return page.setRecords(list);
|
||||
}
|
||||
|
||||
@ -1933,6 +1933,11 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
return getWorkerInfoByDevVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CountEntryAndExitNumVo countEntryAndExitNum(Map<String, Object> map) {
|
||||
return baseMapper.countEntryAndExitNum(map);
|
||||
}
|
||||
|
||||
|
||||
private void addDatas(List<WorkerInfo> infos, String del, ArrayList<GetWorkerInfoByDevVo.Worker> datas) {
|
||||
for (WorkerInfo workerInfo : infos) {
|
||||
|
||||
@ -292,6 +292,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.antMatchers("/xmgl/videoItem/getPlayUrlFromHikvision").permitAll()
|
||||
.antMatchers("/xmgl/workerInfo/selectProjectWorkerTypeTotalList").permitAll()
|
||||
.antMatchers("/xmgl/aiAnalyseHardWareAlarmRecord/callback").permitAll()
|
||||
.antMatchers("/xmgl/workerInfo/selectWorkerInfoList").permitAll()
|
||||
.antMatchers("/xmgl/workerInfo/countEntryAndExitNum").permitAll()
|
||||
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
|
||||
.anyRequest().authenticated() // 剩下所有的验证都需要验证
|
||||
.and()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user