Explorar o código

Merge branch 'dev-excel0521' into dev-to-user-1

chenendian hai 1 día
pai
achega
8d83900d80

+ 1 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/StorageController.java

@@ -615,7 +615,7 @@ public class StorageController extends BaseController {
     @GetMapping("/schedule/list")
     public  R<?> scheduleList(
             @RequestParam(value = "sourceType") String sourceType,
-            @RequestParam(value = "nf") String nf,
+            @RequestParam(value = "nf",required = false) String nf,
             @RequestParam(value = "pageNum", required = false) Integer pageNum,
             @RequestParam(value = "pageSize", required = false) Integer pageSize) {
         try {

+ 13 - 12
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/StorageServiceImpl.java

@@ -739,20 +739,21 @@ public class StorageServiceImpl {
         List<Map<String, Object>> shpDataList = shpGeomResult.getData();
         log.info("远程调用geom获取,返回结果:{}", shpDataList);
 
-        int count = 1;
-        for (Map<String, Object> shpData : shpDataList){
-            String sccb = shpData.get("sccb").toString();
-            String scnf = shpData.get("scnf").toString();
-            String scfs = shpData.get("scfs").toString();
-            String ghyt = shpData.get("ghyt").toString();
-            String mj_m = shpData.get("mj_m").toString();
-            if(StringUtils.isBlank(sccb)|| StringUtils.isBlank(scfs) ||StringUtils.isBlank(scnf) || StringUtils.isBlank(ghyt) || StringUtils.isBlank(mj_m)){
-                throw new  ServiceException("关键字段不能为空(sccb,scnf,scfs,ghyt,mj_m),请检查第"+count+"条数据");
+        if("0".equals(sourceType)){ //进行校验
+            int count = 1;
+            for (Map<String, Object> shpData : shpDataList){
+                String sccb = shpData.get("sccb").toString();
+                String scnf = shpData.get("scnf").toString();
+                String scfs = shpData.get("scfs").toString();
+                String ghyt = shpData.get("ghyt").toString();
+                String mj_m = shpData.get("mj_m").toString();
+                if(StringUtils.isBlank(sccb)|| StringUtils.isBlank(scfs) ||StringUtils.isBlank(scnf) || StringUtils.isBlank(ghyt) || StringUtils.isBlank(mj_m)){
+                    throw new  ServiceException("关键字段不能为空(sccb,scnf,scfs,ghyt,mj_m),请检查第"+count+"条数据");
+                }
+                count++;
             }
-            count++;
         }
 
-
         if("0".equals(addType)){
             //这里把当前表清空,重新写入;
             gjShouchuJihuaMapper.deleteByTable("gj_shouchu_xiangmu","",sourceType);
@@ -925,7 +926,7 @@ public class StorageServiceImpl {
                 gjShouchuJihuaMapper.deleteByTableYear("gj_shouchu_xiangmu_shiji","2",year);
             }
         }else if(type.equalsIgnoreCase("supply")){
-            gongdiJihuaMapper.deleteByTableYear("gj_gongdi_xiangmu_jihua","2",year);
+            gongdiJihuaMapper.deleteByTableYear("gj_gongdi_xiangmu_jihua","1",year);
         }
     }
 

+ 1 - 1
siwei-modules/siwei-apply/src/main/resources/mapper/GongdiJihuaMapper.xml

@@ -246,7 +246,7 @@
         WHERE 1=1
         <choose>
             <when test="'1'.toString().equals(type) and year != null and year != '' and year != '0'">
-                AND scnf = #{year}
+                AND nf = #{year}
             </when>
             <otherwise>
                 AND gid = 0