|
|
|
@ -13,7 +13,10 @@ import com.foreverwin.mesnac.common.constant.Constants;
|
|
|
|
|
import com.foreverwin.mesnac.common.enums.HandleEnum;
|
|
|
|
|
import com.foreverwin.mesnac.common.helper.NextNumberHelper;
|
|
|
|
|
import com.foreverwin.mesnac.common.util.StringUtil;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.mapper.*;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.mapper.NcGroupMapper;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.mapper.NwaUserMapper;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.mapper.ResrceMapper;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.mapper.ShopOrderMapper;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.model.*;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.service.*;
|
|
|
|
|
import com.foreverwin.modular.core.exception.BusinessException;
|
|
|
|
@ -228,16 +231,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
hashMap.put("currentUser",nwaUsers.get(0).getFullName());
|
|
|
|
|
}
|
|
|
|
|
//初始化异常单号
|
|
|
|
|
String abnormalNo = null;
|
|
|
|
|
//生成异常单号
|
|
|
|
|
if("Q".equals(type)){//其他异常
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_OTHER", 1, null).get(0);
|
|
|
|
|
}else if("Z".equals(type)){//质量异常
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_QUALITY", 1, null).get(0);
|
|
|
|
|
}else if("S".equals(type)){//设备异常
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_DEVICE", 1, null).get(0);
|
|
|
|
|
}
|
|
|
|
|
hashMap.put("abnormalNo",abnormalNo);
|
|
|
|
|
hashMap.put("abnormalNo",this.getNextNumber(type));
|
|
|
|
|
|
|
|
|
|
return hashMap;
|
|
|
|
|
}
|
|
|
|
@ -278,6 +272,8 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
String user = "";
|
|
|
|
|
if(StringUtil.isBlank(abnormalBill.getResponseUser())){
|
|
|
|
|
user = CommonMethods.getUser();
|
|
|
|
|
}else {
|
|
|
|
|
user = abnormalBill.getResponseUser() + "," + CommonMethods.getUser();
|
|
|
|
|
}
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
abnormalBill.setSite(site);
|
|
|
|
@ -513,9 +509,12 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void cancelBrowse(String handle, String cancelBrowse,String code) {
|
|
|
|
|
public boolean cancelBrowse(String handle, String cancelBrowse,String code) {
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
AbnormalBill abnormalBill = abnormalBillMapper.selectById(handle);
|
|
|
|
|
if(abnormalBill == null){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
abnormalBill.setStatus(Constants.CANCEL);
|
|
|
|
|
abnormalBill.setCancelReason(cancelBrowse);
|
|
|
|
|
if(!StringUtil.isBlank(code)){
|
|
|
|
@ -524,6 +523,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
abnormalBill.setCancelUser(CommonMethods.getUser());
|
|
|
|
|
abnormalBill.setCancelDateTime(now);
|
|
|
|
|
this.saveOrUpdate(abnormalBill);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -572,6 +572,21 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getNextNumber(String type){
|
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
|
String abnormalNo = "";
|
|
|
|
|
//生成异常单号
|
|
|
|
|
if("Q".equals(type)){//其他异常
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_OTHER", 1, null).get(0);
|
|
|
|
|
}else if("Z".equals(type)){//质量异常
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_QUALITY", 1, null).get(0);
|
|
|
|
|
}else if("S".equals(type)){//设备异常
|
|
|
|
|
abnormalNo = nextNumberHelper.getNextNumber(site, "ABNORMAL_DEVICE", 1, null).get(0);
|
|
|
|
|
}
|
|
|
|
|
return abnormalNo;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|