优化单据的新增和更新接口

This commit is contained in:
jishenghua
2024-04-01 21:07:51 +08:00
parent 5985778fce
commit 74383c5f3d

View File

@@ -996,11 +996,7 @@ public class DepotHeadService {
String.format(ExceptionConstants.DEPOT_HEAD_FILE_NUM_LIMIT_MSG, 4));
}
}
try{
depotHeadMapper.insertSelective(depotHead);
}catch(Exception e){
JshException.writeFail(logger, e);
}
/**入库和出库处理预付款信息*/
if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPayType())){
if(depotHead.getOrganId()!=null) {
@@ -1094,11 +1090,7 @@ public class DepotHeadService {
String.format(ExceptionConstants.DEPOT_HEAD_FILE_NUM_LIMIT_MSG, 4));
}
}
try{
depotHeadMapper.updateByPrimaryKeySelective(depotHead);
}catch(Exception e){
JshException.writeFail(logger, e);
}
//如果存在多账户结算需要将原账户的id置空
if(StringUtil.isNotEmpty(depotHead.getAccountIdList())) {
depotHeadMapperEx.setAccountIdToNull(depotHead.getId());