Merge remote-tracking branch 'origin/master'
This commit is contained in:
+98
-30
@@ -23,6 +23,7 @@ import com.jero.modules.laws.standardmasterplan.vo.LawsStandardMasterPlanDetails
|
||||
import com.jero.modules.laws.standardmasterplan.vo.LawsStandardMasterPlanVO;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -40,7 +41,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @ClassName: LawsStandardMasterPlanServiceImpl
|
||||
@@ -110,9 +110,18 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
// 保存 标准主计划_子表信息
|
||||
List<LawsStandardMasterPlanSublist> lawsStandardMasterPlanSublistList =
|
||||
lawsStandardMasterPlanDTO.getLawsStandardMasterPlanSublistList();
|
||||
lawsStandardMasterPlanSublistList = lawsStandardMasterPlanSublistList.stream()
|
||||
.map(v -> v.setMasterPlanId(lawsStandardMasterPlan.getId()))
|
||||
.collect(Collectors.toList());
|
||||
for (LawsStandardMasterPlanSublist lawsStandardMasterPlanSublist : lawsStandardMasterPlanSublistList) {
|
||||
lawsStandardMasterPlanSublist.setMasterPlanId(lawsStandardMasterPlan.getId());
|
||||
if (LawsStandardMasterPlanCommon.TEXT_STORAGE.equals(lawsStandardMasterPlanSublist.getType())){
|
||||
LawsDomesticStandard lawsDomesticStandard =
|
||||
lawsDomesticStandardService.getById(lawsStandardMasterPlan.getStandardId());
|
||||
if (!Objects.isNull(lawsDomesticStandard)){
|
||||
SysUser sysUser = sysUserService.getUserByName(lawsDomesticStandard.getCreateBy());
|
||||
lawsStandardMasterPlanSublist.setResponsiblePerson(sysUser.getId());
|
||||
lawsStandardMasterPlanSublist.setActualCompletionDate(lawsDomesticStandard.getCreateTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
lawsStandardMasterPlanSublistService.saveBatch(lawsStandardMasterPlanSublistList);
|
||||
}
|
||||
|
||||
@@ -196,7 +205,7 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
queryWrapper.in(LawsStandardMasterPlan::getId, idList);
|
||||
}
|
||||
List<LawsStandardMasterPlan> list = list(queryWrapper);
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
for (LawsStandardMasterPlan lawsStandardMasterPlan : list) {
|
||||
Map<String, String> lm = new HashMap<>();
|
||||
LawsDomesticStandard lawsDomesticStandard =
|
||||
@@ -253,8 +262,13 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
.findFirst();
|
||||
vehicleModelRectification.ifPresent(v -> {
|
||||
lm.put("pcrCode9", v.getPcrCode());
|
||||
lm.put("responsiblePerson9", sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo());
|
||||
lm.put("completionAccomplishDate9", dateFormat.format(v.getCompletionAccomplishDate()));
|
||||
if (StringUtils.isNotBlank(v.getResponsiblePerson())){
|
||||
String responsiblePerson = sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo();
|
||||
lm.put("responsiblePerson9", StringUtils.isNotBlank(responsiblePerson) ? responsiblePerson : "");
|
||||
}
|
||||
if (!Objects.isNull(v.getCompletionAccomplishDate())){
|
||||
lm.put("completionAccomplishDate9", dateFormat.format(v.getCompletionAccomplishDate()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -265,9 +279,16 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
.findFirst();
|
||||
generalDocumentRectificationPlan.ifPresent(v -> {
|
||||
lm.put("isInvolved8", getYesNoValue(v));
|
||||
lm.put("responsiblePerson8", sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo());
|
||||
lm.put("plannedCompletionDate8", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
lm.put("actualCompletionDate8", dateFormat.format(v.getActualCompletionDate()));
|
||||
if (StringUtils.isNotBlank(v.getResponsiblePerson())){
|
||||
String responsiblePerson = sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo();
|
||||
lm.put("responsiblePerson8", StringUtils.isNotBlank(responsiblePerson) ? responsiblePerson : "");
|
||||
}
|
||||
if (!Objects.isNull(v.getPlannedCompletionDate())){
|
||||
lm.put("plannedCompletionDate8", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
}
|
||||
if (!Objects.isNull(v.getActualCompletionDate())){
|
||||
lm.put("actualCompletionDate8", dateFormat.format(v.getActualCompletionDate()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(v.getDeliverableFileId())){
|
||||
OSSFile ossFile = ossFileService.getById(v.getDeliverableFileId());
|
||||
lm.put("deliverableFileId8", ossFile.getFileName());
|
||||
@@ -282,9 +303,16 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
.findFirst();
|
||||
regulatoryComplianceInvestigation.ifPresent(v -> {
|
||||
lm.put("isInvolved7", getYesNoValue(v));
|
||||
lm.put("responsiblePerson7", sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo());
|
||||
lm.put("plannedCompletionDate7", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
lm.put("actualCompletionDate7", dateFormat.format(v.getActualCompletionDate()));
|
||||
if (StringUtils.isNotBlank(v.getResponsiblePerson())){
|
||||
String responsiblePerson = sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo();
|
||||
lm.put("responsiblePerson7", StringUtils.isNotBlank(responsiblePerson) ? responsiblePerson : "");
|
||||
}
|
||||
if (!Objects.isNull(v.getPlannedCompletionDate())){
|
||||
lm.put("plannedCompletionDate7", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
}
|
||||
if (!Objects.isNull(v.getActualCompletionDate())){
|
||||
lm.put("actualCompletionDate7", dateFormat.format(v.getActualCompletionDate()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(v.getDeliverableFileId())){
|
||||
OSSFile ossFile = ossFileService.getById(v.getDeliverableFileId());
|
||||
lm.put("deliverableFileId7", ossFile.getFileName());
|
||||
@@ -299,9 +327,16 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
.findFirst();
|
||||
marketRegulationListUpdate.ifPresent(v -> {
|
||||
lm.put("isInvolved6", getYesNoValue(v));
|
||||
lm.put("responsiblePerson6", sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo());
|
||||
lm.put("plannedCompletionDate6", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
lm.put("actualCompletionDate6", dateFormat.format(v.getActualCompletionDate()));
|
||||
if (StringUtils.isNotBlank(v.getResponsiblePerson())){
|
||||
String responsiblePerson = sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo();
|
||||
lm.put("responsiblePerson6", StringUtils.isNotBlank(responsiblePerson) ? responsiblePerson : "");
|
||||
}
|
||||
if (!Objects.isNull(v.getPlannedCompletionDate())){
|
||||
lm.put("plannedCompletionDate6", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
}
|
||||
if (!Objects.isNull(v.getActualCompletionDate())){
|
||||
lm.put("actualCompletionDate6", dateFormat.format(v.getActualCompletionDate()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(v.getDeliverableFileId())){
|
||||
OSSFile ossFile = ossFileService.getById(v.getDeliverableFileId());
|
||||
lm.put("deliverableFileId6", ossFile.getFileName());
|
||||
@@ -320,9 +355,16 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
.findFirst();
|
||||
regulatoryPromotion.ifPresent(v -> {
|
||||
lm.put("isInvolved5", getYesNoValue(v));
|
||||
lm.put("responsiblePerson5", sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo());
|
||||
lm.put("plannedCompletionDate5", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
lm.put("actualCompletionDate5", dateFormat.format(v.getActualCompletionDate()));
|
||||
if (StringUtils.isNotBlank(v.getResponsiblePerson())){
|
||||
String responsiblePerson = sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo();
|
||||
lm.put("responsiblePerson5", StringUtils.isNotBlank(responsiblePerson) ? responsiblePerson : "");
|
||||
}
|
||||
if (!Objects.isNull(v.getPlannedCompletionDate())){
|
||||
lm.put("plannedCompletionDate5", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
}
|
||||
if (!Objects.isNull(v.getActualCompletionDate())){
|
||||
lm.put("actualCompletionDate5", dateFormat.format(v.getActualCompletionDate()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(v.getDeliverableFileId())){
|
||||
OSSFile ossFile = ossFileService.getById(v.getDeliverableFileId());
|
||||
lm.put("deliverableFileId5", ossFile.getFileName());
|
||||
@@ -335,8 +377,13 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
.filter(v -> LawsStandardMasterPlanCommon.TEXT_STORAGE.equals(v.getType()))
|
||||
.findFirst();
|
||||
textStorage.ifPresent(v -> {
|
||||
lm.put("responsiblePerson2", sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo());
|
||||
lm.put("actualCompletionDate2", dateFormat.format(v.getActualCompletionDate()));
|
||||
if (StringUtils.isNotBlank(v.getResponsiblePerson())){
|
||||
String responsiblePerson = sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo();
|
||||
lm.put("responsiblePerson2", StringUtils.isNotBlank(responsiblePerson) ? responsiblePerson : "");
|
||||
}
|
||||
if (!Objects.isNull(v.getActualCompletionDate())){
|
||||
lm.put("actualCompletionDate2", dateFormat.format(v.getActualCompletionDate()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -346,9 +393,16 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
.findFirst();
|
||||
informationInput.ifPresent(v -> {
|
||||
lm.put("isInvolved1", getYesNoValue(v));
|
||||
lm.put("responsiblePerson1", sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo());
|
||||
lm.put("plannedCompletionDate1", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
lm.put("actualCompletionDate1", dateFormat.format(v.getActualCompletionDate()));
|
||||
if (StringUtils.isNotBlank(v.getResponsiblePerson())){
|
||||
String responsiblePerson = sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo();
|
||||
lm.put("responsiblePerson1", StringUtils.isNotBlank(responsiblePerson) ? responsiblePerson : "");
|
||||
}
|
||||
if (!Objects.isNull(v.getPlannedCompletionDate())){
|
||||
lm.put("plannedCompletionDate1", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
}
|
||||
if (!Objects.isNull(v.getActualCompletionDate())){
|
||||
lm.put("actualCompletionDate1", dateFormat.format(v.getActualCompletionDate()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(v.getDeliverableFileId())){
|
||||
OSSFile ossFile = ossFileService.getById(v.getDeliverableFileId());
|
||||
lm.put("deliverableFileId1", ossFile.getFileName());
|
||||
@@ -363,9 +417,16 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
.findFirst();
|
||||
interpretationOfRegulations.ifPresent(v -> {
|
||||
lm.put("isInvolved4", getYesNoValue(v));
|
||||
lm.put("responsiblePerson4", sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo());
|
||||
lm.put("plannedCompletionDate4", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
lm.put("actualCompletionDate4", dateFormat.format(v.getActualCompletionDate()));
|
||||
if (StringUtils.isNotBlank(v.getResponsiblePerson())){
|
||||
String responsiblePerson = sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo();
|
||||
lm.put("responsiblePerson4", StringUtils.isNotBlank(responsiblePerson) ? responsiblePerson : "");
|
||||
}
|
||||
if (!Objects.isNull(v.getPlannedCompletionDate())){
|
||||
lm.put("plannedCompletionDate4", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
}
|
||||
if (!Objects.isNull(v.getActualCompletionDate())){
|
||||
lm.put("actualCompletionDate4", dateFormat.format(v.getActualCompletionDate()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(v.getDeliverableFileId())){
|
||||
OSSFile ossFile = ossFileService.getById(v.getDeliverableFileId());
|
||||
lm.put("deliverableFileId4", ossFile.getFileName());
|
||||
@@ -379,9 +440,16 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
.findFirst();
|
||||
importNotification.ifPresent(v -> {
|
||||
lm.put("isInvolved3", getYesNoValue(v));
|
||||
lm.put("responsiblePerson3", sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo());
|
||||
lm.put("plannedCompletionDate3", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
lm.put("actualCompletionDate3", dateFormat.format(v.getActualCompletionDate()));
|
||||
if (StringUtils.isNotBlank(v.getResponsiblePerson())){
|
||||
String responsiblePerson = sysUserService.getById(v.getResponsiblePerson()).calcNameWorkNo();
|
||||
lm.put("responsiblePerson3", StringUtils.isNotBlank(responsiblePerson) ? responsiblePerson : "");
|
||||
}
|
||||
if (!Objects.isNull(v.getPlannedCompletionDate())){
|
||||
lm.put("plannedCompletionDate3", dateFormat.format(v.getPlannedCompletionDate()));
|
||||
}
|
||||
if (!Objects.isNull(v.getActualCompletionDate())){
|
||||
lm.put("actualCompletionDate3", dateFormat.format(v.getActualCompletionDate()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(v.getDeliverableFileId())){
|
||||
OSSFile ossFile = ossFileService.getById(v.getDeliverableFileId());
|
||||
lm.put("deliverableFileId3", ossFile.getFileName());
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user