|
@@ -0,0 +1,145 @@
|
|
|
+package com.sooka.service.impl;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.sooka.base.BaseApi;
|
|
|
+import com.sooka.base.BaseService;
|
|
|
+import com.sooka.mapper.Guiji_City_Real_Estate_Mapper;
|
|
|
+import com.sooka.mapper.Guiji_City_Real_Estate_Mapper2;
|
|
|
+import com.sooka.mapper.Guiji_Public_Resource_Mapper;
|
|
|
+import com.sooka.mapper.Guiji_Public_Resource_Mapper2;
|
|
|
+import com.sooka.model.ResultModel;
|
|
|
+import com.sooka.model.bo.*;
|
|
|
+import com.sooka.service.Guiji_Public_Resource_Service;
|
|
|
+import com.sooka.utils.HttpUtil;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class Guiji_Public_Resource_ServiceImpl extends BaseService implements Guiji_Public_Resource_Service {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ Guiji_Public_Resource_Mapper guiji_public_resource_mapper;
|
|
|
+ @Resource
|
|
|
+ Guiji_Public_Resource_Mapper2 guiji_public_resource_mapper2;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResultModel guiji_public_resource_call_for_bid(String str) {
|
|
|
+ ResultModel r = new ResultModel();
|
|
|
+ Map log = new HashMap();
|
|
|
+ try {
|
|
|
+ log.put("operationStatus", "1");
|
|
|
+ log.put("platformInterfacetype", "platform_interfacetype_2");//1 共享 2归集
|
|
|
+ log.put("interfaceinfoId", "0671dc14-994e-418b-9c61-7122b0928005");
|
|
|
+ log.put("interfaceinfoName", "归集-市公共资源-招标公告");
|
|
|
+
|
|
|
+ Guiji_City_Real_Estate1_housing_initial_Bean bean = new Guiji_City_Real_Estate1_housing_initial_Bean();
|
|
|
+ initBaseGuijiBean(str, bean);
|
|
|
+ JSONObject jsonObject = JSON.parseObject(str);
|
|
|
+ bean.setId(jsonObject.getString("id"));
|
|
|
+ JSONObject Data = bean.getData();
|
|
|
+ bean.setStr(str);
|
|
|
+ if (bean.getCd_operation().equals("I")) {
|
|
|
+ guiji_public_resource_mapper.add_guiji_public_resource_call_for_bid(bean);
|
|
|
+ guiji_public_resource_mapper2.add_guiji_public_resource_call_for_bid(bean);
|
|
|
+ } else {
|
|
|
+ guiji_public_resource_mapper.update_guiji_public_resource_call_for_bid(bean);
|
|
|
+ guiji_public_resource_mapper2.update_guiji_public_resource_call_for_bid(bean);
|
|
|
+ }
|
|
|
+ r.setCode(0);
|
|
|
+ r.setMessage("成功");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.put("operationStatus", "0");
|
|
|
+ log.put("exceptionLog", e);
|
|
|
+ e.printStackTrace();
|
|
|
+ r.setCode(99999);
|
|
|
+ r.setMessage("失败");
|
|
|
+ } finally {
|
|
|
+ log.put("param", str);
|
|
|
+ log.put("results", r);
|
|
|
+ HttpUtil.doPost(BaseApi.manager_url + "/system/interfaceLog/addLog", JSONObject.toJSONString(log), null);
|
|
|
+ }
|
|
|
+ return r;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResultModel guiji_public_resource_change_the_bid(String str) {
|
|
|
+ ResultModel r = new ResultModel();
|
|
|
+ Map log = new HashMap();
|
|
|
+ try {
|
|
|
+ log.put("operationStatus", "1");
|
|
|
+ log.put("platformInterfacetype", "platform_interfacetype_2");//1 共享 2归集
|
|
|
+ log.put("interfaceinfoId", "5074b30a-4000-4e5e-88af-ef639aac057c");
|
|
|
+ log.put("interfaceinfoName", "归集-市公共资源-变更公告");
|
|
|
+
|
|
|
+ Guiji_City_Real_Estate2_housing_stock_Bean bean = new Guiji_City_Real_Estate2_housing_stock_Bean();
|
|
|
+ initBaseGuijiBean(str, bean);
|
|
|
+ JSONObject jsonObject = JSON.parseObject(str);
|
|
|
+ bean.setId(jsonObject.getString("id"));
|
|
|
+ JSONObject Data = bean.getData();
|
|
|
+ bean.setStr(str);
|
|
|
+ if (bean.getCd_operation().equals("I")) {
|
|
|
+ guiji_public_resource_mapper.add_guiji_public_resource_change_the_bid(bean);
|
|
|
+ guiji_public_resource_mapper2.add_guiji_public_resource_change_the_bid(bean);
|
|
|
+ } else {
|
|
|
+ guiji_public_resource_mapper.update_guiji_public_resource_change_the_bid(bean);
|
|
|
+ guiji_public_resource_mapper2.update_guiji_public_resource_change_the_bid(bean);
|
|
|
+ }
|
|
|
+ r.setCode(0);
|
|
|
+ r.setMessage("成功");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.put("operationStatus", "0");
|
|
|
+ log.put("exceptionLog", e);
|
|
|
+ e.printStackTrace();
|
|
|
+ r.setCode(99999);
|
|
|
+ r.setMessage("失败");
|
|
|
+ } finally {
|
|
|
+ log.put("param", str);
|
|
|
+ log.put("results", r);
|
|
|
+ HttpUtil.doPost(BaseApi.manager_url + "/system/interfaceLog/addLog", JSONObject.toJSONString(log), null);
|
|
|
+ }
|
|
|
+ return r;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResultModel guiji_public_resource_win_the_bid(String str) {
|
|
|
+ ResultModel r = new ResultModel();
|
|
|
+ Map log = new HashMap();
|
|
|
+ try {
|
|
|
+ log.put("operationStatus", "1");
|
|
|
+ log.put("platformInterfacetype", "platform_interfacetype_2");//1 共享 2归集
|
|
|
+ log.put("interfaceinfoId", "cf3ce04f-628f-4d93-b4e4-f27429d3fc18");
|
|
|
+ log.put("interfaceinfoName", "归集-市公共资源-中标公告");
|
|
|
+
|
|
|
+ Guiji_City_Real_Estate3_housing_commercial_Bean bean = new Guiji_City_Real_Estate3_housing_commercial_Bean();
|
|
|
+ initBaseGuijiBean(str, bean);
|
|
|
+ JSONObject jsonObject = JSON.parseObject(str);
|
|
|
+ bean.setId(jsonObject.getString("id"));
|
|
|
+ JSONObject Data = bean.getData();
|
|
|
+ bean.setStr(str);
|
|
|
+ if (bean.getCd_operation().equals("I")) {
|
|
|
+ guiji_public_resource_mapper.add_guiji_public_resource_win_the_bid(bean);
|
|
|
+ guiji_public_resource_mapper2.add_guiji_public_resource_win_the_bid(bean);
|
|
|
+ } else {
|
|
|
+ guiji_public_resource_mapper.update_guiji_public_resource_win_the_bid(bean);
|
|
|
+ guiji_public_resource_mapper2.update_guiji_public_resource_win_the_bid(bean);
|
|
|
+ }
|
|
|
+ r.setCode(0);
|
|
|
+ r.setMessage("成功");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.put("operationStatus", "0");
|
|
|
+ log.put("exceptionLog", e);
|
|
|
+ e.printStackTrace();
|
|
|
+ r.setCode(99999);
|
|
|
+ r.setMessage("失败");
|
|
|
+ } finally {
|
|
|
+ log.put("param", str);
|
|
|
+ log.put("results", r);
|
|
|
+ HttpUtil.doPost(BaseApi.manager_url + "/system/interfaceLog/addLog", JSONObject.toJSONString(log), null);
|
|
|
+ }
|
|
|
+ return r;
|
|
|
+ }
|
|
|
+}
|