فهرست منبع

本地测试正常

wangjinsheng 3 سال پیش
والد
کامیت
0d4fac7cfe

+ 4 - 1
test-api/src/main/java/com/sooka/api/Guiji_Housingconstruction.java

@@ -203,7 +203,7 @@ public class Guiji_Housingconstruction extends BaseApi {
                 JSONObject data = jsonObject.getJSONObject("data");
                 heat_token = data.getString("token");
                 head.put("Authorization", heat_token);
-                System.out.println("heat_token:" + heat_token);
+//                System.out.println("heat_token:" + heat_token);
             }
         }
         return heat_token;
@@ -214,6 +214,7 @@ public class Guiji_Housingconstruction extends BaseApi {
     private String env;
 
     final String scheduTime = "0 0 0-23 * * ?";
+//    final String scheduTime = "0 06 22 * * ?";//本地测试使用
 
     @Scheduled(cron = scheduTime)
     public ResultModel guiji_housingconstruction_hqhrzzxsjjk() {
@@ -224,6 +225,7 @@ public class Guiji_Housingconstruction extends BaseApi {
         if (env != null && env.equals("internate")) {
             try {
                 HttpUtil.doPost(forward_url + "/api/guiji_housingconstruction_hqhrzzxsjjk_forward", str, null);
+//                this.guiji_housingconstruction_hqhrzzxsjjk_forward(str);//本地测试使用
                 r.setCode(00000);
                 r.setMessage("成功");
             } catch (Exception e) {
@@ -259,6 +261,7 @@ public class Guiji_Housingconstruction extends BaseApi {
         if (env != null && env.equals("internate")) {
             try {
                 HttpUtil.doPost(forward_url + "/api/guiji_housingconstruction_hqryzxsjjk_forward", str, null);
+//                this.guiji_housingconstruction_hqryzxsjjk_forward(str);//本地测试使用
                 r.setCode(00000);
                 r.setMessage("成功");
             } catch (Exception e) {

+ 5 - 4
test-api/src/main/java/com/sooka/service/impl/Guiji_Housingconstruction_ServiceImpl.java

@@ -170,6 +170,7 @@ public class Guiji_Housingconstruction_ServiceImpl extends BaseService implement
 
     @Override
     public ResultModel add_guiji_housingconstruction_hqrlsj(String str, String type) {
+//        System.out.println("执行service");
         ResultModel r = new ResultModel();
         try {
             JSONObject jsonObject = JSON.parseObject(str);
@@ -237,13 +238,13 @@ public class Guiji_Housingconstruction_ServiceImpl extends BaseService implement
     }
 
     //根据全局变量batch获取批次号后五位,如果batch是一位数,则在前面补全4个0,如果是两位数补全3个0。
-    public String getBatch(int batch){
-        String cdBatch = batch + "";
+    public String getBatch(int t){
+        String cdBatch = t + "";
         String str;
         if(cdBatch.length() == 1){
-            return "0000"+batch;
+            return "0000"+t;
         }else{
-            return "000"+batch;
+            return "000"+t;
         }
     }
 }

+ 15 - 5
test-api/src/main/resources/mapper/Guiji_Housingconstruction_Mapper.xml

@@ -167,13 +167,23 @@
 
     <parameterMap id="pm_hqrlsj" type="com.sooka.model.bo.Guiji_housingconstruction_hqrlsj_Bean"></parameterMap>
     <insert id="add_guiji_housingconstruction_hqrlsj" parameterMap="pm_hqrlsj">
-        insert into t_guiji_housingconstruction_hqrlsj
-        (id,name,time,type) values (#{id},#{name},now(),#{type})
+        insert into t_guiji_housingconstruction_hqrlsj (
+        <include refid="global_name"></include>
+        name,time,type)
+        values (
+        <include refid="global_value"></include>
+        #{name},now(),#{type}
+        )
     </insert>
-
     <insert id="add_guiji_housingconstruction_hqrlsj_detail" parameterMap="pm_hqrlsj">
-      insert into t_guiji_housingconstruction_hqrlsj_detail
-        (id,name,value,hqrlsj_id) values (#{id},#{name},#{value},#{hqrlsj_id})
+        insert into t_guiji_housingconstruction_hqrlsj_detail (
+        <include refid="global_name"></include>
+        name,value,hqrlsj_id
+        )
+        values (
+        <include refid="global_value"></include>
+        #{name},#{value},#{hqrlsj_id}
+        )
     </insert>
 
 </mapper>

+ 15 - 5
test-api/src/main/resources/mapper/Guiji_Housingconstruction_Mapper2.xml

@@ -163,13 +163,23 @@
 
     <parameterMap id="pm_hqrlsj" type="com.sooka.model.bo.Guiji_housingconstruction_hqrlsj_Bean"></parameterMap>
     <insert id="add_guiji_housingconstruction_hqrlsj" parameterMap="pm_hqrlsj">
-        insert into t_guiji_housingconstruction_hqrlsj
-        (id,name,time,type) values (#{id},#{name},now(),#{type})
+        insert into t_guiji_housingconstruction_hqrlsj (
+        <include refid="global_name"></include>
+        name,time,type)
+        values (
+        <include refid="global_value"></include>
+        #{name},now(),#{type}
+        )
     </insert>
-
     <insert id="add_guiji_housingconstruction_hqrlsj_detail" parameterMap="pm_hqrlsj">
-      insert into t_guiji_housingconstruction_hqrlsj_detail
-        (id,name,value,hqrlsj_id) values (#{id},#{name},#{value},#{hqrlsj_id})
+        insert into t_guiji_housingconstruction_hqrlsj_detail (
+        <include refid="global_name"></include>
+        name,value,hqrlsj_id
+        )
+        values (
+        <include refid="global_value"></include>
+        #{name},#{value},#{hqrlsj_id}
+        )
     </insert>
 
 </mapper>