|
@@ -65,6 +65,7 @@ import com.fs.his.service.IFsOrderSopLogService;
|
|
|
import com.fs.his.service.IFsPrescribeService;
|
|
import com.fs.his.service.IFsPrescribeService;
|
|
|
import com.fs.his.service.IFsUserWatchService;
|
|
import com.fs.his.service.IFsUserWatchService;
|
|
|
import com.fs.his.utils.ConfigUtil;
|
|
import com.fs.his.utils.ConfigUtil;
|
|
|
|
|
+import com.fs.his.utils.PhoneUtil;
|
|
|
import com.fs.his.vo.*;
|
|
import com.fs.his.vo.*;
|
|
|
import com.fs.his.vo.FsPrescribeVO;
|
|
import com.fs.his.vo.FsPrescribeVO;
|
|
|
import com.fs.hisStore.config.FsErpConfig;
|
|
import com.fs.hisStore.config.FsErpConfig;
|
|
@@ -1645,8 +1646,14 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional
|
|
@Transactional
|
|
|
public R createUserOrder(FsStoreOrderCreateUserParam param) {
|
|
public R createUserOrder(FsStoreOrderCreateUserParam param) {
|
|
|
|
|
+
|
|
|
FsCompanyExternalPayReceipt receipt = null;
|
|
FsCompanyExternalPayReceipt receipt = null;
|
|
|
if (param.getCompanyCustomerId() != null) {
|
|
if (param.getCompanyCustomerId() != null) {
|
|
|
|
|
+ if (param.getPhone() == null) {
|
|
|
|
|
+ return R.error("手机号码不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ String cleanPhone = param.getPhone().replaceAll("[^0-9]", "");
|
|
|
|
|
+
|
|
|
FsCompanyCustomer fsCompanyCustomer = fsCompanyCustomerMapper.selectFsCompanyCustomerById(param.getCompanyCustomerId());
|
|
FsCompanyCustomer fsCompanyCustomer = fsCompanyCustomerMapper.selectFsCompanyCustomerById(param.getCompanyCustomerId());
|
|
|
if (fsCompanyCustomer == null) {
|
|
if (fsCompanyCustomer == null) {
|
|
|
return R.error("客户信息为空,制单失败");
|
|
return R.error("客户信息为空,制单失败");
|
|
@@ -1654,7 +1661,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
param.setUserId(1L);
|
|
param.setUserId(1L);
|
|
|
//保存收货地址
|
|
//保存收货地址
|
|
|
FsUserAddressScrm address = new FsUserAddressScrm();
|
|
FsUserAddressScrm address = new FsUserAddressScrm();
|
|
|
- address.setPhone(param.getPhone());
|
|
|
|
|
|
|
+ address.setPhone(cleanPhone);
|
|
|
address.setRealName(param.getRealName());
|
|
address.setRealName(param.getRealName());
|
|
|
address.setDetail(param.getDetail());
|
|
address.setDetail(param.getDetail());
|
|
|
address.setProvince(param.getProvince());
|
|
address.setProvince(param.getProvince());
|