|
|
|
@ -613,7 +613,31 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void createAnomalyTask(String category, String resource, String shopOrder, String sfc, String ncCodes) {
|
|
|
|
|
public HashMap<String,Object> anomalyReveseRepair(AbnormalBill abnormalBill,AbnormalBillDispose abnormalBillDispose) {
|
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
|
String user = CommonMethods.getUser();
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
if(!Constants.RESPONSE.equals(abnormalBill.getStatus())){
|
|
|
|
|
throw BusinessException.build("该异常单的状态必须是响应中才能转维修");
|
|
|
|
|
}
|
|
|
|
|
if(StringUtil.isBlank(abnormalBillDispose.getAbnormalMethod())){
|
|
|
|
|
throw BusinessException.build("转维修时方案分类必须填写");
|
|
|
|
|
}
|
|
|
|
|
abnormalBill.setHandle(HandleEnum.Z_ABNORMAL_BILL.getHandle(site,abnormalBill.getAbnormalNo()));
|
|
|
|
|
abnormalBill.setStatus(Constants.SHUT_DOWN);
|
|
|
|
|
abnormalBillDispose.setResolveUser(user);
|
|
|
|
|
abnormalBillDispose.setResolveDateTime(now);
|
|
|
|
|
abnormalBillDispose.setHandle(HandleEnum.Z_ABNORMAL_BILL_DISPOSE.getHandle(site,abnormalBill.getAbnormalNo()));
|
|
|
|
|
this.saveOrUpdate(abnormalBill);
|
|
|
|
|
abnormalBillDisposeService.saveOrUpdate(abnormalBillDispose);
|
|
|
|
|
HashMap<String, Object> hashMap = new HashMap<>();
|
|
|
|
|
hashMap.put("abnormalBill",abnormalBillMapper.selectById(abnormalBill.getHandle()));
|
|
|
|
|
hashMap.put("abnormalBillDispose",abnormalBillDisposeMapper.selectById(abnormalBillDispose.getHandle()));
|
|
|
|
|
return hashMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void createAnomalyTask(String category, String resource, String shopOrder, String sfc, String ncCodes,String position,String ncQty,String ncDescription) {
|
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
String user = CommonMethods.getUser();
|
|
|
|
@ -630,6 +654,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
abnormalNo = this.getNextNumber(category);
|
|
|
|
|
abnormalBill.setType(category);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abnormalBill.setSite(site);
|
|
|
|
|
abnormalBill.setAbnormalNo(abnormalNo);
|
|
|
|
|
abnormalBill.setHandle(HandleEnum.Z_ABNORMAL_BILL.getHandle(site,abnormalNo));
|
|
|
|
@ -637,6 +662,9 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
abnormalBill.setSfc(sfc);
|
|
|
|
|
abnormalBill.setShopOrder(shopOrder);
|
|
|
|
|
abnormalBill.setResrce(resource);
|
|
|
|
|
abnormalBill.setEntityLocation(position);
|
|
|
|
|
abnormalBill.setNcQty(ncQty);
|
|
|
|
|
abnormalBill.setPbDescription(ncDescription);
|
|
|
|
|
abnormalBill.setDiscover(Constants.SELF_MADE);
|
|
|
|
|
abnormalBill.setReportFrom(Constants.REPORT);
|
|
|
|
|
AbnormalBillDispose abnormalBillDispose = new AbnormalBillDispose();
|
|
|
|
|