|
|
@ -201,20 +201,12 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S |
|
|
|
BaseVehicleVo data = baseVehicleFeign.selVehicleByVinNo(scmVehiclePatrolinspection.getVinNo()).getData(); |
|
|
|
patrolinspectionsheetInfoVo.setModel(data.getModelName()); |
|
|
|
patrolinspectionsheetInfoVo.setModelSid(data.getModelSid()); |
|
|
|
ScmWarehouse scmWarehouse = scmWarehouseService.fetchBySid(scmVehiclePatrolinspection.getLocationSid()); |
|
|
|
patrolinspectionsheetInfoVo.setLiableName(scmWarehouse.getLibTubeName()); |
|
|
|
patrolinspectionsheetInfoVo.setLiableSid(scmWarehouse.getLibTubeSid()); |
|
|
|
patrolinspectionsheetInfoVo.setRecordSid(recordSid); |
|
|
|
return patrolinspectionsheetInfoVo; |
|
|
|
} |
|
|
|
|
|
|
|
List<AppLiableListVo> list = new ArrayList<>(); |
|
|
|
List<String> splitName = Arrays.asList(vo.getLiableName().split(",")); |
|
|
|
List<String> splitSid = Arrays.asList(vo.getLiableSid().split(",")); |
|
|
|
for (int i = 0; i < splitName.size(); i++) { |
|
|
|
AppLiableListVo v = new AppLiableListVo(); |
|
|
|
v.setLiableName(splitName.get(i)); |
|
|
|
v.setLiableSid(splitSid.get(i)); |
|
|
|
list.add(v); |
|
|
|
} |
|
|
|
vo.setLiableList(list); |
|
|
|
List<ScmFile> scmFiles1 = scmFileService.selectByLinkSid(vo.getSid(), type1); |
|
|
|
if (scmFiles1.size() > 0) { |
|
|
|
for (ScmFile scmFile : scmFiles1) { |
|
|
@ -233,18 +225,18 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S |
|
|
|
public AppScmVehiclePatroVo getInspectionInfo(String recordSid) { |
|
|
|
String type1 = "06"; // 巡检相关照片
|
|
|
|
AppScmVehiclePatroVo vo = baseMapper.getInspectionInfo(recordSid); |
|
|
|
if (StringUtils.isNotBlank(vo.getLiableName())) { |
|
|
|
List<AppLiableListVo> list = new ArrayList<>(); |
|
|
|
List<String> splitName = Arrays.asList(vo.getLiableName().split(",")); |
|
|
|
List<String> splitSid = Arrays.asList(vo.getLiableSid().split(",")); |
|
|
|
for (int i = 0; i < splitName.size(); i++) { |
|
|
|
AppLiableListVo v = new AppLiableListVo(); |
|
|
|
v.setLiableName(splitName.get(i)); |
|
|
|
v.setLiableSid(splitSid.get(i)); |
|
|
|
list.add(v); |
|
|
|
} |
|
|
|
vo.setLiableList(list); |
|
|
|
} |
|
|
|
// if (StringUtils.isNotBlank(vo.getLiableName())) {
|
|
|
|
// List<AppLiableListVo> list = new ArrayList<>();
|
|
|
|
// List<String> splitName = Arrays.asList(vo.getLiableName().split(","));
|
|
|
|
// List<String> splitSid = Arrays.asList(vo.getLiableSid().split(","));
|
|
|
|
// for (int i = 0; i < splitName.size(); i++) {
|
|
|
|
// AppLiableListVo v = new AppLiableListVo();
|
|
|
|
// v.setLiableName(splitName.get(i));
|
|
|
|
// v.setLiableSid(splitSid.get(i));
|
|
|
|
// list.add(v);
|
|
|
|
// }
|
|
|
|
// vo.setLiableList(list);
|
|
|
|
// }
|
|
|
|
List<String> images = new ArrayList<>(); |
|
|
|
List<ScmFile> scmFiles1 = scmFileService.selectByLinkSid(vo.getSid(), type1); |
|
|
|
if (scmFiles1.size() > 0) { |
|
|
@ -299,15 +291,8 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S |
|
|
|
scmVehiclePatrolinspectionService.save(scmVehiclePatrolinspection); |
|
|
|
|
|
|
|
BeanUtil.copyProperties(dto, scmVehiclePatrolinspectionsheet, "sid"); |
|
|
|
List<AppLiableListDto> liableList = dto.getLiableList(); |
|
|
|
String DutyName = ""; |
|
|
|
String DutySid = ""; |
|
|
|
for (AppLiableListDto appLiableListDto : liableList) { |
|
|
|
DutyName = appLiableListDto.getLiableName() + "," + DutyName; |
|
|
|
DutySid = appLiableListDto.getLiableSid() + "," + DutySid; |
|
|
|
} |
|
|
|
scmVehiclePatrolinspectionsheet.setDutyName(DutyName.substring(0, DutyName.length() - 1)); |
|
|
|
scmVehiclePatrolinspectionsheet.setDutySid(DutySid.substring(0, DutySid.length() - 1)); |
|
|
|
scmVehiclePatrolinspectionsheet.setDutyName(dto.getLiableName()); |
|
|
|
scmVehiclePatrolinspectionsheet.setDutySid(dto.getLiableSid()); |
|
|
|
scmVehiclePatrolinspectionsheet.setCreateOrgSid(useOrgSid); |
|
|
|
scmVehiclePatrolinspectionsheet.setCreateBySid(dto.getUserSid()); |
|
|
|
scmVehiclePatrolinspectionsheet.setUseOrgSid(useOrgSid); |
|
|
@ -330,11 +315,14 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S |
|
|
|
scmFileService.save(scmFile1); |
|
|
|
} |
|
|
|
List<String> receiveIdList = new ArrayList<>(); |
|
|
|
for (AppLiableListDto appLiableListDto : liableList) { |
|
|
|
SysUserVo sysUserVos = sysUserFeign.fetchBySid(appLiableListDto.getLiableSid()).getData(); |
|
|
|
Integer id = sysUserVos.getId(); |
|
|
|
receiveIdList.add(String.valueOf(id)); |
|
|
|
} |
|
|
|
List<AppLiableListDto> liableList = dto.getLiableList(); |
|
|
|
AppLiableListDto appLiableListDto = new AppLiableListDto(); |
|
|
|
appLiableListDto.setLiableName(dto.getLiableName()); |
|
|
|
appLiableListDto.setLiableSid(dto.getLiableSid()); |
|
|
|
liableList.add(appLiableListDto); |
|
|
|
SysUserVo sysUserVos = sysUserFeign.fetchBySid(dto.getLiableSid()).getData(); |
|
|
|
Integer id = sysUserVos.getId(); |
|
|
|
receiveIdList.add(String.valueOf(id)); |
|
|
|
AppPatrolinspectionDto appPatrolinspectionDto = new AppPatrolinspectionDto(); |
|
|
|
appPatrolinspectionDto.setMsgContent(sysUserVo.getName()); |
|
|
|
appPatrolinspectionDto.setList(liableList); |
|
|
@ -347,15 +335,8 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S |
|
|
|
BeanUtil.copyProperties(dto, scmVehiclePatrolinspectionsheet, "sid"); |
|
|
|
scmVehiclePatrolinspectionsheet.setCreateOrgSid(useOrgSid); |
|
|
|
scmVehiclePatrolinspectionsheet.setCreateBySid(dto.getUserSid()); |
|
|
|
List<AppLiableListDto> liableList = dto.getLiableList(); |
|
|
|
String DutyName = ""; |
|
|
|
String DutySid = ""; |
|
|
|
for (AppLiableListDto appLiableListDto : liableList) { |
|
|
|
DutyName = appLiableListDto.getLiableName() + "," + DutyName; |
|
|
|
DutySid = appLiableListDto.getLiableSid() + "," + DutySid; |
|
|
|
} |
|
|
|
scmVehiclePatrolinspectionsheet.setDutyName(DutyName.substring(0, DutyName.length() - 1)); |
|
|
|
scmVehiclePatrolinspectionsheet.setDutySid(DutySid.substring(0, DutySid.length() - 1)); |
|
|
|
scmVehiclePatrolinspectionsheet.setDutyName(dto.getLiableName()); |
|
|
|
scmVehiclePatrolinspectionsheet.setDutySid(dto.getLiableSid()); |
|
|
|
scmFileService.deleteByLinkSidAndType(scmVehiclePatrolinspectionsheet.getSid(), type1); |
|
|
|
List<String> images = dto.getImages(); |
|
|
|
for (String s : images) { |
|
|
@ -372,11 +353,14 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S |
|
|
|
save(scmVehiclePatrolinspectionsheet); |
|
|
|
scmVehiclePatrolinspectionService.updateByMainSid(oneKey, oneValue, newDate, sysUserVo.getName(), dto.getMainSid()); |
|
|
|
List<String> receiveIdList = new ArrayList<>(); |
|
|
|
for (AppLiableListDto appLiableListDto : liableList) { |
|
|
|
SysUserVo sysUserVos = sysUserFeign.fetchBySid(appLiableListDto.getLiableSid()).getData(); |
|
|
|
Integer id = sysUserVos.getId(); |
|
|
|
receiveIdList.add(String.valueOf(id)); |
|
|
|
} |
|
|
|
List<AppLiableListDto> liableList = dto.getLiableList(); |
|
|
|
AppLiableListDto appLiableListDto = new AppLiableListDto(); |
|
|
|
appLiableListDto.setLiableName(dto.getLiableName()); |
|
|
|
appLiableListDto.setLiableSid(dto.getLiableSid()); |
|
|
|
liableList.add(appLiableListDto); |
|
|
|
SysUserVo sysUserVos = sysUserFeign.fetchBySid(dto.getLiableSid()).getData(); |
|
|
|
Integer id = sysUserVos.getId(); |
|
|
|
receiveIdList.add(String.valueOf(id)); |
|
|
|
AppPatrolinspectionDto appPatrolinspectionDto = new AppPatrolinspectionDto(); |
|
|
|
appPatrolinspectionDto.setMsgContent(sysUserVo.getName()); |
|
|
|
appPatrolinspectionDto.setList(liableList); |
|
|
@ -589,17 +573,8 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S |
|
|
|
BaseVehicleVo vehicleVo = baseVehicleFeign.selVehicleByVinNo(dto.getVinNo()).getData(); |
|
|
|
patrolinspectionsheet.setModel(vehicleVo.getModelName()); |
|
|
|
patrolinspectionsheet.setModelSid(vehicleVo.getModelSid()); |
|
|
|
List<AppLiableListDto> liableList = dto.getLiableList(); |
|
|
|
if (liableList.size() > 0) { |
|
|
|
String DutyName = ""; |
|
|
|
String DutySid = ""; |
|
|
|
for (AppLiableListDto appLiableListDto : liableList) { |
|
|
|
DutyName = appLiableListDto.getLiableName() + "," + DutyName; |
|
|
|
DutySid = appLiableListDto.getLiableSid() + "," + DutySid; |
|
|
|
} |
|
|
|
patrolinspectionsheet.setDutyName(DutyName.substring(0, DutyName.length() - 1)); |
|
|
|
patrolinspectionsheet.setDutySid(DutySid.substring(0, DutySid.length() - 1)); |
|
|
|
} |
|
|
|
patrolinspectionsheet.setDutyName(dto.getLiableName()); |
|
|
|
patrolinspectionsheet.setDutySid(dto.getLiableSid()); |
|
|
|
scmFileService.deleteByLinkSidAndType(patrolinspectionsheet.getSid(), type1); |
|
|
|
List<String> images = dto.getImages(); |
|
|
|
for (String s : images) { |
|
|
@ -624,15 +599,8 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S |
|
|
|
BaseVehicleVo vehicleVo = baseVehicleFeign.selVehicleByVinNo(dto.getVinNo()).getData(); |
|
|
|
patrolinspectionsheet.setModel(vehicleVo.getModelName()); |
|
|
|
patrolinspectionsheet.setModelSid(vehicleVo.getModelSid()); |
|
|
|
List<AppLiableListDto> liableList = dto.getLiableList(); |
|
|
|
String DutyName = ""; |
|
|
|
String DutySid = ""; |
|
|
|
for (AppLiableListDto appLiableListDto : liableList) { |
|
|
|
DutyName = appLiableListDto.getLiableName() + "," + DutyName; |
|
|
|
DutySid = appLiableListDto.getLiableSid() + "," + DutySid; |
|
|
|
} |
|
|
|
patrolinspectionsheet.setDutyName(DutyName.substring(0, DutyName.length() - 1)); |
|
|
|
patrolinspectionsheet.setDutySid(DutySid.substring(0, DutySid.length() - 1)); |
|
|
|
patrolinspectionsheet.setDutyName(dto.getLiableName()); |
|
|
|
patrolinspectionsheet.setDutySid(dto.getLiableSid()); |
|
|
|
scmFileService.deleteByLinkSidAndType(patrolinspectionsheet.getSid(), type1); |
|
|
|
List<String> images = dto.getImages(); |
|
|
|
for (String s : images) { |
|
|
|