|
|
@@ -22,6 +22,7 @@ import com.usoftchina.saas.document.service.CustomerService;
|
|
|
import com.usoftchina.saas.exception.BizException;
|
|
|
import com.usoftchina.saas.page.PageRequest;
|
|
|
import com.usoftchina.saas.utils.BeanMapper;
|
|
|
+import com.usoftchina.saas.utils.RegexpUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -119,7 +120,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
|
|
|
//返回对象
|
|
|
DocBaseDTO baseDTO = null;
|
|
|
Long cu_id = main.getId();
|
|
|
- String cu_code = main.getCu_code();
|
|
|
+ String cu_code = main.getCu_code().trim().toUpperCase();
|
|
|
Customer customer = BeanMapper.map(main,Customer.class);
|
|
|
customer.setCompanyId(companyId);
|
|
|
customer.setCreatorId(userId);
|
|
|
@@ -132,6 +133,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
|
|
|
customer.setCu_leftamount(beginapamount-beginprepayamount+recamount-preamount);
|
|
|
|
|
|
//编号校验
|
|
|
+ cu_code = RegexpUtils.replaceSpecCharacter(cu_code);
|
|
|
cu_code = pushMaxnubmer(cu_code, cu_id);
|
|
|
//单号赋值
|
|
|
customer.setCu_code(cu_code);
|