安环资料管理接口开发
正在显示
12 个修改的文件
包含
106 行增加
和
54 行删除
... | @@ -82,6 +82,7 @@ public class AjhMeetingSendController { | ... | @@ -82,6 +82,7 @@ public class AjhMeetingSendController { |
82 | HttpServletRequest req) { | 82 | HttpServletRequest req) { |
83 | Result<IPage<AjhMeetingSend>> result = new Result<IPage<AjhMeetingSend>>(); | 83 | Result<IPage<AjhMeetingSend>> result = new Result<IPage<AjhMeetingSend>>(); |
84 | QueryWrapper<AjhMeetingSend> queryWrapper = new QueryWrapper<>(); | 84 | QueryWrapper<AjhMeetingSend> queryWrapper = new QueryWrapper<>(); |
85 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetId()),"meet_id",ajhMeetingSend.getMeetId()); | ||
85 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getDepartId()),"depart_id",ajhMeetingSend.getDepartId()); | 86 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getDepartId()),"depart_id",ajhMeetingSend.getDepartId()); |
86 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetStatus()),"meet_status",ajhMeetingSend.getMeetStatus()); | 87 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetStatus()),"meet_status",ajhMeetingSend.getMeetStatus()); |
87 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getSendStatus()),"send_status",ajhMeetingSend.getSendStatus()); | 88 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getSendStatus()),"send_status",ajhMeetingSend.getSendStatus()); |
... | @@ -101,6 +102,7 @@ public class AjhMeetingSendController { | ... | @@ -101,6 +102,7 @@ public class AjhMeetingSendController { |
101 | public Result<Map<String,Object>> queryCount(AjhMeetingSend ajhMeetingSend) { | 102 | public Result<Map<String,Object>> queryCount(AjhMeetingSend ajhMeetingSend) { |
102 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); | 103 | Result<Map<String,Object>> result = new Result<Map<String,Object>>(); |
103 | QueryWrapper<AjhMeetingSend> queryWrapper = new QueryWrapper<>(); | 104 | QueryWrapper<AjhMeetingSend> queryWrapper = new QueryWrapper<>(); |
105 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetId()),"meet_id",ajhMeetingSend.getMeetId()); | ||
104 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getDepartId()),"depart_id",ajhMeetingSend.getDepartId()); | 106 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getDepartId()),"depart_id",ajhMeetingSend.getDepartId()); |
105 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetStatus()),"meet_status",ajhMeetingSend.getMeetStatus()); | 107 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetStatus()),"meet_status",ajhMeetingSend.getMeetStatus()); |
106 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getSendStatus()),"send_status",ajhMeetingSend.getSendStatus()); | 108 | queryWrapper.eq(ConvertUtils.isNotEmpty(ajhMeetingSend.getSendStatus()),"send_status",ajhMeetingSend.getSendStatus()); | ... | ... |
... | @@ -123,4 +123,12 @@ public class AjhMeeting { | ... | @@ -123,4 +123,12 @@ public class AjhMeeting { |
123 | @TableField(exist = false) | 123 | @TableField(exist = false) |
124 | @ApiModelProperty(value = "机构名称") | 124 | @ApiModelProperty(value = "机构名称") |
125 | private java.lang.String departName; | 125 | private java.lang.String departName; |
126 | /**执行情况*/ | ||
127 | @TableField(exist = false) | ||
128 | @ApiModelProperty(value = "执行情况") | ||
129 | private java.lang.String executionStatus; | ||
130 | /**参与人数*/ | ||
131 | @TableField(exist = false) | ||
132 | @ApiModelProperty(value = "参与人数") | ||
133 | private java.lang.String particNum; | ||
126 | } | 134 | } | ... | ... |
... | @@ -19,25 +19,29 @@ | ... | @@ -19,25 +19,29 @@ |
19 | </select> | 19 | </select> |
20 | <select id="queryPageList" resultType="com.skua.modules.ajh.entity.AjhMeeting"> | 20 | <select id="queryPageList" resultType="com.skua.modules.ajh.entity.AjhMeeting"> |
21 | SELECT | 21 | SELECT |
22 | * | 22 | CONCAT(s1.num,'/',s2.num) execution_status, |
23 | ifnull(a.num,0) as partic_num, | ||
24 | m.* | ||
23 | FROM | 25 | FROM |
24 | ajh_meeting | 26 | ajh_meeting m |
25 | WHERE | 27 | left join (select meet_id,count(id) num from ajh_meeting_send where send_status = 1 GROUP BY meet_id) s1 on s1.meet_id = m.id |
26 | 1 = 1 | 28 | left join (select meet_id,count(id) num from ajh_meeting_send GROUP BY meet_id) s2 on s2.meet_id = m.id |
29 | left join (select DISTINCT sa.meet_id,ma.num from ajh_meeting_send sa left join (select meets_id,count(id) num from ajh_meeting_attend GROUP BY meets_id) ma on ma.meets_id = sa.id) a on a.meet_id = s2.meet_id | ||
30 | WHERE 1 = 1 | ||
27 | <if test="ajhMeeting.departId !=null and ajhMeeting.departId!=''"> | 31 | <if test="ajhMeeting.departId !=null and ajhMeeting.departId!=''"> |
28 | AND depart_id = #{ajhMeeting.departId} | 32 | AND m.depart_id = #{ajhMeeting.departId} |
29 | </if> | 33 | </if> |
30 | <if test="ajhMeeting.sendStatus !=null and ajhMeeting.sendStatus!=''"> | 34 | <if test="ajhMeeting.sendStatus !=null and ajhMeeting.sendStatus!=''"> |
31 | AND send_status = #{ajhMeeting.sendStatus} | 35 | AND m.send_status = #{ajhMeeting.sendStatus} |
32 | </if> | 36 | </if> |
33 | <if test="ajhMeeting.meetTitile !=null and ajhMeeting.meetTitile!=''"> | 37 | <if test="ajhMeeting.meetTitile !=null and ajhMeeting.meetTitile!=''"> |
34 | AND meet_titile LIKE CONCAT(CONCAT('%', #{ajhMeeting.meetTitile}),'%') | 38 | AND m.meet_titile LIKE CONCAT(CONCAT('%', #{ajhMeeting.meetTitile}),'%') |
35 | </if> | 39 | </if> |
36 | <if test="ajhMeeting.startTime !=null and ajhMeeting.endTime!=''"> | 40 | <if test="ajhMeeting.startTime !=null and ajhMeeting.endTime!=''"> |
37 | AND start_time between #{ajhMeeting.startTime} and #{ajhMeeting.endTime} | 41 | AND m.start_time between #{ajhMeeting.startTime} and #{ajhMeeting.endTime} |
38 | </if> | 42 | </if> |
39 | <if test="ajhMeeting.meetCategory !=null and ajhMeeting.meetCategory!=''"> | 43 | <if test="ajhMeeting.meetCategory !=null and ajhMeeting.meetCategory!=''"> |
40 | AND meet_category = #{ajhMeeting.meetCategory} | 44 | AND m.meet_category = #{ajhMeeting.meetCategory} |
41 | </if> | 45 | </if> |
42 | </select> | 46 | </select> |
43 | 47 | ... | ... |
... | @@ -21,10 +21,12 @@ | ... | @@ -21,10 +21,12 @@ |
21 | s.meet_qd_qrcode, | 21 | s.meet_qd_qrcode, |
22 | s.meet_title, | 22 | s.meet_title, |
23 | s.meet_location, | 23 | s.meet_location, |
24 | s.meet_content | 24 | s.meet_content, |
25 | m.meet_category | ||
25 | FROM | 26 | FROM |
26 | ajh_meeting_receipt r | 27 | ajh_meeting_receipt r |
27 | LEFT JOIN ajh_meeting_send s ON s.id = r.meets_id | 28 | LEFT JOIN ajh_meeting_send s ON s.id = r.meets_id |
29 | LEFT JOIN ajh_meeting m ON m.id = s.meet_id | ||
28 | LEFT JOIN ( SELECT * FROM sys_dict_item WHERE dict_id = | 30 | LEFT JOIN ( SELECT * FROM sys_dict_item WHERE dict_id = |
29 | ( SELECT id FROM sys_dict WHERE dict_code = 'attend_status' ) ) d ON d.item_value = r.status | 31 | ( SELECT id FROM sys_dict WHERE dict_code = 'attend_status' ) ) d ON d.item_value = r.status |
30 | WHERE | 32 | WHERE |
... | @@ -38,6 +40,9 @@ | ... | @@ -38,6 +40,9 @@ |
38 | <if test="ajhMeetingReceiptVO.meetsId!=null"> | 40 | <if test="ajhMeetingReceiptVO.meetsId!=null"> |
39 | and r.meets_id = #{ajhMeetingReceiptVO.meetsId} | 41 | and r.meets_id = #{ajhMeetingReceiptVO.meetsId} |
40 | </if> | 42 | </if> |
43 | <if test="ajhMeetingReceiptVO.meetCategory!=null"> | ||
44 | and m.meet_category = #{ajhMeetingReceiptVO.meetCategory} | ||
45 | </if> | ||
41 | </select> | 46 | </select> |
42 | 47 | ||
43 | </mapper> | 48 | </mapper> | ... | ... |
... | @@ -65,4 +65,7 @@ public class AjhMeetingReceiptVO { | ... | @@ -65,4 +65,7 @@ public class AjhMeetingReceiptVO { |
65 | /**会议内容*/ | 65 | /**会议内容*/ |
66 | @ApiModelProperty(value = "会议内容") | 66 | @ApiModelProperty(value = "会议内容") |
67 | private String meetContent; | 67 | private String meetContent; |
68 | /**会议类型*/ | ||
69 | @ApiModelProperty(value = "会议类型") | ||
70 | private String meetCategory; | ||
68 | } | 71 | } | ... | ... |
... | @@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletResponse; | ... | @@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletResponse; |
37 | import java.io.IOException; | 37 | import java.io.IOException; |
38 | import java.io.UnsupportedEncodingException; | 38 | import java.io.UnsupportedEncodingException; |
39 | import java.net.URLDecoder; | 39 | import java.net.URLDecoder; |
40 | import java.util.ArrayList; | ||
40 | import java.util.Arrays; | 41 | import java.util.Arrays; |
41 | import java.util.List; | 42 | import java.util.List; |
42 | import java.util.Map; | 43 | import java.util.Map; |
... | @@ -90,22 +91,21 @@ public class MaterialInfoController { | ... | @@ -90,22 +91,21 @@ public class MaterialInfoController { |
90 | 91 | ||
91 | /** | 92 | /** |
92 | * 添加 | 93 | * 添加 |
93 | * | 94 | * @param materialInfo |
94 | * @param MaterialInfo | ||
95 | * @return | 95 | * @return |
96 | */ | 96 | */ |
97 | @AutoLog(value = "厂区资料管理-添加") | 97 | @AutoLog(value = "厂区资料管理-添加") |
98 | @ApiOperation(value = "厂区资料管理-添加", notes = "厂区资料管理-添加") | 98 | @ApiOperation(value = "厂区资料管理-添加", notes = "厂区资料管理-添加") |
99 | @PostMapping(value = "/add") | 99 | @PostMapping(value = "/add") |
100 | public Result<MaterialInfo> add(@RequestBody MaterialInfo MaterialInfo) { | 100 | public Result<MaterialInfo> add(@RequestBody MaterialInfo materialInfo) { |
101 | Result<MaterialInfo> result = new Result<MaterialInfo>(); | 101 | Result<MaterialInfo> result = new Result<MaterialInfo>(); |
102 | try { | 102 | try { |
103 | if (StringUtils.isBlank(MaterialInfo.getDepartId())) { | 103 | if (StringUtils.isBlank(materialInfo.getDepartId())) { |
104 | String userCode = BaseContextHandler.getUserId(); | 104 | String userCode = BaseContextHandler.getUserId(); |
105 | //根据用户id查询所属厂区 只要第一个 | 105 | //根据用户id查询所属厂区 只要第一个 |
106 | MaterialInfo.setDepartId(materialInfoService.queryFacByUserId(userCode)); | 106 | materialInfo.setDepartId(materialInfoService.queryFacByUserId(userCode)); |
107 | } | 107 | } |
108 | materialInfoService.save(MaterialInfo); | 108 | materialInfoService.save(materialInfo); |
109 | result.success("添加成功!"); | 109 | result.success("添加成功!"); |
110 | } catch (Exception e) { | 110 | } catch (Exception e) { |
111 | log.error(e.getMessage(), e); | 111 | log.error(e.getMessage(), e); |
... | @@ -116,21 +116,19 @@ public class MaterialInfoController { | ... | @@ -116,21 +116,19 @@ public class MaterialInfoController { |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * 编辑 | 118 | * 编辑 |
119 | * | 119 | * @param materialInfo |
120 | * @param MaterialInfo | ||
121 | * @return | 120 | * @return |
122 | */ | 121 | */ |
123 | @AutoLog(value = "厂区资料管理-编辑") | 122 | @AutoLog(value = "厂区资料管理-编辑") |
124 | @ApiOperation(value = "厂区资料管理-编辑", notes = "厂区资料管理-编辑") | 123 | @ApiOperation(value = "厂区资料管理-编辑", notes = "厂区资料管理-编辑") |
125 | @PutMapping(value = "/edit") | 124 | @PutMapping(value = "/edit") |
126 | public Result<MaterialInfo> edit(@RequestBody MaterialInfo MaterialInfo) { | 125 | public Result<MaterialInfo> edit(@RequestBody MaterialInfo materialInfo) { |
127 | Result<MaterialInfo> result = new Result<MaterialInfo>(); | 126 | Result<MaterialInfo> result = new Result<MaterialInfo>(); |
128 | MaterialInfo MaterialInfoEntity = materialInfoService.getById(MaterialInfo.getId()); | 127 | MaterialInfo MaterialInfoEntity = materialInfoService.getById(materialInfo.getId()); |
129 | if (MaterialInfoEntity == null) { | 128 | if (MaterialInfoEntity == null) { |
130 | result.error500("未找到对应实体"); | 129 | result.error500("未找到对应实体"); |
131 | } else { | 130 | } else { |
132 | boolean ok = materialInfoService.updateById(MaterialInfo); | 131 | boolean ok = materialInfoService.updateById(materialInfo); |
133 | //TODO 返回false说明什么? | ||
134 | if (ok) { | 132 | if (ok) { |
135 | result.success("修改成功!"); | 133 | result.success("修改成功!"); |
136 | } | 134 | } |
... | @@ -145,7 +143,6 @@ public class MaterialInfoController { | ... | @@ -145,7 +143,6 @@ public class MaterialInfoController { |
145 | * </pre> | 143 | * </pre> |
146 | * @return | 144 | * @return |
147 | * @author Li Yuanyuan, 2022年6月22日 下午2:15:57 | 145 | * @author Li Yuanyuan, 2022年6月22日 下午2:15:57 |
148 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
149 | */ | 146 | */ |
150 | @AutoLog(value = "厂区资料管理-更新浏览量/下载量") | 147 | @AutoLog(value = "厂区资料管理-更新浏览量/下载量") |
151 | @ApiOperation(value = "厂区资料管理-更新浏览量/下载量", notes = "厂区资料管理-更新浏览量/下载量") | 148 | @ApiOperation(value = "厂区资料管理-更新浏览量/下载量", notes = "厂区资料管理-更新浏览量/下载量") |
... | @@ -318,14 +315,14 @@ public class MaterialInfoController { | ... | @@ -318,14 +315,14 @@ public class MaterialInfoController { |
318 | @AutoLog(value = "厂区资料管理-流量统计") | 315 | @AutoLog(value = "厂区资料管理-流量统计") |
319 | @ApiOperation(value = "厂区资料管理-流量统计", notes = "厂区资料管理-流量统计") | 316 | @ApiOperation(value = "厂区资料管理-流量统计", notes = "厂区资料管理-流量统计") |
320 | @GetMapping(value = "/flowStatistics") | 317 | @GetMapping(value = "/flowStatistics") |
321 | public Result<List<Map<String, Object>>> flowStatistics(String departId,String startTime,String endTime) { | 318 | public Result<List<Map<String, Object>>> flowStatistics(String departId,String startTime,String endTime,String facInformationtype) { |
322 | Result<List<Map<String, Object>>> result = new Result<>(); | 319 | Result<List<Map<String, Object>>> result = new Result<>(); |
323 | if (StringUtils.isBlank(departId)&&StringUtils.isNotBlank(BaseContextHandler.getDeparts())) { | 320 | if (StringUtils.isBlank(departId)&&StringUtils.isNotBlank(BaseContextHandler.getDeparts())) { |
324 | departId = departService.getChildDepartId(BaseContextHandler.getDeparts()); | 321 | departId = departService.getChildDepartId(BaseContextHandler.getDeparts()); |
325 | }else{ | 322 | }else{ |
326 | departId = departService.getChildDepartId(departId); | 323 | departId = departService.getChildDepartId(departId); |
327 | } | 324 | } |
328 | List<Map<String, Object>> pageList = materialInfoService.flowStatistics(departId,startTime,endTime); | 325 | List<Map<String, Object>> pageList = materialInfoService.flowStatistics(departId,startTime,endTime,facInformationtype); |
329 | result.setSuccess(true); | 326 | result.setSuccess(true); |
330 | result.setResult(pageList); | 327 | result.setResult(pageList); |
331 | return result; | 328 | return result; | ... | ... |
... | @@ -36,7 +36,7 @@ public class MaterialInfo { | ... | @@ -36,7 +36,7 @@ public class MaterialInfo { |
36 | /**厂区资料文件名类型*/ | 36 | /**厂区资料文件名类型*/ |
37 | @Excel(name = "厂区资料文件名类型", width = 15) | 37 | @Excel(name = "厂区资料文件名类型", width = 15) |
38 | @ApiModelProperty(value = "厂区资料文件名类型") | 38 | @ApiModelProperty(value = "厂区资料文件名类型") |
39 | @Dict(dicCode = "info_type") | 39 | @Dict(dicCode = "fac_information_type") |
40 | private String facInformationtype; | 40 | private String facInformationtype; |
41 | /**删除状态(0,正常,1已删除)*/ | 41 | /**删除状态(0,正常,1已删除)*/ |
42 | @Excel(name = "删除状态(0,正常,1已删除)", width = 15) | 42 | @Excel(name = "删除状态(0,正常,1已删除)", width = 15) |
... | @@ -85,6 +85,22 @@ public class MaterialInfo { | ... | @@ -85,6 +85,22 @@ public class MaterialInfo { |
85 | @Dict(dicCode = "rules_type") | 85 | @Dict(dicCode = "rules_type") |
86 | @ApiModelProperty(value = "制度类型") | 86 | @ApiModelProperty(value = "制度类型") |
87 | private String rulesType; | 87 | private String rulesType; |
88 | /**法律法规类型*/ | ||
89 | @Dict(dicCode = "laws_type") | ||
90 | @ApiModelProperty(value = "法律法规类型") | ||
91 | private String lawsType; | ||
92 | /**法律法规归属*/ | ||
93 | @Dict(dicCode = "laws_source") | ||
94 | @ApiModelProperty(value = "法律法规归属") | ||
95 | private String lawsSource; | ||
96 | /**标准规范类型*/ | ||
97 | @Dict(dicCode = "standards_type") | ||
98 | @ApiModelProperty(value = "标准规范类型") | ||
99 | private String standardsType; | ||
100 | /**标准规范来源*/ | ||
101 | @Dict(dicCode = "standards_source") | ||
102 | @ApiModelProperty(value = "标准规范来源") | ||
103 | private String standardsSource; | ||
88 | /**发布时间*/ | 104 | /**发布时间*/ |
89 | @Excel(name = "发布时间", width = 15) | 105 | @Excel(name = "发布时间", width = 15) |
90 | @ApiModelProperty(value = "发布时间") | 106 | @ApiModelProperty(value = "发布时间") | ... | ... |
... | @@ -15,7 +15,7 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> { | ... | @@ -15,7 +15,7 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> { |
15 | 15 | ||
16 | String queryFacByUserId(@Param("userCode") String userCode); | 16 | String queryFacByUserId(@Param("userCode") String userCode); |
17 | 17 | ||
18 | List<Map<String, Object>> getAnalysis(@Param("facInfo") MaterialInfo facInfo); | 18 | List<Map<String, Object>> getAnalysis(@Param("dictCode") String dictCode); |
19 | /** | 19 | /** |
20 | * <pre> | 20 | * <pre> |
21 | * 流量统计 | 21 | * 流量统计 |
... | @@ -27,7 +27,7 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> { | ... | @@ -27,7 +27,7 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> { |
27 | * @author Li Yuanyuan, 2022年6月22日 下午3:10:31 | 27 | * @author Li Yuanyuan, 2022年6月22日 下午3:10:31 |
28 | * @Description: TODO(这里描述这个方法的需求变更情况) | 28 | * @Description: TODO(这里描述这个方法的需求变更情况) |
29 | */ | 29 | */ |
30 | List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime); | 30 | List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime, String facInformationtype); |
31 | 31 | ||
32 | List<MaterialInfo> getList(@Param("materialInfo") MaterialInfo materialInfo, @Param("departIds") String departIds); | 32 | List<MaterialInfo> getList(@Param("materialInfo") MaterialInfo materialInfo, @Param("departIds") String departIds); |
33 | } | 33 | } | ... | ... |
... | @@ -14,24 +14,12 @@ | ... | @@ -14,24 +14,12 @@ |
14 | <select id="getAnalysis" resultType="java.util.Map"> | 14 | <select id="getAnalysis" resultType="java.util.Map"> |
15 | SELECT | 15 | SELECT |
16 | b.item_value id, | 16 | b.item_value id, |
17 | ifnull(a.cou,0) count, | 17 | 0 count, |
18 | b.item_text NAME | 18 | b.item_text NAME |
19 | FROM | 19 | FROM |
20 | ( SELECT item_text, item_value FROM sys_dict_item | 20 | ( SELECT item_text, item_value FROM sys_dict_item |
21 | WHERE dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'info_type' ) | 21 | WHERE dict_id = ( SELECT id FROM sys_dict WHERE dict_code = #{dictCode} ) |
22 | ) b | 22 | ) b |
23 | left join | ||
24 | ( SELECT fac_informationtype, count( 1 ) cou FROM material_info | ||
25 | <if test="facInfo.departId!=null and facInfo.departId!=''"> | ||
26 | where depart_id in | ||
27 | <foreach item="item" index="index" collection="facInfo.departId.split(',')" open="(" separator="," close=")"> | ||
28 | '${item}' | ||
29 | </foreach> | ||
30 | </if> | ||
31 | GROUP BY fac_informationtype | ||
32 | ) a | ||
33 | ON a.fac_informationtype = b.item_value | ||
34 | |||
35 | </select> | 23 | </select> |
36 | <select id="flowStatistics" resultType="java.util.Map"> | 24 | <select id="flowStatistics" resultType="java.util.Map"> |
37 | SELECT | 25 | SELECT |
... | @@ -43,13 +31,16 @@ | ... | @@ -43,13 +31,16 @@ |
43 | INNER JOIN material_info_handle_record b ON a.id = b.info_id | 31 | INNER JOIN material_info_handle_record b ON a.id = b.info_id |
44 | WHERE | 32 | WHERE |
45 | b.create_time >= #{startTime} | 33 | b.create_time >= #{startTime} |
46 | AND b.create_time <= #{endTime} | 34 | AND b.create_time <= #{endTime} |
47 | <if test="departId!=null and departId!=''"> | 35 | <if test="departId!=null and departId!=''"> |
48 | and a.depart_id in | 36 | and a.depart_id in |
49 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> | 37 | <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")"> |
50 | '${item}' | 38 | '${item}' |
51 | </foreach> | 39 | </foreach> |
52 | </if> | 40 | </if> |
41 | <if test="facInformationtype!=null and facInformationtype!=''"> | ||
42 | AND a.fac_informationtype = #{facInformationtype} | ||
43 | </if> | ||
53 | GROUP BY | 44 | GROUP BY |
54 | b.create_time,b.handle_type | 45 | b.create_time,b.handle_type |
55 | </select> | 46 | </select> | ... | ... |
... | @@ -41,7 +41,7 @@ public interface IMaterialInfoService extends IService<MaterialInfo> { | ... | @@ -41,7 +41,7 @@ public interface IMaterialInfoService extends IService<MaterialInfo> { |
41 | * @author Li Yuanyuan, 2022年6月22日 下午3:00:25 | 41 | * @author Li Yuanyuan, 2022年6月22日 下午3:00:25 |
42 | * @Description: TODO(这里描述这个方法的需求变更情况) | 42 | * @Description: TODO(这里描述这个方法的需求变更情况) |
43 | */ | 43 | */ |
44 | List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime); | 44 | List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime,String facInformationtype); |
45 | 45 | ||
46 | IPage<MaterialInfo> getList(Page<MaterialInfo> page, MaterialInfo materialInfo, String departIds); | 46 | IPage<MaterialInfo> getList(Page<MaterialInfo> page, MaterialInfo materialInfo, String departIds); |
47 | } | 47 | } | ... | ... |
... | @@ -24,7 +24,33 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat | ... | @@ -24,7 +24,33 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat |
24 | 24 | ||
25 | @Override | 25 | @Override |
26 | public List<Map<String, Object>> getAnalysis(MaterialInfo facInfo) { | 26 | public List<Map<String, Object>> getAnalysis(MaterialInfo facInfo) { |
27 | return baseMapper.getAnalysis(facInfo); | 27 | List<Map<String, Object>> tList = new ArrayList<>(); |
28 | String departIds = facInfo.getDepartId(); | ||
29 | List<MaterialInfo> list = baseMapper.getList(facInfo, departIds); | ||
30 | Map<String, Object> totalMap = new HashMap<>(); | ||
31 | totalMap.put("total",list.size()); | ||
32 | tList.add(totalMap); | ||
33 | String dictCode = "rules_type";//标准规范:bzgf 法律法规:flfg 公司制度章程:gzzd | ||
34 | if("gzzd".equals(facInfo.getFacInformationtype())){ | ||
35 | dictCode = "rules_type"; | ||
36 | }else if("bzgf".equals(facInfo.getFacInformationtype())){ | ||
37 | dictCode = "standards_type"; | ||
38 | }else if("flfg".equals(facInfo.getFacInformationtype())){ | ||
39 | dictCode = "laws_type"; | ||
40 | } | ||
41 | List<Map<String, Object>> typeList = baseMapper.getAnalysis(dictCode); | ||
42 | for (Map<String, Object> map : typeList) { | ||
43 | String type = map.get("id").toString(); | ||
44 | int count = 0; | ||
45 | for(MaterialInfo materialInfo: list){ | ||
46 | if(materialInfo.getRulesType().contains(type)){ | ||
47 | count++; | ||
48 | } | ||
49 | } | ||
50 | map.put("count",count); | ||
51 | tList.add(map); | ||
52 | } | ||
53 | return tList; | ||
28 | } | 54 | } |
29 | 55 | ||
30 | @Override | 56 | @Override |
... | @@ -33,12 +59,12 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat | ... | @@ -33,12 +59,12 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat |
33 | } | 59 | } |
34 | 60 | ||
35 | @Override | 61 | @Override |
36 | public List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime) { | 62 | public List<Map<String, Object>> flowStatistics(String departId, String startTime, String endTime, String facInformationtype) { |
37 | //日期切片 | 63 | //日期切片 |
38 | List<Map<String,Object>> resultList = new ArrayList<Map<String,Object>>(); | 64 | List<Map<String,Object>> resultList = new ArrayList<Map<String,Object>>(); |
39 | List<String> timeList = DateUtils.sliceUpDateRange(startTime,endTime,"month"); | 65 | List<String> timeList = DateUtils.sliceUpDateRange(startTime,endTime,"month"); |
40 | //获取统计结果 | 66 | //获取统计结果 |
41 | List<Map<String,Object>> dataList = baseMapper.flowStatistics(departId,startTime,endTime); | 67 | List<Map<String,Object>> dataList = baseMapper.flowStatistics(departId,startTime,endTime,facInformationtype); |
42 | Map<String,Map<String,Object>> resultMap = new HashMap<String,Map<String,Object>>(); | 68 | Map<String,Map<String,Object>> resultMap = new HashMap<String,Map<String,Object>>(); |
43 | for(Map<String,Object> map : dataList) { | 69 | for(Map<String,Object> map : dataList) { |
44 | resultMap.put(ConvertUtils.getString(map.get("create_time"))+"_"+ConvertUtils.getString(map.get("handle_type")), map); | 70 | resultMap.put(ConvertUtils.getString(map.get("create_time"))+"_"+ConvertUtils.getString(map.get("handle_type")), map); | ... | ... |
... | @@ -40,7 +40,7 @@ public class SysFactoryUserData { | ... | @@ -40,7 +40,7 @@ public class SysFactoryUserData { |
40 | /**证件类型*/ | 40 | /**证件类型*/ |
41 | @Excel(name = "证件类型", width = 15) | 41 | @Excel(name = "证件类型", width = 15) |
42 | @ApiModelProperty(value = "证件类型") | 42 | @ApiModelProperty(value = "证件类型") |
43 | @Dict(dicCode = "certifies_type") | 43 | @Dict(dicCode = "epiboly_certificate_type") |
44 | private String certifiesType; | 44 | private String certifiesType; |
45 | /**附件*/ | 45 | /**附件*/ |
46 | @Excel(name = "附件", width = 15) | 46 | @Excel(name = "附件", width = 15) | ... | ... |
-
请 注册 或 登录 后发表评论