Commit 8d1bc40a6924e67cadd9fb948594afe6870d8ff1

Authored by yiming
1 parent f188b8f4

线路档案整改内容

bsthLineProfiles/src/main/java/com/ruoyi/framework/config/ShiroConfig.java
... ... @@ -263,6 +263,9 @@ public class ShiroConfig
263 263 // filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll());
264 264 //线路全量数据接口
265 265 filterChainDefinitionMap.put("/system/line/getLineList", "anon,captchaValidate");
  266 + filterChainDefinitionMap.put("/system/line/map2", "anon,captchaValidate");
  267 + filterChainDefinitionMap.put("/system/line/getStation", "anon,captchaValidate");
  268 +
266 269 Map<String, Filter> filters = new LinkedHashMap<String, Filter>();
267 270 filters.put("onlineSession", onlineSessionFilter());
268 271 filters.put("syncOnlineSession", syncOnlineSessionFilter());
... ...
bsthLineProfiles/src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java
... ... @@ -111,4 +111,14 @@ public class BaseEntity implements Serializable
111 111 {
112 112 this.params = params;
113 113 }
  114 +
  115 + public String getParamsStringVal(String key)
  116 + {
  117 + if (params.get(key)==null){
  118 + return null;
  119 + }else {
  120 + String[] arr= (String[]) params.get(key);
  121 + return arr[0];
  122 + }
  123 + }
114 124 }
... ...
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineAddController.java
... ... @@ -9,9 +9,11 @@ import com.ruoyi.framework.web.domain.AjaxResult;
9 9 import com.ruoyi.framework.web.page.TableDataInfo;
10 10 import com.ruoyi.project.system.dict.domain.DictData;
11 11 import com.ruoyi.project.system.dict.service.IDictDataService;
  12 +import com.ruoyi.project.system.line.domain.BsthSite;
12 13 import com.ruoyi.project.system.line.domain.BsthTLine;
13 14 import com.ruoyi.project.system.line.domain.Company;
14 15 import com.ruoyi.project.system.line.service.IBsthTLineService;
  16 +import com.ruoyi.project.system.line.service.IBsthTSiteService;
15 17 import com.ruoyi.project.system.user.domain.User;
16 18 import com.ruoyi.project.system.user.service.IUserService;
17 19 import org.apache.shiro.authz.annotation.RequiresPermissions;
... ... @@ -49,6 +51,9 @@ public class BsthTLineAddController extends BaseController
49 51  
50 52 @Autowired
51 53 IDictDataService dictDataService;
  54 +
  55 + @Autowired
  56 + IBsthTSiteService iBsthTSiteService;
