| | |
| | | if (StringUtils.isEmpty(contractNo)) { |
| | | continue; |
| | | } |
| | | if (contractNo.length() > 50) { |
| | | return AjaxResult.error("销售单号【" + contractNo + "】长度不能超过50个字符"); |
| | | } |
| | | if (!importContractNos.add(contractNo)) { |
| | | duplicateContractNos.add(contractNo); |
| | | } |
| | |
| | | .map(SysUser::getUserId) |
| | | .orElse(null); |
| | | if (aLong == null) |
| | | throw new RuntimeException("录入人:" + salesLedger.getEntryPerson() + ",无对应用户!"); |
| | | throw new RuntimeException("录入人:" + salesLedger.getEntryPerson() + ",无对应用户!请填写系统用户的昵称(不是登录账号)"); |
| | | salesLedger.setEntryPerson(aLong.toString()); |
| | | // 销售产品数据绑定,通过销售单号获取对应销售产品数据 |
| | | List<SalesLedgerProductImportDto> salesLedgerProductImportDtos = salesLedgerProductImportDtoList.stream() |
| | |
| | | // 3. 销售合同号唯一校验(支持字母、数字及特殊字符,不做字符集限制) |
| | | String contractNo = StringUtils.trim(salesLedger.getSalesContractNo()); |
| | | if (StringUtils.isNotEmpty(contractNo)) { |
| | | if (contractNo.length() > 50) { |
| | | throw new BaseException("销售合同号长度不能超过50个字符"); |
| | | } |
| | | checkSalesContractNoUnique(contractNo, salesLedger.getId()); |
| | | salesLedger.setSalesContractNo(contractNo); |
| | | } |