hfxc226 3 years ago
parent
commit
8401d72bd5

+ 16 - 6
platform-rest/src/main/java/com/platform/rest/controller/repair/RepairApplicationFormController.java

@@ -270,29 +270,39 @@ public class RepairApplicationFormController {
         List<RepairApplicationFormVO> list = repairApplicationFormService.getVOListByDTO(repairApplicationFormDTO);
         List<ExportRepairApplicationFormVO> excelList = new ArrayList<>();
         for (RepairApplicationFormVO vo : list) {
-            ExportRepairApplicationFormVO excel =  BeanConverterUtil.copyObjectProperties(vo, ExportRepairApplicationFormVO.class);
+            ExportRepairApplicationFormVO excel = BeanConverterUtil.copyObjectProperties(vo, ExportRepairApplicationFormVO.class);
             excelList.add(excel);
-            if(vo.getChangeRepairPlan() != null && vo.getChangeRepairPlan()){
+            boolean find = false;
+            if (vo.getChangeRepairPlan() != null && vo.getChangeRepairPlan()) {
+                find = true;
                 excel.setChangeRepairPlan("更新维修计划");
                 excel.setChangeRepairPlanContent(vo.getChangeRepairPlanContent());
             }
-            if(vo.getChangeSparePlan() != null && vo.getChangeSparePlan()){
+            if (vo.getChangeSparePlan() != null && vo.getChangeSparePlan()) {
+                find = true;
                 excel.setChangeRepairPlan("更新备件计划");
                 excel.setChangeRepairPlanContent(vo.getChangeSparePlanContent());
             }
-            if(vo.getUserTeach() != null && vo.getUserTeach() ){
+            if (vo.getUserTeach() != null && vo.getUserTeach()) {
+                find = true;
                 excel.setChangeRepairPlan("人员培训");
                 excel.setChangeRepairPlanContent(vo.getUserTeachContent());
 
             }
-            if(vo.getSbChange() != null && vo.getSbChange()){
+            if (vo.getSbChange() != null && vo.getSbChange()) {
+                find = true;
                 excel.setChangeRepairPlan("设备改造升级");
                 excel.setChangeRepairPlanContent(vo.getSbChangeContent());
             }
-            if(vo.getOtherChange() != null && vo.getOtherChange()){
+            if (vo.getOtherChange() != null && vo.getOtherChange()) {
+                find = true;
                 excel.setChangeRepairPlan("其他");
                 excel.setChangeRepairPlanContent(vo.getOtherChangeContent());
             }
+            if (!find) {
+                excel.setChangeRepairPlan("无");
+                excel.setChangeRepairPlanContent("无");
+            }
         }
         ExcelUtil.exportResponseDict(response, ExportRepairApplicationFormVO.class, excelList, "维修工单");
     }

+ 1 - 1
platform-service/src/main/java/com/platform/service/check/impl/CheckJobServiceImpl.java

@@ -1241,7 +1241,7 @@ public class CheckJobServiceImpl extends BaseServiceImpl<CheckJobMapper, CheckJo
             LocalDate localDate = LocalDate.now();
             int year = localDate.getYear();
             // 如2021-10-15号码,则month=10,需要计算到11月份,需要加1
-            int month = localDate.getMonthValue() + 1;
+            int month = localDate.getMonthValue();
             if(searchYear<year){
                 month = 12;
                 year = searchYear;

+ 2 - 2
platform-service/src/main/java/com/platform/service/repair/impl/RepairApplicationFormServiceImpl.java

@@ -747,7 +747,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             LocalDate localDate = LocalDate.now();
             int year = localDate.getYear();
             // 如2021-10-15号码,则month=10,需要计算到11月份,需要加1
-            int month = localDate.getMonthValue() + 1;
+            int month = localDate.getMonthValue();
             if (searchYear < year) {
                 month = 12;
                 year = searchYear;
@@ -814,7 +814,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
             LocalDate localDate = LocalDate.now();
             int year = localDate.getYear();
             // 如2021-10-15号码,则month=10,需要计算到11月份,需要加1
-            int month = localDate.getMonthValue() + 1;
+            int month = localDate.getMonthValue();
             if (searchYear < year) {
                 month = 12;
                 year = searchYear;

+ 1 - 1
platform-service/src/main/java/com/platform/service/repair/impl/RepairFeeServiceImpl.java

@@ -149,7 +149,7 @@ public class RepairFeeServiceImpl extends BaseServiceImpl<RepairFeeMapper, Repai
             LocalDate localDate = LocalDate.now();
             int year = localDate.getYear();
             // 如2021-10-15号码,则month=10,需要计算到11月份,需要加1
-            int month = localDate.getMonthValue() + 1;
+            int month = localDate.getMonthValue();
             if (searchYear < year) {
                 month = 12;
                 year = searchYear;