|
@@ -14,13 +14,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.rongwei.bscommon.sys.feign.SysNotifyFeginService;
|
|
|
import com.rongwei.bscommon.sys.service.*;
|
|
|
import com.rongwei.bscommon.sys.utils.ZhcxCommon;
|
|
|
-import com.rongwei.bsentity.domain.ZhcxOutsideInspectionComponentTrackDo;
|
|
|
-import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpDo;
|
|
|
+import com.rongwei.bsentity.domain.*;
|
|
|
import com.rongwei.bscommon.sys.dao.ZhcxOutsideInspectionItpDao;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpOperLogDo;
|
|
|
-import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpSupervisionDispatchDo;
|
|
|
import com.rongwei.bsentity.dto.NotifyDto;
|
|
|
+import com.rongwei.bsentity.dto.ZhcxItpProjectNodeStateResultDto;
|
|
|
import com.rongwei.bsentity.vo.*;
|
|
|
import com.rongwei.commonservice.serial.service.SysSerialNumberService;
|
|
|
import com.rongwei.rwadmincommon.system.domain.PagePartDo;
|
|
@@ -103,6 +101,9 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
@Autowired
|
|
|
private ZhcxOutsideInspectionItpOperLogService zhcxOutsideInspectionItpOperLogService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ZhcxItpProjectNodeStateService zhcxItpProjectNodeStateService;
|
|
|
+
|
|
|
/**
|
|
|
* 拆单
|
|
|
*
|
|
@@ -170,6 +171,8 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
// }
|
|
|
|
|
|
List<ZhcxOutsideInspectionItpOperLogDo> logList = new ArrayList<>();
|
|
|
+ List<ZhcxItpProjectNodeStateDo> insertNodeStateList = new ArrayList<>();
|
|
|
+ List<ZhcxItpProjectNodeStateDo> updateNodeStateList = new ArrayList<>();
|
|
|
Date nowDate = new Date();
|
|
|
|
|
|
for(int i =0;i<vo.size();i++){
|
|
@@ -260,7 +263,9 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
dispatchDo.setDispatchstatus("30");
|
|
|
inspectionItpDo.setInspectionstatus("40");
|
|
|
|
|
|
- } else if ("20".equals(operType)) {
|
|
|
+ }
|
|
|
+ //拒收
|
|
|
+ else if ("20".equals(operType)) {
|
|
|
if("task".equals(vo.get(i).getPageType()) && !user.getId().equals(dispatchDo.getSupervisionuserid())){
|
|
|
sb.append("单据号:"+inspectioncode+"已被改派,不能拒收,请刷新数据查看<br>");
|
|
|
continue;
|
|
@@ -275,7 +280,9 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
if(ObjectUtil.isNull(inspectionItpDo.getInspectioncomplatetime())) {
|
|
|
inspectionItpDo.setInspectioncomplatetime(new Date());
|
|
|
}
|
|
|
- } else if (Arrays.asList("30", "40").contains(operType)) {
|
|
|
+ }
|
|
|
+ //30:派单 40:转派
|
|
|
+ else if (Arrays.asList("30", "40").contains(operType)) {
|
|
|
//监理检验员只能操作自己的数据
|
|
|
// if(!user.getId().equals(dispatchDo.getSupervisionuserid())){
|
|
|
// sb.append("单据号:"+inspectioncode+"已被改派,不能取消,请刷新数据查看<br>");
|
|
@@ -321,6 +328,7 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
inspectionItpDo.setInspectioncomplatetime(new Date());
|
|
|
}
|
|
|
}
|
|
|
+ //报验完成时修改
|
|
|
/* 检验员拒收和接收时会传回检验开始/结束时间和文件 */
|
|
|
if (Arrays.asList("20", "50", "60").contains(operType)) {
|
|
|
dispatchDo.setCheckstarttime(vo.get(i).getStartDate());
|
|
@@ -328,6 +336,20 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
dispatchDo.setSfiles(vo.get(i).getFiles());
|
|
|
dispatchDo.setCanvas(vo.get(i).getCanvas());
|
|
|
dispatchDo.setSignature(vo.get(i).getSignature());
|
|
|
+
|
|
|
+ //添加项目各机号报验点状态
|
|
|
+ List<ZhcxItpProjectNodeStateResultDto> nodeStateResultList = zhcxItpProjectNodeStateService.getByItp(inspectionItpDo, operType);
|
|
|
+
|
|
|
+ if(ObjectUtil.isNotEmpty(nodeStateResultList)) {
|
|
|
+ for(ZhcxItpProjectNodeStateResultDto resultDto : nodeStateResultList) {
|
|
|
+ if("insert".equals(resultDto.getSaveType())) {
|
|
|
+ insertNodeStateList.add(resultDto.getEntity());
|
|
|
+ } else if("update".equals(resultDto.getSaveType())) {
|
|
|
+ updateNodeStateList.add(resultDto.getEntity());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
/* 当前操作人 */
|
|
|
if (user != null && user.getId() != null) {
|
|
@@ -385,6 +407,14 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //添加项目各机号报验点状态
|
|
|
+ if(ObjectUtil.isNotEmpty(insertNodeStateList)) {
|
|
|
+ zhcxItpProjectNodeStateService.saveBatch(insertNodeStateList);
|
|
|
+ }
|
|
|
+ if(ObjectUtil.isNotEmpty(updateNodeStateList)) {
|
|
|
+ zhcxItpProjectNodeStateService.updateBatchById(updateNodeStateList);
|
|
|
+ }
|
|
|
+
|
|
|
//操作记录
|
|
|
zhcxOutsideInspectionItpOperLogService.saveBatch(logList);
|
|
|
|