|
@@ -18,6 +18,7 @@ import com.rongwei.bsentity.domain.ZhcxOutsideInspectionComponentTrackDo;
|
|
|
import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpDo;
|
|
|
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.vo.*;
|
|
@@ -99,6 +100,9 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
@Value("${temp.filepath:#{null}}")
|
|
|
private String filepath;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ZhcxOutsideInspectionItpOperLogService zhcxOutsideInspectionItpOperLogService;
|
|
|
+
|
|
|
/**
|
|
|
* 拆单
|
|
|
*
|
|
@@ -164,6 +168,10 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
// hasJjyRole = true;
|
|
|
// }
|
|
|
// }
|
|
|
+
|
|
|
+ List<ZhcxOutsideInspectionItpOperLogDo> logList = new ArrayList<>();
|
|
|
+ Date nowDate = new Date();
|
|
|
+
|
|
|
for(int i =0;i<vo.size();i++){
|
|
|
String operType = vo.get(i).getOperType();
|
|
|
String itpId = vo.get(i).getItpId();
|
|
@@ -185,6 +193,10 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
// dispatchDo.setId(SecurityUtil.getUUID());
|
|
|
// }
|
|
|
|
|
|
+ ZhcxOutsideInspectionItpOperLogDo itpLog = zhcxOutsideInspectionItpOperLogService
|
|
|
+ .getNew(itpId, "5", nowDate);
|
|
|
+ itpLog.setOpertype(operType);
|
|
|
+
|
|
|
//10未派单 20已派单
|
|
|
if (dispatchDo != null && "20".equals(dispatchDo.getDispatchstatus())) {
|
|
|
log.info("有Dispatch,有dispatchId="+dispatchId);
|
|
@@ -337,6 +349,8 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
}
|
|
|
inspectionItpDos.add(inspectionItpDo);
|
|
|
}
|
|
|
+
|
|
|
+ logList.add(itpLog);
|
|
|
}
|
|
|
if(sb.length()> 0){
|
|
|
return R.error(sb.toString());
|
|
@@ -370,6 +384,9 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //操作记录
|
|
|
+ zhcxOutsideInspectionItpOperLogService.saveBatch(logList);
|
|
|
+
|
|
|
return R.ok();
|
|
|
}
|
|
|
|
|
@@ -437,6 +454,10 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
List<String> newItpIdList = new ArrayList<>();
|
|
|
List<ZhcxOutsideInspectionComponentTrackDo> trackDos = new ArrayList<>();
|
|
|
|
|
|
+ //操作记录
|
|
|
+ List<ZhcxOutsideInspectionItpOperLogDo> logList = new ArrayList<>();
|
|
|
+ Date nowDate = new Date();
|
|
|
+
|
|
|
int count = -1;
|
|
|
for(int m = 0, n = structureNames.length; m < n; m++) {
|
|
|
for(String inspectionContent : inspectionContents) {
|
|
@@ -457,6 +478,10 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
if(ObjectUtil.isNotNull(trackDo)) {
|
|
|
trackDos.add(trackDo);
|
|
|
}
|
|
|
+
|
|
|
+ ZhcxOutsideInspectionItpOperLogDo itpLog = zhcxOutsideInspectionItpOperLogService
|
|
|
+ .getNew(itpDo.getId(), "5", nowDate);
|
|
|
+ logList.add(itpLog);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -470,6 +495,10 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
insertList.add(entity);
|
|
|
newItpIdList.add(entity.getId());
|
|
|
|
|
|
+ ZhcxOutsideInspectionItpOperLogDo itpLog = zhcxOutsideInspectionItpOperLogService
|
|
|
+ .getNew(entity.getId(), "5", nowDate);
|
|
|
+ logList.add(itpLog);
|
|
|
+
|
|
|
//空派单
|
|
|
ZhcxOutsideInspectionItpSupervisionDispatchDo dispatchDo = new ZhcxOutsideInspectionItpSupervisionDispatchDo();
|
|
|
dispatchDo.setId(SecurityUtil.getUUID());
|
|
@@ -499,6 +528,9 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
if(ObjectUtil.isNotEmpty(trackDos)) {
|
|
|
inspectionComponentTrackService.saveBatch(trackDos);
|
|
|
}
|
|
|
+
|
|
|
+ //日志
|
|
|
+ zhcxOutsideInspectionItpOperLogService.saveBatch(logList);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -521,6 +553,11 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
|
updateEntity.setId(itpDo.getId());
|
|
|
updateEntity.setInspectioncode(genCode());
|
|
|
updateById(updateEntity);
|
|
|
+
|
|
|
+ //操作记录
|
|
|
+ ZhcxOutsideInspectionItpOperLogDo itpLog = zhcxOutsideInspectionItpOperLogService
|
|
|
+ .getNew(itpDo.getId(), "5", new Date());
|
|
|
+ zhcxOutsideInspectionItpOperLogService.save(itpLog);
|
|
|
}
|
|
|
|
|
|
/**
|