|
|
@@ -67,6 +67,8 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
|
|
|
private CustAramountService custAramountService;
|
|
|
@Autowired
|
|
|
private CustAramountMapper custAramountMapper;
|
|
|
+ @Autowired
|
|
|
+ private CurrencyMapper currencyMapper;
|
|
|
|
|
|
@Override
|
|
|
public PageInfo<CustomerList> getListData(PageRequest page, ListReqDTO req) {
|
|
|
@@ -488,6 +490,23 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
|
|
|
customerDTO.setCu_sellercode(employees.get(0).getEm_code());
|
|
|
customerDTO.setCu_sellername(employees.get(0).getEm_name());
|
|
|
}
|
|
|
+ //验证结算天数
|
|
|
+ Double promise = customerDTO.getCu_promisedays();
|
|
|
+ if (!StringUtils.isEmpty(promise)) {
|
|
|
+ if (promise <= 0 || (promise - promise.intValue() != 0)) {
|
|
|
+ err.append("客户编号为: " + customerDTO.getCu_code() + " 的结算天数: "+ promise +" 不为正整数,请确认数据是否正确");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //币别验证
|
|
|
+ String currency = customerDTO.getCu_currency();
|
|
|
+ if (!StringUtils.isEmpty(currency)) {
|
|
|
+ Integer count = currencyMapper.selectCountByName(currency, BaseContextHolder.getCompanyId());
|
|
|
+ if (count == 0) {
|
|
|
+ err.append("客户编号为: " + customerDTO.getCu_code() + " 的币别: "+ currency +" 在系统中不存在,请确认数据是否正确");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
customerDTO.setCu_status(Status.ENABLE.getDisplay());
|
|
|
customerDTO.setCu_statuscode(Status.ENABLE.name());
|
|
|
//编号不存在
|