|
@@ -80,20 +80,9 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
public void launch(InsideInspectionOperRequest req) {
|
|
|
ZhcxInsideInspectionDo inspectionDo = getById(req.getId());
|
|
|
//生成报验单号
|
|
|
- updateInspection(inspectionDo);
|
|
|
+ updateInspection(inspectionDo, req);
|
|
|
//生成空派单信息
|
|
|
dispatchService.genDispatch(inspectionDo);
|
|
|
-
|
|
|
- //生成操作记录
|
|
|
- SysUserVo user = zhcxCommon.getCurrentUser();
|
|
|
- InsideOperLogDto operLogDto = InsideOperLogDto.builder()
|
|
|
- .id(req.getId())
|
|
|
- .operType("5")
|
|
|
- .launchSource(ObjectUtil.isEmpty(req.getLaunchSource()) ? "mobile" : req.getLaunchSource())
|
|
|
- .build();
|
|
|
- operLogDto.setOperUser(user);
|
|
|
- operLogDto.setOperTime(new Date());
|
|
|
- operLogService.saveOperLog(operLogDto);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -378,6 +367,11 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //没有更改,不存修改日志
|
|
|
+ if(ObjectUtil.isEmpty(descMap)) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
//添加日志
|
|
|
operLogService.saveOperLog(req, operDto, descMap);
|
|
|
}
|
|
@@ -458,7 +452,7 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
saveReNew(inside, dispatch, masterSlaveUpdate);
|
|
|
|
|
|
//修改字段
|
|
|
- return editColsHistory(inside, masterSlaveUpdate);
|
|
|
+ return editColsHistory(inside, masterSlaveUpdate.getMasterUpdate().getUpdatecolumns());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -500,14 +494,12 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
* 修改字段历史
|
|
|
*
|
|
|
* @param oldInside
|
|
|
- * @param masterSlaveUpdate
|
|
|
+ * @param updatecolumns
|
|
|
* @return
|
|
|
*/
|
|
|
- private List<String> editColsHistory(ZhcxInsideInspectionDo oldInside, MasterSlaveUpdateVo masterSlaveUpdate) {
|
|
|
+ private List<String> editColsHistory(ZhcxInsideInspectionDo oldInside, Map<String,Object> updatecolumns) {
|
|
|
|
|
|
List<String> editDataList = new ArrayList<>();
|
|
|
-
|
|
|
- Map<String, Object> updatecolumns = masterSlaveUpdate.getMasterUpdate().getUpdatecolumns();
|
|
|
//预约报验时间
|
|
|
// if(ObjectUtil.isNotEmpty(updatecolumns.get("RESERVATIONINSPECTIONTIME"))) {
|
|
|
// String reservationinspectiontime = updatecolumns.get("RESERVATIONINSPECTIONTIME").toString();
|
|
@@ -911,7 +903,7 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
*
|
|
|
* @param inspectionDo
|
|
|
*/
|
|
|
- private void updateInspection(ZhcxInsideInspectionDo inspectionDo) {
|
|
|
+ private void updateInspection(ZhcxInsideInspectionDo inspectionDo, InsideInspectionOperRequest req) {
|
|
|
//存在报验单号,则不再生成
|
|
|
if(ObjectUtil.isNotEmpty(inspectionDo.getInspectioncode())) {
|
|
|
return ;
|
|
@@ -921,6 +913,17 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
entity.setId(inspectionDo.getId());
|
|
|
entity.setInspectioncode(genCode());
|
|
|
updateById(entity);
|
|
|
+
|
|
|
+ //生成操作记录
|
|
|
+ SysUserVo user = zhcxCommon.getCurrentUser();
|
|
|
+ InsideOperLogDto operLogDto = InsideOperLogDto.builder()
|
|
|
+ .id(req.getId())
|
|
|
+ .operType("5")
|
|
|
+ .launchSource(ObjectUtil.isEmpty(req.getLaunchSource()) ? "mobile" : req.getLaunchSource())
|
|
|
+ .build();
|
|
|
+ operLogDto.setOperUser(user);
|
|
|
+ operLogDto.setOperTime(new Date());
|
|
|
+ operLogService.saveOperLog(operLogDto);
|
|
|
}
|
|
|
|
|
|
/**
|