增加租户界面、单据优化

This commit is contained in:
季圣华
2021-06-01 23:33:00 +08:00
parent 21633c673f
commit 15245791c8
12 changed files with 102 additions and 10 deletions

View File

@@ -531,6 +531,10 @@ public class DepotHeadService {
HttpServletRequest request) throws Exception {
/**处理单据主表数据*/
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
if(StringUtil.isEmpty(depotHead.getAccountIdList()) && depotHead.getAccountId()==null) {
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_ACCOUNT_FAILED_CODE,
String.format(ExceptionConstants.DEPOT_HEAD_ACCOUNT_FAILED_MSG));
}
//判断用户是否已经登录过,登录过不再处理
User userInfo=userService.getCurrentUser();
depotHead.setCreator(userInfo==null?null:userInfo.getId());
@@ -594,6 +598,10 @@ public class DepotHeadService {
BigDecimal preTotalPrice, Long tenantId,HttpServletRequest request)throws Exception {
/**更新单据主表信息*/
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
if(StringUtil.isEmpty(depotHead.getAccountIdList()) && depotHead.getAccountId()==null) {
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_ACCOUNT_FAILED_CODE,
String.format(ExceptionConstants.DEPOT_HEAD_ACCOUNT_FAILED_MSG));
}
if(StringUtil.isNotEmpty(depotHead.getAccountIdList())){
depotHead.setAccountIdList(depotHead.getAccountIdList().replace("[", "").replace("]", "").replaceAll("\"", ""));
}