|
@@ -8,6 +8,7 @@ import com.bz.smart_city.commom.util.HttpRequest;
|
|
|
import com.bz.smart_city.commom.util.JacksonUtil;
|
|
|
import com.bz.smart_city.commom.util.SnowflakeIdWorker;
|
|
|
import com.bz.smart_city.commom.util.UserUtil;
|
|
|
+import com.bz.smart_city.dao.CustomerMapper;
|
|
|
import com.bz.smart_city.dao.DeviceMapper;
|
|
|
import com.bz.smart_city.dao.WaterMeterReplaceLogMapper;
|
|
|
import com.bz.smart_city.dto.AreaDto;
|
|
@@ -19,6 +20,7 @@ import com.bz.smart_city.dto.pay.InstallPlanInputDTO;
|
|
|
import com.bz.smart_city.dto.pay.PayBaseAccountDto;
|
|
|
import com.bz.smart_city.dto.pay.PayBaseConfigDto;
|
|
|
import com.bz.smart_city.entity.Community;
|
|
|
+import com.bz.smart_city.entity.Customer;
|
|
|
import com.bz.smart_city.entity.Device;
|
|
|
import com.bz.smart_city.entity.WaterMeterReplaceLog;
|
|
|
import com.bz.smart_city.service.CommunityService;
|
|
@@ -53,6 +55,8 @@ public class PaySyncDataServiceImpl implements PaySyncDataService {
|
|
|
private PayBaseConfigService payBaseConfigService;
|
|
|
@Resource
|
|
|
DeviceMapper deviceMapper;
|
|
|
+ @Resource
|
|
|
+ private CustomerMapper customerMapper;
|
|
|
@Value("${Sync.Data.Url}")
|
|
|
String SyncUrl;
|
|
|
|
|
@@ -138,6 +142,13 @@ public class PaySyncDataServiceImpl implements PaySyncDataService {
|
|
|
}
|
|
|
installPlanInput.setPlatformType(2);
|
|
|
|
|
|
+ //取客户编号
|
|
|
+ String customerNo= "";
|
|
|
+ Customer customer= customerMapper.findById(loginUser.getCustomerId());
|
|
|
+ if(customer != null && customer.getCustomerNo() != null){
|
|
|
+ customerNo = customer.getCustomerNo();
|
|
|
+ }
|
|
|
+
|
|
|
/* //取客户编号
|
|
|
String customerNo="";
|
|
|
List<PayBaseConfigDto> payBaseConfigDtos = payBaseConfigService.getPrintInfo("CUSTOMER_NO",loginUser.getSiteId(),loginUser.getCustomerId());
|
|
@@ -268,6 +279,7 @@ public class PaySyncDataServiceImpl implements PaySyncDataService {
|
|
|
//调用接口
|
|
|
String url = SyncUrl + "/api/syncData/syncPlan";
|
|
|
try {
|
|
|
+ installPlanInput.setCustomerNo(new Integer(customerNo)); //传客户编号
|
|
|
String json = JacksonUtil.obj2String(installPlanInput);
|
|
|
String result = HttpRequest.doPost(url,json);
|
|
|
AjaxMessage ajaxMessage = JacksonUtil.string2Obj(result,AjaxMessage.class);
|