Browse Source

市医药 四个接口

wangzhe 2 years ago
parent
commit
f2873dcabe

+ 43 - 0
test-api/src/main/java/com/sooka/api/Guiji_Hlw_Test.java

@@ -0,0 +1,43 @@
+package com.sooka.api;
+
+
+import com.sooka.base.BaseApi;
+import com.sooka.model.ResultModel;
+import com.sooka.service.Guiji_Housingconstruction_Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+@Path("/")
+@Configuration      //1.主要用于标记配置类,兼备Component的效果。
+@EnableScheduling
+public class Guiji_Hlw_Test extends BaseApi {
+
+    @Autowired
+    Guiji_Housingconstruction_Service guiji_housingconstruction_service;
+
+
+    //互联网测试
+    @POST
+    @Path("/hlw_test")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel yhjbxx(String str) {
+        System.out.println("hlw_test:" + str);
+        ResultModel r = new ResultModel();
+        try {
+            r.setCode(00000);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            r.setCode(99999);
+            r.setMessage("失败" + e.getMessage());
+        }
+        return r;
+    }
+}

+ 209 - 0
test-api/src/main/java/com/sooka/api/Guiji_Medicine.java

@@ -0,0 +1,209 @@
+package com.sooka.api;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.sooka.base.BaseApi;
+import com.sooka.model.ResultModel;
+import com.sooka.service.Guiji_Medicine_Service;
+import com.sooka.utils.HttpUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+@Path("/")
+@Configuration      //1.主要用于标记配置类,兼备Component的效果。
+@EnableScheduling
+public class Guiji_Medicine extends BaseApi {
+
+    @Autowired
+    Guiji_Medicine_Service guiji_medicine_service;
+
+
+    //-----------------------------市医食药接口--------------------------------------------------
+
+    /**
+     * 通化部门数据 - 种植采集数据 (互联网)
+     */
+    @POST
+    @Path("/guiji_medicine_dept_data_plant")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_dept_data_plant(String str) {
+        System.out.println("A guiji_medicine_dept_data:" + str);
+        ResultModel r = new ResultModel();
+        try {
+            HttpUtil.doPost(forward_url + "/api/guiji_medicine_dept_data_plant_forward", str, null);
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            r.setCode(99999);
+            r.setMessage("失败" + e.getMessage());
+        }
+        return r;
+    }
+
+    /**
+     * 通化部门数据 - 种植采集数据 (内网)
+     */
+    @POST
+    @Path("/guiji_medicine_dept_data_plant_forward")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_dept_data_forward(String str) {
+        System.out.println("B guiji_medicine_dept_data_plant_forward:" + str);
+        ResultModel r = guiji_medicine_service.guiji_medicine_dept_data(str);
+        return r;
+    }
+
+    /**
+     * 通化部门数据 - 平台采集 (互联网)
+     */
+    @POST
+    @Path("/guiji_medicine_dept_data_platform")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_dept_data_platform(String str) {
+        System.out.println("A guiji_medicine_dept_data_platform:" + str);
+        ResultModel r = new ResultModel();
+        try {
+            HttpUtil.doPost(forward_url + "/api/guiji_medicine_dept_data_platform_forward", str, null);
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            r.setCode(99999);
+            r.setMessage("失败" + e.getMessage());
+        }
+        return r;
+    }
+
+    /**
+     * 通化部门数据 - 平台采集 (内网)
+     */
+    @POST
+    @Path("/guiji_medicine_dept_data_platform_forward")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_dept_data_platform_forward(String str) {
+        System.out.println("B guiji_medicine_dept_data_platform_forward:" + str);
+        ResultModel r = guiji_medicine_service.guiji_medicine_dept_data2(str);
+        return r;
+    }
+
+    /**
+     * 通化部门数据 - 项目采集 (互联网)
+     */
+    @POST
+    @Path("/guiji_medicine_dept_data_project")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_dept_data_project(String str) {
+        System.out.println("A guiji_medicine_dept_data_project:" + str);
+        ResultModel r = new ResultModel();
+        try {
+            HttpUtil.doPost(forward_url + "/api/guiji_medicine_dept_data_project_forward", str, null);
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            r.setCode(99999);
+            r.setMessage("失败" + e.getMessage());
+        }
+        return r;
+    }
+
+    /**
+     * 通化部门数据 - 项目采集 (内网)
+     */
+    @POST
+    @Path("/guiji_medicine_dept_data_project_forward")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_dept_data_project_forward(String str) {
+        System.out.println("B guiji_medicine_dept_data_project_forward:" + str);
+        ResultModel r = guiji_medicine_service.guiji_medicine_dept_data3(str);
+        return r;
+    }
+
+    /**
+     * 通化部门数据 - 规上工业经济数据 (互联网)
+     */
+    @POST
+    @Path("/guiji_medicine_dept_data_industry")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_dept_data_industry(String str) {
+        System.out.println("A guiji_medicine_dept_data_industry:" + str);
+        ResultModel r = new ResultModel();
+        try {
+            HttpUtil.doPost(forward_url + "/api/guiji_medicine_dept_data_industry_forward", str, null);
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            r.setCode(99999);
+            r.setMessage("失败" + e.getMessage());
+        }
+        return r;
+    }
+
+    /**
+     * 通化部门数据 - 规上工业经济数据 (内网)
+     */
+    @POST
+    @Path("/guiji_medicine_dept_data_industry_forward")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_dept_data_industry_forward(String str) {
+        System.out.println("B guiji_medicine_dept_data_industry_forward:" + str);
+        ResultModel r = guiji_medicine_service.guiji_medicine_dept_data4(str);
+        return r;
+    }
+
+    @POST
+    @Path("/guiji_medicine_test")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_test(String str) {
+        System.out.println("A guiji_medicine_test:" + str);
+        ResultModel r = new ResultModel();
+        try {
+            HttpUtil.doPost(forward_url + "/api/guiji_medicine_test_forward", str, null);
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            r.setCode(99999);
+            r.setMessage("失败" + e.getMessage());
+        }
+        return r;
+    }
+
+    @POST
+    @Path("/guiji_medicine_test_forward")
+    // 指定请求与返回的相应体为JSON
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public ResultModel guiji_medicine_test_forward(String str) {
+        System.out.println("B guiji_medicine_test_forward:" + str);
+        ResultModel r = guiji_medicine_service.add_medicine_test1(str);
+        return r;
+    }
+
+}