52 57  
53 58  
54 59 @Autowired
... ... @@ -86,7 +91,9 @@ public class BsthTLineAddController extends BaseController
86 91 {
87 92 ModelAndView mv=new ModelAndView(prefix + "/add");
88 93 List<Company> companyList=bsthTLineService.selectCompany(new Company());
  94 + List<BsthSite> siteList=iBsthTSiteService.selectBsthSite();
89 95 mv.addObject("companyList",companyList);
  96 + mv.addObject("siteList",siteList);
90 97 return mv;
91 98 }
92 99  
... ... @@ -132,8 +139,10 @@ public class BsthTLineAddController extends BaseController
132 139 {
133 140 BsthTLine bsthTLine = bsthTLineService.selectBsthTLineExamineById(id);
134 141 List<Company> companyList=bsthTLineService.selectCompany(new Company());
  142 + List<BsthSite> siteList=iBsthTSiteService.selectBsthSite();
135 143 mmap.put("companyList",companyList);
136 144 mmap.put("bsthTLine", bsthTLine);
  145 + mmap.put("siteList",siteList);
137 146 return prefix + "/edit";
138 147 }
139 148  
... ...
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineController.java
... ... @@ -159,9 +159,9 @@ public class BsthTLineController extends BaseController
159 159  
160 160  
161 161 if(dictMap.get(type) != null) {
162   - name = name.substring(0,1).toUpperCase() + name.substring(1);
163   -
164   -
  162 + if(name!="fCompany"){
  163 + name = name.substring(0,1).toUpperCase() + name.substring(1);
  164 + }
165 165 try {
166 166 Method param = line.getClass().getMethod("get"+name);
167 167  
... ... @@ -320,5 +320,9 @@ public class BsthTLineController extends BaseController
320 320 {
321 321 return AjaxResult.success(bsthTLineService.selectBsthStationListByLoc(lng,lat,dis));
322 322 }
323   -
  323 + @GetMapping("/map2")
  324 + public String map2()
  325 + {
  326 + return prefix + "/map2";
  327 + }
324 328 }
... ...
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineHistoryController.java
... ... @@ -4,7 +4,9 @@ package com.ruoyi.project.system.line.controller;
4 4 import java.util.List;
5 5 import java.util.Map;
6 6  
  7 +import com.ruoyi.project.system.line.domain.BsthSite;
7 8 import com.ruoyi.project.system.line.domain.Company;
  9 +import com.ruoyi.project.system.line.service.IBsthTSiteService;
8 10 import org.apache.shiro.authz.annotation.RequiresPermissions;
9 11 import org.springframework.beans.factory.annotation.Autowired;
10 12 import org.springframework.stereotype.Controller;
... ... @@ -48,7 +50,9 @@ public class BsthTLineHistoryController extends BaseController
48 50  
49 51 @Autowired
50 52 private IUserService userService;
51   -
  53 +
  54 + @Autowired
  55 + IBsthTSiteService iBsthTSiteService;
52 56  
53 57 @RequiresPermissions("system:lineHistory:view")
54 58 @GetMapping()
... ... @@ -89,9 +93,12 @@ public class BsthTLineHistoryController extends BaseController
89 93 bsthTLine.setUpdateStatus("1");
90 94 boolean flag=bsthTLineService.selectHistoryByLineNameAndUpdateStatus(bsthTLine)!=null?true:false;
91 95 mmap.put("flag",flag);
  96 + bsthTLine.setRemark(null);
92 97 mmap.put("bsthTLine", bsthTLine);
93 98 List<Company> companyList=bsthTLineService.selectCompany(new Company());
94 99 mmap.put("companyList",companyList);
  100 + List<BsthSite> siteList=iBsthTSiteService.selectBsthSite();
  101 + mmap.put("siteList",siteList);
95 102 return prefix + "/edit";
96 103 }
97 104  
... ...
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineHistoryReportController.java
... ... @@ -74,7 +74,10 @@ public class BsthTLineHistoryReportController extends BaseController
74 74 @PostMapping("/export")
75 75 @ResponseBody
76 76 public AjaxResult export(BsthTLine bsthTLine) throws NoSuchFieldException {
77   -
  77 + bsthTLine.setCreateTimeStr(bsthTLine.getParamsStringVal("createTimeStr"));
  78 + bsthTLine.setCreateTimeEnd(bsthTLine.getParamsStringVal("createTimeEnd"));
  79 + bsthTLine.setLineName(bsthTLine.getParamsStringVal("lineName"));
  80 + bsthTLine.setLineUpdateType(bsthTLine.getParamsStringVal("updateType"));
78 81 //查询变更记录
79 82 List<LineHistoryReport> list =bsthTLineService.getLineHistoryReport(bsthTLine);
80 83  
... ...
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/domain/BsthSite.java
... ... @@ -14,6 +14,8 @@ public class BsthSite
14 14  
15 15 private String name;
16 16  
  17 + private String user;
  18 +
17 19 public long getId() {
18 20 return id;
19 21 }
... ... @@ -38,25 +40,34 @@ public class BsthSite
38 40 this.name = name;
39 41 }
40 42  
  43 + public String getUser() {
  44 + return user;
  45 + }
  46 +
  47 + public void setUser(String user) {
  48 + this.user = user;
  49 + }
  50 +
41 51 @Override
42 52 public boolean equals(Object o) {
43 53 if (this == o) return true;
44 54 if (o == null || getClass() != o.getClass()) return false;
45 55 BsthSite bsthSite = (BsthSite) o;
46   - return Objects.equals(id, bsthSite.id) && Objects.equals(ddname, bsthSite.ddname) && Objects.equals(name, bsthSite.name);
  56 + return id == bsthSite.id && Objects.equals(ddname, bsthSite.ddname) && Objects.equals(name, bsthSite.name) && Objects.equals(user, bsthSite.user);
47 57 }
48 58  
49 59 @Override
50 60 public int hashCode() {
51   - return Objects.hash(id, ddname, name);
  61 + return Objects.hash(id, ddname, name, user);
52 62 }
53 63  
54 64 @Override
55 65 public String toString() {
56 66 return "BsthSite{" +
57   - "id='" + id + '\'' +
  67 + "id=" + id +
58 68 ", ddname='" + ddname + '\'' +
59 69 ", name='" + name + '\'' +
  70 + ", user='" + user + '\'' +
60 71 '}';
61 72 }
62 73 }
... ...
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/domain/BsthTLineKFK.java
... ... @@ -193,6 +193,8 @@ public class BsthTLineKFK
193 193 /** 线路编码 */
194 194 private String lineCode;
195 195  
  196 + private String serviceState;
  197 +
