demand: oms\小程序-订单录入支持录入企业名称、企业税号 oms\小程序-查询订单详情支持查询企业名称、企业税号 oms\小程序-查询客户地址支持查询企业名称、企业税号 oms\小程序-新增/修改客户地址支持新增/修改企业名称、企业税号
committer: heyu
This commit is contained in:
parent
d843ba57f3
commit
3bb0ead3a4
@ -3595,7 +3595,10 @@ public class EmisBaseService {
|
||||
public void checkAdress(EmisCustomerAddress emisCustomerAddressNew) throws EmisBizError {
|
||||
if ("1".equals(emisCustomerAddressNew.getAddressType())) {
|
||||
if ("0086".equals(emisCustomerAddressNew.getCountry())) {
|
||||
if (StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseTaxId()) || StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseName())) {
|
||||
// 检查是否来自OMS
|
||||
boolean fromOms = "1".equals(emisCustomerAddressNew.getParams().get("fromOms"));
|
||||
if (!fromOms && (StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseTaxId())
|
||||
|| StringUtil.isBlank(emisCustomerAddressNew.getEnterpriseName()))) {
|
||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "企业名称/企业税号不能为空");
|
||||
}
|
||||
|
||||
@ -3643,7 +3646,7 @@ public class EmisBaseService {
|
||||
*/
|
||||
public boolean validateEnterpriseName(String enterpriseName) {
|
||||
if (com.xdadan.erp.common.utils.StringUtils.isEmpty(enterpriseName)) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 检查是否包含不允许的字符
|
||||
@ -3668,7 +3671,7 @@ public class EmisBaseService {
|
||||
*/
|
||||
public boolean validateEnterpriseTaxId(String enterpriseTaxId) {
|
||||
if (com.xdadan.erp.common.utils.StringUtils.isEmpty(enterpriseTaxId)) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 检查长度
|
||||
|
||||
@ -2166,6 +2166,11 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
sendAddress.setUseSiteCode(emisWaybillSave.getSendSiteCode());
|
||||
sendAddress.setAddressType("1");
|
||||
sendAddress.setCustomerCode(customerCode);
|
||||
sendAddress.setEnterpriseName(emisWaybillSave.getEnterpriseName());
|
||||
sendAddress.setEnterpriseTaxId(emisWaybillSave.getEnterpriseTaxId());
|
||||
if (emisWaybillSave.getSendCustomerAddressId() != null) {
|
||||
sendAddress.setId(Long.valueOf(emisWaybillSave.getSendCustomerAddressId()));
|
||||
}
|
||||
|
||||
// 收件地址
|
||||
EmisCustomerAddress recieveAddress = new EmisCustomerAddress();
|
||||
@ -2223,7 +2228,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
}
|
||||
|
||||
// 保存客户收件、寄件地址
|
||||
createCustomerAddress(sendAddress);
|
||||
sendAddress.getParams().put("fromOms", "1");
|
||||
createCustomerAddressNew(sendAddress);
|
||||
createCustomerAddress(recieveAddress);
|
||||
|
||||
// 获取泡重比
|
||||
|
||||
Loading…
Reference in New Issue
Block a user