+ 27 - 0
test-api/src/main/java/com/sooka/mapper/Guiji_Medicine_Mapper.java

@@ -0,0 +1,27 @@
+package com.sooka.mapper;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.sooka.model.bo.*;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+@DS("db1")
+public interface Guiji_Medicine_Mapper {
+
+    public void add_guiji_medicine_dept_data(Guiji_medicine_dept_data_Bean bean);
+    public void update_guiji_medicine_dept_data(Guiji_medicine_dept_data_Bean bean);
+
+    public void add_guiji_medicine_dept_data2(Guiji_medicine_dept_data2_Bean bean);
+    public void update_guiji_medicine_dept_data2(Guiji_medicine_dept_data2_Bean bean);
+
+    public void add_guiji_medicine_dept_data3(Guiji_medicine_dept_data3_Bean bean);
+    public void update_guiji_medicine_dept_data3(Guiji_medicine_dept_data3_Bean bean);
+
+    public void add_guiji_medicine_dept_data4(Guiji_medicine_dept_data4_Bean bean);
+    public void update_guiji_medicine_dept_data4(Guiji_medicine_dept_data4_Bean bean);
+
+    public void add_guiji_test(Guiji_medicine_test_Bean bean);
+    public void update_guiji_test(Guiji_medicine_test_Bean bean);
+
+
+}

+ 27 - 0
test-api/src/main/java/com/sooka/mapper/Guiji_Medicine_Mapper2.java

