|
@@ -404,7 +404,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
double pdQty=0, pdYqty=0;
|
|
double pdQty=0, pdYqty=0;
|
|
|
//检查转单状态
|
|
//检查转单状态
|
|
|
String acceptstatus = purchase.getPu_acceptstatuscode();
|
|
String acceptstatus = purchase.getPu_acceptstatuscode();
|
|
|
-
|
|
|
|
|
if (Status.CLOSE.name().equals(acceptstatus)){
|
|
if (Status.CLOSE.name().equals(acceptstatus)){
|
|
|
return Result.error(ExceptionCode.CLOSED_EXIST);
|
|
return Result.error(ExceptionCode.CLOSED_EXIST);
|
|
|
}
|
|
}
|
|
@@ -530,12 +529,19 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
|
|
|
|
|
@Transactional
|
|
@Transactional
|
|
|
public void singleUnAudit(Long id) {
|
|
public void singleUnAudit(Long id) {
|
|
|
- Purchase purchase = new Purchase();
|
|
|
|
|
|
|
+ //校验关闭状态
|
|
|
|
|
+ Purchase purchase = getMapper().selectByPrimaryKey(id);
|
|
|
|
|
+ //检查转单状态
|
|
|
|
|
+ String acceptstatus = purchase.getPu_acceptstatuscode();
|
|
|
|
|
+ if (Status.CLOSE.name().equals(acceptstatus)){
|
|
|
|
|
+ throw new BizException(ExceptionCode.CLOSED_EXIST);
|
|
|
|
|
+ }
|
|
|
//检查是否已转验收单
|
|
//检查是否已转验收单
|
|
|
Integer num = getMapper().checkTurnInstatus(id);
|
|
Integer num = getMapper().checkTurnInstatus(id);
|
|
|
if (num > 0) {
|
|
if (num > 0) {
|
|
|
throw new BizException(BizExceptionCode.PURCHASE_UNAUDIT_ERROR);
|
|
throw new BizException(BizExceptionCode.PURCHASE_UNAUDIT_ERROR);
|
|
|
}
|
|
}
|
|
|
|
|
+ purchase = new Purchase();
|
|
|
//生成更新对象
|
|
//生成更新对象
|
|
|
purchase.setId(id);
|
|
purchase.setId(id);
|
|
|
purchase.setPu_status(Status.UNAUDITED.getDisplay());
|
|
purchase.setPu_status(Status.UNAUDITED.getDisplay());
|