|
@@ -14,6 +14,7 @@ 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 com.rongwei.rwcommon.vo.generalsql.SlaveDMLVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -33,6 +34,9 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
@Autowired
|
|
|
private SysGeneralCRUDService generalCRUDService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ZhcxInsideInspectionDetailImprovementItemDao dao;
|
|
|
+
|
|
|
/**
|
|
|
* 检验员更改记录
|
|
|
*
|
|
@@ -81,6 +85,56 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据内部报验id复制
|
|
|
+ *
|
|
|
+ * @param insideId
|
|
|
+ * @param newIinsideIdList
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void copyByInsideId(String insideId, List<String> newIinsideIdList) {
|
|
|
+ if(ObjectUtil.isEmpty(newIinsideIdList)) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
+ for(String newItpId : newIinsideIdList) {
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
+ map.put("itpId", insideId);
|
|
|
+ map.put("newItpId", newItpId);
|
|
|
+ dao.insertBySelect(map);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 重新报验
|
|
|
+ * 清空用户填写数据
|
|
|
+ *
|
|
|
+ * @param insideId
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void reInspection(String insideId) {
|
|
|
+ ZhcxInsideInspectionDetailImprovementItemDo entity = new ZhcxInsideInspectionDetailImprovementItemDo();
|
|
|
+ entity.setInsideid(insideId);
|
|
|
+ dao.reInspection(entity);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 自检员更改记录
|
|
|
+ *
|
|
|
+ * @param insideId
|
|
|
+ * @param update
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<String> editSelfColsHistory(String insideId, SlaveDMLVo update) {
|
|
|
+ final LambdaQueryWrapper<ZhcxInsideInspectionDetailImprovementItemDo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
+ queryWrapper.eq(ZhcxInsideInspectionDetailImprovementItemDo::getInsideid, insideId)
|
|
|
+ .eq(ZhcxInsideInspectionDetailImprovementItemDo::getDeleted, "0");
|
|
|
+ final List<ZhcxInsideInspectionDetailImprovementItemDo> list = list(queryWrapper);
|
|
|
+
|
|
|
+ return editSelfCosHistory(list, update.getSlaveUpdate());
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 检验员修改记录
|
|
|
*
|
|
@@ -279,7 +333,7 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
* @param slaveUpdate
|
|
|
* @return
|
|
|
*/
|
|
|
- private List<String> editSelfCosHistory(List<ZhcxInsideInspectionCoreIndicatorsDo> coreList, List<GeneralUpdateVo> slaveUpdate) {
|
|
|
+ private List<String> editSelfCosHistory(List<ZhcxInsideInspectionDetailImprovementItemDo> coreList, List<GeneralUpdateVo> slaveUpdate) {
|
|
|
if(ObjectUtil.isEmpty(coreList) && ObjectUtil.isEmpty(slaveUpdate)) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
@@ -300,12 +354,12 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- Map<String, ZhcxInsideInspectionCoreIndicatorsDo> coreMap = new HashMap<>(coreList.size());
|
|
|
+ Map<String, ZhcxInsideInspectionDetailImprovementItemDo> 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);
|
|
|
+ ZhcxInsideInspectionDetailImprovementItemDo indicators = coreMap.get(id);
|
|
|
|
|
|
if(ObjectUtil.isNull(indicators)) {
|
|
|
difSelfCoreIndicatorCoreNull4Update(update.getUpdatecolumns(), result);
|
|
@@ -325,7 +379,7 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
* @param updatecolumns
|
|
|
* @param result
|
|
|
*/
|
|
|
- private void diffSelfActualRecord(ZhcxInsideInspectionCoreIndicatorsDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
+ private void diffSelfActualRecord(ZhcxInsideInspectionDetailImprovementItemDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
if(ObjectUtil.isEmpty(core.getSelfactualrecord()) && ObjectUtil.isEmpty(updatecolumns.get("SELFACTUALRECORD"))) {
|
|
|
return ;
|
|
|
}
|
|
@@ -367,7 +421,7 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
* @param updatecolumns
|
|
|
* @param result
|
|
|
*/
|
|
|
- private void diffSelfResult(ZhcxInsideInspectionCoreIndicatorsDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
+ private void diffSelfResult(ZhcxInsideInspectionDetailImprovementItemDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
if(ObjectUtil.isEmpty(core.getSelfresult()) && ObjectUtil.isEmpty(updatecolumns.get("SELFRESULT"))) {
|
|
|
return ;
|
|
|
}
|
|
@@ -409,7 +463,7 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
* @param updatecolumns
|
|
|
* @param result
|
|
|
*/
|
|
|
- private void diffSelfRemark(ZhcxInsideInspectionCoreIndicatorsDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
+ private void diffSelfRemark(ZhcxInsideInspectionDetailImprovementItemDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
if(ObjectUtil.isEmpty(core.getSelfremark()) && ObjectUtil.isEmpty(updatecolumns.get("SELFREMARK"))) {
|
|
|
return ;
|
|
|
}
|
|
@@ -451,7 +505,7 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
* @param updatecolumns
|
|
|
* @param result
|
|
|
*/
|
|
|
- private void difSelfCoreIndicator(ZhcxInsideInspectionCoreIndicatorsDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
+ private void difSelfCoreIndicator(ZhcxInsideInspectionDetailImprovementItemDo core, Map<String,Object> updatecolumns, List<String> result) {
|
|
|
|
|
|
List<String> updateCols = new ArrayList<>();
|
|
|
StringBuilder editRow = new StringBuilder("检查项:");
|
|
@@ -488,7 +542,7 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
return ;
|
|
|
}
|
|
|
|
|
|
- ZhcxInsideInspectionCoreIndicatorsDo empty = new ZhcxInsideInspectionCoreIndicatorsDo();
|
|
|
+ ZhcxInsideInspectionDetailImprovementItemDo empty = new ZhcxInsideInspectionDetailImprovementItemDo();
|
|
|
|
|
|
//修改记录
|
|
|
difSelfCoreIndicator(empty, updateRow, result);
|
|
@@ -500,7 +554,7 @@ public class ZhcxInsideInspectionDetailImprovementItemServiceImpl extends Servic
|
|
|
* @param core
|
|
|
* @param result
|
|
|
*/
|
|
|
- private void difSelfCoreIndicatorUpdateNull4Entity(ZhcxInsideInspectionCoreIndicatorsDo core, List<String> result) {
|
|
|
+ private void difSelfCoreIndicatorUpdateNull4Entity(ZhcxInsideInspectionDetailImprovementItemDo core, List<String> result) {
|
|
|
|
|
|
if(ObjectUtil.isNull(core)) {
|
|
|
return ;
|