|
|
@@ -1,5 +1,6 @@
|
|
|
package com.fs.company.controller.qw;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
@@ -13,6 +14,7 @@ import com.fs.framework.security.LoginUser;
|
|
|
import com.fs.framework.security.SecurityUtils;
|
|
|
import com.fs.his.domain.FsDoctorPatient;
|
|
|
import com.fs.his.domain.FsPrescribe;
|
|
|
+import com.fs.his.dto.AddressInfoDTO;
|
|
|
import com.fs.his.param.CollectionPhoneParam;
|
|
|
import com.fs.his.param.PrescribePhoneParam;
|
|
|
import com.fs.his.service.IFsDoctorPatientService;
|
|
|
@@ -66,7 +68,7 @@ public class FsCompanyCustomerController extends BaseController {
|
|
|
private IFsDoctorPatientService fsDoctorPatientService;
|
|
|
|
|
|
@Autowired
|
|
|
- private FsUserInformationCollectionServiceImpl informationCollectionService;
|
|
|
+ private IFsUserInformationCollectionService informationCollectionService;
|
|
|
|
|
|
/**
|
|
|
* 查询客户列表
|
|
|
@@ -296,4 +298,30 @@ public class FsCompanyCustomerController extends BaseController {
|
|
|
String appId="wx50bcb040b4963a7e";
|
|
|
return informationCollectionService.getCustomerGenerateQRCode(orderId,appId);
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping(value = "/getAddress")
|
|
|
+ public AjaxResult getAddress(@RequestParam("address") String address)
|
|
|
+ {
|
|
|
+ String kdnAddress = fsCompanyCustomerService.getKdnAddress(address);
|
|
|
+
|
|
|
+ AddressInfoDTO addressInfoDTO = JSON.parseObject(kdnAddress, AddressInfoDTO.class);
|
|
|
+ if (!addressInfoDTO.isSuccess()) {
|
|
|
+ return AjaxResult.error(addressInfoDTO.getReason());
|
|
|
+ }
|
|
|
+ AddressInfoDTO.AddressData data = addressInfoDTO.getData();
|
|
|
+ logger.info("快递鸟返回{}:",kdnAddress);
|
|
|
+ if (data==null){
|
|
|
+ return AjaxResult.error("解析地址失败请输入正确地址");
|
|
|
+ }
|
|
|
+ String provinceName = data.getProvinceName();
|
|
|
+ if (!provinceName.contains("省") && !provinceName.contains("区")){
|
|
|
+ data.setProvinceName(data.getProvinceName()+"市");
|
|
|
+ if (data.getExpAreaName().contains("县")){
|
|
|
+ data.setCityName("县");
|
|
|
+ }else {
|
|
|
+ data.setCityName("市辖区");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return AjaxResult.success(addressInfoDTO);
|
|
|
+ }
|
|
|
}
|