kangwei: 安环两个大屏样式、需求改版-后端
正在显示
22 个修改的文件
包含
187 行增加
和
78 行删除
... | @@ -175,12 +175,6 @@ public class AjhRectificationInfoController { | ... | @@ -175,12 +175,6 @@ public class AjhRectificationInfoController { |
175 | 175 | ||
176 | queryWrapper.select("count(id) count,handle_result handleResult"); | 176 | queryWrapper.select("count(id) count,handle_result handleResult"); |
177 | queryWrapper.groupBy("handle_result"); | 177 | queryWrapper.groupBy("handle_result"); |
178 | /* if(StringUtils.isEmpty(ajhRectificationInfo.getDepartId())){ | ||
179 | ajhRectificationInfo.setDepartId(BaseContextHandler.getDeparts()); | ||
180 | }*/ | ||
181 | if (!"1".equals(BaseContextHandler.get("userType"))) { | ||
182 | queryWrapper.in("depart_id",BaseContextHandler.getDeparts()); | ||
183 | } | ||
184 | 178 | ||
185 | List<Map<String,Object>> list = ajhRectificationInfoService.listMaps(queryWrapper); | 179 | List<Map<String,Object>> list = ajhRectificationInfoService.listMaps(queryWrapper); |
186 | result.setSuccess(true); | 180 | result.setSuccess(true); |
... | @@ -352,4 +346,12 @@ public class AjhRectificationInfoController { | ... | @@ -352,4 +346,12 @@ public class AjhRectificationInfoController { |
352 | Map<String, Object> result = ajhRectificationInfoService.searchSafeCensus(now, paramType); | 346 | Map<String, Object> result = ajhRectificationInfoService.searchSafeCensus(now, paramType); |
353 | return result; | 347 | return result; |
354 | } | 348 | } |
349 | |||
350 | |||
351 | @ApiOperation(value="安全态势总览数据统计:统计教育+题库", notes="安全态势总览数据统计:统计教育+题库") | ||
352 | @RequestMapping(value = "/jyCensus", method = RequestMethod.GET) | ||
353 | public Map<String,Object> jyCensus(@RequestParam(name="now",required=true) String now) { | ||
354 | Map<String, Object> result = ajhRectificationInfoService.jyCensus(now); | ||
355 | return result; | ||
356 | } | ||
355 | } | 357 | } | ... | ... |
... | @@ -109,4 +109,6 @@ public interface IAjhRectificationInfoService extends IService<AjhRectificationI | ... | @@ -109,4 +109,6 @@ public interface IAjhRectificationInfoService extends IService<AjhRectificationI |
109 | Map<String,Object> getStructNoHandleDetail(String startTime,String endTime); | 109 | Map<String,Object> getStructNoHandleDetail(String startTime,String endTime); |
110 | 110 | ||
111 | boolean pass(AjhRectificationInfo dto); | 111 | boolean pass(AjhRectificationInfo dto); |
112 | //安全态势总览数据统计:统计教育+题库 | ||
113 | Map<String, Object> jyCensus(String now); | ||
112 | } | 114 | } | ... | ... |
... | @@ -17,6 +17,8 @@ import com.skua.modules.ajh.entity.AjhRectificationInfo; | ... | @@ -17,6 +17,8 @@ import com.skua.modules.ajh.entity.AjhRectificationInfo; |
17 | import com.skua.modules.ajh.mapper.AjhRectificationInfoMapper; | 17 | import com.skua.modules.ajh.mapper.AjhRectificationInfoMapper; |
18 | import com.skua.modules.ajh.service.IAjhRectificationInfoService; | 18 | import com.skua.modules.ajh.service.IAjhRectificationInfoService; |
19 | import com.skua.modules.ajh.vo.RectificationInfoAnalyseVO; | 19 | import com.skua.modules.ajh.vo.RectificationInfoAnalyseVO; |
20 | import com.skua.modules.common.service.ICommonSqlService; | ||
21 | import com.skua.modules.common.vo.DateVO; | ||
20 | import com.skua.modules.emergency.enums.DicRectificationInfoHandleResultEnums; | 22 | import com.skua.modules.emergency.enums.DicRectificationInfoHandleResultEnums; |
21 | import com.skua.modules.flow.business.service.FlowBusinessService; | 23 | import com.skua.modules.flow.business.service.FlowBusinessService; |
22 | import com.skua.modules.flow.business.service.IFlowService; | 24 | import com.skua.modules.flow.business.service.IFlowService; |
... | @@ -31,6 +33,7 @@ import com.skua.modules.system.entity.SysUser; | ... | @@ -31,6 +33,7 @@ import com.skua.modules.system.entity.SysUser; |
31 | import com.skua.modules.system.service.ISysDepartService; | 33 | import com.skua.modules.system.service.ISysDepartService; |
32 | import com.skua.modules.system.service.ISysDictService; | 34 | import com.skua.modules.system.service.ISysDictService; |
33 | import com.skua.modules.system.service.ISysUserService; | 35 | import com.skua.modules.system.service.ISysUserService; |
36 | import com.skua.tool.util.JSUtils; | ||
34 | import com.skua.tool.util.UniqIdUtils; | 37 | import com.skua.tool.util.UniqIdUtils; |
35 | import org.apache.commons.lang3.StringUtils; | 38 | import org.apache.commons.lang3.StringUtils; |
36 | import org.springframework.beans.BeanUtils; | 39 | import org.springframework.beans.BeanUtils; |
... | @@ -64,6 +67,9 @@ public class AjhRectificationInfoServiceImpl extends ServiceImpl<AjhRectificatio | ... | @@ -64,6 +67,9 @@ public class AjhRectificationInfoServiceImpl extends ServiceImpl<AjhRectificatio |
64 | @Autowired | 67 | @Autowired |
65 | private ISysDepartService departService; | 68 | private ISysDepartService departService; |
66 | 69 | ||
70 | @Autowired | ||
71 | private ICommonSqlService commonSqlService; | ||
72 | |||
67 | @Override | 73 | @Override |
68 | public Map<String, Object> searchSafeCensus(String now, String paramType) { | 74 | public Map<String, Object> searchSafeCensus(String now, String paramType) { |
69 | String nowMonth = now;//本月 | 75 | String nowMonth = now;//本月 |
... | @@ -139,6 +145,51 @@ public class AjhRectificationInfoServiceImpl extends ServiceImpl<AjhRectificatio | ... | @@ -139,6 +145,51 @@ public class AjhRectificationInfoServiceImpl extends ServiceImpl<AjhRectificatio |
139 | return result; | 145 | return result; |
140 | } | 146 | } |
141 | 147 | ||
148 | //安全态势总览数据统计:统计教育+题库 | ||
149 | public Map<String,Object> jyCensus(String now) { | ||
150 | Map<String, Object> dataMap = new HashMap<>(); | ||
151 | DateVO dateVO = new DateVO(now+"-01"); | ||
152 | //教培数量 | ||
153 | String jpNum = getJPCount( dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate() ); | ||
154 | dataMap.put("jpNum",jpNum);//本月教培数量 | ||
155 | String jpTBNum = getJPCount( dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime() ); | ||
156 | dataMap.put("jpTBNum",jpTBNum);//同比月教培数量 | ||
157 | String jpYearNum = getJPCount( dateVO.getNowYearStartDate(),dateVO.getNowYearEndDate() ); | ||
158 | dataMap.put("jpYearNum",jpYearNum);//本年教培数量 | ||
159 | |||
160 | String dbSql = "select count(1) from edu_question_db where create_time >='"+dateVO.getNowMonthStartDate()+" 00:00:00' and create_time <= '"+dateVO.getNowMonthEndDate()+" 23:59:59' "; | ||
161 | String dbNum = commonSqlService.queryForString(dbSql); | ||
162 | dataMap.put("dbNum",dbNum);//题库数量 | ||
163 | |||
164 | // 教培人数 | ||
165 | String sql = " select count(1) from ajh_meeting m ,ajh_meeting_send ms ,ajh_meeting_receipt t "; | ||
166 | sql += " where m.id = ms.meet_id and t.meets_id = ms.id and t.status = '1' and ms.meet_status > '0' and m.send_status = '1' and m.meet_category ='1' and ms.depart_id in("+JSUtils.quoteEach(BaseContextHandler.getDeparts(),",")+")+"; | ||
167 | sql += " and ms.meet_end_time >='"+dateVO.getNowYearStartDate()+" 00:00:00' and ms.meet_end_time <= '"+dateVO.getNowYearEndDate()+" 23:59:59' "; | ||
168 | String pxUserNum = commonSqlService.queryForString(dbSql); | ||
169 | //考试人数 | ||
170 | sql = " select count(1) from ( select up.user_id,up.paper_id from edu_user_paper up where up.end_time >='"+dateVO.getNowYearStartDate()+" 00:00:00' and up.end_time <= '"+dateVO.getNowYearEndDate()+" 23:59:59' group by up.user_id,up.paper_id)aaa"; | ||
171 | String examUserNum = commonSqlService.queryForString(dbSql); | ||
172 | |||
173 | dataMap.put("jpUserNum",JSUtils.add(pxUserNum,examUserNum));//教培总人数 | ||
174 | |||
175 | return dataMap; | ||
176 | } | ||
177 | // 获取教培数量 | ||
178 | private String getJPCount(String startDate,String endDate){ | ||
179 | //培训会议数量 | ||
180 | String sql = "select count(1) from ajh_meeting m ,ajh_meeting_send ms "; | ||
181 | sql += " where m.id = ms.meet_id and ms.meet_status > '0' and m.send_status = '1' and m.meet_category ='1' and ms.depart_id in("+JSUtils.quoteEach(BaseContextHandler.getDeparts(),",")+") "; | ||
182 | sql += " and ms.meet_end_time >='"+startDate+" 00:00:00' and ms.meet_end_time <= '"+endDate+" 23:59:59' "; | ||
183 | String pxNum = commonSqlService.queryForString(sql); | ||
184 | //试卷数量 | ||
185 | sql = " select count(p.id) from edu_paper p where p.send_status = '1' and p.depart_id in("+JSUtils.quoteEach(BaseContextHandler.getDeparts(),",")+") "; | ||
186 | sql += " and p.send_time >='"+startDate+" 00:00:00' and p.send_time <= '"+endDate+" 23:59:59' "; | ||
187 | String paperNum = commonSqlService.queryForString(sql); | ||
188 | |||
189 | String jpNum = JSUtils.add(pxNum,paperNum); | ||
190 | return jpNum; | ||
191 | } | ||
192 | |||
142 | 193 | ||
143 | @Override | 194 | @Override |
144 | @Transactional(rollbackFor = Exception.class) | 195 | @Transactional(rollbackFor = Exception.class) | ... | ... |
... | @@ -232,7 +232,6 @@ public class ReportItemvService { | ... | @@ -232,7 +232,6 @@ public class ReportItemvService { |
232 | private Map<String,String> commonQueryCsl(String departIds ,String startTime ,String endTime){ | 232 | private Map<String,String> commonQueryCsl(String departIds ,String startTime ,String endTime){ |
233 | Map<String,String> cslMap = new HashMap<>(); | 233 | Map<String,String> cslMap = new HashMap<>(); |
234 | String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departIds, startTime,endTime); | 234 | String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departIds, startTime,endTime); |
235 | // System.out.println("dataViewName2119 ="+dataViewName2119 ); | ||
236 | List<Map<String, Object>> dataMapList = getJdbcTemplate().queryForList(dataViewName2119); | 235 | List<Map<String, Object>> dataMapList = getJdbcTemplate().queryForList(dataViewName2119); |
237 | if(dataMapList != null){ | 236 | if(dataMapList != null){ |
238 | for(Map<String, Object> dataMap : dataMapList){ | 237 | for(Map<String, Object> dataMap : dataMapList){ | ... | ... |
sk-module-biz/src/main/java/com/skua/modules/dataAnalysis/service/impl/CommandCentreServiceImpl.java
... | @@ -160,7 +160,6 @@ public class CommandCentreServiceImpl implements ICommandCentreService { | ... | @@ -160,7 +160,6 @@ public class CommandCentreServiceImpl implements ICommandCentreService { |
160 | public Map<String,String> commonQueryCsl(String departIds ,String startTime ,String endTime){ | 160 | public Map<String,String> commonQueryCsl(String departIds ,String startTime ,String endTime){ |
161 | Map<String,String> cslMap = new HashMap<>(); | 161 | Map<String,String> cslMap = new HashMap<>(); |
162 | String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departIds, startTime,endTime); | 162 | String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departIds, startTime,endTime); |
163 | // System.out.println("dataViewName2119 ="+dataViewName2119 ); | ||
164 | List<Map<String, Object>> dataMapList = getJdbcTemplate().queryForList(dataViewName2119); | 163 | List<Map<String, Object>> dataMapList = getJdbcTemplate().queryForList(dataViewName2119); |
165 | if(dataMapList != null){ | 164 | if(dataMapList != null){ |
166 | for(Map<String, Object> dataMap : dataMapList){ | 165 | for(Map<String, Object> dataMap : dataMapList){ | ... | ... |
1 | package com.skua.modules.edu.job; | 1 | package com.skua.modules.edu.job; |
2 | 2 | ||
3 | import com.skua.core.context.BaseContextHandler; | ||
4 | import com.skua.core.util.DateUtils; | 3 | import com.skua.core.util.DateUtils; |
5 | import com.skua.core.util.push.IPushService; | ||
6 | import com.skua.core.util.push.MessageEntity; | ||
7 | import com.skua.core.util.push.PushMessageFactory; | ||
8 | import com.skua.modules.edu.entity.Paper; | 4 | import com.skua.modules.edu.entity.Paper; |
9 | import com.skua.modules.edu.service.IPaperService; | 5 | import com.skua.modules.edu.service.IPaperService; |
10 | import com.skua.modules.edu.service.IUserPaperService; | ||
11 | import com.skua.modules.system.entity.SysUser; | ||
12 | import com.skua.modules.system.service.ISysUserService; | 6 | import com.skua.modules.system.service.ISysUserService; |
7 | import com.skua.modules.system.service.SmsService; | ||
13 | import lombok.extern.slf4j.Slf4j; | 8 | import lombok.extern.slf4j.Slf4j; |
14 | import org.apache.commons.lang3.StringUtils; | 9 | import org.apache.commons.lang3.StringUtils; |
15 | import org.quartz.Job; | 10 | import org.quartz.Job; |
16 | import org.quartz.JobExecutionContext; | 11 | import org.quartz.JobExecutionContext; |
17 | import org.quartz.JobExecutionException; | 12 | import org.quartz.JobExecutionException; |
18 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
14 | import org.springframework.stereotype.Component; | ||
19 | 15 | ||
20 | import java.time.LocalDate; | 16 | import java.time.LocalDate; |
21 | import java.time.format.DateTimeFormatter; | 17 | import java.time.format.DateTimeFormatter; |
... | @@ -31,12 +27,15 @@ import java.util.stream.Collectors; | ... | @@ -31,12 +27,15 @@ import java.util.stream.Collectors; |
31 | * (3)、考试结束时间前1天推送一次(如果还未完成的话) | 27 | * (3)、考试结束时间前1天推送一次(如果还未完成的话) |
32 | */ | 28 | */ |
33 | @Slf4j | 29 | @Slf4j |
30 | @Component | ||
34 | public class EduSendMsgJob implements Job { | 31 | public class EduSendMsgJob implements Job { |
35 | 32 | ||
36 | @Autowired | 33 | @Autowired |
37 | private ISysUserService userService; | 34 | private ISysUserService userService; |
38 | @Autowired | 35 | @Autowired |
39 | private IPaperService paperService; | 36 | private IPaperService paperService; |
37 | @Autowired | ||
38 | private SmsService smsService; | ||
40 | @Override | 39 | @Override |
41 | public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { | 40 | public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { |
42 | log.info(String.format(" Jeecg-Boot 发送消息任务 SendMsgJob ! 时间:" + DateUtils.getTimestamp())); | 41 | log.info(String.format(" Jeecg-Boot 发送消息任务 SendMsgJob ! 时间:" + DateUtils.getTimestamp())); |
... | @@ -57,6 +56,7 @@ public class EduSendMsgJob implements Job { | ... | @@ -57,6 +56,7 @@ public class EduSendMsgJob implements Job { |
57 | String messageBody = null; | 56 | String messageBody = null; |
58 | String userIds = null; | 57 | String userIds = null; |
59 | 58 | ||
59 | String msgCategory = "12"; | ||
60 | List<Paper> paperList = paperService.queryExamUserIds(yesterDate,null); | 60 | List<Paper> paperList = paperService.queryExamUserIds(yesterDate,null); |
61 | if(paperList != null && !paperList.isEmpty()){ | 61 | if(paperList != null && !paperList.isEmpty()){ |
62 | for(Paper paper : paperList){ | 62 | for(Paper paper : paperList){ |
... | @@ -65,7 +65,8 @@ public class EduSendMsgJob implements Job { | ... | @@ -65,7 +65,8 @@ public class EduSendMsgJob implements Job { |
65 | messageBody = "考试任务:<"+paper.getPaperTitle() +">明天开始,考试时间:"+paper.getStartTime() +"至"+paper.getEndTime()+",请准时参加考试"; | 65 | messageBody = "考试任务:<"+paper.getPaperTitle() +">明天开始,考试时间:"+paper.getStartTime() +"至"+paper.getEndTime()+",请准时参加考试"; |
66 | userIds = getNoExamUserIds(paper.getExamUserIds(),paper.getUserIds()); | 66 | userIds = getNoExamUserIds(paper.getExamUserIds(),paper.getUserIds()); |
67 | if(StringUtils.isNotEmpty(userIds)){ | 67 | if(StringUtils.isNotEmpty(userIds)){ |
68 | pushMsgNoProcess(messageTitle,messageBody,userIds); | 68 | //pushMsgNoProcess(messageTitle,messageBody,userIds); |
69 | smsService.pushMsgNoProcess( messageTitle , messageBody , userIds, "Paper", msgCategory); | ||
69 | } | 70 | } |
70 | 71 | ||
71 | } | 72 | } |
... | @@ -78,37 +79,13 @@ public class EduSendMsgJob implements Job { | ... | @@ -78,37 +79,13 @@ public class EduSendMsgJob implements Job { |
78 | messageBody = "考试任务:<"+paper.getPaperTitle() +">明天结束,考试时间:"+paper.getStartTime() +"至"+paper.getEndTime()+",请准时参加考试"; | 79 | messageBody = "考试任务:<"+paper.getPaperTitle() +">明天结束,考试时间:"+paper.getStartTime() +"至"+paper.getEndTime()+",请准时参加考试"; |
79 | userIds = getNoExamUserIds(paper.getExamUserIds(),paper.getUserIds()); | 80 | userIds = getNoExamUserIds(paper.getExamUserIds(),paper.getUserIds()); |
80 | if(StringUtils.isNotEmpty(userIds)){ | 81 | if(StringUtils.isNotEmpty(userIds)){ |
81 | pushMsgNoProcess(messageTitle,messageBody,userIds); | 82 | //pushMsgNoProcess(messageTitle,messageBody,userIds); |
83 | smsService.pushMsgNoProcess( messageTitle , messageBody , userIds, "Paper", msgCategory); | ||
82 | } | 84 | } |
83 | } | 85 | } |
84 | } | 86 | } |
85 | } | 87 | } |
86 | 88 | ||
87 | |||
88 | private void pushMsgNoProcess(String messageTitle ,String messageBody ,String userIds) { | ||
89 | if(StringUtils.isNotEmpty(userIds)){ | ||
90 | List<SysUser> sysUserList = userService.getUserByUserIds(userIds); | ||
91 | List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList()); | ||
92 | List<String> userIdList = sysUserList.stream().map(SysUser::getId).collect(Collectors.toList()); | ||
93 | |||
94 | MessageEntity messageEntity = new MessageEntity(); | ||
95 | //messageEntity.setMessageTitle("考试马上开始"); | ||
96 | //messageEntity.setMessageBody("**考试于*****开始考试,请尽快准备!"); | ||
97 | messageEntity.setMessageTitle(messageTitle); | ||
98 | messageEntity.setMessageBody(messageBody); | ||
99 | messageEntity.setReceiveUser(userIdList); | ||
100 | messageEntity.setReceiveUserCid(userCidList); | ||
101 | messageEntity.setSendUser(BaseContextHandler.getUserName()); | ||
102 | messageEntity.setForwardTag("historyRecordRemind");//消息提醒类型 保持唯一 | ||
103 | |||
104 | |||
105 | IPushService appPushService = PushMessageFactory.getPushService("MOB"); | ||
106 | IPushService webPushService = PushMessageFactory.getPushService("WEB"); | ||
107 | appPushService.pushMessage(messageEntity); | ||
108 | webPushService.pushMessage(messageEntity); | ||
109 | } | ||
110 | } | ||
111 | |||
112 | /*** | 89 | /*** |
113 | * 获取第一个字符串列表中存在而第二个字符串列表中不存在的元素 | 90 | * 获取第一个字符串列表中存在而第二个字符串列表中不存在的元素 |
114 | * @param string1 | 91 | * @param string1 | ... | ... |
... | @@ -3,6 +3,7 @@ package com.skua.modules.erp.mapper; | ... | @@ -3,6 +3,7 @@ package com.skua.modules.erp.mapper; |
3 | import java.util.List; | 3 | import java.util.List; |
4 | 4 | ||
5 | import com.skua.modules.erp.entity.MaterialIN; | 5 | import com.skua.modules.erp.entity.MaterialIN; |
6 | import com.skua.tool.annotation.Anonymous; | ||
6 | import org.apache.ibatis.annotations.Param; | 7 | import org.apache.ibatis.annotations.Param; |
7 | import com.skua.modules.erp.entity.MaterialAcceptanceForm; | 8 | import com.skua.modules.erp.entity.MaterialAcceptanceForm; |
8 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 9 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
... | @@ -25,4 +26,6 @@ public interface MaterialAcceptanceFormMapper extends BaseMapper<MaterialAccepta | ... | @@ -25,4 +26,6 @@ public interface MaterialAcceptanceFormMapper extends BaseMapper<MaterialAccepta |
25 | * @param confirmStatus | 26 | * @param confirmStatus |
26 | */ | 27 | */ |
27 | void updateMaterialINConfirmStatus(@Param("materialInId") String materialInId, @Param("confirmStatus")String confirmStatus); | 28 | void updateMaterialINConfirmStatus(@Param("materialInId") String materialInId, @Param("confirmStatus")String confirmStatus); |
29 | @Anonymous | ||
30 | public MaterialAcceptanceForm queryById(@Param("id") String id); | ||
28 | } | 31 | } | ... | ... |
... | @@ -2,6 +2,10 @@ | ... | @@ -2,6 +2,10 @@ |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.skua.modules.erp.mapper.MaterialAcceptanceFormMapper"> | 3 | <mapper namespace="com.skua.modules.erp.mapper.MaterialAcceptanceFormMapper"> |
4 | 4 | ||
5 | |||
6 | <select id="queryById" resultType="com.skua.modules.erp.entity.MaterialAcceptanceForm"> | ||
7 | select * from erp_material_acceptance_form where id = #{id} | ||
8 | </select> | ||
5 | <select id="queryArrivalRecordByList" resultType="com.skua.modules.erp.entity.MaterialAcceptanceForm"> | 9 | <select id="queryArrivalRecordByList" resultType="com.skua.modules.erp.entity.MaterialAcceptanceForm"> |
6 | select mi.arrive_time , maf.* from erp_material_in mi ,erp_material_acceptance_form maf | 10 | select mi.arrive_time , maf.* from erp_material_in mi ,erp_material_acceptance_form maf |
7 | where mi.id = maf.id | 11 | where mi.id = maf.id | ... | ... |
... | @@ -60,10 +60,12 @@ | ... | @@ -60,10 +60,12 @@ |
60 | group by sparepart_id,purchase_contract_id,depart_id,supplier_id | 60 | group by sparepart_id,purchase_contract_id,depart_id,supplier_id |
61 | </select> | 61 | </select> |
62 | 62 | ||
63 | |||
64 | |||
63 | <select id="queryById" resultType="com.skua.modules.erp.vo.MaterialINVO"> | 65 | <select id="queryById" resultType="com.skua.modules.erp.vo.MaterialINVO"> |
64 | select d.depart_name 'departName', ss.sparepart_code,ss.sparepart_name, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name',ss.sparepart_name, ss.specification,ss.measuring_unit, | 66 | select d.depart_name 'departName', ss.sparepart_code, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name',ss.sparepart_name, ss.specification,ss.measuring_unit, |
65 | round(pm.unit_price * t.material_num,2) 'purchaseTotalPrice', round(dm.distribut_price * t.material_num,2) 'distributTotalPrice' ,round(dm.distribut_price * t.material_num ,2)'total_price', | 67 | round(pm.unit_price * t.material_num,2) 'purchaseTotalPrice', round(dm.distribut_price * t.material_num,2) 'distributTotalPrice' ,round(dm.distribut_price * t.material_num ,2)'total_price', |
66 | dm.tax_amount,dm.distribut_price,t.distribut_material_id,t.sparepart_type, | 68 | dm.tax_amount,dm.distribut_price,t.distribut_material_id,t.sparepart_type,t.in_warehouse_id, |
67 | t.id,t.depart_id,t.project_name,t.in_order,t.purchase_contract_id,t.purchase_contract_code,t.distribut_contract_id,t.distribut_contract_code,t.arrive_time,t.receiver,t.sparepart_id,t.material_num,t.supplier_id,t.good_code,t.share_url,t.confirm_status,t.audit_status,t.approve_message,t.in_type | 69 | t.id,t.depart_id,t.project_name,t.in_order,t.purchase_contract_id,t.purchase_contract_code,t.distribut_contract_id,t.distribut_contract_code,t.arrive_time,t.receiver,t.sparepart_id,t.material_num,t.supplier_id,t.good_code,t.share_url,t.confirm_status,t.audit_status,t.approve_message,t.in_type |
68 | from erp_material_in t | 70 | from erp_material_in t |
69 | left join sys_depart d on t.depart_id = d.id | 71 | left join sys_depart d on t.depart_id = d.id |
... | @@ -77,9 +79,9 @@ | ... | @@ -77,9 +79,9 @@ |
77 | 79 | ||
78 | 80 | ||
79 | <select id="arrivalRecordList" resultType="com.skua.modules.erp.vo.MaterialINVO"> | 81 | <select id="arrivalRecordList" resultType="com.skua.modules.erp.vo.MaterialINVO"> |
80 | select d.depart_name 'departName', ss.sparepart_code,ss.sparepart_name, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name',ss.sparepart_name, ss.specification,ss.measuring_unit, | 82 | select d.depart_name 'departName', ss.sparepart_code, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name',ss.sparepart_name, ss.specification,ss.measuring_unit, |
81 | round(pm.unit_price * t.material_num,2) 'purchaseTotalPrice', round(dm.distribut_price * t.material_num,2) 'distributTotalPrice' ,round(dm.distribut_price * t.material_num ,2)'total_price', | 83 | round(pm.unit_price * t.material_num,2) 'purchaseTotalPrice', round(dm.distribut_price * t.material_num,2) 'distributTotalPrice' ,round(dm.distribut_price * t.material_num ,2)'total_price', |
82 | dm.tax_amount,dm.distribut_price,t.distribut_material_id,t.sparepart_type, | 84 | dm.tax_amount,dm.distribut_price,t.distribut_material_id,t.sparepart_type,t.in_warehouse_id, |
83 | t.id,t.depart_id,t.project_name,t.in_order,t.purchase_contract_id,t.purchase_contract_code,t.distribut_contract_id,t.distribut_contract_code,t.arrive_time,t.receiver,t.sparepart_id,t.material_num,t.supplier_id,t.good_code,t.share_url,t.confirm_status,t.audit_status,t.approve_message,t.in_type | 85 | t.id,t.depart_id,t.project_name,t.in_order,t.purchase_contract_id,t.purchase_contract_code,t.distribut_contract_id,t.distribut_contract_code,t.arrive_time,t.receiver,t.sparepart_id,t.material_num,t.supplier_id,t.good_code,t.share_url,t.confirm_status,t.audit_status,t.approve_message,t.in_type |
84 | from erp_material_in t | 86 | from erp_material_in t |
85 | left join sys_depart d on t.depart_id = d.id | 87 | left join sys_depart d on t.depart_id = d.id | ... | ... |
... | @@ -145,7 +145,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr | ... | @@ -145,7 +145,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr |
145 | if("1".equals( purchaseContractVO.getStatus() )){ | 145 | if("1".equals( purchaseContractVO.getStatus() )){ |
146 | //发送信息 | 146 | //发送信息 |
147 | String roleId = configService.queryValueByKey("TGHT_SP_ROLE_ID"); | 147 | String roleId = configService.queryValueByKey("TGHT_SP_ROLE_ID"); |
148 | smsService.pushMsgNoProcessByRoleId("统购合同审批","有统购合同["+purchaseContractVO.getContractName()+"]需要审批审批",roleId,"PurchaseContract"); | 148 | smsService.pushMsgNoProcessByRoleId("统购合同审批","有统购合同["+purchaseContractVO.getContractName()+"]需要审批审批",roleId,"PurchaseContract","13"); |
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
... | @@ -180,7 +180,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr | ... | @@ -180,7 +180,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr |
180 | if("1".equals( purchaseContractVO.getStatus() )){ | 180 | if("1".equals( purchaseContractVO.getStatus() )){ |
181 | //发送信息 | 181 | //发送信息 |
182 | String roleId = configService.queryValueByKey("TGHT_SP_ROLE_ID"); | 182 | String roleId = configService.queryValueByKey("TGHT_SP_ROLE_ID"); |
183 | smsService.pushMsgNoProcessByRoleId("统购合同审批","有统购合同["+purchaseContractVO.getContractName()+"]需要审批审批",roleId,"PurchaseContract"); | 183 | smsService.pushMsgNoProcessByRoleId("统购合同审批","有统购合同["+purchaseContractVO.getContractName()+"]需要审批审批",roleId,"PurchaseContract","13"); |
184 | } | 184 | } |
185 | return count > 0 ? true :false; | 185 | return count > 0 ? true :false; |
186 | } | 186 | } |
... | @@ -323,7 +323,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr | ... | @@ -323,7 +323,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr |
323 | this.baseMapper.updateById(purchaseContract); | 323 | this.baseMapper.updateById(purchaseContract); |
324 | //发送信息 | 324 | //发送信息 |
325 | String roleId = configService.queryValueByKey("TGHT_SP_ROLE_ID"); | 325 | String roleId = configService.queryValueByKey("TGHT_SP_ROLE_ID"); |
326 | smsService.pushMsgNoProcessByRoleId("统购合同审批","有统购合同["+purchaseContract.getContractName()+"]需要审批审批",roleId,"PurchaseContract"); | 326 | smsService.pushMsgNoProcessByRoleId("统购合同审批","有统购合同["+purchaseContract.getContractName()+"]需要审批审批",roleId,"PurchaseContract","13"); |
327 | } | 327 | } |
328 | 328 | ||
329 | /*** | 329 | /*** | ... | ... |
... | @@ -69,16 +69,19 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E | ... | @@ -69,16 +69,19 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E |
69 | updateMaterialInSettlementFlag( erpSettlementVO,"1"); | 69 | updateMaterialInSettlementFlag( erpSettlementVO,"1"); |
70 | //发送消息 | 70 | //发送消息 |
71 | // settlementType;结算类型:0 供应商结算,1 水厂结算 | 71 | // settlementType;结算类型:0 供应商结算,1 水厂结算 |
72 | String msgCategory = "9"; | ||
72 | String msgTitle = "药剂结算验收审批"; | 73 | String msgTitle = "药剂结算验收审批"; |
73 | if("0".equals( erpSettlementVO.getSettlementType() )){ | 74 | if("0".equals( erpSettlementVO.getSettlementType() )){ |
75 | msgCategory = "10"; | ||
74 | msgTitle = "供应商结算验收审批"; | 76 | msgTitle = "供应商结算验收审批"; |
75 | } | 77 | } |
76 | if("1".equals( erpSettlementVO.getSettlementType() )){ | 78 | if("1".equals( erpSettlementVO.getSettlementType() )){ |
79 | msgCategory = "9"; | ||
77 | msgTitle = "水厂结算验收审批"; | 80 | msgTitle = "水厂结算验收审批"; |
78 | } | 81 | } |
79 | //发送信息 | 82 | //发送信息 |
80 | String roleId = configService.queryValueByKey("YJJS_YS_ROLE_ID"); | 83 | String roleId = configService.queryValueByKey("YJJS_YS_ROLE_ID"); |
81 | smsService.pushMsgNoProcessByRoleId(msgTitle,msgTitle,roleId,"ErpSettlement"); | 84 | smsService.pushMsgNoProcessByRoleId(msgTitle,msgTitle,roleId,"ErpSettlement",msgCategory); |
82 | } | 85 | } |
83 | 86 | ||
84 | /** | 87 | /** |
... | @@ -177,6 +180,7 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E | ... | @@ -177,6 +180,7 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E |
177 | String roleId = configService.queryValueByKey("YJJS_JLSP_ROLE_ID"); | 180 | String roleId = configService.queryValueByKey("YJJS_JLSP_ROLE_ID"); |
178 | //发送消息 | 181 | //发送消息 |
179 | // settlementType;结算类型:0 供应商结算,1 水厂结算 | 182 | // settlementType;结算类型:0 供应商结算,1 水厂结算 |
183 | String msgCategory = "11"; | ||
180 | String msgTitle = "药剂结算经理审批"; | 184 | String msgTitle = "药剂结算经理审批"; |
181 | if("0".equals( erpSettlementEntity.getSettlementType() )){ | 185 | if("0".equals( erpSettlementEntity.getSettlementType() )){ |
182 | msgTitle = "供应商结算经理审批"; | 186 | msgTitle = "供应商结算经理审批"; |
... | @@ -185,7 +189,7 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E | ... | @@ -185,7 +189,7 @@ public class ErpSettlementServiceImpl extends ServiceImpl<ErpSettlementMapper, E |
185 | msgTitle = "水厂结算经理审批"; | 189 | msgTitle = "水厂结算经理审批"; |
186 | } | 190 | } |
187 | //发送信息 | 191 | //发送信息 |
188 | smsService.pushMsgNoProcessByRoleId(msgTitle,msgTitle,roleId,"ErpSettlement"); | 192 | smsService.pushMsgNoProcessByRoleId(msgTitle,msgTitle,roleId,"ErpSettlement",msgCategory); |
189 | return true; | 193 | return true; |
190 | } | 194 | } |
191 | 195 | ... | ... |
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/MaterialAcceptanceFormServiceImpl.java
... | @@ -41,6 +41,6 @@ public class MaterialAcceptanceFormServiceImpl extends ServiceImpl<MaterialAccep | ... | @@ -41,6 +41,6 @@ public class MaterialAcceptanceFormServiceImpl extends ServiceImpl<MaterialAccep |
41 | 41 | ||
42 | } | 42 | } |
43 | public MaterialAcceptanceForm queryById(String id){ | 43 | public MaterialAcceptanceForm queryById(String id){ |
44 | return baseMapper.selectById(id); | 44 | return baseMapper.queryById(id); |
45 | } | 45 | } |
46 | } | 46 | } | ... | ... |
... | @@ -98,10 +98,10 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia | ... | @@ -98,10 +98,10 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia |
98 | */ | 98 | */ |
99 | @Transactional | 99 | @Transactional |
100 | public int batchSendAudit(String ids,String auditStatus){ | 100 | public int batchSendAudit(String ids,String auditStatus){ |
101 | |||
102 | //发送信息 | 101 | //发送信息 |
103 | String roleId = configService.queryValueByKey("YJRK_SP_ROLE_ID"); | 102 | String roleId = configService.queryValueByKey("YJRK_SP_ROLE_ID"); |
104 | smsService.pushMsgNoProcessByRoleId("药剂入库审批","有多个药剂入库需要审批审批",roleId,"MaterialIN"); | 103 | String msgCategory = "6"; |
104 | smsService.pushMsgNoProcessByRoleId("药剂入库审批","有多个药剂入库需要审批审批",roleId,"MaterialIN",msgCategory); | ||
105 | return this.baseMapper.batchSendAudit(ids,auditStatus); | 105 | return this.baseMapper.batchSendAudit(ids,auditStatus); |
106 | } | 106 | } |
107 | /** | 107 | /** |
... | @@ -113,7 +113,8 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia | ... | @@ -113,7 +113,8 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia |
113 | this.baseMapper.updateById(materialIN); | 113 | this.baseMapper.updateById(materialIN); |
114 | //发送信息 | 114 | //发送信息 |
115 | String roleId = configService.queryValueByKey("YJRK_SP_ROLE_ID"); | 115 | String roleId = configService.queryValueByKey("YJRK_SP_ROLE_ID"); |
116 | smsService.pushMsgNoProcessByRoleId("药剂入库审批","有药剂入库单["+materialIN.getProjectName()+"]需要审批审批",roleId,"MaterialIN"); | 116 | String msgCategory = "6"; |
117 | smsService.pushMsgNoProcessByRoleId("药剂入库审批","有药剂入库单["+materialIN.getProjectName()+"]需要审批审批",roleId,"MaterialIN",msgCategory); | ||
117 | } | 118 | } |
118 | /*** | 119 | /*** |
119 | * 审核药剂入库单 | 120 | * 审核药剂入库单 |
... | @@ -131,12 +132,12 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia | ... | @@ -131,12 +132,12 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia |
131 | String errMsg = null; | 132 | String errMsg = null; |
132 | boolean inAndOutStock = false; | 133 | boolean inAndOutStock = false; |
133 | //保存 | 134 | //保存 |
134 | MaterialIN materialINTemp = this.baseMapper.selectById(id); | 135 | MaterialIN materialINTemp = this.baseMapper.queryById(id); |
135 | if(!"3".equals(materialINTemp.getAuditStatus())){ | 136 | if(!"3".equals(materialINTemp.getAuditStatus())){ |
136 | /* QueryWrapper<SuppliesWarehouse> queryWrapper = new QueryWrapper<SuppliesWarehouse>(); | 137 | /* QueryWrapper<SuppliesWarehouse> queryWrapper = new QueryWrapper<SuppliesWarehouse>(); |
137 | queryWrapper.eq("depart_id",materialINVO.getDepartId());*/ | 138 | queryWrapper.eq("depart_id",materialINVO.getDepartId());*/ |
138 | String inWarehouseId = materialINTemp.getInWarehouseId(); | 139 | String inWarehouseId = materialINTemp.getInWarehouseId(); |
139 | if(StringUtils.isEmpty(inWarehouseId)){ | 140 | /* if(StringUtils.isEmpty(inWarehouseId)){ |
140 | //主库数据源 | 141 | //主库数据源 |
141 | JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); | 142 | JdbcTemplate masterDB = (JdbcTemplate) SpringContextUtils.getBean("master"); |
142 | if(materialINTemp != null && StringUtils.isNotEmpty(materialINTemp.getDepartId())){ | 143 | if(materialINTemp != null && StringUtils.isNotEmpty(materialINTemp.getDepartId())){ |
... | @@ -148,7 +149,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia | ... | @@ -148,7 +149,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia |
148 | String departName = masterDB.queryForObject( departSql,String.class ); | 149 | String departName = masterDB.queryForObject( departSql,String.class ); |
149 | return "所属厂站["+ ConvertUtils.getString(departName) +"]下没有找到仓库信息!"; | 150 | return "所属厂站["+ ConvertUtils.getString(departName) +"]下没有找到仓库信息!"; |
150 | } | 151 | } |
151 | } | 152 | }*/ |
152 | //purchasePlan.getApproveState() 审批状态 1通过2不通过 | 153 | //purchasePlan.getApproveState() 审批状态 1通过2不通过 |
153 | if("1".equals( approveState )){ | 154 | if("1".equals( approveState )){ |
154 | materialINTemp.setAuditStatus( "3" ); | 155 | materialINTemp.setAuditStatus( "3" ); | ... | ... |
... | @@ -11,6 +11,7 @@ import com.skua.modules.system.service.ISysDepartService; | ... | @@ -11,6 +11,7 @@ import com.skua.modules.system.service.ISysDepartService; |
11 | import com.skua.tool.util.DateUtils; | 11 | import com.skua.tool.util.DateUtils; |
12 | import com.skua.tool.util.JSUtils; | 12 | import com.skua.tool.util.JSUtils; |
13 | import io.swagger.annotations.Api; | 13 | import io.swagger.annotations.Api; |
14 | import io.swagger.annotations.ApiModelProperty; | ||
14 | import io.swagger.annotations.ApiOperation; | 15 | import io.swagger.annotations.ApiOperation; |
15 | import lombok.extern.slf4j.Slf4j; | 16 | import lombok.extern.slf4j.Slf4j; |
16 | import org.springframework.beans.factory.annotation.Autowired; | 17 | import org.springframework.beans.factory.annotation.Autowired; |
... | @@ -185,6 +186,17 @@ public class OperationDailyController { | ... | @@ -185,6 +186,17 @@ public class OperationDailyController { |
185 | dataMap = commonSqlService.queryForMap(sql); | 186 | dataMap = commonSqlService.queryForMap(sql); |
186 | operationDailyVO.setYhDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无") ); | 187 | operationDailyVO.setYhDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无") ); |
187 | 188 | ||
189 | if("1818215543140909056".equals(departId)){ | ||
190 | String dataViewName6643 = ReportViewUtil.buildView(ReportConstant.view6643,"GSL", departIds, dateTIme,dateTIme); | ||
191 | String dataViewName6643HB = ReportViewUtil.buildView(ReportConstant.view6643,"GSL", departIds, previousDay,previousDay); | ||
192 | sql = "select round(sum(ifnull(aaa.GSL,0))/10000,2) GSL from "+dataViewName6643+"aaa "; | ||
193 | dataMap = commonSqlService.queryForMap(sql); | ||
194 | operationDailyVO.setScgsl( ConvertUtils.getString(dataMap.get("GSL"),"0") );//日报生产供水量 | ||
195 | |||
196 | sql = "select round(sum(ifnull(aaa.GSL,0))/10000,2) GSL from "+dataViewName6643HB+"aaa "; | ||
197 | dataMap = commonSqlService.queryForMap(sql); | ||
198 | operationDailyVO.setIncreaseScgsl( ConvertUtils.getString(dataMap.get("GSL"),"0") );//供水量较昨日增加 | ||
199 | } | ||
188 | return operationDailyVO; | 200 | return operationDailyVO; |
189 | } | 201 | } |
190 | 202 | ... | ... |
1 | package com.skua.modules.report.job; | ||
2 | |||
3 | import com.skua.core.util.DateUtils; | ||
4 | import com.skua.modules.edu.entity.Paper; | ||
5 | import com.skua.modules.edu.service.IPaperService; | ||
6 | import com.skua.modules.system.service.ISysConfigService; | ||
7 | import com.skua.modules.system.service.ISysUserService; | ||
8 | import com.skua.modules.system.service.SmsService; | ||
9 | import lombok.extern.slf4j.Slf4j; | ||
10 | import org.apache.commons.lang3.StringUtils; | ||
11 | import org.quartz.Job; | ||
12 | import org.quartz.JobExecutionContext; | ||
13 | import org.quartz.JobExecutionException; | ||
14 | import org.springframework.beans.factory.annotation.Autowired; | ||
15 | import org.springframework.stereotype.Component; | ||
16 | |||
17 | import java.time.LocalDate; | ||
18 | import java.time.format.DateTimeFormatter; | ||
19 | import java.util.Arrays; | ||
20 | import java.util.HashSet; | ||
21 | import java.util.List; | ||
22 | import java.util.Set; | ||
23 | import java.util.stream.Collectors; | ||
24 | |||
25 | /** | ||
26 | 2、每日下午14点给该角色发送消息推送(移动端及web端),提示该角色查看运营日报,点击后即可查看昨日运营日报. | ||
27 | */ | ||
28 | @Slf4j | ||
29 | @Component | ||
30 | public class OperationDailyJob implements Job { | ||
31 | |||
32 | @Autowired | ||
33 | private ISysConfigService configService; | ||
34 | @Autowired | ||
35 | private SmsService smsService; | ||
36 | @Override | ||
37 | public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { | ||
38 | log.info(String.format(" Jeecg-Boot 发送消息任务 SendMsgJob ! 时间:" + DateUtils.getTimestamp())); | ||
39 | String messageTitle = null; | ||
40 | String messageBody = null; | ||
41 | String msgCategory = "8"; | ||
42 | messageTitle = "请查看运营日报."; | ||
43 | messageBody = "请查看运营日报."; | ||
44 | |||
45 | String roleId = configService.queryValueByKey("YJJS_JLSP_ROLE_ID"); | ||
46 | //发送信息 | ||
47 | smsService.pushMsgNoProcessByRoleId(messageTitle,messageBody,roleId,"OperationDaily",msgCategory); | ||
48 | } | ||
49 | } |
... | @@ -45,4 +45,14 @@ public class OperationDailyVO { | ... | @@ -45,4 +45,14 @@ public class OperationDailyVO { |
45 | 45 | ||
46 | @ApiModelProperty(value = "药耗超标公司") | 46 | @ApiModelProperty(value = "药耗超标公司") |
47 | private String yhDepartName; | 47 | private String yhDepartName; |
48 | |||
49 | |||
50 | @ApiModelProperty(value = "日报生产供水量") | ||
51 | private String scgsl; | ||
52 | |||
53 | @ApiModelProperty(value = "供水量较昨日增加") | ||
54 | private String increaseScgsl; | ||
55 | |||
56 | |||
57 | |||
48 | } | 58 | } | ... | ... |
... | @@ -111,7 +111,6 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { | ... | @@ -111,7 +111,6 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { |
111 | //DateVO dateVO = new DateVO(DateUtil.dateformat("2024-07-01","yyyy-MM-dd")); | 111 | //DateVO dateVO = new DateVO(DateUtil.dateformat("2024-07-01","yyyy-MM-dd")); |
112 | //月产水量 | 112 | //月产水量 |
113 | String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", null, startTime,endTime,"sum"); | 113 | String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", null, startTime,endTime,"sum"); |
114 | //System.out.println("dataViewName2119 = "+dataViewName2119); | ||
115 | String ycslSql = "select round(sum(aaa.CSL),2) 'CSL' from "+ dataViewName2119+" aaa"; | 114 | String ycslSql = "select round(sum(aaa.CSL),2) 'CSL' from "+ dataViewName2119+" aaa"; |
116 | String ycsl = getJdbcTemplate().queryForObject(ycslSql, String.class); | 115 | String ycsl = getJdbcTemplate().queryForObject(ycslSql, String.class); |
117 | projectOperationInfoVO.setYcsl( ycsl ); | 116 | projectOperationInfoVO.setYcsl( ycsl ); |
... | @@ -161,7 +160,6 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { | ... | @@ -161,7 +160,6 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { |
161 | String endTime=BaseUtil.getMonthBytime(-1,time)+"-31"; | 160 | String endTime=BaseUtil.getMonthBytime(-1,time)+"-31"; |
162 | //月产水量 | 161 | //月产水量 |
163 | String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL,JSL", null, startTime,endTime); | 162 | String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL,JSL", null, startTime,endTime); |
164 | //System.out.println("dataViewName2119 ="+dataViewName2119); | ||
165 | StringBuffer sql = new StringBuffer("select date_format(bbb.time,'%Y-%m') 'time' ,round(sum(bbb.JSL),2) 'jsl',round(sum(bbb.CSL),2) 'csl' from "); | 163 | StringBuffer sql = new StringBuffer("select date_format(bbb.time,'%Y-%m') 'time' ,round(sum(bbb.JSL),2) 'jsl',round(sum(bbb.CSL),2) 'csl' from "); |
166 | sql.append( dataViewName2119 ); | 164 | sql.append( dataViewName2119 ); |
167 | sql.append( " bbb group by date_format(bbb.time,'%Y-%m') ORDER BY bbb.time"); | 165 | sql.append( " bbb group by date_format(bbb.time,'%Y-%m') ORDER BY bbb.time"); |
... | @@ -209,7 +207,6 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { | ... | @@ -209,7 +207,6 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { |
209 | String endTime=BaseUtil.getMonthBytime(-1,time)+"-31"; | 207 | String endTime=BaseUtil.getMonthBytime(-1,time)+"-31"; |
210 | //CSL,JSCOD,CSCOD,JSZL,CSZL,JSZD,CSTN,JSAD,CSAD | 208 | //CSL,JSCOD,CSCOD,JSZL,CSZL,JSZD,CSTN,JSAD,CSAD |
211 | String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,"JSL,JSCOD,CSCOD,JSZL,CSZL,JSZD,CSTN,JSAD,CSAD", departId, startTime,endTime); | 209 | String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,"JSL,JSCOD,CSCOD,JSZL,CSZL,JSZD,CSTN,JSAD,CSAD", departId, startTime,endTime); |
212 | System.out.println("dataViewName2119 ="+dataViewName2119); | ||
213 | StringBuffer sql = new StringBuffer("select date_format(aaa.time, '%Y-%m') 'time' , round(sum(aaa.JSL),2) 'jsl',round(sum( aaa.JSCOD -aaa.CSCOD ),2) 'cod', "); | 210 | StringBuffer sql = new StringBuffer("select date_format(aaa.time, '%Y-%m') 'time' , round(sum(aaa.JSL),2) 'jsl',round(sum( aaa.JSCOD -aaa.CSCOD ),2) 'cod', "); |
214 | sql.append(" round(sum( aaa.JSZL -aaa.CSZL ),2) 'tp', round(sum( aaa.JSZD -aaa.CSTN ),2) 'tn',round(sum( aaa.JSAD -aaa.CSAD ),2) 'nh3n' from "); | 211 | sql.append(" round(sum( aaa.JSZL -aaa.CSZL ),2) 'tp', round(sum( aaa.JSZD -aaa.CSTN ),2) 'tn',round(sum( aaa.JSAD -aaa.CSAD ),2) 'nh3n' from "); |
215 | sql.append(" "+dataViewName2119 +" aaa "); | 212 | sql.append(" "+dataViewName2119 +" aaa "); |
... | @@ -241,20 +238,19 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { | ... | @@ -241,20 +238,19 @@ public class JTDisplayScreenServiceImpl implements IJTDisplayScreenService { |
241 | // if(waterQualityVO == null )waterQualityVO = new WaterQualityVO(); | 238 | // if(waterQualityVO == null )waterQualityVO = new WaterQualityVO(); |
242 | //负荷率 CSL/设计规模 () | 239 | //负荷率 CSL/设计规模 () |
243 | String factoryProScaleSql = "select round( ("+waterQualityVO.getCsl() +"/(pro_scale * 100) ),2) fhl from sys_factory_info where depart_id = '"+departId+"'"; | 240 | String factoryProScaleSql = "select round( ("+waterQualityVO.getCsl() +"/(pro_scale * 100) ),2) fhl from sys_factory_info where depart_id = '"+departId+"'"; |
244 | System.out.println("factoryProScaleSql = "+factoryProScaleSql); | 241 | // System.out.println("factoryProScaleSql = "+factoryProScaleSql); |
245 | Double yxfhl = getJdbcTemplate().queryForObject(factoryProScaleSql,Double.class); | 242 | Double yxfhl = getJdbcTemplate().queryForObject(factoryProScaleSql,Double.class); |
246 | waterQualityVO.setYxfhl( yxfhl ); | 243 | waterQualityVO.setYxfhl( yxfhl ); |
247 | 244 | ||
248 | //吨水电耗,吨水药耗 | 245 | //吨水电耗,吨水药耗 |
249 | String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24, ReportConstant.fieldDl+","+ ReportConstant.fieldWnl+","+ ReportConstant.fieldYj, departId, startTime,endTime,"sum"); | 246 | String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24, ReportConstant.fieldDl+","+ ReportConstant.fieldWnl+","+ ReportConstant.fieldYj, departId, startTime,endTime,"sum"); |
250 | System.out.println("dataViewName3a24 = "+dataViewName3a24); | 247 | // System.out.println("dataViewName3a24 = "+dataViewName3a24); |
251 | StringBuffer sql2 = new StringBuffer("select aaa.WNL as 'tnl' ,round((aaa.DLHJ /"+waterQualityVO.getCsl()+"),2) 'dsdh' , "); | 248 | StringBuffer sql2 = new StringBuffer("select aaa.WNL as 'tnl' ,round((aaa.DLHJ /"+waterQualityVO.getCsl()+"),2) 'dsdh' , "); |
252 | sql2.append(" round(((aaa.PAMZ + aaa.PAMF+ aaa.PAMRJ+ aaa.SCLPAMZ+ aaa.SCLPAMF+ aaa.NACLO+ aaa.PACGT+ aaa.PACYT+ " + | 249 | sql2.append(" round(((aaa.PAMZ + aaa.PAMF+ aaa.PAMRJ+ aaa.SCLPAMZ+ aaa.SCLPAMF+ aaa.NACLO+ aaa.PACGT+ aaa.PACYT+ " + |
253 | "aaa.FESO4G+ aaa.FESO4Y+ aaa.H2O2+ aaa.CH3COOH+ aaa.SH+ aaa.FECL3+ aaa.HXT+ aaa.PFS+ aaa.CH3COONA+ " + | 250 | "aaa.FESO4G+ aaa.FESO4Y+ aaa.H2O2+ aaa.CH3COOH+ aaa.SH+ aaa.FECL3+ aaa.HXT+ aaa.PFS+ aaa.CH3COONA+ " + |
254 | "aaa.GXCLJ+ aaa.YWL+ aaa.RYXNJ+ aaa.FHTY)/ "+waterQualityVO.getCsl()+"),2) 'dsyh' from "); | 251 | "aaa.GXCLJ+ aaa.YWL+ aaa.RYXNJ+ aaa.FHTY)/ "+waterQualityVO.getCsl()+"),2) 'dsyh' from "); |
255 | sql2.append(" "+dataViewName3a24+" aaa "); | 252 | sql2.append(" "+dataViewName3a24+" aaa "); |
256 | 253 | ||
257 | System.out.println("sql2 = "+sql2.toString()); | ||
258 | waterQualityVOList = getJdbcTemplate().query( sql2.toString(), new BeanPropertyRowMapper<WaterQualityVO>(WaterQualityVO.class)); | 254 | waterQualityVOList = getJdbcTemplate().query( sql2.toString(), new BeanPropertyRowMapper<WaterQualityVO>(WaterQualityVO.class)); |
259 | if(waterQualityVOList != null && !waterQualityVOList.isEmpty() ){ | 255 | if(waterQualityVOList != null && !waterQualityVOList.isEmpty() ){ |
260 | WaterQualityVO waterQualityVOTemp = waterQualityVOList.get(0); | 256 | WaterQualityVO waterQualityVOTemp = waterQualityVOList.get(0); | ... | ... |
... | @@ -559,9 +559,7 @@ public class PowerAnalysisNewServiceImpl implements IPowerAnalysisNewService { | ... | @@ -559,9 +559,7 @@ public class PowerAnalysisNewServiceImpl implements IPowerAnalysisNewService { |
559 | //耗电量/((进水COD-出水COD)*处理水量) | 559 | //耗电量/((进水COD-出水COD)*处理水量) |
560 | //CSL,JSCOD,CSCOD,JSZL,CSZL,JSZD,CSTN,JSAD,CSAD | 560 | //CSL,JSCOD,CSCOD,JSZL,CSZL,JSZD,CSTN,JSAD,CSAD |
561 | String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,ReportConstant.fieldClsl +","+ReportConstant.fieldSz, departIds, startTime,endTime); | 561 | String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,ReportConstant.fieldClsl +","+ReportConstant.fieldSz, departIds, startTime,endTime); |
562 | //System.out.println("dataViewName2119 ="+dataViewName2119); | ||
563 | String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,ReportConstant.fieldDl, departIds, startTime,endTime); | 562 | String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,ReportConstant.fieldDl, departIds, startTime,endTime); |
564 | //System.out.println("dataViewName3a24 ="+dataViewName3a24); | ||
565 | String sql = "select bbb.depart_id ,IFNULL(ccc.DLHJ,0) as hdl, IFNULL(round (IFNULL(ccc.DLHJ,0) / bbb.codValue ,2),0) 'codValue',IFNULL(round (IFNULL(ccc.DLHJ,0) / bbb.nh3nValue,2),0) 'nh3nValue',"; | 563 | String sql = "select bbb.depart_id ,IFNULL(ccc.DLHJ,0) as hdl, IFNULL(round (IFNULL(ccc.DLHJ,0) / bbb.codValue ,2),0) 'codValue',IFNULL(round (IFNULL(ccc.DLHJ,0) / bbb.nh3nValue,2),0) 'nh3nValue',"; |
566 | sql += " IFNULL(round (IFNULL(ccc.DLHJ,0) / bbb.tpValue,2),0) 'tpValue',IFNULL(round (IFNULL(ccc.DLHJ,0) / bbb.tnValue,2),0) 'tnValue' from ( "; | 564 | sql += " IFNULL(round (IFNULL(ccc.DLHJ,0) / bbb.tpValue,2),0) 'tpValue',IFNULL(round (IFNULL(ccc.DLHJ,0) / bbb.tnValue,2),0) 'tnValue' from ( "; |
567 | sql += " select aaa.depart_id,SUM(aaa.CSL) clsl,sum(IFNULL(aaa.JSCOD,0)) 'JSCOD',sum(aaa.CSCOD) 'CSCOD',round( (sum(IFNULL(aaa.JSCOD,0)) - sum(IFNULL(aaa.CSCOD,0)) ) * sum(IFNULL(aaa.CSL,0)) *1000/1000000 ,2) 'codValue',"; | 565 | sql += " select aaa.depart_id,SUM(aaa.CSL) clsl,sum(IFNULL(aaa.JSCOD,0)) 'JSCOD',sum(aaa.CSCOD) 'CSCOD',round( (sum(IFNULL(aaa.JSCOD,0)) - sum(IFNULL(aaa.CSCOD,0)) ) * sum(IFNULL(aaa.CSL,0)) *1000/1000000 ,2) 'codValue',"; | ... | ... |
... | @@ -179,7 +179,7 @@ public class MajorIssuesProcessController { | ... | @@ -179,7 +179,7 @@ public class MajorIssuesProcessController { |
179 | 179 | ||
180 | String roleId = sysConfigService.queryValueByKey("YXBG_ROLE_ID"); | 180 | String roleId = sysConfigService.queryValueByKey("YXBG_ROLE_ID"); |
181 | if(StringUtils.isNotEmpty(roleId)){ | 181 | if(StringUtils.isNotEmpty(roleId)){ |
182 | smsService.pushMsgNoProcessByRoleId("请及时查看重点事项推进进展" ,message ,roleId,"MajorIssuesProcess"); | 182 | smsService.pushMsgNoProcessByRoleId("请及时查看重点事项推进进展" ,message ,roleId,"MajorIssuesProcess","5"); |
183 | result.setResult(majorIssuesProcess); | 183 | result.setResult(majorIssuesProcess); |
184 | result.setSuccess(true); | 184 | result.setSuccess(true); |
185 | }else{ | 185 | }else{ | ... | ... |
... | @@ -13,7 +13,7 @@ public interface MajorIssuesProcessMapper extends BaseMapper<MajorIssuesProcess> | ... | @@ -13,7 +13,7 @@ public interface MajorIssuesProcessMapper extends BaseMapper<MajorIssuesProcess> |
13 | 13 | ||
14 | /** | 14 | /** |
15 | * 级联删除 | 15 | * 级联删除 |
16 | * @param id | 16 | * @param matterProcessId |
17 | */ | 17 | */ |
18 | void deleteItemById(@Param("id") String id); | 18 | void deleteItemById(@Param("matterProcessId") String matterProcessId); |
19 | } | 19 | } | ... | ... |
... | @@ -3,6 +3,6 @@ | ... | @@ -3,6 +3,6 @@ |
3 | <mapper namespace="com.skua.modules.report.mapper.MajorIssuesProcessMapper"> | 3 | <mapper namespace="com.skua.modules.report.mapper.MajorIssuesProcessMapper"> |
4 | 4 | ||
5 | <delete id="deleteItemById" > | 5 | <delete id="deleteItemById" > |
6 | delete from f_major_issues_process where matter_process_id = #{id} | 6 | delete from f_major_issues_process_item where matter_process_id = #{matterProcessId} |
7 | </delete> | 7 | </delete> |
8 | </mapper> | 8 | </mapper> | ... | ... |
... | @@ -24,10 +24,10 @@ public class SmsService { | ... | @@ -24,10 +24,10 @@ public class SmsService { |
24 | @Autowired | 24 | @Autowired |
25 | private WebNoticePushServiceExt webNoticePushServiceExt; | 25 | private WebNoticePushServiceExt webNoticePushServiceExt; |
26 | 26 | ||
27 | public void pushMsgNoProcessByRoleId(String messageTitle ,String messageBody ,String roleId,String forwardTag){ | 27 | public void pushMsgNoProcessByRoleId(String messageTitle ,String messageBody ,String roleId,String forwardTag,String msgCategory){ |
28 | if(StringUtils.isNotEmpty(roleId)){ | 28 | if(StringUtils.isNotEmpty(roleId)){ |
29 | List<SysUser> sysUserList = userService.queryUserByRoleId(roleId); | 29 | List<SysUser> sysUserList = userService.queryUserByRoleId(roleId); |
30 | pushMessage(sysUserList,messageTitle , messageBody , forwardTag); | 30 | pushMessage(sysUserList,messageTitle , messageBody , forwardTag,msgCategory); |
31 | } | 31 | } |
32 | } | 32 | } |
33 | 33 | ||
... | @@ -38,13 +38,13 @@ public class SmsService { | ... | @@ -38,13 +38,13 @@ public class SmsService { |
38 | * @param userIds | 38 | * @param userIds |
39 | * @param forwardTag | 39 | * @param forwardTag |
40 | */ | 40 | */ |
41 | public void pushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag){ | 41 | public void pushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag,String msgCategory){ |
42 | if(StringUtils.isNotEmpty(userIds)){ | 42 | if(StringUtils.isNotEmpty(userIds)){ |
43 | List<SysUser> sysUserList = userService.getUserByUserIds(userIds); | 43 | List<SysUser> sysUserList = userService.getUserByUserIds(userIds); |
44 | pushMessage(sysUserList,messageTitle , messageBody , forwardTag); | 44 | pushMessage(sysUserList,messageTitle , messageBody , forwardTag,msgCategory); |
45 | } | 45 | } |
46 | } | 46 | } |
47 | private void pushMessage(List<SysUser> sysUserList,String messageTitle ,String messageBody ,String forwardTag){ | 47 | private void pushMessage(List<SysUser> sysUserList,String messageTitle ,String messageBody ,String forwardTag,String msgCategory){ |
48 | List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList()); | 48 | List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList()); |
49 | List<String> userIdList = sysUserList.stream().map(SysUser::getId).collect(Collectors.toList()); | 49 | List<String> userIdList = sysUserList.stream().map(SysUser::getId).collect(Collectors.toList()); |
50 | 50 | ||
... | @@ -56,10 +56,11 @@ public class SmsService { | ... | @@ -56,10 +56,11 @@ public class SmsService { |
56 | messageEntity.setSendUser(BaseContextHandler.getUserName()); | 56 | messageEntity.setSendUser(BaseContextHandler.getUserName()); |
57 | messageEntity.setForwardTag(forwardTag);//消息提醒类型 保持唯一 | 57 | messageEntity.setForwardTag(forwardTag);//消息提醒类型 保持唯一 |
58 | 58 | ||
59 | |||
59 | IPushService appPushService = PushMessageFactory.getPushService("MOB"); | 60 | IPushService appPushService = PushMessageFactory.getPushService("MOB"); |
60 | // IPushService webPushService = PushMessageFactory.getPushService("WEB"); | 61 | // IPushService webPushService = PushMessageFactory.getPushService("WEB"); |
61 | appPushService.pushMessage(messageEntity); | 62 | appPushService.pushMessage(messageEntity); |
62 | webNoticePushServiceExt.pushMessage(messageEntity,"5"); | 63 | webNoticePushServiceExt.pushMessage(messageEntity,msgCategory); |
63 | } | 64 | } |
64 | 65 | ||
65 | /*** | 66 | /*** |
... | @@ -93,7 +94,7 @@ public class SmsService { | ... | @@ -93,7 +94,7 @@ public class SmsService { |
93 | * @param userIds | 94 | * @param userIds |
94 | * @param forwardTag | 95 | * @param forwardTag |
95 | */ | 96 | */ |
96 | public void webPushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag){ | 97 | public void webPushMsgNoProcess(String messageTitle ,String messageBody ,String userIds,String forwardTag,String msgCategory){ |
97 | if(StringUtils.isNotEmpty(userIds)){ | 98 | if(StringUtils.isNotEmpty(userIds)){ |
98 | List<SysUser> sysUserList = userService.getUserByUserIds(userIds); | 99 | List<SysUser> sysUserList = userService.getUserByUserIds(userIds); |
99 | List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList()); | 100 | List<String> userCidList = sysUserList.stream().map(SysUser::getCid).filter(v -> StringUtils.isNotBlank(v)).collect(Collectors.toList()); |
... | @@ -106,8 +107,7 @@ public class SmsService { | ... | @@ -106,8 +107,7 @@ public class SmsService { |
106 | messageEntity.setSendUser(BaseContextHandler.getUserName()); | 107 | messageEntity.setSendUser(BaseContextHandler.getUserName()); |
107 | messageEntity.setForwardTag(forwardTag);//消息提醒类型 保持唯一 | 108 | messageEntity.setForwardTag(forwardTag);//消息提醒类型 保持唯一 |
108 | 109 | ||
109 | IPushService webPushService = PushMessageFactory.getPushService("WEB"); | 110 | webNoticePushServiceExt.pushMessage(messageEntity,msgCategory); |
110 | webPushService.pushMessage(messageEntity); | ||
111 | } | 111 | } |
112 | } | 112 | } |
113 | } | 113 | } | ... | ... |
-
请 注册 或 登录 后发表评论