fix(标准主计划): 完善
This commit is contained in:
+6
@@ -50,6 +50,7 @@ import com.jero.modules.laws.standard.entity.PartName;
|
||||
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
||||
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||
import com.jero.modules.laws.standard.service.ILawsPartNameService;
|
||||
import com.jero.modules.laws.standardmasterplan.servicce.ILawsStandardMasterPlanService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
||||
import com.jero.modules.split.mapper.SarFileSplitItemsValEOMapper;
|
||||
@@ -126,6 +127,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
private final SarFileSplitItemsValEOMapper sarFileSplitItemsValEOMapper;
|
||||
private final IDocumentSplitService documentSplitService;
|
||||
private final ManagementService managementService;
|
||||
private final ILawsStandardMasterPlanService lawsStandardMasterPlanService;
|
||||
|
||||
private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
private final List<String> tempList = new ArrayList<>();
|
||||
@@ -239,6 +241,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
if (flowUtility.isLastNode(processAll.getProcessInstanceId())){
|
||||
// 查询业务信息
|
||||
StandardInterpretDTO standardInterpretDTO = queryBusinessData(processAll, processApprovalRecord);
|
||||
ProcessStandardInterpret processStandardInterpret = standardInterpretDTO.getProcessStandardInterpret();
|
||||
// 更新数据到拆分库
|
||||
List<ProcessStandardInterpretClauseSublist> processStandardInterpretClauseSublistList =
|
||||
standardInterpretDTO.getProcessStandardInterpretClauseSublistList();
|
||||
@@ -270,6 +273,9 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
lawsDocumentSplit.setItemContent(null);
|
||||
lawsDocumentSplitMapper.updateById(lawsDocumentSplit);
|
||||
}
|
||||
// 同步标准主计划
|
||||
lawsStandardMasterPlanService.syncInterpretationOfRegulations(processStandardInterpret.getId(),
|
||||
processStandardInterpret.getStandardId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-1
@@ -6,7 +6,6 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary;
|
||||
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -82,4 +81,16 @@ public class LawsConformityAssessmentController {
|
||||
lawsConformityAssessmentLibraryService.export(response, lawsConformityAssessmentLibrary, "法规符合性评估库", "法规符合性评估库", req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标准名称+适用市场
|
||||
*
|
||||
* @param lawsConformityAssessmentLibrary
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规符合性评估库-法规符合性评估库-标准名称+适用市场")
|
||||
@ApiOperation(value = "法规符合性评估库-法规符合性评估库-标准名称+适用市场", notes = "法规符合性评估库-法规符合性评估库-标准名称+适用市场")
|
||||
@GetMapping(value = "/queryOne")
|
||||
public Result<LawsConformityAssessmentLibrary> queryOne(LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary){
|
||||
return Result.OK(lawsConformityAssessmentLibraryService.queryOne(lawsConformityAssessmentLibrary));
|
||||
}
|
||||
}
|
||||
|
||||
+5
-2
@@ -1,14 +1,15 @@
|
||||
package com.jero.modules.assessmentLibrary.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
* @description 针对表【laws_conformity_assessment_library(法规符合性评估库)】的数据库操作Mapper
|
||||
@@ -20,6 +21,8 @@ public interface LawsConformityAssessmentLibraryMapper extends BaseMapper<LawsCo
|
||||
Page<LawsConformityAssessmentLibrary> queryByPage(Page<LawsConformityAssessmentLibrary> page, @Param(Constants.WRAPPER) QueryWrapper<LawsConformityAssessmentLibrary> queryWrapper);
|
||||
|
||||
Page<LawsConformityAssessmentLibraryDetail> detail(Page<LawsConformityAssessmentLibraryDetail> page, @Param(Constants.WRAPPER) QueryWrapper<LawsConformityAssessmentLibraryDetail> queryWrapper);
|
||||
|
||||
List<LawsConformityAssessmentLibrary> queryByPage(@Param(Constants.WRAPPER) QueryWrapper<LawsConformityAssessmentLibrary> queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -1,10 +1,9 @@
|
||||
package com.jero.modules.assessmentLibrary.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -43,4 +42,6 @@ public interface ILawsConformityAssessmentLibraryService extends IService<LawsCo
|
||||
*/
|
||||
void export(HttpServletResponse response, LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary,
|
||||
String fileName, String sheetName, HttpServletRequest req);
|
||||
|
||||
LawsConformityAssessmentLibrary queryOne(LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary);
|
||||
}
|
||||
|
||||
+17
-7
@@ -13,10 +13,8 @@ import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
||||
import com.jero.modules.assessmentLibrary.entity.vo.LawsConformityAssessmentLibraryExportVO;
|
||||
import com.jero.modules.assessmentLibrary.entity.vo.MaterialFile;
|
||||
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
||||
import com.jero.modules.assessmentLibrary.mapper.LawsConformityAssessmentLibraryMapper;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.DeclareFileList;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardDeclareExcel;
|
||||
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
||||
import com.jero.modules.laws.enterprise.util.BeanCopyUtils;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
@@ -33,15 +31,11 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
@@ -172,6 +166,22 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LawsConformityAssessmentLibrary queryOne(LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary) {
|
||||
QueryWrapper<LawsConformityAssessmentLibrary> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(StringUtils.isNotBlank(lawsConformityAssessmentLibrary.getStandardNumber()),
|
||||
"d.standard_number", lawsConformityAssessmentLibrary.getStandardNumber());
|
||||
if (StringUtils.isNotBlank(lawsConformityAssessmentLibrary.getApplicableMarket())) {
|
||||
queryWrapper.in("d.applicable_market", Arrays.asList(lawsConformityAssessmentLibrary.getApplicableMarket().split(",")));
|
||||
}
|
||||
List<LawsConformityAssessmentLibrary> result = lawsConformityAssessmentLibraryMapper.queryByPage(queryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(result)){
|
||||
return result.get(0);
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void generateHyperlink(List<LawsConformityAssessmentLibraryExportVO> vos, Workbook workbook) {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
// 设置字体颜色、下划线
|
||||
|
||||
+15
@@ -207,4 +207,19 @@ public class MarketStandardController {
|
||||
}
|
||||
return marketStandardService.publish(map.get("id"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询第一个版本
|
||||
*
|
||||
* @param versionFlag
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "外部标准库-市场法规清单-查询第一个版本")
|
||||
@ApiOperation(value = "外部标准库-市场法规清单-查询第一个版本", notes = "外部标准库-市场法规清单-查询第一个版本")
|
||||
@GetMapping(value = "/queryFirstByVersionFlag")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Translation
|
||||
public Result<LawsMarketStandard> queryFirstByVersionFlag(String versionFlag) {
|
||||
return Result.OK(marketStandardService.queryFirstByVersionFlag(versionFlag));
|
||||
}
|
||||
}
|
||||
|
||||
+8
-2
@@ -1,12 +1,11 @@
|
||||
package com.jero.modules.laws.marketStandard.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.laws.marketStandard.entity.LawsMarketStandard;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.laws.marketStandard.entity.LawsMarketStandardDetail;
|
||||
import com.jero.modules.laws.marketStandard.entity.MarketStandardDetailVO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -100,4 +99,11 @@ public interface ILawsMarketStandardService extends IService<LawsMarketStandard>
|
||||
* @param id 清单id
|
||||
*/
|
||||
void updateStatus(String id);
|
||||
|
||||
/**
|
||||
* 根据版本标识查询第一个版本
|
||||
* @param versionFlag
|
||||
* @return
|
||||
*/
|
||||
LawsMarketStandard queryFirstByVersionFlag(String versionFlag);
|
||||
}
|
||||
|
||||
+9
@@ -459,6 +459,15 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LawsMarketStandard queryFirstByVersionFlag(String versionFlag) {
|
||||
LambdaQueryWrapper<LawsMarketStandard> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(LawsMarketStandard::getVersionFlag, versionFlag);
|
||||
queryWrapper.orderByAsc(LawsMarketStandard::getCreateTime);
|
||||
queryWrapper.last("limit 1");
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
|
||||
private void syncData(LawsMarketStandard lawsMarketStandardOld) {
|
||||
String oldId = lawsMarketStandardOld.getId();
|
||||
lawsMarketStandardOld.setId(null);
|
||||
|
||||
+4
@@ -116,6 +116,10 @@ public class LawsDomesticStandard implements Serializable {
|
||||
@Excel(name = "标准状态", width = 15)
|
||||
@ApiModelProperty(value = "标准状态")
|
||||
private java.lang.String standardState;
|
||||
/**责任人*/
|
||||
@Excel(name = "责任人", width = 15)
|
||||
@ApiModelProperty(value = "责任人")
|
||||
private java.lang.String responsibleUser;
|
||||
/**责任部门*/
|
||||
@Excel(name = "主控部门", width = 15)
|
||||
@ApiModelProperty(value = "主控部门")
|
||||
|
||||
+2
-1
@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: LawsStandardMasterPlanController
|
||||
@@ -64,7 +65,7 @@ public class LawsStandardMasterPlanController {
|
||||
@AutoLog(value = "标准主计划-列表查询", operateType = CommonConstant.OPERATE_TYPE_1)
|
||||
@ApiOperation(value="标准主计划-列表查询", notes="标准主计划-列表查询")
|
||||
@GetMapping(value = "/queryByList")
|
||||
public Result<LawsStandardMasterPlanVO> queryByList(LawsStandardMasterPlanVO lawsStandardMasterPlanVO) {
|
||||
public Result<List<LawsStandardMasterPlanVO>> queryByList(LawsStandardMasterPlanVO lawsStandardMasterPlanVO) {
|
||||
return Result.OK(lawsStandardMasterPlanService.queryByList(lawsStandardMasterPlanVO));
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -9,6 +9,8 @@ import com.jero.modules.laws.standardmasterplan.vo.LawsStandardMasterPlanVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: LawsStandardMasterPlanMapper
|
||||
* @Description:
|
||||
@@ -33,5 +35,6 @@ public interface LawsStandardMasterPlanMapper extends BaseMapper<LawsStandardMas
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
LawsStandardMasterPlanVO queryByList(@Param(Constants.WRAPPER) QueryWrapper<LawsStandardMasterPlanVO> queryWrapper);
|
||||
List<LawsStandardMasterPlanVO> queryByList(
|
||||
@Param(Constants.WRAPPER) QueryWrapper<LawsStandardMasterPlanVO> queryWrapper);
|
||||
}
|
||||
|
||||
+13
-1
@@ -2,6 +2,7 @@ package com.jero.modules.laws.standardmasterplan.servicce;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||
import com.jero.modules.laws.standardmasterplan.dto.LawsStandardMasterPlanDTO;
|
||||
import com.jero.modules.laws.standardmasterplan.entity.LawsStandardMasterPlan;
|
||||
import com.jero.modules.laws.standardmasterplan.vo.LawsStandardMasterPlanDetailsVO;
|
||||
@@ -9,6 +10,7 @@ import com.jero.modules.laws.standardmasterplan.vo.LawsStandardMasterPlanVO;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @InterfaceName: LawsStandardMasterPlanService
|
||||
@@ -28,7 +30,7 @@ public interface ILawsStandardMasterPlanService extends IService<LawsStandardMas
|
||||
/**
|
||||
* 标准主计划-列表查询
|
||||
*/
|
||||
LawsStandardMasterPlanVO queryByList(LawsStandardMasterPlanVO lawsStandardMasterPlanVO);
|
||||
List<LawsStandardMasterPlanVO> queryByList(LawsStandardMasterPlanVO lawsStandardMasterPlanVO);
|
||||
|
||||
/**
|
||||
* 标准主计划-新增
|
||||
@@ -54,4 +56,14 @@ public interface ILawsStandardMasterPlanService extends IService<LawsStandardMas
|
||||
* 标准主计划-导出
|
||||
*/
|
||||
ModelAndView exportExcel(HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 标准主计划-同步 法规解读
|
||||
*/
|
||||
void syncInterpretationOfRegulations(String id, String standardId);
|
||||
|
||||
/**
|
||||
* 标准主计划-同步 法规符合性排查
|
||||
*/
|
||||
void syncRegulatoryComplianceInvestigation(LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary);
|
||||
}
|
||||
|
||||
+184
-10
@@ -10,6 +10,17 @@ import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.util.SnowflakeUtils;
|
||||
import com.jero.modules.activiti.entity.ProcessAll;
|
||||
import com.jero.modules.activiti.enums.ProcessStatusEnum;
|
||||
import com.jero.modules.activiti.process.standardinterpret.entity.ProcessStandardInterpret;
|
||||
import com.jero.modules.activiti.process.standardinterpret.service.ProcessStandardInterpretService;
|
||||
import com.jero.modules.activiti.service.ProcessAllService;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary;
|
||||
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
||||
import com.jero.modules.assessmentLibrary.service.ILawsEvaluationNotMetLibraryService;
|
||||
import com.jero.modules.laws.marketStandard.entity.LawsMarketStandard;
|
||||
import com.jero.modules.laws.marketStandard.service.ILawsMarketStandardService;
|
||||
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
||||
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
||||
import com.jero.modules.laws.standardmasterplan.common.LawsStandardMasterPlanCommon;
|
||||
@@ -28,6 +39,7 @@ import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecgframework.poi.excel.entity.TemplateExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgTemplateExcelView;
|
||||
@@ -41,6 +53,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @ClassName: LawsStandardMasterPlanServiceImpl
|
||||
@@ -63,6 +76,12 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
private final ISysDictService sysDictService;
|
||||
private final ISysUserService sysUserService;
|
||||
private final IOSSFileService ossFileService;
|
||||
private final ILawsMarketStandardService lawsMarketStandardService;
|
||||
private final ILawsConformityAssessmentLibraryService lawsConformityAssessmentLibraryService;
|
||||
private final ILawsEvaluationNotMetLibraryService lawsEvaluationNotMetLibraryService;
|
||||
private final ProcessAllService processAllService;
|
||||
private final ProcessStandardInterpretService processStandardInterpretService;
|
||||
|
||||
@Value("${jero.path.exportExcelTempPath}")
|
||||
private String exportExcelTempPath;
|
||||
|
||||
@@ -76,7 +95,7 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
}
|
||||
|
||||
@Override
|
||||
public LawsStandardMasterPlanVO queryByList(LawsStandardMasterPlanVO lawsStandardMasterPlanVO) {
|
||||
public List<LawsStandardMasterPlanVO> queryByList(LawsStandardMasterPlanVO lawsStandardMasterPlanVO) {
|
||||
QueryWrapper<LawsStandardMasterPlanVO> queryWrapper =
|
||||
getLawsStandardMasterPlanVOQueryWrapper(lawsStandardMasterPlanVO);
|
||||
return lawsStandardMasterPlanMapper.queryByList(queryWrapper);
|
||||
@@ -112,14 +131,51 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
lawsStandardMasterPlanDTO.getLawsStandardMasterPlanSublistList();
|
||||
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());
|
||||
}
|
||||
String type = lawsStandardMasterPlanSublist.getType();
|
||||
switch (type) {
|
||||
case LawsStandardMasterPlanCommon.INTERPRETATION_OF_REGULATIONS:
|
||||
// 查询标准第一次发起并结束的法规解读流程
|
||||
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpret>()
|
||||
.eq(ProcessStandardInterpret::getStandardId,
|
||||
lawsStandardMasterPlan.getStandardId())
|
||||
.orderByAsc(ProcessStandardInterpret::getCreateTime)
|
||||
.last("limit 1"));
|
||||
if (!Objects.isNull(processStandardInterpret)){
|
||||
ProcessAll processAll = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
|
||||
.eq(ProcessAll::getProjectId, processStandardInterpret.getProjectId())
|
||||
.eq(ProcessAll::getPrcStatus, ProcessStatusEnum.COMPLETED.getValue()));
|
||||
if (!Objects.isNull(processAll)){
|
||||
lawsStandardMasterPlanSublist.setAssociationId(processAll.getId());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LawsStandardMasterPlanCommon.MARKET_REGULATION_LIST_UPDATE:
|
||||
lawsStandardMasterPlanSublist.setAssociationId(lawsStandardMasterPlanVO.getMarketStandardId());
|
||||
// 根据版本标识查询第一个版本
|
||||
String versionFlag = lawsStandardMasterPlanVO.getVersionFlag();
|
||||
LawsMarketStandard lawsMarketStandard =
|
||||
lawsMarketStandardService.queryFirstByVersionFlag(versionFlag);
|
||||
if (!Objects.isNull(lawsMarketStandard)){
|
||||
lawsStandardMasterPlanSublist.setAssociationId(lawsMarketStandard.getId());
|
||||
}
|
||||
break;
|
||||
case LawsStandardMasterPlanCommon.REGULATORY_COMPLIANCE_INVESTIGATION:
|
||||
// 根据 标准名称+适用市场 查询 法规符合性排查
|
||||
LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary =
|
||||
new LawsConformityAssessmentLibrary();
|
||||
LawsMarketStandard lawsMarketStandard1 =
|
||||
lawsMarketStandardService.getById(lawsStandardMasterPlanVO.getMarketStandardId());
|
||||
lawsConformityAssessmentLibrary.setStandardNumber(lawsStandardMasterPlanVO.getStandardNumber());
|
||||
lawsConformityAssessmentLibrary.setApplicableMarket(lawsMarketStandard1.getCountry());
|
||||
LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary1 =
|
||||
lawsConformityAssessmentLibraryService.queryOne(lawsConformityAssessmentLibrary);
|
||||
if (!Objects.isNull(lawsConformityAssessmentLibrary1)){
|
||||
lawsStandardMasterPlanSublist.setAssociationId(lawsConformityAssessmentLibrary1.getId());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
lawsStandardMasterPlanSublistService.saveBatch(lawsStandardMasterPlanSublistList);
|
||||
@@ -166,12 +222,87 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
// 查询 标准主计划基础信息
|
||||
LawsStandardMasterPlanVO lawsStandardMasterPlanVO = new LawsStandardMasterPlanVO();
|
||||
lawsStandardMasterPlanVO.setId(id);
|
||||
lawsStandardMasterPlanDetailsVO.setLawsStandardMasterPlanVO(queryByList(lawsStandardMasterPlanVO));
|
||||
lawsStandardMasterPlanDetailsVO.setLawsStandardMasterPlanVO(queryByList(lawsStandardMasterPlanVO).get(0));
|
||||
LawsStandardMasterPlanVO lawsStandardMasterPlan =
|
||||
lawsStandardMasterPlanDetailsVO.getLawsStandardMasterPlanVO();
|
||||
LawsDomesticStandard lawsDomesticStandard =
|
||||
lawsDomesticStandardService.getById(lawsStandardMasterPlan.getStandardId());
|
||||
|
||||
// 查询 标准主计划_子表信息
|
||||
List<LawsStandardMasterPlanSublist> lawsStandardMasterPlanSublistList =
|
||||
lawsStandardMasterPlanSublistService.list(new LambdaQueryWrapper<LawsStandardMasterPlanSublist>()
|
||||
.eq(LawsStandardMasterPlanSublist::getMasterPlanId, id));
|
||||
|
||||
for (LawsStandardMasterPlanSublist lawsStandardMasterPlanSublist : lawsStandardMasterPlanSublistList) {
|
||||
String type = lawsStandardMasterPlanSublist.getType();
|
||||
String associationId = lawsStandardMasterPlanSublist.getAssociationId();
|
||||
switch (type){
|
||||
case LawsStandardMasterPlanCommon.TEXT_STORAGE:
|
||||
if (!Objects.isNull(lawsDomesticStandard)){
|
||||
SysUser sysUser = sysUserService.getUserByName(lawsDomesticStandard.getCreateBy());
|
||||
lawsStandardMasterPlanSublist.setResponsiblePerson(sysUser.getId());
|
||||
lawsStandardMasterPlanSublist.setActualCompletionDate(lawsDomesticStandard.getCreateTime());
|
||||
}
|
||||
break;
|
||||
case LawsStandardMasterPlanCommon.INTERPRETATION_OF_REGULATIONS:
|
||||
if (!Objects.isNull(lawsDomesticStandard)){
|
||||
lawsStandardMasterPlanSublist.setResponsiblePerson(lawsDomesticStandard.getResponsibleUser());
|
||||
}
|
||||
if (StringUtils.isNotBlank(associationId)){
|
||||
ProcessAll processAll = processAllService.getById(associationId);
|
||||
if (!Objects.isNull(processAll)){
|
||||
lawsStandardMasterPlanSublist.setActualCompletionDate(processAll.getEndTime());
|
||||
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpret>()
|
||||
.eq(ProcessStandardInterpret::getProjectId, processAll.getProjectId()));
|
||||
if (!Objects.isNull(processStandardInterpret)){
|
||||
lawsStandardMasterPlanSublist.setDeliverableFileId(
|
||||
processStandardInterpret.getSplitInfoId());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LawsStandardMasterPlanCommon.MARKET_REGULATION_LIST_UPDATE:
|
||||
if (StringUtils.isNotBlank(associationId)){
|
||||
LawsMarketStandard lawsMarketStandard = lawsMarketStandardService.getById(associationId);
|
||||
if (!Objects.isNull(lawsMarketStandard)){
|
||||
lawsStandardMasterPlanSublist.setResponsiblePerson(lawsMarketStandard.getAuthor());
|
||||
lawsStandardMasterPlanSublist.setActualCompletionDate(lawsMarketStandard.getReleaseDate());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LawsStandardMasterPlanCommon.REGULATORY_COMPLIANCE_INVESTIGATION:
|
||||
if (StringUtils.isNotBlank(associationId)){
|
||||
LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary =
|
||||
lawsConformityAssessmentLibraryService.getById(associationId);
|
||||
if (!Objects.isNull(lawsConformityAssessmentLibrary)){
|
||||
lawsStandardMasterPlanSublist.setActualCompletionDate(
|
||||
lawsConformityAssessmentLibrary.getValuationTime());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LawsStandardMasterPlanCommon.VEHICLE_MODEL_RECTIFICATION:
|
||||
List<LawsEvaluationNotMetLibrary> list = lawsEvaluationNotMetLibraryService.list(
|
||||
new LambdaQueryWrapper<LawsEvaluationNotMetLibrary>()
|
||||
.eq(LawsEvaluationNotMetLibrary::getStandardId,
|
||||
lawsStandardMasterPlan.getStandardId())
|
||||
.eq(LawsEvaluationNotMetLibrary::getRectifyStatus, "2")
|
||||
.orderByDesc(LawsEvaluationNotMetLibrary::getUpdateTime));
|
||||
if (CollectionUtils.isNotEmpty(list)){
|
||||
String pcrNos = list.stream()
|
||||
.map(LawsEvaluationNotMetLibrary::getPcrNo).collect(Collectors.joining(","));
|
||||
lawsStandardMasterPlanSublist.setPcrCode(pcrNos);
|
||||
LawsEvaluationNotMetLibrary lawsEvaluationNotMetLibrary = list.get(0);
|
||||
SysUser sysUser = sysUserService.getUserByName(lawsEvaluationNotMetLibrary.getUpdateBy());
|
||||
lawsStandardMasterPlanSublist.setResponsiblePerson(sysUser.getId());
|
||||
lawsStandardMasterPlanSublist.setActualCompletionDate(
|
||||
lawsEvaluationNotMetLibrary.getUpdateTime());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
lawsStandardMasterPlanDetailsVO.setLawsStandardMasterPlanSublistList(lawsStandardMasterPlanSublistList);
|
||||
return lawsStandardMasterPlanDetailsVO;
|
||||
}
|
||||
@@ -255,6 +386,49 @@ public class LawsStandardMasterPlanServiceImpl
|
||||
return mv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncInterpretationOfRegulations(String id, String standardId) {
|
||||
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpret>()
|
||||
.eq(ProcessStandardInterpret::getStandardId, standardId)
|
||||
.orderByAsc(ProcessStandardInterpret::getCreateTime)
|
||||
.last("limit 1"));
|
||||
if (!Objects.isNull(processStandardInterpret) && processStandardInterpret.getId().equals(id)){
|
||||
// 标准第一次发布解读流程,则同步
|
||||
ProcessAll processAll = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
|
||||
.eq(ProcessAll::getProjectId, processStandardInterpret.getProjectId())
|
||||
.eq(ProcessAll::getPrcStatus, ProcessStatusEnum.COMPLETED.getValue()));
|
||||
List<LawsStandardMasterPlan> standardMasterPlanList = list(new LambdaUpdateWrapper<LawsStandardMasterPlan>()
|
||||
.eq(LawsStandardMasterPlan::getStandardId, standardId));
|
||||
if (!CollectionUtils.isEmpty(standardMasterPlanList)){
|
||||
List<String> idList = standardMasterPlanList.stream()
|
||||
.map(LawsStandardMasterPlan::getId).collect(Collectors.toList());
|
||||
lawsStandardMasterPlanSublistService.update(new LambdaUpdateWrapper<LawsStandardMasterPlanSublist>()
|
||||
.in(LawsStandardMasterPlanSublist::getMasterPlanId, idList)
|
||||
.eq(LawsStandardMasterPlanSublist::getType,
|
||||
LawsStandardMasterPlanCommon.INTERPRETATION_OF_REGULATIONS)
|
||||
.set(LawsStandardMasterPlanSublist::getAssociationId, processAll.getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncRegulatoryComplianceInvestigation(LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary) {
|
||||
LawsStandardMasterPlanVO lawsStandardMasterPlanVO = new LawsStandardMasterPlanVO();
|
||||
lawsStandardMasterPlanVO.setStandardNumber(lawsConformityAssessmentLibrary.getStandardNumber());
|
||||
lawsStandardMasterPlanVO.setApplicableMarket(lawsConformityAssessmentLibrary.getApplicableMarket());
|
||||
List<LawsStandardMasterPlanVO> lawsStandardMasterPlanVOList = queryByList(lawsStandardMasterPlanVO);
|
||||
if (CollectionUtils.isNotEmpty(lawsStandardMasterPlanVOList)){
|
||||
List<String> idList = lawsStandardMasterPlanVOList.stream()
|
||||
.map(LawsStandardMasterPlanVO::getId).collect(Collectors.toList());
|
||||
lawsStandardMasterPlanSublistService.update(new LambdaUpdateWrapper<LawsStandardMasterPlanSublist>()
|
||||
.in(LawsStandardMasterPlanSublist::getMasterPlanId, idList)
|
||||
.eq(LawsStandardMasterPlanSublist::getType,
|
||||
LawsStandardMasterPlanCommon.REGULATORY_COMPLIANCE_INVESTIGATION)
|
||||
.set(LawsStandardMasterPlanSublist::getAssociationId, lawsConformityAssessmentLibrary.getId()));
|
||||
}
|
||||
}
|
||||
|
||||
private void vehicleModelRectification(List<LawsStandardMasterPlanSublist> lawsStandardMasterPlanSublistList, Map<String, String> lm, SimpleDateFormat dateFormat) {
|
||||
Optional<LawsStandardMasterPlanSublist> vehicleModelRectification =
|
||||
lawsStandardMasterPlanSublistList.stream()
|
||||
|
||||
+5
@@ -46,4 +46,9 @@ public class LawsStandardMasterPlanVO implements Serializable {
|
||||
@Dict(dicCode = "market_state")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String applicableMarket;
|
||||
|
||||
/** 版本标识,用于绑定多个版本(市场法规清单)*/
|
||||
@ApiModelProperty(value = "版本标识,用于绑定多个版本(市场法规清单)")
|
||||
@TableField(exist = false)
|
||||
private String versionFlag;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user