|
|
@@ -250,8 +250,13 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
|
|
|
private void singleAudit(ProdInOutDTO prodInOutDTO) {
|
|
|
String pi_class= prodInOutDTO.getPi_class();
|
|
|
+ String pi_inoutno = prodInOutDTO.getPi_inoutno();
|
|
|
+ String pi_statuscode = prodInOutDTO.getPi_statuscode();
|
|
|
+ if(StringUtils.isEmpty(pi_statuscode)||(!StringUtils.isEmpty(pi_statuscode)&&!pi_statuscode.equals(Status.UNAUDITED.name()))){
|
|
|
+ throw new BizException(BizExceptionCode.BIZ_AUDITED);
|
|
|
+ };
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
- map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
|
|
|
+ map.put("inoutNo",pi_inoutno);
|
|
|
map.put("class", pi_class);
|
|
|
map.put("commitid",BaseContextHolder.getUserId());
|
|
|
map.put("companyId",BaseContextHolder.getCompanyId());
|
|
|
@@ -259,7 +264,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
Result res = warehouseApi.post(map);
|
|
|
Object result = res.getData();
|
|
|
if(!StringUtils.isEmpty(result)){
|
|
|
- throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
|
|
|
+ throw new BizException(BizExceptionCode.PURCCHECKIN_POST_ERROR.getCode(),result.toString());
|
|
|
}else{
|
|
|
//记录日志
|
|
|
DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
|
|
|
@@ -296,9 +301,14 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
}
|
|
|
|
|
|
private void singleUnAudit(ProdInOutDTO prodInOutDTO) {
|
|
|
- String pi_class= prodInOutDTO.getPi_class();
|
|
|
+ String pi_class = prodInOutDTO.getPi_class();
|
|
|
+ String pi_inoutno = prodInOutDTO.getPi_inoutno();
|
|
|
+ String pi_statuscode = prodInOutDTO.getPi_statuscode();
|
|
|
+ if(StringUtils.isEmpty(pi_statuscode)||(!StringUtils.isEmpty(pi_statuscode)&&!pi_statuscode.equals(Status.AUDITED.name()))){
|
|
|
+ throw new BizException(BizExceptionCode.BIZ_UNAUDITED);
|
|
|
+ };
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
- map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
|
|
|
+ map.put("inoutNo",pi_inoutno);
|
|
|
map.put("class", pi_class);
|
|
|
map.put("commitid",BaseContextHolder.getUserId());
|
|
|
map.put("companyId",BaseContextHolder.getCompanyId());
|
|
|
@@ -306,7 +316,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
Result res = warehouseApi.unPost(map);
|
|
|
Object result = res.getData();
|
|
|
if(!StringUtils.isEmpty(result)){
|
|
|
- throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
|
|
|
+ throw new BizException(BizExceptionCode.PURCCHECKIN_POST_ERROR.getCode(),result.toString());
|
|
|
}else{
|
|
|
//记录日志
|
|
|
DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
|