ly 1 سال پیش
والد
کامیت
8e09166260

+ 12 - 5
src/main/java/cn/ezhizao/project/business/deduction/controller/DeductionController.java

@@ -155,6 +155,7 @@ public class DeductionController extends BaseController {
         boolean bool = fileStorageService.removeById(fileStorage);
         return bool ? success(fileStorage) : error();
     }
+
     private boolean addRecord(Long workOrderId, String year, String month, Long recorderId, String description, Integer status) {
         // 没拆分合同单价
         List<BizWorkOrderRecord> records = bizWorkOrderRecordService.query().eq("work_order_id", workOrderId).eq("year", year).eq("month", month).eq("from_id", 0).list();
@@ -195,19 +196,25 @@ public class DeductionController extends BaseController {
         }
     }
 
+    @PostMapping("/saveFiles")
+    public AjaxResult saveFiles(@RequestBody SysFileStorage fileStorageList) {
+
+        return fileStorageService.save(fileStorageList) ? success() : error();
+    }
+
+
     /**
      * 导出划款列表
      */
     @PreAuthorize("@ss.hasPermi('business:deduction:export')")
     @Log(title = "划款任务", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, BizDeduction bizDeduction) throws NoSuchFieldException, IllegalAccessException
-    {
+    public void export(HttpServletResponse response, BizDeduction bizDeduction) throws NoSuchFieldException, IllegalAccessException {
         setTenantId(bizDeduction);
         startOrderBy();
         List<BizDeduction> list = deductionService.getListByBean(bizDeduction);
-        for(BizDeduction l : list){
-            l.setCurrentMonth(l.getYear()+"-"+l.getMonth());
+        for (BizDeduction l : list) {
+            l.setCurrentMonth(l.getYear() + "-" + l.getMonth());
             //设置状态
             switch (l.getStatus()) {
                 case 0:
@@ -268,5 +275,5 @@ public class DeductionController extends BaseController {
                 break;
         }
         return success(map);
-     }
+    }
 }

+ 2 - 0
src/main/java/cn/ezhizao/project/system/domain/SysFileStorage.java

@@ -45,4 +45,6 @@ public class SysFileStorage extends BaseEntity
     @ApiModelProperty(value = "类型")
     private String type;
 
+    private Integer supplement;
+
 }