Merge remote-tracking branch 'origin/dev_20230526_Mobile'

# Conflicts:
#	jero-boot/db/蔚来标准sql/dev_2nd_period.sql
This commit is contained in:
高嵩
2023-06-26 09:34:31 +08:00
16 changed files with 316 additions and 64 deletions
@@ -71,9 +71,10 @@ public class TaskStatisticsServiceImpl implements ITaskStatisticsService {
List<ProcessInfoEO> preHomoList = piEoList.stream().filter(piEo -> {
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.CERTIFICATION_LC.getValue());
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(preHomoList)) {
preHomoCount = this.getPreHomoCount(pidEoList, preHomoList);
}
preHomoCount = preHomoList.size();
// if (CollectionUtils.isNotEmpty(preHomoList)) {
// preHomoCount = this.getPreHomoCount(pidEoList, preHomoList);
// }
List<ProcessInfoEO> technologyEvaluationList = piEoList.stream().filter(piEo -> {
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.FGJSPG.getValue());
@@ -436,6 +436,13 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
convertAfterMap.put("create_time",new Date());
convertAfterMap.put("create_by",problemKnowledgeBaseEO.getCreateBy());
convertAfterMap.put("show_permissions",problemKnowledgeBaseEO.getShowPermissions());
String accessoryFileName = "";
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getAccessoryFile())){
List<OSSFile> accessoryFileList = this.iOSSFileService.getFileInfos(problemKnowledgeBaseEO.getAccessoryFile());
accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
}
convertAfterMap.put("file_name",accessoryFileName);
}
}
@@ -310,4 +310,11 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
* @return
*/
Map<String, Object> groupByCertificationProgress(List<ProjectCertificationInventoryEO> pciEos);
/**
* 同步待办中心明细数据-认证清单 截止日期
* @param endTime
* @param editEndTimeCertificationInventoryEOS
*/
void syncProcessInfoDetailEndTime(Date endTime, List<ProjectCertificationInventoryEO> editEndTimeCertificationInventoryEOS);
}
@@ -213,6 +213,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(CollectionUtils.isNotEmpty(editEndTimeCertificationInventoryEOS)){
// 同步更新待办中心-流程明细截止日期
this.syncProcessInfoDetailEndTime(projectCertificationInventoryEO.getEndTime(),editEndTimeCertificationInventoryEOS);
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(editEndTimeCertificationInventoryEOS.get(0).getProjectLibraryId());
if(ObjectUtils.isNotEmpty(projectLibraryBase)){
List<String> userIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
@@ -610,28 +613,30 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
QueryWrapper<ProjectCertificationInventoryEO> certificationQueryWrap = new QueryWrapper<>();
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getId,idList);
certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
// certificationQueryWrap.lambda().in(ProjectCertificationInventoryEO::getFlowStatus,flowStatusList);
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOS = this.list(certificationQueryWrap);
if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOS)){
projectCertificationInventoryEOS = projectCertificationInventoryEOS.stream().filter(certificationInventory -> {
List<ProjectCertificationInventoryEO> pciEoListTemp = projectCertificationInventoryEOS.stream().filter(certificationInventory -> {
boolean flag = false;
if(projectCertificationInventoryEO.getEndTime() != null && certificationInventory.getEndTime() != null){
if(!projectCertificationInventoryEO.getEndTime().equals(certificationInventory.getEndTime())){
flag = true;
if(StringUtils.equals(certificationInventory.getFlowStatus(),CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
if(projectCertificationInventoryEO.getEndTime() != null && certificationInventory.getEndTime() != null){
if(!projectCertificationInventoryEO.getEndTime().equals(certificationInventory.getEndTime())){
flag = true;
}
}
}
return flag;
}).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(projectCertificationInventoryEOS)) {
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectCertificationInventoryEOS.get(0).getProjectLibraryId());
if (CollectionUtils.isNotEmpty(pciEoListTemp)) {
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(pciEoListTemp.get(0).getProjectLibraryId());
if(ObjectUtils.isNotEmpty(projectLibraryBase)){
List<String> userIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
List<SysUser> userInfoList = this.sysUserService.querySysUserListByIdList(userIdList);
this.sendMessageByTemplateId(
projectCertificationInventoryEOS,
pciEoListTemp,
TemplateInfoEnum2.CERTIFICATION_MESSAGE14.getValue(),
userIdList,
userInfoList,
@@ -639,6 +644,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
);
}
}
this.syncProcessInfoDetailEndTime(projectCertificationInventoryEO.getEndTime(),projectCertificationInventoryEOS);
}
if(CollectionUtils.isNotEmpty(updateList)){
this.updateBatchById(updateList);
@@ -5925,6 +5932,62 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
return result;
}
@Override
public void syncProcessInfoDetailEndTime(Date newEndTime, List<ProjectCertificationInventoryEO> pciEoList) {
pciEoList = pciEoList.stream().filter(pciEo -> {
boolean flag = false;
if(!newEndTime.equals(pciEo.getEndTime())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(pciEoList)){
List<String> pciIdList = pciEoList.stream().map(ProjectCertificationInventoryEO::getId).distinct().collect(Collectors.toList());
QueryWrapper<ProcessInfoDetailEO> pidQueryWrap = new QueryWrapper<>();
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue());
pidQueryWrap.lambda().in(ProcessInfoDetailEO::getProjectLawsInventoryId,pciIdList);
List<ProcessInfoDetailEO> pidEoList = this.processInfoDetailEOService.list(pidQueryWrap);
if(CollectionUtils.isNotEmpty(pidEoList)){
List<ProcessInfoDetailEO> updatePidEoList = new ArrayList<>();
for (ProjectCertificationInventoryEO pciEo : pciEoList) {
String pciEoId = pciEo.getId();
String flowStatus = pciEo.getFlowStatus();
// 如果该数据为 结果待提交或审查退回的时候
if (StringUtils.equals(flowStatus,CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|| StringUtils.equals(flowStatus,CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue()) ) {
List<ProcessInfoDetailEO> pidEoListTemp = pidEoList.stream().filter(pidEo -> {
boolean flag = (
StringUtils.equals(pidEo.getProjectLawsInventoryId(),pciEoId)
&& StringUtils.equals(pidEo.getStatus(),TaskStatusEnum.NOT_DONE.getValue())
&& StringUtils.equals(pidEo.getTaskDefinitionKey(),CertificationFlowNodeEnum.ZRRTJRW.getKey())
);
return flag;
}).collect(Collectors.toList());
updatePidEoList.addAll(pidEoListTemp);
}else if(StringUtils.equals(flowStatus,CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())){
List<ProcessInfoDetailEO> pidEoListTemp = pidEoList.stream().filter(pidEo -> {
boolean flag = (
StringUtils.equals(pidEo.getProjectLawsInventoryId(),pciEoId)
&& StringUtils.equals(flowStatus,TaskStatusEnum.NOT_DONE.getValue())
&& StringUtils.equals(pidEo.getTaskDefinitionKey(),CertificationFlowNodeEnum.RZGCSSC.getKey())
);
return flag;
}).collect(Collectors.toList());
updatePidEoList.addAll(pidEoListTemp);
}
}
if(CollectionUtils.isNotEmpty(updatePidEoList)){
updatePidEoList.forEach(pidEo -> pidEo.setEndTime(newEndTime));
this.processInfoDetailEOService.updateBatchById(updatePidEoList);
}
}
}
}
@Override
public Map<String, List<Map<String, Object>>> queryDutyPersonByProjectId(Map<String, Object> params) {
Map<String, List<Map<String, Object>>> result = new HashMap<>();
@@ -1252,6 +1252,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
List<String> fieldList = new ArrayList<>();
fieldList.add("title");//权重5
fieldList.add("content");//权重4
fieldList.add("file_name");//权重3
//fieldList.add("module_type");
//fieldList.add("id");
//fieldList.add("flag");
@@ -537,6 +537,38 @@
<foreach collection="params.qdqrFlowTypeValue" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="params.mobileProcessing == 0">
union
SELECT
pi.id,
'' as project_library_id,
'' as project_laws_inventory_id,
pi.buss_document_library_id,
pi.acti_proc_inst_id,
'--' AS project_name,
'' as year_name,
bdl.serial_number,
bdl.title,
bdl.title_en,
concat( bdl.serial_number, ' ', bdl.title ) AS standard_info,
pi.flow_type,
pi.create_by,
pi.end_time,
pi.STATUS,
pi.prc_num,
pi.prc_name,
'' as project_name_id,
'' as target_market,
'' as studio_engineer,
'' as project_version,
'' as parent_id
FROM
process_info pi
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
WHERE
pi.flow_type IN ( '5', '6' )
AND ( pi.id IN ( SELECT pid.process_info_id FROM process_info_detail pid WHERE pid.user_id = #{params.currentUserId} AND pid.STATUS = #{params.taskStatus} ) )
</if>
)temp
<include refid="BaseQuerySql"/>
order by