@@ -0,0 +1,27 @@
+package com.sooka.mapper;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.sooka.model.bo.*;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+@DS("db1")
+public interface Guiji_Medicine_Mapper2 {
+
+    public void add_guiji_medicine_dept_data(Guiji_medicine_dept_data_Bean bean);
+    public void update_guiji_medicine_dept_data(Guiji_medicine_dept_data_Bean bean);
+
+    public void add_guiji_medicine_dept_data2(Guiji_medicine_dept_data2_Bean bean);
+    public void update_guiji_medicine_dept_data2(Guiji_medicine_dept_data2_Bean bean);
+
+    public void add_guiji_medicine_dept_data3(Guiji_medicine_dept_data3_Bean bean);
+    public void update_guiji_medicine_dept_data3(Guiji_medicine_dept_data3_Bean bean);
+
+    public void add_guiji_medicine_dept_data4(Guiji_medicine_dept_data4_Bean bean);
+    public void update_guiji_medicine_dept_data4(Guiji_medicine_dept_data4_Bean bean);
+
+    public void add_guiji_test(Guiji_medicine_test_Bean bean);
+    public void update_guiji_test(Guiji_medicine_test_Bean bean);
+
+
+}

+ 14 - 0
test-api/src/main/java/com/sooka/service/Guiji_Medicine_Service.java

@@ -0,0 +1,14 @@
+package com.sooka.service;
+
+import com.sooka.model.ResultModel;
+import com.sooka.model.bo.Guiji_housingconstruction_yhjjxx_Bean;
+
+public interface Guiji_Medicine_Service {
+
+    public ResultModel guiji_medicine_dept_data(String str);
+    public ResultModel guiji_medicine_dept_data2(String str);
+    public ResultModel guiji_medicine_dept_data3(String str);
+    public ResultModel guiji_medicine_dept_data4(String str);
+    public ResultModel add_medicine_test1(String str);
+
+}

+ 224 - 0
test-api/src/main/java/com/sooka/service/impl/Guiji_Medicine_ServiceImpl.java

