项目库详情-查询不符合项列表接口开发。
This commit is contained in:
+12
@@ -527,4 +527,16 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
|||||||
public Result<?> compulsoryTransfer(@RequestBody JSONObject json) {
|
public Result<?> compulsoryTransfer(@RequestBody JSONObject json) {
|
||||||
return this.projectLawsInventoryEOService.compulsoryTransfer(json);
|
return this.projectLawsInventoryEOService.compulsoryTransfer(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询不符合项列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "项目库-法规清单表-查询不符合项列表")
|
||||||
|
@ApiOperation(value="项目库-法规清单表-查询不符合项列表", notes="项目库-法规清单表-查询不符合项列表")
|
||||||
|
@GetMapping(value = "/queryNotComplianList")
|
||||||
|
public Result<?> queryNotComplianList(@RequestParam Map<String,Object> params) {
|
||||||
|
List<Map<String,Object>> result = this.projectLawsInventoryEOService.queryNotComplianList(params);
|
||||||
|
return Result.OK(result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -522,4 +522,12 @@ public class ProjectLawsInventoryEO implements Serializable {
|
|||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "验证符合性确认-责任确认截止时间")
|
@ApiModelProperty(value = "验证符合性确认-责任确认截止时间")
|
||||||
private Date verifyDutyDueDate;
|
private Date verifyDutyDueDate;
|
||||||
|
|
||||||
|
/**流程类型*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String flowType;
|
||||||
|
|
||||||
|
/**流程类型展示名称*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String flowTypeName;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -3,6 +3,7 @@ package com.jero.modules.project.mapper;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
@@ -44,4 +45,6 @@ public interface ProjectLawsInventoryEOMapper extends BaseMapper<ProjectLawsInve
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String, Object>> getTaskToConfirmStatisticsGroupByTerritory(@Param("projectLibraryId") String projectLibraryId, @Param("taskAffirmStatus") String taskAffirmStatus);
|
List<Map<String, Object>> getTaskToConfirmStatisticsGroupByTerritory(@Param("projectLibraryId") String projectLibraryId, @Param("taskAffirmStatus") String taskAffirmStatus);
|
||||||
|
|
||||||
|
List<Map<String,Object>> queryNotComplianList(@Param("params") Map<String, Object> params);
|
||||||
}
|
}
|
||||||
|
|||||||
+66
@@ -105,4 +105,70 @@
|
|||||||
and task_affirm_status = #{taskAffirmStatus}
|
and task_affirm_status = #{taskAffirmStatus}
|
||||||
group by duty_territory;
|
group by duty_territory;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryNotComplianList" resultType="hashmap">
|
||||||
|
select
|
||||||
|
id as "id",
|
||||||
|
serial_number as "serialNumber",
|
||||||
|
title as "title",
|
||||||
|
flow_type as "flowType",
|
||||||
|
duty_territory as "dutyTerritory",
|
||||||
|
flow_status as "flowStatus",
|
||||||
|
regulation_owner_id as "regulationOwnerId",
|
||||||
|
duty_id as "dutyId"
|
||||||
|
from (
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
serial_number,
|
||||||
|
title,
|
||||||
|
"2" as flow_type,
|
||||||
|
duty_territory,
|
||||||
|
design_flow_status as flow_status,
|
||||||
|
regulation_owner_id,
|
||||||
|
design_duty_id as duty_id,
|
||||||
|
project_library_id
|
||||||
|
FROM
|
||||||
|
project_laws_inventory
|
||||||
|
WHERE
|
||||||
|
project_library_id = #{params.projectLibraryId}
|
||||||
|
and design_flow_status IN
|
||||||
|
<foreach collection="params.complianceFlowStatusList" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
serial_number,
|
||||||
|
title,
|
||||||
|
"4" as flow_type,
|
||||||
|
duty_territory,
|
||||||
|
verify_flow_status as flow_status,
|
||||||
|
regulation_owner_id,
|
||||||
|
verify_duty_id as duty_id,
|
||||||
|
project_library_id
|
||||||
|
FROM
|
||||||
|
project_laws_inventory
|
||||||
|
WHERE
|
||||||
|
project_library_id = #{params.projectLibraryId}
|
||||||
|
and verify_flow_status IN
|
||||||
|
<foreach collection="params.complianceFlowStatusList" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
) temp
|
||||||
|
<include refid="BaseQuerySql"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<sql id="BaseQuerySql">
|
||||||
|
<where>
|
||||||
|
<if test="params.serialNumber != null and params.serialNumber !=''">
|
||||||
|
and temp.serial_number like CONCAT(CONCAT('%',#{params.serialNumber}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.title != null and params.title !=''">
|
||||||
|
and temp.title like CONCAT(CONCAT('%',#{params.title}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.dutyTerritory != null and params.dutyTerritory !=''">
|
||||||
|
and temp.duty_territory = #{params.dutyTerritory}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+3
@@ -2,6 +2,7 @@ package com.jero.modules.project.service;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.itextpdf.text.DocumentException;
|
import com.itextpdf.text.DocumentException;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
@@ -276,4 +277,6 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Map<String, Object>> getVerifyComplianceStatistice(List<ProjectLawsInventoryEO> projectLawsInventoryEOList);
|
List<Map<String, Object>> getVerifyComplianceStatistice(List<ProjectLawsInventoryEO> projectLawsInventoryEOList);
|
||||||
|
|
||||||
|
List<Map<String,Object>> queryNotComplianList(Map<String, Object> params);
|
||||||
}
|
}
|
||||||
|
|||||||
+65
@@ -8,6 +8,8 @@ import com.aliyuncs.utils.IOUtils;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.itextpdf.text.Font;
|
import com.itextpdf.text.Font;
|
||||||
import com.itextpdf.text.*;
|
import com.itextpdf.text.*;
|
||||||
@@ -75,6 +77,7 @@ import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
|
|||||||
import com.jero.modules.todoCenter.enums.VerifyComplianceFlowNodeKeyEnum;
|
import com.jero.modules.todoCenter.enums.VerifyComplianceFlowNodeKeyEnum;
|
||||||
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
|
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
|
||||||
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
|
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
|
||||||
|
import com.jero.modules.todoCenter.vo.ProcessInfoVO;
|
||||||
import com.jero.modules.wkflow.entity.ProcessHistoryEO;
|
import com.jero.modules.wkflow.entity.ProcessHistoryEO;
|
||||||
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
|
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
|
||||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||||
@@ -12532,6 +12535,68 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String,Object>> queryNotComplianList(Map<String, Object> params) {
|
||||||
|
String cut = (String) params.get("cut");
|
||||||
|
|
||||||
|
List<String> complianceFlowStatusList = new ArrayList<>();
|
||||||
|
complianceFlowStatusList.add(ComplianceFlowStatusEnum.INCONFORMITY.getValue());
|
||||||
|
complianceFlowStatusList.add(ComplianceFlowStatusEnum.TO_TRACK.getValue());
|
||||||
|
params.put("complianceFlowStatusList",complianceFlowStatusList);
|
||||||
|
List<Map<String,Object>> result = this.baseMapper.queryNotComplianList(params);
|
||||||
|
if(CollectionUtils.isNotEmpty(result)){
|
||||||
|
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||||
|
|
||||||
|
List<String> userIdList = new ArrayList<>();
|
||||||
|
|
||||||
|
List<String> regulationOwnerIdList = result.stream().filter(
|
||||||
|
data -> StringUtils.isNotEmpty((String) data.get("regulationOwnerId"))
|
||||||
|
).map(e -> (String) e.get("regulationOwnerId")).distinct().collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isNotEmpty(regulationOwnerIdList)){
|
||||||
|
userIdList.addAll(regulationOwnerIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> dutyIdList = result.stream().filter(
|
||||||
|
data -> StringUtils.isNotEmpty((String) data.get("dutyId"))
|
||||||
|
).map(e -> (String) e.get("dutyId")).distinct().collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isNotEmpty(dutyIdList)){
|
||||||
|
userIdList.addAll(dutyIdList);
|
||||||
|
}
|
||||||
|
List<SysUser> userList = new ArrayList<>();
|
||||||
|
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||||
|
userList = this.sysUserService.querySysUserListByIdList(userIdList);
|
||||||
|
}
|
||||||
|
for (Map<String, Object> dataMap : result) {
|
||||||
|
String dutyTerritory = (String) dataMap.get("dutyTerritory");
|
||||||
|
if(StringUtils.isNotEmpty(dutyTerritory)){
|
||||||
|
if(StringUtils.isNotEmpty(dutyTerritory)){
|
||||||
|
String dutyTerritory_dictText = this.disposeShowDictItemValue(sysDictItems, dutyTerritory,cut,ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
|
||||||
|
dataMap.put("dutyTerritory_dictText",dutyTerritory_dictText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String flowStatus = (String) dataMap.get("flowStatus");
|
||||||
|
if(StringUtils.isNotEmpty(flowStatus)){
|
||||||
|
dataMap.put("flowStatusName",ComplianceFlowStatusEnum.getTextByValue(flowStatus,cut));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(CollectionUtils.isNotEmpty(userList)){
|
||||||
|
String regulationOwnerId = (String) dataMap.get("regulationOwnerId");
|
||||||
|
if(StringUtils.isNotEmpty(regulationOwnerId)){
|
||||||
|
String regulationOwnerIdName = this.sysUserService.getUsernameByUserId(userList,regulationOwnerId);
|
||||||
|
dataMap.put("regulationOwnerIdName",regulationOwnerIdName);
|
||||||
|
}
|
||||||
|
String dutyId = (String) dataMap.get("dutyId");
|
||||||
|
if(StringUtils.isNotEmpty(dutyId)){
|
||||||
|
String dutyIdName = this.sysUserService.getUsernameByUserId(userList,dutyId);
|
||||||
|
dataMap.put("dutyIdName",dutyIdName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设计符合性相关待办任务强制转办
|
* 设计符合性相关待办任务强制转办
|
||||||
* @param projectLibraryId
|
* @param projectLibraryId
|
||||||
|
|||||||
Reference in New Issue
Block a user