WMS3.9号修改
This commit is contained in:
+6
-3
@@ -144,8 +144,11 @@ public class CostCalculationApplicationService {
|
||||
throw new ServiceException("单据类型未找到");
|
||||
}
|
||||
//遍历费用科目取出对应配置的费用科目项
|
||||
AjaxResult expenseAccountAjax = systemServiceFeign.getSubInfoByCode2(costCalculationDTO.getSubjectCode(),costCalculationDTO.getTopOrganizationId());
|
||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))) {
|
||||
if (costCalculationDTO.getTopOrganizationId() == null) {
|
||||
throw new ServiceException("组织信息不能为空,无法查询费用科目");
|
||||
}
|
||||
AjaxResult expenseAccountAjax = systemServiceFeign.getSubInfoByCode2(costCalculationDTO.getSubjectCode(), costCalculationDTO.getTopOrganizationId());
|
||||
if (!"200".equals(String.valueOf(expenseAccountAjax.get("code")))) {
|
||||
throw new ServiceException("费用科目不存在或已被删除");
|
||||
}
|
||||
ExpenseAccountPO expenseAccountPO = JSON.parseObject(JSONObject.toJSONString(expenseAccountAjax.get("data")), ExpenseAccountPO.class);
|
||||
@@ -166,7 +169,7 @@ public class CostCalculationApplicationService {
|
||||
taskFlowRecordsDO.setSecondSubjectName(expenseAccountPO.getSubjectName());
|
||||
}
|
||||
if(null == contractManageDetailPO){
|
||||
throw new ServiceException("合同中不包含该费用科目的计费策略,请查正后重试");
|
||||
throw new ServiceException("合同中不包含该费用科目的计费策略,请查证后重试");
|
||||
}
|
||||
//根据计费策略查询计费规则信息
|
||||
BillingRulesPO billingRulesPO = billingRulesDomainService.getInfo(contractManageDetailPO.getAccountingStrategyId());
|
||||
|
||||
@@ -24,6 +24,7 @@ import javax.annotation.Resource;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
|
||||
/**
|
||||
* 业务单据Api
|
||||
@@ -70,8 +71,10 @@ public class BusinessDocumentApi extends BaseController{
|
||||
}else {
|
||||
return toAjax(businessDocumentApplicationService.insert(businessDocumentDO));
|
||||
}
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error("保存业务单据失败" +e.getMessage());
|
||||
} catch (ServiceException e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
} catch (Exception e){
|
||||
return AjaxResult.error("保存业务单据失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user