|
@@ -17,13 +17,16 @@ import com.platform.dao.dto.repair.RepairApplicationFormDTO;
|
|
|
import com.platform.dao.dto.repair.RepairCheckDTO;
|
|
|
import com.platform.dao.dto.repair.RepairFormDTO;
|
|
|
import com.platform.dao.dto.sb.SbInfoDTO;
|
|
|
+import com.platform.dao.dto.store.InStoreDetailDTO;
|
|
|
import com.platform.dao.dto.upms.SysUserDTO;
|
|
|
import com.platform.dao.entity.check.CheckJob;
|
|
|
import com.platform.dao.entity.repair.RepairApplicationForm;
|
|
|
import com.platform.dao.entity.repair.RepairCheck;
|
|
|
import com.platform.dao.entity.repair.RepairForm;
|
|
|
+import com.platform.dao.entity.repair.RepairReason;
|
|
|
import com.platform.dao.entity.sb.SbInfo;
|
|
|
import com.platform.dao.entity.sb.SbInspectionFill;
|
|
|
+import com.platform.dao.entity.store.InStoreDetail;
|
|
|
import com.platform.dao.entity.upms.SysConfig;
|
|
|
import com.platform.dao.entity.upms.SysFile;
|
|
|
import com.platform.dao.entity.upms.SysUser;
|
|
@@ -31,6 +34,7 @@ import com.platform.dao.enums.*;
|
|
|
import com.platform.dao.mapper.repair.RepairApplicationFormMapper;
|
|
|
import com.platform.dao.mapper.repair.RepairCheckMapper;
|
|
|
import com.platform.dao.mapper.repair.RepairFormMapper;
|
|
|
+import com.platform.dao.mapper.repair.RepairReasonMapper;
|
|
|
import com.platform.dao.mapper.upms.SysFileMapper;
|
|
|
import com.platform.dao.mapper.upms.SysUserMapper;
|
|
|
import com.platform.dao.util.MessageTemplateUtil;
|
|
@@ -87,6 +91,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
|
|
|
private final RepairFormService repairFormService;
|
|
|
private RepairFormMapper repairFormMapper;
|
|
|
+ private RepairReasonMapper repairReasonMapper;
|
|
|
private RepairCheckMapper repairCheckMapper;
|
|
|
private final SysUserService sysUserService;
|
|
|
private final SysUserDeptService sysUserDeptService;
|
|
@@ -94,6 +99,39 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
private final SysFileMapper sysFileMapper;
|
|
|
private final SysUserMapper userMapper;
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<RepairApplicationFormVO> getVOListByDTO(RepairApplicationFormDTO model) {
|
|
|
+ List<RepairApplicationFormVO> list = mapper.selectPageList(model);
|
|
|
+
|
|
|
+ if(CollectionUtil.isNotEmpty(list)){
|
|
|
+ List<String> ids = list.stream().map(RepairApplicationFormVO::getId).collect(Collectors.toList());
|
|
|
+ Weekend<RepairReason> detailWeekend = new Weekend<>(RepairReason.class);
|
|
|
+ detailWeekend.weekendCriteria().andIn(RepairReason::getRepairId, ids);
|
|
|
+ List<RepairReason> reasonList = repairReasonMapper.selectByExample(detailWeekend);
|
|
|
+ for (RepairApplicationFormVO vo : list) {
|
|
|
+ for (RepairReason reason : reasonList) {
|
|
|
+ if (vo.getId().equals(reason.getRepairId())) {
|
|
|
+ vo.setAnalyzeTime(reason.getAnalyzeTime());
|
|
|
+ vo.setProblemDesc(reason.getProblemDesc());
|
|
|
+ vo.setCheckProcess(reason.getCheckProcess());
|
|
|
+ vo.setReasonAnalysis(reason.getReasonAnalysis());
|
|
|
+ vo.setChangeRepairPlan(reason.getChangeRepairPlan()?"是":"否");
|
|
|
+ vo.setChangeRepairPlanContent(reason.getChangeRepairPlanContent());
|
|
|
+ vo.setChangeSparePlan(reason.getChangeSparePlan()?"是":"否");
|
|
|
+ vo.setChangeSparePlanContent(reason.getChangeSparePlanContent());
|
|
|
+ vo.setUserTeach(reason.getUserTeach()?"是":"否");
|
|
|
+ vo.setUserTeachContent(reason.getUserTeachContent());
|
|
|
+ vo.setSbChange(reason.getSbChange()?"是":"否");
|
|
|
+ vo.setSbChangeContent(reason.getSbChangeContent());
|
|
|
+ vo.setOtherChange(reason.getOtherChange()?"是":"否");
|
|
|
+ vo.setOtherChangeContent(reason.getOtherChangeContent());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public int batchDelete(List<String> ids) {
|
|
|
// 判断是否允许删除
|
|
@@ -438,7 +476,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
Weekend<SysFile> weekend = new Weekend<>(SysFile.class);
|
|
|
weekend.weekendCriteria().andEqualTo(SysFile::getType, SysFileTypeEnum.REPAIR_APPLICATION_IMGS.getValue()).andEqualTo(SysFile::getTargetId, model.getId());
|
|
|
sysFileMapper.deleteByExample(weekend);
|
|
|
- List<SysFile> list = SysFileUtils.changeFileList(model.getApplicationFileList(), model.getId(), SysFileTypeEnum.REPAIR_APPLICATION_IMGS.getValue());
|
|
|
+ List<SysFile> list = SysFileUtils.changeFileList(model.getApplicationFileList(), model.getId(), SysFileTypeEnum.REPAIR_APPLICATION_IMGS.getValue());
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
sysFileMapper.insertListforComplex(list);
|
|
|
}
|
|
@@ -455,7 +493,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
Weekend<SysFile> weekend = new Weekend<>(SysFile.class);
|
|
|
weekend.weekendCriteria().andEqualTo(SysFile::getType, SysFileTypeEnum.REPAIR_REPAIR_IMGS.getValue()).andEqualTo(SysFile::getTargetId, model.getId());
|
|
|
sysFileMapper.deleteByExample(weekend);
|
|
|
- List<SysFile> list = SysFileUtils.changeFileList(model.getRepairFileList(), model.getId(), SysFileTypeEnum.REPAIR_REPAIR_IMGS.getValue());
|
|
|
+ List<SysFile> list = SysFileUtils.changeFileList(model.getRepairFileList(), model.getId(), SysFileTypeEnum.REPAIR_REPAIR_IMGS.getValue());
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
sysFileMapper.insertListforComplex(list);
|
|
|
}
|