diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/maintenance/MaintainUpkeepInfoController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/maintenance/MaintainUpkeepInfoController.java index 6e63923f..97f03a9a 100644 --- a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/maintenance/MaintainUpkeepInfoController.java +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/maintenance/MaintainUpkeepInfoController.java @@ -37,6 +37,14 @@ public class MaintainUpkeepInfoController extends BaseController { return getDataTable(list); } + /** + * 查询维保次数 + */ + @GetMapping("/listCount") + public AjaxResult listCount(MaintainUpkeepInfo maintainUpkeepInfo) { + return AjaxResult.success(maintainUpkeepInfoService.listCount(maintainUpkeepInfo)); + } + /** * 导出维修保养记录列表 */ diff --git a/God-Vue-master/god-system/src/main/java/com/god/maintenance/mapper/MaintainUpkeepInfoMapper.java b/God-Vue-master/god-system/src/main/java/com/god/maintenance/mapper/MaintainUpkeepInfoMapper.java index d71eaf19..6ca8772b 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/maintenance/mapper/MaintainUpkeepInfoMapper.java +++ b/God-Vue-master/god-system/src/main/java/com/god/maintenance/mapper/MaintainUpkeepInfoMapper.java @@ -1,6 +1,7 @@ package com.god.maintenance.mapper; import java.util.List; +import java.util.Map; import com.god.maintenance.domain.MaintainUpkeepInfo; @@ -27,6 +28,22 @@ public interface MaintainUpkeepInfoMapper { */ List selectMaintainUpkeepInfoList(MaintainUpkeepInfo maintainUpkeepInfo); + /** + * 查询维修保养次数列表 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 维修保养记录集合 + */ + Map listCount(MaintainUpkeepInfo maintainUpkeepInfo); + + /** + * 查询维修保养次数列表 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 维修保养记录集合 + */ + Map listCountAll(MaintainUpkeepInfo maintainUpkeepInfo); + /** * 新增维修保养记录 * diff --git a/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/IMaintainUpkeepInfoService.java b/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/IMaintainUpkeepInfoService.java index fda4db50..ec16a030 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/IMaintainUpkeepInfoService.java +++ b/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/IMaintainUpkeepInfoService.java @@ -1,6 +1,7 @@ package com.god.maintenance.service; import java.util.List; +import java.util.Map; import com.god.maintenance.domain.MaintainUpkeepInfo; @@ -27,6 +28,14 @@ public interface IMaintainUpkeepInfoService { */ List selectMaintainUpkeepInfoList(MaintainUpkeepInfo maintainUpkeepInfo); + /** + * 查询维修保养次数列表 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 维修保养记录集合 + */ + Map listCount(MaintainUpkeepInfo maintainUpkeepInfo); + /** * 新增维修保养记录 * diff --git a/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/impl/MaintainUpkeepInfoServiceImpl.java b/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/impl/MaintainUpkeepInfoServiceImpl.java index dd47d507..26a61ab5 100644 --- a/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/impl/MaintainUpkeepInfoServiceImpl.java +++ b/God-Vue-master/god-system/src/main/java/com/god/maintenance/service/impl/MaintainUpkeepInfoServiceImpl.java @@ -1,6 +1,8 @@ package com.god.maintenance.service.impl; +import java.util.HashMap; import java.util.List; +import java.util.Map; import com.god.common.utils.uuid.IdUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +44,19 @@ public class MaintainUpkeepInfoServiceImpl implements IMaintainUpkeepInfoService return maintainUpkeepInfoMapper.selectMaintainUpkeepInfoList(maintainUpkeepInfo); } + /** + * 查询维修保养次数列表 + * + * @param maintainUpkeepInfo 维修保养记录 + * @return 维修保养记录集合 + */ + public Map listCount(MaintainUpkeepInfo maintainUpkeepInfo) { + Map stringLongMap = maintainUpkeepInfoMapper.listCount(maintainUpkeepInfo); + Map stringLongMap1 = maintainUpkeepInfoMapper.listCountAll(maintainUpkeepInfo); + stringLongMap.put("0", stringLongMap1.get("0")); + return stringLongMap; + } + /** * 新增维修保养记录 * diff --git a/God-Vue-master/god-system/src/main/resources/mapper/maintenance/MaintainUpkeepInfoMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/maintenance/MaintainUpkeepInfoMapper.xml index 061674e4..83bc998e 100644 --- a/God-Vue-master/god-system/src/main/resources/mapper/maintenance/MaintainUpkeepInfoMapper.xml +++ b/God-Vue-master/god-system/src/main/resources/mapper/maintenance/MaintainUpkeepInfoMapper.xml @@ -17,6 +17,8 @@ + + @@ -40,7 +42,8 @@ resultMap="MaintainUpkeepInfoResult"> - and i.facility_name like concat('%', #{facilityName}, + and i.facility_name like concat('%', + #{facilityName}, '%') and i.facility_type = #{facilityType} @@ -49,16 +52,71 @@ and i.maintain_upkeep_type = #{maintainUpkeepType} - and i.distinction_port = #{distinctionPort} - and i.now_time = #{nowTime} + and i.distinction_port = #{distinctionPort} + + and i.now_time >= #{startTimeA} + and #{endTimeA} >= i.now_time and i.maintenance_user like concat('%', #{maintenanceUser}, '%') - and i.maintenance_info = #{maintenanceInfo} + and i.maintenance_info = #{maintenanceInfo} + and i.reserve_one = #{reserveOne} + + + +