84ee12f3 康伟

kangwei:修改bug

1 个父辈 07dd7323
正在显示 36 个修改的文件 包含 414 行增加165 行删除
...@@ -47,4 +47,10 @@ public interface CommonSqlMapper { ...@@ -47,4 +47,10 @@ public interface CommonSqlMapper {
47 47
48 Integer deleteWrapper(@Param("tableName") String tableName, @Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper); 48 Integer deleteWrapper(@Param("tableName") String tableName, @Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
49 49
50 /***
51 * 获取子部门集合
52 * @param departId
53 * @return
54 */
55 String getChildDepartId(@Param(value="departId") String departId);
50 } 56 }
......
...@@ -50,4 +50,27 @@ ...@@ -50,4 +50,27 @@
50 delete from ${tableName} ${ew.customSqlSegment} 50 delete from ${tableName} ${ew.customSqlSegment}
51 </delete> 51 </delete>
52 52
53
54 <!-- 获取子部门集合-->
55 <select id="getChildDepartId" resultType="java.lang.String">
56 SELECT
57 GROUP_CONCAT( id SEPARATOR ',' ) AS depart_ids
58 FROM
59 sys_depart
60 WHERE
61 parent_id IN
62 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
63 '${item}'
64 </foreach>
65 OR id IN
66 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
67 '${item}'
68 </foreach>
69 OR parent_id IN ( SELECT id FROM sys_depart WHERE parent_id IN
70 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
71 '${item}'
72 </foreach>
73 )
74 </select>
75
53 </mapper> 76 </mapper>
......
...@@ -3,7 +3,6 @@ package com.skua.modules.common.service; ...@@ -3,7 +3,6 @@ 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
7 import java.util.List; 6 import java.util.List;
8 import java.util.Map; 7 import java.util.Map;
9 8
...@@ -40,4 +39,11 @@ public interface ICommonSqlService { ...@@ -40,4 +39,11 @@ public interface ICommonSqlService {
40 39
41 Integer deleteWrapper(String tableName, QueryWrapper<?> queryWrapper); 40 Integer deleteWrapper(String tableName, QueryWrapper<?> queryWrapper);
42 41
42 /***
43 * 获取子部门集合
44 * @param departId
45 * @return
46 */
47 String getChildDepartId( String departId);
48
43 } 49 }
......
...@@ -82,4 +82,13 @@ public class CommonSqlServiceImpl implements ICommonSqlService { ...@@ -82,4 +82,13 @@ public class CommonSqlServiceImpl implements ICommonSqlService {
82 return commonSqlMapper.deleteWrapper(tableName, queryWrapper); 82 return commonSqlMapper.deleteWrapper(tableName, queryWrapper);
83 } 83 }
84 84
85 /***
86 * 获取子部门集合
87 * @param departId
88 * @return
89 */
90 public String getChildDepartId( String departId){
91 return commonSqlMapper.getChildDepartId(departId);
92 }
93
85 } 94 }
......
...@@ -90,18 +90,28 @@ public class SysCommandCentreController { ...@@ -90,18 +90,28 @@ public class SysCommandCentreController {
90 @ApiOperation(value="指挥中心-运行负荷率分析", notes="指挥中心-运行负荷率分析") 90 @ApiOperation(value="指挥中心-运行负荷率分析", notes="指挥中心-运行负荷率分析")
91 //指挥中心-运行负荷率分析 91 //指挥中心-运行负荷率分析
92 @GetMapping(value = "/statisticsByLoadRate") 92 @GetMapping(value = "/statisticsByLoadRate")
93 public Result<DepartLoadRateResultVO > statisticsByLoadRate(String startDate , String endTime,Integer loadRateType) throws Exception { 93 public Result<DepartLoadRateResultVO > statisticsByLoadRate(ReportItemvParam reportItemvParam) throws Exception {
94 Result<DepartLoadRateResultVO > result = new Result<>(); 94 Result<DepartLoadRateResultVO > result = new Result<>();
95 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674 95 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674
96 Integer loadRateType = reportItemvParam.getLoadRateType();
96 if(loadRateType == null ) loadRateType = 1; 97 if(loadRateType == null ) loadRateType = 1;
97 DepartLoadRateResultVO departLoadRateResultVO = reportItemvService.statisticsByLoadRate( departIds,startDate , endTime, loadRateType); 98 DepartLoadRateResultVO departLoadRateResultVO = reportItemvService.statisticsByLoadRate( departIds,reportItemvParam.getStartDate(),reportItemvParam.getEndDate(), loadRateType);
98 result.setSuccess(true); 99 result.setSuccess(true);
99 result.setResult(departLoadRateResultVO); 100 result.setResult(departLoadRateResultVO);
100 return result; 101 return result;
101 } 102 }
102 103
103 104 //指挥中心----运行负荷率分析----处理水量详情
104 @AutoLog(value = "指挥中心-运行负荷率分析") 105 @AutoLog(value = "指挥中心-处理水量详情")
106 @ApiOperation(value="指挥中心-处理水量详情")
107 @GetMapping("/getCLSLXQ")
108 public Result<List<WaterTreatmentVO>> getCLSLXQ(ReportItemvParam reportItemvParam){
109 Result<List<WaterTreatmentVO>> result = new Result<>();
110 List<WaterTreatmentVO> waterTrendVOList = commandCentreService.statisticsCLSLXQ(reportItemvParam.getStartDate(),reportItemvParam.getEndDate(), BaseContextHandler.getDeparts());
111 result.setResult(waterTrendVOList );
112 return result;
113 }
114 /* @AutoLog(value = "指挥中心-运行负荷率分析")
105 @ApiOperation(value="指挥中心-运行负荷率分析---列表详情", notes="指挥中心-运行负荷率分析----列表详情") 115 @ApiOperation(value="指挥中心-运行负荷率分析---列表详情", notes="指挥中心-运行负荷率分析----列表详情")
106 //指挥中心-运行负荷率分析 116 //指挥中心-运行负荷率分析
107 @GetMapping(value = "/statisticsByLoadRateList") 117 @GetMapping(value = "/statisticsByLoadRateList")
...@@ -112,28 +122,28 @@ public class SysCommandCentreController { ...@@ -112,28 +122,28 @@ public class SysCommandCentreController {
112 result.setSuccess(true); 122 result.setSuccess(true);
113 result.setResult(departLoadRateResultVO); 123 result.setResult(departLoadRateResultVO);
114 return result; 124 return result;
115 } 125 }*/
116 126
117 127
118 //cement水泥 electricity 128 //cement水泥 electricity
119 @AutoLog(value = "指挥中心-泥量统计") 129 @AutoLog(value = "指挥中心-泥量统计")
120 @ApiOperation(value="指挥中心-泥量统计", notes="指挥中心-泥量统计") 130 @ApiOperation(value="指挥中心-泥量统计", notes="指挥中心-泥量统计")
121 @GetMapping(value = "/statisticsByCement") 131 @GetMapping(value = "/statisticsByCement")
122 public Result<List<FRportlCommandCenterVO>> statisticsByCement(String startDate , String endDate) throws Exception { 132 public Result<List<FRportlCommandCenterVO>> statisticsByCement(ReportItemvParam reportItemvParam) throws Exception {
123 Result<List<FRportlCommandCenterVO>> result = new Result(); 133 Result<List<FRportlCommandCenterVO>> result = new Result();
124 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674 134 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674
125 List<FRportlCommandCenterVO> dataList = reportItemvService.statisticsByCement(departIds,startDate,endDate); 135 List<FRportlCommandCenterVO> dataList = reportItemvService.statisticsByCement(departIds,reportItemvParam.getStartDate(),reportItemvParam.getEndDate());
126 result.setResult(dataList ); 136 result.setResult(dataList );
127 return result; 137 return result;
128 } 138 }
129 @AutoLog(value = "指挥中心-泥量统计") 139 @AutoLog(value = "指挥中心-泥量统计")
130 @ApiOperation(value="指挥中心-泥量统计--详情列表", notes="指挥中心-泥量统计--详情列表") 140 @ApiOperation(value="指挥中心-泥量统计--详情列表", notes="指挥中心-泥量统计--详情列表")
131 //指挥中心-泥量统计--详情列表 141 //指挥中心-泥量统计--详情列表
132 @GetMapping(value = "/statisticsByCementList") 142 @GetMapping(value = "/statisticsByCementList")
133 public Result<List<ReportItemVO>> statisticsByCementList(String startDate , String endDate) throws Exception { 143 public Result<List<ReportItemVO>> statisticsByCementList(ReportItemvParam reportItemvParam) throws Exception {
134 Result<List<ReportItemVO>> result = new Result(); 144 Result<List<ReportItemVO>> result = new Result();
135 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674 145 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674
136 List<ReportItemVO> dataList = reportItemvService.statisticsByCementList(departIds,startDate,endDate); 146 List<ReportItemVO> dataList = reportItemvService.statisticsByCementList(departIds,reportItemvParam.getStartDate(),reportItemvParam.getEndDate());
137 result.setResult(dataList ); 147 result.setResult(dataList );
138 return result; 148 return result;
139 } 149 }
...@@ -143,20 +153,20 @@ public class SysCommandCentreController { ...@@ -143,20 +153,20 @@ public class SysCommandCentreController {
143 @AutoLog(value = "指挥中心-能耗分析") 153 @AutoLog(value = "指挥中心-能耗分析")
144 @ApiOperation(value="指挥中心-能耗分析", notes="指挥中心-能耗分析") 154 @ApiOperation(value="指挥中心-能耗分析", notes="指挥中心-能耗分析")
145 @GetMapping(value = "/statisticsByElectricity") 155 @GetMapping(value = "/statisticsByElectricity")
146 public Result<List<FRportlCommandCenterVO>> statisticsByElectricity(String startDate ,String endDate) throws Exception { 156 public Result<List<FRportlCommandCenterVO>> statisticsByElectricity(ReportItemvParam reportItemvParam) throws Exception {
147 Result<List<FRportlCommandCenterVO>> result = new Result(); 157 Result<List<FRportlCommandCenterVO>> result = new Result();
148 String departId = "1818214519948836864,1711662624459804674"; 158 String departId = "1818214519948836864,1711662624459804674";
149 List<FRportlCommandCenterVO> dataList = reportItemvService.statisticsByElectricity(departId,startDate,endDate); 159 List<FRportlCommandCenterVO> dataList = reportItemvService.statisticsByElectricity(departId,reportItemvParam.getStartDate(),reportItemvParam.getEndDate());
150 result.setResult(dataList ); 160 result.setResult(dataList );
151 return result; 161 return result;
152 } 162 }
153 @AutoLog(value = "指挥中心-能耗分析") 163 @AutoLog(value = "指挥中心-能耗分析")
154 @ApiOperation(value="指挥中心-能耗分析--详情列表", notes="指挥中心-能耗分析--详情列表") 164 @ApiOperation(value="指挥中心-能耗分析--详情列表", notes="指挥中心-能耗分析--详情列表")
155 @GetMapping(value = "/statisticsByElectricityList") 165 @GetMapping(value = "/statisticsByElectricityList")
156 public Result<List<ReportItemVO>> statisticsByElectricityList(String startDate ,String endDate) throws Exception { 166 public Result<List<ReportItemVO>> statisticsByElectricityList(ReportItemvParam reportItemvParam) throws Exception {
157 Result<List<ReportItemVO>> result = new Result(); 167 Result<List<ReportItemVO>> result = new Result();
158 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674 168 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674
159 List<ReportItemVO> dataList = reportItemvService.statisticsByElectricityList(departIds,startDate,endDate); 169 List<ReportItemVO> dataList = reportItemvService.statisticsByElectricityList(departIds,reportItemvParam.getStartDate(),reportItemvParam.getEndDate());
160 result.setResult(dataList ); 170 result.setResult(dataList );
161 return result; 171 return result;
162 } 172 }
...@@ -355,16 +365,7 @@ public class SysCommandCentreController { ...@@ -355,16 +365,7 @@ public class SysCommandCentreController {
355 return result; 365 return result;
356 } 366 }
357 367
358 //指挥中心----运行负荷率分析----处理水量详情 368
359 @AutoLog(value = "指挥中心-处理水量详情")
360 @ApiOperation(value="指挥中心-处理水量详情")
361 @GetMapping("/getCLSLXQ")
362 public Result<List<WaterTreatmentVO>> getCLSLXQ(@RequestParam(name = "time", required = true)String time){
363 Result<List<WaterTreatmentVO>> result = new Result<>();
364 List<WaterTreatmentVO> waterTrendVOList = commandCentreService.statisticsCLSLXQ(time, BaseContextHandler.getDeparts());
365 result.setResult(waterTrendVOList );
366 return result;
367 }
368 369
369 /** 370 /**
370 * 获取时间之间的月份 371 * 获取时间之间的月份
......
...@@ -86,8 +86,8 @@ public interface ICommandCentreService { ...@@ -86,8 +86,8 @@ public interface ICommandCentreService {
86 86
87 /*** 87 /***
88 * 指挥中心----运行负荷率分析----处理水量详情 88 * 指挥中心----运行负荷率分析----处理水量详情
89 * @param time 89 * @param
90 * @return 90 * @return
91 */ 91 */
92 List<WaterTreatmentVO> statisticsCLSLXQ(String time ,String departIds); 92 List<WaterTreatmentVO> statisticsCLSLXQ(String startDate,String endDate ,String departIds);
93 } 93 }
......
...@@ -22,10 +22,7 @@ import org.springframework.stereotype.Service; ...@@ -22,10 +22,7 @@ import org.springframework.stereotype.Service;
22 import javax.annotation.Resource; 22 import javax.annotation.Resource;
23 import java.time.YearMonth; 23 import java.time.YearMonth;
24 import java.time.format.DateTimeFormatter; 24 import java.time.format.DateTimeFormatter;
25 import java.util.ArrayList; 25 import java.util.*;
26 import java.util.HashMap;
27 import java.util.List;
28 import java.util.Map;
29 26
30 /** 27 /**
31 * <pre> 28 * <pre>
...@@ -169,11 +166,12 @@ public class CommandCentreServiceImpl implements ICommandCentreService { ...@@ -169,11 +166,12 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
169 * @param time 166 * @param time
170 * @return 167 * @return
171 */ 168 */
172 public List<WaterTreatmentVO> statisticsCLSLXQ(String time, String departIds){ 169 public List<WaterTreatmentVO> statisticsCLSLXQ(String startDate,String endDate, String departIds){
173 List<WaterTreatmentVO> dateList = null; 170 List<WaterTreatmentVO> dateList = null;
174 DateVO dateVO = new DateVO(time);//转换后的时间参数 171 DateVO dateVO = new DateVO(startDate);//转换后的时间参数
175 172
176 long differenceDay = DateUtils.differenceDay(dateVO.getNowMonthStartDate(), dateVO.getNowMonthEndDate()); 173
174 long differenceDay = DateUtils.differenceDay(startDate, endDate);
177 String departIdssss = BaseUtil.quoteEach(departIds , ","); 175 String departIdssss = BaseUtil.quoteEach(departIds , ",");
178 //String factorySql = "select fi.depart_id ,d.depart_name, fi.pro_scale*10000 'pro_scale' from sys_factory_info fi , sys_depart d where fi.depart_id = d.id and d.depart_type =1 and d.id in("+departIdssss+")"; 176 //String factorySql = "select fi.depart_id ,d.depart_name, fi.pro_scale*10000 'pro_scale' from sys_factory_info fi , sys_depart d where fi.depart_id = d.id and d.depart_type =1 and d.id in("+departIdssss+")";
179 String factorySql = "select group_concat(fi.depart_id) from sys_factory_info fi , sys_depart d where fi.depart_id = d.id and d.depart_type =1 and d.id in("+departIdssss+")"; 177 String factorySql = "select group_concat(fi.depart_id) from sys_factory_info fi , sys_depart d where fi.depart_id = d.id and d.depart_type =1 and d.id in("+departIdssss+")";
...@@ -181,7 +179,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService { ...@@ -181,7 +179,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
181 departIds =getJdbcTemplate().queryForObject(factorySql,String.class); 179 departIds =getJdbcTemplate().queryForObject(factorySql,String.class);
182 180
183 //月产水量 181 //月产水量
184 Map<String,String> cslMap = commonQueryCsl(departIds, dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate()); 182 Map<String,String> cslMap = commonQueryCsl(departIds, startDate, endDate);
185 183
186 String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departIds, dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate()); 184 String dataViewName2119 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL", departIds, dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate());
187 String sql = "select aaa.CSL 'csl' ,aaa.depart_id , d.depart_name, fi.pro_scale*10000 'pro_scale' from "+ dataViewName2119 +" aaa"; 185 String sql = "select aaa.CSL 'csl' ,aaa.depart_id , d.depart_name, fi.pro_scale*10000 'pro_scale' from "+ dataViewName2119 +" aaa";
...@@ -200,8 +198,10 @@ public class CommandCentreServiceImpl implements ICommandCentreService { ...@@ -200,8 +198,10 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
200 if(dateList != null ){ 198 if(dateList != null ){
201 for(WaterTreatmentVO waterTreatmentVO : dateList){ 199 for(WaterTreatmentVO waterTreatmentVO : dateList){
202 waterTreatmentVO.setRank(index++);//设置排名 200 waterTreatmentVO.setRank(index++);//设置排名
201 waterTreatmentVO.setMonthDayNum(differenceDay);
203 if(waterTreatmentVO.getCSL() != null ){ 202 if(waterTreatmentVO.getCSL() != null ){
204 waterTreatmentVO.setDayCsl(Double.parseDouble(JSUtils.divide( waterTreatmentVO.getCSL() ,differenceDay )) ); 203 waterTreatmentVO.setDayCsl(Double.parseDouble(JSUtils.divide( waterTreatmentVO.getCSL() ,differenceDay )) );
204 waterTreatmentVO.setCSL(Double.parseDouble(JSUtils.format(waterTreatmentVO.getCSL()) ));//格式化
205 } 205 }
206 /* waterTreatmentVO.setRank( index++);//设置排名 206 /* waterTreatmentVO.setRank( index++);//设置排名
207 if(cslMap.get(waterTreatmentVO.getDepartId()) != null ){ 207 if(cslMap.get(waterTreatmentVO.getDepartId()) != null ){
......
...@@ -259,20 +259,20 @@ public class ReportItemvService { ...@@ -259,20 +259,20 @@ public class ReportItemvService {
259 String dataViewName2119 = ReportViewUtil.buildViewLike(ReportViewUtil.view2119,"CSL", departId, startTime,endTime); 259 String dataViewName2119 = ReportViewUtil.buildViewLike(ReportViewUtil.view2119,"CSL", departId, startTime,endTime);
260 String sql = "select sum(aaa.CSL) from " + dataViewName2119+ "aaa"; 260 String sql = "select sum(aaa.CSL) from " + dataViewName2119+ "aaa";
261 String csl = getJdbcTemplate().queryForObject(sql,String.class); 261 String csl = getJdbcTemplate().queryForObject(sql,String.class);
262 return csl; 262 return ConvertUtils.getString(csl,"0.00");
263 } 263 }
264 264
265 public String getSumDLHJ(String departId ,String startTime ,String endTime){ 265 public String getSumDLHJ(String departId ,String startTime ,String endTime){
266 String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportViewUtil.view3a24,"DLHJ", departId, startTime,endTime); 266 String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportViewUtil.view3a24,"DLHJ", departId, startTime,endTime);
267 String sql = "select sum(aaa.DLHJ) from " + dataViewName3a24+ "aaa"; 267 String sql = "select sum(aaa.DLHJ) from " + dataViewName3a24+ "aaa";
268 String dlhj = getJdbcTemplate().queryForObject(sql,String.class); 268 String dlhj = getJdbcTemplate().queryForObject(sql,String.class);
269 return dlhj; 269 return ConvertUtils.getString(dlhj,"0.00");
270 } 270 }
271 public String getSumValue(String viewName,String fileds,String departId ,String startTime ,String endTime){ 271 public String getSumValue(String viewName,String fileds,String departId ,String startTime ,String endTime){
272 String dataViewName3a24 = ReportViewUtil.buildViewLike(viewName,fileds, departId, startTime,endTime); 272 String dataViewName3a24 = ReportViewUtil.buildViewLike(viewName,fileds, departId, startTime,endTime);
273 String sql = "select sum(aaa."+fileds+") from " + dataViewName3a24+ "aaa"; 273 String sql = "select sum(aaa."+fileds+") from " + dataViewName3a24+ "aaa";
274 String dlhj = getJdbcTemplate().queryForObject(sql,String.class); 274 String dlhj = getJdbcTemplate().queryForObject(sql,String.class);
275 return dlhj; 275 return ConvertUtils.getString(dlhj,"0.00");
276 } 276 }
277 //指挥中心-运行负荷率分析 277 //指挥中心-运行负荷率分析
278 public DepartLoadRateResultVO statisticsByLoadRate(String departIds,String startTime, String endTime, Integer loadRateType) { 278 public DepartLoadRateResultVO statisticsByLoadRate(String departIds,String startTime, String endTime, Integer loadRateType) {
...@@ -281,11 +281,11 @@ public class ReportItemvService { ...@@ -281,11 +281,11 @@ public class ReportItemvService {
281 String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", departIds, startTime,endTime);// 部门、时间 281 String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", departIds, startTime,endTime);// 部门、时间
282 //列表数据 282 //列表数据
283 List<DepartLoadRateVO> dataList = statisticsByLoadRateList(departIds, startTime,endTime,loadRateType); 283 List<DepartLoadRateVO> dataList = statisticsByLoadRateList(departIds, startTime,endTime,loadRateType);
284 284 long differenceDay = DateUtils.differenceDay(startTime, endTime);
285 //统计总数 285 //统计总数
286 int normalNum = getJdbcTemplate().queryForObject( getStatisticsByLoadRate( dataViewName2119,1 ),Integer.class);//正常 286 int normalNum = getJdbcTemplate().queryForObject( getStatisticsByLoadRate( dataViewName2119,1,differenceDay ),Integer.class);//正常
287 int lowLoadNum = getJdbcTemplate().queryForObject( getStatisticsByLoadRate( dataViewName2119,3 ),Integer.class);//低负荷 287 int lowLoadNum = getJdbcTemplate().queryForObject( getStatisticsByLoadRate( dataViewName2119,3,differenceDay ),Integer.class);//低负荷
288 int overloadNum = getJdbcTemplate().queryForObject( getStatisticsByLoadRate( dataViewName2119,2 ),Integer.class);//超负荷 288 int overloadNum = getJdbcTemplate().queryForObject( getStatisticsByLoadRate( dataViewName2119,2 ,differenceDay),Integer.class);//超负荷
289 289
290 departLoadRateResultVO.setLowLoadNum( lowLoadNum ); 290 departLoadRateResultVO.setLowLoadNum( lowLoadNum );
291 departLoadRateResultVO.setNormalNum( normalNum ); 291 departLoadRateResultVO.setNormalNum( normalNum );
...@@ -296,8 +296,10 @@ public class ReportItemvService { ...@@ -296,8 +296,10 @@ public class ReportItemvService {
296 //指挥中心-运行负荷率分析---列表详情 296 //指挥中心-运行负荷率分析---列表详情
297 public List<DepartLoadRateVO> statisticsByLoadRateList(String departIds, String startTime, String endTime ,Integer loadRateType) { 297 public List<DepartLoadRateVO> statisticsByLoadRateList(String departIds, String startTime, String endTime ,Integer loadRateType) {
298 String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", departIds, startTime,endTime);// 部门、时间 298 String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", departIds, startTime,endTime);// 部门、时间
299
300 long differenceDay = DateUtils.differenceDay(startTime, endTime);
299 // 运行负荷率分析 = CSL/规模 301 // 运行负荷率分析 = CSL/规模
300 String sql = " select round(sum(aaa.CSL),2) 'waterYieldMonth' ,aaa.depart_id , d.depart_name , round( (sum(aaa.CSL)/(fi.pro_scale*10000) ),2) 'loadRate' from "+ dataViewName2119 +" aaa"; 302 String sql = " select round(sum(aaa.CSL),2) 'waterYieldMonth' ,aaa.depart_id , d.depart_name , round( (sum(aaa.CSL)/(fi.pro_scale * 100 * "+differenceDay+") ),2) 'loadRate' from "+ dataViewName2119 +" aaa";
301 sql += " left join sys_factory_info fi on fi.depart_id = aaa.depart_id "; 303 sql += " left join sys_factory_info fi on fi.depart_id = aaa.depart_id ";
302 sql += " left join sys_depart d on d.id = aaa.depart_id group by aaa.depart_id"; 304 sql += " left join sys_depart d on d.id = aaa.depart_id group by aaa.depart_id";
303 305
...@@ -312,12 +314,9 @@ public class ReportItemvService { ...@@ -312,12 +314,9 @@ public class ReportItemvService {
312 return dataList; 314 return dataList;
313 } 315 }
314 316
315 317 private String getStatisticsByLoadRate(String dataViewName2119 ,Integer loadRateType ,long differenceDay){
316
317
318 private String getStatisticsByLoadRate(String dataViewName2119 ,Integer loadRateType ){
319 String sql = "select count(1) from ( "; 318 String sql = "select count(1) from ( ";
320 sql += " select aaa.depart_id , round( (sum(aaa.CSL)/(fi.pro_scale*10000) ),2) 'loadRate' from "+ dataViewName2119 +" aaa"; 319 sql += " select aaa.depart_id , round( (sum(aaa.CSL)/(fi.pro_scale * 100 *"+differenceDay+") ),2) 'loadRate' from "+ dataViewName2119 +" aaa";
321 sql += " left join sys_factory_info fi on fi.depart_id = aaa.depart_id "; 320 sql += " left join sys_factory_info fi on fi.depart_id = aaa.depart_id ";
322 sql += " group by aaa.depart_id "; 321 sql += " group by aaa.depart_id ";
323 if(loadRateType != null ){ 322 if(loadRateType != null ){
......
...@@ -35,9 +35,11 @@ public class WaterTreatmentVO { ...@@ -35,9 +35,11 @@ public class WaterTreatmentVO {
35 @ApiModelProperty(value = "排名") 35 @ApiModelProperty(value = "排名")
36 private Integer rank; 36 private Integer rank;
37 37
38 private long monthDayNum = 30;
39
38 public Double getFhl() { 40 public Double getFhl() {
39 if(this.getCSL() != null && this.getProScale() != null && this.getProScale().doubleValue() > 0 ){ 41 if(this.getCSL() != null && this.getProScale() != null && this.getProScale().doubleValue() > 0 ){
40 fhl = this.getCSL() / this.getProScale(); 42 fhl = this.getCSL()*100 / (this.getProScale() * this.getMonthDayNum() );
41 } 43 }
42 return fhl; 44 return fhl;
43 } 45 }
......
...@@ -26,11 +26,13 @@ ...@@ -26,11 +26,13 @@
26 d.depart_name AS depart_name, 26 d.depart_name AS depart_name,
27 r.report_date AS danger_date, 27 r.report_date AS danger_date,
28 r.danger_name AS danger_location, 28 r.danger_name AS danger_location,
29 u.realname AS 'danger_user',
29 1 AS is_fault, 30 1 AS is_fault,
30 r.status 31 r.status
31 FROM 32 FROM
32 sys_depart d 33 sys_depart d
33 LEFT JOIN danger_inspection_record r ON d.id = r.depart_id 34 LEFT JOIN danger_inspection_record r ON d.id = r.depart_id
35 LEFT JOIN sys_user u ON u.id = r.report_user
34 WHERE 36 WHERE
35 d.depart_type = 1 37 d.depart_type = 1
36 AND r.report_date LIKE CONCAT(#{year},'%') 38 AND r.report_date LIKE CONCAT(#{year},'%')
......
...@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
24 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 24 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
25 import com.skua.modules.erp.service.IPurchaseMaterialService; 25 import com.skua.modules.erp.service.IPurchaseMaterialService;
26 import com.skua.modules.erp.vo.DistributContractVO; 26 import com.skua.modules.erp.vo.DistributContractVO;
27 import com.skua.modules.guest.util.DateUtil;
27 import lombok.extern.slf4j.Slf4j; 28 import lombok.extern.slf4j.Slf4j;
28 29
29 import org.apache.commons.lang3.StringUtils; 30 import org.apache.commons.lang3.StringUtils;
...@@ -77,6 +78,9 @@ public class DistributContractController { ...@@ -77,6 +78,9 @@ public class DistributContractController {
77 Result<List<DistributContract>> result = new Result<List<DistributContract>>(); 78 Result<List<DistributContract>> result = new Result<List<DistributContract>>();
78 QueryWrapper<DistributContract> queryWrapper = QueryGenerator.initQueryWrapper(distributContract, req.getParameterMap()); 79 QueryWrapper<DistributContract> queryWrapper = QueryGenerator.initQueryWrapper(distributContract, req.getParameterMap());
79 // 需要添加条件判断 80 // 需要添加条件判断
81 queryWrapper.eq("use_flag","1");//生效的合同
82 queryWrapper.ge("end_time", DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss"));// 生效时间 《 当前时间 《 失效时间
83 queryWrapper.le("start_time", DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss"));
80 List<DistributContract> dataList = distributContractService.list(queryWrapper); 84 List<DistributContract> dataList = distributContractService.list(queryWrapper);
81 result.setSuccess(true); 85 result.setSuccess(true);
82 result.setResult(dataList); 86 result.setResult(dataList);
......
...@@ -99,7 +99,7 @@ public class ErpCommonController { ...@@ -99,7 +99,7 @@ public class ErpCommonController {
99 99
100 @AutoLog(value = "ERP-采购合同--物料清单(药剂入库使用)") 100 @AutoLog(value = "ERP-采购合同--物料清单(药剂入库使用)")
101 @ApiOperation(value = "ERP-采购合同--物料清单药剂入库使用()", notes = "ERP-采购合同--物料清单(药剂入库使用)") 101 @ApiOperation(value = "ERP-采购合同--物料清单药剂入库使用()", notes = "ERP-采购合同--物料清单(药剂入库使用)")
102 @RequestMapping(value = "/queryPurchaseMaterialListByIn", method = RequestMethod.GET) 102 @GetMapping("/queryPurchaseMaterialListByIn")
103 public Result<IPage<PurchaseMaterialVO>> queryPurchaseMaterialListByIn( 103 public Result<IPage<PurchaseMaterialVO>> queryPurchaseMaterialListByIn(
104 MaterialSearchVO materialSearchVO, 104 MaterialSearchVO materialSearchVO,
105 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, 105 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
......
...@@ -25,21 +25,21 @@ import io.swagger.annotations.ApiOperation; ...@@ -25,21 +25,21 @@ import io.swagger.annotations.ApiOperation;
25 25
26 /** 26 /**
27 * <pre> 27 * <pre>
28 * 购合同 28 * 购合同
29 * </pre> 29 * </pre>
30 * @author 开发者姓名 30 * @author 开发者姓名
31 * @version V0.1, 开发时间 31 * @version V0.1, 开发时间
32 */ 32 */
33 @Slf4j 33 @Slf4j
34 @Api(tags="erp购合同") 34 @Api(tags="erp购合同")
35 @RestController("webPurchaseContractController") 35 @RestController("webPurchaseContractController")
36 @RequestMapping("/web/erp/purchaseContract") 36 @RequestMapping("/web/erp/purchaseContract")
37 public class PurchaseContractController { 37 public class PurchaseContractController {
38 @Autowired 38 @Autowired
39 private IERPPurchaseContractService purchaseContractService; 39 private IERPPurchaseContractService purchaseContractService;
40 40
41 @AutoLog(value = "erp购合同-分页列表查询") 41 @AutoLog(value = "erp购合同-分页列表查询")
42 @ApiOperation(value="erp采购合同-分页列表查询", notes="erp采购合同-分页列表查询") 42 @ApiOperation(value="erp统购合同-分页列表查询", notes="erp统购合同-分页列表查询")
43 @GetMapping(value = "/list") 43 @GetMapping(value = "/list")
44 public Result<IPage<ERPPurchaseContract>> queryPageList(ERPPurchaseContract ERPPurchaseContract, 44 public Result<IPage<ERPPurchaseContract>> queryPageList(ERPPurchaseContract ERPPurchaseContract,
45 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 45 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
...@@ -59,8 +59,8 @@ public class PurchaseContractController { ...@@ -59,8 +59,8 @@ public class PurchaseContractController {
59 result.setResult(pageList); 59 result.setResult(pageList);
60 return result; 60 return result;
61 } 61 }
62 @AutoLog(value = "erp购合同-集团审核列表") 62 @AutoLog(value = "erp购合同-集团审核列表")
63 @ApiOperation(value="erp采购合同-集团审核列表", notes="erp采购合同-集团审核列表") 63 @ApiOperation(value="erp统购合同-集团审核列表", notes="erp统购合同-集团审核列表")
64 @GetMapping(value = "/handleList") 64 @GetMapping(value = "/handleList")
65 public Result<IPage<ERPPurchaseContract>> handleList(ERPPurchaseContract purchaseContract, 65 public Result<IPage<ERPPurchaseContract>> handleList(ERPPurchaseContract purchaseContract,
66 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 66 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
...@@ -81,8 +81,8 @@ public class PurchaseContractController { ...@@ -81,8 +81,8 @@ public class PurchaseContractController {
81 return result; 81 return result;
82 } 82 }
83 83
84 @AutoLog(value = "erp采购合同-有权限的采购合同集合") 84 @AutoLog(value = "erp统购合同-有权限的统购合同集合")
85 @ApiOperation(value="erp采购合同-有权限的采购合同集合", notes="erp采购合同-有权限的采购合同集合") 85 @ApiOperation(value="erp统购合同-有权限的统购合同集合", notes="erp统购合同-有权限的统购合同集合")
86 @GetMapping(value = "/purchaseContractList") 86 @GetMapping(value = "/purchaseContractList")
87 public Result<List<ERPPurchaseContract>> purchaseContractList(MaterialSearchVO materialSearchVO) { 87 public Result<List<ERPPurchaseContract>> purchaseContractList(MaterialSearchVO materialSearchVO) {
88 Result<List<ERPPurchaseContract>> result = new Result<List<ERPPurchaseContract>>(); 88 Result<List<ERPPurchaseContract>> result = new Result<List<ERPPurchaseContract>>();
...@@ -105,8 +105,8 @@ public class PurchaseContractController { ...@@ -105,8 +105,8 @@ public class PurchaseContractController {
105 return result; 105 return result;
106 } 106 }
107 107
108 @AutoLog(value = "erp购合同-添加") 108 @AutoLog(value = "erp购合同-添加")
109 @ApiOperation(value="erp采购合同-添加", notes="erp采购合同-添加") 109 @ApiOperation(value="erp统购合同-添加", notes="erp统购合同-添加")
110 @PostMapping(value = "/add") 110 @PostMapping(value = "/add")
111 public Result<ERPPurchaseContract> add(@RequestBody PurchaseContractVO purchaseContractVO) { 111 public Result<ERPPurchaseContract> add(@RequestBody PurchaseContractVO purchaseContractVO) {
112 Result<ERPPurchaseContract> result = new Result<ERPPurchaseContract>(); 112 Result<ERPPurchaseContract> result = new Result<ERPPurchaseContract>();
...@@ -125,8 +125,8 @@ public class PurchaseContractController { ...@@ -125,8 +125,8 @@ public class PurchaseContractController {
125 return result; 125 return result;
126 } 126 }
127 127
128 @AutoLog(value = "erp购合同-编辑") 128 @AutoLog(value = "erp购合同-编辑")
129 @ApiOperation(value="erp采购合同-编辑", notes="erp采购合同-编辑") 129 @ApiOperation(value="erp统购合同-编辑", notes="erp统购合同-编辑")
130 @PutMapping(value = "/edit") 130 @PutMapping(value = "/edit")
131 public Result<ERPPurchaseContract> edit(@RequestBody PurchaseContractVO purchaseContractVO) { 131 public Result<ERPPurchaseContract> edit(@RequestBody PurchaseContractVO purchaseContractVO) {
132 Result<ERPPurchaseContract> result = new Result<ERPPurchaseContract>(); 132 Result<ERPPurchaseContract> result = new Result<ERPPurchaseContract>();
...@@ -146,8 +146,8 @@ public class PurchaseContractController { ...@@ -146,8 +146,8 @@ public class PurchaseContractController {
146 return result; 146 return result;
147 } 147 }
148 148
149 @AutoLog(value = "erp购合同-通过id删除") 149 @AutoLog(value = "erp购合同-通过id删除")
150 @ApiOperation(value="erp采购合同-通过id删除", notes="erp采购合同-通过id删除") 150 @ApiOperation(value="erp统购合同-通过id删除", notes="erp统购合同-通过id删除")
151 @DeleteMapping(value = "/delete") 151 @DeleteMapping(value = "/delete")
152 public Result<?> delete(@RequestParam(name="id",required=true) String id) { 152 public Result<?> delete(@RequestParam(name="id",required=true) String id) {
153 try { 153 try {
...@@ -168,8 +168,8 @@ public class PurchaseContractController { ...@@ -168,8 +168,8 @@ public class PurchaseContractController {
168 * @author 开发者姓名, 开发时间 168 * @author 开发者姓名, 开发时间
169 * @Description: TODO(这里描述这个方法的需求变更情况) 169 * @Description: TODO(这里描述这个方法的需求变更情况)
170 */ 170 */
171 @AutoLog(value = "erp购合同-批量删除") 171 @AutoLog(value = "erp购合同-批量删除")
172 @ApiOperation(value="erp采购合同-批量删除", notes="erp采购合同-批量删除") 172 @ApiOperation(value="erp统购合同-批量删除", notes="erp统购合同-批量删除")
173 @DeleteMapping(value = "/deleteBatch") 173 @DeleteMapping(value = "/deleteBatch")
174 public Result<ERPPurchaseContract> deleteBatch(@RequestParam(name="ids",required=true) String ids) { 174 public Result<ERPPurchaseContract> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
175 Result<ERPPurchaseContract> result = new Result<ERPPurchaseContract>(); 175 Result<ERPPurchaseContract> result = new Result<ERPPurchaseContract>();
...@@ -190,8 +190,8 @@ public class PurchaseContractController { ...@@ -190,8 +190,8 @@ public class PurchaseContractController {
190 * @author 开发者姓名, 开发时间 190 * @author 开发者姓名, 开发时间
191 * @Description: TODO(这里描述这个方法的需求变更情况) 191 * @Description: TODO(这里描述这个方法的需求变更情况)
192 */ 192 */
193 @AutoLog(value = "erp购合同-通过id查询") 193 @AutoLog(value = "erp购合同-通过id查询")
194 @ApiOperation(value="erp采购合同-通过id查询", notes="erp采购合同-通过id查询") 194 @ApiOperation(value="erp统购合同-通过id查询", notes="erp统购合同-通过id查询")
195 @GetMapping(value = "/queryById") 195 @GetMapping(value = "/queryById")
196 public Result<PurchaseContractVO> queryById(@RequestParam(name="id",required=true) String id) { 196 public Result<PurchaseContractVO> queryById(@RequestParam(name="id",required=true) String id) {
197 Result<PurchaseContractVO> result = new Result<PurchaseContractVO>(); 197 Result<PurchaseContractVO> result = new Result<PurchaseContractVO>();
...@@ -205,8 +205,8 @@ public class PurchaseContractController { ...@@ -205,8 +205,8 @@ public class PurchaseContractController {
205 return result; 205 return result;
206 } 206 }
207 207
208 @AutoLog(value = "erp购合同-送审") 208 @AutoLog(value = "erp购合同-送审")
209 @ApiOperation(value="erp采购合同-送审", notes="erp采购合同-送审") 209 @ApiOperation(value="erp统购合同-送审", notes="erp统购合同-送审")
210 @GetMapping(value = "/sendAudit") 210 @GetMapping(value = "/sendAudit")
211 public Result<PurchaseContractVO> sendAudit(@RequestParam(name="id",required=true) String id) { 211 public Result<PurchaseContractVO> sendAudit(@RequestParam(name="id",required=true) String id) {
212 Result<PurchaseContractVO> result = new Result<PurchaseContractVO>(); 212 Result<PurchaseContractVO> result = new Result<PurchaseContractVO>();
...@@ -223,8 +223,8 @@ public class PurchaseContractController { ...@@ -223,8 +223,8 @@ public class PurchaseContractController {
223 } 223 }
224 return result; 224 return result;
225 } 225 }
226 @AutoLog(value = "erp购合同-审批") 226 @AutoLog(value = "erp购合同-审批")
227 @ApiOperation(value="erp采购合同-审批", notes="erp采购合同-审批") 227 @ApiOperation(value="erp统购合同-审批", notes="erp统购合同-审批")
228 @PutMapping(value = "/audit") 228 @PutMapping(value = "/audit")
229 public Result<PurchaseContractVO> auditPurchasePlan(@RequestBody PurchaseContractVO purchaseContractVO) { 229 public Result<PurchaseContractVO> auditPurchasePlan(@RequestBody PurchaseContractVO purchaseContractVO) {
230 Result<PurchaseContractVO> result = new Result<PurchaseContractVO>(); 230 Result<PurchaseContractVO> result = new Result<PurchaseContractVO>();
...@@ -237,8 +237,8 @@ public class PurchaseContractController { ...@@ -237,8 +237,8 @@ public class PurchaseContractController {
237 } 237 }
238 return result; 238 return result;
239 } 239 }
240 @AutoLog(value = "erp购合同-同步入库") 240 @AutoLog(value = "erp购合同-同步入库")
241 @ApiOperation(value="erp采购合同-同步入库", notes="erp采购合同-同步入库") 241 @ApiOperation(value="erp统购合同-同步入库", notes="erp统购合同-同步入库")
242 @PutMapping(value = "/syncEquipmentIn") 242 @PutMapping(value = "/syncEquipmentIn")
243 public Result<String> syncEquipmentIn(@RequestParam(name="id",required=true) String id ) { 243 public Result<String> syncEquipmentIn(@RequestParam(name="id",required=true) String id ) {
244 Result<String> result = new Result<String>(); 244 Result<String> result = new Result<String>();
......
...@@ -11,6 +11,7 @@ import com.skua.core.util.DateUtils; ...@@ -11,6 +11,7 @@ import com.skua.core.util.DateUtils;
11 import com.skua.modules.equipment.vo.EquipmentRealTimeVO; 11 import com.skua.modules.equipment.vo.EquipmentRealTimeVO;
12 import com.skua.modules.erp.vo.MetricInfoVO; 12 import com.skua.modules.erp.vo.MetricInfoVO;
13 import com.skua.modules.erp.vo.RealTimeHistoryDataVO; 13 import com.skua.modules.erp.vo.RealTimeHistoryDataVO;
14 import com.skua.modules.guest.util.DateUtil;
14 import io.swagger.annotations.Api; 15 import io.swagger.annotations.Api;
15 import io.swagger.annotations.ApiOperation; 16 import io.swagger.annotations.ApiOperation;
16 import org.apache.commons.lang.StringUtils; 17 import org.apache.commons.lang.StringUtils;
...@@ -39,6 +40,19 @@ public class TestMetricInfoController { ...@@ -39,6 +40,19 @@ public class TestMetricInfoController {
39 public Result<RealTimeHistoryDataVO> equipRealTimeHistoryDataCtrl(@RequestParam(value = "departId") String departId, 40 public Result<RealTimeHistoryDataVO> equipRealTimeHistoryDataCtrl(@RequestParam(value = "departId") String departId,
40 @RequestParam(value = "startTime") String startTime, 41 @RequestParam(value = "startTime") String startTime,
41 @RequestParam(value = "endTime") String endTime) { 42 @RequestParam(value = "endTime") String endTime) {
43 if(StringUtils.isEmpty(startTime)){
44 startTime = DateUtil.getCurrentDate() ;
45 }
46 if(StringUtils.isEmpty(endTime)){
47 endTime = DateUtil.getCurrentDate();
48 }
49 if(startTime != null && startTime.length() < 19){
50 startTime = startTime+" 00:00:00";
51 }
52 if(endTime != null && endTime.length() < 19){
53 endTime = endTime+" 23:59:59";
54 }
55
42 Result<RealTimeHistoryDataVO> result = new Result<>(); 56 Result<RealTimeHistoryDataVO> result = new Result<>();
43 RealTimeHistoryDataVO realTimeHistoryDataVO = new RealTimeHistoryDataVO(); 57 RealTimeHistoryDataVO realTimeHistoryDataVO = new RealTimeHistoryDataVO();
44 //String fields = "TCSWSCLC_PLC300_Tag182,TCSWSCLC_PLC300_Tag185"; 58 //String fields = "TCSWSCLC_PLC300_Tag182,TCSWSCLC_PLC300_Tag185";
......
...@@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; ...@@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
25 @Accessors(chain = true) 25 @Accessors(chain = true)
26 @ApiModel(value="erp_distribut_contract对象", description="erp分销合同") 26 @ApiModel(value="erp_distribut_contract对象", description="erp分销合同")
27 public class DistributContract { 27 public class DistributContract {
28 28
29 /**主键*/ 29 /**主键*/
30 @TableId(type = IdType.ID_WORKER_STR) 30 @TableId(type = IdType.ID_WORKER_STR)
31 @ApiModelProperty(value = "主键") 31 @ApiModelProperty(value = "主键")
...@@ -65,6 +65,14 @@ public class DistributContract { ...@@ -65,6 +65,14 @@ public class DistributContract {
65 @ApiModelProperty(value = "备注") 65 @ApiModelProperty(value = "备注")
66 private String remarks; 66 private String remarks;
67 67
68
69 @ApiModelProperty(value = "启动标记 1.启动 0不启用")
70 private String useFlag;
71 @ApiModelProperty(value = "生效时间")
72 private String startTime;
73 @ApiModelProperty(value = "失效时间")
74 private String endTime;
75
68 /**申请人*/ 76 /**申请人*/
69 @Excel(name = "申请人", width = 15) 77 @Excel(name = "申请人", width = 15)
70 @ApiModelProperty(value = "申请人") 78 @ApiModelProperty(value = "申请人")
......
...@@ -23,7 +23,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; ...@@ -23,7 +23,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
23 @Accessors(chain = true) 23 @Accessors(chain = true)
24 @ApiModel(value="erp_purchase_contract对象", description="采购合同") 24 @ApiModel(value="erp_purchase_contract对象", description="采购合同")
25 public class ERPPurchaseContract { 25 public class ERPPurchaseContract {
26 26
27 /**主键*/ 27 /**主键*/
28 @TableId(type = IdType.ID_WORKER_STR) 28 @TableId(type = IdType.ID_WORKER_STR)
29 @ApiModelProperty(value = "主键") 29 @ApiModelProperty(value = "主键")
...@@ -95,6 +95,16 @@ public class ERPPurchaseContract { ...@@ -95,6 +95,16 @@ public class ERPPurchaseContract {
95 @ApiModelProperty(value = "申请时间") 95 @ApiModelProperty(value = "申请时间")
96 private String applyTime; 96 private String applyTime;
97 97
98 @ApiModelProperty(value = "启动标记 1.启动 0不启用")
99 private String useFlag;
100 @ApiModelProperty(value = "生效时间")
101 private String startTime;
102 @ApiModelProperty(value = "失效时间")
103 private String endTime;
104
105
106
107
98 @Excel(name = "备注", width = 15) 108 @Excel(name = "备注", width = 15)
99 @ApiModelProperty(value = "备注") 109 @ApiModelProperty(value = "备注")
100 private String remark; 110 private String remark;
......
...@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.TableId; ...@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
7 import com.baomidou.mybatisplus.annotation.TableName; 7 import com.baomidou.mybatisplus.annotation.TableName;
8 import com.baomidou.mybatisplus.annotation.TableField; 8 import com.baomidou.mybatisplus.annotation.TableField;
9 import com.skua.core.aspect.annotation.Dict; 9 import com.skua.core.aspect.annotation.Dict;
10 import com.skua.core.util.ConvertUtils;
11 import com.skua.tool.util.JSUtils;
10 import io.swagger.annotations.ApiModel; 12 import io.swagger.annotations.ApiModel;
11 import io.swagger.annotations.ApiModelProperty; 13 import io.swagger.annotations.ApiModelProperty;
12 import lombok.Data; 14 import lombok.Data;
...@@ -30,6 +32,9 @@ public class PurchaseMaterial { ...@@ -30,6 +32,9 @@ public class PurchaseMaterial {
30 @TableId(type = IdType.UUID) 32 @TableId(type = IdType.UUID)
31 @ApiModelProperty(value = "主键") 33 @ApiModelProperty(value = "主键")
32 private java.lang.String id; 34 private java.lang.String id;
35 @ApiModelProperty(value = "所属机构")
36 @Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name")
37 private String departId;
33 /**采购计划编号*/ 38 /**采购计划编号*/
34 @Excel(name = "采购合同编号", width = 15) 39 @Excel(name = "采购合同编号", width = 15)
35 @ApiModelProperty(value = "采购合同编号") 40 @ApiModelProperty(value = "采购合同编号")
...@@ -50,10 +55,7 @@ public class PurchaseMaterial { ...@@ -50,10 +55,7 @@ public class PurchaseMaterial {
50 @Excel(name = "货号", width = 15) 55 @Excel(name = "货号", width = 15)
51 @ApiModelProperty(value = "货号") 56 @ApiModelProperty(value = "货号")
52 private java.lang.String goodCode; 57 private java.lang.String goodCode;
53 /**供应商id*/ 58
54 @Excel(name = "供应商id", width = 15)
55 @ApiModelProperty(value = "供应商id")
56 private java.lang.String supplierId;
57 /**规格型号*/ 59 /**规格型号*/
58 @Excel(name = "规格型号", width = 15) 60 @Excel(name = "规格型号", width = 15)
59 @ApiModelProperty(value = "规格型号") 61 @ApiModelProperty(value = "规格型号")
...@@ -80,6 +82,20 @@ public class PurchaseMaterial { ...@@ -80,6 +82,20 @@ public class PurchaseMaterial {
80 private java.lang.String remark; 82 private java.lang.String remark;
81 83
82 84
85 /**供应商编号*/
86 @Excel(name = "供应商编号", width = 15)
87 @ApiModelProperty(value = "供应商编号")
88 @Dict(dictTable = "ajh_supplier_manage", dicCode="id", dicText = "supp_name")
89 private String supplierId;
90 /**税额*/
91 @Excel(name = "税额", width = 15)
92 @ApiModelProperty(value = "税额")
93 private String taxAmount;
94 /**价税合计*/
95 @Excel(name = "价税合计", width = 15)
96 @ApiModelProperty(value = "价税合计")
97 private String totalPriceTax;
98
83 @TableField(exist=false) 99 @TableField(exist=false)
84 @ApiModelProperty(value = "物料类别名称") 100 @ApiModelProperty(value = "物料类别名称")
85 private String sparepartTypeName; 101 private String sparepartTypeName;
...@@ -105,5 +121,16 @@ public class PurchaseMaterial { ...@@ -105,5 +121,16 @@ public class PurchaseMaterial {
105 @ApiModelProperty(value = "扩展:分销总价") 121 @ApiModelProperty(value = "扩展:分销总价")
106 private String distributTotalPrice; 122 private String distributTotalPrice;
107 123
124 @TableField(exist=false)
125 @ApiModelProperty(value = "扩展:货号物料入库数量")
126 private String storeNum;
127
128 @TableField(exist=false)
129 @ApiModelProperty(value = "扩展:剩余数量")
130 private Double remainNum;
108 131
132 public Double getRemainNum() {
133 remainNum = ConvertUtils.getDouble(this.getPurchaseNum() ,0d) - ConvertUtils.getDouble(this.getStoreNum() ,0d);// JSUtils.divide(this.getPurchaseNum() ,this.getStoreNum());
134 return remainNum;
135 }
109 } 136 }
......
...@@ -57,7 +57,7 @@ public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> { ...@@ -57,7 +57,7 @@ public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> {
57 * @param goodCode 57 * @param goodCode
58 * @return 58 * @return
59 */ 59 */
60 public int checkGoodCode(@Param("id")String id,@Param("goodCode") String goodCode); 60 int checkGoodCode(@Param("id")String id,@Param("goodCode") String goodCode);
61 61
62 62
63 /** 63 /**
...@@ -66,12 +66,12 @@ public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> { ...@@ -66,12 +66,12 @@ public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> {
66 * @return 66 * @return
67 */ 67 */
68 @Anonymous 68 @Anonymous
69 public IPage<PurchaseMaterialVO> queryPurchaseMaterialListByIn(Page<PurchaseMaterialVO> page,@Param("param") MaterialSearchVO materialSearchVO); 69 IPage<PurchaseMaterialVO> queryPurchaseMaterialListByIn(Page<PurchaseMaterialVO> page,@Param("param") MaterialSearchVO materialSearchVO);
70 70
71 /*** 71 /***
72 * 根据id或code校验合同编号是否唯一 72 * 根据id或code校验合同编号是否唯一
73 * @param contractCode 73 * @param contractCode
74 * @return 74 * @return
75 */ 75 */
76 public int checkContractCode(@Param("contractCode")String contractCode ); 76 int checkContractCode(@Param("contractCode")String contractCode );
77 } 77 }
......
...@@ -36,17 +36,11 @@ ...@@ -36,17 +36,11 @@
36 </select> 36 </select>
37 37
38 <select id="queryMaterialByGoodCode" resultType="com.skua.modules.erp.entity.PurchaseMaterial"> 38 <select id="queryMaterialByGoodCode" resultType="com.skua.modules.erp.entity.PurchaseMaterial">
39 select ss.sparepart_code,ss.sparepart_name, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name', aaa.* 39 select st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name', pm.*
40 from ( 40 from erp_purchase_material pm
41 select m.* from erp_purchase_material m , erp_purchase_contract pc where m.contract_id = pc.id 41 left join equipment_sparepart_type st on st.id = pm.sparepart_type
42 AND m.good_code = #{goodCode} 42 left join ajh_supplier_manage sm on sm.id = pm.supplier_id
43 AND pc.departs like CONCAT('%', #{departId}, '%') 43 where pm.good_code = #{goodCode} and pm.depart_id = #{departId}
44 limit 1
45 ) aaa
46 left join equipment_sparepart_supplies ss on aaa.sparepart_id = ss.id
47 left join equipment_sparepart_type st on st.id = aaa.sparepart_type
48 left join ajh_supplier_manage sm on sm.id = aaa.supplier_id
49
50 </select> 44 </select>
51 45
52 46
...@@ -56,23 +50,20 @@ ...@@ -56,23 +50,20 @@
56 where good_code = #{goodCode} 50 where good_code = #{goodCode}
57 <if test="id != null and id !=''">and id = #{id}</if> 51 <if test="id != null and id !=''">and id = #{id}</if>
58 </select> 52 </select>
59
60
61 <!-- 药剂入库查询结果:物料清单--> 53 <!-- 药剂入库查询结果:物料清单-->
62 <select id="queryPurchaseMaterialListByIn" resultType="com.skua.modules.erp.vo.PurchaseMaterialVO"> 54 <select id="queryPurchaseMaterialListByIn" resultType="com.skua.modules.erp.vo.PurchaseMaterialVO">
63 select st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name', aaa.* 55 select pc.id 'purchase_contract_id', pc.contract_code 'purchase_contract_code' , st.item_text as 'sparepart_type_name',
64 from ( 56 (select sum(mi.material_num) from erp_material_in mi where mi.audit_status = 3 and mi.good_code = aaa.good_code) 'storeNum',aaa.*
65 select pc.depart_id,pc.contract_code 'purchase_contract_code',pc.project_name ,dm.distribut_price ,dm.distribut_total_price,dm.material_num,pm.* 57 from (
66 from erp_purchase_material pm , erp_purchase_contract pc ,erp_distribut_material dm 58 select dc.contract_code 'distribut_contract_code', dc.id 'distribut_contract_id', dm.distribut_price ,dm.distribut_total_price,dm.material_num 'distribut_num',pm.*
67 where pm.contract_id =pc.id and pm.good_code = dm.good_code and pc.id = #{param.purchaseContractId} and dm.contract_id = #{param.distributContractId} 59 from erp_distribut_contract dc , erp_distribut_material dm , erp_purchase_material pm
68 <if test="param.sparepartCode != null and param.sparepartCode !=''"> and pc.departs like '%' #{param.departId}'%'</if> 60 where dc.id = dm.contract_id and dm.good_code = pm.good_code and pm.depart_id = #{param.departId}
69 <if test="param.sparepartCode != null and param.sparepartCode !=''"> and pm.sparepart_code =#{param.sparepartCode}</if> 61 <if test="param.sparepartCode != null and param.sparepartCode !=''">and pm.sparepart_code =#{param.sparepartCode}</if>
70 <if test="param.sparepartType != null and param.sparepartType !=''"> and pm.sparepart_type in (${param.sparepartType}) </if> 62 <if test="param.sparepartType != null and param.sparepartType !=''">and pm.sparepart_type in (${param.sparepartType}) </if>
71 <if test="param.sparepartName != null and param.sparepartName !=''"> and pm.sparepart_name like '%' #{param.sparepartName}'%'</if> 63 <if test="param.sparepartName != null and param.sparepartName !=''">and pm.sparepart_name like '%' #{param.sparepartName}'%'</if>
72 )aaa 64 )aaa
65 left join erp_purchase_contract pc on pc.id = aaa.contract_id
73 left join equipment_sparepart_type st on st.id = aaa.sparepart_type 66 left join equipment_sparepart_type st on st.id = aaa.sparepart_type
74 left join ajh_supplier_manage sm on sm.id = aaa.supplier_id
75
76 </select> 67 </select>
77 <!-- 根据id或code校验合同编号是否唯一--> 68 <!-- 根据id或code校验合同编号是否唯一-->
78 <select id="checkContractCode" resultType="java.lang.Integer"> 69 <select id="checkContractCode" resultType="java.lang.Integer">
......
...@@ -37,5 +37,5 @@ public interface IPurchaseMaterialService extends IService<PurchaseMaterial> { ...@@ -37,5 +37,5 @@ public interface IPurchaseMaterialService extends IService<PurchaseMaterial> {
37 * 药剂入库查询结果:采购物料清单+分销单价+分销总价 37 * 药剂入库查询结果:采购物料清单+分销单价+分销总价
38 * @return 38 * @return
39 */ 39 */
40 public IPage<PurchaseMaterialVO> queryPurchaseMaterialListByIn(Page<PurchaseMaterialVO> page, MaterialSearchVO materialSearchVO); 40 IPage<PurchaseMaterialVO> queryPurchaseMaterialListByIn(Page<PurchaseMaterialVO> page, MaterialSearchVO materialSearchVO);
41 } 41 }
......
1 package com.skua.modules.erp.vo; 1 package com.skua.modules.erp.vo;
2 2
3 import com.skua.core.aspect.annotation.Dict;
4 import io.swagger.annotations.ApiModel; 3 import io.swagger.annotations.ApiModel;
5 import io.swagger.annotations.ApiModelProperty; 4 import io.swagger.annotations.ApiModelProperty;
6 import lombok.Data; 5 import lombok.Data;
7 import lombok.EqualsAndHashCode; 6 import lombok.EqualsAndHashCode;
8 import lombok.experimental.Accessors; 7 import lombok.experimental.Accessors;
9 import org.jeecgframework.poi.excel.annotation.Excel;
10 8
11 /** 9 /**
12 * @auther kangwei 10 * @auther kangwei
......
...@@ -62,8 +62,6 @@ public class SafetyOffenceRecordController { ...@@ -62,8 +62,6 @@ public class SafetyOffenceRecordController {
62 @Autowired 62 @Autowired
63 private ISysUserService userService; 63 private ISysUserService userService;
64 64
65 @Autowired
66 private ISysUserDepartService sysUserDepartMapper;//用户部门关系表
67 /** 65 /**
68 * <pre> 66 * <pre>
69 * 分页列表查询 67 * 分页列表查询
...@@ -87,11 +85,15 @@ public class SafetyOffenceRecordController { ...@@ -87,11 +85,15 @@ public class SafetyOffenceRecordController {
87 85
88 QueryWrapper<SafetyOffenceRecord> queryWrapper = QueryGenerator.initQueryWrapper(safetyOffenceRecord, req.getParameterMap()); 86 QueryWrapper<SafetyOffenceRecord> queryWrapper = QueryGenerator.initQueryWrapper(safetyOffenceRecord, req.getParameterMap());
89 Page<SafetyOffenceRecord> page = new Page<SafetyOffenceRecord>(pageNo, pageSize); 87 Page<SafetyOffenceRecord> page = new Page<SafetyOffenceRecord>(pageNo, pageSize);
90 88 /*//上报人员
89 String userIds = queryUserIdsByName(safetyOffenceRecord.getReportUserName());
90 if(userIds.length() > 0){
91 queryWrapper.in("report_user",userIds);
92 }*/
91 //查询违章人员 ,否则查询创建人 93 //查询违章人员 ,否则查询创建人
92 if(safetyOffenceRecord.getOffenceUser() == null ){ 94 /*if(safetyOffenceRecord.getOffenceUser() == null ){
93 queryWrapper.eq("create_user_id", BaseContextHandler.getUserId() ); 95 queryWrapper.eq("create_user_id", BaseContextHandler.getUserId() );
94 } 96 }*/
95 IPage<SafetyOffenceRecord> pageList = safetyOffenceRecordService.page(page, queryWrapper); 97 IPage<SafetyOffenceRecord> pageList = safetyOffenceRecordService.page(page, queryWrapper);
96 result.setSuccess(true); 98 result.setSuccess(true);
97 result.setResult(pageList); 99 result.setResult(pageList);
...@@ -152,11 +154,36 @@ public class SafetyOffenceRecordController { ...@@ -152,11 +154,36 @@ public class SafetyOffenceRecordController {
152 if(safetyOffenceRecord.getStatus() == null ){ 154 if(safetyOffenceRecord.getStatus() == null ){
153 queryWrapper.ge("status","1");// 状态 >=1 155 queryWrapper.ge("status","1");// 状态 >=1
154 } 156 }
157 //上报人员
158 /* String userIds = queryUserIdsByName(safetyOffenceRecord.getReportUserName());
159 if(userIds.length() > 0){
160 queryWrapper.in("report_user",userIds);
161 }*/
155 IPage<SafetyOffenceRecord> pageList = safetyOffenceRecordService.page(page, queryWrapper); 162 IPage<SafetyOffenceRecord> pageList = safetyOffenceRecordService.page(page, queryWrapper);
156 result.setSuccess(true); 163 result.setSuccess(true);
157 result.setResult(pageList); 164 result.setResult(pageList);
158 return result; 165 return result;
159 } 166 }
167 // 根据名称模糊查询,返回用户编号ids
168 /*
169 private String queryUserIdsByName(String reportUserName){
170 //上报人员
171 String userIds = "";
172 if(StringUtils.isNotEmpty(reportUserName)){
173 //String userIds = userService.queryUserIdsByName(safetyOffenceRecord.getReportUserName());
174 QueryWrapper<SysUser> userQueryWrapper = new QueryWrapper<SysUser>();
175 userQueryWrapper.like("realname",reportUserName);
176 List<SysUser> userInfoList = userService.list(userQueryWrapper);
177 if(userInfoList != null && !userInfoList.isEmpty()){
178 for(SysUser user :userInfoList ){
179 if(userIds.length() > 0 ) userIds +=",";
180 userIds +="'"+user.getId()+"'";
181 }
182 }
183 }
184 return userIds;
185 }
186 */
160 187
161 @AutoLog(value = "违章记录-统计数量") 188 @AutoLog(value = "违章记录-统计数量")
162 @ApiOperation(value="违章记录-统计数量", notes="违章记录-统计数量") 189 @ApiOperation(value="违章记录-统计数量", notes="违章记录-统计数量")
...@@ -165,8 +192,8 @@ public class SafetyOffenceRecordController { ...@@ -165,8 +192,8 @@ public class SafetyOffenceRecordController {
165 Result<SafetyOffenceRecordStatisticsVO> result = new Result<SafetyOffenceRecordStatisticsVO>(); 192 Result<SafetyOffenceRecordStatisticsVO> result = new Result<SafetyOffenceRecordStatisticsVO>();
166 try { 193 try {
167 SafetyOffenceRecordStatisticsVO safetyOffenceRecordStatisticsVO = null; 194 SafetyOffenceRecordStatisticsVO safetyOffenceRecordStatisticsVO = null;
168 String reportType = null; 195 String reportType = "3";//数据过滤
169 String departIds = null; 196 String departIds = BaseContextHandler.getDeparts();//数据过滤
170 197
171 if (!"1".equals(BaseContextHandler.get("userType"))) { 198 if (!"1".equals(BaseContextHandler.get("userType"))) {
172 String role_ah_id = sysConfigService.queryValueByKey("ROLE_AH_ADMIN");//安环管理员角色编号 199 String role_ah_id = sysConfigService.queryValueByKey("ROLE_AH_ADMIN");//安环管理员角色编号
...@@ -175,11 +202,14 @@ public class SafetyOffenceRecordController { ...@@ -175,11 +202,14 @@ public class SafetyOffenceRecordController {
175 //安装部长角色看集团类型的违法上报 202 //安装部长角色看集团类型的违法上报
176 if( userRoleIds != null && userRoleIds.contains( role_ah_id ) ){//判断安环管理员 203 if( userRoleIds != null && userRoleIds.contains( role_ah_id ) ){//判断安环管理员
177 reportType ="1"; 204 reportType ="1";
205 departIds = null;
178 } 206 }
179 if( userRoleIds != null && userRoleIds.contains( role_cz_id ) ){//判断 厂长 207 if( userRoleIds != null && userRoleIds.contains( role_cz_id ) ){//判断 厂长
180 reportType = "2"; 208 reportType = "2";
181 departIds = BaseContextHandler.getDeparts();
182 } 209 }
210 }else{
211 reportType = null;
212 departIds= null;
183 } 213 }
184 safetyOffenceRecordStatisticsVO = safetyOffenceRecordService.statistics(reportType,departIds); 214 safetyOffenceRecordStatisticsVO = safetyOffenceRecordService.statistics(reportType,departIds);
185 result.setResult( safetyOffenceRecordStatisticsVO ); 215 result.setResult( safetyOffenceRecordStatisticsVO );
...@@ -205,6 +235,7 @@ public class SafetyOffenceRecordController { ...@@ -205,6 +235,7 @@ public class SafetyOffenceRecordController {
205 public Result<SafetyOffenceRecord> add(@RequestBody SafetyOffenceRecord safetyOffenceRecord) { 235 public Result<SafetyOffenceRecord> add(@RequestBody SafetyOffenceRecord safetyOffenceRecord) {
206 Result<SafetyOffenceRecord> result = new Result<SafetyOffenceRecord>(); 236 Result<SafetyOffenceRecord> result = new Result<SafetyOffenceRecord>();
207 try { 237 try {
238 safetyOffenceRecord.setReportUserName("匿名");
208 safetyOffenceRecord.setCreateUserId(BaseContextHandler.getUserId());//创建人编号 239 safetyOffenceRecord.setCreateUserId(BaseContextHandler.getUserId());//创建人编号
209 if(StringUtils.isNotEmpty(safetyOffenceRecord.getReportUser() )){ 240 if(StringUtils.isNotEmpty(safetyOffenceRecord.getReportUser() )){
210 SysUser sysUser = userService.getById(safetyOffenceRecord.getReportUser()); 241 SysUser sysUser = userService.getById(safetyOffenceRecord.getReportUser());
......
...@@ -56,7 +56,7 @@ public class SafetyOffenceRecord { ...@@ -56,7 +56,7 @@ public class SafetyOffenceRecord {
56 private String reportUser; 56 private String reportUser;
57 57
58 @ApiModelProperty(value = "上报人名称") 58 @ApiModelProperty(value = "上报人名称")
59 private String reportUserName ="匿名" ; 59 private String reportUserName ;
60 /**上报时间*/ 60 /**上报时间*/
61 @Excel(name = "上报时间", width = 15) 61 @Excel(name = "上报时间", width = 15)
62 @ApiModelProperty(value = "上报时间") 62 @ApiModelProperty(value = "上报时间")
......
...@@ -111,8 +111,6 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData ...@@ -111,8 +111,6 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData
111 @Param(value="start") String start, @Param(value="end") String end, 111 @Param(value="start") String start, @Param(value="end") String end,
112 @Param(value="departIds") String departIds, @Param(value="dayCount") int dayCount); 112 @Param(value="departIds") String departIds, @Param(value="dayCount") int dayCount);
113 113
114 String getChildDepartId(@Param(value="departId") String departId);
115
116 List<JnhbReportDetailsDy> getDyList(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3, 114 List<JnhbReportDetailsDy> getDyList(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3,
117 @Param(value="departId") String departId, @Param(value="year") String year); 115 @Param(value="departId") String departId, @Param(value="year") String year);
118 116
......
...@@ -329,26 +329,7 @@ ...@@ -329,26 +329,7 @@
329 ORDER BY 329 ORDER BY
330 d.depart_order 330 d.depart_order
331 </select> 331 </select>
332 <select id="getChildDepartId" resultType="java.lang.String"> 332
333 SELECT
334 GROUP_CONCAT( id SEPARATOR ',' ) AS depart_ids
335 FROM
336 sys_depart
337 WHERE
338 parent_id IN
339 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
340 '${item}'
341 </foreach>
342 OR id IN
343 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
344 '${item}'
345 </foreach>
346 OR parent_id IN ( SELECT id FROM sys_depart WHERE parent_id IN
347 <foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
348 '${item}'
349 </foreach>
350 )
351 </select>
352 <select id="getDyList" resultType="com.skua.modules.report.vo.JnhbReportDetailsDy"> 333 <select id="getDyList" resultType="com.skua.modules.report.vo.JnhbReportDetailsDy">
353 SELECT 334 SELECT
354 RIGHT(LEFT( v.time, 7 ),2) AS time, 335 RIGHT(LEFT( v.time, 7 ),2) AS time,
......
...@@ -4,6 +4,7 @@ import com.skua.common.constant.ReportConstant; ...@@ -4,6 +4,7 @@ import com.skua.common.constant.ReportConstant;
4 import com.skua.common.report.ReportViewUtil; 4 import com.skua.common.report.ReportViewUtil;
5 import com.skua.core.context.SpringContextUtils; 5 import com.skua.core.context.SpringContextUtils;
6 import com.skua.core.util.ConvertUtils; 6 import com.skua.core.util.ConvertUtils;
7 import com.skua.modules.common.mapper.CommonSqlMapper;
7 import com.skua.modules.common.vo.DateVO; 8 import com.skua.modules.common.vo.DateVO;
8 import com.skua.modules.custom.entity.FCustomReportDataset; 9 import com.skua.modules.custom.entity.FCustomReportDataset;
9 import com.skua.modules.custom.mapper.FCustomReportDatasetMapper; 10 import com.skua.modules.custom.mapper.FCustomReportDatasetMapper;
...@@ -26,6 +27,8 @@ import org.springframework.jdbc.core.JdbcTemplate; ...@@ -26,6 +27,8 @@ import org.springframework.jdbc.core.JdbcTemplate;
26 import org.springframework.stereotype.Service; 27 import org.springframework.stereotype.Service;
27 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 28 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
28 29
30 import javax.annotation.Resource;
31
29 /** 32 /**
30 * 数据集管理 33 * 数据集管理
31 */ 34 */
...@@ -34,6 +37,8 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa ...@@ -34,6 +37,8 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
34 37
35 @Autowired 38 @Autowired
36 private FCustomReportDatasetMapper mapper; 39 private FCustomReportDatasetMapper mapper;
40 @Resource
41 private CommonSqlMapper commonSqlMapper;
37 /* (non-Javadoc) 42 /* (non-Javadoc)
38 * @see com.skua.modules.custom.service.IFCustomReportDatasetService#getFillReportList() 43 * @see com.skua.modules.custom.service.IFCustomReportDatasetService#getFillReportList()
39 */ 44 */
...@@ -221,7 +226,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa ...@@ -221,7 +226,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
221 String start = month.substring(0,4)+"-01-01"; 226 String start = month.substring(0,4)+"-01-01";
222 String end = month + "-31"; 227 String end = month + "-31";
223 int dayCount = (int)DateUtils.differenceDay(start,end); 228 int dayCount = (int)DateUtils.differenceDay(start,end);
224 String departIds = mapper.getChildDepartId(departId); 229 String departIds = commonSqlMapper.getChildDepartId(departId);
225 String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL,JSZL,CSZL,JSCOD,CSCOD,JSAD,CSAD,JSZD,CSTN", departIds, start, end); 230 String dataViewName2 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL,JSZL,CSZL,JSCOD,CSCOD,JSAD,CSAD,JSZD,CSTN", departIds, start, end);
226 String dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, start, end); 231 String dataViewName3 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, start, end);
227 List<JnhbReportData> list = mapper.getJnhbReport(dataViewName2, dataViewName3, start, end, departIds, dayCount); 232 List<JnhbReportData> list = mapper.getJnhbReport(dataViewName2, dataViewName3, start, end, departIds, dayCount);
...@@ -375,7 +380,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa ...@@ -375,7 +380,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
375 //头部统计数据 380 //头部统计数据
376 String dataViewName2 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL,JSZL,CSZL,JSCOD,CSCOD,JSAD,CSAD,JSZD,CSTN", departIds, startTime, endTime); 381 String dataViewName2 = ReportViewUtil.buildViewLike(ReportConstant.view2119,"CSL,JSZL,CSZL,JSCOD,CSCOD,JSAD,CSAD,JSZD,CSTN", departIds, startTime, endTime);
377 String dataViewName3 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,"DLHJ,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, startTime, endTime); 382 String dataViewName3 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,"DLHJ,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, startTime, endTime);
378 System.out.println("dataViewName3 = "+dataViewName3); 383 //System.out.println("dataViewName3 = "+dataViewName3);
379 if(StringUtils.isNotEmpty(departIds)){ 384 if(StringUtils.isNotEmpty(departIds)){
380 departIds = JSUtils.quoteEach(departIds,","); 385 departIds = JSUtils.quoteEach(departIds,",");
381 } 386 }
...@@ -392,7 +397,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa ...@@ -392,7 +397,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
392 sql += " and d.id in ("+departIds+")"; 397 sql += " and d.id in ("+departIds+")";
393 } 398 }
394 sql += ") ddd"; 399 sql += ") ddd";
395 System.out.println("sql = "+sql); 400 //System.out.println("sql = "+sql);
396 List<JnhbReportData> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<JnhbReportData>(JnhbReportData.class)); 401 List<JnhbReportData> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<JnhbReportData>(JnhbReportData.class));
397 if( dataList != null && !dataList.isEmpty()){ 402 if( dataList != null && !dataList.isEmpty()){
398 return dataList.get(0); 403 return dataList.get(0);
......
...@@ -11,8 +11,11 @@ import java.util.stream.Collectors; ...@@ -11,8 +11,11 @@ import java.util.stream.Collectors;
11 import javax.servlet.http.HttpServletRequest; 11 import javax.servlet.http.HttpServletRequest;
12 import javax.servlet.http.HttpServletResponse; 12 import javax.servlet.http.HttpServletResponse;
13 13
14 import com.skua.core.context.BaseContextHandler;
14 import com.skua.core.util.ConvertUtils; 15 import com.skua.core.util.ConvertUtils;
16 import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO;
15 import com.skua.tool.dfs.MapDFS; 17 import com.skua.tool.dfs.MapDFS;
18 import com.skua.tool.util.JSUtils;
16 import org.apache.commons.lang.StringUtils; 19 import org.apache.commons.lang.StringUtils;
17 import org.jeecgframework.poi.excel.ExcelImportUtil; 20 import org.jeecgframework.poi.excel.ExcelImportUtil;
18 import org.jeecgframework.poi.excel.def.NormalExcelConstants; 21 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
...@@ -97,8 +100,6 @@ public class EquipmentSparepartController { ...@@ -97,8 +100,6 @@ public class EquipmentSparepartController {
97 @Autowired 100 @Autowired
98 private CustomRedisUtil customRedisUtil; 101 private CustomRedisUtil customRedisUtil;
99 @Autowired 102 @Autowired
100 private Key2ValueService key2ValueService;
101 @Autowired
102 private IEquipmentInService equipmentInService; 103 private IEquipmentInService equipmentInService;
103 @Autowired 104 @Autowired
104 private IEquipmentInChildService equipmentInChildService; 105 private IEquipmentInChildService equipmentInChildService;
...@@ -218,14 +219,15 @@ public class EquipmentSparepartController { ...@@ -218,14 +219,15 @@ public class EquipmentSparepartController {
218 @AutoLog(value = "备品备件表-分页列表查询") 219 @AutoLog(value = "备品备件表-分页列表查询")
219 @ApiOperation(value = "备品备件表-分页列表查询", notes = "备品备件表-分页列表查询") 220 @ApiOperation(value = "备品备件表-分页列表查询", notes = "备品备件表-分页列表查询")
220 @GetMapping(value = "/list") 221 @GetMapping(value = "/list")
221 public Result<IPage<EquipmentSparepartVO>> queryPageList(EquipmentSparepartDTO equipmentSparepartDTO, 222 public Result<IPage<EquipmentSparepartVO>> queryPageList(EquipmentSparepartSearchVO sparepartSearchVO,
222 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, 223 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
223 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) throws Exception { 224 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
225 HttpServletRequest req) throws Exception {
224 Result<IPage<EquipmentSparepartVO>> result = new Result<>(); 226 Result<IPage<EquipmentSparepartVO>> result = new Result<>();
225 Page page = new Page(pageNo, pageSize); 227 // Page page = new Page(pageNo, pageSize);
226 Set<String> sparepartTypeSet = new HashSet<>(); 228 Set<String> sparepartTypeSet = new HashSet<>();
227 if (org.apache.commons.lang3.StringUtils.isNotEmpty(equipmentSparepartDTO.getSparepartType())) { 229 if (org.apache.commons.lang3.StringUtils.isNotEmpty(sparepartSearchVO.getSparepartType())) {
228 String typeId = equipmentSparepartDTO.getSparepartType(); 230 String typeId = sparepartSearchVO.getSparepartType();
229 // 查询子集 231 // 查询子集
230 MapDFS mapDFS = new MapDFS(); 232 MapDFS mapDFS = new MapDFS();
231 List<Map<String, Object>> tree = mapDFS.buildTree(equipmentSparepartTypeService.listMaps(new QueryWrapper<EquipmentSparepartType>().select("id, parent_id as parentId"))); 233 List<Map<String, Object>> tree = mapDFS.buildTree(equipmentSparepartTypeService.listMaps(new QueryWrapper<EquipmentSparepartType>().select("id, parent_id as parentId")));
...@@ -240,7 +242,24 @@ public class EquipmentSparepartController { ...@@ -240,7 +242,24 @@ public class EquipmentSparepartController {
240 } 242 }
241 } 243 }
242 } 244 }
243 IPage<Map<String, Object>> mapPage = BaseFactory.JOIN() 245 //部门子集
246 //后续补充
247
248 Page<EquipmentSparepartVO> page = new Page<EquipmentSparepartVO>(pageNo, pageSize);
249 //权限部门
250 if(StringUtils.isNotEmpty(sparepartSearchVO.getDepartId())){
251 String departIds = iCommonSqlService.getChildDepartId(sparepartSearchVO.getDepartId() ) ;
252 sparepartSearchVO.setDepartIds(departIds ) ;
253 }else{
254 sparepartSearchVO.setDepartIds( JSUtils.quoteEach(BaseContextHandler.getDeparts() ,",")) ;//非管理员,获取权限部门集合
255 }
256 IPage<EquipmentSparepartVO> pageList = equipmentSparepartService.queryByPage(page,sparepartSearchVO);
257
258 result.setSuccess(true);
259 result.setResult(pageList);
260 return result;
261
262 /* IPage<Map<String, Object>> mapPage = BaseFactory.JOIN()
244 .select(EquipmentSparepartSupplies.class) 263 .select(EquipmentSparepartSupplies.class)
245 .select(SuppliesWarehouse.class) 264 .select(SuppliesWarehouse.class)
246 .select("equipment_sparepart.depart_id,equipment_sparepart.id,equipment_sparepart.storage_num storageNum,equipment_sparepart.supplies_warehouse_id suppliesWarehouseId,equipment_sparepart_supplies.id suppliesId") 265 .select("equipment_sparepart.depart_id,equipment_sparepart.id,equipment_sparepart.storage_num storageNum,equipment_sparepart.supplies_warehouse_id suppliesWarehouseId,equipment_sparepart_supplies.id suppliesId")
...@@ -295,11 +314,13 @@ public class EquipmentSparepartController { ...@@ -295,11 +314,13 @@ public class EquipmentSparepartController {
295 } 314 }
296 return srcFieldVal; 315 return srcFieldVal;
297 }); 316 });
298 page.setTotal(mapPage.getTotal()); 317 page.setTotal(mapPage.getTotal());
299 page.setRecords(convertMapList); 318 page.setRecords(convertMapList);
300 result.setSuccess(true); 319 result.setSuccess(true);
301 result.setResult(page); 320 result.setResult(page);
302 return result; 321 return result;
322 */
323
303 } 324 }
304 325
305 /** 326 /**
......
...@@ -64,7 +64,8 @@ public class EquipmentSparepart { ...@@ -64,7 +64,8 @@ public class EquipmentSparepart {
64 */ 64 */
65 @Excel(name = "备件类型", width = 15) 65 @Excel(name = "备件类型", width = 15)
66 @ApiModelProperty(value = "备件类型") 66 @ApiModelProperty(value = "备件类型")
67 @BeanAnno(targetFieldName = "sparepartType_dictText") 67 //@BeanAnno(targetFieldName = "sparepartType_dictText")
68 @Dict(dictTable = "equipment_sparepart_Type",dicCode = "id",dicText = "item_text")
68 @JoinSqlQueryAnno(joinSqlQueryEnum = JoinSqlQueryEnum.EQ) 69 @JoinSqlQueryAnno(joinSqlQueryEnum = JoinSqlQueryEnum.EQ)
69 private String sparepartType; 70 private String sparepartType;
70 /** 71 /**
...@@ -91,6 +92,7 @@ public class EquipmentSparepart { ...@@ -91,6 +92,7 @@ public class EquipmentSparepart {
91 */ 92 */
92 @Excel(name = "生产厂商", width = 15) 93 @Excel(name = "生产厂商", width = 15)
93 @ApiModelProperty(value = "生产厂商") 94 @ApiModelProperty(value = "生产厂商")
95 @Dict(dictTable = "equipment_brand",dicCode = "id",dicText = "brand_company")
94 private String manufacturer; 96 private String manufacturer;
95 /** 97 /**
96 * 计量单位 98 * 计量单位
......
...@@ -3,7 +3,10 @@ package com.skua.modules.equipment.mapper; ...@@ -3,7 +3,10 @@ package com.skua.modules.equipment.mapper;
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.baomidou.mybatisplus.core.metadata.IPage; 4 import com.baomidou.mybatisplus.core.metadata.IPage;
5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 import com.skua.modules.equipment.dto.EquipmentSparepartDTO;
6 import com.skua.modules.equipment.entity.EquipmentSparepart; 7 import com.skua.modules.equipment.entity.EquipmentSparepart;
8 import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO;
9 import com.skua.modules.equipment.vo.EquipmentSparepartVO;
7 import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; 10 import com.skua.modules.supplies.entity.EquipmentSparepartSupplies;
8 import org.apache.ibatis.annotations.Param; 11 import org.apache.ibatis.annotations.Param;
9 12
...@@ -14,5 +17,6 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> ...@@ -14,5 +17,6 @@ public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart>
14 17
15 Integer updateStorageNumById(@Param("id") String id, @Param("storageNum") Double storageNum, @Param("version") Integer version); 18 Integer updateStorageNumById(@Param("id") String id, @Param("storageNum") Double storageNum, @Param("version") Integer version);
16 19
17 20 //分页检索
21 IPage<EquipmentSparepartVO> queryByPage(@Param("page")Page<EquipmentSparepartVO> page, @Param("param") EquipmentSparepartSearchVO sparepartSearchVO);
18 } 22 }
......
...@@ -6,4 +6,17 @@ ...@@ -6,4 +6,17 @@
6 update equipment_sparepart set storage_num = #{storageNum}, version = #{version} + 1 where id = #{id} and version = #{version} 6 update equipment_sparepart set storage_num = #{storageNum}, version = #{version} + 1 where id = #{id} and version = #{version}
7 </update> 7 </update>
8 8
9 </mapper>
...\ No newline at end of file ...\ No newline at end of file
9 <select id="queryByPage" resultType="com.skua.modules.equipment.vo.EquipmentSparepartVO" >
10 select d.depart_name as 'departIdName', sw.depart_id,sw.warehouse_code ,sw.warehouse_name ,sw.warehouse_address ,sw.principal ,es.*
11 from equipment_sparepart es , supplies_Warehouse sw
12 left join sys_depart d on sw.depart_id = d.id
13 where es.supplies_warehouse_id = sw.id and sw.depart_id in (${param.+departIds})
14
15 order by inventory_update_time desc
16 </select>
17 <!-- <if test="param.sparepartCode != null and param.sparepartCode !=''">and es.sparepart_code =#{param.sparepartCode}</if>
18 <if test="param.sparepartType != null and param.sparepartType !=''">and es.sparepart_type in (${param.sparepartType}) </if>
19 <if test="param.sparepartName != null and param.sparepartName !=''">and pm.sparepart_name like '%' #{param.sparepartName}'%'</if>
20 suppliesWarehouseId-->
21
22 </mapper>
......
...@@ -3,7 +3,10 @@ package com.skua.modules.equipment.service; ...@@ -3,7 +3,10 @@ package com.skua.modules.equipment.service;
3 import com.baomidou.mybatisplus.core.metadata.IPage; 3 import com.baomidou.mybatisplus.core.metadata.IPage;
4 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 4 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 import com.baomidou.mybatisplus.extension.service.IService; 5 import com.baomidou.mybatisplus.extension.service.IService;
6 import com.skua.modules.equipment.dto.EquipmentSparepartDTO;
6 import com.skua.modules.equipment.entity.EquipmentSparepart; 7 import com.skua.modules.equipment.entity.EquipmentSparepart;
8 import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO;
9 import com.skua.modules.equipment.vo.EquipmentSparepartVO;
7 import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; 10 import com.skua.modules.supplies.entity.EquipmentSparepartSupplies;
8 11
9 /** 12 /**
...@@ -13,5 +16,6 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart> ...@@ -13,5 +16,6 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart>
13 16
14 Integer updateStorageNumById(String id, Double storageNum, Integer version); 17 Integer updateStorageNumById(String id, Double storageNum, Integer version);
15 18
19 IPage<EquipmentSparepartVO> queryByPage(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO);
16 20
17 } 21 }
......
...@@ -3,9 +3,12 @@ package com.skua.modules.equipment.service.impl; ...@@ -3,9 +3,12 @@ package com.skua.modules.equipment.service.impl;
3 import com.baomidou.mybatisplus.core.metadata.IPage; 3 import com.baomidou.mybatisplus.core.metadata.IPage;
4 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 4 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 5 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6 import com.skua.modules.equipment.dto.EquipmentSparepartDTO;
6 import com.skua.modules.equipment.entity.EquipmentSparepart; 7 import com.skua.modules.equipment.entity.EquipmentSparepart;
7 import com.skua.modules.equipment.mapper.EquipmentSparepartMapper; 8 import com.skua.modules.equipment.mapper.EquipmentSparepartMapper;
8 import com.skua.modules.equipment.service.IEquipmentSparepartService; 9 import com.skua.modules.equipment.service.IEquipmentSparepartService;
10 import com.skua.modules.equipment.vo.EquipmentSparepartSearchVO;
11 import com.skua.modules.equipment.vo.EquipmentSparepartVO;
9 import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; 12 import com.skua.modules.supplies.entity.EquipmentSparepartSupplies;
10 import org.springframework.stereotype.Service; 13 import org.springframework.stereotype.Service;
11 14
...@@ -20,6 +23,13 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar ...@@ -20,6 +23,13 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar
20 return baseMapper.updateStorageNumById(id, storageNum, version); 23 return baseMapper.updateStorageNumById(id, storageNum, version);
21 } 24 }
22 25
23 26 /***
24 27 * 分页查询
28 * @param page
29 * @param equipmentSparepartDTO
30 * @return
31 */
32 public IPage<EquipmentSparepartVO> queryByPage(Page<EquipmentSparepartVO> page, EquipmentSparepartSearchVO sparepartSearchVO){
33 return baseMapper.queryByPage(page,sparepartSearchVO);
34 }
25 } 35 }
......
1 package com.skua.modules.equipment.vo;
2
3 import io.swagger.annotations.ApiModel;
4 import io.swagger.annotations.ApiModelProperty;
5 import lombok.Data;
6 import lombok.EqualsAndHashCode;
7 import lombok.experimental.Accessors;
8
9 @Data
10 @EqualsAndHashCode(callSuper = false)
11 @Accessors(chain = true)
12 @ApiModel(value=" EquipmentSparepart物料查询对象", description=" EquipmentSparepart物料查询对象")
13 public class EquipmentSparepartSearchVO {
14 /**厂站*/
15 @ApiModelProperty(value = "厂站")
16 private String departId;
17
18 @ApiModelProperty(value = "物料类别编号")
19 private String sparepartType;
20
21 @ApiModelProperty(value = "物料名称")
22 private String sparepartName;
23
24 @ApiModelProperty(value = "物料Code")
25 public String sparepartCode;
26
27 @ApiModelProperty(value = "权限下的部门编号集合")
28 private String departIds;
29
30 @ApiModelProperty(value = "物料属性")
31 private String sparepartAttribute;
32
33 @ApiModelProperty(value = "仓库编号")
34 private String suppliesWarehouseId;
35
36 @ApiModelProperty(value = "规格")
37 private String specification ;
38
39 @ApiModelProperty(value = "用途")
40 private String purpose;
41
42
43 @ApiModelProperty(value = "开始时间")
44 private String startTime;
45
46 @ApiModelProperty(value = "结束时间")
47 private String endTime;
48
49
50
51 }
1 package com.skua.modules.equipment.vo; 1 package com.skua.modules.equipment.vo;
2 2
3 import com.baomidou.mybatisplus.annotation.TableField;
4 import com.skua.core.aspect.annotation.Dict;
3 import com.skua.modules.equipment.entity.EquipmentSparepart; 5 import com.skua.modules.equipment.entity.EquipmentSparepart;
6 import io.swagger.annotations.ApiModelProperty;
4 import lombok.Data; 7 import lombok.Data;
8 import org.jeecgframework.poi.excel.annotation.Excel;
5 9
6 /** 10 /**
7 * @author sonin 11 * @author sonin
...@@ -18,4 +22,28 @@ public class EquipmentSparepartVO extends EquipmentSparepart { ...@@ -18,4 +22,28 @@ public class EquipmentSparepartVO extends EquipmentSparepart {
18 22
19 private String consumeNum; 23 private String consumeNum;
20 24
25 //20241111 kangwei新增扩展
26 @TableField(exist=false)
27 @ApiModelProperty(value = "仓库编号")
28 private String warehouseCode;
29 /**仓库名称*/
30 @TableField(exist=false)
31 @ApiModelProperty(value = "仓库名称")
32 private String warehouseName;
33 /**仓库地址*/
34 @TableField(exist=false)
35 @ApiModelProperty(value = "仓库地址")
36 private String warehouseAddress;
37 /**负责人*/
38 @ApiModelProperty(value = "负责人")
39 @TableField(exist=false)
40 @Dict(dictTable = "sys_user", dicCode="id", dicText = "realname")
41 private String principal;
42
43 @TableField(exist=false)
44 private String departIdName;
45
46
47
48
21 } 49 }
......
...@@ -154,6 +154,7 @@ public class MybatisInterceptor implements Interceptor { ...@@ -154,6 +154,7 @@ public class MybatisInterceptor implements Interceptor {
154 || "com.skua.modules.system.datestandard.mapper.SysMonitorMetricInfoMapper.selectList".equals(sqlId) //点表 154 || "com.skua.modules.system.datestandard.mapper.SysMonitorMetricInfoMapper.selectList".equals(sqlId) //点表
155 || "com.skua.modules.equipment.mapper.EquipmentSparepartMapper.selectOne".equals(sqlId) 155 || "com.skua.modules.equipment.mapper.EquipmentSparepartMapper.selectOne".equals(sqlId)
156 || "com.skua.modules.supplies.mapper.EquipmentSparepartSuppliesMapper.selectById".equals(sqlId) 156 || "com.skua.modules.supplies.mapper.EquipmentSparepartSuppliesMapper.selectById".equals(sqlId)
157 || "com.skua.modules.equipment.mapper.EquipmentSparepartMapper.queryByPage".equals(sqlId)//库存查询
157 ) { 158 ) {
158 log.debug("************************------sqlId------**************************" + sqlId); 159 log.debug("************************------sqlId------**************************" + sqlId);
159 return invocation.proceed(); 160 return invocation.proceed();
......
...@@ -32,35 +32,35 @@ public interface ISysUserService extends IService<SysUser> { ...@@ -32,35 +32,35 @@ public interface ISysUserService extends IService<SysUser> {
32 * @param user 32 * @param user
33 * @param roles 33 * @param roles
34 */ 34 */
35 public void editUserWithRole(SysUser user,String roles); 35 void editUserWithRole(SysUser user,String roles);
36 36
37 /** 37 /**
38 * 获取用户的授权角色 38 * 获取用户的授权角色
39 * @param username 39 * @param username
40 * @return 40 * @return
41 */ 41 */
42 public List<String> getRole(String username); 42 List<String> getRole(String username);
43 43
44 /** 44 /**
45 * 查询用户信息包括 部门信息 45 * 查询用户信息包括 部门信息
46 * @param username 46 * @param username
47 * @return 47 * @return
48 */ 48 */
49 public SysUserCacheInfo getCacheUser(String username); 49 SysUserCacheInfo getCacheUser(String username);
50 50
51 /** 51 /**
52 * 根据部门Id查询 52 * 根据部门Id查询
53 * @param 53 * @param
54 * @return 54 * @return
55 */ 55 */
56 public IPage<SysUser> getUserByDepId(Page<SysUser> page, String departId, String username); 56 IPage<SysUser> getUserByDepId(Page<SysUser> page, String departId, String username);
57 57
58 /** 58 /**
59 * 根据角色Id查询 59 * 根据角色Id查询
60 * @param 60 * @param
61 * @return 61 * @return
62 */ 62 */
63 public IPage<SysUser> getUserByRoleId(Page<SysUser> page,String roleId, String username); 63 IPage<SysUser> getUserByRoleId(Page<SysUser> page,String roleId, String username);
64 64
65 /** 65 /**
66 * 通过用户名获取用户角色集合 66 * 通过用户名获取用户角色集合
...@@ -88,7 +88,7 @@ public interface ISysUserService extends IService<SysUser> { ...@@ -88,7 +88,7 @@ public interface ISysUserService extends IService<SysUser> {
88 /** 88 /**
89 * 根据手机号获取用户名和密码 89 * 根据手机号获取用户名和密码
90 */ 90 */
91 public SysUser getUserByPhone(String phone); 91 SysUser getUserByPhone(String phone);
92 92
93 93
94 /** 94 /**
...@@ -152,5 +152,5 @@ public interface ISysUserService extends IService<SysUser> { ...@@ -152,5 +152,5 @@ public interface ISysUserService extends IService<SysUser> {
152 * @param userIds 152 * @param userIds
153 * @return 153 * @return
154 */ 154 */
155 public String getUserNameByUserIds(String userIds); 155 String getUserNameByUserIds(String userIds);
156 } 156 }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!