diff --git a/bonus-business/src/main/java/com/bonus/business/controller/tool/WorkloadAndCarSummaryExcelExporter.java b/bonus-business/src/main/java/com/bonus/business/controller/tool/WorkloadAndCarSummaryExcelExporter.java index bd000d6..b18b061 100644 --- a/bonus-business/src/main/java/com/bonus/business/controller/tool/WorkloadAndCarSummaryExcelExporter.java +++ b/bonus-business/src/main/java/com/bonus/business/controller/tool/WorkloadAndCarSummaryExcelExporter.java @@ -8,6 +8,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; import javax.servlet.http.HttpServletResponse; import java.io.OutputStream; +import java.math.BigDecimal; import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; @@ -287,14 +288,14 @@ public class WorkloadAndCarSummaryExcelExporter { // 工作量合计 createCell(totalRow, COL_A, "合计", totalStyle); - int workloadTotal = 0; - int settlementWorkloadTotal = 0; + BigDecimal workloadTotal = BigDecimal.ZERO; + BigDecimal settlementWorkloadTotal = BigDecimal.ZERO; for (WorkloadSummaryExcelVo vo : workloadData) { if (vo != null && vo.getTotalAmount() != null) { - workloadTotal += vo.getTotalAmount(); + workloadTotal = workloadTotal.add(vo.getTotalAmount()); } if (vo != null && vo.getSettlementTotalAmount() != null) { - settlementWorkloadTotal += vo.getSettlementTotalAmount(); + settlementWorkloadTotal = settlementWorkloadTotal.add(vo.getSettlementTotalAmount()); } } createCell(totalRow, COL_G, workloadTotal, totalStyle); @@ -365,6 +366,16 @@ public class WorkloadAndCarSummaryExcelExporter { } else if (value instanceof Integer) { cell.setCellValue((Integer) value); } + // 扩展支持BigDecimal(若VO中金额为BigDecimal类型) + else if (value instanceof java.math.BigDecimal) { + cell.setCellValue(((java.math.BigDecimal) value).doubleValue()); + } + // 扩展支持Long/Double(按需添加) + else if (value instanceof Long) { + cell.setCellValue((Long) value); + } else if (value instanceof Double) { + cell.setCellValue((Double) value); + } cell.setCellStyle(style); } } diff --git a/bonus-business/src/main/java/com/bonus/business/controller/tool/WorkloadSummaryExcelExporter.java b/bonus-business/src/main/java/com/bonus/business/controller/tool/WorkloadSummaryExcelExporter.java index 435a6de..8f107d1 100644 --- a/bonus-business/src/main/java/com/bonus/business/controller/tool/WorkloadSummaryExcelExporter.java +++ b/bonus-business/src/main/java/com/bonus/business/controller/tool/WorkloadSummaryExcelExporter.java @@ -7,6 +7,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; import javax.servlet.http.HttpServletResponse; import java.io.OutputStream; +import java.math.BigDecimal; import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; @@ -23,9 +24,9 @@ import java.util.List; public class WorkloadSummaryExcelExporter { // 列索引常量(仅保留工作量相关列) - private static final int COL_A = 0, COL_B = 1, COL_C = 2, COL_D = 3, COL_E = 4, COL_F = 5; + private static final int COL_A = 0, COL_B = 1, COL_C = 2, COL_D = 3, COL_E = 4, COL_F = 5, COL_G = 6, COL_H = 7; // 标题行涉及的列范围(A-F) - private static final int[] TITLE_COLS = {COL_A, COL_B, COL_C, COL_D, COL_E, COL_F}; + private static final int[] TITLE_COLS = {COL_A, COL_B, COL_C, COL_D, COL_E, COL_F, COL_G, COL_H}; /** * 导出方法(仅工作量表格,支持单日/区间标题) @@ -205,8 +206,10 @@ public class WorkloadSummaryExcelExporter { createCell(row1, COL_B, "运检站", headerStyle); createCell(row1, COL_C, "工作量类型", headerStyle); createCell(row1, COL_D, "工作量", headerStyle); - createCell(row1, COL_E, "单价", headerStyle); - createCell(row1, COL_F, "合计", headerStyle); + createCell(row1, COL_E, "绩效单价", headerStyle); + createCell(row1, COL_F, "结算单价", headerStyle); + createCell(row1, COL_G, "绩效合计", headerStyle); + createCell(row1, COL_H, "结算合计", headerStyle); } /** @@ -225,7 +228,9 @@ public class WorkloadSummaryExcelExporter { createCell(row, COL_C, workloadVo.getWorkloadCategoryName() == null ? "" : workloadVo.getWorkloadCategoryName(), contentStyle); createCell(row, COL_D, workloadVo.getTotalWorkload() == null ? 0 : workloadVo.getTotalWorkload(), contentStyle); createCell(row, COL_E, workloadVo.getUnitPrice() == null ? 0 : workloadVo.getUnitPrice(), contentStyle); - createCell(row, COL_F, workloadVo.getTotalAmount() == null ? 0 : workloadVo.getTotalAmount(), contentStyle); + createCell(row, COL_F, workloadVo.getSettlementUnitPrice() == null ? 0 : workloadVo.getSettlementUnitPrice(), contentStyle); + createCell(row, COL_G, workloadVo.getTotalAmount() == null ? 0 : workloadVo.getTotalAmount(), contentStyle); + createCell(row, COL_H, workloadVo.getSettlementTotalAmount() == null ? 0 : workloadVo.getSettlementTotalAmount(), contentStyle); } } @@ -237,19 +242,24 @@ public class WorkloadSummaryExcelExporter { // 工作量合计 createCell(totalRow, COL_A, "合计", totalStyle); - int workloadTotal = 0; + BigDecimal workloadTotal = BigDecimal.ZERO; + BigDecimal settlementWorkloadTotal = BigDecimal.ZERO; for (WorkloadSummaryExcelVo vo : workloadData) { if (vo != null && vo.getTotalAmount() != null) { - workloadTotal += vo.getTotalAmount(); + workloadTotal = workloadTotal.add(vo.getTotalAmount()); + } + if (vo != null && vo.getSettlementTotalAmount() != null) { + settlementWorkloadTotal = settlementWorkloadTotal.add(vo.getSettlementTotalAmount()); } } - createCell(totalRow, COL_F, workloadTotal, totalStyle); - + createCell(totalRow, COL_G, workloadTotal, totalStyle); + createCell(totalRow, COL_H, settlementWorkloadTotal, totalStyle); // 合计行其他单元格填充空值+样式 createCell(totalRow, COL_B, "", totalStyle); createCell(totalRow, COL_C, "", totalStyle); createCell(totalRow, COL_D, "", totalStyle); createCell(totalRow, COL_E, "", totalStyle); + createCell(totalRow, COL_F, "", totalStyle); } /** @@ -257,9 +267,9 @@ public class WorkloadSummaryExcelExporter { */ private static void setMergedRegions(Sheet sheet, int totalRowNum) { // 一级标题合并(A0-F0) - sheet.addMergedRegion(new CellRangeAddress(0, 0, COL_A, COL_F)); + sheet.addMergedRegion(new CellRangeAddress(0, 0, COL_A, COL_H)); // 合计行合并(A{totalRowNum}-E{totalRowNum}) - sheet.addMergedRegion(new CellRangeAddress(totalRowNum, totalRowNum, COL_A, COL_E)); + sheet.addMergedRegion(new CellRangeAddress(totalRowNum, totalRowNum, COL_A, COL_F)); } /** diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/InspectionStationController.java b/bonus-business/src/main/java/com/bonus/digital/controller/InspectionStationController.java index cf7829d..302ea0f 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/InspectionStationController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/InspectionStationController.java @@ -81,6 +81,8 @@ public class InspectionStationController extends BaseController { return AjaxResult.error("运检站下有计划,请勿删除"); } else if (res == 4) { return AjaxResult.error("请先删除填报人员"); + } else if (res == 5) { + return AjaxResult.error("运检站下有合同,请勿删除"); } else { return AjaxResult.error("删除失败"); } diff --git a/bonus-business/src/main/java/com/bonus/digital/dao/DayPlanStatisticsVo.java b/bonus-business/src/main/java/com/bonus/digital/dao/DayPlanStatisticsVo.java index 246b58d..5f8b3cb 100644 --- a/bonus-business/src/main/java/com/bonus/digital/dao/DayPlanStatisticsVo.java +++ b/bonus-business/src/main/java/com/bonus/digital/dao/DayPlanStatisticsVo.java @@ -33,10 +33,10 @@ public class DayPlanStatisticsVo { private List jjSubWorkNumStatisticsList; /**车辆统计-运检业务*/ - private List YJCarNumStatisticsList; + private List yJCarNumStatisticsList; /**车辆统计-基建业务*/ - private List JJCarNumStatisticsList; + private List jJCarNumStatisticsList; /**工作量清单*/ private List workLoadList; diff --git a/bonus-business/src/main/java/com/bonus/digital/dao/MonthlyPlanVo.java b/bonus-business/src/main/java/com/bonus/digital/dao/MonthlyPlanVo.java index 7ca81fd..dce9473 100644 --- a/bonus-business/src/main/java/com/bonus/digital/dao/MonthlyPlanVo.java +++ b/bonus-business/src/main/java/com/bonus/digital/dao/MonthlyPlanVo.java @@ -2,6 +2,7 @@ package com.bonus.digital.dao; import lombok.Data; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -170,7 +171,7 @@ public class MonthlyPlanVo { /** * 单价 */ - private Integer unitPrice; + private BigDecimal unitPrice; /** * 工作量类别 @@ -185,7 +186,7 @@ public class MonthlyPlanVo { /** * 合计金额 */ - private Integer totalAmount; + private BigDecimal totalAmount; private Integer totalManageCarDays; @@ -216,11 +217,11 @@ public class MonthlyPlanVo { /** * 结算单价(元) */ - private int settlementUnitPrice; + private BigDecimal settlementUnitPrice; /** * 结算合计(元) */ - private Integer settlementTotalAmount; + private BigDecimal settlementTotalAmount; } diff --git a/bonus-business/src/main/java/com/bonus/digital/dao/WorkloadSummaryExcelVo.java b/bonus-business/src/main/java/com/bonus/digital/dao/WorkloadSummaryExcelVo.java index f3c5409..d3fb27e 100644 --- a/bonus-business/src/main/java/com/bonus/digital/dao/WorkloadSummaryExcelVo.java +++ b/bonus-business/src/main/java/com/bonus/digital/dao/WorkloadSummaryExcelVo.java @@ -4,6 +4,8 @@ import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.Data; +import java.math.BigDecimal; + /** * 工作量清单导出Vo(数据行) * 适配模板:A-F列(索引0-5) @@ -28,17 +30,17 @@ public class WorkloadSummaryExcelVo { @ExcelProperty(value = "绩效单价", index = 4) // E列 @ColumnWidth(10) - private Integer unitPrice; + private BigDecimal unitPrice; @ExcelProperty(value = "结算单价", index = 5) // G列 @ColumnWidth(10) - private Integer settlementUnitPrice; + private BigDecimal settlementUnitPrice; @ExcelProperty(value = "绩效合计", index = 6) // F列 @ColumnWidth(12) - private Integer totalAmount; + private BigDecimal totalAmount; @ExcelProperty(value = "结算合计", index = 7) // H列 @ColumnWidth(10) - private Integer settlementTotalAmount; + private BigDecimal settlementTotalAmount; } diff --git a/bonus-business/src/main/java/com/bonus/digital/mapper/InspectionStationMapper.java b/bonus-business/src/main/java/com/bonus/digital/mapper/InspectionStationMapper.java index 0d0fc2a..918f392 100644 --- a/bonus-business/src/main/java/com/bonus/digital/mapper/InspectionStationMapper.java +++ b/bonus-business/src/main/java/com/bonus/digital/mapper/InspectionStationMapper.java @@ -1,5 +1,6 @@ package com.bonus.digital.mapper; +import com.bonus.digital.dao.ContractVo; import com.bonus.digital.dao.InspectionStationVo; import java.util.List; @@ -28,4 +29,6 @@ public interface InspectionStationMapper { InspectionStationVo getInspectionStationDetail(InspectionStationVo inspectionStationVo); InspectionStationVo getInspectionStation(InspectionStationVo inspectionStationVo); + + List getContract(InspectionStationVo inspectionStationVo); } diff --git a/bonus-business/src/main/java/com/bonus/digital/service/impl/DayPlanServiceImpl.java b/bonus-business/src/main/java/com/bonus/digital/service/impl/DayPlanServiceImpl.java index e305a7b..f2844c9 100644 --- a/bonus-business/src/main/java/com/bonus/digital/service/impl/DayPlanServiceImpl.java +++ b/bonus-business/src/main/java/com/bonus/digital/service/impl/DayPlanServiceImpl.java @@ -10,6 +10,8 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -120,8 +122,11 @@ public class DayPlanServiceImpl implements DayPlanService { exportVo.setInspectionStationName(vo.getInspectionStationName()); // 运检站 exportVo.setWorkloadCategoryName(vo.getWorkloadCategoryName()); // 工作量类别 exportVo.setTotalWorkload(vo.getTotalWorkload()); // 总工作量 - exportVo.setUnitPrice(vo.getUnitPrice()); // 单价 - exportVo.setTotalAmount(vo.getTotalAmount()); // 合计金额 + exportVo.setUnitPrice(vo.getUnitPrice().divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP)); // 绩效单价 + exportVo.setTotalAmount(vo.getTotalAmount().divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP)); // 合计金额 + exportVo.setSettlementUnitPrice(vo.getSettlementUnitPrice().divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP));// 结算单价 + exportVo.setSettlementTotalAmount(vo.getSettlementTotalAmount().divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP));//结算合计 + exportList.add(exportVo); } diff --git a/bonus-business/src/main/java/com/bonus/digital/service/impl/InspectionStationServiceImpl.java b/bonus-business/src/main/java/com/bonus/digital/service/impl/InspectionStationServiceImpl.java index a3fc839..a4a9cc0 100644 --- a/bonus-business/src/main/java/com/bonus/digital/service/impl/InspectionStationServiceImpl.java +++ b/bonus-business/src/main/java/com/bonus/digital/service/impl/InspectionStationServiceImpl.java @@ -3,6 +3,7 @@ package com.bonus.digital.service.impl; import com.bonus.common.core.domain.entity.SysUser; import com.bonus.common.utils.SecurityUtils; import com.bonus.common.utils.StringUtils; +import com.bonus.digital.dao.ContractVo; import com.bonus.digital.dao.InspectionStationVo; import com.bonus.digital.dao.PersonnelVo; import com.bonus.digital.dao.PlanManagementVo; @@ -84,6 +85,11 @@ public class InspectionStationServiceImpl implements InspectionStationService { if (StringUtils.isNotEmpty(userList)) { return 4; } + + List contractVoList = inspectionStationMapper.getContract(inspectionStationVo); + if (StringUtils.isNotEmpty(contractVoList)) { + return 5; + } return inspectionStationMapper.delInspectionStation(inspectionStationVo); } diff --git a/bonus-business/src/main/java/com/bonus/digital/service/impl/MonthlyPlanServiceImpl.java b/bonus-business/src/main/java/com/bonus/digital/service/impl/MonthlyPlanServiceImpl.java index edf9fbd..c838e05 100644 --- a/bonus-business/src/main/java/com/bonus/digital/service/impl/MonthlyPlanServiceImpl.java +++ b/bonus-business/src/main/java/com/bonus/digital/service/impl/MonthlyPlanServiceImpl.java @@ -185,7 +185,9 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService { // 关键:设置人员安排表的日期(支持多个日期) List arrangeDays = new ArrayList<>(); arrangeDays.add(arrangeDay); - // 若同一人员有多个安排日期,合并到arrangeDays(需根据实际业务调整) + exportVo.setArrangeDays(arrangeDays); + plannedList.add(exportVo); + /*// 若同一人员有多个安排日期,合并到arrangeDays(需根据实际业务调整) Optional existVo = plannedList.stream() .filter(v -> v.getName().equals(personnel.getName()) && v.getInspectionStationName().equals(planVo.getInspectionStationName())) @@ -193,9 +195,8 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService { if (existVo.isPresent()) { existVo.get().getArrangeDays().add(arrangeDay); } else { - exportVo.setArrangeDays(arrangeDays); - plannedList.add(exportVo); - } + + }*/ } } } @@ -222,10 +223,10 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService { exportVo.setInspectionStationName(vo.getInspectionStationName()); // 运检站 exportVo.setWorkloadCategoryName(vo.getWorkloadCategoryName()); // 工作量类别 exportVo.setTotalWorkload(vo.getTotalWorkload()); // 总工作量 - exportVo.setUnitPrice(vo.getUnitPrice()/100); // 绩效单价 - exportVo.setTotalAmount(vo.getTotalAmount()/100); // 合计金额 - exportVo.setSettlementUnitPrice(vo.getSettlementUnitPrice()/100);// 结算单价 - exportVo.setSettlementTotalAmount(vo.getSettlementTotalAmount()/100);//结算合计 + exportVo.setUnitPrice(vo.getUnitPrice().divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP)); // 绩效单价 + exportVo.setTotalAmount(vo.getTotalAmount().divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP)); // 合计金额 + exportVo.setSettlementUnitPrice(vo.getSettlementUnitPrice().divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP));// 结算单价 + exportVo.setSettlementTotalAmount(vo.getSettlementTotalAmount().divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP));//结算合计 exportList.add(exportVo); } diff --git a/bonus-business/src/main/java/com/bonus/digital/service/impl/PlanManagementServiceImpl.java b/bonus-business/src/main/java/com/bonus/digital/service/impl/PlanManagementServiceImpl.java index b1d672a..9348f86 100644 --- a/bonus-business/src/main/java/com/bonus/digital/service/impl/PlanManagementServiceImpl.java +++ b/bonus-business/src/main/java/com/bonus/digital/service/impl/PlanManagementServiceImpl.java @@ -97,7 +97,19 @@ public class PlanManagementServiceImpl implements PlanManagementService { ){ return "缺少必填项"; } - + // 处理月份格式,确保月份为两位数(如2026-1 -> 2026-01) + String planManagementMonth = planManagementVo.getPlanManagementMonth(); + if (planManagementMonth.contains("-")) { + String[] parts = planManagementMonth.split("-"); + if (parts.length == 2) { + String year = parts[0]; + String month = parts[1]; + // 使用padl方法补0,确保月份为两位数 + month = StringUtils.padl(month, 2, '0'); + // 重新组合月份格式 + planManagementVo.setPlanManagementMonth(year + "-" + month); + } + } //获取运检站信息 InspectionStationVo inspectionStationVo = new InspectionStationVo(); inspectionStationVo.setInspectionStationName(planManagementVo.getInspectionStationName()); diff --git a/bonus-business/src/main/resources/mapper/ContractMapper.xml b/bonus-business/src/main/resources/mapper/ContractMapper.xml index 8a0ebad..c3e434d 100644 --- a/bonus-business/src/main/resources/mapper/ContractMapper.xml +++ b/bonus-business/src/main/resources/mapper/ContractMapper.xml @@ -104,6 +104,6 @@ ts.settlement_batch, ts.settlement_payment, ts.settlement_tax - from tb_settlement ts where ts.contract_id = #{contractId} + from tb_settlement ts where ts.contract_id = #{contractId} and ts.is_active = '1' diff --git a/bonus-business/src/main/resources/mapper/DayPlanMapper.xml b/bonus-business/src/main/resources/mapper/DayPlanMapper.xml index 0c9aa38..ba9d816 100644 --- a/bonus-business/src/main/resources/mapper/DayPlanMapper.xml +++ b/bonus-business/src/main/resources/mapper/DayPlanMapper.xml @@ -197,9 +197,10 @@ tmp.inspection_station_name, tw.workload_category_name, IFNULL(tw.unit_price, 0) as unit_price, - IFNULL(tw.settlement_unit_price, 0) as s, + IFNULL(tw.settlement_unit_price, 0) as settlementUnitPrice, IFNULL(SUM(tw.workload_num), 0) as total_workload, - IFNULL(SUM(tw.workload_num), 0) * IFNULL(tw.unit_price, 0) as total_amount + IFNULL(SUM(tw.workload_num), 0) * IFNULL(tw.unit_price, 0) as total_amount, + IFNULL(SUM(tw.workload_num), 0) * IFNULL(tw.settlement_unit_price, 0) as settlementTotalAmount from tb_day_plan tdp left join tb_monthly_plan tmp on tmp.monthly_plan_id = tdp.monthly_plan_id diff --git a/bonus-business/src/main/resources/mapper/DownloadMapper.xml b/bonus-business/src/main/resources/mapper/DownloadMapper.xml index ca3c6bc..1cc9d0d 100644 --- a/bonus-business/src/main/resources/mapper/DownloadMapper.xml +++ b/bonus-business/src/main/resources/mapper/DownloadMapper.xml @@ -15,7 +15,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SUM(CASE WHEN day_plan_type = '1' THEN actual_personnel ELSE 0 END) AS maintenanceNum FROM tb_day_plan WHERE day_plan = #{currentDate} - AND status = '1' AND is_active = '1' AND day_plan_type IN ('0', '1') GROUP BY monthly_plan_id @@ -33,7 +32,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SUM(CASE WHEN day_plan_type = '2' THEN actual_personnel ELSE 0 END) AS jjNum FROM tb_day_plan WHERE day_plan = #{currentDate} - AND status = '1' AND is_active = '1' AND day_plan_type = '2' GROUP BY monthly_plan_id @@ -53,7 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SUM(actual_assistance_personnel) AS num2 FROM tb_day_plan WHERE day_plan = #{currentDate} - AND status = '1' AND is_active = '1' AND day_plan_type = '1' GROUP BY monthly_plan_id @@ -73,7 +70,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SUM(actual_assistance_personnel) AS num2 FROM tb_day_plan WHERE day_plan = #{currentDate} - AND status = '1' AND is_active = '1' AND day_plan_type = '2' GROUP BY monthly_plan_id @@ -107,7 +103,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SUM(IF(day_plan_type = '1', IFNULL(actual_sub_car, 0), 0)) AS num6 FROM tb_day_plan WHERE day_plan = #{currentDate} - AND status = '1' AND is_active = '1' AND day_plan_type IN ('0', '1') GROUP BY monthly_plan_id @@ -134,7 +129,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SUM(IF(day_plan_type = '2', IFNULL(actual_sub_car, 0), 0)) AS num3 FROM tb_day_plan WHERE day_plan = #{currentDate} - AND status = '1' AND is_active = '1' AND day_plan_type = '2' GROUP BY monthly_plan_id @@ -161,7 +155,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM tb_day_plan tdp INNER JOIN tb_workload tw ON tw.plan_id = tdp.day_plan_id WHERE tdp.day_plan = #{currentDate} - AND tdp.status = '1' AND tdp.is_active = '1' AND tdp.day_plan_type = '1' AND tw.data_source = '1' diff --git a/bonus-business/src/main/resources/mapper/InspectionStationMapper.xml b/bonus-business/src/main/resources/mapper/InspectionStationMapper.xml index 330afed..e6e3c12 100644 --- a/bonus-business/src/main/resources/mapper/InspectionStationMapper.xml +++ b/bonus-business/src/main/resources/mapper/InspectionStationMapper.xml @@ -45,4 +45,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from tb_inspection_station where category = #{category} and is_active = '1' and inspection_station_name = #{inspectionStationName} + diff --git a/bonus-business/src/main/resources/mapper/PlanManagementMapper.xml b/bonus-business/src/main/resources/mapper/PlanManagementMapper.xml index 96bb4c5..c5d3153 100644 --- a/bonus-business/src/main/resources/mapper/PlanManagementMapper.xml +++ b/bonus-business/src/main/resources/mapper/PlanManagementMapper.xml @@ -77,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND (tpm.project_name like concat('%', #{keyWord}, '%') or tpm.work_content like concat('%', #{keyWord}, '%')) + order by tpm.plan_management_month desc