소스 검색

国家局接口

gaodd 1 년 전
부모
커밋
7bd62ce58f

+ 2 - 2
src/main/java/com/chinaitop/depot/customer/controller/BusinessCustomerController.java

@@ -194,10 +194,10 @@ public class BusinessCustomerController {
194 194
 	@ApiImplicitParams({
195 195
 		@ApiImplicitParam(name = "id", value = "id", paramType = "query")
196 196
 	})
197
-	public Map<String, Object> remove(Integer id) throws JsonParseException, JsonMappingException, IOException {
197
+	public Map<String, Object> remove(Integer id,Integer orgId) throws JsonParseException, JsonMappingException, IOException {
198 198
 		Map<String, Object> modelMap = new HashMap<String, Object>();
199 199
 		if (id != null) {
200
-			customerService.remove(id);
200
+			customerService.remove(id,orgId);
201 201
 		}
202 202
 		modelMap.put("status", "success");
203 203
 		return modelMap;

+ 1 - 1
src/main/java/com/chinaitop/depot/customer/mapper/BusinessCustomerMapper.java

@@ -96,5 +96,5 @@ public interface BusinessCustomerMapper {
96 96
      */
97 97
     int updateByPrimaryKey(BusinessCustomer record);
98 98
 
99
-	Map<String, Object> getKhxxGjjDate(Integer id);
99
+	
100 100
 }

+ 0 - 30
src/main/java/com/chinaitop/depot/customer/mapper/BusinessCustomerMapper.xml

@@ -730,35 +730,5 @@
730 730
     where id = #{id,jdbcType=INTEGER}
731 731
   </update>
732 732
   
733
-  <select id="getKhxxGjjDate" parameterType="java.lang.Integer" resultType="java.util.Map">
734
-  	 
735
-	select 
736
-	a.id id,
737
-	dw.dwdm dwdm,
738
-	dw.tydwbm tydwbm,
739
-	org.kqbm kqdm,
740
-	org.tykqbm tykqbm, 
741
-	case a.classify when '3152' then '2' else '1' end khlx,
742
-	case a.classify when '3152' then a.identification else a.social_credit_code end khtyshxydmhsfzh,
743
-	a.name khmc	,
744
-	case a.classify when '3153' then a.legal_person else '' end fddbr,
745
-	e1.enumname || e2.enumname || e3.enumname || a.address txdz	,
746
-	a.yzbm yzbm	,
747
-	a.linkman lxrxm	,
748
-	case a.classify when '3152' then a.mobile else a.enterprise_phone end lxrdh,
749
-	a.lxrsfzh lxrsfzh,
750
-	a.email dzyx	,
751
-	e4.gbcode khfkhh	,
752
-	a.account_number khfzh	,
753
-	DATE_FORMAT(a.updatetime, '%Y-%m-%d %H:%i:%s') zhgxsj
754
-	from business_customer a 
755
-	left join org_info org on org.org_id=a.org_id
756
-	left join basic_enum e1 on e1.enumid=a.province
757
-	left join basic_enum e2 on e2.enumid=a.city
758
-	left join basic_enum e3 on e3.enumid=a.county
759
-	left join basic_enum e4 on e4.enumid=a.bank_name
760
-	left join province_all.biz_unit_info dw on dw.id = org.unit_info_id
761
-	where a.classify=3153 and ifnull(social_credit_code,'')!='' and a.sfwz=0 and a.id = #{id};
762 733
   
763
-  </select>
764 734
 </mapper>

+ 1 - 1
src/main/java/com/chinaitop/depot/customer/service/BusinessCustomerService.java

@@ -18,7 +18,7 @@ public interface BusinessCustomerService {
18 18
 	
19 19
 	void update(BusinessCustomer customer);
20 20
 	
21
-	void remove(Integer id);
21
+	void remove(Integer id,Integer orgId);
22 22
 
23 23
     /**
24 24
      * 加入黑名单.

+ 17 - 28
src/main/java/com/chinaitop/depot/customer/service/impl/BusinessCustomerServiceImpl.java

@@ -63,10 +63,10 @@ public class BusinessCustomerServiceImpl implements BusinessCustomerService {
63 63
 	}
64 64
 
65 65
 	@Override
66
-	public void remove(Integer id) {
66
+	public void remove(Integer id,Integer orgId) {
67 67
 		customerMapper.deleteByPrimaryKey(id);
68 68
 		
69
-		this.sxtgjjjk(id,id,"d");
69
+		this.sxtgjjjk(id,orgId,"d");
70 70
 
71 71
 	}
72 72
 
@@ -195,35 +195,24 @@ public class BusinessCustomerServiceImpl implements BusinessCustomerService {
195 195
 	
196 196
 	
197 197
 	/**
198
-   	 * 摄像头国家局数据
198
+   	 * 客户国家局数据
199 199
    	 */
200 200
        public void sxtgjjjk(Integer id, Integer orgId,String czbz) {
201 201
            
202
-   		Map<String, Object>  gjjMap = customerMapper.getKhxxGjjDate(id);
203
-   		gjjMap.put("czbz",czbz);
204
-   		gjjMap.put("is_upload", 0);
205
-   		String tableName = "ODS_UP_KHXXJK";
206
-   		
207
-   		/**
208
-            * restTemplate调用
209
-            */
210
-           //String url = "http://localhost:9022/recPublish/sendMessage";//
211
-           // 发送post请求,并打印结果,以String类型接收响应结果JSON字符串
212
-           MultiValueMap<String, Object> sendMap = new LinkedMultiValueMap<>();
213
-   		//Map<String, Object>  sendMap = new HashMap<String, Object>();
214
-           ObjectMapper objectMapper = new ObjectMapper();
215
-           String jsonMap;
216
-           try {
217
-   			 jsonMap = objectMapper.writeValueAsString(gjjMap);
218
-   			 sendMap.add("gjjMapJson",jsonMap);
219
-   		} catch (JsonProcessingException e) {
220
-   			// TODO Auto-generated catch block
221
-   			e.printStackTrace();
222
-   		}
223
-   		sendMap.add("tableName", tableName);
224
-   		sendMap.add("orgId",orgId);
225
-
226
-          String result = (String) restTemplate.postForObject(jsgjjsjUrl, sendMap, String.class);
202
+         String tableName = "ODS_UP_KHXXJK";
203
+  		/**
204
+           * restTemplate调用
205
+           */
206
+          //String url = "http://localhost:9022/recPublish/sendMessage";//
207
+          //发送post请求,并打印结果,以String类型接收响应结果JSON字符串
208
+  		
209
+          MultiValueMap<String, Object> sendMap = new LinkedMultiValueMap<>();
210
+  		sendMap.add("tableName", tableName);
211
+  		sendMap.add("czbz", czbz);
212
+  		sendMap.add("ywId", id);
213
+  		sendMap.add("orgId", orgId);
214
+
215
+          restTemplate.postForObject(jsgjjsjUrl, sendMap, String.class);
227 216
        }
228 217
 
229 218
 }