@@ -0,0 +1,224 @@
+package com.sooka.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.sooka.base.BaseService;
+import com.sooka.mapper.Guiji_Housingconstruction_Mapper;
+import com.sooka.mapper.Guiji_Housingconstruction_Mapper2;
+import com.sooka.mapper.Guiji_Medicine_Mapper;
+import com.sooka.mapper.Guiji_Medicine_Mapper2;
+import com.sooka.model.ResultModel;
+import com.sooka.model.bo.*;
+import com.sooka.service.Guiji_Housingconstruction_Service;
+import com.sooka.service.Guiji_Medicine_Service;
+import com.sooka.utils.UnicodeUtil;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+@Service
+public class Guiji_Medicine_ServiceImpl extends BaseService implements Guiji_Medicine_Service {
+
+
+    @Resource
+    Guiji_Medicine_Mapper guiji_medicine_mapper;
+    @Resource
+    Guiji_Medicine_Mapper2 guiji_medicine_mapper2;
+
+    @Override
+    public ResultModel guiji_medicine_dept_data(String str) {
+        ResultModel r = new ResultModel();
+        try {
+            Guiji_medicine_dept_data_Bean bean = new Guiji_medicine_dept_data_Bean();
+            initBaseGuijiBean(str, bean);
+
+            JSONObject Data = bean.getData();
+            System.out.println(Data+"=Data");
+            bean.setStr(str);
+            bean.setId(Data.getString("id"));
+            bean.setPlantName(Data.getString("plantName"));
+            bean.setPlantAddress(Data.getString("plantAddress"));
+            bean.setPlantHectare(Data.getString("plantHectare"));
+            bean.setProduceTons(Data.getString("produceTons"));
+            bean.setProduceValue(Data.getString("produceValue"));
+            bean.setPlantYear(Data.getString("plantYear"));
+//            bean.setEvent_laliyuan(Data.getString("event_laliyuan"));
+//            guiji_medicine_mapper.add_guiji_medicine_dept_data(bean);
+//            guiji_medicine_mapper2.add_guiji_medicine_dept_data(bean);
+            if (bean.getCd_operation().equals("I")) {
+                guiji_medicine_mapper.add_guiji_medicine_dept_data(bean);
+                guiji_medicine_mapper2.add_guiji_medicine_dept_data(bean);
+            } else {
+                guiji_medicine_mapper.update_guiji_medicine_dept_data(bean);
+                guiji_medicine_mapper2.update_guiji_medicine_dept_data(bean);
+            }
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            e.printStackTrace();
+            r.setCode(99999);
+            r.setMessage("失败");
+
+        }
+        return r;
+    }
+
+    @Override
+    public ResultModel guiji_medicine_dept_data2(String str) {
+        ResultModel r = new ResultModel();
+        try {
+            Guiji_medicine_dept_data2_Bean bean = new Guiji_medicine_dept_data2_Bean();
+            initBaseGuijiBean(str, bean);
+
+            JSONObject Data = bean.getData();
+            System.out.println(Data+"=Data");
+            bean.setStr(str);
+            bean.setId(Data.getString("id"));
+            bean.setPlatformName(Data.getString("platformName"));
+            bean.setConstructingUnit(Data.getString("constructingUnit"));
+            bean.setConstructingDate(Data.getString("constructingDate"));
+            bean.setPlatformAddress(Data.getString("platformAddress"));
+            bean.setPlatformAddressExt(Data.getString("platformAddressExt"));
+            bean.setPlatformLevel(Data.getString("platformLevel"));
+            bean.setPlatformType(Data.getString("platformType"));
+//            bean.setEvent_laliyuan(Data.getString("event_laliyuan"));
+//            guiji_medicine_mapper.add_guiji_medicine_dept_data2(bean);
+//            guiji_medicine_mapper2.add_guiji_medicine_dept_data2(bean);
+            if (bean.getCd_operation().equals("I")) {
+                guiji_medicine_mapper.add_guiji_medicine_dept_data2(bean);
+                guiji_medicine_mapper2.add_guiji_medicine_dept_data2(bean);
+            } else {
+                guiji_medicine_mapper.update_guiji_medicine_dept_data2(bean);
+                guiji_medicine_mapper2.update_guiji_medicine_dept_data2(bean);
+            }
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            e.printStackTrace();
+            r.setCode(99999);
+            r.setMessage("失败");
+
+        }
+        return r;
+    }
+
+    @Override
+    public ResultModel guiji_medicine_dept_data3(String str) {
+        ResultModel r = new ResultModel();
+        try {
+            Guiji_medicine_dept_data3_Bean bean = new Guiji_medicine_dept_data3_Bean();
+            initBaseGuijiBean(str, bean);
+
+            JSONObject Data = bean.getData();
+            System.out.println(Data+"=Data");
+            bean.setStr(str);
+            bean.setId(Data.getString("id"));
+            bean.setProjectName(Data.getString("projectName"));
+            bean.setProjectOrgName(Data.getString("projectOrgName"));
+            bean.setProjectAddress(Data.getString("projectAddress"));
+            bean.setProjectStatus(Data.getString("projectStatus"));
+            bean.setProjectTotalInvestment(Data.getString("projectTotalInvestment"));
+            bean.setProjectStart(Data.getString("projectStart"));
+            bean.setProjectEnd(Data.getString("projectEnd"));
+//            bean.setEvent_laliyuan(Data.getString("event_laliyuan"));
+//            guiji_medicine_mapper.add_guiji_medicine_dept_data3(bean);
+//            guiji_medicine_mapper2.add_guiji_medicine_dept_data3(bean);
+            if (bean.getCd_operation().equals("I")) {
+                guiji_medicine_mapper.add_guiji_medicine_dept_data3(bean);
+                guiji_medicine_mapper2.add_guiji_medicine_dept_data3(bean);
+            } else {
+                guiji_medicine_mapper.update_guiji_medicine_dept_data3(bean);
+                guiji_medicine_mapper2.update_guiji_medicine_dept_data3(bean);
+            }
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            e.printStackTrace();
+            r.setCode(99999);
+            r.setMessage("失败");
+
+        }
+        return r;
+    }
+
+    @Override
+    public ResultModel guiji_medicine_dept_data4(String str) {
+        ResultModel r = new ResultModel();
+        try {
+            Guiji_medicine_dept_data4_Bean bean = new Guiji_medicine_dept_data4_Bean();
+            initBaseGuijiBean(str, bean);
+
+            JSONObject Data = bean.getData();
+            System.out.println(Data+"=Data");
+            bean.setStr(str);
+            bean.setId(Data.getString("id"));
+            bean.setYear(Data.getString("year"));
+            bean.setMonth(Data.getString("month"));
+            bean.setEconomyType(Data.getString("economyType"));
+            bean.setNumber(Data.getString("number"));
+            bean.setYearOnYear(Data.getString("yearOnYear"));
+            bean.setCityProportion(Data.getString("cityProportion"));
+//            bean.setEvent_laliyuan(Data.getString("event_laliyuan"));
+//            guiji_medicine_mapper.add_guiji_medicine_dept_data4(bean);
+//            guiji_medicine_mapper2.add_guiji_medicine_dept_data4(bean);
+            if (bean.getCd_operation().equals("I")) {
+                guiji_medicine_mapper.add_guiji_medicine_dept_data4(bean);
+                guiji_medicine_mapper2.add_guiji_medicine_dept_data4(bean);
+            } else {
+                guiji_medicine_mapper.update_guiji_medicine_dept_data4(bean);
+                guiji_medicine_mapper2.update_guiji_medicine_dept_data4(bean);
+            }
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            e.printStackTrace();
+            r.setCode(99999);
+            r.setMessage("失败");
+
+        }
+        return r;
+    }
+
+    @Override
+    public ResultModel add_medicine_test1(String str) {
+        ResultModel r = new ResultModel();
+        try {
+            Guiji_medicine_test_Bean bean = new Guiji_medicine_test_Bean();
+            initBaseGuijiBean(str, bean);
+
+            JSONObject Data = bean.getData();
+            System.out.println(Data+"=Data");
+            bean.setEvent_title(Data.getString("event_title"));
+            bean.setEvent_laliyuan(Data.getString("event_laliyuan"));
+            bean.setEvent_position_j(Data.getString("event_position_j"));
+            bean.setEvent_position_w(Data.getString("event_position_w"));
+//            bean.setEvent_file_array(Data.getString("event_file_array"));
+            bean.setEvent_content(Data.getString("event_content"));
+            guiji_medicine_mapper.add_guiji_test(bean);
+            guiji_medicine_mapper2.add_guiji_test(bean);
+//            if (bean.getCd_operation().equals("I")) {
+//                guiji_medicine_mapper.add_guiji_test(bean);
+//                guiji_medicine_mapper2.add_guiji_test(bean);
+//            } else {
+//                guiji_medicine_mapper.update_guiji_test(bean);
+//                guiji_medicine_mapper2.update_guiji_test(bean);
+//            }
+            r.setCode(0);
+            r.setMessage("成功");
+        } catch (Exception e) {
+            e.printStackTrace();
+            r.setCode(99999);
+            r.setMessage("失败");
+
+        }
+        return r;
+    }
+
+}

