瀏覽代碼

接收字段调整

renyu 3 年之前
父節點
當前提交
d8686aa411
共有 1 個文件被更改,包括 316 次插入132 次删除
  1. 316 132
      src/main/java/com/chinaitop/depot/fumigation/controller/FumigationForRecordController.java

+ 316 - 132
src/main/java/com/chinaitop/depot/fumigation/controller/FumigationForRecordController.java

@@ -18,6 +18,7 @@ import io.swagger.annotations.ApiImplicitParam;
18 18
 import io.swagger.annotations.ApiImplicitParams;
19 19
 import io.swagger.annotations.ApiOperation;
20 20
 import org.apache.commons.lang.ObjectUtils;
21
+import org.apache.commons.lang.StringUtils;
21 22
 import org.springframework.beans.factory.annotation.Value;
22 23
 import org.springframework.http.MediaType;
23 24
 import org.springframework.util.CollectionUtils;
@@ -513,30 +514,91 @@ public class FumigationForRecordController {
513 514
     @ApiImplicitParams({
514 515
             @ApiImplicitParam(name = "forRecord", value = "熏蒸备案基础信息和备案信息", paramType = "form")
515 516
     })
516
-    public void insertRecord(String forRecord) throws Exception {
517
+    public Map<String, Object> insertRecord(String forRecord) throws Exception {
518
+        Map<String, Object> modelMap = new HashMap<>();
519
+        if(StringUtils.isEmpty(forRecord)){
520
+            modelMap.put("msg","所传信息为空,请检查");
521
+            return modelMap;
522
+        }
517 523
         JSONObject recordInfo = JSONObject.parseObject(forRecord);
518 524
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
519
-        String xzzydh = (String)recordInfo.get("id");
520
-        String operationSupervisor = (String)recordInfo.get("operationSupervisor");
521
-        String contactPhone = (String)recordInfo.get("contactPhone");
522
-        String xzzydd=(String)recordInfo.get("operationLocaltion");
523
-        String lyccdwfzr = (String)recordInfo.get("orgPerson");
524
-        String lyccdw = (String)recordInfo.get("orgName");
525
-        String ylccdwlxdh = (String)recordInfo.get("orgPhone");
526
-        String fumigationStart=(String)recordInfo.get("fumigationStart");
527
-        String fumigationEnd = (String)recordInfo.get("fumigationEnd");
528
-        String creater = (String)recordInfo.get("creater");
529
-        String createTime = (String)recordInfo.get("createTime");
530
-        String updateTime = (String)recordInfo.get("updateTime");
531
-        String enterpriseOpinion = (String)recordInfo.get("qyspyj");
532
-        String organsOpinion = (String)recordInfo.get("qlbspyj");
533
-        String spsj = (String)recordInfo.get("qlbspsj");
534
-        String spr =(String)recordInfo.get("qyfzr");
535
-        String position =(String)recordInfo.get("position");
536
-        String fhry =(String)recordInfo.get("fhry");
537
-
538
-
539
-        List<Map<String,Object>> details = ( List<Map<String,Object>>)recordInfo.get("detailVOS");
525
+        String xzzydh = null;
526
+        String operationSupervisor = null;
527
+        String contactPhone = null;
528
+        String xzzydd = null;
529
+        String lyccdwfzr = null;
530
+        String lyccdw = null;
531
+        String ylccdwlxdh = null;
532
+        String fumigationStart = null;
533
+        String fumigationEnd = null;
534
+        String creater = null;
535
+        String createTime = null;
536
+        String updateTime = null;
537
+        String enterpriseOpinion = null;
538
+        String organsOpinion = null;
539
+        String spsj = null;
540
+        String spr = null;
541
+        String position = null;
542
+        String fhry = null;
543
+        if(recordInfo.get("id")!=null){
544
+            xzzydh = (String)recordInfo.get("id");
545
+        }
546
+        if(recordInfo.get("operationSupervisor")!=null){
547
+            operationSupervisor = (String)recordInfo.get("operationSupervisor");
548
+        }
549
+       if(recordInfo.get("contactPhone")!=null){
550
+           contactPhone = (String)recordInfo.get("contactPhone");
551
+       }
552
+       if(recordInfo.get("operationLocaltion")!=null){
553
+           xzzydd=(String)recordInfo.get("operationLocaltion");
554
+       }
555
+       if(recordInfo.get("orgPerson")!=null){
556
+           lyccdwfzr = (String)recordInfo.get("orgPerson");
557
+       }
558
+       if(recordInfo.get("orgName")!=null){
559
+           lyccdw = (String)recordInfo.get("orgName");
560
+       }
561
+       if(recordInfo.get("orgPhone")!=null){
562
+           ylccdwlxdh = (String)recordInfo.get("orgPhone");
563
+       }
564
+       if(recordInfo.get("fumigationStart")!=null){
565
+           fumigationStart=(String)recordInfo.get("fumigationStart");
566
+       }
567
+       if(recordInfo.get("fumigationEnd")!=null){
568
+           fumigationEnd = (String)recordInfo.get("fumigationEnd");
569
+       }
570
+       if(recordInfo.get("creater")!=null){
571
+           creater = (String)recordInfo.get("creater");
572
+       }
573
+       if(recordInfo.get("createTime")!=null){
574
+           createTime = (String)recordInfo.get("createTime");
575
+       }
576
+       if(recordInfo.get("updateTime")!=null){
577
+           updateTime = (String)recordInfo.get("updateTime");
578
+       }
579
+       if(recordInfo.get("qyspyj")!=null){
580
+           enterpriseOpinion = (String)recordInfo.get("qyspyj");
581
+       }
582
+       if(recordInfo.get("qlbspyj")!=null){
583
+           organsOpinion = (String)recordInfo.get("qlbspyj");
584
+       }
585
+       if(recordInfo.get("qlbspsj")!=null){
586
+           spsj = (String)recordInfo.get("qlbspsj");
587
+       }
588
+       if(recordInfo.get("qyfzr")!=null){
589
+           spr =(String)recordInfo.get("qyfzr");
590
+       }
591
+       if(recordInfo.get("position")!=null){
592
+           position =(String)recordInfo.get("position");
593
+       }
594
+       if(recordInfo.get("fhry")!=null){
595
+           fhry =(String)recordInfo.get("fhry");
596
+       }
597
+        if(recordInfo.get("detailVOS")==null){
598
+            modelMap.put("msg","缺少库房信息");
599
+            return modelMap;
600
+        }
601
+        List<Map<String,Object>> details = (List<Map<String,Object>>)recordInfo.get("detailVOS");
540 602
         for (Map<String, Object> detail : details) {
541 603
             TFumigationForrecord fumigationForrecord = new TFumigationForrecord();
542 604
             String uuid = ParameterUtil.getCode();
@@ -550,53 +612,162 @@ public class FumigationForRecordController {
550 612
             fumigationForrecord.setLyccdwfzr(lyccdwfzr);
551 613
             fumigationForrecord.setLyccdw(lyccdw);
552 614
             fumigationForrecord.setYlccdwlxdh(ylccdwlxdh);
553
-            fumigationForrecord.setFumigationStart(format.parse(fumigationStart));
554
-            fumigationForrecord.setFumigationEnd(format.parse(fumigationEnd));
615
+            if(fumigationStart!=null){
616
+                fumigationForrecord.setFumigationStart(format.parse(fumigationStart));
617
+            }
618
+            if(fumigationEnd!=null){
619
+                fumigationForrecord.setFumigationEnd(format.parse(fumigationEnd));
620
+            }
555 621
             fumigationForrecord.setSqr(creater);
556
-            fumigationForrecord.setCreateTime(format.parse(createTime));
557
-            fumigationForrecord.setUpdatetime(format.parse(updateTime));
622
+            if(createTime!=null){
623
+                fumigationForrecord.setCreateTime(format.parse(createTime));
624
+            }
625
+            if(updateTime!=null){
626
+                fumigationForrecord.setUpdatetime(format.parse(updateTime));
627
+            }
558 628
             fumigationForrecord.setEnterpriseOpinion(enterpriseOpinion);
559 629
             fumigationForrecord.setOrgansOpinion(organsOpinion);
560
-            fumigationForrecord.setSpsj(format.parse(spsj));
630
+            if(spsj!=null){
631
+                fumigationForrecord.setSpsj(format.parse(spsj));
632
+                fumigationForrecord.setOutForrecordTime(format.parse(spsj));
633
+            }
561 634
             fumigationForrecord.setSpr(spr);
562 635
             fumigationForrecord.setDeleteState("1");
563
-            fumigationForrecord.setOutForrecordTime(format.parse(spsj));
564 636
             fumigationForrecord.setOutPerson(spr);
565
-            String cfdm = (String)detail.get("cfbh");
566
-            Map<String,Integer> info = fumigationFroRecordService.getByCfdm(cfdm);
567
-            Integer orgId = info.get("orgid");
568
-            Integer houseId = info.get("houseid");
569
-            String cfmc = (String)detail.get("cfmc");
570
-            BigDecimal lssl = new BigDecimal(ObjectUtils.toString(detail.get("kcsl")));
571
-            String lspz = (String)detail.get("lspz");
572
-            String lyxz = (String)detail.get("lsxz");
573
-            String cgxzfs = (String)detail.get("convFumigation");
574
-            String hlxzfs = (String)detail.get("recFumigation");
575
-            Integer xzfs = (Integer)detail.get("xzfs");
576
-            String hlxzynhljsjh = (String)detail.get("recIcCombine");
577
-            String yjmc = (String)detail.get("drugCode");
578
-            String jx = (String)detail.get("drugType");
579
-            BigDecimal nd = new BigDecimal(ObjectUtils.toString(detail.get("drugConcentration")));;
580
-            String syff = (String)detail.get("applicationMethod");
581
-            Integer lqsl = (Integer)detail.get("getNumber");
582
-            BigDecimal lddwyyl = new BigDecimal(ObjectUtils.toString(detail.get("grainDosage")));
583
-            BigDecimal kjdwyyl = new BigDecimal(ObjectUtils.toString(detail.get("spaceDosage")));
584
-            BigDecimal zyyl = new BigDecimal(ObjectUtils.toString(detail.get("totalDosage")));
585
-            String hcjcdh = (String)detail.get("pestNo");
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
-            String processingInstructions =(String)detail.get("processingInstructions");
637
+            String cfdm = null;
638
+            Integer orgId =null;
639
+            Integer houseId =null;
640
+            String cfmc = null;
641
+            BigDecimal lssl = null;
642
+            String lspz = null;
643
+            String lyxz = null;
644
+            String cgxzfs = null;
645
+            String hlxzfs = null;
646
+            Integer xzfs = null;
647
+            String hlxzynhljsjh = null;
648
+            String yjmc = null;
649
+            String jx =null;
650
+            BigDecimal nd =null;
651
+            String syff = null;
652
+            Integer lqsl = null;
653
+            BigDecimal lddwyyl = null;
654
+            BigDecimal kjdwyyl = null;
655
+            BigDecimal zyyl = null;
656
+            String hcjcdh = null;
657
+            BigDecimal lysf = null;
658
+            String dzfs = null;
659
+            String east = null;
660
+            String west = null;
661
+            String south = null;
662
+            String north = null;
663
+            String yjyxq = null;
664
+            String lqr = null;
665
+            String lqsj = null;
666
+            String xzzhr = null;
667
+            Integer xzrs = null;
668
+            String xzczry = null;
669
+            String processingInstructions = null;
670
+            if(detail.get("cfbh")!=null){
671
+                cfdm = (String)detail.get("cfbh");
672
+                Map<String,Integer> info = fumigationFroRecordService.getByCfdm(cfdm);
673
+                if(info!=null){
674
+                    orgId = info.get("orgid");
675
+                    houseId = info.get("houseid");
676
+                }else{
677
+                    modelMap.put("msg","未获取到仓房对应org信息和house信息");
678
+                    return modelMap;
679
+                }
680
+            }
681
+            if(detail.get("cfmc")!=null){
682
+                cfmc = (String)detail.get("cfmc");
683
+            }
684
+            if(detail.get("kcsl")!=null){
685
+                lssl = new BigDecimal(ObjectUtils.toString(detail.get("kcsl")));
686
+            }
687
+            if(detail.get("lspzCode")!=null){
688
+                lspz = ObjectUtils.toString(detail.get("lspzCode"));
689
+            }
690
+            if(detail.get("lsxzCode")!=null){
691
+                lyxz = ObjectUtils.toString(detail.get("lsxzCode"));
692
+            }
693
+            if(detail.get("convFumigation")!=null){
694
+                cgxzfs = (String)detail.get("convFumigation");
695
+            }
696
+            if(detail.get("recFumigation")!=null){
697
+                hlxzfs = (String)detail.get("recFumigation");
698
+            }
699
+            if(detail.get("xzfs")!=null){
700
+                xzfs = (Integer)detail.get("xzfs");
701
+            }
702
+            if(detail.get("recIcCombine")!=null){
703
+                hlxzynhljsjh = (String)detail.get("recIcCombine");
704
+            }
705
+            if(detail.get("drugNameCode")!=null){
706
+                yjmc = ObjectUtils.toString(detail.get("drugNameCode"));
707
+            }
708
+            if(detail.get("drugTypeCode")!=null){
709
+                jx = ObjectUtils.toString(detail.get("drugTypeCode"));
710
+            }
711
+            if(detail.get("drugConcentration")!=null){
712
+                nd = new BigDecimal(ObjectUtils.toString(detail.get("drugConcentration")));;
713
+            }
714
+            if(detail.get("applicationMethod")!=null){
715
+                syff = (String)detail.get("applicationMethod");
716
+            }
717
+            if(detail.get("getNumber")!=null){
718
+                lqsl = (Integer)detail.get("getNumber");
719
+            }
720
+            if(detail.get("grainDosage")!=null){
721
+                lddwyyl = new BigDecimal(ObjectUtils.toString(detail.get("grainDosage")));
722
+            }
723
+            if(detail.get("spaceDosage")!=null){
724
+                kjdwyyl = new BigDecimal(ObjectUtils.toString(detail.get("spaceDosage")));
725
+            }
726
+            if(detail.get("totalDosage")!=null){
727
+                zyyl = new BigDecimal(ObjectUtils.toString(detail.get("totalDosage")));
728
+            }
729
+            if(detail.get("pestNo")!=null){
730
+                hcjcdh = (String)detail.get("pestNo");
731
+            }
732
+            if(detail.get("lysf")!=null){
733
+                lysf =new BigDecimal(ObjectUtils.toString(detail.get("lysf")));
734
+            }
735
+            if(detail.get("dzfs")!=null){
736
+                dzfs =(String)detail.get("dzfs");
737
+            }
738
+            if(detail.get("east")!=null){
739
+                east =(String)detail.get("east");
740
+            }
741
+            if(detail.get("west")!=null){
742
+                west =(String)detail.get("west");
743
+            }
744
+            if(detail.get("south")!=null){
745
+                south =(String)detail.get("south");
746
+            }
747
+            if(detail.get("north")!=null){
748
+                north =(String)detail.get("north");
749
+            }
750
+            if(detail.get("yjyxq")!=null){
751
+                yjyxq =(String)detail.get("yjyxq");
752
+            }
753
+            if(detail.get("lqr")!=null){
754
+                lqr =(String)detail.get("lqr");
755
+            }
756
+            if(detail.get("lqsj")!=null){
757
+                lqsj =(String)detail.get("lqsj");
758
+            }
759
+            if(detail.get("xzzhr")!=null){
760
+                xzzhr =(String)detail.get("xzzhr");
761
+            }
762
+            if(detail.get("xzrs")!=null){
763
+                xzrs =(Integer)detail.get("xzrs");
764
+            }
765
+            if(detail.get("xzczry")!=null){
766
+                xzczry =(String)detail.get("xzczry");
767
+            }
768
+            if(detail.get("processingInstructions")!=null){
769
+                processingInstructions =(String)detail.get("processingInstructions");
770
+            }
600 771
             fumigationForrecord.setLysf(lysf);
601 772
             fumigationForrecord.setDzfs(dzfs);
602 773
             fumigationForrecord.setEast(east);
@@ -605,81 +776,91 @@ public class FumigationForRecordController {
605 776
             fumigationForrecord.setStowWay(dzfs);
606 777
             fumigationForrecord.setSyff(syff);
607 778
             fumigationForrecord.setNorth(north);
608
-            fumigationForrecord.setYjyxq(format.parse(yjyxq));
779
+            if(yjyxq!=null){
780
+                fumigationForrecord.setYjyxq(format.parse(yjyxq));
781
+            }
609 782
             fumigationForrecord.setLqr(lqr);
610
-            fumigationForrecord.setLqsj(format.parse(lqsj));
783
+            if(lqsj!=null){
784
+                fumigationForrecord.setLqsj(format.parse(lqsj));
785
+            }
611 786
             fumigationForrecord.setXzzhr(xzzhr);
612 787
             fumigationForrecord.setXzrs(xzrs);
613 788
             fumigationForrecord.setXzczry(xzczry);
614 789
             fumigationForrecord.setProcessingInstructions(processingInstructions);
615
-            List<Map<String,Object>> pest =  (List<Map<String,Object>>)detail.get("pestVOS");
616
-            if(!CollectionUtils.isEmpty(pest)){
617
-                String zyhc = "";
618
-                String ckmd = "";
619
-                for (Map<String, Object> stringObjectMap : pest) {
620
-                    TFumigationPesticide pesticide = new TFumigationPesticide();
621
-                    pesticide.setId(ParameterUtil.getCode());
622
-                    pesticide.setRecordId(uuid);
623
-                    pesticide.setUseDrugType(syff);
624
-                    pesticide.setReagentType(jx);
625
-                    pesticide.setCreateTime(new Date());
626
-                    pesticide.setDrugPurity(nd.toString());
627
-                    if(stringObjectMap.get("pestType") !=null){
628
-                        zyhc +=(String)stringObjectMap.get("pestType")+"#";
629
-                        pesticide.setMajorInsectPests(Integer.valueOf((String)stringObjectMap.get("pestType")));
790
+            if(detail.get("pestVOS")!=null){
791
+                if(detail.get("pestVOS")!=null){
792
+                    List<Map<String,Object>> pest =  (List<Map<String,Object>>)detail.get("pestVOS");
793
+                    if(!CollectionUtils.isEmpty(pest)){
794
+                        String zyhc = "";
795
+                        String ckmd = "";
796
+                        for (Map<String, Object> stringObjectMap : pest) {
797
+                            TFumigationPesticide pesticide = new TFumigationPesticide();
798
+                            pesticide.setId(ParameterUtil.getCode());
799
+                            pesticide.setRecordId(uuid);
800
+                            pesticide.setUseDrugType(syff);
801
+                            pesticide.setReagentType(jx);
802
+                            pesticide.setCreateTime(new Date());
803
+                            pesticide.setDrugPurity(nd.toString());
804
+                            if(stringObjectMap.get("hczlCode") !=null){
805
+                                zyhc +=ObjectUtils.toString(stringObjectMap.get("hczlCode"))+"#";
806
+                                pesticide.setMajorInsectPests(Integer.valueOf(ObjectUtils.toString(stringObjectMap.get("hczlCode"))));
807
+                            }
808
+                            if(stringObjectMap.get("density") !=null){
809
+                                ckmd += (String)stringObjectMap.get("density") + "|";
810
+                                pesticide.setInsectDensity((String)stringObjectMap.get("density"));
811
+                            }
812
+                            if(yjmc!=null){
813
+                                pesticide.setDrugName(Integer.valueOf(yjmc));
814
+                            }
815
+                            if(stringObjectMap.get("discoveryTime")!=null){
816
+                                pesticide.setInsectProductTime(format.parse((String)stringObjectMap.get("discoveryTime")));
817
+                            }
818
+                            if(stringObjectMap.get("happenPosition")!=null){
819
+                                pesticide.setOccurrencePlace((String)stringObjectMap.get("happenPosition"));
820
+                            }
821
+                            if(stringObjectMap.get("pestResistance")!=null){
822
+                                pesticide.setDrugResistance((String)stringObjectMap.get("pestResistance"));
823
+                            }
824
+                            if(stringObjectMap.get("sealType")!=null){
825
+                                pesticide.setSealType((String)stringObjectMap.get("sealType"));
826
+                            }
827
+                            pesticidePlanService.add(pesticide);
828
+                        }
829
+                        zyhc = zyhc.substring(0,zyhc.lastIndexOf("#"));
830
+                        ckmd = ckmd.substring(0,ckmd.lastIndexOf("|"));
831
+                        fumigationForrecord.setZyhc(zyhc);
832
+                        fumigationForrecord.setCkmd(ckmd);
630 833
                     }
631
-                    if(stringObjectMap.get("density") !=null){
632
-                        ckmd += (String)stringObjectMap.get("density") + "|";
633
-                        pesticide.setInsectDensity((String)stringObjectMap.get("density"));
634
-                    }
635
-                    if(yjmc!=null){
636
-                        pesticide.setDrugName(Integer.valueOf(yjmc));
637
-                    }
638
-                    if(stringObjectMap.get("discoveryTime")!=null){
639
-                        pesticide.setInsectProductTime(format.parse((String)stringObjectMap.get("discoveryTime")));
640
-                    }
641
-                    if(stringObjectMap.get("happenPosition")!=null){
642
-                        pesticide.setOccurrencePlace((String)stringObjectMap.get("happenPosition"));
643
-                    }
644
-                    if(stringObjectMap.get("pestResistance")!=null){
645
-                        pesticide.setDrugResistance((String)stringObjectMap.get("pestResistance"));
646
-                    }
647
-                    if(stringObjectMap.get("sealType")!=null){
648
-                        pesticide.setSealType((String)stringObjectMap.get("sealType"));
649
-                    }
650
-                    pesticidePlanService.add(pesticide);
651 834
                 }
652
-                zyhc = zyhc.substring(0,zyhc.lastIndexOf("#"));
653
-                ckmd = ckmd.substring(0,ckmd.lastIndexOf("|"));
654
-                fumigationForrecord.setZyhc(zyhc);
655
-                fumigationForrecord.setCkmd(ckmd);
656
-            }
657
-            List<Map<String,String>> person  =  (List<Map<String,String>>)detail.get("fumigationPersonnelList");
658
-            if(!CollectionUtils.isEmpty(person)){
659
-                for (Map<String, String> stringObjectMap : person) {
660
-                    TFumigationPersonnel personnel = new TFumigationPersonnel();
661
-                    personnel.setDeleteState("1");//默认设置删除标志
662
-                    personnel.setCreateTime(new Date());//创建时间
663
-                    personnel.setId(ParameterUtil.getCode());
664
-                    personnel.setForrecordId(uuid);
665
-                    personnel.setOrgId(orgId);
666
-
667
-                    if(stringObjectMap.get("personnelName") !=null){
668
-                        personnel.setPersonnelName(stringObjectMap.get("personnelName"));
669
-                    }
670
-                    if(stringObjectMap.get("professionalQualification") !=null){
671
-                        personnel.setProfessionalQualification(stringObjectMap.get("professionalQualification"));
672
-                    }
673
-                    if(stringObjectMap.get("physicalCondition") !=null){
674
-                        personnel.setPhysicalCondition(stringObjectMap.get("physicalCondition"));
675
-                    }
676
-                    if(stringObjectMap.get("workTask") !=null){
677
-                        personnel.setWorkTask(stringObjectMap.get("workTask"));
678
-                    }
679
-                    if(stringObjectMap.get("outside") !=null){
680
-                        personnel.setOutside(stringObjectMap.get("outside").equals("1")?"是":"否");
835
+            }
836
+            if(detail.get("fumigationPersonnelList")!=null){
837
+                List<Map<String,String>> person  =  (List<Map<String,String>>)detail.get("fumigationPersonnelList");
838
+                if(!CollectionUtils.isEmpty(person)){
839
+                    for (Map<String, String> stringObjectMap : person) {
840
+                        TFumigationPersonnel personnel = new TFumigationPersonnel();
841
+                        personnel.setDeleteState("1");//默认设置删除标志
842
+                        personnel.setCreateTime(new Date());//创建时间
843
+                        personnel.setId(ParameterUtil.getCode());
844
+                        personnel.setForrecordId(uuid);
845
+                        personnel.setOrgId(orgId);
846
+
847
+                        if(stringObjectMap.get("personnelName") !=null){
848
+                            personnel.setPersonnelName(stringObjectMap.get("personnelName"));
849
+                        }
850
+                        if(stringObjectMap.get("professionalQualification") !=null){
851
+                            personnel.setProfessionalQualification(stringObjectMap.get("professionalQualification"));
852
+                        }
853
+                        if(stringObjectMap.get("physicalCondition") !=null){
854
+                            personnel.setPhysicalCondition(stringObjectMap.get("physicalCondition"));
855
+                        }
856
+                        if(stringObjectMap.get("workTask") !=null){
857
+                            personnel.setWorkTask(stringObjectMap.get("workTask"));
858
+                        }
859
+                        if(stringObjectMap.get("outside") !=null){
860
+                            personnel.setOutside(stringObjectMap.get("outside").equals("1")?"是":"否");
861
+                        }
862
+                        fumigationFroRecordService.addPersonnel(personnel);
681 863
                     }
682
-                    fumigationFroRecordService.addPersonnel(personnel);
683 864
                 }
684 865
             }
685 866
             fumigationForrecord.setCfdm(cfdm);
@@ -697,7 +878,9 @@ public class FumigationForRecordController {
697 878
             fumigationForrecord.setJx(jx);
698 879
             fumigationForrecord.setNd(nd);
699 880
             fumigationForrecord.setSyff(syff);
700
-            fumigationForrecord.setLqsl(new BigDecimal(lqsl));
881
+            if(lqsl!=null){
882
+                fumigationForrecord.setLqsl(new BigDecimal(lqsl));
883
+            }
701 884
             fumigationForrecord.setLddwyyl(lddwyyl);
702 885
             fumigationForrecord.setKjdwyyl(kjdwyyl);
703 886
             fumigationForrecord.setZyyl(zyyl);
@@ -705,7 +888,8 @@ public class FumigationForRecordController {
705 888
             fumigationForrecord.setState(8);
706 889
             fumigationFroRecordService.add(fumigationForrecord);
707 890
         }
708
-
891
+        modelMap.put("msg","新增成功");
892
+        return modelMap;
709 893
         //市级传输过来的审批过后的备案数据
710 894
         /*Map<String, Object> modelMap = new HashMap<>();*/
711 895
         // JSON字符串转对象