196 198  
197 199 public BsthTLineKFK(){
198 200  
... ... @@ -212,11 +214,12 @@ public class BsthTLineKFK
212 214 }
213 215 this.fCompany=bsthTLine.getfCompany();
214 216 for (Company company : companyList) {
  217 + String c=company.getCompany();
215 218 String fc=company.getfCompany();
216 219 String id=company.getCompanyID();
217   - if (fc.equals(this.company+"本部")){
  220 + if (fc==null&&this.company.equals(c)){
218 221 this.companyID=id;
219   - }if(fc.equals(this.fCompany)){
  222 + }else if(this.fCompany.equals(fc)){
220 223 this.fCompanyID=id;
221 224 }
222 225 }
... ... @@ -681,4 +684,12 @@ public class BsthTLineKFK
681 684 public void setLineCode(String lineCode) {
682 685 this.lineCode = lineCode;
683 686 }
  687 +
  688 + public String getServiceState() {
  689 + return serviceState;
  690 + }
  691 +
  692 + public void setServiceState(String serviceState) {
  693 + this.serviceState = serviceState;
  694 + }
684 695 }
... ...
bsthLineProfiles/src/main/resources/mybatis/mybatis/system/BsthSiteMapper.xml
... ... @@ -5,7 +5,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
5 5 <mapper namespace="com.ruoyi.project.system.line.mapper.BsthSiteMapper">
6 6  
7 7 <select id="selectBsthSite" resultType="com.ruoyi.project.system.line.domain.BsthSite">
8   - select id,ddname,name from bsth_t_site
  8 + select id,ddname,name,user from bsth_t_site
9 9 </select>
10 10  
11 11 <update id="updateBsthSite" parameterType="com.ruoyi.project.system.line.domain.BsthSite">
... ... @@ -13,6 +13,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
13 13 <trim prefix="SET" suffixOverrides=",">
14 14 <if test="ddname != null">ddname = #{ddname},</if>
15 15 <if test="name != null">name = #{name},</if>
  16 + <if test="user != null">user = #{user},</if>
16 17 </trim>
17 18 where id = #{id}
18 19 </update>
... ... @@ -23,11 +24,13 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
23 24 <if test="id != null and id != ''">id,</if>
24 25 <if test="ddname != null and ddname != ''">ddname,</if>
25 26 <if test="name != null and name != ''">name,</if>
  27 + <if test="user != null and user != ''">user,</if>
26 28 </trim>
27 29 <trim prefix="values (" suffix=")" suffixOverrides=",">
28 30 <if test="id != null and id != ''">#{id},</if>
29 31 <if test="ddname != null and ddname != ''">#{ddname},</if>
30 32 <if test="name != null and name != ''">#{name},</if>
  33 + <if test="user != null and user != ''">#{user},</if>
31 34 </trim>
32 35 </insert>
33 36  
... ...
bsthLineProfiles/src/main/resources/templates/include.html
... ... @@ -56,11 +56,12 @@
56 56 <script th:src="@{/ajax/libs/layui/layui.js}"></script>
57 57 <script th:src="@{/ruoyi/js/common.js?v=4.6.0}"></script>
58 58 <script th:src="@{/ruoyi/js/ry-ui.js?v=4.6.0}"></script>
59   -
  59 +
60 60 <link rel="stylesheet"
61 61 href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
62 62 <!-- import Vue before Element -->
63   -<script src="https://unpkg.com/vue/dist/vue.js"></script>
  63 +<!--<script src="https://unpkg.com/vue/dist/vue.js"></script>-->
  64 +<script th:src="@{/ajax/libs/vue/vue.js}"></script>
64 65 <!-- import JavaScript -->
65 66 <script src="https://unpkg.com/element-ui/lib/index.js"></script>
66 67  
... ...
bsthLineProfiles/src/main/resources/templates/system/historyReport/historyReport.html
... ... @@ -29,9 +29,9 @@
29 29 </li>
30 30 <li ><label>审批日期:</label>
31 31 <li class="select-time">
32   - <input type="text" class="time-input" id="createTimeStr" placeholder="开始时间" name="params[beginTime]" lay-key="1">
  32 + <input type="text" class="time-input" id="createTimeStr" placeholder="开始时间" name="params[createTimeStr]" lay-key="1">
33 33 <span>-</span>
34   - <input type="text" class="time-input" id="createTimeEnd" placeholder="结束时间" name="params[endTime]" lay-key="2">
  34 + <input type="text" class="time-input" id="createTimeEnd" placeholder="结束时间" name="params[createTimeStr]" lay-key="2">
35 35 </li>
36 36 </li>
37 37 <li>
... ...
bsthLineProfiles/src/main/resources/templates/system/line/map.html
... ... @@ -96,7 +96,7 @@ body, html, #container {
96 96 <button type="button" class="el-button el-button--primary el-button--mini" onclick="searchStation()"><!----><i class="el-icon-search"></i><span>搜索</span></button>
97 97 </div>
98 98 <div class="col-sm-4">
99   - <button type="button" class="el-button el-button--default el-button--mini" onclick="$.form.reset();"><!----><i class="el-icon-refresh"></i><span>清除站点结果</span></button>
  99 + <button type="button" class="el-button el-button--default el-button--mini" onclick="clearAll()"><!----><i class="el-icon-refresh"></i><span>清除站点结果</span></button>
100 100 </div>
101 101 </div>
102 102 </form>
... ... @@ -116,7 +116,7 @@ body, html, #container {
116 116 <button type="button" class="el-button el-button--primary el-button--mini" onclick="searchRoad();"><!----><i class="el-icon-search"></i><span>搜索</span></button>
117 117 </div>
118 118 <div class="col-sm-4">
119   - <button type="button" class="el-button el-button--default el-button--mini" onclick="reset();"><!----><i class="el-icon-refresh"></i><span>清除站点结果</span></button>
  119 + <button type="button" class="el-button el-button--default el-button--mini" onclick="clearAll()"><!----><i class="el-icon-refresh"></i><span>清除站点结果</span></button>
120 120 </div>
121 121 </div>
122 122 </form>
... ... @@ -159,7 +159,7 @@ body, html, #container {
159 159 <button type="button" class="el-button el-button--primary el-button--mini" onclick="searchArea()"><!----><i class="el-icon-search"></i><span>搜索</span></button>
160 160 </div>
161 161 <div class="col-sm-4">
162   - <button type="button" class="el-button el-button--default el-button--mini" onclick="$.form.reset();"><!----><i class="el-icon-refresh"></i><span>清除站点结果</span></button>
  162 + <button type="button" class="el-button el-button--default el-button--mini" onclick="clearAll()"><!----><i class="el-icon-refresh"></i><span>清除站点结果</span></button>
163 163 </div>
164 164 </div>
165 165 </form>
... ... @@ -488,6 +488,12 @@ body, html, #container {
488 488 }
489 489  
490 490 }
  491 +
  492 + function clearAll(){
  493 + $.form.reset();
  494 + $('#distance2').val('');
  495 + clearline();
  496 + }
491 497 </script>
492 498  
493 499  
... ...
bsthLineProfiles/src/main/resources/templates/system/lineHistory/edit.html
... ... @@ -609,9 +609,17 @@
609 609 }
610 610 return parent;
611 611 }
612   -
613 612 $("#form-line-edit").validate({
614   - focusCleanup: true
  613 + rules: {
  614 + remark: {
  615 + required: true,
  616 + },
  617 + },
  618 + messages: {
  619 + remark: {
  620 + required: "请写入备注",
  621 + }
  622 + }, focusCleanup: true
615 623 });
616 624  
617 625 function submitHandler() {
... ...
bsthLineProfiles/src/main/resources/templates/system/lineHistory/historyCompare.html
... ... @@ -34,8 +34,7 @@
34 34 :type="line.timeLineType"
35 35 size="large"
36 36 :timestamp="line.createTime" @click.native="change(index);">
37   - {{line.lineUpdateType}}(
38   - {{line.remark}})
  37 + {{line.lineUpdateType}} <a @click="showRemark(index)">详情</a>
39 38 </el-timeline-item>
40 39 </el-timeline>
41 40 </el-col>
... ... @@ -635,7 +634,7 @@
635 634  
636 635 });
637 636  
638   -
  637 + var remark;
639 638 function getData(data) {
640 639 for (var index in data) {
641 640 var obj = data[index];
... ... @@ -743,7 +742,15 @@
743 742 this.lines[index].timeLineType = "success";
744 743  
745 744 },
746   -
  745 + showRemark(index){
  746 + remark=this.lines[index].remark;
  747 + layer.open({
  748 + type: 0,
  749 + title:'备注',
  750 + content:remark,
  751 + closeBtn: 1
  752 + });
  753 + }
747 754 }
748 755 })
749 756 var dicts = [[${@dict.getType('')}]];
... ... @@ -765,6 +772,8 @@
765 772 dicts = allDicts;
766 773  
767 774 });
  775 +
  776 +
768 777 </script>
769 778  
770 779 <style>
... ...