wangming преди 11 месеца
родител
ревизия
dde1312774

+ 8 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/LuckysheetService.java

@@ -2,6 +2,7 @@ package com.rongwei.bscommon.sys.service;
 
 import com.rongwei.bsentity.domain.LuckysheetDo;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.dto.luckysheet.UpdateFilterSelectRequest;
 import com.rongwei.bsentity.dto.project.UpdateDataVerificationRequest;
 
 /**
@@ -29,4 +30,11 @@ public interface LuckysheetService extends IService<LuckysheetDo> {
      */
     void updateDataVerification(UpdateDataVerificationRequest req);
 
+    /**
+     * 修改筛选
+     *
+     * @param req
+     */
+    void updateFilterSelect(UpdateFilterSelectRequest req);
+
 }

+ 21 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/LuckysheetServiceImpl.java

@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.rongwei.bsentity.domain.ZhcxProjectManageDo;
 import com.rongwei.bsentity.domain.ZhcxProjectManageRectifyBatchDo;
 import com.rongwei.bsentity.dto.luckysheet.CoverageUpdateJsonDataRequest;
+import com.rongwei.bsentity.dto.luckysheet.UpdateFilterSelectRequest;
 import com.rongwei.bsentity.dto.project.ProjectSummaryParamExcelDto;
 import com.rongwei.bsentity.dto.project.UpdateDataVerificationRequest;
 import com.rongwei.rwcommon.base.exception.CustomException;
@@ -95,6 +96,26 @@ public class LuckysheetServiceImpl extends ServiceImpl<LuckysheetDao, Luckysheet
         luckySheetService.updateJsonData(updateReq);
     }
 
+    /**
+     * 修改筛选
+     *
+     * @param req
+     */
+    @Override
+    public void updateFilterSelect(UpdateFilterSelectRequest req) {
+        JSONObject whereObj = new JSONObject();
+        whereObj.put("list_id", req.getListId());
+        whereObj.put("block_id", "fblock");
+        whereObj.put("index", 1);
+
+        CoverageUpdateJsonDataRequest updateReq = CoverageUpdateJsonDataRequest.builder()
+                .key("filter_select")
+                .value(req.getFilterSelect())
+                .andWhereObj(whereObj)
+                .build();
+        luckySheetService.updateJsonData(updateReq);
+    }
+
     /**
      * 组装
      *

+ 16 - 0
business-entity/src/main/java/com/rongwei/bsentity/dto/luckysheet/UpdateFilterSelectRequest.java

@@ -0,0 +1,16 @@
+package com.rongwei.bsentity.dto.luckysheet;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.*;
+
+@Setter
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class UpdateFilterSelectRequest {
+
+    private String listId;
+
+    private JSONObject filterSelect;
+}

+ 14 - 0
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxProjectManageController.java

@@ -6,6 +6,7 @@ import com.rongwei.bscommon.sys.service.ZhcxProjectManageRectifyBatchService;
 import com.rongwei.bscommon.sys.service.ZhcxProjectManageService;
 import com.rongwei.bsentity.domain.ZhcxProjectManageDo;
 import com.rongwei.bsentity.domain.ZhcxProjectManageRectifyBatchDo;
+import com.rongwei.bsentity.dto.luckysheet.UpdateFilterSelectRequest;
 import com.rongwei.bsentity.dto.project.DelProjectSummaryDto;
 import com.rongwei.bsentity.dto.project.ExportProjectSummaryDto;
 import com.rongwei.bsentity.dto.project.SavePorjectSummaryDto;
@@ -109,6 +110,19 @@ public class ZhcxProjectManageController {
         return R.ok();
     }
 
+    /**
+     * 更新excel筛选
+     *
+     * @param req
+     * @return
+     */
+    @PostMapping("/updateFilterSelect")
+    @ApiOperation("更新excel筛选")
+    public R updateFilterSelect(@RequestBody UpdateFilterSelectRequest req) {
+        luckysheetService.updateFilterSelect(req);
+        return R.ok();
+    }
+
     @PostMapping("/getRectifyReportData")
     @ApiOperation("获取整改报表数据")
     public R getRectifyReportData(@RequestBody Map<String,Object> map) {