kangwei:优化、补充、完善接口
正在显示
9 个修改的文件
包含
48 行增加
和
2 行删除
... | @@ -106,6 +106,9 @@ public class DangerInspectionRecordController { | ... | @@ -106,6 +106,9 @@ public class DangerInspectionRecordController { |
106 | if(StringUtils.isNotBlank(dangerInspectionRecord.getDangerLevel())){ | 106 | if(StringUtils.isNotBlank(dangerInspectionRecord.getDangerLevel())){ |
107 | queryWrapper.eq("danger_level", dangerInspectionRecord.getDangerLevel() ) ; | 107 | queryWrapper.eq("danger_level", dangerInspectionRecord.getDangerLevel() ) ; |
108 | } | 108 | } |
109 | if(StringUtils.isNotBlank(dangerInspectionRecord.getDangerPlace())){ | ||
110 | queryWrapper.eq("danger_place", dangerInspectionRecord.getDangerPlace() ) ; | ||
111 | } | ||
109 | queryWrapper.orderByAsc("depart_id"); | 112 | queryWrapper.orderByAsc("depart_id"); |
110 | queryWrapper.orderByAsc("equipInfoId"); | 113 | queryWrapper.orderByAsc("equipInfoId"); |
111 | IPage<DangerInspectionRecord> pageList = dangerInspectionRecordService.page(page, queryWrapper); | 114 | IPage<DangerInspectionRecord> pageList = dangerInspectionRecordService.page(page, queryWrapper); |
... | @@ -125,6 +128,7 @@ public class DangerInspectionRecordController { | ... | @@ -125,6 +128,7 @@ public class DangerInspectionRecordController { |
125 | if(dangerLevelManage != null ){ | 128 | if(dangerLevelManage != null ){ |
126 | dangerInspectionRecord.setDangerName(dangerLevelManage.getDangerName() ); | 129 | dangerInspectionRecord.setDangerName(dangerLevelManage.getDangerName() ); |
127 | dangerInspectionRecord.setDangerLevel(dangerLevelManage.getDangerLevel() ) ; | 130 | dangerInspectionRecord.setDangerLevel(dangerLevelManage.getDangerLevel() ) ; |
131 | dangerInspectionRecord.setDangerPlace(dangerLevelManage.getDangerPlace()); | ||
128 | } | 132 | } |
129 | dangerInspectionRecordService.save(dangerInspectionRecord); | 133 | dangerInspectionRecordService.save(dangerInspectionRecord); |
130 | result.success("添加成功!"); | 134 | result.success("添加成功!"); |
... | @@ -157,6 +161,7 @@ public class DangerInspectionRecordController { | ... | @@ -157,6 +161,7 @@ public class DangerInspectionRecordController { |
157 | if(dangerLevelManage != null ){ | 161 | if(dangerLevelManage != null ){ |
158 | dangerInspectionRecord.setDangerName(dangerLevelManage.getDangerName() ); | 162 | dangerInspectionRecord.setDangerName(dangerLevelManage.getDangerName() ); |
159 | dangerInspectionRecord.setDangerLevel(dangerLevelManage.getDangerLevel() ) ; | 163 | dangerInspectionRecord.setDangerLevel(dangerLevelManage.getDangerLevel() ) ; |
164 | dangerInspectionRecord.setDangerPlace(dangerLevelManage.getDangerPlace()); | ||
160 | } | 165 | } |
161 | boolean ok = dangerInspectionRecordService.updateById(dangerInspectionRecord); | 166 | boolean ok = dangerInspectionRecordService.updateById(dangerInspectionRecord); |
162 | //TODO 返回false说明什么? | 167 | //TODO 返回false说明什么? | ... | ... |
... | @@ -81,6 +81,9 @@ public class APPDangerInspectionRecordController { | ... | @@ -81,6 +81,9 @@ public class APPDangerInspectionRecordController { |
81 | if(StringUtils.isNotBlank(dangerInspectionRecord.getDangerLevel())){ | 81 | if(StringUtils.isNotBlank(dangerInspectionRecord.getDangerLevel())){ |
82 | queryWrapper.eq("danger_level", dangerInspectionRecord.getDangerLevel() ) ; | 82 | queryWrapper.eq("danger_level", dangerInspectionRecord.getDangerLevel() ) ; |
83 | } | 83 | } |
84 | if(StringUtils.isNotBlank(dangerInspectionRecord.getDangerPlace())){ | ||
85 | queryWrapper.eq("danger_place", dangerInspectionRecord.getDangerPlace() ) ; | ||
86 | } | ||
84 | queryWrapper.orderByDesc("report_date"); | 87 | queryWrapper.orderByDesc("report_date"); |
85 | // queryWrapper.eq("report_user", BaseContextHandler.getUserId()); | 88 | // queryWrapper.eq("report_user", BaseContextHandler.getUserId()); |
86 | IPage<DangerInspectionRecord> pageList = dangerInspectionRecordService.page(page, queryWrapper); | 89 | IPage<DangerInspectionRecord> pageList = dangerInspectionRecordService.page(page, queryWrapper); | ... | ... |
... | @@ -118,4 +118,10 @@ public class DangerInspectionRecord { | ... | @@ -118,4 +118,10 @@ public class DangerInspectionRecord { |
118 | @Dict(dicCode = "dangerLevel") | 118 | @Dict(dicCode = "dangerLevel") |
119 | private String dangerLevel; | 119 | private String dangerLevel; |
120 | 120 | ||
121 | @ApiModelProperty(value = "风险区域名称") | ||
122 | @Dict(dicCode = "id",dicText = "struct_name",dictTable = "sys_struct_dict") | ||
123 | private String dangerPlace; | ||
124 | |||
125 | |||
126 | |||
121 | } | 127 | } | ... | ... |
... | @@ -49,6 +49,9 @@ public class DangerInspectionRecordVO { | ... | @@ -49,6 +49,9 @@ public class DangerInspectionRecordVO { |
49 | @ApiModelProperty(value = "风险等级") | 49 | @ApiModelProperty(value = "风险等级") |
50 | private String dangerLevel; | 50 | private String dangerLevel; |
51 | 51 | ||
52 | @ApiModelProperty(value = "风险区域名称") | ||
53 | private String dangerPlace; | ||
54 | |||
52 | @ApiModelProperty(value = "巡检状态(1:开始,2:结束)") | 55 | @ApiModelProperty(value = "巡检状态(1:开始,2:结束)") |
53 | private String status; | 56 | private String status; |
54 | 57 | ... | ... |
... | @@ -116,7 +116,7 @@ public class EquipmentCenterController { | ... | @@ -116,7 +116,7 @@ public class EquipmentCenterController { |
116 | Result<IPage<EquipmentNewMaintenancePlanVO>> result = new Result<IPage<EquipmentNewMaintenancePlanVO>>(); | 116 | Result<IPage<EquipmentNewMaintenancePlanVO>> result = new Result<IPage<EquipmentNewMaintenancePlanVO>>(); |
117 | Page<EquipmentNewMaintenancePlanVO> pageList = new Page<EquipmentNewMaintenancePlanVO>(pageNo, pageSize); | 117 | Page<EquipmentNewMaintenancePlanVO> pageList = new Page<EquipmentNewMaintenancePlanVO>(pageNo, pageSize); |
118 | setDepartIds(reportStatisticsDTO); | 118 | setDepartIds(reportStatisticsDTO); |
119 | pageList = iProductionEquipmentService.getEquipmentStateDetails(pageList, reportStatisticsDTO); | 119 | pageList = iProductionEquipmentService.getEquipmentStateDetailsNew(pageList, reportStatisticsDTO); |
120 | result.setSuccess(true); | 120 | result.setSuccess(true); |
121 | result.setResult(pageList); | 121 | result.setResult(pageList); |
122 | return result; | 122 | return result; | ... | ... |
... | @@ -69,6 +69,8 @@ public interface ProductionEquipmentMapper { | ... | @@ -69,6 +69,8 @@ public interface ProductionEquipmentMapper { |
69 | //分公司获取生产设备总台数详情 | 69 | //分公司获取生产设备总台数详情 |
70 | List<EquipmentNewMaintenancePlanVO> getEquipmentStatisticsDetailsBranchOffice(ReportStatisticsDTO reportStatisticsDTO); | 70 | List<EquipmentNewMaintenancePlanVO> getEquipmentStatisticsDetailsBranchOffice(ReportStatisticsDTO reportStatisticsDTO); |
71 | 71 | ||
72 | public Page<EquipmentNewMaintenancePlanVO> getEquipmentStateDetailsNew(Page<EquipmentNewMaintenancePlanVO> page,@Param("param") ReportStatisticsDTO reportStatisticsDTO); | ||
73 | |||
72 | //厂获取生产设备总台数详情 | 74 | //厂获取生产设备总台数详情 |
73 | List<EquipmentNewMaintenancePlanVO> getEquipmentStatisticsDetailsFactory(ReportStatisticsDTO reportStatisticsDTO); | 75 | List<EquipmentNewMaintenancePlanVO> getEquipmentStatisticsDetailsFactory(ReportStatisticsDTO reportStatisticsDTO); |
74 | //厂获取生产设备总台数详情(新) | 76 | //厂获取生产设备总台数详情(新) | ... | ... |
... | @@ -153,6 +153,28 @@ | ... | @@ -153,6 +153,28 @@ |
153 | order by ccc.category_value1 desc | 153 | order by ccc.category_value1 desc |
154 | </select> | 154 | </select> |
155 | 155 | ||
156 | <select id="getEquipmentStateDetailsNew" resultType="com.skua.modules.equipment.vo.EquipmentNewMaintenancePlanVO"> | ||
157 | select d.depart_name 'companyName', aaa.* from ( | ||
158 | select t.depart_id , ifnull( SUM( CASE WHEN t.finish_flag ='djx' THEN 1 ELSE 0 END ),0) as 'waiting', | ||
159 | ifnull( SUM( CASE WHEN t.finish_flag in ('sbzx','wwwx') THEN 1 ELSE 0 END ),0) as 'repairing' | ||
160 | from equipment_repair t | ||
161 | where t.del_flag = 1 | ||
162 | |||
163 | <if test="param.startTime != null "> | ||
164 | and t.create_time >= #{param.startTime} | ||
165 | </if> | ||
166 | <if test="param.endTime != null "> | ||
167 | and t.create_time <= #{param.endTime} | ||
168 | </if> | ||
169 | <if test="param.departIds != null "> | ||
170 | and t.depart_id in(${param.departIds}) | ||
171 | </if> | ||
172 | group by t.depart_id | ||
173 | )aaa | ||
174 | |||
175 | left join sys_depart d on d.id = aaa.depart_id | ||
176 | order by aaa.waiting desc | ||
177 | </select> | ||
156 | 178 | ||
157 | 179 | ||
158 | <select id="getLevelByTime" resultType="com.skua.modules.equipment.vo.ProportionStatisticsVO" | 180 | <select id="getLevelByTime" resultType="com.skua.modules.equipment.vo.ProportionStatisticsVO" | ... | ... |
... | @@ -37,7 +37,8 @@ public interface IProductionEquipmentService { | ... | @@ -37,7 +37,8 @@ public interface IProductionEquipmentService { |
37 | 37 | ||
38 | //获取设备状态详情 | 38 | //获取设备状态详情 |
39 | Page<EquipmentNewMaintenancePlanVO> getEquipmentStateDetails(Page<EquipmentNewMaintenancePlanVO> pageList, ReportStatisticsDTO reportStatisticsDTO); | 39 | Page<EquipmentNewMaintenancePlanVO> getEquipmentStateDetails(Page<EquipmentNewMaintenancePlanVO> pageList, ReportStatisticsDTO reportStatisticsDTO); |
40 | 40 | //获取设备状态详情New | |
41 | Page<EquipmentNewMaintenancePlanVO> getEquipmentStateDetailsNew(Page<EquipmentNewMaintenancePlanVO> page, ReportStatisticsDTO reportStatisticsDTO) ; | ||
41 | //设备完好率 | 42 | //设备完好率 |
42 | List<ContrastVO> getEquipmentIntactRate(ReportStatisticsDTO reportStatisticsDTO); | 43 | List<ContrastVO> getEquipmentIntactRate(ReportStatisticsDTO reportStatisticsDTO); |
43 | 44 | ... | ... |
... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
6 | import com.skua.core.context.BaseContextHandler; | 6 | import com.skua.core.context.BaseContextHandler; |
7 | import com.skua.core.util.ConvertUtils; | 7 | import com.skua.core.util.ConvertUtils; |
8 | import com.skua.core.util.DoubleOperaUtils; | 8 | import com.skua.core.util.DoubleOperaUtils; |
9 | import com.skua.modules.common.mapper.CommonSqlMapper; | ||
9 | import com.skua.modules.common.service.ICommonSqlService; | 10 | import com.skua.modules.common.service.ICommonSqlService; |
10 | import com.skua.modules.equipment.dto.ReportStatisticsDTO; | 11 | import com.skua.modules.equipment.dto.ReportStatisticsDTO; |
11 | import com.skua.modules.equipment.mapper.ProductionEquipmentMapper; | 12 | import com.skua.modules.equipment.mapper.ProductionEquipmentMapper; |
... | @@ -481,6 +482,9 @@ public class ProductionEquipmentServiceImpl implements IProductionEquipmentServi | ... | @@ -481,6 +482,9 @@ public class ProductionEquipmentServiceImpl implements IProductionEquipmentServi |
481 | return list; | 482 | return list; |
482 | } | 483 | } |
483 | 484 | ||
485 | public Page<EquipmentNewMaintenancePlanVO> getEquipmentStateDetailsNew(Page<EquipmentNewMaintenancePlanVO> page, ReportStatisticsDTO reportStatisticsDTO) { | ||
486 | return productionEquipmentMapper.getEquipmentStateDetailsNew(page,reportStatisticsDTO); | ||
487 | } | ||
484 | @Override | 488 | @Override |
485 | public Page<EquipmentNewMaintenancePlanVO> getEquipmentStateDetails(Page<EquipmentNewMaintenancePlanVO> pageList, ReportStatisticsDTO reportStatisticsDTO) { | 489 | public Page<EquipmentNewMaintenancePlanVO> getEquipmentStateDetails(Page<EquipmentNewMaintenancePlanVO> pageList, ReportStatisticsDTO reportStatisticsDTO) { |
486 | int n = 0; | 490 | int n = 0; | ... | ... |
-
请 注册 或 登录 后发表评论