f88cdbf7 张雷

报表问题修改

1 个父辈 bb41c830
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; 4 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
5 import com.baomidou.mybatisplus.core.toolkit.Constants; 5 import com.baomidou.mybatisplus.core.toolkit.Constants;
6 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 6 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 import com.skua.modules.common.vo.DepartVO;
7 import com.skua.tool.annotation.Anonymous; 8 import com.skua.tool.annotation.Anonymous;
8 import org.apache.ibatis.annotations.Param; 9 import org.apache.ibatis.annotations.Param;
9 10
...@@ -59,4 +60,6 @@ public interface CommonSqlMapper { ...@@ -59,4 +60,6 @@ public interface CommonSqlMapper {
59 String getChildDeparts(@Param(value="departId") String departId); 60 String getChildDeparts(@Param(value="departId") String departId);
60 61
61 String getChildDepartByUserId(@Param(value="userId") String userId); 62 String getChildDepartByUserId(@Param(value="userId") String userId);
63
64 List<DepartVO> getChildDepartList(@Param(value="departId") String departId);
62 } 65 }
......
...@@ -121,4 +121,28 @@ ...@@ -121,4 +121,28 @@
121 from sys_user_depart 121 from sys_user_depart
122 where user_id = #{userId} 122 where user_id = #{userId}
123 </select> 123 </select>
124
125 <select id="getChildDepartList" resultType="com.skua.modules.common.vo.DepartVO">
126 SELECT
127 id as depart_id,
128 depart_name
129 FROM
130 sys_depart
131 WHERE
132 depart_type = '1'
133 AND (
134 parent_id IN
135 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
136 '${item}'
137 </foreach>
138 OR id IN
139 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
140 '${item}'
141 </foreach>
142 OR parent_id IN ( SELECT id FROM sys_depart WHERE parent_id IN
143 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
144 '${item}'
145 </foreach>
146 ))
147 </select>
124 </mapper> 148 </mapper>
......
...@@ -3,6 +3,8 @@ package com.skua.modules.common.service; ...@@ -3,6 +3,8 @@ package com.skua.modules.common.service;
3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; 4 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 import com.skua.modules.common.vo.DepartVO;
7
6 import java.util.List; 8 import java.util.List;
7 import java.util.Map; 9 import java.util.Map;
8 10
...@@ -47,4 +49,6 @@ public interface ICommonSqlService { ...@@ -47,4 +49,6 @@ public interface ICommonSqlService {
47 String getChildDepartId( String departId); 49 String getChildDepartId( String departId);
48 50
49 String getChildFactorys(String departId); 51 String getChildFactorys(String departId);
52
53 List<DepartVO> getChildDepartList(String departId);
50 } 54 }
......
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 import com.skua.modules.common.mapper.CommonSqlMapper; 6 import com.skua.modules.common.mapper.CommonSqlMapper;
7 import com.skua.modules.common.service.ICommonSqlService; 7 import com.skua.modules.common.service.ICommonSqlService;
8 import com.skua.modules.common.vo.DepartVO;
8 import org.springframework.stereotype.Service; 9 import org.springframework.stereotype.Service;
9 10
10 import javax.annotation.Resource; 11 import javax.annotation.Resource;
...@@ -96,4 +97,10 @@ public class CommonSqlServiceImpl implements ICommonSqlService { ...@@ -96,4 +97,10 @@ public class CommonSqlServiceImpl implements ICommonSqlService {
96 return commonSqlMapper.getChildFactorys(departId); 97 return commonSqlMapper.getChildFactorys(departId);
97 } 98 }
98 99
100 @Override
101 public List<DepartVO> getChildDepartList(String departId) {
102 List<DepartVO> list = commonSqlMapper.getChildDepartList(departId);
103 return list;
104 }
105
99 } 106 }
......
1 package com.skua.modules.common.vo;
2
3 import io.swagger.annotations.ApiModelProperty;
4 import lombok.Data;
5
6 @Data
7 public class DepartVO {
8
9 @ApiModelProperty(value = "机构编码")
10 private String departId;
11 @ApiModelProperty(value = "机构名称")
12 private String departName;
13
14 }
15
...@@ -115,6 +115,7 @@ public class AjhMeetingSendController { ...@@ -115,6 +115,7 @@ public class AjhMeetingSendController {
115 LocalDateTime nowTime = LocalDateTime.now(); 115 LocalDateTime nowTime = LocalDateTime.now();
116 List<AjhMeetingSend> list = ajhMeetingSendService.list(); 116 List<AjhMeetingSend> list = ajhMeetingSendService.list();
117 List<AjhMeetingSend> newList = new ArrayList<>(); 117 List<AjhMeetingSend> newList = new ArrayList<>();
118 if(list.size() > 0){
118 for (AjhMeetingSend ajhMeetingSend : list) { 119 for (AjhMeetingSend ajhMeetingSend : list) {
119 if(ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetStartTime())&& 120 if(ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetStartTime())&&
120 ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetEndTime())){ 121 ConvertUtils.isNotEmpty(ajhMeetingSend.getMeetEndTime())){
...@@ -134,6 +135,7 @@ public class AjhMeetingSendController { ...@@ -134,6 +135,7 @@ public class AjhMeetingSendController {
134 } 135 }
135 ajhMeetingSendService.updateBatchById(newList); 136 ajhMeetingSendService.updateBatchById(newList);
136 } 137 }
138 }
137 139
138 @AutoLog(value = "会议记录-数量统计") 140 @AutoLog(value = "会议记录-数量统计")
139 @ApiOperation(value="会议记录-数量统计", notes="会议记录-数量统计") 141 @ApiOperation(value="会议记录-数量统计", notes="会议记录-数量统计")
......
...@@ -94,7 +94,7 @@ public class AjhMeetingSend { ...@@ -94,7 +94,7 @@ public class AjhMeetingSend {
94 @Dict(dicCode = "accept_flag") 94 @Dict(dicCode = "accept_flag")
95 private String acceptFlag; 95 private String acceptFlag;
96 /**发布状态(0未发布,1已发布,2已撤销)*/ 96 /**发布状态(0未发布,1已发布,2已撤销)*/
97 @Excel(name = "发布状态(0未发布,1已发布,2已撤销)", width = 15 ,dicCode = "meet_status" ,orderNum = "10") 97 @Excel(name = "发布状态", width = 15 ,dicCode = "meet_status" ,orderNum = "10")
98 @ApiModelProperty(value = "发布状态(0未发布,1已发布,2已撤销)") 98 @ApiModelProperty(value = "发布状态(0未发布,1已发布,2已撤销)")
99 @Dict(dicCode = "meet_status") 99 @Dict(dicCode = "meet_status")
100 private String sendStatus; 100 private String sendStatus;
......
...@@ -136,4 +136,12 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData ...@@ -136,4 +136,12 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData
136 List<Map<String, Object>> queryNhYyybReport(@Param(value="dataViewName3a24") String dataViewName3a24, 136 List<Map<String, Object>> queryNhYyybReport(@Param(value="dataViewName3a24") String dataViewName3a24,
137 @Param(value="startTime") String startTime, @Param(value="endTime") String endTime, 137 @Param(value="startTime") String startTime, @Param(value="endTime") String endTime,
138 @Param(value="departId") String departId); 138 @Param(value="departId") String departId);
139
140 List<Map<String, Object>> querySzYyrbReport(@Param(value="dataViewName2119") String dataViewName2119,
141 @Param(value="startTime")String startTime, @Param(value="endTime")String endTime,
142 @Param(value="departId") String departId);
143
144 List<Map<String, Object>> queryNhYyrbReport(@Param(value="dataViewName3a24") String dataViewName3a24,
145 @Param(value="startTime") String startTime, @Param(value="endTime") String endTime,
146 @Param(value="departId") String departId);
139 } 147 }
......
...@@ -677,4 +677,90 @@ ...@@ -677,4 +677,90 @@
677 AND v3.time &lt;= #{endTime} 677 AND v3.time &lt;= #{endTime}
678 GROUP BY v3.time 678 GROUP BY v3.time
679 </select> 679 </select>
680
681 <select id="querySzYyrbReport" resultType="java.util.HashMap">
682 SELECT
683 ROUND( SUM( v.JSL )/10000, 2 ) AS `JSL`,
684 ROUND( SUM( v.CSL )/10000, 2 ) AS `CSL`,
685 ROUND( AVG( v.JSPH ), 2 ) AS `JSPH`,
686 ROUND( AVG( v.CSPH ), 2 ) AS `CSPH`,
687 ROUND( AVG( v.JSCOD ), 2 ) AS `JSCOD`,
688 ROUND( AVG( v.CSCOD ), 2 ) AS `CSCOD`,
689 ROUND( AVG( v.CSTN ), 2 ) AS `CSTN`,
690 ROUND( AVG( v.JSZD ), 2 ) AS `JSZD`,
691 ROUND( AVG( v.JSZL ), 2 ) AS `JSZL`,
692 ROUND( AVG( v.CSZL ), 2 ) AS `CSZL`,
693 ROUND( AVG( v.JSAD ), 2 ) AS `JSAD`,
694 ROUND( AVG( v.CSAD ), 2 ) AS `CSAD`,
695 ROUND( AVG( v.JSSS ), 2 ) AS `JSSS`,
696 ROUND( AVG( v.CSSS ), 2 ) AS `CSSS`,
697 v.BZ,
698 v.depart_id,
699 d.depart_name as depart_name,
700 v.time
701 FROM
702 ${dataViewName2119} v
703 LEFT JOIN sys_depart d ON v.depart_id = d.id
704 WHERE
705 v.depart_id IN
706 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
707 '${item}'
708 </foreach>
709 AND v.time &gt;= #{startTime}
710 AND v.time &lt;= #{endTime}
711 GROUP BY v.depart_id
712 </select>
713
714 <select id="queryNhYyrbReport" resultType="java.util.HashMap">
715 SELECT
716 ROUND(SUM(v3.PFS),2) AS PFS,
717 ROUND(SUM(v3.FHTY),2) AS FHTY,
718 ROUND(SUM(v3.RYXNJ),2) AS RYXNJ,
719 ROUND(SUM(v3.YWL),2) AS YWL,
720 ROUND(SUM(v3.GXCLJ),2) AS GXCLJ,
721 ROUND(SUM(v3.CH3COONA),2) AS CH3COONA,
722 ROUND(SUM(v3.HXT),2) AS HXT,
723 ROUND(SUM(v3.FECL3),2) AS FECL3,
724 ROUND(SUM(v3.SH),2) AS SH,
725 ROUND(SUM(v3.CH3COOH),2) AS CH3COOH,
726 ROUND(SUM(v3.FESO4G),2) AS FESO4G,
727 ROUND(SUM(v3.FESO4Y),2) AS FESO4Y,
728 ROUND(SUM(v3.H2O2),2) AS H2O2,
729 ROUND(SUM(v3.GFFDL),2) AS GFFDL,
730 ROUND(SUM(v3.QY),2) AS QY,
731 ROUND(SUM(v3.GFCZL),2) AS GFCZL,
732 ROUND(SUM(v3.WNHSL),2) AS WNHSL,
733 ROUND(SUM(v3.WFCSL),2) AS WFCSL,
734 ROUND(SUM(v3.WFCZL),2) AS WFCZL,
735 ROUND(SUM(v3.DLJZ),2) AS DLJZ,
736 ROUND(SUM(v3.GFSYL),2) AS GFSYL,
737 ROUND(SUM(v3.WNL),2) AS WNL,
738 ROUND(SUM(v3.DLFZ),2) AS DLFZ,
739 ROUND(SUM(v3.DLPZ),2) AS DLPZ,
740 ROUND(SUM(v3.DLGZ),2) AS DLGZ,
741 ROUND(SUM(v3.DLHJ)/10000,2) AS DLHJ,
742 ROUND(SUM(v3.YSL),2) AS YSL,
743 ROUND(SUM(v3.PAMZ),2) AS PAMZ,
744 ROUND(SUM(v3.PAMF),2) AS PAMF,
745 ROUND(SUM(v3.PAMRJ),2) AS PAMRJ,
746 ROUND(SUM(v3.SCLPAMZ),2) AS SCLPAMZ,
747 ROUND(SUM(v3.SCLPAMF),2) AS SCLPAMF,
748 ROUND(SUM(v3.NACLO),2) AS NACLO,
749 ROUND(SUM(v3.PACGT),2) AS PACGT,
750 ROUND(SUM(v3.PACYT),2) AS PACYT,
751 v3.BZ AS BZ,
752 v3.depart_id AS depart_id,
753 d.depart_name as depart_name,
754 v3.time
755 FROM ${dataViewName3a24} v3
756 LEFT JOIN sys_depart d ON v3.depart_id = d.id
757 WHERE
758 v3.depart_id IN
759 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
760 '${item}'
761 </foreach>
762 AND v3.time &gt;= #{startTime}
763 AND v3.time &lt;= #{endTime}
764 GROUP BY v3.depart_id
765 </select>
680 </mapper> 766 </mapper>
......
...@@ -136,4 +136,8 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData ...@@ -136,4 +136,8 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData
136 List<Map<String, Object>> querySzYyybReport(String dataViewName2119, String startTime, String endTime, String departId); 136 List<Map<String, Object>> querySzYyybReport(String dataViewName2119, String startTime, String endTime, String departId);
137 137
138 List<Map<String, Object>> queryNhYyybReport(String dataViewName3a24, String startTime, String endTime, String departId); 138 List<Map<String, Object>> queryNhYyybReport(String dataViewName3a24, String startTime, String endTime, String departId);
139
140 List<Map<String, Object>> querySzYyrbReport(String dataViewName2119, String startTime, String endTime, String departId);
141
142 List<Map<String, Object>> queryNhYyrbReport(String dataViewName3a24, String startTime, String endTime, String departId);
139 } 143 }
......
...@@ -454,6 +454,18 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa ...@@ -454,6 +454,18 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
454 return list; 454 return list;
455 } 455 }
456 456
457 @Override
458 public List<Map<String, Object>> querySzYyrbReport(String dataViewName2119, String startTime, String endTime, String departId) {
459 List<Map<String, Object>> list = mapper.querySzYyrbReport(dataViewName2119, startTime, endTime, departId);
460 return list;
461 }
462
463 @Override
464 public List<Map<String, Object>> queryNhYyrbReport(String dataViewName3a24, String startTime, String endTime, String departId) {
465 List<Map<String, Object>> list = mapper.queryNhYyrbReport(dataViewName3a24, startTime, endTime, departId);
466 return list;
467 }
468
457 /**转换为Map<部门编号,JnhbReportData> */ 469 /**转换为Map<部门编号,JnhbReportData> */
458 private Map<String,JnhbReportData> convertJnhbReportDataMap(List<JnhbReportData> dataList){// Map<部门编号,JnhbReportData> 470 private Map<String,JnhbReportData> convertJnhbReportDataMap(List<JnhbReportData> dataList){// Map<部门编号,JnhbReportData>
459 Map<String,JnhbReportData> dataMap = new HashMap<>(); 471 Map<String,JnhbReportData> dataMap = new HashMap<>();
......
...@@ -728,10 +728,13 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { ...@@ -728,10 +728,13 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService {
728 Map<String, Object> maptb = factoryCenterMapper.getDhData(startDateTb, endDateTb, statisticsParam.getDepartId(), dataView3a24tb, dataView2119tb); 728 Map<String, Object> maptb = factoryCenterMapper.getDhData(startDateTb, endDateTb, statisticsParam.getDepartId(), dataView3a24tb, dataView2119tb);
729 if(maptb!=null){ 729 if(maptb!=null){
730 zdhTb = Double.parseDouble(maptb.get("zdh").toString()); 730 zdhTb = Double.parseDouble(maptb.get("zdh").toString());
731 rjdhTb = Double.parseDouble(maptb.get("rjdh").toString()); 731 if(zdhTb > 0.0){
732
733 zdhTb = Double.parseDouble(df.format(100*(zdh - zdhTb)/zdhTb)); 732 zdhTb = Double.parseDouble(df.format(100*(zdh - zdhTb)/zdhTb));
733 }
734 rjdhTb = Double.parseDouble(maptb.get("rjdh").toString());
735 if(rjdhTb > 0.0){
734 rjdhTb = Double.parseDouble(df.format(100*(rjdh - rjdhTb)/rjdhTb)); 736 rjdhTb = Double.parseDouble(df.format(100*(rjdh - rjdhTb)/rjdhTb));
737 }
735 if(maptb.get("dsdh")!=null){ 738 if(maptb.get("dsdh")!=null){
736 dsdhTb = Double.parseDouble(maptb.get("dsdh").toString()); 739 dsdhTb = Double.parseDouble(maptb.get("dsdh").toString());
737 dsdhTb = Double.parseDouble(df.format(100*(dsdh - dsdhTb)/dsdhTb)); 740 dsdhTb = Double.parseDouble(df.format(100*(dsdh - dsdhTb)/dsdhTb));
...@@ -743,9 +746,13 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService { ...@@ -743,9 +746,13 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService {
743 Map<String, Object> maphb = factoryCenterMapper.getDhData(startDateHb, endDateHb, statisticsParam.getDepartId(), dataView3a24hb, dataView2119hb); 746 Map<String, Object> maphb = factoryCenterMapper.getDhData(startDateHb, endDateHb, statisticsParam.getDepartId(), dataView3a24hb, dataView2119hb);
744 if(maphb!=null){ 747 if(maphb!=null){
745 zdhHb = Double.parseDouble(maphb.get("zdh").toString()); 748 zdhHb = Double.parseDouble(maphb.get("zdh").toString());
746 rjdhHb = Double.parseDouble(maphb.get("rjdh").toString()); 749 if(zdhHb > 0.0){
747 zdhHb = Double.parseDouble(df.format(100*(zdh - zdhHb)/zdhHb)); 750 zdhHb = Double.parseDouble(df.format(100*(zdh - zdhHb)/zdhHb));
751 }
752 rjdhHb = Double.parseDouble(maphb.get("rjdh").toString());
753 if(rjdhHb > 0.0){
748 rjdhHb = Double.parseDouble(df.format(100*(rjdh - rjdhHb)/rjdhHb)); 754 rjdhHb = Double.parseDouble(df.format(100*(rjdh - rjdhHb)/rjdhHb));
755 }
749 if(maphb.get("dsdh")!=null){ 756 if(maphb.get("dsdh")!=null){
750 dsdhHb = Double.parseDouble(maphb.get("dsdh").toString()); 757 dsdhHb = Double.parseDouble(maphb.get("dsdh").toString());
751 dsdhHb = Double.parseDouble(df.format(100*(dsdh - dsdhHb)/dsdhHb)); 758 dsdhHb = Double.parseDouble(df.format(100*(dsdh - dsdhHb)/dsdhHb));
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!