|
|
@@ -229,7 +229,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
}
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED)
|
|
|
- private void singleDelete(Long id) {
|
|
|
+ public void singleDelete(Long id) {
|
|
|
|
|
|
ProdInOut prodInOut = checkAndReturnOrder(id);;
|
|
|
//删除主键
|
|
|
@@ -261,7 +261,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
}
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED)
|
|
|
- private void singleAudit(ProdInOutDTO prodInOutDTO) {
|
|
|
+ public void singleAudit(ProdInOutDTO prodInOutDTO) {
|
|
|
String pi_class= prodInOutDTO.getPi_class();
|
|
|
String pi_inoutno = prodInOutDTO.getPi_inoutno();
|
|
|
String pi_statuscode = prodInOutDTO.getPi_statuscode();
|
|
|
@@ -603,7 +603,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
return pushMaxnubmer(base);
|
|
|
}
|
|
|
|
|
|
- public synchronized String pushMaxnubmer(DocBaseDTO baseDTO) {
|
|
|
+ public String pushMaxnubmer(DocBaseDTO baseDTO) {
|
|
|
String pi_inoutno = baseDTO.getCode();
|
|
|
String pi_class = baseDTO.getName();
|
|
|
Long id = baseDTO.getId();
|
|
|
@@ -611,14 +611,18 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
throw new BizException(BizExceptionCode.NULL_CODE);
|
|
|
}
|
|
|
Long companyId = BaseContextHolder.getCompanyId();
|
|
|
- Integer count = "0".equals(String.valueOf(id)) ? getMapper().validateCodeWhenInsert(pi_inoutno, companyId) :
|
|
|
- getMapper().validateCodeWhenUpdate(pi_inoutno, id, companyId);
|
|
|
- String caller ="";
|
|
|
- if("采购验收单".equals(pi_class)){
|
|
|
- caller = BillCodeSeq.PURCHASEIN.getCaller();
|
|
|
- }else if("采购验退单".equals(pi_class)) {
|
|
|
- caller = BillCodeSeq.PURCHASEOUT.getCaller();
|
|
|
- }
|
|
|
- return maxnumberService.pushMaxnubmer(count, pi_inoutno, caller).getData();
|
|
|
+ String billCode = null;
|
|
|
+ synchronized (ProdInOutServiceImpl.class) {
|
|
|
+ Integer count = "0".equals(String.valueOf(id)) ? getMapper().validateCodeWhenInsert(pi_inoutno, companyId) :
|
|
|
+ getMapper().validateCodeWhenUpdate(pi_inoutno, id, companyId);
|
|
|
+ String caller ="";
|
|
|
+ if("采购验收单".equals(pi_class)){
|
|
|
+ caller = BillCodeSeq.PURCHASEIN.getCaller();
|
|
|
+ }else if("采购验退单".equals(pi_class)) {
|
|
|
+ caller = BillCodeSeq.PURCHASEOUT.getCaller();
|
|
|
+ }
|
|
|
+ billCode = maxnumberService.pushMaxnubmer(count, pi_inoutno, caller).getData();
|
|
|
+ }
|
|
|
+ return billCode;
|
|
|
}
|
|
|
}
|