|
@@ -1,9 +1,13 @@
|
|
|
package com.zcxk.rmcp.web.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
import com.zcxk.core.common.pojo.AjaxMessage;
|
|
|
+import com.zcxk.rmcp.api.dto.install.InstallPlanDataDto;
|
|
|
import com.zcxk.rmcp.api.dto.install.InstallPlanInputDto;
|
|
|
import com.zcxk.rmcp.api.dto.install.MeterSyncDto;
|
|
|
import com.zcxk.rmcp.api.dto.install.MeterSyncInputDto;
|
|
|
+import com.zcxk.rmcp.api.feign.SyncDataClient;
|
|
|
import com.zcxk.rmcp.core.dao.DeviceMapper;
|
|
|
import com.zcxk.rmcp.web.logAdvice.LogAnnotation;
|
|
|
import com.zcxk.rmcp.web.service.install.InstallPlanService;
|
|
@@ -34,6 +38,8 @@ public class SyncDataApi {
|
|
|
private InstallPlanService installPlanService;
|
|
|
@Autowired
|
|
|
private DeviceMapper deviceMapper;
|
|
|
+ @Autowired
|
|
|
+ private SyncDataClient syncDataClient;
|
|
|
|
|
|
@ResponseBody
|
|
|
@PostMapping("syncPlan")
|
|
@@ -54,5 +60,40 @@ public class SyncDataApi {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("test")
|
|
|
+ public void test(){
|
|
|
+ InstallPlanInputDto dto = new InstallPlanInputDto();
|
|
|
+ dto.setTenantId("487170559310123008");
|
|
|
+ dto.setPlanName("测试");
|
|
|
+ dto.setCommunityId(10);
|
|
|
+ dto.setCompanyOrgId(443);
|
|
|
+ dto.setDeptOrgId(0);
|
|
|
+ dto.setProductId(1);
|
|
|
+ dto.setUnit("单元");
|
|
|
+ dto.setPrincipal("");
|
|
|
+ dto.setPhone("18588888888");
|
|
|
+ dto.setEnableUnit(0);
|
|
|
+ dto.setRemark("");
|
|
|
+ dto.setAdrress("地址");
|
|
|
+
|
|
|
+
|
|
|
+ InstallPlanDataDto b = new InstallPlanDataDto("建筑1");
|
|
|
+
|
|
|
+ InstallPlanDataDto u = new InstallPlanDataDto("单元1");
|
|
|
+ b.setChildren(Lists.newArrayList(u));
|
|
|
+
|
|
|
+ InstallPlanDataDto f = new InstallPlanDataDto("楼层1");
|
|
|
+ u.setChildren(Lists.newArrayList(f));
|
|
|
+
|
|
|
+ InstallPlanDataDto a = new InstallPlanDataDto("A1111","846164169");
|
|
|
+ f.setChildren(Lists.newArrayList(a));
|
|
|
+
|
|
|
+
|
|
|
+ dto.setInstallPlanDataList(Lists.newArrayList(b));
|
|
|
+
|
|
|
+ syncDataClient.syncPlan(dto);
|
|
|
+ System.out.println("====================================="+ JSON.toJSONString(dto));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|