renyu 3 年之前
父節點
當前提交
268bc08c1f

+ 42 - 5
src/main/java/com/chinaitop/depot/fumigation/controller/FumigationForRecordController.java

@@ -517,7 +517,7 @@ public class FumigationForRecordController {
517
         JSONObject recordInfo = JSONObject.parseObject(forRecord);
517
         JSONObject recordInfo = JSONObject.parseObject(forRecord);
518
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
518
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
519
         String xzzydh = (String)recordInfo.get("id");
519
         String xzzydh = (String)recordInfo.get("id");
520
-        String operationSupervisor = (String)recordInfo.get("operationSupervisor;");
520
+        String operationSupervisor = (String)recordInfo.get("operationSupervisor");
521
         String contactPhone = (String)recordInfo.get("contactPhone");
521
         String contactPhone = (String)recordInfo.get("contactPhone");
522
         String xzzydd=(String)recordInfo.get("operationLocaltion");
522
         String xzzydd=(String)recordInfo.get("operationLocaltion");
523
         String lyccdwfzr = (String)recordInfo.get("orgPerson");
523
         String lyccdwfzr = (String)recordInfo.get("orgPerson");
@@ -532,11 +532,17 @@ public class FumigationForRecordController {
532
         String organsOpinion = (String)recordInfo.get("qlbspyj");
532
         String organsOpinion = (String)recordInfo.get("qlbspyj");
533
         String spsj = (String)recordInfo.get("qlbspsj");
533
         String spsj = (String)recordInfo.get("qlbspsj");
534
         String spr =(String)recordInfo.get("qyfzr");
534
         String spr =(String)recordInfo.get("qyfzr");
535
+        String position =(String)recordInfo.get("position");
536
+        String fhry =(String)recordInfo.get("position");
537
+
538
+
535
         List<Map<String,Object>> details = ( List<Map<String,Object>>)recordInfo.get("detailVOS");
539
         List<Map<String,Object>> details = ( List<Map<String,Object>>)recordInfo.get("detailVOS");
536
         for (Map<String, Object> detail : details) {
540
         for (Map<String, Object> detail : details) {
537
             TFumigationForrecord fumigationForrecord = new TFumigationForrecord();
541
             TFumigationForrecord fumigationForrecord = new TFumigationForrecord();
538
             String uuid = ParameterUtil.getCode();
542
             String uuid = ParameterUtil.getCode();
543
+            fumigationForrecord.setFhry(fhry);
539
             fumigationForrecord.setId(uuid);
544
             fumigationForrecord.setId(uuid);
545
+            fumigationForrecord.setPosition(position);
540
             fumigationForrecord.setXzzydh(xzzydh);
546
             fumigationForrecord.setXzzydh(xzzydh);
541
             fumigationForrecord.setOperationSupervisor(operationSupervisor);
547
             fumigationForrecord.setOperationSupervisor(operationSupervisor);
542
             fumigationForrecord.setContactPhone(contactPhone);
548
             fumigationForrecord.setContactPhone(contactPhone);
@@ -553,12 +559,13 @@ public class FumigationForRecordController {
553
             fumigationForrecord.setOrgansOpinion(organsOpinion);
559
             fumigationForrecord.setOrgansOpinion(organsOpinion);
554
             fumigationForrecord.setSpsj(format.parse(spsj));
560
             fumigationForrecord.setSpsj(format.parse(spsj));
555
             fumigationForrecord.setSpr(spr);
561
             fumigationForrecord.setSpr(spr);
562
+            fumigationForrecord.setDeleteState("1");
556
             fumigationForrecord.setOutForrecordTime(format.parse(spsj));
563
             fumigationForrecord.setOutForrecordTime(format.parse(spsj));
557
             fumigationForrecord.setOutPerson(spr);
564
             fumigationForrecord.setOutPerson(spr);
558
             String cfdm = (String)detail.get("cfbh");
565
             String cfdm = (String)detail.get("cfbh");
559
             Map<String,Integer> info = fumigationFroRecordService.getByCfdm(cfdm);
566
             Map<String,Integer> info = fumigationFroRecordService.getByCfdm(cfdm);
560
-            Integer orgId = info.get("orgId");
561
-            Integer houseId = info.get("houseId");
567
+            Integer orgId = info.get("orgid");
568
+            Integer houseId = info.get("houseid");
562
             String cfmc = (String)detail.get("cfmc");
569
             String cfmc = (String)detail.get("cfmc");
563
             BigDecimal lssl = new BigDecimal(ObjectUtils.toString(detail.get("kcsl")));
570
             BigDecimal lssl = new BigDecimal(ObjectUtils.toString(detail.get("kcsl")));
564
             String lspz = (String)detail.get("lspz");
571
             String lspz = (String)detail.get("lspz");
@@ -576,14 +583,41 @@ public class FumigationForRecordController {
576
             BigDecimal kjdwyyl = new BigDecimal(ObjectUtils.toString(detail.get("spaceDosage")));
583
             BigDecimal kjdwyyl = new BigDecimal(ObjectUtils.toString(detail.get("spaceDosage")));
577
             BigDecimal zyyl = new BigDecimal(ObjectUtils.toString(detail.get("totalDosage")));
584
             BigDecimal zyyl = new BigDecimal(ObjectUtils.toString(detail.get("totalDosage")));
578
             String hcjcdh = (String)detail.get("pestNo");
585
             String hcjcdh = (String)detail.get("pestNo");
579
-            List<Map<String,Object>> pest =  (List<Map<String,Object>>)detail.get("pestVOS");
580
 
586
 
587
+            BigDecimal lysf =new BigDecimal(ObjectUtils.toString(detail.get("lysf")));;
588
+            String dzfs =(String)detail.get("dzfs");
589
+            String east =(String)detail.get("east");
590
+            String west =(String)detail.get("west");
591
+            String south =(String)detail.get("south");
592
+            String north =(String)detail.get("north");
593
+            String yjyxq =(String)detail.get("yjyxq");
594
+            String lqr =(String)detail.get("lqr");
595
+            String lqsj =(String)detail.get("lqsj");
596
+            String xzzhr =(String)detail.get("xzzhr");
597
+            Integer xzrs =(Integer)detail.get("xzrs");
598
+            String xzczry =(String)detail.get("xzczry");
599
+            fumigationForrecord.setLysf(lysf);
600
+            fumigationForrecord.setDzfs(dzfs);
601
+            fumigationForrecord.setEast(east);
602
+            fumigationForrecord.setWest(west);
603
+            fumigationForrecord.setSouth(south);
604
+            fumigationForrecord.setStowWay(syff);
605
+            fumigationForrecord.setNorth(north);
606
+            fumigationForrecord.setYjyxq(format.parse(yjyxq));
607
+            fumigationForrecord.setLqr(lqr);
608
+            fumigationForrecord.setLqsj(format.parse(lqsj));
609
+            fumigationForrecord.setXzzhr(xzzhr);
610
+            fumigationForrecord.setXzrs(xzrs);
611
+            fumigationForrecord.setXzczry(xzczry);
612
+            List<Map<String,Object>> pest =  (List<Map<String,Object>>)detail.get("pestVOS");
581
             if(!CollectionUtils.isEmpty(pest)){
613
             if(!CollectionUtils.isEmpty(pest)){
582
                 String zyhc = "";
614
                 String zyhc = "";
583
                 String ckmd = "";
615
                 String ckmd = "";
584
                 for (Map<String, Object> stringObjectMap : pest) {
616
                 for (Map<String, Object> stringObjectMap : pest) {
585
                     TFumigationPesticide pesticide = new TFumigationPesticide();
617
                     TFumigationPesticide pesticide = new TFumigationPesticide();
618
+                    pesticide.setId(ParameterUtil.getCode());
586
                     pesticide.setRecordId(uuid);
619
                     pesticide.setRecordId(uuid);
620
+                    pesticide.setUseDrugType(syff);
587
                     if(stringObjectMap.get("pestType") !=null){
621
                     if(stringObjectMap.get("pestType") !=null){
588
                         zyhc +=(String)stringObjectMap.get("pestType")+"#";
622
                         zyhc +=(String)stringObjectMap.get("pestType")+"#";
589
                         pesticide.setMajorInsectPests(Integer.valueOf((String)stringObjectMap.get("pestType")));
623
                         pesticide.setMajorInsectPests(Integer.valueOf((String)stringObjectMap.get("pestType")));
@@ -604,6 +638,9 @@ public class FumigationForRecordController {
604
                     if(stringObjectMap.get("pestResistance")!=null){
638
                     if(stringObjectMap.get("pestResistance")!=null){
605
                         pesticide.setDrugResistance((String)stringObjectMap.get("pestResistance"));
639
                         pesticide.setDrugResistance((String)stringObjectMap.get("pestResistance"));
606
                     }
640
                     }
641
+                    if(stringObjectMap.get("sealType")!=null){
642
+                        pesticide.setSealType((String)stringObjectMap.get("sealType"));
643
+                    }
607
                     pesticidePlanService.add(pesticide);
644
                     pesticidePlanService.add(pesticide);
608
                 }
645
                 }
609
                 zyhc = zyhc.substring(0,zyhc.lastIndexOf("#"));
646
                 zyhc = zyhc.substring(0,zyhc.lastIndexOf("#"));
@@ -634,7 +671,7 @@ public class FumigationForRecordController {
634
                         personnel.setWorkTask(stringObjectMap.get("workTask"));
671
                         personnel.setWorkTask(stringObjectMap.get("workTask"));
635
                     }
672
                     }
636
                     if(stringObjectMap.get("outside") !=null){
673
                     if(stringObjectMap.get("outside") !=null){
637
-                        personnel.setOutside(stringObjectMap.get("outside"));
674
+                        personnel.setOutside(stringObjectMap.get("outside").equals("1")?"是":"否");
638
                     }
675
                     }
639
                     fumigationFroRecordService.addPersonnel(personnel);
676
                     fumigationFroRecordService.addPersonnel(personnel);
640
                 }
677
                 }