Bladeren bron

天津熏蒸接口修改

lvzhikai 5 jaren geleden
bovenliggende
commit
98e2067696

+ 11 - 0
pom.xml

@@ -101,12 +101,23 @@
101 101
             <artifactId>poi-ooxml</artifactId>
102 102
             <version>3.9</version>
103 103
         </dependency>
104
+        <dependency>
105
+            <groupId>org.apache.httpcomponents</groupId>
106
+            <artifactId>httpclient</artifactId>
107
+            <version>4.5.6</version>
108
+        </dependency>
104 109
         <!-- 阿里巴巴json -->
105 110
         <dependency>
106 111
             <groupId>com.alibaba</groupId>
107 112
             <artifactId>fastjson</artifactId>
108 113
             <version>1.2.37</version>
109 114
         </dependency>
115
+        <dependency>
116
+            <groupId>net.sf.json-lib</groupId>
117
+            <artifactId>json-lib</artifactId>
118
+            <version>2.4</version>
119
+            <classifier>jdk15</classifier>
120
+        </dependency>
110 121
         <dependency><!-- 该依赖必加,里面有sping对schedule的支持 -->
111 122
             <groupId>org.springframework</groupId>
112 123
             <artifactId>spring-context-support</artifactId>

+ 68 - 3
src/main/java/com/chinaitop/depot/intelligent/fumigation/controller/FumigationForRecordController.java

@@ -9,6 +9,7 @@ import com.chinaitop.depot.intelligent.fumigation.service.PesticidePlanService;
9 9
 import com.chinaitop.depot.intelligent.grainsituation.model.TQtdevinfoValue;
10 10
 import com.chinaitop.depot.intelligent.grainsituation.model.TTestdataExample;
11 11
 import com.chinaitop.depot.intelligent.grainsituation.service.GasDetectionService;
12
+import com.chinaitop.depot.intelligent.utils.HttpUtil;
12 13
 import com.chinaitop.depot.intelligent.utils.JsonToObjectUtils;
13 14
 import com.chinaitop.depot.intelligent.utils.ParameterUtil;
14 15
 import com.chinaitop.depot.intelligent.utils.UuidUtils;
@@ -19,6 +20,7 @@ import io.swagger.annotations.Api;
19 20
 import io.swagger.annotations.ApiImplicitParam;
20 21
 import io.swagger.annotations.ApiImplicitParams;
21 22
 import io.swagger.annotations.ApiOperation;
23
+import org.springframework.beans.factory.annotation.Value;
22 24
 import org.springframework.http.MediaType;
23 25
 import org.springframework.web.bind.annotation.RequestMapping;
