|
|
@@ -247,6 +247,10 @@ public class SaleServiceImpl implements SaleService{
|
|
|
sale.setSa_auditdate(new Date());
|
|
|
//更新存在字段
|
|
|
saleMapper.updateByPrimaryKeySelective(sale);*/
|
|
|
+ Integer integer = saleMapper.checkCustomer(id);
|
|
|
+ if (integer > 0) {
|
|
|
+ throw new BizException(BizExceptionCode.SALE_CUST_CLOSE);
|
|
|
+ }
|
|
|
commonService.commonAudit("sale", "sa_id=" + id, "sa_status",
|
|
|
"sa_statuscode", "sa_auditdate", "sa_auditman");
|
|
|
//更新销售金额
|
|
|
@@ -273,6 +277,10 @@ public class SaleServiceImpl implements SaleService{
|
|
|
int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
|
|
|
throw new BizException(code, String.format(message, validate));
|
|
|
}
|
|
|
+ String custAudit = saleMapper.validateCustAudit(baseDTOs.getBaseDTOs());
|
|
|
+ if (!StringUtils.isEmpty(custAudit)) {
|
|
|
+ throw new BizException(72009, "客户已关闭,无法审核, 单号:" + custAudit);
|
|
|
+ }
|
|
|
for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
|
|
|
singleAudit(base.getId());
|
|
|
}
|
|
|
@@ -285,7 +293,7 @@ public class SaleServiceImpl implements SaleService{
|
|
|
}
|
|
|
String code = saleMapper.validateUnAudit(id);
|
|
|
if (null != code) {
|
|
|
- throw new BizException(BizExceptionCode.SALE_NULL_BILL);
|
|
|
+ throw new BizException(BizExceptionCode.SALE_ALREADY_UNAUDIT);
|
|
|
}
|
|
|
//检测出货状态为未出货
|
|
|
Integer num = saleMapper.checkSendStatus(id);
|
|
|
@@ -322,15 +330,15 @@ public class SaleServiceImpl implements SaleService{
|
|
|
baseDTOs.getBaseDTOs().size() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- String msg = saleMapper.validateBatchUnAudit(baseDTOs.getBaseDTOs());
|
|
|
+ /* String msg = saleMapper.validateBatchUnAudit(baseDTOs.getBaseDTOs());
|
|
|
if (null != msg) {
|
|
|
String message = BizExceptionCode.SALE_ORDER_HASAUDIT.getMessage();
|
|
|
int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
|
|
|
throw new BizException(code, String.format(message, msg));
|
|
|
}
|
|
|
+ saleMapper.BatchcheckSendStatus();*/
|
|
|
for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
|
|
|
- singleUnAudit(base.getId());
|
|
|
+ unAudit(base.getId());
|
|
|
}
|
|
|
}
|
|
|
|