Bladeren bron

-修改:月度检查查询

jiangbiao 2 jaren geleden
bovenliggende
commit
d92bcbea12

+ 0 - 9
master/src/main/java/com/ruoyi/project/production/controller/TFivesMonthlyInspectionController.java

@@ -14,7 +14,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
@@ -37,15 +36,7 @@ public class TFivesMonthlyInspectionController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo list(TFivesMonthlyInspection tFivesMonthlyInspection) {
         startPage();
-        Calendar cal = Calendar.getInstance();
-        if (tFivesMonthlyInspection.getYear() == null) {
-            tFivesMonthlyInspection.setYear((long) cal.get(Calendar.YEAR));
-        }
         List<TFivesMonthlyInspection> list = tFivesMonthlyInspectionService.selectTFivesMonthlyInspectionList(tFivesMonthlyInspection);
-        if (CollectionUtils.isEmpty(list)) {
-            tFivesMonthlyInspection.setYear((long) (cal.get(Calendar.YEAR) - 1));
-            list = tFivesMonthlyInspectionService.selectTFivesMonthlyInspectionList(tFivesMonthlyInspection);
-        }
         return getDataTable(list);
     }
 

+ 1 - 0
ui/src/views/production/inspection/index.vue

@@ -537,6 +537,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.year=new Date();
       this.handleQuery();
     },
     // 多选框选中数据