24 26
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -50,6 +52,9 @@ public class FumigationForRecordController {
50 52
     @Resource
51 53
     private PesticidePlanService pesticidePlanService;
52 54
 
55
+    // 获取ip地址
56
+    @Value("${reportUrl}")
57
+    private String reportPath;
53 58
     /**
54 59
      * 列表
55 60
      * @param pageNum
@@ -173,7 +178,6 @@ public class FumigationForRecordController {
173 178
     public Map<String, Object> saveFumigationForRecordDate(String forRecord, String addedDetail,String fumigation,String stateType) throws Exception {
174 179
         if(ParameterUtil.isequal(stateType,"getSubmit")){
175 180
             stateType = "7";
176
-            //如果是提交的话则除了保存还要把数据提交到市级来进行审批
177 181
         }else{
178 182
             stateType = "6";
179 183
         }
@@ -247,6 +251,14 @@ public class FumigationForRecordController {
247 251
             pesticidePlanService.updateByExample(tFumigationPesticide, pesticideExample);
248 252
         }
249 253
 
254
+        if(ParameterUtil.isequal(stateType,"getSubmit")){
255
+            //如果是提交的话则除了保存还要把数据提交到市级来进行审批
256
+            Map<String, Object> dataMap = fumigationFroRecordService.getFroRecordByIds(uuid);
257
+            Map<String, Object> sjMap = new HashMap<String, Object>();
258
+            String url = reportPath+"/fumigation/insertFumigation";//市级接口
259
+            sjMap.put("TFumigationForrecord",JSON.toJSONString(dataMap));
260
+            String strResult = HttpUtil.doPost(url,sjMap);
261
+        }
250 262
         modelMap.put("status", "success");
251 263
         return modelMap;
252 264
     }
@@ -298,7 +310,7 @@ public class FumigationForRecordController {
298 310
      * @throws Exception
299 311
      */
300 312
     @RequestMapping(value="/getSubmit", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
301
-    @ApiOperation(value="提交熏蒸备案信息", notes = "删除熏蒸备案信息")
313
+    @ApiOperation(value="提交熏蒸备案信息", notes = "提交熏蒸备案信息")
302 314
     @ApiImplicitParams({
303 315
             @ApiImplicitParam(name = "planIds", value = "熏蒸主键集合", paramType = "form"),
304 316
             @ApiImplicitParam(name = "forrecordId", value = "主键id", paramType = "form")
@@ -318,7 +330,60 @@ public class FumigationForRecordController {
318 330
                 fumigationPlanService.updateByExample(tFumigationPlan, example);
319 331
             }
320 332
         }
333
+
334
+        //如果是提交的话则除了保存还要把数据提交到市级来进行审批
335
+        Map<String, Object> dataMap = fumigationFroRecordService.getFroRecordByIds(forrecordId);
336
+        Map<String, Object> sjMap = new HashMap<String, Object>();
337
+        String url = reportPath+"/api/cbl-app/cbl/fumigation/insertFumigation";//市级接口
338
+//        dataMap.put("tyshxydm","91120118712878209L");
339
+        String strResult = HttpUtil.doPost(url,JSON.toJSONString(dataMap));
321 340
         modelMap.put("status", "success");
322 341
         return modelMap;
323 342
     }
324
-}
343
+
344
+    /**
345
+     * 提交熏蒸申请信息
346
+     * @param forrecordId 主键id
347
+     * @return
348
+     * @throws Exception
349
+     */
350
+    @RequestMapping(value="/getForRecordApproval", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
351
+    @ApiOperation(value="提交熏蒸备案信息", notes = "提交熏蒸备案信息-市级用")
352
+    @ApiImplicitParams({
353
+            @ApiImplicitParam(name = "forrecordId", value = "主键id", paramType = "form")
354
+    })
355
+    public void getForRecordApproval(String forRecord) throws Exception {
356
+        //市级传输过来的审批过后的备案数据
357
+        JSONObject forRecordData = JSONObject.parseObject(forRecord);
358
+        String forrecordId = forRecordData.get("forrecordId").toString();
359
+        Map<String, Object> modelMap = new HashMap<>();
360
+        if (forrecordId != null) {
361
+            //修改熏蒸备案信息
362
+            TFumigationForrecordExample tFumigationForrecordExample = new TFumigationForrecordExample();
363
+            TFumigationForrecordExample.Criteria criteria = tFumigationForrecordExample.createCriteria();
364
+            criteria.andIdEqualTo(forrecordId);
365
+
366
+            TFumigationForrecord tFumigationForrecord = new TFumigationForrecord();
367
+            tFumigationForrecord.setOrgansOpinion(forRecordData.get("organsOpinion").toString());
368
+            tFumigationForrecord.setOutPerson(forRecordData.get("outPerson").toString());
369
+            tFumigationForrecord.setOutForrecordTime(ParameterUtil.string2datetime(forRecordData.get("outForrecordTime").toString()));
370
+            fumigationFroRecordService.updateByExample(tFumigationForrecord, tFumigationForrecordExample);
371
+
372
+            //获取备案数据
373
+            Map<String, Object> forRecords = fumigationFroRecordService.getFroRecordById(forrecordId);
374
+
375
+            //下边获取熏蒸数据
376
+            String[] planId = forRecords.get("planIds").toString().split(",");
377
+            for (String id:planId) {
378
+                //修改熏蒸状态
379
+                TFumigationPlanExample example = new TFumigationPlanExample();
380
+                TFumigationPlanExample.Criteria planCriteria = example.createCriteria();
381
+                planCriteria.andIdEqualTo(id);
382
+
383
+                TFumigationPlan tFumigationPlan = new TFumigationPlan();
384
+                tFumigationPlan.setState(8);
385
+                fumigationPlanService.updateByExample(tFumigationPlan, example);
386
+            }
387
+        }
388
+    }
389
+}

+ 6 - 1
src/main/java/com/chinaitop/depot/intelligent/fumigation/mapper/TFumigationForrecordMapper.java

@@ -34,5 +34,10 @@ public interface TFumigationForrecordMapper {
34 34
 
35 35
     List<Map<String, Object>> getFumigationDateByIds(Map<String, Object> map);
36 36
 
37
-    Map<String, Object> getFroRecordById(String forRecordId);
37
+    Map<String, Object> getFroRecordById(String forRecordId);//本地用备案详情
38
+    Map<String, Object> getFroRecordByIds(String forRecordId);//市级用备案数据
39
+    List<Map<String, Object>> getpersonnelByIds(String forRecordId);//市级用备案熏蒸人员数据
40
+    List<Map<String, Object>> getplanByIds(String forRecordId);//市级用熏蒸计划数据
41
+    List<Map<String, Object>> getpesticideByIds(String forRecordId);//市级用熏蒸计划数据
42
+    String getLYXZ(String enumIds);//查询粮油性质
38 43
 }

+ 125 - 16
src/main/java/com/chinaitop/depot/intelligent/fumigation/mapper/TFumigationForrecordMapper.xml

@@ -83,9 +83,9 @@
83 83
     </where>
84 84
   </sql>
85 85
   <sql id="Base_Column_List" >
86
-    id, operation_supervisor, position, contact_phone, fumigation_start, fumigation_end, 
87
-    stow_way, east, south, west, north, processing_instructions, enterprise_opinion, 
88
-    organs_opinion, creater, create_time, out_person, out_forrecord_time, org_id, delete_state, 
86
+    id, operation_supervisor, position, contact_phone, fumigation_start, fumigation_end,
87
+    stow_way, east, south, west, north, processing_instructions, enterprise_opinion,
88
+    organs_opinion, creater, create_time, out_person, out_forrecord_time, org_id, delete_state,
89 89
     updatetime
90 90
   </sql>
91 91
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationForrecordExample" >
@@ -103,7 +103,7 @@
103 103
     </if>
104 104
   </select>
105 105
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
106
-    select 
106
+    select
107 107
     <include refid="Base_Column_List" />
108 108
     from t_fumigation_forrecord
109 109
     where id = #{id,jdbcType=VARCHAR}
@@ -119,20 +119,20 @@
119 119
     </if>
120 120
   </delete>
121 121
   <insert id="insert" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationForrecord" >
122
-    insert into t_fumigation_forrecord (id, operation_supervisor, position, 
123
-      contact_phone, fumigation_start, fumigation_end, 
124
-      stow_way, east, south, 
125
-      west, north, processing_instructions, 
126
-      enterprise_opinion, organs_opinion, creater, 
127
-      create_time, out_person, out_forrecord_time, 
122
+    insert into t_fumigation_forrecord (id, operation_supervisor, position,
123
+      contact_phone, fumigation_start, fumigation_end,
124
+      stow_way, east, south,
125
+      west, north, processing_instructions,
126
+      enterprise_opinion, organs_opinion, creater,
127
+      create_time, out_person, out_forrecord_time,
128 128
       org_id, delete_state, updatetime
129 129
       )
130
-    values (#{id,jdbcType=VARCHAR}, #{operationSupervisor,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, 
131
-      #{contactPhone,jdbcType=VARCHAR}, #{fumigationStart,jdbcType=TIMESTAMP}, #{fumigationEnd,jdbcType=TIMESTAMP}, 
132
-      #{stowWay,jdbcType=VARCHAR}, #{east,jdbcType=VARCHAR}, #{south,jdbcType=VARCHAR}, 
133
-      #{west,jdbcType=VARCHAR}, #{north,jdbcType=VARCHAR}, #{processingInstructions,jdbcType=VARCHAR}, 
134
-      #{enterpriseOpinion,jdbcType=VARCHAR}, #{organsOpinion,jdbcType=VARCHAR}, #{creater,jdbcType=INTEGER}, 
135
-      #{createTime,jdbcType=TIMESTAMP}, #{outPerson,jdbcType=VARCHAR}, #{outForrecordTime,jdbcType=TIMESTAMP}, 
130
+    values (#{id,jdbcType=VARCHAR}, #{operationSupervisor,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR},
131
+      #{contactPhone,jdbcType=VARCHAR}, #{fumigationStart,jdbcType=TIMESTAMP}, #{fumigationEnd,jdbcType=TIMESTAMP},
132
+      #{stowWay,jdbcType=VARCHAR}, #{east,jdbcType=VARCHAR}, #{south,jdbcType=VARCHAR},
133
+      #{west,jdbcType=VARCHAR}, #{north,jdbcType=VARCHAR}, #{processingInstructions,jdbcType=VARCHAR},
134
+      #{enterpriseOpinion,jdbcType=VARCHAR}, #{organsOpinion,jdbcType=VARCHAR}, #{creater,jdbcType=INTEGER},
135
+      #{createTime,jdbcType=TIMESTAMP}, #{outPerson,jdbcType=VARCHAR}, #{outForrecordTime,jdbcType=TIMESTAMP},
136 136
       #{orgId,jdbcType=INTEGER}, #{deleteState,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}
137 137
       )
138 138
   </insert>
@@ -547,6 +547,106 @@
547 547
         forrecord.id
548 548
   </select>
549 549
 
550
+  <select id="getFroRecordByIds" resultType="java.util.Map" parameterType="java.lang.String" >
551
+    SELECT
552
+        forrecord.id,
553
+        forrecord.create_time createTime,
554
+        forrecord.operation_supervisor operationSupervisor,
555
+        forrecord.position position,
556
+        forrecord.contact_phone contactPhone,
557
+        forrecord.fumigation_start fumigationStart,
558
+        forrecord.fumigation_end fumigationEnd,
559
+        forrecord.stow_way stowWay,
560
+        forrecord.east east,
561
+        forrecord.south south,
562
+        forrecord.west west,
563
+        forrecord.north north,
564
+        forrecord.processing_instructions processingInstructions,
565
+        forrecord.enterprise_opinion enterpriseOpinion,
566
+        forrecord.organs_opinion organsOpinion,
567
+        users.real_name creater,
568
+        users.mobile createrPhone,
569
+        forrecord.org_id orgId,
570
+        forrecord.out_person outPerson,
571
+        forrecord.out_forrecord_time outForrecordTime,
572
+        forrecord.delete_state deleteState,
573
+        forrecord.updatetime updatetime
574
+    FROM
575
+        t_fumigation_forrecord forrecord
576
+    LEFT JOIN user_info users ON users.user_id = forrecord.creater
577
+    WHERE
578
+        forrecord.id = #{forRecordId,jdbcType=VARCHAR}
579
+  </select>
580
+  <select id="getpersonnelByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
581
+    SELECT
582
+        personnel.id,
583
+        personnel.forrecord_id forrecordId,
584
+        personnel.personnel_name personnelName,
585
+        personnel.professional_qualification professionalQualification,
586
+        personnel.physical_condition physicalCondition,
587
+        personnel.work_task workTask,
588
+        personnel.outside outside,
589
+        personnel.create_time createTime,
590
+        personnel.org_id orgId,
591
+        personnel.delete_state deleteState,
592
+        personnel.updatetime
593
+    FROM
594
+        t_fumigation_personnel personnel
595
+    WHERE
596
+        personnel.forrecord_id = #{forRecordId,jdbcType=VARCHAR}
597
+  </select>
598
+  <select id="getplanByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
599
+    SELECT
600
+        plan.id, plan.for_record_id forRecordId, plan.house_id houseId, plan.keeper, lspzenum.enumName grainKind,
601
+        plan.grain_count grainCount, plan.harvest_years harvestYears, plan.put_storage_years putStorageYears,
602
+        plan.fumigation_num fumigationNum, ones.enumName oneMethods, plan.one_dose oneDose, plan.one_date oneDate,
603
+        twos.enumName twoMethods, plan.two_dose twoDose, plan.two_date twoDate, threes.enumName threeMethods,
604
+        plan.three_dose threeDose, plan.three_date threeDate, fours.enumName fourMethods, plan.four_dose fourDose,
605
+        plan.four_date fourDate, plan.deliquescence, plan.bag_buried bagBuried, plan.test_tube testTube,
606
+        plan.applying_pesticide applyingPesticide, plan.fixed_decorate fixedDecorate, plan.mobile_decorate mobileDecorate,
607
+        plan.fixed, plan.mobile, plan.single_control singleControl, plan.double_control doubleControl, fumtype.enumName fumigationType,
608
+        plan.fumigation_number fumigationNumber, plan.fumigation_command fumigationCommand, plan.fumigation_operation fumigationOperation,
609
+        plan.fumiagtion_protective fumiagtionProtective, plan.fumiagtion_period_time fumiagtionPeriodTime, plan.fumiagtion_chief fumiagtionChief,
610
+        plan.expected, plan.points_work pointsWork, plan.note, plan.state, creater.enumName creater, plan.create_time createTime,
611
+        plan.plan_formulation planFormulation, plan.reported, plan.pesticide_qualification pesticideQualification, plan.qualification,
612
+        plan.approve_people approvePeople, plan.approve_department approveDepartment, plan.approve_note approveNote,
613
+        plan.approve_time approveTime, plan.grain_moisture grainMoisture, plan.delete_state deleteState, plan.org_id orgId,
614
+        plan.updatetime,infos.company_org_code tyshxydm
615
+    FROM
616
+        t_fumigation_plan plan
617
+    LEFT JOIN basic_enum lspzenum on lspzenum.enumId = plan.grain_kind
618
+    LEFT JOIN basic_enum fumtype on fumtype.enumId = plan.fumigation_type
619
+    LEFT JOIN basic_enum ones on ones.enumId = plan.one_methods
620
+    LEFT JOIN basic_enum twos on twos.enumId = plan.two_methods
621
+    LEFT JOIN basic_enum threes on threes.enumId = plan.three_methods
622
+    LEFT JOIN basic_enum fours on fours.enumId = plan.four_methods
623
+    LEFT JOIN basic_enum creater on creater.enumId = plan.creater
624
+    LEFT JOIN org_info infos on infos.org_id = plan.org_id
625
+    WHERE
626
+        plan.for_record_id = #{forRecordId,jdbcType=VARCHAR}
627
+  </select>
628
+  <select id="getpesticideByIds" resultType="java.util.HashMap" parameterType="java.lang.String" >
629
+    SELECT
630
+        pesticide.id, pesticide.fumigation_id fumigationId, pests.enumName majorInsectPests,pesticide.insect_density insectDensity,
631
+        pesticide.occurrence_place occurrencePlace, pesticide.insect_product_time insectProductTime, pesticide.drug_resistance drugResistance,
632
+        yjmc.enumName drugName, yjlx.enumName reagentType, pesticide.validity, pesticide.get_number getNumber,
633
+        pesticide.get_person getPerson, pesticide.get_time getTime, pesticide.drug_purity drugPurity, pesticide.use_drug_type useDrugType,
634
+        pesticide.plann_drug_start_time plannDrugStartTime, pesticide.plann_drug_use_up_time plannDrugUseUpTime, pesticide.plann_drug_count plannDrugCount,
635
+        pesticide.seal_type sealType, pesticide.setting_concentration setting_concentration, pesticide.concentration_check_type concentrationCheckType,
636
+        pesticide.bulk_gas_type bulkGasType, pesticide.drug_user_number drugUserNumber, pesticide.pesticide_operator pesticideOperator,
637
+        pesticide.creater, pesticide.create_time createTime, pesticide.state, pesticide.approve_people approvePeople,
638
+        pesticide.approve_department approveDepartment, pesticide.approve_note approveNote, pesticide.approve_time approveTime, pesticide.org_id orgId,
639
+        pesticide.delete_state deleteState, pesticide.updatetime
640
+    FROM
641
+        t_fumigation_pesticide pesticide
642
+        LEFT JOIN t_fumigation_plan plan ON plan.id = pesticide.fumigation_id
643
+        LEFT JOIN basic_enum pests on pests.enumId = pesticide.major_insect_pests
644
+        LEFT JOIN basic_enum yjmc on yjmc.enumId = pesticide.drug_name
645
+        LEFT JOIN basic_enum yjlx on yjlx.enumId = pesticide.reagent_type
646
+    WHERE
647
+        plan.for_record_id = #{forRecordId,jdbcType=VARCHAR}
648
+  </select>
649
+
550 650
   <select id="getFumigationDateByIds" resultType="java.util.Map" parameterType="java.util.Map" >
551 651
     SELECT
552 652
     plan.id planId,
@@ -579,4 +679,13 @@
579 679
       #{planId}
580 680
     </foreach>
581 681
   </select>
682
+
683
+  <select id="getLYXZ" resultType="java.lang.String" parameterType="java.lang.String" >
684
+    SELECT
685
+    enums.enumName
686
+    FROM
687
+    basic_enum enums
688
+    WHERE
689
+    enums.enumId = #{enumIds,jdbcType=VARCHAR}
690
+  </select>
582 691
 </mapper>

+ 1 - 0
src/main/java/com/chinaitop/depot/intelligent/fumigation/service/FumigationForRecordService.java

@@ -17,6 +17,7 @@ public interface FumigationForRecordService {
17 17
     List<Map<String, Object>> getFumigationDateByIds(Map<String, Object> map);
18 18
 
19 19
     Map<String, Object> getFroRecordById(String forRecordId);
20
+    Map<String, Object> getFroRecordByIds(String forRecordId);
20 21
 
21 22
     void add(TFumigationForrecord tFumigationForrecord);
22 23
     void addPersonnel(TFumigationPersonnel tFumigationPersonnel);

+ 39 - 0
src/main/java/com/chinaitop/depot/intelligent/fumigation/service/impl/FumigationForRecordServiceImpl.java

@@ -1,16 +1,22 @@
1 1
 package com.chinaitop.depot.intelligent.fumigation.service.impl;
2 2
 
3
+import com.alibaba.fastjson.JSON;
3 4
 import com.chinaitop.depot.intelligent.fumigation.mapper.TFumigationForrecordMapper;
4 5
 import com.chinaitop.depot.intelligent.fumigation.mapper.TFumigationPersonnelMapper;
5 6
 import com.chinaitop.depot.intelligent.fumigation.mapper.TFumigationProcessMapper;
6 7
 import com.chinaitop.depot.intelligent.fumigation.model.*;
7 8
 import com.chinaitop.depot.intelligent.fumigation.service.FumigationForRecordService;
8 9
 import com.chinaitop.depot.intelligent.fumigation.service.FumigationProcessService;
10
+import com.chinaitop.depot.intelligent.utils.HttpUtil;
11
+import com.chinaitop.depot.intelligent.utils.ParameterUtil;
12
+import net.sf.json.JSONObject;
9 13
 import org.springframework.stereotype.Service;
10 14
 
11 15
 import javax.annotation.Resource;
16
+import java.util.HashMap;
12 17
 import java.util.List;
13 18
 import java.util.Map;
19
+import net.sf.json.JSONArray;
14 20
 
15 21
 /**
16 22
  * @author lvzhikai
@@ -36,6 +42,39 @@ public class FumigationForRecordServiceImpl implements FumigationForRecordServic
36 42
     }
37 43
 
38 44
     @Override
45
+    public Map<String, Object> getFroRecordByIds(String forRecordId) {
46
+        Map<String, Object> FroRecordMap = tFumigationForrecordMapper.getFroRecordByIds(forRecordId);
47
+        List<Map<String, Object>> personnelMap = tFumigationForrecordMapper.getpersonnelByIds(forRecordId);
48
+        List<Map<String, Object>> planMap = tFumigationForrecordMapper.getplanByIds(forRecordId);
49
+        List<Map<String, Object>> pesticideMap = tFumigationForrecordMapper.getpesticideByIds(forRecordId);
50
+        FroRecordMap.put("fumigationPersonnels",personnelMap);
51
+
52
+        String url = "http://localhost:9026/agile/kcsw/queryLKNewData?orgId="+FroRecordMap.get("orgId");;//粮油性质
53
+        String strResult = HttpUtil.doGet(url);
54
+        JSONArray json = JSONArray.fromObject(strResult);
55
+
56
+        for (Map<String, Object> plans:planMap) {
57
+            for (Map<String, Object> pesticide:pesticideMap) {
58
+                if(ParameterUtil.isequal(plans.get("id"),pesticide.get("fumigationId"))){
59
+                    plans.put("fumigationPesticide",pesticide);
60
+                }
61
+            }
62
+            if (json.size() > 0) {//循环添加粮油性质
63
+                for (int i = 0; i < json.size(); i++) {
64
+                    JSONObject job = json.getJSONObject(i);
65
+                    if(ParameterUtil.isequal(plans.get("houseId"),job.get("ch"))){
66
+                        String lyxz = tFumigationForrecordMapper.getLYXZ(job.get("hwxz").toString());
67
+                        plans.put("grainNature",lyxz);
68
+                    }
69
+                }
70
+            }
71
+        }
72
+
73
+        FroRecordMap.put("fumigationPlans",planMap);
74
+        return FroRecordMap;
75
+    }
76
+
77
+    @Override
39 78
     public List<Map<String, Object>> getFumigationDateByIds(Map<String, Object> map) {
40 79
         return tFumigationForrecordMapper.getFumigationDateByIds(map);
41 80
     }

+ 2 - 0
src/main/resources/bootstrap.yml

@@ -69,6 +69,8 @@ socket-port: 42121
69 69
 #设置全局变量判断是云端还是库端;1云端,2本地
70 70
 localOrCloud: 2
71 71
 
72
+reportUrl: http://101.36.160.140:8097
73
+
72 74
 
73 75
 ## ==============================================应急端========================================================
74 76
 #server: