Merge remote-tracking branch 'origin/master' into master
正在显示
18 个修改的文件
包含
191 行增加
和
138 行删除
... | @@ -21,8 +21,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | ... | @@ -21,8 +21,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage; |
21 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 21 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
22 | import com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO; | 22 | import com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO; |
23 | import com.skua.modules.ajh.vo.LeaderInspectionRecordVO; | 23 | import com.skua.modules.ajh.vo.LeaderInspectionRecordVO; |
24 | import com.skua.modules.erp.vo.LeaderInspectionRecordSearchVO; | ||
24 | import com.skua.modules.guest.util.DateUtil; | 25 | import com.skua.modules.guest.util.DateUtil; |
25 | import com.skua.modules.system.service.ISysDepartService; | 26 | import com.skua.modules.system.service.ISysDepartService; |
27 | import com.skua.tool.util.JSUtils; | ||
26 | import lombok.extern.slf4j.Slf4j; | 28 | import lombok.extern.slf4j.Slf4j; |
27 | import org.apache.commons.lang3.StringUtils; | 29 | import org.apache.commons.lang3.StringUtils; |
28 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 30 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
... | @@ -88,11 +90,11 @@ public class LeaderInspectionRecordController { | ... | @@ -88,11 +90,11 @@ public class LeaderInspectionRecordController { |
88 | 90 | ||
89 | String startDate = req.getParameter("startDate"); | 91 | String startDate = req.getParameter("startDate"); |
90 | if(StringUtils.isNotEmpty(startDate)){ | 92 | if(StringUtils.isNotEmpty(startDate)){ |
91 | queryWrapper.ge("create_time",startDate+" 00:00:00"); | 93 | queryWrapper.ge("inspection_time",startDate+" 00:00:00"); |
92 | } | 94 | } |
93 | String endDate = req.getParameter("endDate"); | 95 | String endDate = req.getParameter("endDate"); |
94 | if(StringUtils.isNotEmpty(startDate)){ | 96 | if(StringUtils.isNotEmpty(startDate)){ |
95 | queryWrapper.le("create_time",endDate+" 23:59:59"); | 97 | queryWrapper.le("inspection_time",endDate+" 23:59:59"); |
96 | } | 98 | } |
97 | IPage<LeaderInspectionRecord> pageList = leaderInspectionRecordService.page(page, queryWrapper); | 99 | IPage<LeaderInspectionRecord> pageList = leaderInspectionRecordService.page(page, queryWrapper); |
98 | result.setSuccess(true); | 100 | result.setSuccess(true); |
... | @@ -106,7 +108,7 @@ public class LeaderInspectionRecordController { | ... | @@ -106,7 +108,7 @@ public class LeaderInspectionRecordController { |
106 | @AutoLog(value = "领导带班检查记录-统计数量以及图标") | 108 | @AutoLog(value = "领导带班检查记录-统计数量以及图标") |
107 | @ApiOperation(value="领导带班检查记录-统计数量以及图标", notes="领导带班检查记录-统计数量以及图标") | 109 | @ApiOperation(value="领导带班检查记录-统计数量以及图标", notes="领导带班检查记录-统计数量以及图标") |
108 | @GetMapping(value = "/statistics") | 110 | @GetMapping(value = "/statistics") |
109 | public Result<LeaderInspectionRecordVO> statistics(LeaderInspectionRecord leaderInspectionRecord,HttpServletRequest req) { | 111 | public Result<LeaderInspectionRecordVO> statistics(LeaderInspectionRecordSearchVO leaderInspectionRecord, HttpServletRequest req) { |
110 | Result<LeaderInspectionRecordVO> result = new Result<>(); | 112 | Result<LeaderInspectionRecordVO> result = new Result<>(); |
111 | String departIds = null; | 113 | String departIds = null; |
112 | if (StringUtils.isEmpty(leaderInspectionRecord.getDepartId())) { | 114 | if (StringUtils.isEmpty(leaderInspectionRecord.getDepartId())) { |
... | @@ -114,7 +116,7 @@ public class LeaderInspectionRecordController { | ... | @@ -114,7 +116,7 @@ public class LeaderInspectionRecordController { |
114 | }else{ | 116 | }else{ |
115 | departIds = departService.getChildDepartId(leaderInspectionRecord.getDepartId()); | 117 | departIds = departService.getChildDepartId(leaderInspectionRecord.getDepartId()); |
116 | } | 118 | } |
117 | leaderInspectionRecord.setDepartIds(departIds ) ; | 119 | leaderInspectionRecord.setDepartIds(JSUtils.quoteEach(departIds,",")) ; |
118 | LeaderInspectionRecordVO leaderInspectionRecordVO = leaderInspectionRecordService.statisticsNum(leaderInspectionRecord); | 120 | LeaderInspectionRecordVO leaderInspectionRecordVO = leaderInspectionRecordService.statisticsNum(leaderInspectionRecord); |
119 | List<LeaderInspectionRecordStatisticsVO> timeDataList = leaderInspectionRecordService.statisticsByTime(leaderInspectionRecord); | 121 | List<LeaderInspectionRecordStatisticsVO> timeDataList = leaderInspectionRecordService.statisticsByTime(leaderInspectionRecord); |
120 | List<LeaderInspectionRecordStatisticsVO> leaderDataList = leaderInspectionRecordService.statisticsByLeader(leaderInspectionRecord); | 122 | List<LeaderInspectionRecordStatisticsVO> leaderDataList = leaderInspectionRecordService.statisticsByLeader(leaderInspectionRecord); | ... | ... |
... | @@ -92,18 +92,9 @@ public class LeaderInspectionRecord { | ... | @@ -92,18 +92,9 @@ public class LeaderInspectionRecord { |
92 | @ApiModelProperty(value = "备注") | 92 | @ApiModelProperty(value = "备注") |
93 | private String remark; | 93 | private String remark; |
94 | 94 | ||
95 | @TableField(exist=false) | ||
96 | @ApiModelProperty(value = "开始时间:yyyy-MM-dd") | ||
97 | private String startDate; | ||
98 | 95 | ||
99 | @TableField(exist=false) | ||
100 | @ApiModelProperty(value = "结束时间:yyyy-MM-dd") | ||
101 | private String endDate; | ||
102 | 96 | ||
103 | @ApiModelProperty(value = "部门集合") | 97 | /*public String getStartDate() { |
104 | private String departIds; | ||
105 | |||
106 | public String getStartDate() { | ||
107 | if(StringUtils.isEmpty(startDate)){ | 98 | if(StringUtils.isEmpty(startDate)){ |
108 | startDate = DateUtil.getCurrentYear()+"-01-01"; | 99 | startDate = DateUtil.getCurrentYear()+"-01-01"; |
109 | } | 100 | } |
... | @@ -115,5 +106,5 @@ public class LeaderInspectionRecord { | ... | @@ -115,5 +106,5 @@ public class LeaderInspectionRecord { |
115 | endDate = DateUtil.getCurrentYear()+"-12-31"; | 106 | endDate = DateUtil.getCurrentYear()+"-12-31"; |
116 | } | 107 | } |
117 | return endDate; | 108 | return endDate; |
118 | } | 109 | }*/ |
119 | } | 110 | } | ... | ... |
... | @@ -23,24 +23,14 @@ public interface AjhRectificationInfoMapper extends BaseMapper<AjhRectificationI | ... | @@ -23,24 +23,14 @@ public interface AjhRectificationInfoMapper extends BaseMapper<AjhRectificationI |
23 | List<Map<String, Object>> docCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); | 23 | List<Map<String, Object>> docCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); |
24 | // 隐患统计 | 24 | // 隐患统计 |
25 | List<Map<String, Object>> yhCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); | 25 | List<Map<String, Object>> yhCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); |
26 | |||
27 | |||
28 | //教育培训 | 26 | //教育培训 |
29 | List<Map<String, Object>> jyCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); | 27 | List<Map<String, Object>> jyCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); |
30 | |||
31 | |||
32 | //应急演练 | 28 | //应急演练 |
33 | List<Map<String, Object>> yjCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); | 29 | List<Map<String, Object>> yjCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); |
34 | |||
35 | |||
36 | //危化资料 | 30 | //危化资料 |
37 | List<Map<String, Object>> whCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); | 31 | List<Map<String, Object>> whCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); |
38 | |||
39 | |||
40 | //危险废物 | 32 | //危险废物 |
41 | List<Map<String, Object>> wxCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); | 33 | List<Map<String, Object>> wxCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); |
42 | |||
43 | |||
44 | //集团安全文件 | 34 | //集团安全文件 |
45 | List<Map<String, Object>> jtaqCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); | 35 | List<Map<String, Object>> jtaqCensus(@Param("nowMonth") String nowMonth, @Param("nowYear") String nowYear, @Param("lastYear") String lastYear); |
46 | 36 | ... | ... |
... | @@ -4,6 +4,7 @@ import com.skua.modules.ajh.entity.LeaderInspectionRecord; | ... | @@ -4,6 +4,7 @@ import com.skua.modules.ajh.entity.LeaderInspectionRecord; |
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
5 | import com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO; | 5 | import com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO; |
6 | import com.skua.modules.ajh.vo.LeaderInspectionRecordVO; | 6 | import com.skua.modules.ajh.vo.LeaderInspectionRecordVO; |
7 | import com.skua.modules.erp.vo.LeaderInspectionRecordSearchVO; | ||
7 | 8 | ||
8 | import java.util.List; | 9 | import java.util.List; |
9 | 10 | ||
... | @@ -16,18 +17,18 @@ public interface LeaderInspectionRecordMapper extends BaseMapper<LeaderInspectio | ... | @@ -16,18 +17,18 @@ public interface LeaderInspectionRecordMapper extends BaseMapper<LeaderInspectio |
16 | * @param leaderInspectionRecord | 17 | * @param leaderInspectionRecord |
17 | * @return | 18 | * @return |
18 | */ | 19 | */ |
19 | List<LeaderInspectionRecordVO> statisticsNum(LeaderInspectionRecord leaderInspectionRecord); | 20 | List<LeaderInspectionRecordVO> statisticsNum(LeaderInspectionRecordSearchVO leaderInspectionRecord); |
20 | /** | 21 | /** |
21 | * 根据时间统计 | 22 | * 根据时间统计 |
22 | * @param leaderInspectionRecord | 23 | * @param leaderInspectionRecord |
23 | * @return | 24 | * @return |
24 | */ | 25 | */ |
25 | List<LeaderInspectionRecordStatisticsVO> statisticsByTime(LeaderInspectionRecord leaderInspectionRecord); | 26 | List<LeaderInspectionRecordStatisticsVO> statisticsByTime(LeaderInspectionRecordSearchVO leaderInspectionRecord); |
26 | 27 | ||
27 | /*** | 28 | /*** |
28 | * 根据带班领导统计 | 29 | * 根据带班领导统计 |
29 | * @param leaderInspectionRecord | 30 | * @param leaderInspectionRecord |
30 | * @return | 31 | * @return |
31 | */ | 32 | */ |
32 | List<LeaderInspectionRecordStatisticsVO> statisticsByLeader(LeaderInspectionRecord leaderInspectionRecord); | 33 | List<LeaderInspectionRecordStatisticsVO> statisticsByLeader(LeaderInspectionRecordSearchVO leaderInspectionRecord); |
33 | } | 34 | } | ... | ... |
... | @@ -5,35 +5,35 @@ | ... | @@ -5,35 +5,35 @@ |
5 | <!-- topCensus--> | 5 | <!-- topCensus--> |
6 | <select id="topCensus" resultType="java.util.Map"> | 6 | <select id="topCensus" resultType="java.util.Map"> |
7 | select | 7 | select |
8 | '年度安全隐患统计' as 'name','yh' as 'code', | 8 | '年度安全隐患统计(起)' as 'name','yh' as 'code', |
9 | SUM( CASE WHEN LEFT ( sr.rec_ord_whenlong, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ) as now, | 9 | SUM( CASE WHEN LEFT ( sr.rec_ord_whenlong, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ) as now, |
10 | SUM( CASE WHEN LEFT ( sr.rec_ord_whenlong, 4 ) = #{nowYear} THEN 1 ELSE 0 END) as nowYear, | 10 | SUM( CASE WHEN LEFT ( sr.rec_ord_whenlong, 4 ) = #{nowYear} THEN 1 ELSE 0 END) as nowYear, |
11 | SUM( CASE WHEN LEFT ( sr.rec_ord_whenlong, 4 ) = #{lastYear} THEN 1 ELSE 0 END ) as last_year | 11 | SUM( CASE WHEN LEFT ( sr.rec_ord_whenlong, 4 ) = #{lastYear} THEN 1 ELSE 0 END ) as last_year |
12 | from ajh_rectification_info sr | 12 | from ajh_rectification_info sr |
13 | UNION | 13 | UNION |
14 | select | 14 | select |
15 | '年度教育培训统计' as 'name','jy' as 'code', | 15 | '年度教育培训统计(起)' as 'name','jy' as 'code', |
16 | SUM( CASE WHEN LEFT ( sr.edu_tra_date, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ) as now, | 16 | SUM( CASE WHEN LEFT ( sr.edu_tra_date, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ) as now, |
17 | SUM( CASE WHEN LEFT ( sr.edu_tra_date, 4 ) = #{nowYear} THEN 1 ELSE 0 END) as nowYear, | 17 | SUM( CASE WHEN LEFT ( sr.edu_tra_date, 4 ) = #{nowYear} THEN 1 ELSE 0 END) as nowYear, |
18 | SUM( CASE WHEN LEFT ( sr.edu_tra_date, 4 ) = #{lastYear} THEN 1 ELSE 0 END ) as last_year | 18 | SUM( CASE WHEN LEFT ( sr.edu_tra_date, 4 ) = #{lastYear} THEN 1 ELSE 0 END ) as last_year |
19 | from ajh_edu_training sr | 19 | from ajh_edu_training sr |
20 | UNION | 20 | UNION |
21 | select | 21 | select |
22 | '年度应急演练统计' as 'name','yj' as 'code', | 22 | '年度应急演练统计(起)' as 'name','yj' as 'code', |
23 | SUM( CASE WHEN LEFT ( sr.exe_time, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ) as now, | 23 | SUM( CASE WHEN LEFT ( sr.exe_time, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ) as now, |
24 | SUM( CASE WHEN LEFT ( sr.exe_time, 4 ) = #{nowYear} THEN 1 ELSE 0 END) as nowYear, | 24 | SUM( CASE WHEN LEFT ( sr.exe_time, 4 ) = #{nowYear} THEN 1 ELSE 0 END) as nowYear, |
25 | SUM( CASE WHEN LEFT ( sr.exe_time, 4 ) = #{lastYear} THEN 1 ELSE 0 END ) as last_year | 25 | SUM( CASE WHEN LEFT ( sr.exe_time, 4 ) = #{lastYear} THEN 1 ELSE 0 END ) as last_year |
26 | from ajh_exercise_situation sr | 26 | from ajh_exercise_situation sr |
27 | UNION | 27 | UNION |
28 | select | 28 | select |
29 | '年度危险作业时间(起)' as 'name','wx' as 'code', | 29 | '年度危险作业事件(起)' as 'name','wx' as 'code', |
30 | SUM( CASE WHEN LEFT ( sr.operation_date, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ) as now, | 30 | SUM( CASE WHEN LEFT ( sr.operation_date, 7 ) = #{nowMonth} THEN 1 ELSE 0 END ) as now, |
31 | SUM( CASE WHEN LEFT ( sr.operation_date, 4 ) = #{nowYear} THEN 1 ELSE 0 END) as nowYear, | 31 | SUM( CASE WHEN LEFT ( sr.operation_date, 4 ) = #{nowYear} THEN 1 ELSE 0 END) as nowYear, |
32 | SUM( CASE WHEN LEFT ( sr.operation_date, 4 ) = #{lastYear} THEN 1 ELSE 0 END ) as last_year | 32 | SUM( CASE WHEN LEFT ( sr.operation_date, 4 ) = #{lastYear} THEN 1 ELSE 0 END ) as last_year |
33 | from dangerous_operation_manage sr | 33 | from dangerous_operation_manage sr |
34 | UNION | 34 | UNION |
35 | select | 35 | select |
36 | '特种设备数量(起)' as 'name','tzsb' as 'code', | 36 | '特种设备数量(台)' as 'name','tzsb' as 'code', |
37 | count(1) as 'nowYear' , '0' as 'now' ,'0' as 'last_year' | 37 | count(1) as 'nowYear' , '0' as 'now' ,'0' as 'last_year' |
38 | from equipment_info where is_special =1 | 38 | from equipment_info where is_special =1 |
39 | </select> | 39 | </select> | ... | ... |
... | @@ -35,7 +35,7 @@ | ... | @@ -35,7 +35,7 @@ |
35 | <!--根据时间统计 --> | 35 | <!--根据时间统计 --> |
36 | <select id="statisticsByTime" resultType="com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO"> | 36 | <select id="statisticsByTime" resultType="com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO"> |
37 | SELECT | 37 | SELECT |
38 | DATE_FORMAT( inspection_time, '%Y%m' ) time, | 38 | DATE_FORMAT( inspection_time, '%Y-%m' ) time, |
39 | SUM(IF(`inspection_type`='1',inspection_type,0)) as 'swgsjcNum', | 39 | SUM(IF(`inspection_type`='1',inspection_type,0)) as 'swgsjcNum', |
40 | SUM(IF(`inspection_type`='2',inspection_type,0))/2 as 'xmbjcNum' | 40 | SUM(IF(`inspection_type`='2',inspection_type,0))/2 as 'xmbjcNum' |
41 | FROM ajh_leader_inspection_record | 41 | FROM ajh_leader_inspection_record |
... | @@ -61,7 +61,7 @@ | ... | @@ -61,7 +61,7 @@ |
61 | 61 | ||
62 | </where> | 62 | </where> |
63 | group by | 63 | group by |
64 | DATE_FORMAT( inspection_time, '%Y%m' ) | 64 | DATE_FORMAT( inspection_time,'%Y-%m' ) |
65 | </select> | 65 | </select> |
66 | 66 | ||
67 | <!--根据带班领导统计 --> | 67 | <!--根据带班领导统计 --> | ... | ... |
... | @@ -4,6 +4,7 @@ import com.skua.modules.ajh.entity.LeaderInspectionRecord; | ... | @@ -4,6 +4,7 @@ import com.skua.modules.ajh.entity.LeaderInspectionRecord; |
4 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | import com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO; | 5 | import com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO; |
6 | import com.skua.modules.ajh.vo.LeaderInspectionRecordVO; | 6 | import com.skua.modules.ajh.vo.LeaderInspectionRecordVO; |
7 | import com.skua.modules.erp.vo.LeaderInspectionRecordSearchVO; | ||
7 | 8 | ||
8 | import java.util.List; | 9 | import java.util.List; |
9 | 10 | ||
... | @@ -17,18 +18,18 @@ public interface ILeaderInspectionRecordService extends IService<LeaderInspectio | ... | @@ -17,18 +18,18 @@ public interface ILeaderInspectionRecordService extends IService<LeaderInspectio |
17 | * @param leaderInspectionRecord | 18 | * @param leaderInspectionRecord |
18 | * @return | 19 | * @return |
19 | */ | 20 | */ |
20 | LeaderInspectionRecordVO statisticsNum(LeaderInspectionRecord leaderInspectionRecord); | 21 | LeaderInspectionRecordVO statisticsNum(LeaderInspectionRecordSearchVO leaderInspectionRecord); |
21 | /** | 22 | /** |
22 | * 根据时间统计 | 23 | * 根据时间统计 |
23 | * @param leaderInspectionRecord | 24 | * @param leaderInspectionRecord |
24 | * @return | 25 | * @return |
25 | */ | 26 | */ |
26 | List<LeaderInspectionRecordStatisticsVO> statisticsByTime(LeaderInspectionRecord leaderInspectionRecord); | 27 | List<LeaderInspectionRecordStatisticsVO> statisticsByTime(LeaderInspectionRecordSearchVO leaderInspectionRecord); |
27 | 28 | ||
28 | /*** | 29 | /*** |
29 | * 根据带班领导统计 | 30 | * 根据带班领导统计 |
30 | * @param leaderInspectionRecord | 31 | * @param leaderInspectionRecord |
31 | * @return | 32 | * @return |
32 | */ | 33 | */ |
33 | List<LeaderInspectionRecordStatisticsVO> statisticsByLeader(LeaderInspectionRecord leaderInspectionRecord); | 34 | List<LeaderInspectionRecordStatisticsVO> statisticsByLeader(LeaderInspectionRecordSearchVO leaderInspectionRecord); |
34 | } | 35 | } | ... | ... |
sk-module-biz/src/main/java/com/skua/modules/ajh/service/impl/LeaderInspectionRecordServiceImpl.java
... | @@ -5,6 +5,7 @@ import com.skua.modules.ajh.mapper.LeaderInspectionRecordMapper; | ... | @@ -5,6 +5,7 @@ import com.skua.modules.ajh.mapper.LeaderInspectionRecordMapper; |
5 | import com.skua.modules.ajh.service.ILeaderInspectionRecordService; | 5 | import com.skua.modules.ajh.service.ILeaderInspectionRecordService; |
6 | import com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO; | 6 | import com.skua.modules.ajh.vo.LeaderInspectionRecordStatisticsVO; |
7 | import com.skua.modules.ajh.vo.LeaderInspectionRecordVO; | 7 | import com.skua.modules.ajh.vo.LeaderInspectionRecordVO; |
8 | import com.skua.modules.erp.vo.LeaderInspectionRecordSearchVO; | ||
8 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
9 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 10 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
10 | 11 | ||
... | @@ -21,7 +22,7 @@ public class LeaderInspectionRecordServiceImpl extends ServiceImpl<LeaderInspect | ... | @@ -21,7 +22,7 @@ public class LeaderInspectionRecordServiceImpl extends ServiceImpl<LeaderInspect |
21 | * @param leaderInspectionRecord | 22 | * @param leaderInspectionRecord |
22 | * @return | 23 | * @return |
23 | */ | 24 | */ |
24 | public LeaderInspectionRecordVO statisticsNum(LeaderInspectionRecord leaderInspectionRecord){ | 25 | public LeaderInspectionRecordVO statisticsNum(LeaderInspectionRecordSearchVO leaderInspectionRecord){ |
25 | List<LeaderInspectionRecordVO> dataList = this.baseMapper.statisticsNum( leaderInspectionRecord) ; | 26 | List<LeaderInspectionRecordVO> dataList = this.baseMapper.statisticsNum( leaderInspectionRecord) ; |
26 | if(dataList != null ){ | 27 | if(dataList != null ){ |
27 | return dataList.get(0); | 28 | return dataList.get(0); |
... | @@ -33,7 +34,7 @@ public class LeaderInspectionRecordServiceImpl extends ServiceImpl<LeaderInspect | ... | @@ -33,7 +34,7 @@ public class LeaderInspectionRecordServiceImpl extends ServiceImpl<LeaderInspect |
33 | * @param leaderInspectionRecord | 34 | * @param leaderInspectionRecord |
34 | * @return | 35 | * @return |
35 | */ | 36 | */ |
36 | public List<LeaderInspectionRecordStatisticsVO> statisticsByTime(LeaderInspectionRecord leaderInspectionRecord){ | 37 | public List<LeaderInspectionRecordStatisticsVO> statisticsByTime(LeaderInspectionRecordSearchVO leaderInspectionRecord){ |
37 | return this.baseMapper.statisticsByTime( leaderInspectionRecord) ; | 38 | return this.baseMapper.statisticsByTime( leaderInspectionRecord) ; |
38 | } | 39 | } |
39 | 40 | ||
... | @@ -42,7 +43,7 @@ public class LeaderInspectionRecordServiceImpl extends ServiceImpl<LeaderInspect | ... | @@ -42,7 +43,7 @@ public class LeaderInspectionRecordServiceImpl extends ServiceImpl<LeaderInspect |
42 | * @param leaderInspectionRecord | 43 | * @param leaderInspectionRecord |
43 | * @return | 44 | * @return |
44 | */ | 45 | */ |
45 | public List<LeaderInspectionRecordStatisticsVO> statisticsByLeader(LeaderInspectionRecord leaderInspectionRecord){ | 46 | public List<LeaderInspectionRecordStatisticsVO> statisticsByLeader(LeaderInspectionRecordSearchVO leaderInspectionRecord){ |
46 | return this.baseMapper.statisticsByLeader( leaderInspectionRecord) ; | 47 | return this.baseMapper.statisticsByLeader( leaderInspectionRecord) ; |
47 | } | 48 | } |
48 | } | 49 | } | ... | ... |
1 | package com.skua.modules.erp.vo; | ||
2 | |||
3 | import com.baomidou.mybatisplus.annotation.TableField; | ||
4 | import com.skua.modules.ajh.entity.LeaderInspectionRecord; | ||
5 | import io.swagger.annotations.ApiModel; | ||
6 | import io.swagger.annotations.ApiModelProperty; | ||
7 | import lombok.Data; | ||
8 | |||
9 | /** | ||
10 | * @auther kangwei | ||
11 | * @create 2024-12-25-17:21 | ||
12 | */ | ||
13 | @Data | ||
14 | @ApiModel(value="领导带班查询对象", description="领导带班查询对象") | ||
15 | public class LeaderInspectionRecordSearchVO extends LeaderInspectionRecord { | ||
16 | |||
17 | @TableField(exist=false) | ||
18 | @ApiModelProperty(value = "开始时间:yyyy-MM-dd") | ||
19 | private String startDate; | ||
20 | |||
21 | @TableField(exist=false) | ||
22 | @ApiModelProperty(value = "结束时间:yyyy-MM-dd") | ||
23 | private String endDate; | ||
24 | |||
25 | @TableField(exist=false) | ||
26 | @ApiModelProperty(value = "部门集合") | ||
27 | private String departIds; | ||
28 | } |
... | @@ -11,6 +11,7 @@ import com.skua.core.context.SpringContextUtils; | ... | @@ -11,6 +11,7 @@ import com.skua.core.context.SpringContextUtils; |
11 | import com.skua.core.query.QueryGenerator; | 11 | import com.skua.core.query.QueryGenerator; |
12 | import com.skua.core.util.ConvertUtils; | 12 | import com.skua.core.util.ConvertUtils; |
13 | import com.skua.core.util.DateUtils; | 13 | import com.skua.core.util.DateUtils; |
14 | import com.skua.modules.erp.entity.ApproveRecord; | ||
14 | import com.skua.modules.erp.entity.ErpSettlement; | 15 | import com.skua.modules.erp.entity.ErpSettlement; |
15 | import com.skua.modules.erp.vo.PurchaseContractVO; | 16 | import com.skua.modules.erp.vo.PurchaseContractVO; |
16 | import com.skua.modules.material.entity.MaterialInfo; | 17 | import com.skua.modules.material.entity.MaterialInfo; |
... | @@ -103,27 +104,13 @@ public class MaterialInfoController { | ... | @@ -103,27 +104,13 @@ public class MaterialInfoController { |
103 | @GetMapping(value = "/list") | 104 | @GetMapping(value = "/list") |
104 | public Result<IPage<MaterialInfo>> queryFLFGPageList(MaterialInfo materialInfo, | 105 | public Result<IPage<MaterialInfo>> queryFLFGPageList(MaterialInfo materialInfo, |
105 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 106 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
106 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { | 107 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
108 | HttpServletRequest req) { | ||
107 | Result<IPage<MaterialInfo>> result = new Result<IPage<MaterialInfo>>(); | 109 | Result<IPage<MaterialInfo>> result = new Result<IPage<MaterialInfo>>(); |
108 | Page<MaterialInfo> page = new Page<MaterialInfo>(pageNo, pageSize); | 110 | Page<MaterialInfo> page = new Page<MaterialInfo>(pageNo, pageSize); |
109 | QueryWrapper<MaterialInfo> queryWrapper = new QueryWrapper(); | 111 | QueryWrapper<MaterialInfo> queryWrapper = QueryGenerator.initQueryWrapper(materialInfo, req.getParameterMap()); |
110 | queryWrapper.eq("del_flag","0"); | 112 | // QueryWrapper<MaterialInfo> queryWrapper = getMaterialInfoQueryWrapper(materialInfo); |
111 | if(StringUtils.isNotEmpty(materialInfo.getFacInformationtype())){ | 113 | queryWrapper.orderByDesc("create_time"); |
112 | queryWrapper.eq("fac_informationtype",materialInfo.getFacInformationtype()); | ||
113 | } | ||
114 | if(StringUtils.isNotEmpty(materialInfo.getFacInformationName())){ | ||
115 | queryWrapper.like("fac_information_name",materialInfo.getFacInformationName()); | ||
116 | } | ||
117 | if(StringUtils.isNotEmpty(materialInfo.getRulesType())){ | ||
118 | queryWrapper.like("rules_type",materialInfo.getRulesType()); | ||
119 | } | ||
120 | if(StringUtils.isNotEmpty(materialInfo.getLawsType())){ | ||
121 | queryWrapper.like("laws_type",materialInfo.getLawsType()); | ||
122 | } | ||
123 | if(StringUtils.isNotEmpty(materialInfo.getStandardsType())){ | ||
124 | queryWrapper.like("standards_type",materialInfo.getStandardsType()); | ||
125 | } | ||
126 | queryWrapper.eq("status","3"); | ||
127 | IPage<MaterialInfo> pageList = materialInfoService.page(page, queryWrapper); | 114 | IPage<MaterialInfo> pageList = materialInfoService.page(page, queryWrapper); |
128 | result.setSuccess(true); | 115 | result.setSuccess(true); |
129 | result.setResult(pageList); | 116 | result.setResult(pageList); |
... | @@ -135,13 +122,16 @@ public class MaterialInfoController { | ... | @@ -135,13 +122,16 @@ public class MaterialInfoController { |
135 | @GetMapping(value = "/unAuditList") | 122 | @GetMapping(value = "/unAuditList") |
136 | public Result<IPage<MaterialInfo>> queryUnAuditPageList(MaterialInfo materialInfo, | 123 | public Result<IPage<MaterialInfo>> queryUnAuditPageList(MaterialInfo materialInfo, |
137 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 124 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
138 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { | 125 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
126 | HttpServletRequest req) { | ||
139 | Result<IPage<MaterialInfo>> result = new Result<IPage<MaterialInfo>>(); | 127 | Result<IPage<MaterialInfo>> result = new Result<IPage<MaterialInfo>>(); |
140 | Page<MaterialInfo> page = new Page<MaterialInfo>(pageNo, pageSize); | 128 | Page<MaterialInfo> page = new Page<MaterialInfo>(pageNo, pageSize); |
141 | QueryWrapper<MaterialInfo> queryWrapper = getMaterialInfoQueryWrapper(materialInfo); | 129 | QueryWrapper<MaterialInfo> queryWrapper = QueryGenerator.initQueryWrapper(materialInfo, req.getParameterMap()); |
130 | //QueryWrapper<MaterialInfo> queryWrapper = getMaterialInfoQueryWrapper(materialInfo); | ||
142 | //queryWrapper.in("status","'1','2'"); | 131 | //queryWrapper.in("status","'1','2'"); |
143 | queryWrapper.eq("status","1"); | 132 | queryWrapper.eq("status","1"); |
144 | //queryWrapper.le("status","2"); | 133 | //queryWrapper.le("status","2"); |
134 | queryWrapper.orderByDesc("create_time"); | ||
145 | IPage<MaterialInfo> pageList = materialInfoService.page(page, queryWrapper); | 135 | IPage<MaterialInfo> pageList = materialInfoService.page(page, queryWrapper); |
146 | result.setSuccess(true); | 136 | result.setSuccess(true); |
147 | result.setResult(pageList); | 137 | result.setResult(pageList); |
... | @@ -152,28 +142,27 @@ public class MaterialInfoController { | ... | @@ -152,28 +142,27 @@ public class MaterialInfoController { |
152 | @GetMapping(value = "/myList") | 142 | @GetMapping(value = "/myList") |
153 | public Result<IPage<MaterialInfo>> queryMyPageList(MaterialInfo materialInfo, | 143 | public Result<IPage<MaterialInfo>> queryMyPageList(MaterialInfo materialInfo, |
154 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 144 | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
155 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { | 145 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
146 | HttpServletRequest req) { | ||
156 | Result<IPage<MaterialInfo>> result = new Result<IPage<MaterialInfo>>(); | 147 | Result<IPage<MaterialInfo>> result = new Result<IPage<MaterialInfo>>(); |
157 | Page<MaterialInfo> page = new Page<MaterialInfo>(pageNo, pageSize); | 148 | Page<MaterialInfo> page = new Page<MaterialInfo>(pageNo, pageSize); |
158 | QueryWrapper<MaterialInfo> queryWrapper = getMaterialInfoQueryWrapper(materialInfo); | 149 | //QueryWrapper<MaterialInfo> queryWrapper = getMaterialInfoQueryWrapper(materialInfo); |
150 | QueryWrapper<MaterialInfo> queryWrapper = QueryGenerator.initQueryWrapper(materialInfo, req.getParameterMap()); | ||
159 | //queryWrapper.in("status","'1','2'"); | 151 | //queryWrapper.in("status","'1','2'"); |
160 | queryWrapper.eq("user_id",BaseContextHandler.getUserId()); | 152 | queryWrapper.eq("user_id",BaseContextHandler.getUserId()); |
161 | 153 | queryWrapper.orderByDesc("create_time"); | |
162 | IPage<MaterialInfo> pageList = materialInfoService.page(page, queryWrapper); | 154 | IPage<MaterialInfo> pageList = materialInfoService.page(page, queryWrapper); |
163 | result.setSuccess(true); | 155 | result.setSuccess(true); |
164 | result.setResult(pageList); | 156 | result.setResult(pageList); |
165 | return result; | 157 | return result; |
166 | } | 158 | } |
167 | |||
168 | |||
169 | private QueryWrapper<MaterialInfo> getMaterialInfoQueryWrapper(MaterialInfo materialInfo){ | 159 | private QueryWrapper<MaterialInfo> getMaterialInfoQueryWrapper(MaterialInfo materialInfo){ |
170 | QueryWrapper<MaterialInfo> queryWrapper = new QueryWrapper(); | 160 | QueryWrapper<MaterialInfo> queryWrapper = new QueryWrapper(); |
171 | String departIds = null; | 161 | String departIds = null; |
172 | if (StringUtils.isNotEmpty(materialInfo.getDepartId())) { | 162 | if (StringUtils.isNotEmpty(materialInfo.getDepartId())) { |
173 | //departIds = departService.getChildDepartId(BaseContextHandler.getDeparts()); | 163 | departIds = departService.getChildDepartId(BaseContextHandler.getDeparts()); |
174 | departIds = departService.getChildDepartId(materialInfo.getDepartId()); | 164 | //departIds = BaseContextHandler.getDeparts(); |
175 | }else{ | 165 | queryWrapper.in("depart_id", JSUtils.quoteEach(departIds,",")); |
176 | departIds = BaseContextHandler.getDeparts(); | ||
177 | } | 166 | } |
178 | // Page<MaterialInfo> page = new Page<ErpSettlement>(pageNo, pageSize); | 167 | // Page<MaterialInfo> page = new Page<ErpSettlement>(pageNo, pageSize); |
179 | queryWrapper.eq("del_flag","0"); | 168 | queryWrapper.eq("del_flag","0"); | ... | ... |
1 | package com.skua.modules.safe.mapper; | 1 | package com.skua.modules.safe.mapper; |
2 | 2 | ||
3 | import java.util.List; | ||
4 | 3 | ||
5 | import com.baomidou.mybatisplus.core.metadata.IPage; | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ... | ... |
... | @@ -6,6 +6,7 @@ import com.skua.modules.equipment.service.IDrugConsumptionAnalysisService; | ... | @@ -6,6 +6,7 @@ import com.skua.modules.equipment.service.IDrugConsumptionAnalysisService; |
6 | import com.skua.modules.equipment.vo.CorrelationAnalysisVO; | 6 | import com.skua.modules.equipment.vo.CorrelationAnalysisVO; |
7 | import com.skua.modules.equipment.vo.DrugConsumptionDisplayVO; | 7 | import com.skua.modules.equipment.vo.DrugConsumptionDisplayVO; |
8 | import com.skua.modules.equipment.vo.DrugConsumptionTrendChartVO; | 8 | import com.skua.modules.equipment.vo.DrugConsumptionTrendChartVO; |
9 | import com.skua.modules.equipment.vo.DrugDateConclusionVO; | ||
9 | import io.swagger.annotations.Api; | 10 | import io.swagger.annotations.Api; |
10 | import io.swagger.annotations.ApiOperation; | 11 | import io.swagger.annotations.ApiOperation; |
11 | import lombok.extern.slf4j.Slf4j; | 12 | import lombok.extern.slf4j.Slf4j; |
... | @@ -38,18 +39,18 @@ public class DrugConsumptionAnalysisController { | ... | @@ -38,18 +39,18 @@ public class DrugConsumptionAnalysisController { |
38 | @AutoLog(value = "总药耗趋势") | 39 | @AutoLog(value = "总药耗趋势") |
39 | @ApiOperation(value = "总药耗趋势", notes = "总药耗趋势") | 40 | @ApiOperation(value = "总药耗趋势", notes = "总药耗趋势") |
40 | @GetMapping("/data/drugConsumptionTrend") | 41 | @GetMapping("/data/drugConsumptionTrend") |
41 | public Result<List<DrugConsumptionTrendChartVO>> drugConsumptionTrend(String time, String departId) { | 42 | public Result<DrugDateConclusionVO> drugConsumptionTrend(String time, String departId) { |
42 | Result<List<DrugConsumptionTrendChartVO>> result = new Result<>(); | 43 | Result<DrugDateConclusionVO> result = new Result<>(); |
43 | List<DrugConsumptionTrendChartVO> data = drugConsumptionAnalysisService.drugConsumptionTrend(time,departId); | 44 | DrugDateConclusionVO data = drugConsumptionAnalysisService.drugConsumptionTrend(time,departId); |
44 | result.setResult(data); | 45 | result.setResult(data); |
45 | return result; | 46 | return result; |
46 | } | 47 | } |
47 | @AutoLog(value = "吨水药耗趋势") | 48 | @AutoLog(value = "吨水药耗趋势") |
48 | @ApiOperation(value = "吨水药耗趋势", notes = "吨水药耗趋势") | 49 | @ApiOperation(value = "吨水药耗趋势", notes = "吨水药耗趋势") |
49 | @GetMapping("/data/consumptionTonOfWaterTrend") | 50 | @GetMapping("/data/consumptionTonOfWaterTrend") |
50 | public Result<List<DrugConsumptionTrendChartVO>> consumptionTonOfWaterTrend(String time, String departId) { | 51 | public Result<DrugDateConclusionVO> consumptionTonOfWaterTrend(String time, String departId) { |
51 | Result<List<DrugConsumptionTrendChartVO>> result = new Result<>(); | 52 | Result<DrugDateConclusionVO> result = new Result<>(); |
52 | List<DrugConsumptionTrendChartVO> data = drugConsumptionAnalysisService.consumptionTonOfWaterTrend(time,departId); | 53 | DrugDateConclusionVO data = drugConsumptionAnalysisService.consumptionTonOfWaterTrend(time,departId); |
53 | result.setResult(data); | 54 | result.setResult(data); |
54 | return result; | 55 | return result; |
55 | } | 56 | } |
... | @@ -76,19 +77,28 @@ public class DrugConsumptionAnalysisController { | ... | @@ -76,19 +77,28 @@ public class DrugConsumptionAnalysisController { |
76 | @AutoLog(value = "相关性分析") | 77 | @AutoLog(value = "相关性分析") |
77 | @ApiOperation(value = "相关性分析 type 1.絮凝剂 2.碳源 3.除磷剂", notes = "相关性分析 type 1.絮凝剂 2.碳源 3.除磷剂") | 78 | @ApiOperation(value = "相关性分析 type 1.絮凝剂 2.碳源 3.除磷剂", notes = "相关性分析 type 1.絮凝剂 2.碳源 3.除磷剂") |
78 | @GetMapping("/correlation/analysis") | 79 | @GetMapping("/correlation/analysis") |
79 | public Result<List<CorrelationAnalysisVO>> correlationAnalysis(String time, String drugCode, String departId) { | 80 | public Result<CorrelationAnalysisVO> correlationAnalysis(String time, String drugCode, String departId) { |
80 | Result<List<CorrelationAnalysisVO>> result = new Result<>(); | 81 | Result<CorrelationAnalysisVO> result = new Result<>(); |
81 | if(StringUtils.isEmpty(drugCode)){ | 82 | String drugName = null; |
82 | List<DrugConsumptionDisplayVO> dataList = drugConsumptionAnalysisService.analysisType(); | 83 | List<DrugConsumptionDisplayVO> dataList = drugConsumptionAnalysisService.analysisType(); |
84 | if(StringUtils.isEmpty(drugCode)){ | ||
83 | if(dataList != null && !dataList.isEmpty() ){ | 85 | if(dataList != null && !dataList.isEmpty() ){ |
84 | drugCode = dataList.get(0).getDrugCode(); | 86 | drugCode = dataList.get(0).getDrugCode(); |
87 | drugName = dataList.get(0).getDrugName(); | ||
88 | } | ||
89 | }else{ | ||
90 | for(DrugConsumptionDisplayVO drugConsumptionDisplayVO : dataList){ | ||
91 | if(drugConsumptionDisplayVO.getDrugCode().equals( drugCode )){ | ||
92 | drugName = drugConsumptionDisplayVO.getDrugName(); | ||
93 | break; | ||
94 | } | ||
85 | } | 95 | } |
86 | } | 96 | } |
87 | if(StringUtils.isEmpty(drugCode)){ | 97 | if(StringUtils.isEmpty(drugCode)){ |
88 | result.error500("参数不识别"); | 98 | result.error500("参数不识别"); |
89 | }else{ | 99 | }else{ |
90 | List<CorrelationAnalysisVO> list = drugConsumptionAnalysisService.correlationAnalysis(time,drugCode ,departId); | 100 | CorrelationAnalysisVO correlationAnalysis = drugConsumptionAnalysisService.correlationAnalysis(time,drugCode ,drugName,departId); |
91 | result.setResult(list); | 101 | result.setResult(correlationAnalysis); |
92 | } | 102 | } |
93 | return result; | 103 | return result; |
94 | } | 104 | } | ... | ... |
1 | package com.skua.modules.equipment.service; | 1 | package com.skua.modules.equipment.service; |
2 | 2 | ||
3 | |||
4 | import com.skua.modules.equipment.dto.DrugDto; | ||
5 | import com.skua.modules.equipment.vo.CorrelationAnalysisVO; | 3 | import com.skua.modules.equipment.vo.CorrelationAnalysisVO; |
6 | import com.skua.modules.equipment.vo.DrugConsumptionDisplayVO; | 4 | import com.skua.modules.equipment.vo.DrugConsumptionDisplayVO; |
7 | import com.skua.modules.equipment.vo.DrugConsumptionTrendChartVO; | 5 | import com.skua.modules.equipment.vo.DrugConsumptionTrendChartVO; |
8 | 6 | import com.skua.modules.equipment.vo.DrugDateConclusionVO; | |
9 | import java.util.List; | 7 | import java.util.List; |
10 | import java.util.Map; | ||
11 | 8 | ||
12 | public interface IDrugConsumptionAnalysisService { | 9 | public interface IDrugConsumptionAnalysisService { |
13 | //数据展示 | 10 | //数据展示 |
14 | DrugConsumptionDisplayVO dataDisplay(String time, String departId); | 11 | DrugConsumptionDisplayVO dataDisplay(String time, String departId); |
15 | 12 | ||
16 | //总药耗趋势--->改为吨水药费用 | 13 | //总药耗趋势--->改为吨水药费用 |
17 | List<DrugConsumptionTrendChartVO> drugConsumptionTrend(String time, String departId); | 14 | DrugDateConclusionVO drugConsumptionTrend(String time, String departId); |
18 | //吨水药耗趋势 | 15 | //吨水药耗趋势 |
19 | List<DrugConsumptionTrendChartVO> consumptionTonOfWaterTrend(String time,String departId); | 16 | DrugDateConclusionVO consumptionTonOfWaterTrend(String time,String departId); |
20 | //药剂占比统计 type 1.按明细 2.按类型 | 17 | //药剂占比统计 type 1.按明细 2.按类型 |
21 | List<DrugConsumptionDisplayVO> proportionStatistics(String time,String departId); | 18 | List<DrugConsumptionDisplayVO> proportionStatistics(String time,String departId); |
22 | //药剂占比统计列表 type 1.按明细 2.按类型 | 19 | //药剂占比统计列表 type 1.按明细 2.按类型 |
23 | //Map<String, Object> proportionStatisticsDetail(String time, Integer type,String departId); | 20 | //Map<String, Object> proportionStatisticsDetail(String time, Integer type,String departId); |
24 | //相关性分析 type 1.絮凝剂 2.碳源 3.除磷剂 | 21 | //相关性分析 type 1.絮凝剂 2.碳源 3.除磷剂 |
25 | List<CorrelationAnalysisVO> correlationAnalysis(String time, String drugCode , String departId); | 22 | CorrelationAnalysisVO correlationAnalysis(String time, String drugCode ,String drugName, String departId); |
26 | //相关性分析 统计类型 | 23 | //相关性分析 统计类型 |
27 | List<DrugConsumptionDisplayVO> analysisType(); | 24 | List<DrugConsumptionDisplayVO> analysisType(); |
28 | //总药耗趋势详情 | 25 | //总药耗趋势详情 | ... | ... |
此文件的差异被折叠,
点击展开。
sk-module-equipment/src/main/java/com/skua/modules/equipment/vo/CorrelationAnalysisChartsVO.java
0 → 100644
1 | package com.skua.modules.equipment.vo; | ||
2 | |||
3 | import com.skua.tool.util.JSUtils; | ||
4 | import io.swagger.annotations.ApiModel; | ||
5 | import io.swagger.annotations.ApiModelProperty; | ||
6 | import lombok.Data; | ||
7 | import org.apache.commons.lang.StringUtils; | ||
8 | |||
9 | @Data | ||
10 | @ApiModel(value="药耗分析:相关性分析", description="药耗分析:相关性分析") | ||
11 | public class CorrelationAnalysisChartsVO { | ||
12 | |||
13 | @ApiModelProperty(value = "药剂code") | ||
14 | private String drugCode; | ||
15 | @ApiModelProperty(value = "药剂名称") | ||
16 | private String drugName; | ||
17 | |||
18 | @ApiModelProperty(value = "时间") | ||
19 | private String time; | ||
20 | |||
21 | @ApiModelProperty(value = "药剂总药耗") | ||
22 | private String zyh; | ||
23 | |||
24 | @ApiModelProperty(value = "吨泥耗量") | ||
25 | private String dnhl; | ||
26 | |||
27 | @ApiModelProperty(value = "进水ss") | ||
28 | private String jsss; | ||
29 | |||
30 | @ApiModelProperty(value = "污泥量") | ||
31 | private String wnl; | ||
32 | |||
33 | @ApiModelProperty(value = "污泥含水量") | ||
34 | private String wnhsl; | ||
35 | |||
36 | public CorrelationAnalysisChartsVO() { | ||
37 | } | ||
38 | |||
39 | public CorrelationAnalysisChartsVO(String time, String zyh, String wnl, String wnhsl) { | ||
40 | this.time = time; | ||
41 | this.zyh = zyh; | ||
42 | this.wnl = wnl; | ||
43 | this.wnhsl = wnhsl; | ||
44 | } | ||
45 | |||
46 | ////吨泥耗量=絮凝剂总量/干污泥总量 | ||
47 | //干污泥量=产泥量*(1-污泥含水率) | ||
48 | public String getDnhl() { | ||
49 | String expression = null; | ||
50 | if(StringUtils.isNotEmpty(this.zyh)){ | ||
51 | if(StringUtils.isNotEmpty(this.wnhsl)){ | ||
52 | expression = "("+this.zyh +" * 100 )/ ("+this.wnl+"* (100-"+this.wnhsl+"))"; | ||
53 | }else{ | ||
54 | expression = this.zyh +"/ "+this.wnl+""; | ||
55 | } | ||
56 | dnhl = JSUtils.executeExpression(expression , "0.0"); | ||
57 | } | ||
58 | return dnhl; | ||
59 | } | ||
60 | |||
61 | } |
1 | package com.skua.modules.equipment.vo; | 1 | package com.skua.modules.equipment.vo; |
2 | 2 | ||
3 | import com.skua.tool.util.JSUtils; | ||
4 | import io.swagger.annotations.ApiModel; | 3 | import io.swagger.annotations.ApiModel; |
5 | import io.swagger.annotations.ApiModelProperty; | 4 | import io.swagger.annotations.ApiModelProperty; |
6 | import lombok.Data; | 5 | import lombok.Data; |
7 | import org.apache.commons.lang.StringUtils; | 6 | |
7 | import java.util.List; | ||
8 | 8 | ||
9 | @Data | 9 | @Data |
10 | @ApiModel(value="药耗分析:相关性分析", description="药耗分析:相关性分析") | 10 | @ApiModel(value="药耗分析:相关性分析", description="药耗分析:相关性分析") |
11 | public class CorrelationAnalysisVO { | 11 | public class CorrelationAnalysisVO { |
12 | @ApiModelProperty(value = "结论") | ||
13 | private String conclusion; | ||
12 | 14 | ||
13 | @ApiModelProperty(value = "药剂code") | ||
14 | private String drugCode; | ||
15 | @ApiModelProperty(value = "药剂名称") | ||
16 | private String drugName; | ||
17 | |||
18 | @ApiModelProperty(value = "时间") | ||
19 | private String time; | ||
20 | |||
21 | @ApiModelProperty(value = "药剂总药耗") | ||
22 | private String zyh; | ||
23 | |||
24 | @ApiModelProperty(value = "吨泥耗量") | ||
25 | private String dnhl; | ||
26 | |||
27 | @ApiModelProperty(value = "进水ss") | ||
28 | private String jsss; | ||
29 | |||
30 | @ApiModelProperty(value = "污泥量") | ||
31 | private String wnl; | ||
32 | |||
33 | @ApiModelProperty(value = "污泥含水量") | ||
34 | private String wnhsl; | ||
35 | |||
36 | public CorrelationAnalysisVO() { | ||
37 | } | ||
38 | |||
39 | public CorrelationAnalysisVO(String time, String zyh, String wnl, String wnhsl) { | ||
40 | this.time = time; | ||
41 | this.zyh = zyh; | ||
42 | this.wnl = wnl; | ||
43 | this.wnhsl = wnhsl; | ||
44 | } | ||
45 | 15 | ||
46 | ////吨泥耗量=絮凝剂总量/干污泥总量 | 16 | @ApiModelProperty(value = "图标数据") |
47 | //干污泥量=产泥量*(1-污泥含水率) | 17 | private List<CorrelationAnalysisChartsVO> charts; |
48 | public String getDnhl() { | ||
49 | String expression = null; | ||
50 | if(StringUtils.isNotEmpty(this.zyh)){ | ||
51 | if(StringUtils.isNotEmpty(this.wnhsl)){ | ||
52 | expression = "("+this.zyh +" * 100 )/ ("+this.wnl+"* (100-"+this.wnhsl+"))"; | ||
53 | }else{ | ||
54 | expression = this.zyh +"/ "+this.wnl+""; | ||
55 | } | ||
56 | dnhl = JSUtils.executeExpression(expression , "0.0"); | ||
57 | } | ||
58 | return dnhl; | ||
59 | } | ||
60 | 18 | ||
61 | } | 19 | } | ... | ... |
... | @@ -73,6 +73,9 @@ public class DrugConsumptionDisplayVO { | ... | @@ -73,6 +73,9 @@ public class DrugConsumptionDisplayVO { |
73 | @ApiModelProperty(value = "历史最低吨水药耗--月份") | 73 | @ApiModelProperty(value = "历史最低吨水药耗--月份") |
74 | private String lszddsyhyf; | 74 | private String lszddsyhyf; |
75 | 75 | ||
76 | |||
77 | @ApiModelProperty(value = "结论") | ||
78 | private String conclusion; | ||
76 | public DrugConsumptionDisplayVO() { | 79 | public DrugConsumptionDisplayVO() { |
77 | } | 80 | } |
78 | 81 | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/vo/DrugDateConclusionVO.java
0 → 100644
1 | package com.skua.modules.equipment.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | import java.util.List; | ||
8 | |||
9 | /** | ||
10 | * @auther kangwei | ||
11 | * @create 2024-12-23-14:39 | ||
12 | */ | ||
13 | @Data | ||
14 | @ApiModel(value="药耗分析:结论以及图标数据", description="药耗分析:结论以及图标数据") | ||
15 | public class DrugDateConclusionVO { | ||
16 | @ApiModelProperty(value = "结论") | ||
17 | private String conclusion; | ||
18 | |||
19 | |||
20 | @ApiModelProperty(value = "图标数据") | ||
21 | private List<DrugConsumptionTrendChartVO> charts; | ||
22 | } |
-
请 注册 或 登录 后发表评论