|
@@ -13,9 +13,7 @@ import com.platform.dao.entity.repair.RepairApplicationForm;
|
|
import com.platform.dao.entity.sb.SbInfo;
|
|
import com.platform.dao.entity.sb.SbInfo;
|
|
import com.platform.dao.entity.upms.SysFile;
|
|
import com.platform.dao.entity.upms.SysFile;
|
|
import com.platform.dao.entity.upms.SysUser;
|
|
import com.platform.dao.entity.upms.SysUser;
|
|
-import com.platform.dao.enums.CustomFieldTemplateDataStatusEnum;
|
|
|
|
-import com.platform.dao.enums.CustomFieldTemplateDataTypeEnum;
|
|
|
|
-import com.platform.dao.enums.SysFileTypeEnum;
|
|
|
|
|
|
+import com.platform.dao.enums.*;
|
|
import com.platform.dao.mapper.customize.CustomFieldTemplateDataMapper;
|
|
import com.platform.dao.mapper.customize.CustomFieldTemplateDataMapper;
|
|
import com.platform.dao.mapper.repair.RepairApplicationFormMapper;
|
|
import com.platform.dao.mapper.repair.RepairApplicationFormMapper;
|
|
import com.platform.dao.mapper.sb.SbInfoMapper;
|
|
import com.platform.dao.mapper.sb.SbInfoMapper;
|
|
@@ -165,7 +163,7 @@ public class CustomFieldTemplateDataServiceImpl extends BaseServiceImpl<CustomFi
|
|
writeBackToRecord(pageInfos);
|
|
writeBackToRecord(pageInfos);
|
|
break;
|
|
break;
|
|
case CommonConstants.REPAIR_STATUS_RECORD:
|
|
case CommonConstants.REPAIR_STATUS_RECORD:
|
|
- writeBackToStatus(pageInfos);
|
|
|
|
|
|
+ writeBackToStatus(pageInfos,record.getObjId());
|
|
break;
|
|
break;
|
|
case CommonConstants.REPAIR_VERIFY_RECORD:
|
|
case CommonConstants.REPAIR_VERIFY_RECORD:
|
|
writeBackToVerify(pageInfos);
|
|
writeBackToVerify(pageInfos);
|
|
@@ -358,12 +356,72 @@ public class CustomFieldTemplateDataServiceImpl extends BaseServiceImpl<CustomFi
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void writeBackToStatus(AbstractPageResultBean<CustomFieldTemplateDataVO> pageInfos){
|
|
|
|
- for(CustomFieldTemplateDataVO vo : pageInfos.getRows()){
|
|
|
|
|
|
+ private void writeBackToStatus(AbstractPageResultBean<CustomFieldTemplateDataVO> pageInfos,String repairId){
|
|
|
|
+ List<CustomFieldTemplateDataVO> list = pageInfos.getRows();
|
|
|
|
+ for(CustomFieldTemplateDataVO vo : list){
|
|
RepairStatusTemplateData data = JsonUtils.jsonToModel(vo.getData(),RepairStatusTemplateData.class);
|
|
RepairStatusTemplateData data = JsonUtils.jsonToModel(vo.getData(),RepairStatusTemplateData.class);
|
|
vo.setDataRemark(data.getRemark());
|
|
vo.setDataRemark(data.getRemark());
|
|
vo.setStatus(data.getStatus());
|
|
vo.setStatus(data.getStatus());
|
|
}
|
|
}
|
|
|
|
+ // 查询维修记录
|
|
|
|
+ RepairApplicationForm form = repairApplicationFormMapper.selectByPrimaryKey(repairId);
|
|
|
|
+ if(form != null){
|
|
|
|
+ CustomFieldTemplateDataVO vo = new CustomFieldTemplateDataVO();
|
|
|
|
+ // 非计划性维修,当前状态
|
|
|
|
+ switch (form.getStatus()){
|
|
|
|
+ case 1:
|
|
|
|
+ // 待接单
|
|
|
|
+ vo.setStatus(RepairApplicationFormStatusEnum.RECEIVED.getValue());
|
|
|
|
+ vo.setRealUserName("接单工程师");
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ // 维修中
|
|
|
|
+ vo.setStatus(RepairApplicationFormStatusEnum.WAIT_SUBMIT.getValue());
|
|
|
|
+ if(StringUtils.isNotBlank(form.getDispatchUserId())){
|
|
|
|
+ vo.setRealUserName(sysUserMapper.selectByPrimaryKey(form.getDispatchUserId()).getRealName());
|
|
|
|
+ }else{
|
|
|
|
+ vo.setRealUserName("未知审核人");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case 6:
|
|
|
|
+ // 已完成,待关闭
|
|
|
|
+ vo.setStatus(RepairApplicationFormStatusEnum.MM_REPAIR_CLOSE.getValue());
|
|
|
|
+ if(StringUtils.isNotBlank(form.getDispatchUserId())){
|
|
|
|
+ vo.setRealUserName(sysUserMapper.selectByPrimaryKey(form.getDispatchUserId()).getRealName());
|
|
|
|
+ }else{
|
|
|
|
+ vo.setRealUserName("未知关闭人");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case 9:
|
|
|
|
+ // 接单
|
|
|
|
+ vo.setStatus(RepairApplicationFormStatusEnum.PROCESSING.getValue());
|
|
|
|
+ if(StringUtils.isNotBlank(form.getRepairUserId())){
|
|
|
|
+ vo.setRealUserName(sysUserMapper.selectByPrimaryKey(form.getRepairUserId()).getRealName());
|
|
|
|
+ }else{
|
|
|
|
+ vo.setRealUserName("未知维修人");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case 15:
|
|
|
|
+ // 报修一审中
|
|
|
|
+ vo.setStatus(RepairApplicationFormStatusEnum.CALLER_REPAIR_VERIFYING_TWO.getValue());
|
|
|
|
+ if(StringUtils.isNotBlank(form.getDispatchUserId())){
|
|
|
|
+ vo.setRealUserName(sysUserMapper.selectByPrimaryKey(form.getDispatchUserId()).getRealName());
|
|
|
|
+ }else{
|
|
|
|
+ vo.setRealUserName("未知审核人");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case 17:
|
|
|
|
+ // 报修二审中
|
|
|
|
+ vo.setStatus(RepairApplicationFormStatusEnum.CALLER_REPAIR_VERIFYING_THREE.getValue());
|
|
|
|
+ if(StringUtils.isNotBlank(form.getReportLeaderId())){
|
|
|
|
+ vo.setRealUserName(sysUserMapper.selectByPrimaryKey(form.getReportLeaderId()).getRealName());
|
|
|
|
+ }else{
|
|
|
|
+ vo.setRealUserName("未知审核人");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ list.add(vo);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
private void writeBackToVerify(AbstractPageResultBean<CustomFieldTemplateDataVO> pageInfos){
|
|
private void writeBackToVerify(AbstractPageResultBean<CustomFieldTemplateDataVO> pageInfos){
|