添加用户待办事项统计功能
parent
3abe8cbda9
commit
c96bc1dc0e
|
|
@ -68,6 +68,12 @@ public class KeyProjectController {
|
||||||
return SingleResponse.of(keyProjectService.getInfoById(id));
|
return SingleResponse.of(keyProjectService.getInfoById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("用户待办事项-分公司/股份端")
|
||||||
|
@GetMapping("/count/{id}")
|
||||||
|
public SingleResponse<KeyProjectCountCO> count(@PathVariable("id") Long id) {
|
||||||
|
return keyProjectService.count(id);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@PostMapping("/{id}")
|
@PostMapping("/{id}")
|
||||||
public Response remove(@PathVariable("id") Long id) {
|
public Response remove(@PathVariable("id") Long id) {
|
||||||
|
|
|
||||||
|
|
@ -64,14 +64,14 @@ public class HiddenQueryExe {
|
||||||
|
|
||||||
List<HiddenFindUserDO> hiddenFindUserDOs = hiddenFindUserRepository.listAll(params);
|
List<HiddenFindUserDO> hiddenFindUserDOs = hiddenFindUserRepository.listAll(params);
|
||||||
if (hiddenFindUserDOs != null && hiddenFindUserDOs.size() > 0){
|
if (hiddenFindUserDOs != null && hiddenFindUserDOs.size() > 0){
|
||||||
StringBuffer userNames = new StringBuffer();
|
// StringBuffer userNames = new StringBuffer();
|
||||||
StringBuffer departmentNames = new StringBuffer();
|
// StringBuffer departmentNames = new StringBuffer();
|
||||||
hiddenFindUserDOs.stream().forEach(hiddenFindUserDO -> {
|
// hiddenFindUserDOs.stream().forEach(hiddenFindUserDO -> {
|
||||||
userNames.append(hiddenFindUserDO.getFindUserName());
|
// userNames.append(hiddenFindUserDO.getFindUserName());
|
||||||
departmentNames.append(hiddenFindUserDO.getFindDepartmentName());
|
// departmentNames.append(hiddenFindUserDO.getFindDepartmentName());
|
||||||
});
|
// });
|
||||||
hiddenCO.setFindUserName(userNames.toString());
|
// hiddenCO.setFindUserName(userNames.toString());
|
||||||
hiddenCO.setFindDepartmentName(departmentNames.toString());
|
// hiddenCO.setFindDepartmentName(departmentNames.toString());
|
||||||
hiddenCO.setFindUserList(hiddenFindUserCoConvertor.converDOsToCOs(hiddenFindUserDOs));
|
hiddenCO.setFindUserList(hiddenFindUserCoConvertor.converDOsToCOs(hiddenFindUserDOs));
|
||||||
}
|
}
|
||||||
List<HiddenRectificationRecordDO> hiddenRectificationRecordDOs = hiddenRectificationRecordRepository.listAll(params);
|
List<HiddenRectificationRecordDO> hiddenRectificationRecordDOs = hiddenRectificationRecordRepository.listAll(params);
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public class SafetyEnvironmentalInspectionQueryExe {
|
||||||
SafetyEnvironmentalInspectionDO inspectionDO = safetyEnvironmentalInspectionRepository.getByInspectionId(uuid);
|
SafetyEnvironmentalInspectionDO inspectionDO = safetyEnvironmentalInspectionRepository.getByInspectionId(uuid);
|
||||||
Integer verifyType = 2;
|
Integer verifyType = 2;
|
||||||
Integer affirmType = 3;
|
Integer affirmType = 3;
|
||||||
if (!ObjectUtils.isEmpty(inspectionDO.getDefendFlag()) && inspectionDO.getDefendFlag() == 1){
|
if (!ObjectUtils.isEmpty(inspectionDO.getDefendFlag()) && inspectionDO.getDefendFlag() == 1 && inspectionDO.getStatus() != 7){
|
||||||
verifyType = 5;
|
verifyType = 5;
|
||||||
affirmType = 6;
|
affirmType = 6;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.zcloud.key.project.command.query.project;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.alibaba.cola.dto.PageResponse;
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
import com.zcloud.key.project.command.convertor.project.KeyProjectCameraCoConvertor;
|
import com.zcloud.key.project.command.convertor.project.KeyProjectCameraCoConvertor;
|
||||||
|
|
@ -9,8 +10,13 @@ import com.zcloud.key.project.command.convertor.project.KeyProjectCoConvertor;
|
||||||
import com.zcloud.key.project.domain.enums.KeyProjectCameraTypeEnum;
|
import com.zcloud.key.project.domain.enums.KeyProjectCameraTypeEnum;
|
||||||
import com.zcloud.key.project.dto.clientobject.project.*;
|
import com.zcloud.key.project.dto.clientobject.project.*;
|
||||||
import com.zcloud.key.project.dto.project.*;
|
import com.zcloud.key.project.dto.project.*;
|
||||||
|
import com.zcloud.key.project.persistence.dataobject.inspection.SafetyEnvironmentalInspectionDO;
|
||||||
|
import com.zcloud.key.project.persistence.dataobject.inspection.SafetyEnvironmentalInspectionUserDO;
|
||||||
import com.zcloud.key.project.persistence.dataobject.project.*;
|
import com.zcloud.key.project.persistence.dataobject.project.*;
|
||||||
import com.zcloud.key.project.persistence.repository.CorpInfoRepository;
|
import com.zcloud.key.project.persistence.repository.CorpInfoRepository;
|
||||||
|
import com.zcloud.key.project.persistence.repository.hidden.HiddenRepository;
|
||||||
|
import com.zcloud.key.project.persistence.repository.inspection.SafetyEnvironmentalInspectionRepository;
|
||||||
|
import com.zcloud.key.project.persistence.repository.inspection.SafetyEnvironmentalInspectionUserRepository;
|
||||||
import com.zcloud.key.project.persistence.repository.project.KeyProjectCameraRepository;
|
import com.zcloud.key.project.persistence.repository.project.KeyProjectCameraRepository;
|
||||||
import com.zcloud.key.project.persistence.repository.project.KeyProjectRepository;
|
import com.zcloud.key.project.persistence.repository.project.KeyProjectRepository;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
|
@ -35,6 +41,9 @@ public class KeyProjectQueryExe {
|
||||||
private final KeyProjectCoConvertor keyProjectCoConvertor;
|
private final KeyProjectCoConvertor keyProjectCoConvertor;
|
||||||
private final KeyProjectCameraRepository keyProjectCameraRepository;
|
private final KeyProjectCameraRepository keyProjectCameraRepository;
|
||||||
private final KeyProjectCameraCoConvertor keyProjectCameraCoConvertor;
|
private final KeyProjectCameraCoConvertor keyProjectCameraCoConvertor;
|
||||||
|
private final SafetyEnvironmentalInspectionRepository safetyEnvironmentalInspectionRepository;
|
||||||
|
private final SafetyEnvironmentalInspectionUserRepository safetyEnvironmentalInspectionUserRepository;
|
||||||
|
private final HiddenRepository hiddenRepository;
|
||||||
private final CorpInfoRepository corpInfoRepository;
|
private final CorpInfoRepository corpInfoRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -194,5 +203,56 @@ public class KeyProjectQueryExe {
|
||||||
|
|
||||||
return keyProjectCoConvertor.converXgfCorpDOsToCOs(xgfCorpDOList);
|
return keyProjectCoConvertor.converXgfCorpDOsToCOs(xgfCorpDOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public KeyProjectCountCO count(Long id) {
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
|
queryWrapper.eq("jurisdiction_user_id", id);
|
||||||
|
queryWrapper.eq("delete_enum", "FALSE");
|
||||||
|
queryWrapper.in("apply_status",2,5);
|
||||||
|
// 重点作业确认数量
|
||||||
|
Long zdzyqrCount = keyProjectRepository.count(queryWrapper);
|
||||||
|
queryWrapper.clear();
|
||||||
|
queryWrapper.eq("xgf_master_user_id", id);
|
||||||
|
queryWrapper.eq("delete_enum", "FALSE");
|
||||||
|
queryWrapper.in("apply_status",1,4);
|
||||||
|
// 重点作业申请数量
|
||||||
|
Long zdzysqCount = keyProjectRepository.count(queryWrapper);
|
||||||
|
// 检查核实数量
|
||||||
|
List<SafetyEnvironmentalInspectionUserDO> insUserList = safetyEnvironmentalInspectionUserRepository.listByUserId(id);
|
||||||
|
Long jchsCount = 0L;
|
||||||
|
Long shenbianclCount = 0L;
|
||||||
|
Long bjcrqrCount = 0L;
|
||||||
|
for (SafetyEnvironmentalInspectionUserDO insUser : insUserList) {
|
||||||
|
if (insUser.getType() == 2 || insUser.getType() == 5) {
|
||||||
|
jchsCount += 1;
|
||||||
|
} else if (insUser.getType() == 4) {
|
||||||
|
shenbianclCount += 1;
|
||||||
|
} else if (insUser.getType() == 3 || insUser.getType() == 6) {
|
||||||
|
bjcrqrCount += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queryWrapper.clear();
|
||||||
|
queryWrapper.eq("rectification_user_id", id);
|
||||||
|
queryWrapper.eq("delete_enum", "FALSE");
|
||||||
|
queryWrapper.in("state",1,4);
|
||||||
|
Long yhdzgCount = hiddenRepository.count(queryWrapper);
|
||||||
|
queryWrapper.clear();
|
||||||
|
queryWrapper.eq("accept_user_id", id);
|
||||||
|
queryWrapper.eq("delete_enum", "FALSE");
|
||||||
|
queryWrapper.in("state",2);
|
||||||
|
Long yhdysCount = hiddenRepository.count(queryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KeyProjectCountCO keyProjectCountCO = new KeyProjectCountCO();
|
||||||
|
keyProjectCountCO.setZdzyqrCount(zdzyqrCount);
|
||||||
|
keyProjectCountCO.setJchsCount(jchsCount);
|
||||||
|
keyProjectCountCO.setBjcrqrCount(bjcrqrCount);
|
||||||
|
keyProjectCountCO.setShenbianclCount(shenbianclCount);
|
||||||
|
keyProjectCountCO.setYhdzgCount(yhdzgCount);
|
||||||
|
keyProjectCountCO.setYhdysCount(yhdysCount);
|
||||||
|
keyProjectCountCO.setZdzysqCount(zdzysqCount);
|
||||||
|
return keyProjectCountCO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,5 +103,10 @@ public class KeyProjectServiceImpl implements KeyProjectServiceI {
|
||||||
public void updatExecuteStatusJob() {
|
public void updatExecuteStatusJob() {
|
||||||
keyProjectUpdateExe.updatExecuteStatusJob();
|
keyProjectUpdateExe.updatExecuteStatusJob();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SingleResponse<KeyProjectCountCO> count(Long id) {
|
||||||
|
return SingleResponse.of(keyProjectQueryExe.count(id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,5 +43,7 @@ public interface KeyProjectServiceI {
|
||||||
List<XgfCorpCO> getXgfCorp(GetXgfCorpQry qry);
|
List<XgfCorpCO> getXgfCorp(GetXgfCorpQry qry);
|
||||||
|
|
||||||
void updatExecuteStatusJob();
|
void updatExecuteStatusJob();
|
||||||
|
|
||||||
|
SingleResponse<KeyProjectCountCO> count(Long id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.zcloud.key.project.dto.clientobject.hidden;
|
||||||
|
|
||||||
import com.alibaba.cola.dto.ClientObject;
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -46,6 +47,7 @@ public class HiddenAcceptRecordCO extends ClientObject {
|
||||||
private String acceptUserName;
|
private String acceptUserName;
|
||||||
//验收时间
|
//验收时间
|
||||||
@ApiModelProperty(value = "验收时间")
|
@ApiModelProperty(value = "验收时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime acceptTime;
|
private LocalDateTime acceptTime;
|
||||||
//乐观锁
|
//乐观锁
|
||||||
@ApiModelProperty(value = "乐观锁")
|
@ApiModelProperty(value = "乐观锁")
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,8 @@ public class HiddenCO extends ClientObject {
|
||||||
|
|
||||||
@ApiModelProperty(value = "整改时间", name = "rectificationTime")
|
@ApiModelProperty(value = "整改时间", name = "rectificationTime")
|
||||||
private String rectificationTime; // 整改时间
|
private String rectificationTime; // 整改时间
|
||||||
|
@ApiModelProperty(value = "验收时间", name = "acceptTime")
|
||||||
|
private String acceptTime; // 验收时间
|
||||||
|
|
||||||
@ApiModelProperty(value = "验收人企业id", name = "racceptCorpId")
|
@ApiModelProperty(value = "验收人企业id", name = "racceptCorpId")
|
||||||
private Long acceptCorpId;
|
private Long acceptCorpId;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.zcloud.key.project.dto.clientobject.hidden;
|
package com.zcloud.key.project.dto.clientobject.hidden;
|
||||||
|
|
||||||
import com.alibaba.cola.dto.ClientObject;
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -38,6 +39,7 @@ public class HiddenRectificationRecordCO extends ClientObject {
|
||||||
private Long rectificationUserId;
|
private Long rectificationUserId;
|
||||||
//整改时间
|
//整改时间
|
||||||
@ApiModelProperty(value = "整改时间")
|
@ApiModelProperty(value = "整改时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime rectificationTime;
|
private LocalDateTime rectificationTime;
|
||||||
//整改描述
|
//整改描述
|
||||||
@ApiModelProperty(value = "整改描述")
|
@ApiModelProperty(value = "整改描述")
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,11 @@ public class KeyProjectCO extends ClientObject {
|
||||||
//是否设置监理单位,1:是,0:否
|
//是否设置监理单位,1:是,0:否
|
||||||
@ApiModelProperty(value = "是否设置监理单位,1:是,0:否")
|
@ApiModelProperty(value = "是否设置监理单位,1:是,0:否")
|
||||||
private Integer supervisionUnitFlag;
|
private Integer supervisionUnitFlag;
|
||||||
|
@ApiModelProperty(value = "未验收隐患数")
|
||||||
|
private Long uncheckHiddenCount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "未完成安全环保检查")
|
||||||
|
private Long unFinishInspectionCount;
|
||||||
//监理单位名称
|
//监理单位名称
|
||||||
@ApiModelProperty(value = "监理单位名称")
|
@ApiModelProperty(value = "监理单位名称")
|
||||||
private String supervisionUnitCorpName;
|
private String supervisionUnitCorpName;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.zcloud.key.project.dto.clientobject.project;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author zhaokai
|
||||||
|
* @Date 2026-03-16 10:00:38
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class KeyProjectCountCO extends ClientObject {
|
||||||
|
//主键
|
||||||
|
@ApiModelProperty(value = "重点作业确认数量")
|
||||||
|
private Long zdzyqrCount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "重点作业申请数量")
|
||||||
|
private Long zdzysqCount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "检查核实数量")
|
||||||
|
private Long jchsCount;
|
||||||
|
@ApiModelProperty(value = "申辩处理数量")
|
||||||
|
private Long shenbianclCount;
|
||||||
|
@ApiModelProperty(value = "被检查人确认数量")
|
||||||
|
private Long bjcrqrCount;
|
||||||
|
@ApiModelProperty(value = "隐患待整改数量")
|
||||||
|
private Long yhdzgCount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "隐患待验收数量")
|
||||||
|
private Long yhdysCount;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -32,8 +32,10 @@ public class HiddenPageQry extends PageQuery {
|
||||||
private String endTime;
|
private String endTime;
|
||||||
private String projectName;
|
private String projectName;
|
||||||
private String hiddenFindUserName;
|
private String hiddenFindUserName;
|
||||||
|
private String rectificationUserName;
|
||||||
private List<Integer> stateList;
|
private List<Integer> stateList;
|
||||||
|
private Long xgfCorpinfoId;
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
|
||||||
private String menuPath;
|
private String menuPath;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ public class SafetyEnvironmentalInspectionPageQry extends PageQuery {
|
||||||
private String projectName;
|
private String projectName;
|
||||||
private String inspectionUserName;
|
private String inspectionUserName;
|
||||||
private List<Integer> statusList;
|
private List<Integer> statusList;
|
||||||
|
private Integer status;
|
||||||
private String year;
|
private String year;
|
||||||
private String menuPath;
|
private String menuPath;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public class KeyProjectPageQry extends PageQuery {
|
||||||
@ApiModelProperty(value = "创建单位id")
|
@ApiModelProperty(value = "创建单位id")
|
||||||
private Long corpinfoId;
|
private Long corpinfoId;
|
||||||
@ApiModelProperty(value = "创建单位名称")
|
@ApiModelProperty(value = "创建单位名称")
|
||||||
private String corpinfName;
|
private String corpinfoName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "project_type")
|
@ApiModelProperty(value = "project_type")
|
||||||
private String projectType;
|
private String projectType;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ public class KeyProjectQry implements Serializable {
|
||||||
@ApiModelProperty(value = "创建单位id")
|
@ApiModelProperty(value = "创建单位id")
|
||||||
private Long corpinfoId;
|
private Long corpinfoId;
|
||||||
@ApiModelProperty(value = "创建单位名称")
|
@ApiModelProperty(value = "创建单位名称")
|
||||||
private String corpinfName;
|
private String corpinfoName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "project_type")
|
@ApiModelProperty(value = "project_type")
|
||||||
private String projectType;
|
private String projectType;
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,10 @@ public class HiddenDO extends BaseDO {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String rectificationTime; // 整改时间
|
private String rectificationTime; // 整改时间
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "验收时间", name = "acceptTime")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String acceptTime; // 验收时间
|
||||||
|
|
||||||
@ApiModelProperty(value = "验收人企业id", name = "racceptCorpId")
|
@ApiModelProperty(value = "验收人企业id", name = "racceptCorpId")
|
||||||
private Long acceptCorpId;
|
private Long acceptCorpId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,16 @@ public class KeyProjectDO extends BaseDO {
|
||||||
//相关方企业id
|
//相关方企业id
|
||||||
@ApiModelProperty(value = "相关方企业id")
|
@ApiModelProperty(value = "相关方企业id")
|
||||||
private Long xgfCorpinfoId;
|
private Long xgfCorpinfoId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "未验收隐患数")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long uncheckHiddenCount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "未完成安全环保检查")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long unFinishInspectionCount;
|
||||||
//相关方单位负责人id
|
//相关方单位负责人id
|
||||||
@ApiModelProperty(value = "相关方单位负责人id")
|
@ApiModelProperty(value = "相关方单位负责人id")
|
||||||
private Long xgfMasterUserId;
|
private Long xgfMasterUserId;
|
||||||
|
|
|
||||||
|
|
@ -33,5 +33,7 @@ public interface SafetyEnvironmentalInspectionMapper extends BaseMapper<SafetyEn
|
||||||
SafetyEnvironmentalInspectionDO getInfoById(Long id);
|
SafetyEnvironmentalInspectionDO getInfoById(Long id);
|
||||||
|
|
||||||
List<SafetyEnvironmentalInspectionDO> listAll(@Param("params") Map<String, Object> params);
|
List<SafetyEnvironmentalInspectionDO> listAll(@Param("params") Map<String, Object> params);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,6 @@ import java.util.Map;
|
||||||
public interface SafetyEnvironmentalInspectionUserMapper extends BaseMapper<SafetyEnvironmentalInspectionUserDO> {
|
public interface SafetyEnvironmentalInspectionUserMapper extends BaseMapper<SafetyEnvironmentalInspectionUserDO> {
|
||||||
|
|
||||||
List<SafetyEnvironmentalInspectionUserDO> selectListByInspectionId(@Param("params") Map<String, Object> params);
|
List<SafetyEnvironmentalInspectionUserDO> selectListByInspectionId(@Param("params") Map<String, Object> params);
|
||||||
|
List<SafetyEnvironmentalInspectionUserDO> listByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,5 +73,6 @@ public class SafetyEnvironmentalInspectionRepositoryImpl extends BaseRepositoryI
|
||||||
public List<SafetyEnvironmentalInspectionDO> listAll(Map<String, Object> params) {
|
public List<SafetyEnvironmentalInspectionDO> listAll(Map<String, Object> params) {
|
||||||
return safetyEnvironmentalInspectionMapper.listAll(params);
|
return safetyEnvironmentalInspectionMapper.listAll(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,5 +115,10 @@ public class SafetyEnvironmentalInspectionUserRepositoryImpl extends BaseReposit
|
||||||
}
|
}
|
||||||
return safetyEnvironmentalInspectionUserMapper.selectCount(queryWrapper);
|
return safetyEnvironmentalInspectionUserMapper.selectCount(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SafetyEnvironmentalInspectionUserDO> listByUserId(Long userId) {
|
||||||
|
return safetyEnvironmentalInspectionUserMapper.listByUserId(userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,5 +25,6 @@ public interface SafetyEnvironmentalInspectionRepository extends BaseRepository<
|
||||||
SafetyEnvironmentalInspectionDO getInfoById(Long id);
|
SafetyEnvironmentalInspectionDO getInfoById(Long id);
|
||||||
|
|
||||||
List<SafetyEnvironmentalInspectionDO> listAll(Map<String, Object> params);
|
List<SafetyEnvironmentalInspectionDO> listAll(Map<String, Object> params);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,5 +32,7 @@ public interface SafetyEnvironmentalInspectionUserRepository extends BaseReposit
|
||||||
|
|
||||||
Long countByInspectionId(String inspectionId, Integer status, Integer type);
|
Long countByInspectionId(String inspectionId, Integer status, Integer type);
|
||||||
|
|
||||||
|
List<SafetyEnvironmentalInspectionUserDO> listByUserId(Long userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,11 @@
|
||||||
h.*,
|
h.*,
|
||||||
ru.name as rectification_user_name,
|
ru.name as rectification_user_name,
|
||||||
au.name as accept_user_name,
|
au.name as accept_user_name,
|
||||||
GROUP_CONCAT(DISTINCT hfu.name) hidden_find_user_name,
|
GROUP_CONCAT(DISTINCT hfu.name) find_user_name,
|
||||||
GROUP_CONCAT(DISTINCT hfd.name) find_department_name,
|
GROUP_CONCAT(DISTINCT hfd.name) find_department_name,
|
||||||
kp.project_name,
|
kp.project_name,
|
||||||
MAX(hrr.rectification_time) as rectification_time
|
MAX(hrr.rectification_time) as rectification_time,
|
||||||
|
MAX(har.accept_time) as accept_time
|
||||||
from
|
from
|
||||||
hidden h
|
hidden h
|
||||||
left join user ru on h.rectification_user_id = ru.id
|
left join user ru on h.rectification_user_id = ru.id
|
||||||
|
|
@ -24,7 +25,9 @@
|
||||||
left join safety_environmental_inspection i on i.inspection_id = h.foreign_key
|
left join safety_environmental_inspection i on i.inspection_id = h.foreign_key
|
||||||
left join key_project kp on kp.key_project_id = i.key_project_id
|
left join key_project kp on kp.key_project_id = i.key_project_id
|
||||||
left join hidden_rectification_record hrr on hrr.hidden_id = h.hidden_id and hrr.delete_enum = 'FALSE'
|
left join hidden_rectification_record hrr on hrr.hidden_id = h.hidden_id and hrr.delete_enum = 'FALSE'
|
||||||
|
left join hidden_accept_record har on har.hidden_id = h.hidden_id and har.delete_enum = 'FALSE' and har.state = 1
|
||||||
<where>
|
<where>
|
||||||
|
h.delete_enum = 'FALSE'
|
||||||
<if test="params.hiddenDesc != null and params.hiddenDesc != ''">
|
<if test="params.hiddenDesc != null and params.hiddenDesc != ''">
|
||||||
and h.hidden_desc LIKE CONCAT('%', #{params.hiddenDesc}, '%')
|
and h.hidden_desc LIKE CONCAT('%', #{params.hiddenDesc}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -41,6 +44,10 @@
|
||||||
<if test="params.projectName != null and params.projectName != ''">
|
<if test="params.projectName != null and params.projectName != ''">
|
||||||
and kp.project_name LIKE CONCAT('%', #{params.projectName}, '%')
|
and kp.project_name LIKE CONCAT('%', #{params.projectName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.rectificationUserName != null and params.rectificationUserName != ''">
|
||||||
|
and ru.name LIKE CONCAT('%', #{params.rectificationUserName}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
|
||||||
<if test="params.stateList != null and params.stateList.size() > 0">
|
<if test="params.stateList != null and params.stateList.size() > 0">
|
||||||
and h.state in
|
and h.state in
|
||||||
|
|
@ -49,11 +56,17 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test="params.state != null">
|
||||||
|
and h.state = #{params.state}
|
||||||
|
</if>
|
||||||
|
<if test="params.xgfCorpinfoId != null">
|
||||||
|
and kp.xgf_corpinfo_id = #{params.xgfCorpinfoId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
GROUP BY h.id
|
||||||
<if test="params.hiddenFindUserName != null and params.hiddenFindUserName != ''">
|
<if test="params.hiddenFindUserName != null and params.hiddenFindUserName != ''">
|
||||||
HAVING hidden_find_user_name LIKE CONCAT('%', #{params.hiddenFindUserName}, '%')
|
HAVING hidden_find_user_name LIKE CONCAT('%', #{params.hiddenFindUserName}, '%')
|
||||||
</if>
|
</if>
|
||||||
GROUP BY h.id
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
h.create_time desc
|
h.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -65,14 +78,10 @@
|
||||||
kp.project_name,
|
kp.project_name,
|
||||||
rci.corp_name as rectification_corp_name,
|
rci.corp_name as rectification_corp_name,
|
||||||
ru.name as rectification_user_name,
|
ru.name as rectification_user_name,
|
||||||
rd.name as rectification_department_name
|
rd.name as rectification_department_name,
|
||||||
|
|
||||||
|
GROUP_CONCAT(DISTINCT hfu.name) find_user_name,
|
||||||
-- aci.corp_name as accept_corp_name,
|
GROUP_CONCAT(DISTINCT hfd.name) find_department_name
|
||||||
-- au.name as accept_user_name,
|
|
||||||
-- ad.name as accept_department_name,
|
|
||||||
-- GROUP_CONCAT(DISTINCT hfu.name) find_user_name,
|
|
||||||
-- GROUP_CONCAT(DISTINCT hfd.name) find_department_name
|
|
||||||
from
|
from
|
||||||
hidden h
|
hidden h
|
||||||
left join safety_environmental_inspection i on i.inspection_id = h.foreign_key
|
left join safety_environmental_inspection i on i.inspection_id = h.foreign_key
|
||||||
|
|
@ -81,13 +90,9 @@
|
||||||
left join user ru on ru.id = h.rectification_user_id
|
left join user ru on ru.id = h.rectification_user_id
|
||||||
left join department rd on rd.id = h.rectification_department_id
|
left join department rd on rd.id = h.rectification_department_id
|
||||||
|
|
||||||
-- left join corp_info aci on aci.id = h.accept_corp_id
|
left join hidden_find_user hf on hf.hidden_id = h.hidden_id and hf.delete_enum = 'FALSE'
|
||||||
-- left join user au on au.id = h.accept_user_id
|
left join user hfu on hfu.id = hf.find_user_id
|
||||||
-- left join department ad on ad.id = h.accept_department_id
|
left join department hfd on hfd.id = hfu.department_id
|
||||||
|
|
||||||
-- left join hidden_find_user hf on hf.hidden_id = h.hidden_id and hf.delete_enum = 'FALSE'
|
|
||||||
-- left join user hfu on hfu.id = hf.find_user_id
|
|
||||||
-- left join department hfd on hfd.id = hfu.department_id
|
|
||||||
<where>
|
<where>
|
||||||
h.id = #{id}
|
h.id = #{id}
|
||||||
</where>
|
</where>
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@
|
||||||
<if test="params.xgfCorpinfoName != null and params.xgfCorpinfoName != ''">
|
<if test="params.xgfCorpinfoName != null and params.xgfCorpinfoName != ''">
|
||||||
AND xgfci.corp_name LIKE CONCAT('%', #{params.xgfCorpinfoName}, '%')
|
AND xgfci.corp_name LIKE CONCAT('%', #{params.xgfCorpinfoName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.corpinfName != null and params.corpinfName != ''">
|
<if test="params.corpinfoName != null and params.corpinfoName != ''">
|
||||||
AND cp.corp_name LIKE CONCAT('%', #{params.corpinfName}, '%')
|
AND cp.corp_name LIKE CONCAT('%', #{params.corpinfoName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.xgfMasterUserId != null">
|
<if test="params.xgfMasterUserId != null">
|
||||||
AND kp.xgf_master_user_id = #{params.xgfMasterUserId}
|
AND kp.xgf_master_user_id = #{params.xgfMasterUserId}
|
||||||
|
|
@ -99,7 +99,9 @@
|
||||||
jurcorp.corp_name as jurisdictionCorpinfoName,
|
jurcorp.corp_name as jurisdictionCorpinfoName,
|
||||||
juruser.name as jurisdictionUserName,
|
juruser.name as jurisdictionUserName,
|
||||||
xgfci.corp_name AS xgfCorpinfoName,
|
xgfci.corp_name AS xgfCorpinfoName,
|
||||||
xgfuser.name as xgfUserName
|
xgfuser.name as xgfUserName,
|
||||||
|
count(h.hidden_id) AS uncheckHiddenCount,
|
||||||
|
count(sei.inspection_id) AS unFinishInspectionCount
|
||||||
FROM key_project kp
|
FROM key_project kp
|
||||||
LEFT JOIN department fpd ON kp.master_department_id = fpd.id
|
LEFT JOIN department fpd ON kp.master_department_id = fpd.id
|
||||||
LEFT JOIN department ci ON kp.jurisdiction_department_id = ci.id
|
LEFT JOIN department ci ON kp.jurisdiction_department_id = ci.id
|
||||||
|
|
@ -108,6 +110,8 @@
|
||||||
LEFT JOIN corp_info xgfci ON kp.xgf_corpinfo_id = xgfci.id
|
LEFT JOIN corp_info xgfci ON kp.xgf_corpinfo_id = xgfci.id
|
||||||
left join user xgfuser ON kp.xgf_master_user_id = xgfuser.id
|
left join user xgfuser ON kp.xgf_master_user_id = xgfuser.id
|
||||||
LEFT JOIN corp_info cp ON kp.corpinfo_id = cp.id
|
LEFT JOIN corp_info cp ON kp.corpinfo_id = cp.id
|
||||||
|
left join safety_environmental_inspection sei ON kp.key_project_id = sei.key_project_id and sei.delete_enum = 'FALSE' and sei.status not in (0 ,5)
|
||||||
|
left join hidden h on h.foreign_key = sei.inspection_id and h.delete_enum = 'FALSE' and h.state != 3
|
||||||
<where>
|
<where>
|
||||||
kp.delete_enum = 'FALSE'
|
kp.delete_enum = 'FALSE'
|
||||||
<!-- projectName 模糊查询判空 -->
|
<!-- projectName 模糊查询判空 -->
|
||||||
|
|
@ -130,8 +134,8 @@
|
||||||
<if test="params.xgfCorpinfoName != null and params.xgfCorpinfoName != ''">
|
<if test="params.xgfCorpinfoName != null and params.xgfCorpinfoName != ''">
|
||||||
AND xgfci.corp_name LIKE CONCAT('%', #{params.xgfCorpinfoName}, '%')
|
AND xgfci.corp_name LIKE CONCAT('%', #{params.xgfCorpinfoName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.corpinfName != null and params.corpinfName != ''">
|
<if test="params.corpinfoName != null and params.corpinfoName != ''">
|
||||||
AND cp.corp_name LIKE CONCAT('%', #{params.corpinfName}, '%')
|
AND cp.corp_name LIKE CONCAT('%', #{params.corpinfoName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.xgfMasterUserId != null">
|
<if test="params.xgfMasterUserId != null">
|
||||||
AND kp.xgf_master_user_id = #{params.xgfMasterUserId}
|
AND kp.xgf_master_user_id = #{params.xgfMasterUserId}
|
||||||
|
|
@ -176,7 +180,8 @@
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
GROUP BY kp.key_project_id
|
GROUP BY kp.key_project_id
|
||||||
ORDER BY kp.update_time desc
|
ORDER BY
|
||||||
|
IF(kp.update_time IS NOT NULL, kp.update_time, kp.create_time) DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="getInfoById" resultType="com.zcloud.key.project.persistence.dataobject.project.KeyProjectDO">
|
<select id="getInfoById" resultType="com.zcloud.key.project.persistence.dataobject.project.KeyProjectDO">
|
||||||
SELECT kp.*,
|
SELECT kp.*,
|
||||||
|
|
@ -300,6 +305,7 @@
|
||||||
LEFT JOIN corp_info cp ON kp.corpinfo_id = cp.id
|
LEFT JOIN corp_info cp ON kp.corpinfo_id = cp.id
|
||||||
<where>
|
<where>
|
||||||
kp.delete_enum = 'FALSE'
|
kp.delete_enum = 'FALSE'
|
||||||
|
and kp.apply_status != 0
|
||||||
<!-- projectName 模糊查询判空 -->
|
<!-- projectName 模糊查询判空 -->
|
||||||
<if test="projectName != null and projectName != ''">
|
<if test="projectName != null and projectName != ''">
|
||||||
AND kp.project_name LIKE CONCAT('%', #{projectName}, '%')
|
AND kp.project_name LIKE CONCAT('%', #{projectName}, '%')
|
||||||
|
|
@ -320,8 +326,8 @@
|
||||||
<if test="xgfCorpinfoName != null and xgfCorpinfoName != ''">
|
<if test="xgfCorpinfoName != null and xgfCorpinfoName != ''">
|
||||||
AND xgfci.corp_name LIKE CONCAT('%', #{xgfCorpinfoName}, '%')
|
AND xgfci.corp_name LIKE CONCAT('%', #{xgfCorpinfoName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="corpinfName != null and corpinfName != ''">
|
<if test="corpinfoName != null and corpinfoName != ''">
|
||||||
AND cp.corp_name LIKE CONCAT('%', #{corpinfName}, '%')
|
AND cp.corp_name LIKE CONCAT('%', #{corpinfoName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="xgfMasterUserId != null">
|
<if test="xgfMasterUserId != null">
|
||||||
AND kp.xgf_master_user_id = #{xgfMasterUserId}
|
AND kp.xgf_master_user_id = #{xgfMasterUserId}
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,16 @@
|
||||||
select
|
select
|
||||||
aa.*,
|
aa.*,
|
||||||
kp.id as project_id,
|
kp.id as project_id,
|
||||||
kp.project_name
|
kp.project_name,
|
||||||
|
kp.xgf_master_user_id,
|
||||||
|
xgfu.name as xgf_master_user_name,
|
||||||
|
xgfu.department_id as xgf_master_department_id,
|
||||||
|
xgfd.name as xgf_master_department_name
|
||||||
from
|
from
|
||||||
ai_alarm aa
|
ai_alarm aa
|
||||||
left join key_project kp on kp.key_project_id = aa.key_project_id
|
left join key_project kp on kp.key_project_id = aa.key_project_id
|
||||||
|
left join user xgfu on xgfu.id = kp.xgf_master_user_id
|
||||||
|
left join department xgfd on xgfd.id = xgfu.department_id
|
||||||
<where>
|
<where>
|
||||||
aa.delete_enum = 'FALSE'
|
aa.delete_enum = 'FALSE'
|
||||||
<if test="params.videoName != null and params.videoName != ''">
|
<if test="params.videoName != null and params.videoName != ''">
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,9 @@
|
||||||
#{st}
|
#{st}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.status != null">
|
||||||
|
and i.status = #{params.status}
|
||||||
|
</if>
|
||||||
|
|
||||||
GROUP BY i.id
|
GROUP BY i.id
|
||||||
<if test="params.inspectionUserName != null and params.inspectionUserName != ''">
|
<if test="params.inspectionUserName != null and params.inspectionUserName != ''">
|
||||||
|
|
@ -231,5 +234,7 @@
|
||||||
CASE WHEN i.status = 6 THEN 0 ELSE 1 END,
|
CASE WHEN i.status = 6 THEN 0 ELSE 1 END,
|
||||||
i.create_time desc
|
i.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,5 +23,17 @@
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="listByUserId" resultType="com.zcloud.key.project.persistence.dataobject.inspection.SafetyEnvironmentalInspectionUserDO">
|
||||||
|
|
||||||
|
select
|
||||||
|
iu.*
|
||||||
|
FROM
|
||||||
|
safety_environmental_inspection_user iu
|
||||||
|
LEFT JOIN safety_environmental_inspection i ON iu.inspection_id = i.inspection_id
|
||||||
|
where i.delete_enum = 'FALSE' and iu.delete_enum = 'FALSE' AND iu.STATUS = 0 and i.status != 0
|
||||||
|
and iu.user_id = #{userId}
|
||||||
|
GROUP BY iu.id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue