Commit 9751ebd7bc55a0cf67612bc9f8d237a14e26efe9
1 parent
32c718c5
bf
Showing
6 changed files
with
51 additions
and
5 deletions
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineController.java
| @@ -24,6 +24,7 @@ import java.io.File; | @@ -24,6 +24,7 @@ import java.io.File; | ||
| 24 | import java.lang.reflect.Field; | 24 | import java.lang.reflect.Field; |
| 25 | import java.lang.reflect.Method; | 25 | import java.lang.reflect.Method; |
| 26 | import java.util.*; | 26 | import java.util.*; |
| 27 | +import java.util.stream.Collectors; | ||
| 27 | 28 | ||
| 28 | /** | 29 | /** |
| 29 | * 【请填写功能名称】Controller | 30 | * 【请填写功能名称】Controller |
| @@ -94,6 +95,14 @@ public class BsthTLineController extends BaseController | @@ -94,6 +95,14 @@ public class BsthTLineController extends BaseController | ||
| 94 | public AjaxResult export(BsthTLine bsthTLine) throws NoSuchFieldException { | 95 | public AjaxResult export(BsthTLine bsthTLine) throws NoSuchFieldException { |
| 95 | 96 | ||
| 96 | List<BsthTLine> list = bsthTLineService.selectBsthTLineList(bsthTLine); | 97 | List<BsthTLine> list = bsthTLineService.selectBsthTLineList(bsthTLine); |
| 98 | + List<BsthTLine> lines = bsthTLineService.usedBsthTLineReport(bsthTLine); | ||
| 99 | + Map<String,List<BsthTLine>>map=lines.stream().collect(Collectors.groupingBy(BsthTLine::getLineName)); | ||
| 100 | + for (int i = 0; i < list.size(); i++) { | ||
| 101 | + BsthTLine tLine=list.get(i); | ||
| 102 | + if(map.get(tLine.getLineName())!=null){ | ||
| 103 | + list.set(i, map.get(tLine.getLineName()).get(0)); | ||
| 104 | + } | ||
| 105 | + } | ||
| 97 | 106 | ||
| 98 | List<DictData> dicts = dictDataService.selectDictDataList(null); | 107 | List<DictData> dicts = dictDataService.selectDictDataList(null); |
| 99 | 108 | ||
| @@ -287,8 +296,15 @@ public class BsthTLineController extends BaseController | @@ -287,8 +296,15 @@ public class BsthTLineController extends BaseController | ||
| 287 | 296 | ||
| 288 | 297 | ||
| 289 | /* | 298 | /* |
| 290 | - | ||
| 291 | - | 299 | + //查询history整表 |
| 300 | + //按lineName分组 | ||
| 301 | + //createTime倒序 | ||
| 302 | + //循环 如果createTime在所选时间内 | ||
| 303 | + //相邻2条数据进行比较 | ||
| 304 | + //new Bl 吧有差异的数据记录进去 | ||
| 305 | + //放入一个list中 | ||
| 306 | + //按公司和分公司分组 | ||
| 307 | + 循环list统计那些字段有修改进行记录 | ||
| 292 | 308 | ||
| 293 | *//** | 309 | *//** |
| 294 | * 新增弹窗 | 310 | * 新增弹窗 |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/mapper/BsthTLineMapper.java
| @@ -78,5 +78,5 @@ public interface BsthTLineMapper | @@ -78,5 +78,5 @@ public interface BsthTLineMapper | ||
| 78 | List<BsthTLine> selectBsthTLineListAndExamine(BsthTLine bsthTLine); | 78 | List<BsthTLine> selectBsthTLineListAndExamine(BsthTLine bsthTLine); |
| 79 | 79 | ||
| 80 | 80 | ||
| 81 | - | 81 | + List<BsthTLine> usedBsthTLineReport(BsthTLine bsthTLine); |
| 82 | } | 82 | } |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/service/IBsthTLineService.java
| @@ -67,5 +67,9 @@ public interface IBsthTLineService | @@ -67,5 +67,9 @@ public interface IBsthTLineService | ||
| 67 | boolean lineNameIsExistInBsthTLine(String lineName); | 67 | boolean lineNameIsExistInBsthTLine(String lineName); |
| 68 | 68 | ||
| 69 | List<BsthTLine> selectBsthTLineListAndExamine(BsthTLine bsthTLine); | 69 | List<BsthTLine> selectBsthTLineListAndExamine(BsthTLine bsthTLine); |
| 70 | + | ||
| 71 | + | ||
| 72 | + List<BsthTLine> usedBsthTLineReport(BsthTLine bsthTLine); | ||
| 73 | + | ||
| 70 | /*int createLineMonthReport();*/ | 74 | /*int createLineMonthReport();*/ |
| 71 | } | 75 | } |
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/service/impl/BsthTLineServiceImpl.java
| @@ -471,4 +471,10 @@ public class BsthTLineServiceImpl implements IBsthTLineService | @@ -471,4 +471,10 @@ public class BsthTLineServiceImpl implements IBsthTLineService | ||
| 471 | return bsthTLineMapper.selectBsthTLineListAndExamine(bsthTLine); | 471 | return bsthTLineMapper.selectBsthTLineListAndExamine(bsthTLine); |
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | + | ||
| 475 | + @Override | ||
| 476 | + public List<BsthTLine> usedBsthTLineReport(BsthTLine bsthTLine){ | ||
| 477 | + return bsthTLineMapper.usedBsthTLineReport(bsthTLine); | ||
| 478 | + } | ||
| 479 | + | ||
| 474 | } | 480 | } |
bsthLineProfiles/src/main/resources/mybatis/mybatis/system/BsthTLineMapper.xml
| @@ -213,6 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -213,6 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 213 | <if test="personAvg != null "> and person_avg = #{personAvg}</if> | 213 | <if test="personAvg != null "> and person_avg = #{personAvg}</if> |
| 214 | <if test="startDate != null "> and start_date = #{startDate}</if> | 214 | <if test="startDate != null "> and start_date = #{startDate}</if> |
| 215 | <if test="nightParking != null and nightParking != ''"> and night_parking = #{nightParking}</if> | 215 | <if test="nightParking != null and nightParking != ''"> and night_parking = #{nightParking}</if> |
| 216 | + <if test="createTimeEnd != null and createTimeEnd != ''"> and create_time <= #{createTimeEnd}</if> | ||
| 216 | </where> | 217 | </where> |
| 217 | </select> | 218 | </select> |
| 218 | 219 | ||
| @@ -1717,4 +1718,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -1717,4 +1718,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 1717 | </select> | 1718 | </select> |
| 1718 | 1719 | ||
| 1719 | 1720 | ||
| 1721 | + <select id="usedBsthTLineReport" parameterType="BsthTLine" resultMap="BsthTLineResult"> | ||
| 1722 | + SELECT * from bsth_t_line_history | ||
| 1723 | + WHERE id IN(SELECT max(id) FROM `bsth_t_line_history` where update_status=-1 | ||
| 1724 | + <if test="createTimeEnd != null and createTimeEnd != ''"> and create_time <= #{createTimeEnd}</if> | ||
| 1725 | + GROUP BY line_name) | ||
| 1726 | + | ||
| 1727 | + </select> | ||
| 1728 | + | ||
| 1729 | + | ||
| 1720 | </mapper> | 1730 | </mapper> |
| 1721 | \ No newline at end of file | 1731 | \ No newline at end of file |
bsthLineProfiles/src/main/resources/templates/system/line/line.html
| @@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
| 4 | <head> | 4 | <head> |
| 5 | <th:block th:include="include :: header('线路档案信息')" /> | 5 | <th:block th:include="include :: header('线路档案信息')" /> |
| 6 | <th:block th:include="include :: select2-css" /> | 6 | <th:block th:include="include :: select2-css" /> |
| 7 | + <th:block th:include="include :: datetimepicker-css" /> | ||
| 7 | </head> | 8 | </head> |
| 8 | <body class="gray-bg"> | 9 | <body class="gray-bg"> |
| 9 | <div class="container-div" id="context"> | 10 | <div class="container-div" id="context"> |
| @@ -193,7 +194,9 @@ | @@ -193,7 +194,9 @@ | ||
| 193 | class="time-input" placeholder="请选择轨交时间" name="metroTime" /></li> | 194 | class="time-input" placeholder="请选择轨交时间" name="metroTime" /></li> |
| 194 | <li><label>冷僻补贴:</label> <input type="text" | 195 | <li><label>冷僻补贴:</label> <input type="text" |
| 195 | name="coldBonusType" /></li> | 196 | name="coldBonusType" /></li> |
| 196 | - | 197 | + <li><label>日期截点:</label> <input type="text" |
| 198 | + class="time-input" placeholder="日期截点" name="createTimeEnd" id="createTimeEnd"/> | ||
| 199 | + </li> | ||
| 197 | <li> | 200 | <li> |
| 198 | <el-button size="mini" type="primary" icon="el-icon-search" onClick="$.table.search();">搜索</el-button> | 201 | <el-button size="mini" type="primary" icon="el-icon-search" onClick="$.table.search();">搜索</el-button> |
| 199 | <el-button size="mini" icon="el-icon-refresh" onClick="$.form.reset();">重置</el-button> | 202 | <el-button size="mini" icon="el-icon-refresh" onClick="$.form.reset();">重置</el-button> |
| @@ -243,7 +246,7 @@ | @@ -243,7 +246,7 @@ | ||
| 243 | <!-- /.modal --> | 246 | <!-- /.modal --> |
| 244 | </div> | 247 | </div> |
| 245 | 248 | ||
| 246 | - | 249 | +<th:block th:include="include :: datetimepicker-js" /> |
| 247 | <script th:inline="javascript"> | 250 | <script th:inline="javascript"> |
| 248 | 251 | ||
| 249 | var companyList=[[${companyList}]]; | 252 | var companyList=[[${companyList}]]; |
| @@ -496,6 +499,7 @@ | @@ -496,6 +499,7 @@ | ||
| 496 | var search = $.table.queryParams(params); | 499 | var search = $.table.queryParams(params); |
| 497 | search.company=$('#company').select2('val'); | 500 | search.company=$('#company').select2('val'); |
| 498 | search.fCompany=$('#fCompany').select2('val'); | 501 | search.fCompany=$('#fCompany').select2('val'); |
| 502 | + search.createTimeEnd=$('#createTimeEnd').val()!=''?$('#createTimeEnd').val()+' 23:59:59':''; | ||
| 499 | return search; | 503 | return search; |
| 500 | } | 504 | } |
| 501 | var editFlag = [[${@permission.hasPermi('system:line:edit')}]]; | 505 | var editFlag = [[${@permission.hasPermi('system:line:edit')}]]; |
| @@ -830,6 +834,12 @@ | @@ -830,6 +834,12 @@ | ||
| 830 | } | 834 | } |
| 831 | return true; | 835 | return true; |
| 832 | } | 836 | } |
| 837 | + | ||
| 838 | + $("input[name='createTimeEnd']").datetimepicker({ | ||
| 839 | + format : "yyyy-mm-dd", | ||
| 840 | + minView : "month", | ||
| 841 | + autoclose : true | ||
| 842 | + }); | ||
| 833 | </script> | 843 | </script> |
| 834 | 844 | ||
| 835 | <style> | 845 | <style> |