shiqian 3 лет назад
Родитель
Сommit
efd5b2833b

+ 21 - 26
boman-modules/boman-gen/src/main/java/com/boman/gen/controller/MoveDataController.java

@@ -39,41 +39,37 @@ public class MoveDataController {
 
 
     @GetMapping("/selectY/{limit}/{offset}")
     @GetMapping("/selectY/{limit}/{offset}")
     public String selectY(@PathVariable("limit") int limit, @PathVariable("offset") int offset) {
     public String selectY(@PathVariable("limit") int limit, @PathVariable("offset") int offset) {
-        List<JSONObject> select = moveDataMapper.select(limit, offset);
+        List<JSONObject> select = moveDataMapper.selectY(limit, offset);
         return JSON.toJSONString(select);
         return JSON.toJSONString(select);
     }
     }
 
 
     private static void jsonToExcel() throws Exception {
     private static void jsonToExcel() throws Exception {
         JsonParser jsonParser = new JsonParser();
         JsonParser jsonParser = new JsonParser();
-        JsonArray asJsonArray = (JsonArray) jsonParser.parse(new FileReader("F:\\desk\\hj_hj_all.json"));
+        JsonArray asJsonArray = (JsonArray) jsonParser.parse(new FileReader("F:\\desk\\ymjz\\jmjz_all.json"));
         for (int i = 0; i < asJsonArray.size(); i++) {
         for (int i = 0; i < asJsonArray.size(); i++) {
             JsonElement jsonElement = asJsonArray.get(i);
             JsonElement jsonElement = asJsonArray.get(i);
             JsonObject featuresObj = jsonElement.getAsJsonObject();
             JsonObject featuresObj = jsonElement.getAsJsonObject();
-            String zjlx = getString(featuresObj, "zjlx");
-            String zjhm = getString(featuresObj, "zjhm");
-            String hh = getString(featuresObj, "hh");
-            String xz = getString(featuresObj, "xz");
-            String hjdxz = getString(featuresObj, "hjdxz");
-            String yhzgx = getString(featuresObj, "yhzgx");
-            String hzxm = getString(featuresObj, "hzxm");
-            String hzzjlx = getString(featuresObj, "hzzjlx");
-            String hzsfhm = getString(featuresObj, "hzsfhm");
-            String xm = getString(featuresObj, "xm");
-            String csrq = getString(featuresObj, "csrq");
-            String xb = getString(featuresObj, "xb");
-            String hhid = getString(featuresObj, "hhid");
-            String hklx = getString(featuresObj, "hklx");
-            String swrq = getString(featuresObj, "swrq");
-            String akmlxdh = getString(featuresObj, "akmlxdh");
-            String lxdh = getString(featuresObj, "lxdh");
-            String akmdz = getString(featuresObj, "akmdz");
+            String ID = getString(featuresObj, "ID");
+            String 受种者编码 = getString(featuresObj, "受种者编码");
+            String 受种者姓名 = getString(featuresObj, "受种者姓名");
+            String 受种者性别 = getString(featuresObj, "受种者性别");
+            String 出生日期 = getString(featuresObj, "出生日期");
+            String 身份证 = getString(featuresObj, "身份证");
+            String 电话号码 = getString(featuresObj, "电话号码");
+            String 工作单位 = getString(featuresObj, "工作单位");
+            String 人群分类 = getString(featuresObj, "人群分类");
+            String 接种单位 = getString(featuresObj, "接种单位");
+            String 接种疫苗 = getString(featuresObj, "接种疫苗");
+            String 生产厂家 = getString(featuresObj, "生产厂家");
+            String 接种针次 = getString(featuresObj, "接种针次");
+            String 接种日期 = getString(featuresObj, "接种日期");
 
 
-            String sqlStr = "insert into hj_hj (zjlx, zjhm, hh, xz, hjdxz, yhzgx,hzxm,hzzjlx, hzsfhm,xm,csrq,xb,hhid,hklx,swrq,akmlxdh,lxdh,akmdz) " +
-                    "values (" + zjlx + ", " + zjhm + ", " + hh + ", " + xz + ", " + hjdxz + ", " + yhzgx + ", "
-                    + hzxm + ", " + hzzjlx + ", " + hzsfhm + " , " + xm + ", " + csrq + ", " + xb + ", " + hhid
-                    + ", " + hklx + ", " + swrq + ", " + akmlxdh + ", " + lxdh + ", " + akmdz + "); -- " + i + "\r\n";
+            String sqlStr = "insert into ymjz (ID, 受种者编码, 受种者姓名, 受种者性别, 出生日期, 身份证,电话号码,工作单位, 人群分类,接种单位,接种疫苗,生产厂家,接种针次, 接种日期) " +
+                    "values (" + ID + ", " + 受种者编码 + ", " + 受种者姓名 + ", " + 受种者性别 + ", " + 出生日期 + ", " + 身份证 + ", "
+                    + 电话号码 + ", " + 工作单位 + ", " + 人群分类 + " , " + 接种单位 + ", " + 接种疫苗 + ", " + 生产厂家 + ", " + 接种针次
+                    + ", " + 接种日期 + "); -- " + i + "\r\n";
             System.err.println("count: " + i + ", " + sqlStr);
             System.err.println("count: " + i + ", " + sqlStr);
-            File file = new File("F:\\desk\\hj_hj_all.sql");
+            File file = new File("F:\\desk\\ymjz\\jmjz_all.sql");
             if (!file.exists()) {
             if (!file.exists()) {
                 file.createNewFile();
                 file.createNewFile();
             }
             }
@@ -89,7 +85,6 @@ public class MoveDataController {
         if (null == zjlx) {
         if (null == zjlx) {
             return "''";
             return "''";
         }
         }
-//        String zjlx1 = zjlx.toString().replace("\"", "");
         return zjlx.toString();
         return zjlx.toString();
     }
     }
 
 

+ 1 - 1
boman-modules/boman-gen/src/main/resources/bootstrap-prod.yml

@@ -1,6 +1,6 @@
 # Tomcat
 # Tomcat
 server:
 server:
-  port: 7203
+  port: 5005
 
 
 # Spring
 # Spring
 spring:
 spring:

+ 1 - 1
boman-modules/boman-gen/src/main/resources/mapper/generator/MoveDataMapper.xml

@@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     </select>
 
 
     <select id="selectY"  resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectY"  resultType="com.alibaba.fastjson.JSONObject">
-        select * from hj ymjz #{limit}, #{offset}
+        select * from ymjz limit #{limit}, #{offset}
     </select>
     </select>