renyu 3 роки тому
батько
коміт
268bc08c1f

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

@@ -517,7 +517,7 @@ public class FumigationForRecordController {
517 517
         JSONObject recordInfo = JSONObject.parseObject(forRecord);
518 518
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
519 519
         String xzzydh = (String)recordInfo.get("id");
520
-        String operationSupervisor = (String)recordInfo.get("operationSupervisor;");
520
+        String operationSupervisor = (String)recordInfo.get("operationSupervisor");
521 521
         String contactPhone = (String)recordInfo.get("contactPhone");
522 522
         String xzzydd=(String)recordInfo.get("operationLocaltion");
523 523
         String lyccdwfzr = (String)recordInfo.get("orgPerson");
@@ -532,11 +532,17 @@ public class FumigationForRecordController {
532 532
         String organsOpinion = (String)recordInfo.get("qlbspyj");
533 533
         String spsj = (String)recordInfo.get("qlbspsj");
534 534
         String spr =(String)recordInfo.get("qyfzr");
535
+        String position =(String)recordInfo.get("position");
536
+        String fhry =(String)recordInfo.get("position");
537
+
538
+
535 539
         List<Map<String,Object>> details = ( List<Map<String,Object>>)recordInfo.get("detailVOS");
536 540
         for (Map<String, Object> detail : details) {
537 541
             TFumigationForrecord fumigationForrecord = new TFumigationForrecord();
538 542
             String uuid = ParameterUtil.getCode();
543
+            fumigationForrecord.setFhry(fhry);
539 544
             fumigationForrecord.setId(uuid);
545
+            fumigationForrecord.setPosition(position);
540 546
             fumigationForrecord.setXzzydh(xzzydh);
541 547
             fumigationForrecord.setOperationSupervisor(operationSupervisor);
542 548
             fumigationForrecord.setContactPhone(contactPhone);
@@ -553,12 +559,13 @@ public class FumigationForRecordController {
553 559
             fumigationForrecord.setOrgansOpinion(organsOpinion);
554 560
             fumigationForrecord.setSpsj(format.parse(spsj));
555 561
             fumigationForrecord.setSpr(spr);
562
+            fumigationForrecord.setDeleteState("1");
556 563
             fumigationForrecord.setOutForrecordTime(format.parse(spsj));
557 564
             fumigationForrecord.setOutPerson(spr);
558 565
             String cfdm = (String)detail.get("cfbh");
559 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 569
             String cfmc = (String)detail.get("cfmc");
563 570
             BigDecimal lssl = new BigDecimal(ObjectUtils.toString(detail.get("kcsl")));
564 571
             String lspz = (String)detail.get("lspz");
@@ -576,14 +583,41 @@ public class FumigationForRecordController {
576 583
             BigDecimal kjdwyyl = new BigDecimal(ObjectUtils.toString(detail.get("spaceDosage")));
577 584
             BigDecimal zyyl = new BigDecimal(ObjectUtils.toString(detail.get("totalDosage")));
578 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 613
             if(!CollectionUtils.isEmpty(pest)){
582 614
                 String zyhc = "";
583 615
                 String ckmd = "";
584 616
                 for (Map<String, Object> stringObjectMap : pest) {
585 617
                     TFumigationPesticide pesticide = new TFumigationPesticide();
618
+                    pesticide.setId(ParameterUtil.getCode());
586 619
                     pesticide.setRecordId(uuid);
620
+                    pesticide.setUseDrugType(syff);
587 621
                     if(stringObjectMap.get("pestType") !=null){
588 622
                         zyhc +=(String)stringObjectMap.get("pestType")+"#";
589 623
                         pesticide.setMajorInsectPests(Integer.valueOf((String)stringObjectMap.get("pestType")));
@@ -604,6 +638,9 @@ public class FumigationForRecordController {
604 638
                     if(stringObjectMap.get("pestResistance")!=null){
605 639
                         pesticide.setDrugResistance((String)stringObjectMap.get("pestResistance"));
606 640
                     }
641
+                    if(stringObjectMap.get("sealType")!=null){
642
+                        pesticide.setSealType((String)stringObjectMap.get("sealType"));
643
+                    }
607 644
                     pesticidePlanService.add(pesticide);
608 645
                 }
609 646
                 zyhc = zyhc.substring(0,zyhc.lastIndexOf("#"));
@@ -634,7 +671,7 @@ public class FumigationForRecordController {
634 671
                         personnel.setWorkTask(stringObjectMap.get("workTask"));
635 672
                     }
636 673
                     if(stringObjectMap.get("outside") !=null){
637
-                        personnel.setOutside(stringObjectMap.get("outside"));
674
+                        personnel.setOutside(stringObjectMap.get("outside").equals("1")?"是":"否");
638 675
                     }
639 676
                     fumigationFroRecordService.addPersonnel(personnel);
640 677
                 }