|
@@ -1,11 +1,25 @@
|
|
|
package com.rongwei.bscommon.sys.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.rongwei.bsentity.domain.ZhcxInsideInspectionBiddingDocPointDo;
|
|
|
import com.rongwei.bscommon.sys.dao.ZhcxInsideInspectionBiddingDocPointDao;
|
|
|
import com.rongwei.bscommon.sys.service.ZhcxInsideInspectionBiddingDocPointService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.rongwei.bsentity.domain.ZhcxInsideInspectionCoreIndicatorsDo;
|
|
|
+import com.rongwei.bsentity.domain.ZhcxInsideInspectionDetailImprovementItemDo;
|
|
|
+import com.rongwei.bsentity.dto.inside.InsideInspectionExecuteRequest;
|
|
|
+import com.rongwei.rwadmincommon.system.service.SysGeneralCRUDService;
|
|
|
+import com.rongwei.rwcommon.base.exception.CustomException;
|
|
|
+import com.rongwei.rwcommon.utils.StringUtils;
|
|
|
+import com.rongwei.rwcommon.vo.generalsql.GeneralUpdateVo;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.*;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 内部报验-报验管理-标书要点 服务实现类
|
|
@@ -17,4 +31,485 @@ import org.springframework.stereotype.Service;
|
|
|
@Service
|
|
|
public class ZhcxInsideInspectionBiddingDocPointServiceImpl extends ServiceImpl<ZhcxInsideInspectionBiddingDocPointDao, ZhcxInsideInspectionBiddingDocPointDo> implements ZhcxInsideInspectionBiddingDocPointService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysGeneralCRUDService generalCRUDService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 检验员更改记录
|
|
|
+ *
|
|
|
+ * @param insideId
|
|
|
+ * @param coreList
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<String> editCheckerColsHistory(String insideId, List<GeneralUpdateVo> coreList) {
|
|
|
+ final LambdaQueryWrapper<ZhcxInsideInspectionBiddingDocPointDo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
+ queryWrapper.eq(ZhcxInsideInspectionBiddingDocPointDo::getInsideid, insideId)
|
|
|
+ .eq(ZhcxInsideInspectionBiddingDocPointDo::getDeleted, "0");
|
|
|
+ final List<ZhcxInsideInspectionBiddingDocPointDo> list = list(queryWrapper);
|
|
|
+
|
|
|
+ return editHistory(list, coreList);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保持并记录日志
|
|
|
+ *
|
|
|
+ * @param insideId
|
|
|
+ * @param req
|
|
|
+ * @param descMap
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void saveAndLog(String insideId, InsideInspectionExecuteRequest req, Map<String, String> descMap) {
|
|
|
+ if(ObjectUtil.isNull(req.getCoreMap()) || ObjectUtil.isEmpty(req.getCoreMap().get(insideId))) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ final List<GeneralUpdateVo> generalUpdateVoList = req.getCoreMap().get(insideId);
|
|
|
+ if(ObjectUtil.isNotEmpty(generalUpdateVoList)) {
|
|
|
+ List<String> editList = editCheckerColsHistory(insideId, generalUpdateVoList);
|
|
|
+ if(ObjectUtil.isNotEmpty(editList)) {
|
|
|
+ descMap.put(insideId, StringUtils.join(editList, ","));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ for (GeneralUpdateVo generalUpdateVo : generalUpdateVoList) {
|
|
|
+ generalCRUDService.generalUpdate(generalUpdateVo);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("保存失败: {}", e);
|
|
|
+ throw new CustomException("保存失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 检验员修改记录
|
|
|
+ *
|
|
|
+ * @param coreList
|
|
|
+ * @param slaveUpdate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private List<String> editHistory(List<ZhcxInsideInspectionBiddingDocPointDo> coreList, List<GeneralUpdateVo> slaveUpdate) {
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(slaveUpdate)) {
|
|
|
+ return Collections.emptyList();
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, ZhcxInsideInspectionBiddingDocPointDo> coreMap = new HashMap<>(coreList.size());
|
|
|
+ coreList.stream().forEach(item -> coreMap.put(item.getId(), item));
|
|
|
+
|
|
|
+ List<String> result = new ArrayList<>();
|
|
|
+
|
|
|
+ for(GeneralUpdateVo update : slaveUpdate) {
|
|
|
+ String id = update.getUpdatecolumns().get("ID").toString();
|
|
|
+ ZhcxInsideInspectionBiddingDocPointDo indicators = coreMap.get(id);
|
|
|
+
|
|
|
+ if(ObjectUtil.isNull(indicators)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ diffRow(indicators, update.getUpdatecolumns(), result);
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单个核心检验指标不同
|
|
|
+ *
|
|
|
+ * @param core
|
|
|
+ * @param updatecolumns
|
|
|
+ * @param result
|
|
|
+ */
|
|
|
+ private void diffRow(ZhcxInsideInspectionBiddingDocPointDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
+
|
|
|
+ List<String> updateCols = new ArrayList<>();
|
|
|
+ StringBuilder editRow = new StringBuilder("检查项:");
|
|
|
+ if(ObjectUtil.isNull(updatecolumns.get("INSPECTON_ITEMS"))) {
|
|
|
+ editRow.append(StringUtils.toString(core.getInspectonItems(), ""));
|
|
|
+ } else {
|
|
|
+ editRow.append(StringUtils.toString(updatecolumns.get("INSPECTON_ITEMS"), ""));
|
|
|
+ }
|
|
|
+
|
|
|
+ //实测记录
|
|
|
+ diffCheckerActualRecord(core, updatecolumns, updateCols);
|
|
|
+ //判定结果
|
|
|
+ diffCheckerResult(core, updatecolumns, updateCols);
|
|
|
+ //备注
|
|
|
+ diffCheckerRemark(core, updatecolumns, updateCols);
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(updateCols)) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ editRow.append(StringUtils.join(updateCols, ","));
|
|
|
+ result.add(editRow.toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 不同检验员备注
|
|
|
+ *
|
|
|
+ * @param core
|
|
|
+ * @param updatecolumns
|
|
|
+ * @param updateCols
|
|
|
+ */
|
|
|
+ private void diffCheckerRemark(ZhcxInsideInspectionBiddingDocPointDo core, Map<String, Object> updatecolumns, List<String> updateCols) {
|
|
|
+ if(ObjectUtil.isEmpty(core.getCheckremark()) && ObjectUtil.isEmpty(updatecolumns.get("CHECKREMARK"))) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(core.getCheckremark()) && ObjectUtil.isNotEmpty(updatecolumns.get("CHECKREMARK"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "检验员备注:"
|
|
|
+ , "空变更为:"
|
|
|
+ , updatecolumns.get("CHECKREMARK").toString()
|
|
|
+ );
|
|
|
+ updateCols.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isNotEmpty(core.getCheckremark()) && ObjectUtil.isEmpty(updatecolumns.get("CHECKREMARK"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "检验员备注:"
|
|
|
+ , core.getCheckremark()
|
|
|
+ , "变更为空"
|
|
|
+ );
|
|
|
+ updateCols.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(core.getCheckremark().equals(updatecolumns.get("CHECKREMARK").toString())) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "检验员备注:"
|
|
|
+ , core.getCheckremark()
|
|
|
+ , "变更为"
|
|
|
+ , updatecolumns.get("CHECKREMARK").toString()
|
|
|
+ );
|
|
|
+ updateCols.add(reservationinspectiontime);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 不同检验员结果判定
|
|
|
+ *
|
|
|
+ * @param core
|
|
|
+ * @param updatecolumns
|
|
|
+ * @param updateCols
|
|
|
+ */
|
|
|
+ private void diffCheckerResult(ZhcxInsideInspectionBiddingDocPointDo core, Map<String, Object> updatecolumns, List<String> updateCols) {
|
|
|
+ if(ObjectUtil.isEmpty(core.getCheckresult()) && ObjectUtil.isEmpty(updatecolumns.get("CHECKRESULT"))) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(core.getCheckresult()) && ObjectUtil.isNotEmpty(updatecolumns.get("CHECKRESULT"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "检验员结果判定:"
|
|
|
+ , "空变更为:"
|
|
|
+ , updatecolumns.get("CHECKRESULT").toString()
|
|
|
+ );
|
|
|
+ updateCols.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isNotEmpty(core.getCheckresult()) && ObjectUtil.isEmpty(updatecolumns.get("CHECKRESULT"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "检验员结果判定:"
|
|
|
+ , core.getCheckresult()
|
|
|
+ , "变更为空"
|
|
|
+ );
|
|
|
+ updateCols.add(reservationinspectiontime);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(core.getCheckresult().equals(updatecolumns.get("CHECKRESULT").toString())) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "检验员结果判定:"
|
|
|
+ , core.getCheckresult()
|
|
|
+ , "变更为"
|
|
|
+ , updatecolumns.get("CHECKRESULT").toString()
|
|
|
+ );
|
|
|
+ updateCols.add(reservationinspectiontime);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 不同检验员实测记录
|
|
|
+ *
|
|
|
+ * @param core
|
|
|
+ * @param updatecolumns
|
|
|
+ * @param updateCols
|
|
|
+ */
|
|
|
+ private void diffCheckerActualRecord(ZhcxInsideInspectionBiddingDocPointDo core, Map<String, Object> updatecolumns, List<String> updateCols) {
|
|
|
+ if(ObjectUtil.isEmpty(core.getCheckactualrecord()) && ObjectUtil.isEmpty(updatecolumns.get("CHECKACTUALRECORD"))) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(core.getCheckactualrecord()) && ObjectUtil.isNotEmpty(updatecolumns.get("CHECKACTUALRECORD"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "检验员实测记录:"
|
|
|
+ , "空变更为:"
|
|
|
+ , updatecolumns.get("CHECKACTUALRECORD").toString()
|
|
|
+ );
|
|
|
+ updateCols.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isNotEmpty(core.getCheckactualrecord()) && ObjectUtil.isEmpty(updatecolumns.get("CHECKACTUALRECORD"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "检验员实测记录:"
|
|
|
+ , core.getCheckactualrecord()
|
|
|
+ , "变更为空"
|
|
|
+ );
|
|
|
+ updateCols.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(core.getCheckactualrecord().equals(updatecolumns.get("CHECKACTUALRECORD").toString())) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "检验员实测记录:"
|
|
|
+ , core.getCheckactualrecord()
|
|
|
+ , "变更为"
|
|
|
+ , updatecolumns.get("CHECKACTUALRECORD").toString()
|
|
|
+ );
|
|
|
+ updateCols.add(reservationinspectiontime);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 找出修改记录
|
|
|
+ *
|
|
|
+ * @param coreList
|
|
|
+ * @param slaveUpdate
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private List<String> editSelfCosHistory(List<ZhcxInsideInspectionCoreIndicatorsDo> coreList, List<GeneralUpdateVo> slaveUpdate) {
|
|
|
+ if(ObjectUtil.isEmpty(coreList) && ObjectUtil.isEmpty(slaveUpdate)) {
|
|
|
+ return Collections.emptyList();
|
|
|
+ }
|
|
|
+
|
|
|
+ List<String> result = new ArrayList<>();
|
|
|
+ if(ObjectUtil.isEmpty(coreList) && ObjectUtil.isNotEmpty(slaveUpdate)) {
|
|
|
+// for(GeneralUpdateVo update : slaveUpdate) {
|
|
|
+// difSelfCoreIndicatorCoreNull4Update(update.getUpdatecolumns(), result);
|
|
|
+// }
|
|
|
+ result.add("添加核心检验指标");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ if(ObjectUtil.isEmpty(slaveUpdate) && ObjectUtil.isNotEmpty(coreList)) {
|
|
|
+// for(ZhcxInsideInspectionCoreIndicatorsDo core : coreList) {
|
|
|
+// difSelfCoreIndicatorUpdateNull4Entity(core, result);
|
|
|
+// }
|
|
|
+// result.add("移除核心检验指标");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, ZhcxInsideInspectionCoreIndicatorsDo> coreMap = new HashMap<>(coreList.size());
|
|
|
+ coreList.stream().forEach(item -> coreMap.put(item.getId(), item));
|
|
|
+
|
|
|
+ for(GeneralUpdateVo update : slaveUpdate) {
|
|
|
+ String id = update.getUpdatecolumns().get("ID").toString();
|
|
|
+ ZhcxInsideInspectionCoreIndicatorsDo indicators = coreMap.get(id);
|
|
|
+
|
|
|
+ if(ObjectUtil.isNull(indicators)) {
|
|
|
+ difSelfCoreIndicatorCoreNull4Update(update.getUpdatecolumns(), result);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ difSelfCoreIndicator(indicators, update.getUpdatecolumns(), result);
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 自检员实测记录不同
|
|
|
+ *
|
|
|
+ * @param core
|
|
|
+ * @param updatecolumns
|
|
|
+ * @param result
|
|
|
+ */
|
|
|
+ private void diffSelfActualRecord(ZhcxInsideInspectionCoreIndicatorsDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
+ if(ObjectUtil.isEmpty(core.getSelfactualrecord()) && ObjectUtil.isEmpty(updatecolumns.get("SELFACTUALRECORD"))) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(core.getSelfactualrecord()) && ObjectUtil.isNotEmpty(updatecolumns.get("SELFACTUALRECORD"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "自检员实测记录:"
|
|
|
+ , "空变更为:"
|
|
|
+ , updatecolumns.get("SELFACTUALRECORD").toString()
|
|
|
+ );
|
|
|
+ result.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isNotEmpty(core.getSelfactualrecord()) && ObjectUtil.isEmpty(updatecolumns.get("SELFACTUALRECORD"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "自检员实测记录:"
|
|
|
+ , core.getSelfactualrecord()
|
|
|
+ , "变更为空"
|
|
|
+ );
|
|
|
+ result.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(core.getSelfactualrecord().equals(updatecolumns.get("SELFACTUALRECORD").toString())) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "自检员实测记录:"
|
|
|
+ , core.getSelfactualrecord()
|
|
|
+ , "变更为"
|
|
|
+ , updatecolumns.get("SELFACTUALRECORD").toString()
|
|
|
+ );
|
|
|
+ result.add(reservationinspectiontime);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 自检员判定结果不同
|
|
|
+ *
|
|
|
+ * @param core
|
|
|
+ * @param updatecolumns
|
|
|
+ * @param result
|
|
|
+ */
|
|
|
+ private void diffSelfResult(ZhcxInsideInspectionCoreIndicatorsDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
+ if(ObjectUtil.isEmpty(core.getSelfresult()) && ObjectUtil.isEmpty(updatecolumns.get("SELFRESULT"))) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(core.getSelfresult()) && ObjectUtil.isNotEmpty(updatecolumns.get("SELFRESULT"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "自检员结果判定:"
|
|
|
+ , "空变更为:"
|
|
|
+ , updatecolumns.get("SELFRESULT").toString()
|
|
|
+ );
|
|
|
+ result.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isNotEmpty(core.getSelfresult()) && ObjectUtil.isEmpty(updatecolumns.get("SELFRESULT"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "自检员结果判定:"
|
|
|
+ , core.getSelfresult()
|
|
|
+ , "变更为空"
|
|
|
+ );
|
|
|
+ result.add(reservationinspectiontime);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(core.getSelfresult().equals(updatecolumns.get("SELFRESULT").toString())) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "自检员结果判定:"
|
|
|
+ , core.getSelfresult()
|
|
|
+ , "变更为"
|
|
|
+ , updatecolumns.get("SELFRESULT").toString()
|
|
|
+ );
|
|
|
+ result.add(reservationinspectiontime);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 自检员备注不同
|
|
|
+ *
|
|
|
+ * @param core
|
|
|
+ * @param updatecolumns
|
|
|
+ * @param result
|
|
|
+ */
|
|
|
+ private void diffSelfRemark(ZhcxInsideInspectionCoreIndicatorsDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
+ if(ObjectUtil.isEmpty(core.getSelfremark()) && ObjectUtil.isEmpty(updatecolumns.get("SELFREMARK"))) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(core.getSelfremark()) && ObjectUtil.isNotEmpty(updatecolumns.get("SELFREMARK"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "自检员备注:"
|
|
|
+ , "空变更为:"
|
|
|
+ , updatecolumns.get("SELFREMARK").toString()
|
|
|
+ );
|
|
|
+ result.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(ObjectUtil.isNotEmpty(core.getSelfremark()) && ObjectUtil.isEmpty(updatecolumns.get("SELFREMARK"))) {
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "自检员备注:"
|
|
|
+ , core.getSelfremark()
|
|
|
+ , "变更为空"
|
|
|
+ );
|
|
|
+ result.add(reservationinspectiontime);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(core.getSelfremark().equals(updatecolumns.get("SELFREMARK").toString())) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ String reservationinspectiontime = StrUtil.concat(true, "自检员备注:"
|
|
|
+ , core.getSelfremark()
|
|
|
+ , "变更为"
|
|
|
+ , updatecolumns.get("SELFREMARK").toString()
|
|
|
+ );
|
|
|
+ result.add(reservationinspectiontime);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单个核心检验指标不同
|
|
|
+ *
|
|
|
+ * @param core
|
|
|
+ * @param updatecolumns
|
|
|
+ * @param result
|
|
|
+ */
|
|
|
+ private void difSelfCoreIndicator(ZhcxInsideInspectionCoreIndicatorsDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
+
|
|
|
+ List<String> updateCols = new ArrayList<>();
|
|
|
+ StringBuilder editRow = new StringBuilder("检查项:");
|
|
|
+ if(ObjectUtil.isNull(updatecolumns.get("INSPECTON_ITEMS"))) {
|
|
|
+ editRow.append(StringUtils.toString(core.getInspectonItems(), ""));
|
|
|
+ } else {
|
|
|
+ editRow.append(StringUtils.toString(updatecolumns.get("INSPECTON_ITEMS"), ""));
|
|
|
+ }
|
|
|
+
|
|
|
+ //自检员实测记录
|
|
|
+ diffSelfActualRecord(core, updatecolumns, updateCols);
|
|
|
+ //判定结果
|
|
|
+ diffSelfResult(core, updatecolumns, updateCols);
|
|
|
+ //判定结果
|
|
|
+ diffSelfRemark(core, updatecolumns, updateCols);
|
|
|
+
|
|
|
+ if(ObjectUtil.isEmpty(updateCols)) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ editRow.append(StringUtils.join(updateCols, ","));
|
|
|
+ result.add(editRow.toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单个核心检验指标不同
|
|
|
+ *
|
|
|
+ * @param updateRow
|
|
|
+ * @param result
|
|
|
+ */
|
|
|
+ private void difSelfCoreIndicatorCoreNull4Update(Map<String,Object> updateRow, List<String> result) {
|
|
|
+
|
|
|
+ if(ObjectUtil.isNull(updateRow)) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ ZhcxInsideInspectionCoreIndicatorsDo empty = new ZhcxInsideInspectionCoreIndicatorsDo();
|
|
|
+
|
|
|
+ //修改记录
|
|
|
+ difSelfCoreIndicator(empty, updateRow, result);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单个核心检验指标不同
|
|
|
+ *
|
|
|
+ * @param core
|
|
|
+ * @param result
|
|
|
+ */
|
|
|
+ private void difSelfCoreIndicatorUpdateNull4Entity(ZhcxInsideInspectionCoreIndicatorsDo core, List<String> result) {
|
|
|
+
|
|
|
+ if(ObjectUtil.isNull(core)) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> emptyMap = Collections.emptyMap();
|
|
|
+
|
|
|
+ //修改记录
|
|
|
+ difSelfCoreIndicator(core, emptyMap, result);
|
|
|
+ }
|
|
|
}
|