+ 204 - 0
test-api/src/main/resources/mapper/Guiji_Medicine_Mapper.xml

@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.sooka.mapper.Guiji_Medicine_Mapper">
+
+    <sql id="global_name">
+        id,create_time,cd_time,cd_batch,cd_operation,cd_source,
+    </sql>
+    <sql id="global_value">
+        #{id},now(),#{cd_time},#{cd_batch},#{cd_operation},#{cd_source},
+    </sql>
+
+    <sql id="update_sql">
+        create_time = now(),cd_batch = #{cd_batch},cd_operation = #{cd_operation},cd_source =#{cd_source},
+    </sql>
+
+    <insert id="add_guiji_medicine_dept_data" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
+        insert into t_guiji_medicine_plant (
+        <include refid="global_name"></include>
+        plantName, plantAddress, plantHectare, produceTons, produceValue, plantYear)
+        values (
+        <include refid="global_value"></include>
+        #{plantName}, #{plantAddress}, #{plantHectare}, #{produceTons}, #{produceValue}, #{plantYear})
+    </insert>
+
+    <update id="update_guiji_medicine_dept_data" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
+        update t_guiji_medicine_plant
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="plantName != null and plantName != ''">
+                plantName = #{plantName},
+            </if>
+            <if test="plantAddress != null and plantAddress != ''">
+                plantAddress = #{plantAddress},
+            </if>
+            <if test="plantHectare != null and plantHectare != ''">
+                plantHectare = #{plantHectare},
+            </if>
+            <if test="produceTons != null and produceTons != ''">
+                produceTons = #{produceTons},
+            </if>
+            <if test="produceValue != null and produceValue != ''">
+                produceValue = #{produceValue},
+            </if>
+            <if test="plantYear != null and plantYear != ''">
+                plantYear = #{plantYear},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+    <insert id="add_guiji_medicine_dept_data2" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
+        insert into t_guiji_medicine_platform (
+        <include refid="global_name"></include>
+        platformName, constructingUnit, constructingDate, platformAddress, platformAddressExt, platformLevel, platformType)
+        values (
+        <include refid="global_value"></include>
+        #{platformName}, #{constructingUnit}, #{constructingDate}, #{platformAddress}, #{platformAddressExt}, #{platformLevel}, #{platformType})
+    </insert>
+
+    <update id="update_guiji_medicine_dept_data2" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
+        update t_guiji_medicine_platform
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="platformName != null and platformName != ''">
+                platformName = #{platformName},
+            </if>
+            <if test="constructingUnit != null and constructingUnit != ''">
+                constructingUnit = #{constructingUnit},
+            </if>
+            <if test="constructingDate != null and constructingDate != ''">
+                constructingDate = #{constructingDate},
+            </if>
+            <if test="platformAddress != null and platformAddress != ''">
+                platformAddress = #{platformAddress},
+            </if>
+            <if test="platformAddressExt != null and platformAddressExt != ''">
+                platformAddressExt = #{platformAddressExt},
+            </if>
+            <if test="platformLevel != null and platformLevel != ''">
+                platformLevel = #{platformLevel},
+            </if>
+            <if test="platformType != null and platformType != ''">
+                platformType = #{platformType},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+    <insert id="add_guiji_medicine_dept_data3" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean">
+        insert into t_guiji_medicine_project (
+        <include refid="global_name"></include>
+        projectName, projectOrgName, projectAddress, projectStatus, projectTotalInvestment, projectStart, projectEnd)
+        values (
+        <include refid="global_value"></include>
+        #{projectName}, #{projectOrgName}, #{projectAddress}, #{projectStatus}, #{projectTotalInvestment}, #{projectStart}, #{projectEnd})
+    </insert>
+
+    <update id="update_guiji_medicine_dept_data3" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
+        update t_guiji_medicine_project
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="projectName != null and projectName != ''">
+                projectName = #{projectName},
+            </if>
+            <if test="projectOrgName != null and projectOrgName != ''">
+                projectOrgName = #{projectOrgName},
+            </if>
+            <if test="projectAddress != null and projectAddress != ''">
+                projectAddress = #{projectAddress},
+            </if>
+            <if test="projectStatus != null and projectStatus != ''">
+                projectStatus = #{projectStatus},
+            </if>
+            <if test="projectTotalInvestment != null and projectTotalInvestment != ''">
+                projectTotalInvestment = #{projectTotalInvestment},
+            </if>
+            <if test="projectStart != null and projectStart != ''">
+                projectStart = #{projectStart},
+            </if>
+            <if test="projectEnd != null and projectEnd != ''">
+                projectEnd = #{projectEnd},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+    <insert id="add_guiji_medicine_dept_data4" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean">
+        insert into t_guiji_medicine_industry (
+        <include refid="global_name"></include>
+        year, month, economyType, number, yearOnYear, cityProportion)
+        values (
+        <include refid="global_value"></include>
+        #{year}, #{month}, #{economyType}, #{number}, #{yearOnYear}, #{cityProportion})
+    </insert>
+
+    <update id="update_guiji_medicine_dept_data4" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
+        update t_guiji_medicine_industry
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="year != null and year != ''">
+                year = #{year},
+            </if>
+            <if test="month != null and month != ''">
+                month = #{month},
+            </if>
+            <if test="economyType != null and economyType != ''">
+                economyType = #{economyType},
+            </if>
+            <if test="number != null and number != ''">
+                number = #{number},
+            </if>
+            <if test="yearOnYear != null and yearOnYear != ''">
+                yearOnYear = #{yearOnYear},
+            </if>
+            <if test="cityProportion != null and cityProportion != ''">
+                cityProportion = #{cityProportion},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+    <insert id="add_guiji_test" parameterType="com.sooka.model.bo.Guiji_medicine_test_Bean">
+        insert into zhsq_event (
+        <include refid="global_name"></include>
+        event_title, event_laliyuan, event_sbr_name, event_state, event_sbsj, event_type_id)
+        values (
+        <include refid="global_value"></include>
+        event_title, event_laliyuan, event_sbr_name, event_state, event_sbsj, event_type_id)
+    </insert>
+    <update id="update_guiji_test" parameterType="com.sooka.model.bo.Guiji_medicine_test_Bean">
+        update t_guiji_housingconstruction_yhjbxx
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="YHBH != null and YHBH != ''">
+                YHBH = #{YHBH},
+            </if>
+            <if test="YHMC != null and YHMC != ''">
+                YHMC = #{YHMC},
+            </if>
+            <if test="YHDZ != null and YHDZ != ''">
+                YHDZ = #{YHDZ},
+            </if>
+            <if test="YSYF != null and YSYF != ''">
+                YSYF = #{YSYF},
+            </if>
+            <if test="YSL != null and YSL != ''">
+                YSL = #{YSL},
+            </if>
+            <if test="SFJF != null and SFJF != ''">
+                SFJF = #{SFJF},
+            </if>
+            <if test="JFSJ != null and JFSJ != ''">
+                JFSJ = #{JFSJ},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+</mapper>

+ 204 - 0
test-api/src/main/resources/mapper/Guiji_Medicine_Mapper2.xml

@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.sooka.mapper.Guiji_Medicine_Mapper2">
+
+    <sql id="global_name">
+        id,create_time,cd_time,cd_batch,cd_operation,cd_source,
+    </sql>
+    <sql id="global_value">
+        #{id},now(),#{cd_time},#{cd_batch},#{cd_operation},#{cd_source},
+    </sql>
+
+    <sql id="update_sql">
+        create_time = now(),cd_batch = #{cd_batch},cd_operation = #{cd_operation},cd_source =#{cd_source},
+    </sql>
+
+    <insert id="add_guiji_medicine_dept_data" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
+        insert into t_guiji_medicine_plant (
+        <include refid="global_name"></include>
+        plantName, plantAddress, plantHectare, produceTons, produceValue, plantYear)
+        values (
+        <include refid="global_value"></include>
+        #{plantName}, #{plantAddress}, #{plantHectare}, #{produceTons}, #{produceValue}, #{plantYear})
+    </insert>
+
+    <update id="update_guiji_medicine_dept_data" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
+        update t_guiji_medicine_plant
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="plantName != null and plantName != ''">
+                plantName = #{plantName},
+            </if>
+            <if test="plantAddress != null and plantAddress != ''">
+                plantAddress = #{plantAddress},
+            </if>
+            <if test="plantHectare != null and plantHectare != ''">
+                plantHectare = #{plantHectare},
+            </if>
+            <if test="produceTons != null and produceTons != ''">
+                produceTons = #{produceTons},
+            </if>
+            <if test="produceValue != null and produceValue != ''">
+                produceValue = #{produceValue},
+            </if>
+            <if test="plantYear != null and plantYear != ''">
+                plantYear = #{plantYear},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+    <insert id="add_guiji_medicine_dept_data2" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
+        insert into t_guiji_medicine_platform (
+        <include refid="global_name"></include>
+        platformName, constructingUnit, constructingDate, platformAddress, platformAddressExt, platformLevel, platformType)
+        values (
+        <include refid="global_value"></include>
+        #{platformName}, #{constructingUnit}, #{constructingDate}, #{platformAddress}, #{platformAddressExt}, #{platformLevel}, #{platformType})
+    </insert>
+
+    <update id="update_guiji_medicine_dept_data2" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
+        update t_guiji_medicine_platform
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="platformName != null and platformName != ''">
+                platformName = #{platformName},
+            </if>
+            <if test="constructingUnit != null and constructingUnit != ''">
+                constructingUnit = #{constructingUnit},
+            </if>
+            <if test="constructingDate != null and constructingDate != ''">
+                constructingDate = #{constructingDate},
+            </if>
+            <if test="platformAddress != null and platformAddress != ''">
+                platformAddress = #{platformAddress},
+            </if>
+            <if test="platformAddressExt != null and platformAddressExt != ''">
+                platformAddressExt = #{platformAddressExt},
+            </if>
+            <if test="platformLevel != null and platformLevel != ''">
+                platformLevel = #{platformLevel},
+            </if>
+            <if test="platformType != null and platformType != ''">
+                platformType = #{platformType},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+    <insert id="add_guiji_medicine_dept_data3" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean">
+        insert into t_guiji_medicine_project (
+        <include refid="global_name"></include>
+        projectName, projectOrgName, projectAddress, projectStatus, projectTotalInvestment, projectStart, projectEnd)
+        values (
+        <include refid="global_value"></include>
+        #{projectName}, #{projectOrgName}, #{projectAddress}, #{projectStatus}, #{projectTotalInvestment}, #{projectStart}, #{projectEnd})
+    </insert>
+
+    <update id="update_guiji_medicine_dept_data3" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
+        update t_guiji_medicine_project
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="projectName != null and projectName != ''">
+                projectName = #{projectName},
+            </if>
+            <if test="projectOrgName != null and projectOrgName != ''">
+                projectOrgName = #{projectOrgName},
+            </if>
+            <if test="projectAddress != null and projectAddress != ''">
+                projectAddress = #{projectAddress},
+            </if>
+            <if test="projectStatus != null and projectStatus != ''">
+                projectStatus = #{projectStatus},
+            </if>
+            <if test="projectTotalInvestment != null and projectTotalInvestment != ''">
+                projectTotalInvestment = #{projectTotalInvestment},
+            </if>
+            <if test="projectStart != null and projectStart != ''">
+                projectStart = #{projectStart},
+            </if>
+            <if test="projectEnd != null and projectEnd != ''">
+                projectEnd = #{projectEnd},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+    <insert id="add_guiji_medicine_dept_data4" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean">
+        insert into t_guiji_medicine_industry (
+        <include refid="global_name"></include>
+        year, month, economyType, number, yearOnYear, cityProportion)
+        values (
+        <include refid="global_value"></include>
+        #{year}, #{month}, #{economyType}, #{number}, #{yearOnYear}, #{cityProportion})
+    </insert>
+
+    <update id="update_guiji_medicine_dept_data4" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
+        update t_guiji_medicine_industry
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="year != null and year != ''">
+                year = #{year},
+            </if>
+            <if test="month != null and month != ''">
+                month = #{month},
+            </if>
+            <if test="economyType != null and economyType != ''">
+                economyType = #{economyType},
+            </if>
+            <if test="number != null and number != ''">
+                number = #{number},
+            </if>
+            <if test="yearOnYear != null and yearOnYear != ''">
+                yearOnYear = #{yearOnYear},
+            </if>
+            <if test="cityProportion != null and cityProportion != ''">
+                cityProportion = #{cityProportion},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+    <insert id="add_guiji_test" parameterType="com.sooka.model.bo.Guiji_medicine_test_Bean">
+        insert into zhsq_event (
+        <include refid="global_name"></include>
+        event_title, event_laliyuan, event_sbr_name, event_state, event_sbsj, event_type_id)
+        values (
+        <include refid="global_value"></include>
+        event_title, event_laliyuan, event_sbr_name, event_state, event_sbsj, event_type_id)
+    </insert>
+    <update id="update_guiji_test" parameterType="com.sooka.model.bo.Guiji_medicine_test_Bean">
+        update t_guiji_housingconstruction_yhjbxx
+        <trim prefix="SET" suffixOverrides=",">
+            <include refid="update_sql"></include>
+            <if test="YHBH != null and YHBH != ''">
+                YHBH = #{YHBH},
+            </if>
+            <if test="YHMC != null and YHMC != ''">
+                YHMC = #{YHMC},
+            </if>
+            <if test="YHDZ != null and YHDZ != ''">
+                YHDZ = #{YHDZ},
+            </if>
+            <if test="YSYF != null and YSYF != ''">
+                YSYF = #{YSYF},
+            </if>
+            <if test="YSL != null and YSL != ''">
+                YSL = #{YSL},
+            </if>
+            <if test="SFJF != null and SFJF != ''">
+                SFJF = #{SFJF},
+            </if>
+            <if test="JFSJ != null and JFSJ != ''">
+                JFSJ = #{JFSJ},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+
+</mapper>