Commit 81efced5f509c839ff27ceb88124061ed6bafa35

Authored by youxiw2000
2 parents a13f40e1 2f6b3bce

Merge branch 'master' of 192.168.168.201:youxiw20000/bsthLineProfiles

bsthLineProfiles/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
1 1 package com.ruoyi.common.utils.poi;
2 2  
3   -import java.io.File;
4   -import java.io.FileOutputStream;
5   -import java.io.IOException;
6   -import java.io.InputStream;
7   -import java.io.OutputStream;
8   -import java.lang.reflect.Field;
9   -import java.math.BigDecimal;
10   -import java.text.DecimalFormat;
11   -import java.util.ArrayList;
12   -import java.util.Arrays;
13   -import java.util.Comparator;
14   -import java.util.Date;
15   -import java.util.HashMap;
16   -import java.util.List;
17   -import java.util.Map;
18   -import java.util.Set;
19   -import java.util.UUID;
20   -import java.util.stream.Collectors;
21   -import org.apache.poi.ss.usermodel.BorderStyle;
22   -import org.apache.poi.ss.usermodel.Cell;
23   -import org.apache.poi.ss.usermodel.CellStyle;
24   -import org.apache.poi.ss.usermodel.CellType;
25   -import org.apache.poi.ss.usermodel.ClientAnchor;
26   -import org.apache.poi.ss.usermodel.DataValidation;
27   -import org.apache.poi.ss.usermodel.DataValidationConstraint;
28   -import org.apache.poi.ss.usermodel.DataValidationHelper;
29   -import org.apache.poi.ss.usermodel.DateUtil;
30   -import org.apache.poi.ss.usermodel.Drawing;
31   -import org.apache.poi.ss.usermodel.FillPatternType;
32   -import org.apache.poi.ss.usermodel.Font;
33   -import org.apache.poi.ss.usermodel.HorizontalAlignment;
34   -import org.apache.poi.ss.usermodel.IndexedColors;
35   -import org.apache.poi.ss.usermodel.Row;
36   -import org.apache.poi.ss.usermodel.Sheet;
37   -import org.apache.poi.ss.usermodel.VerticalAlignment;
38   -import org.apache.poi.ss.usermodel.Workbook;
39   -import org.apache.poi.ss.usermodel.WorkbookFactory;
40   -import org.apache.poi.ss.util.CellRangeAddressList;
41   -import org.apache.poi.xssf.streaming.SXSSFWorkbook;
42   -import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
43   -import org.apache.poi.xssf.usermodel.XSSFDataValidation;
44   -import org.slf4j.Logger;
45   -import org.slf4j.LoggerFactory;
46 3 import com.ruoyi.common.exception.BusinessException;
47 4 import com.ruoyi.common.utils.DateUtils;
48 5 import com.ruoyi.common.utils.StringUtils;
... ... @@ -57,6 +14,20 @@ import com.ruoyi.framework.aspectj.lang.annotation.Excels;
57 14 import com.ruoyi.framework.config.RuoYiConfig;
58 15 import com.ruoyi.framework.web.domain.AjaxResult;
59 16 import com.ruoyi.project.system.dict.utils.DictUtils;
  17 +import org.apache.poi.ss.usermodel.*;
  18 +import org.apache.poi.ss.util.CellRangeAddressList;
  19 +import org.apache.poi.xssf.streaming.SXSSFWorkbook;
  20 +import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
  21 +import org.apache.poi.xssf.usermodel.XSSFDataValidation;
  22 +import org.slf4j.Logger;
  23 +import org.slf4j.LoggerFactory;
  24 +
  25 +import java.io.*;
  26 +import java.lang.reflect.Field;
  27 +import java.math.BigDecimal;
  28 +import java.text.DecimalFormat;
  29 +import java.util.*;
  30 +import java.util.stream.Collectors;
60 31  
61 32 /**
62 33 * Excel相关处理
... ... @@ -127,6 +98,8 @@ public class ExcelUtil<T>
127 98 */
128 99 public Class<T> clazz;
129 100  
  101 + private List<String> titles;
  102 +
130 103 public ExcelUtil(Class<T> clazz)
131 104 {
132 105 this.clazz = clazz;
... ... @@ -965,17 +938,21 @@ public class ExcelUtil&lt;T&gt;
965 938 // 单注解
966 939 if (field.isAnnotationPresent(Excel.class))
967 940 {
968   - putToField(field, field.getAnnotation(Excel.class));
  941 + if(titles==null || titles.size()==0 || (titles!=null&&titles.contains(field.getName()))){
  942 + putToField(field, field.getAnnotation(Excel.class));
  943 + }
969 944 }
970 945  
971 946 // 多注解
972 947 if (field.isAnnotationPresent(Excels.class))
973 948 {
974   - Excels attrs = field.getAnnotation(Excels.class);
975   - Excel[] excels = attrs.value();
976   - for (Excel excel : excels)
977   - {
978   - putToField(field, excel);
  949 + if(titles==null || titles.size()==0 || (titles!=null&&titles.contains(field.getName()))){
  950 + Excels attrs = field.getAnnotation(Excels.class);
  951 + Excel[] excels = attrs.value();
  952 + for (Excel excel : excels)
  953 + {
  954 + putToField(field, excel);
  955 + }
979 956 }
980 957 }
981 958 }
... ... @@ -1119,4 +1096,7 @@ public class ExcelUtil&lt;T&gt;
1119 1096 }
1120 1097 return true;
1121 1098 }
  1099 + public void setTitles(List<String> list){
  1100 + this.titles=list;
  1101 + }
1122 1102 }
1123 1103 \ No newline at end of file
... ...
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineController.java
1 1 package com.ruoyi.project.system.line.controller;
2 2  
3   -import java.io.File;
4   -import java.lang.reflect.Field;
5   -import java.lang.reflect.Method;
6   -import java.util.ArrayList;
7   -import java.util.HashMap;
8   -import java.util.List;
9   -import java.util.Map;
10   -
11   -import org.apache.shiro.authz.annotation.RequiresPermissions;
12   -import org.springframework.beans.factory.annotation.Autowired;
13   -import org.springframework.stereotype.Controller;
14   -import org.springframework.ui.ModelMap;
15   -import org.springframework.web.bind.annotation.GetMapping;
16   -import org.springframework.web.bind.annotation.PathVariable;
17   -import org.springframework.web.bind.annotation.PostMapping;
18   -import org.springframework.web.bind.annotation.RequestMapping;
19   -import org.springframework.web.bind.annotation.RequestParam;
20   -import org.springframework.web.bind.annotation.ResponseBody;
  3 +import com.ruoyi.common.utils.poi.ExcelUtil;
  4 +import com.ruoyi.common.utils.security.ShiroUtils;
21 5 import com.ruoyi.framework.aspectj.lang.annotation.Log;
22 6 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
  7 +import com.ruoyi.framework.web.controller.BaseController;
  8 +import com.ruoyi.framework.web.domain.AjaxResult;
  9 +import com.ruoyi.framework.web.page.TableDataInfo;
23 10 import com.ruoyi.project.system.dict.domain.DictData;
24 11 import com.ruoyi.project.system.dict.service.IDictDataService;
25 12 import com.ruoyi.project.system.line.domain.BsthTLine;
26 13 import com.ruoyi.project.system.line.service.IBsthTLineService;
27 14 import com.ruoyi.project.system.user.domain.User;
28 15 import com.ruoyi.project.system.user.service.IUserService;
29   -import com.ruoyi.framework.web.controller.BaseController;
30   -import com.ruoyi.framework.web.domain.AjaxResult;
31   -import com.ruoyi.common.utils.ServletUtils;
32   -import com.ruoyi.common.utils.poi.ExcelUtil;
33   -import com.ruoyi.common.utils.security.ShiroUtils;
34   -import com.ruoyi.framework.web.page.TableDataInfo;
  16 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  17 +import org.springframework.beans.factory.annotation.Autowired;
  18 +import org.springframework.stereotype.Controller;
  19 +import org.springframework.ui.ModelMap;
  20 +import org.springframework.web.bind.annotation.*;
  21 +
  22 +import java.io.File;
  23 +import java.lang.reflect.Field;
  24 +import java.lang.reflect.Method;
  25 +import java.util.ArrayList;
  26 +import java.util.HashMap;
  27 +import java.util.List;
  28 +import java.util.Map;
35 29  
36 30 /**
37 31 * 【请填写功能名称】Controller
... ... @@ -95,13 +89,15 @@ public class BsthTLineController extends BaseController
95 89 @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
96 90 @PostMapping("/export")
97 91 @ResponseBody
98   - public AjaxResult export(BsthTLine bsthTLine)
99   - {
  92 + public AjaxResult export(BsthTLine bsthTLine) throws NoSuchFieldException {
  93 +
100 94 List<BsthTLine> list = bsthTLineService.selectBsthTLineList(bsthTLine);
101 95  
102 96 List<DictData> dicts = dictDataService.selectDictDataList(null);
103 97  
104 98 Map<String,List<DictData>> dictMap = new HashMap();
  99 +
  100 + List<String> titles=new ArrayList<>();
105 101  
106 102 for(DictData d : dicts) {
107 103  
... ... @@ -115,15 +111,31 @@ public class BsthTLineController extends BaseController
115 111 for(BsthTLine line:list) {
116 112  
117 113 Field[] field = line.getClass().getDeclaredFields();
118   -
119   -
  114 +
  115 + String isWarrant=bsthTLine.getIsWarrant();
  116 + if("0".equals(isWarrant)){//现实
  117 + for (Field f : field) {
  118 + String fName=f.getName();
  119 + if(!"isWarrantStartTime".equals(fName) && !"isWarrantEndTime".equals(fName) && !"warrantVehiclesLarge".equals(fName) && !"warrantVehiclesMiddle".equals(fName) && !"number_of_manage".equals(fName)){
  120 + titles.add(fName);
  121 + }
  122 + }
  123 + }else if("1".equals(isWarrant)){//权证
  124 + for (Field f : field) {
  125 + String fName=f.getName();
  126 + if(!"vehiclesNumber".equals(fName) && !"numberVehiclesLarge".equals(fName) && !"numberVehiclesMiddle".equals(fName) ){
  127 + titles.add(fName);
  128 + }
  129 + }
  130 + }
  131 +
120 132  
121 133 for(int j=0 ; j<field.length ; j++){ //遍历所有属性
122 134 String name = field[j].getName(); //获取属性的名字
123 135  
124 136 String type = name;
125 137  
126   - if(name.equals( "isLogicDelete") || name.equals( "inoutDistrict")|| name.equals( "isMetro") || name.equals( "hasTimelists")) {
  138 + if(name.equals( "isLogicDelete") || name.equals( "inoutDistrict")|| name.equals( "isMetro") || name.equals( "hasTimelists")|| name.equals( "isWarrant")) {
127 139 type = "trueFalse";
128 140 }
129 141  
... ... @@ -172,9 +184,10 @@ public class BsthTLineController extends BaseController
172 184  
173 185  
174 186 }
175   -
176   -
  187 +
  188 +
177 189 ExcelUtil<BsthTLine> util = new ExcelUtil<BsthTLine>(BsthTLine.class);
  190 + util.setTitles(titles);
178 191 return util.exportExcel(list, "line");
179 192 }
180 193  
... ... @@ -191,7 +204,7 @@ public class BsthTLineController extends BaseController
191 204 * 新增保存【请填写功能名称】
192 205 */
193 206 @RequiresPermissions("system:line:add")
194   - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
  207 + @Log(title = "新增线路基本信息", businessType = BusinessType.INSERT)
195 208 @PostMapping("/add")
196 209 @ResponseBody
197 210 public AjaxResult addSave(BsthTLine bsthTLine)
... ...
bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/domain/BsthTLine.java
1 1 package com.ruoyi.project.system.line.domain;
2 2  
3   -import java.util.Date;
4 3 import com.fasterxml.jackson.annotation.JsonFormat;
5   -import org.apache.commons.lang3.builder.ToStringBuilder;
6   -import org.apache.commons.lang3.builder.ToStringStyle;
7 4 import com.ruoyi.framework.aspectj.lang.annotation.Excel;
8 5 import com.ruoyi.framework.web.domain.BaseEntity;
9 6  
  7 +import java.util.Date;
  8 +
10 9 /**
11 10 * 【请填写功能名称】对象 bsth_t_line
12 11 *
... ... @@ -137,10 +136,20 @@ public class BsthTLine extends BaseEntity
137 136 @Excel(name = "停车场")
138 137 private String park;
139 138  
140   - /** 是否权证 */
  139 + /** 是否权证 0-否 1-是*/
141 140 @Excel(name = "是否权证")
142 141 private String isWarrant;
143 142  
  143 + /** 权证开通日期 */
  144 + @JsonFormat(pattern = "yyyy-MM-dd")
  145 + @Excel(name = "权证开通日期", width = 30, dateFormat = "yyyy-MM-dd")
  146 + private Date isWarrantStartTime;
  147 +
  148 + /** 权证到期日期 */
  149 + @JsonFormat(pattern = "yyyy-MM-dd")
  150 + @Excel(name = "权证到期日期", width = 30, dateFormat = "yyyy-MM-dd")
  151 + private Date isWarrantEndTime;
  152 +
144 153 /** 道路类型 */
145 154 @Excel(name = "道路类型")
146 155 private String roadType;
... ... @@ -1054,90 +1063,108 @@ public class BsthTLine extends BaseEntity
1054 1063 this.files = files;
1055 1064 }
1056 1065  
1057   - @Override
  1066 + public Date getIsWarrantStartTime() {
  1067 + return isWarrantStartTime;
  1068 + }
  1069 +
  1070 + public void setIsWarrantStartTime(Date isWarrantStartTime) {
  1071 + this.isWarrantStartTime = isWarrantStartTime;
  1072 + }
  1073 +
  1074 + public Date getIsWarrantEndTime() {
  1075 + return isWarrantEndTime;
  1076 + }
  1077 +
  1078 + public void setIsWarrantEndTime(Date isWarrantEndTime) {
  1079 + this.isWarrantEndTime = isWarrantEndTime;
  1080 + }
  1081 +
  1082 + @Override
1058 1083 public String toString() {
1059   - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
1060   - .append("id", getId())
1061   - .append("eventId", getEventId())
1062   - .append("lineId", getLineId())
1063   - .append("lineName", getLineName())
1064   - .append("company", getCompany())
1065   - .append("FCompany", getFCompany())
1066   - .append("pLineId", getPLineId())
1067   - .append("serviceType", getServiceType())
1068   - .append("lineLevel", getLineLevel())
1069   - .append("lineType", getLineType())
1070   - .append("district", getDistrict())
1071   - .append("inoutDistrict", getInoutDistrict())
1072   - .append("serviceState", getServiceState())
1073   - .append("busType", getBusType())
1074   - .append("airConditionerType", getAirConditionerType())
1075   - .append("sellTicketType", getSellTicketType())
1076   - .append("serviceTime", getServiceTime())
1077   - .append("lineDistance", getLineDistance())
1078   - .append("lineCode", getLineCode())
1079   - .append("warrantYear", getWarrantYear())
1080   - .append("warrantStartTime", getWarrantStartTime())
1081   - .append("warrantEndTime", getWarrantEndTime())
1082   - .append("planCancelTime", getPlanCancelTime())
1083   - .append("cancelTime", getCancelTime())
1084   - .append("cancelReason", getCancelReason())
1085   - .append("remark", getRemark())
1086   - .append("isLogicDelete", getIsLogicDelete())
1087   - .append("createTime", getCreateTime())
1088   - .append("updateBy", getUpdateBy())
1089   - .append("updateTime", getUpdateTime())
1090   - .append("createBy", getCreateBy())
1091   - .append("timeSchedule", getTimeSchedule())
1092   - .append("park", getPark())
1093   - .append("isWarrant", getIsWarrant())
1094   - .append("roadType", getRoadType())
1095   - .append("ticketPrice", getTicketPrice())
1096   - .append("firstStation", getFirstStation())
1097   - .append("startEnd", getStartEnd())
1098   - .append("firstTime", getFirstTime())
1099   - .append("lastStation", getLastStation())
1100   - .append("lastTime", getLastTime())
1101   - .append("mileageUp", getMileageUp())
1102   - .append("mileageDown", getMileageDown())
1103   - .append("averageMileage", getAverageMileage())
1104   - .append("stationUp", getStationUp())
1105   - .append("stationDown", getStationDown())
1106   - .append("travelTimeUp", getTravelTimeUp())
1107   - .append("travelTimeDown", getTravelTimeDown())
1108   - .append("travelIntervalUp", getTravelIntervalUp())
1109   - .append("travelIntervalDown", getTravelIntervalDown())
1110   - .append("warrantVehiclesLarge", getWarrantVehiclesLarge())
1111   - .append("warrantVehiclesMiddle", getWarrantVehiclesMiddle())
1112   - .append("vehiclesNumber", getVehiclesNumber())
1113   - .append("numberVehiclesLarge", getNumberVehiclesLarge())
1114   - .append("numberVehiclesMiddle", getNumberVehiclesMiddle())
1115   - .append("carPlate", getCarPlate())
1116   - .append("numberPerson", getNumberPerson())
1117   - .append("numberPersonDriver", getNumberPersonDriver())
1118   - .append("numberPersonSales", getNumberPersonSales())
1119   - .append("busEvNumber", getBusEvNumber())
1120   - .append("directions", getDirections())
1121   - .append("numberOfManage", getNumberOfManage())
1122   - .append("halfwayStation", getHalfwayStation())
1123   - .append("fullCustomerPercent", getFullCustomerPercent())
1124   - .append("lowCustomerPercent", getLowCustomerPercent())
1125   - .append("divideLevel", getDivideLevel())
1126   - .append("hasTimelists", getHasTimelists())
1127   - .append("isMetro", getIsMetro())
1128   - .append("metroTime", getMetroTime())
1129   - .append("coldBonusType", getColdBonusType())
1130   - .append("revenuesMonth", getRevenuesMonth())
1131   - .append("personMonth", getPersonMonth())
1132   - .append("mileageMonth", getMileageMonth())
1133   - .append("personMonthAvg", getPersonMonthAvg())
1134   - .append("revenues", getRevenues())
1135   - .append("persons", getPersons())
1136   - .append("mileages", getMileages())
1137   - .append("personAvg", getPersonAvg())
1138   - .append("startDate", getStartDate())
1139   - .append("StartReason", getStartReason())
1140   - .append("nightParking", getNightParking())
1141   - .toString();
  1084 + return "BsthTLine{" +
  1085 + "id=" + id +
  1086 + ", eventId='" + eventId + '\'' +
  1087 + ", lineId=" + lineId +
  1088 + ", lineName='" + lineName + '\'' +
  1089 + ", company='" + company + '\'' +
  1090 + ", fCompany='" + fCompany + '\'' +
  1091 + ", pLineId=" + pLineId +
  1092 + ", serviceType='" + serviceType + '\'' +
  1093 + ", lineLevel='" + lineLevel + '\'' +
  1094 + ", lineType='" + lineType + '\'' +
  1095 + ", district='" + district + '\'' +
  1096 + ", inoutDistrict='" + inoutDistrict + '\'' +
  1097 + ", serviceState='" + serviceState + '\'' +
  1098 + ", busType='" + busType + '\'' +
  1099 + ", airConditionerType='" + airConditionerType + '\'' +
  1100 + ", sellTicketType='" + sellTicketType + '\'' +
  1101 + ", serviceTime='" + serviceTime + '\'' +
  1102 + ", lineDistance=" + lineDistance +
  1103 + ", lineCode='" + lineCode + '\'' +
  1104 + ", warrantYear=" + warrantYear +
  1105 + ", warrantStartTime=" + warrantStartTime +
  1106 + ", warrantEndTime=" + warrantEndTime +
  1107 + ", planCancelTime=" + planCancelTime +
  1108 + ", cancelTime=" + cancelTime +
  1109 + ", cancelReason='" + cancelReason + '\'' +
  1110 + ", isLogicDelete='" + isLogicDelete + '\'' +
  1111 + ", updateBy='" + updateBy + '\'' +
  1112 + ", updateTime=" + updateTime +
  1113 + ", timeSchedule=" + timeSchedule +
  1114 + ", park='" + park + '\'' +
  1115 + ", isWarrant='" + isWarrant + '\'' +
  1116 + ", isWarrantStartTime=" + isWarrantStartTime +
  1117 + ", isWarrantEndTime=" + isWarrantEndTime +
  1118 + ", roadType='" + roadType + '\'' +
  1119 + ", ticketPrice='" + ticketPrice + '\'' +
  1120 + ", firstStation='" + firstStation + '\'' +
  1121 + ", startEnd='" + startEnd + '\'' +
  1122 + ", firstTime='" + firstTime + '\'' +
  1123 + ", lastStation='" + lastStation + '\'' +
  1124 + ", lastTime='" + lastTime + '\'' +
  1125 + ", mileageUp='" + mileageUp + '\'' +
  1126 + ", mileageDown='" + mileageDown + '\'' +
  1127 + ", averageMileage='" + averageMileage + '\'' +
  1128 + ", stationUp='" + stationUp + '\'' +
  1129 + ", stationDown='" + stationDown + '\'' +
  1130 + ", travelTimeUp='" + travelTimeUp + '\'' +
  1131 + ", travelTimeDown='" + travelTimeDown + '\'' +
  1132 + ", travelIntervalUp='" + travelIntervalUp + '\'' +
  1133 + ", travelIntervalDown='" + travelIntervalDown + '\'' +
  1134 + ", warrantVehiclesLarge=" + warrantVehiclesLarge +
  1135 + ", warrantVehiclesMiddle=" + warrantVehiclesMiddle +
  1136 + ", vehiclesNumber=" + vehiclesNumber +
  1137 + ", numberVehiclesLarge=" + numberVehiclesLarge +
  1138 + ", numberVehiclesMiddle=" + numberVehiclesMiddle +
  1139 + ", carPlate='" + carPlate + '\'' +
  1140 + ", numberPerson=" + numberPerson +
  1141 + ", numberPersonDriver=" + numberPersonDriver +
  1142 + ", numberPersonSales=" + numberPersonSales +
  1143 + ", busEvNumber=" + busEvNumber +
  1144 + ", directions='" + directions + '\'' +
  1145 + ", numberOfManage='" + numberOfManage + '\'' +
  1146 + ", halfwayStation='" + halfwayStation + '\'' +
  1147 + ", fullCustomerPercent=" + fullCustomerPercent +
  1148 + ", lowCustomerPercent=" + lowCustomerPercent +
  1149 + ", divideLevel='" + divideLevel + '\'' +
  1150 + ", hasTimelists='" + hasTimelists + '\'' +
  1151 + ", isMetro='" + isMetro + '\'' +
  1152 + ", metroTime='" + metroTime + '\'' +
  1153 + ", coldBonusType='" + coldBonusType + '\'' +
  1154 + ", revenuesMonth=" + revenuesMonth +
  1155 + ", personMonth=" + personMonth +
  1156 + ", mileageMonth=" + mileageMonth +
  1157 + ", personMonthAvg=" + personMonthAvg +
  1158 + ", revenues=" + revenues +
  1159 + ", persons=" + persons +
  1160 + ", mileages=" + mileages +
  1161 + ", personAvg=" + personAvg +
  1162 + ", startDate=" + startDate +
  1163 + ", startReason='" + startReason + '\'' +
  1164 + ", lineUpdateType='" + lineUpdateType + '\'' +
  1165 + ", updateStatus='" + updateStatus + '\'' +
  1166 + ", nightParking='" + nightParking + '\'' +
  1167 + ", files='" + files + '\'' +
  1168 + '}';
1142 1169 }
1143 1170 }
... ...
bsthLineProfiles/src/main/resources/mybatis/mybatis/system/BsthTLineMapper.xml
... ... @@ -41,6 +41,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
41 41 <result property="timeSchedule" column="time_schedule" />
42 42 <result property="park" column="park" />
43 43 <result property="isWarrant" column="is_warrant" />
  44 + <result property="isWarrantStartTime" column="isWarrant_start_time" />
  45 + <result property="isWarrantEndTime" column="isWarrant_End_time" />
44 46 <result property="roadType" column="road_type" />
45 47 <result property="ticketPrice" column="ticket_price" />
46 48 <result property="firstStation" column="first_station" />
... ... @@ -130,7 +132,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
130 132 service_time, line_distance, line_code, warrant_year,
131 133 warrant_start_time, warrant_end_time, plan_cancel_time, cancel_time,
132 134 cancel_reason, remark, is_logic_delete, create_time, update_by,
133   - update_time, create_by, time_schedule, park, is_warrant, road_type,
  135 + update_time, create_by, time_schedule, park, is_warrant,isWarrant_start_time,isWarrant_end_time, road_type,
134 136 ticket_price, first_station, start_end, first_time, last_station,
135 137 last_time, mileage_up, mileage_down, average_mileage, station_up,
136 138 station_down, travel_time_up, travel_time_down, travel_interval_up,
... ... @@ -354,6 +356,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
354 356 <if test="timeSchedule != null">time_schedule,</if>
355 357 <if test="park != null">park,</if>
356 358 <if test="isWarrant != null">is_warrant,</if>
  359 + <if test="isWarrantStartTime != null">isWarrant_start_time,</if>
  360 + <if test="isWarrantEndTime != null">isWarrant_end_time,</if>
357 361 <if test="roadType != null">road_type,</if>
358 362 <if test="ticketPrice != null">ticket_price,</if>
359 363 <if test="firstStation != null">first_station,</if>
... ... @@ -433,6 +437,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
433 437 <if test="timeSchedule != null">#{timeSchedule},</if>
434 438 <if test="park != null">#{park},</if>
435 439 <if test="isWarrant != null">#{isWarrant},</if>
  440 + <if test="isWarrantStartTime != null">#{isWarrantStartTime},</if>
  441 + <if test="isWarrantEndTime != null">#{isWarrantEndTime},</if>
436 442 <if test="roadType != null">#{roadType},</if>
437 443 <if test="ticketPrice != null">#{ticketPrice},</if>
438 444 <if test="firstStation != null">#{firstStation},</if>
... ... @@ -516,6 +522,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
516 522 <if test="timeSchedule != null">time_schedule = #{timeSchedule},</if>
517 523 <if test="park != null">park = #{park},</if>
518 524 <if test="isWarrant != null">is_warrant = #{isWarrant},</if>
  525 + <if test="isWarrantStartTime != null">isWarrant_start_time = #{isWarrantStartTime},</if>
  526 + <if test="isWarrantEndTime != null">isWarrant_end_time = #{isWarrantEndTime},</if>
519 527 <if test="roadType != null">road_type = #{roadType},</if>
520 528 <if test="ticketPrice != null">ticket_price = #{ticketPrice},</if>
521 529 <if test="firstStation != null">first_station = #{firstStation},</if>
... ... @@ -601,6 +609,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
601 609 <if test="timeSchedule != null">time_schedule = #{timeSchedule},</if>
602 610 <if test="park != null">park = #{park},</if>
603 611 <if test="isWarrant != null">is_warrant = #{isWarrant},</if>
  612 + <if test="isWarrantStartTime != null">isWarrant_start_time = #{isWarrantStartTime},</if>
  613 + <if test="isWarrantEndTime != null">isWarrant_end_time = #{isWarrantEndTime},</if>
604 614 <if test="roadType != null">road_type = #{roadType},</if>
605 615 <if test="ticketPrice != null">ticket_price = #{ticketPrice},</if>
606 616 <if test="firstStation != null">first_station = #{firstStation},</if>
... ... @@ -1039,105 +1049,6 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
1039 1049 </where>
1040 1050 </select>
1041 1051  
1042   - <select id="selectBsthTLineHistoryListGroupByLineName"
1043   - parameterType="BsthTLine" resultMap="BsthTLineResult">
1044   - <include refid="selectBsthTLineHistoryVo" />
1045   - <where>
1046   - <if test="eventId != null "> and event_id = #{eventId}</if>
1047   - <if test="lineId != null "> and line_id = #{lineId}</if>
1048   - <if test="lineName != null and lineName != ''"> and line_name like concat('%', #{lineName}, '%')</if>
1049   - <if test="company != null and company != ''"> and company = #{company}</if>
1050   - <if test="fCompany != null and fCompany != ''"> and f_company = #{fCompany}</if>
1051   - <if test="pLineId != null "> and p_line_id = #{pLineId}</if>
1052   - <if test="serviceType != null and serviceType != ''"> and service_type = #{serviceType}</if>
1053   - <if test="lineLevel != null and lineLevel != ''"> and line_level = #{lineLevel}</if>
1054   - <if test="lineType != null and lineType != ''"> and line_type = #{lineType}</if>
1055   - <if test="district != null and district != ''"> and district = #{district}</if>
1056   - <if test="inoutDistrict != null and inoutDistrict != ''"> and inout_district = #{inoutDistrict}</if>
1057   - <if test="serviceState != null and serviceState != ''"> and service_state = #{serviceState}</if>
1058   - <if test="busType != null and busType != ''"> and bus_type = #{busType}</if>
1059   - <if
1060   - test="airConditionerType != null and airConditionerType != ''"> and air_conditioner_type = #{airConditionerType}</if>
1061   - <if test="sellTicketType != null and sellTicketType != ''"> and sell_ticket_type = #{sellTicketType}</if>
1062   - <if test="serviceTime != null and serviceTime != ''"> and service_time = #{serviceTime}</if>
1063   - <if test="lineDistance != null "> and line_distance = #{lineDistance}</if>
1064   - <if test="lineCode != null and lineCode != ''"> and line_code = #{lineCode}</if>
1065   - <if test="warrantYear != null "> and warrant_year = #{warrantYear}</if>
1066   - <if test="warrantStartTime != null "> and warrant_start_time = #{warrantStartTime}</if>
1067   - <if test="warrantEndTime != null "> and warrant_end_time = #{warrantEndTime}</if>
1068   - <if test="planCancelTime != null "> and plan_cancel_time = #{planCancelTime}</if>
1069   - <if test="cancelTime != null "> and cancel_time = #{cancelTime}</if>
1070   - <if test="cancelReason != null and cancelReason != ''"> and cancel_reason = #{cancelReason}</if>
1071   - <if test="isLogicDelete != null and isLogicDelete != ''"> and is_logic_delete = #{isLogicDelete}</if>
1072   - <if test="timeSchedule != null "> and time_schedule = #{timeSchedule}</if>
1073   - <if test="park != null and park != ''"> and park = #{park}</if>
1074   - <if test="isWarrant != null and isWarrant != ''"> and is_warrant = #{isWarrant}</if>
1075   - <if test="roadType != null and roadType != ''"> and road_type = #{roadType}</if>
1076   - <if test="ticketPrice != null and ticketPrice != ''"> and ticket_price = #{ticketPrice}</if>
1077   - <if test="firstStation != null and firstStation != ''"> and first_station = #{firstStation}</if>
1078   - <if test="startEnd != null and startEnd != ''"> and start_end = #{startEnd}</if>
1079   - <if test="firstTime != null and firstTime != ''"> and first_time = #{firstTime}</if>
1080   - <if test="lastStation != null and lastStation != ''"> and last_station = #{lastStation}</if>
1081   - <if test="lastTime != null and lastTime != ''"> and last_time = #{lastTime}</if>
1082   - <if test="mileageUp != null and mileageUp != ''"> and mileage_up = #{mileageUp}</if>
1083   - <if test="mileageDown != null and mileageDown != ''"> and mileage_down = #{mileageDown}</if>
1084   - <if test="averageMileage != null and averageMileage != ''"> and average_mileage = #{averageMileage}</if>
1085   - <if test="stationUp != null and stationUp != ''"> and station_up = #{stationUp}</if>
1086   - <if test="stationDown != null and stationDown != ''"> and station_down = #{stationDown}</if>
1087   - <if test="travelTimeUp != null and travelTimeUp != ''"> and travel_time_up = #{travelTimeUp}</if>
1088   - <if test="travelTimeDown != null and travelTimeDown != ''"> and travel_time_down = #{travelTimeDown}</if>
1089   - <if test="travelIntervalUp != null and travelIntervalUp != ''"> and travel_interval_up = #{travelIntervalUp}</if>
1090   - <if
1091   - test="travelIntervalDown != null and travelIntervalDown != ''"> and travel_interval_down = #{travelIntervalDown}</if>
1092   - <if test="warrantVehiclesLarge != null "> and warrant_vehicles_large = #{warrantVehiclesLarge}
1093   - </if>
1094   - <if test="warrantVehiclesMiddle != null "> and warrant_vehicles_middle = #{warrantVehiclesMiddle}
1095   - </if>
1096   - <if test="vehiclesNumber != null "> and vehicles_number = #{vehiclesNumber}</if>
1097   - <if test="numberVehiclesLarge != null "> and number_vehicles_large = #{numberVehiclesLarge}</if>
1098   - <if test="numberVehiclesMiddle != null "> and number_vehicles_middle = #{numberVehiclesMiddle}
1099   - </if>
1100   - <if test="carPlate != null and carPlate != ''"> and car_plate = #{carPlate}</if>
1101   - <if test="numberPerson != null "> and number_person = #{numberPerson}</if>
1102   - <if test="numberPersonDriver != null "> and number_person_driver = #{numberPersonDriver}</if>
1103   - <if test="numberPersonSales != null "> and number_person_sales = #{numberPersonSales}</if>
1104   - <if test="busEvNumber != null "> and bus_ev_number = #{busEvNumber}</if>
1105   - <if test="directions != null and directions != ''"> and directions = #{directions}</if>
1106   - <if test="numberOfManage != null and numberOfManage != ''"> and number_of_manage = #{numberOfManage}</if>
1107   - <if test="halfwayStation != null and halfwayStation != ''"> and halfway_station = #{halfwayStation}</if>
1108   - <if test="fullCustomerPercent != null "> and full_customer_percent = #{fullCustomerPercent}</if>
1109   - <if test="lowCustomerPercent != null "> and low_customer_percent = #{lowCustomerPercent}</if>
1110   - <if test="divideLevel != null and divideLevel != ''"> and divide_level = #{divideLevel}</if>
1111   - <if test="hasTimelists != null and hasTimelists != ''"> and has_timelists = #{hasTimelists}</if>
1112   - <if test="isMetro != null and isMetro != ''"> and is_metro = #{isMetro}</if>
1113   - <if test="metroTime != null and metroTime != ''"> and metro_time = #{metroTime}</if>
1114   - <if test="coldBonusType != null and coldBonusType != ''"> and cold_bonus_type = #{coldBonusType}</if>
1115   - <if test="revenuesMonth != null "> and revenues_month = #{revenuesMonth}</if>
1116   - <if test="personMonth != null "> and person_month = #{personMonth}</if>
1117   - <if test="mileageMonth != null "> and mileage_month = #{mileageMonth}</if>
1118   - <if test="personMonthAvg != null "> and person_month_avg = #{personMonthAvg}</if>
1119   - <if test="revenues != null "> and revenues = #{revenues}</if>
1120   - <if test="persons != null "> and persons = #{persons}</if>
1121   - <if test="mileages != null "> and mileages = #{mileages}</if>
1122   - <if test="personAvg != null "> and person_avg = #{personAvg}</if>
1123   - <if test="startDate != null "> and start_date > #{startDate}</if>
1124   - <if test="startReason != null "> and start_reason = #{startReason}</if>
1125   - <if test="nightParking != null and nightParking != ''"> and night_parking = #{nightParking}</if>
1126   - </where>
1127   -
1128   - group by line_name
1129   - </select>
1130   -
1131   - <select id="getListByName" parameterType="java.lang.String" resultMap="BsthTLineResult">
1132   - <include refid="selectBsthTLineHistoryVo" />
1133   - <where>
1134   - and line_name = #{name}
1135   - </where>
1136   - ORDER BY start_date DESC
1137   - </select>
1138   -
1139   -
1140   -
1141 1052 <select id="selectHistoryListNotUpdate"
1142 1053 parameterType="BsthTLine" resultMap="BsthTLineResult">
1143 1054 <include refid="selectBsthTLineHistoryVo" />
... ...
bsthLineProfiles/src/main/resources/templates/system/line/add.html
1 1 <!DOCTYPE html>
2 2 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
3 3 <head>
4   - <th:block th:include="include :: header('新增【请填写功能名称】')" />
  4 + <th:block th:include="include :: header('添加线路档案信息')" />
5 5 <th:block th:include="include :: datetimepicker-css" />
6 6 </head>
7 7 <body class="white-bg">
8 8 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
9 9 <form class="form-horizontal m" id="form-line-add">
10 10 <div class="form-group">
11   - <label class="col-sm-3 control-label">夜间停车场(无):</label>
12   - <div class="col-sm-8">
13   - <input name="eventId" class="form-control" type="text">
14   - </div>
15   - </div>
16   - <div class="form-group">
17   - <label class="col-sm-3 control-label">夜间停车场(无):</label>
18   - <div class="col-sm-8">
19   - <input name="lineId" class="form-control" type="text">
20   - </div>
21   - </div>
22   - <div class="form-group">
23 11 <label class="col-sm-3 control-label">线路名称:</label>
24 12 <div class="col-sm-8">
25 13 <input name="lineName" class="form-control" type="text">
... ... @@ -44,78 +32,130 @@
44 32 </div>
45 33 </div>
46 34 <div class="form-group">
47   - <label class="col-sm-3 control-label">营运方式 全程/区间/大站/定班/跨线/B线:</label>
  35 + <label class="col-sm-3 control-label">营运方式:</label>
48 36 <div class="col-sm-8">
49   - <select name="serviceType" class="form-control m-b">
50   - <option value="">所有</option>
  37 + <select name="serviceType"
  38 + th:with="type=${@dict.getType('serviceType')}"
  39 + class="form-control m-b">
  40 + <option value=""></option>
  41 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  42 + th:value="${dict.dictValue}">
  43 +
  44 + </option>
51 45 </select>
52   - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
53 46 </div>
54 47 </div>
55   - <div class="form-group">
  48 +
  49 + <div class="form-group">
56 50 <label class="col-sm-3 control-label">线路属性:</label>
57 51 <div class="col-sm-8">
58   - <input name="lineLevel" class="form-control" type="text">
  52 + <select name="lineLevel"
  53 + th:with="type=${@dict.getType('lineLevel')}"
  54 + class="form-control m-b">
  55 + <option value=""></option>
  56 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  57 + th:value="${dict.dictValue}">
  58 + </option>
  59 + </select>
59 60 </div>
60 61 </div>
61 62 <div class="form-group">
62   - <label class="col-sm-3 control-label">线路属性:</label>
  63 + <label class="col-sm-3 control-label">线路类型:</label>
63 64 <div class="col-sm-8">
64   - <select name="lineType" class="form-control m-b">
65   - <option value="">所有</option>
  65 + <select name="lineType" th:with="type=${@dict.getType('lineType')}"
  66 + class="form-control m-b">
  67 + <option value=""></option>
  68 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  69 + th:value="${dict.dictValue}">
  70 + </option>
66 71 </select>
67   - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
68 72 </div>
69 73 </div>
70 74 <div class="form-group">
71 75 <label class="col-sm-3 control-label">区属:</label>
72 76 <div class="col-sm-8">
73   - <input name="district" class="form-control" type="text">
  77 + <select name="district" th:with="type=${@dict.getType('district')}"
  78 + class="form-control m-b">
  79 + <option value=""></option>
  80 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  81 + th:value="${dict.dictValue}">
  82 + </option>
  83 + </select>
74 84 </div>
75 85 </div>
76 86 <div class="form-group">
77 87 <label class="col-sm-3 control-label">是否区内:</label>
78 88 <div class="col-sm-8">
79   - <input name="inoutDistrict" class="form-control" type="text">
  89 + <select name="inoutDistrict"
  90 + th:with="type=${@dict.getType('trueFalse')}"
  91 + class="form-control m-b">
  92 + <option value=""></option>
  93 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  94 + th:value="${dict.dictValue}">
  95 +
  96 + </option>
  97 + </select>
80 98 </div>
81 99 </div>
82 100 <div class="form-group">
83   - <label class="col-sm-3 control-label">营运状态 运营中/撤销/暂停:</label>
  101 + <label class="col-sm-3 control-label">营运状态:</label>
84 102 <div class="col-sm-8">
85   - <input name="serviceState" class="form-control" type="text">
  103 + <select name="serviceState"
  104 + th:with="type=${@dict.getType('serviceState')}"
  105 + class="form-control m-b">
  106 + <option value=""></option>
  107 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  108 + th:value="${dict.dictValue}">
  109 + </option>
  110 + </select>
86 111 </div>
87 112 </div>
88 113 <div class="form-group">
89 114 <label class="col-sm-3 control-label">车辆类型 多选:</label>
90   - <div class="col-sm-8">
91   - <select name="busType" class="form-control m-b">
92   - <option value="">所有</option>
93   - </select>
94   - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
  115 + <div class="col-sm-8" th:with="type=${@dict.getType('busType')}">
  116 + <label class="checkbox-inline" th:each="dict : ${type}"
  117 + style="display: block"> <input type="checkbox"
  118 + name="busType"
  119 + th:text="${dict.dictLabel}" th:value="${dict.dictValue}" /></label>
95 120 </div>
96 121 </div>
97 122 <div class="form-group">
98 123 <label class="col-sm-3 control-label">是否空调:</label>
99 124 <div class="col-sm-8">
100   - <select name="airConditionerType" class="form-control m-b">
101   - <option value="">所有</option>
  125 + <select name="airConditionerType"
  126 + th:with="type=${@dict.getType('airConditionerType')}"
  127 + class="form-control m-b">
  128 + <option value=""></option>
  129 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  130 + th:value="${dict.dictValue}">
  131 + </option>
102 132 </select>
103   - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
104 133 </div>
105 134 </div>
106 135 <div class="form-group">
107 136 <label class="col-sm-3 control-label">售票类型:</label>
108 137 <div class="col-sm-8">
109   - <select name="sellTicketType" class="form-control m-b">
110   - <option value="">所有</option>
  138 + <select name="sellTicketType"
  139 + th:with="type=${@dict.getType('sellTicketType')}"
  140 + class="form-control m-b">
  141 + <option value=""></option>
  142 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  143 + th:value="${dict.dictValue}">
  144 + </option>
111 145 </select>
112   - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
113 146 </div>
114 147 </div>
115 148 <div class="form-group">
116 149 <label class="col-sm-3 control-label">运营时间:</label>
117 150 <div class="col-sm-8">
118   - <input name="serviceTime" class="form-control" type="text">
  151 + <select name="serviceTime"
  152 + th:with="type=${@dict.getType('serviceTime')}"
  153 + class="form-control m-b">
  154 + <option value=""></option>
  155 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  156 + th:value="${dict.dictValue}">
  157 + </option>
  158 + </select>
119 159 </div>
120 160 </div>
121 161 <div class="form-group">
... ... @@ -187,7 +227,14 @@
187 227 <div class="form-group">
188 228 <label class="col-sm-3 control-label">是否逻辑删除:</label>
189 229 <div class="col-sm-8">
190   - <input name="isLogicDelete" class="form-control" type="text">
  230 + <select name="isLogicDelete"
  231 + th:with="type=${@dict.getType('trueFalse')}"
  232 + class="form-control m-b">
  233 + <option value=""></option>
  234 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  235 + th:value="${dict.dictValue}">
  236 + </option>
  237 + </select>
191 238 </div>
192 239 </div>
193 240 <div class="form-group">
... ... @@ -223,16 +270,49 @@
223 270 <div class="form-group">
224 271 <label class="col-sm-3 control-label">是否权证:</label>
225 272 <div class="col-sm-8">
226   - <input name="isWarrant" class="form-control" type="text">
  273 + <select name="isWarrant" id="isWarrant"
  274 + th:with="type=${@dict.getType('trueFalse')}"
  275 + class="form-control m-b">
  276 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  277 + th:value="${dict.dictValue}" th:selected="${dict.dictValue=='1'}">
  278 + </option>
  279 + </select>
  280 + </div>
  281 + </div>
  282 + <div class="form-group">
  283 + <label class="col-sm-3 control-label">权证开通日期:</label>
  284 + <div class="col-sm-8">
  285 + <div class="input-group date">
  286 + <input name="isWarrantStartTime" id="isWarrantStartTime"
  287 + class="form-control" placeholder="yyyy-MM-dd" type="text"
  288 + autocomplete="off"> <span class="input-group-addon"><i
  289 + class="fa fa-calendar"></i></span>
  290 + </div>
  291 +
  292 + </div>
  293 + </div>
  294 + <div class="form-group">
  295 + <label class="col-sm-3 control-label">权证到期日期:</label>
  296 + <div class="col-sm-8">
  297 + <div class="input-group date">
  298 + <input name="isWarrantEndTime" id="isWarrantEndTime"
  299 + class="form-control" placeholder="yyyy-MM-dd" type="text"
  300 + autocomplete="off"> <span class="input-group-addon"><i
  301 + class="fa fa-calendar"></i></span>
  302 + </div>
  303 +
227 304 </div>
228 305 </div>
229 306 <div class="form-group">
230 307 <label class="col-sm-3 control-label">道路类型:</label>
231 308 <div class="col-sm-8">
232   - <select name="roadType" class="form-control m-b">
233   - <option value="">所有</option>
234   - </select>
235   - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
  309 + <div class="col-sm-8" th:with="type=${@dict.getType('roadType')}">
  310 + <label class="checkbox-inline" th:each="dict : ${type}"
  311 + style="display: block"> <input type="checkbox"
  312 + name="roadType"
  313 + th:text="${dict.dictLabel}" th:value="${dict.dictValue}" />
  314 + </label>
  315 + </div>
236 316 </div>
237 317 </div>
238 318 <div class="form-group">
... ... @@ -326,13 +406,13 @@
326 406 </div>
327 407 </div>
328 408 <div class="form-group">
329   - <label class="col-sm-3 control-label">经营权证:</label>
  409 + <label class="col-sm-3 control-label">经营权证(大巴):</label>
330 410 <div class="col-sm-8">
331 411 <input name="warrantVehiclesLarge" class="form-control" type="text">
332 412 </div>
333 413 </div>
334 414 <div class="form-group">
335   - <label class="col-sm-3 control-label">经营权证:</label>
  415 + <label class="col-sm-3 control-label">经营权证(中巴):</label>
336 416 <div class="col-sm-8">
337 417 <input name="warrantVehiclesMiddle" class="form-control" type="text">
338 418 </div>
... ... @@ -344,13 +424,13 @@
344 424 </div>
345 425 </div>
346 426 <div class="form-group">
347   - <label class="col-sm-3 control-label">实际车辆数:</label>
  427 + <label class="col-sm-3 control-label">实际车辆数(大):</label>
348 428 <div class="col-sm-8">
349 429 <input name="numberVehiclesLarge" class="form-control" type="text">
350 430 </div>
351 431 </div>
352 432 <div class="form-group">
353   - <label class="col-sm-3 control-label">实际车辆数:</label>
  433 + <label class="col-sm-3 control-label">实际车辆数(中):</label>
354 434 <div class="col-sm-8">
355 435 <input name="numberVehiclesMiddle" class="form-control" type="text">
356 436 </div>
... ... @@ -424,14 +504,24 @@
424 504 <div class="form-group">
425 505 <label class="col-sm-3 control-label">是否挂牌:</label>
426 506 <div class="col-sm-8">
427   - <input name="hasTimelists" class="form-control" type="text">
  507 + <select name="hasTimelists"
  508 + th:with="type=${@dict.getType('trueFalse')}"
  509 + class="form-control m-b">
  510 + <option value=""></option>
  511 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  512 + th:value="${dict.dictValue}">
  513 + </option>
  514 + </select>
428 515 </div>
429 516 </div>
430 517 <div class="form-group">
431 518 <label class="col-sm-3 control-label">是否轨交末班车衔接:</label>
432   - <div class="col-sm-8">
433   - <input name="isMetro" class="form-control" type="text">
434   - </div>
  519 + <select name="isMetro" th:with="type=${@dict.getType('trueFalse')}"
  520 + class="form-control m-b">
  521 + <option value=""></option>
  522 + <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
  523 + th:value="${dict.dictValue}"></option>
  524 + </select>
435 525 </div>
436 526 <div class="form-group">
437 527 <label class="col-sm-3 control-label">轨交时间:</label>
... ... @@ -445,10 +535,7 @@
445 535 <div class="form-group">
446 536 <label class="col-sm-3 control-label">冷僻线路补贴类型:</label>
447 537 <div class="col-sm-8">
448   - <select name="coldBonusType" class="form-control m-b">
449   - <option value="">所有</option>
450   - </select>
451   - <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
  538 + <input name="coldBonusType" lass="form-control" type="text">
452 539 </div>
453 540 </div>
454 541 <div class="form-group">
... ... @@ -508,12 +595,6 @@
508 595 </div>
509 596 </div>
510 597 </div>
511   - <div class="form-group">
512   - <label class="col-sm-3 control-label">夜间停车场(无):</label>
513   - <div class="col-sm-8">
514   - <input name="nightParking" class="form-control" type="text">
515   - </div>
516   - </div>
517 598 </form>
518 599 </div>
519 600 <th:block th:include="include :: footer" />
... ... @@ -521,7 +602,26 @@
521 602 <script th:inline="javascript">
522 603 var prefix = ctx + "system/line"
523 604 $("#form-line-add").validate({
524   - focusCleanup: true
  605 + rules:{
  606 + isWarrantStartTime:{
  607 + required:function (){
  608 + return $('#isWarrant').val()==='1';
  609 + },
  610 + },
  611 + isWarrantEndTime:{
  612 + required:function (){
  613 + return $('#isWarrant').val()==='1';
  614 + },
  615 + },
  616 + },
  617 + messages: {
  618 + isWarrantStartTime: {
  619 + required: "请选择日期",
  620 + },
  621 + isWarrantEndTime: {
  622 + required: "请选择日期",
  623 + }
  624 + },focusCleanup: true
525 625 });
526 626  
527 627 function submitHandler() {
... ... @@ -577,6 +677,18 @@
577 677 minView: "month",
578 678 autoclose: true
579 679 });
  680 +
  681 + $("input[name='isWarrantStartTime']").datetimepicker({
  682 + format: "yyyy-mm-dd",
  683 + minView: "month",
  684 + autoclose: true
  685 + });
  686 + $("input[name='isWarrantEndTime']").datetimepicker({
  687 + format: "yyyy-mm-dd",
  688 + minView: "month",
  689 + autoclose: trueg
  690 + });
  691 +
580 692 </script>
581 693 </body>
582 694 </html>
583 695 \ No newline at end of file
... ...
bsthLineProfiles/src/main/resources/templates/system/line/edit.html
... ... @@ -283,10 +283,9 @@
283 283 <div class="form-group">
284 284 <label class="col-sm-3 control-label">是否权证:</label>
285 285 <div class="col-sm-8">
286   - <select name="isWarrant"
  286 + <select name="isWarrant" id="isWarrant"
287 287 th:with="type=${@dict.getType('trueFalse')}"
288 288 class="form-control m-b">
289   - <option value=""></option>
290 289 <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
291 290 th:value="${dict.dictValue}"
292 291 th:selected="${#arrays.contains(#strings.toString(bsthTLine.isWarrant== null ? '' : bsthTLine.isWarrant),#strings.toString(dict.dictValue))}"></option>
... ... @@ -294,6 +293,32 @@
294 293 </div>
295 294 </div>
296 295 <div class="form-group">
  296 + <label class="col-sm-3 control-label">权证开通日期:</label>
  297 + <div class="col-sm-8">
  298 + <div class="input-group date">
  299 + <input name="isWarrantStartTime" id="isWarrantStartTime"
  300 + th:value="${#dates.format(bsthTLine.isWarrantStartTime, 'yyyy-MM-dd')}"
  301 + class="form-control" placeholder="yyyy-MM-dd" type="text"
  302 + autocomplete="off"> <span class="input-group-addon"><i
  303 + class="fa fa-calendar"></i></span>
  304 + </div>
  305 +
  306 + </div>
  307 + </div>
  308 + <div class="form-group">
  309 + <label class="col-sm-3 control-label">权证到期日期:</label>
  310 + <div class="col-sm-8">
  311 + <div class="input-group date">
  312 + <input name="isWarrantEndTime" id="isWarrantEndTime"
  313 + th:value="${#dates.format(bsthTLine.isWarrantEndTime, 'yyyy-MM-dd')}"
  314 + class="form-control" placeholder="yyyy-MM-dd" type="text"
  315 + autocomplete="off"> <span class="input-group-addon"><i
  316 + class="fa fa-calendar"></i></span>
  317 + </div>
  318 +
  319 + </div>
  320 + </div>
  321 + <div class="form-group">
297 322 <label class="col-sm-3 control-label">道路类型:</label>
298 323 <div class="col-sm-8">
299 324 <div class="col-sm-8" th:with="type=${@dict.getType('roadType')}">
... ... @@ -641,7 +666,6 @@
641 666 <select name="lineUpdateType"
642 667 th:with="type=${@dict.getType('lineUpdateType')}"
643 668 class="form-control m-b">
644   - <option value=""></option>
645 669 <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
646 670 th:value="${dict.dictValue}"></option>
647 671 </select>
... ... @@ -774,6 +798,26 @@
774 798 }
775 799  
776 800 $("#form-line-edit").validate({
  801 + rules:{
  802 + isWarrantStartTime:{
  803 + required:function (){
  804 + return $('#isWarrant').val()==='1';
  805 + },
  806 + },
  807 + isWarrantEndTime:{
  808 + required:function (){
  809 + return $('#isWarrant').val()==='1';
  810 + },
  811 + },
  812 + },
  813 + messages: {
  814 + isWarrantStartTime: {
  815 + required: "请选择日期",
  816 + },
  817 + isWarrantEndTime: {
  818 + required: "请选择日期",
  819 + }
  820 + },
777 821 focusCleanup : true
778 822 });
779 823  
... ... @@ -834,6 +878,19 @@
834 878 minView : "month",
835 879 autoclose : true
836 880 });
  881 +
  882 + $("input[name='isWarrantStartTime']").datetimepicker({
  883 + format : "yyyy-mm-dd",
  884 + minView : "month",
  885 + autoclose : true
  886 + });
  887 +
  888 + $("input[name='isWarrantEndTime']").datetimepicker({
  889 + format : "yyyy-mm-dd",
  890 + minView : "month",
  891 + autoclose : true
  892 + });
  893 +
837 894 </script>
838 895 </body>
839 896 </html>
840 897 \ No newline at end of file
... ...
bsthLineProfiles/src/main/resources/templates/system/line/line.html
... ... @@ -220,7 +220,9 @@
220 220 <div class="btn-group-sm" id="toolbar" role="group">
221 221  
222 222 <el-button plain size="mini" type="success" icon="el-icon-search" onClick="$.table.search();" data-toggle="modal" data-target="#myModal">选择显示的列</el-button>
223   -
  223 +
  224 + <el-button plain size="mini" type="primary" icon="el-icon-plus" onClick="add(this);" shiro:hasPermission="system:line:add">新增</el-button>
  225 +
224 226 <el-button plain size="mini" type="primary" icon="el-icon-edit" onClick="edit(this);" class="btn single disabled" shiro:hasPermission="system:line:edit">修改</el-button>
225 227  
226 228 <el-button plain size="mini" type="danger" icon="el-icon-delete" onClick="remove(this);" class="btn multiple disabled" shiro:hasPermission="system:line:remove"> 删除</el-button>
... ... @@ -261,7 +263,12 @@
261 263  
262 264  
263 265 <script th:inline="javascript">
264   -
  266 +
  267 + function add(obj){
  268 + if($(obj)[0].className.indexOf("disabled") == -1)
  269 + $.operate.add();
  270 +
  271 + }
265 272  
266 273 function edit(obj){
267 274 if($(obj)[0].className.indexOf("disabled") == -1)
... ... @@ -289,15 +296,15 @@
289 296  
290 297 function initTable(){
291 298 var objs = $("#cols div");
292   -
293   -
  299 +
  300 +
294 301 var data = [];
295 302  
296 303 for(var i = 0;i< objs.length;i++){
297 304 var name = $(objs[i]).find("input")[0].name;
298 305 var text = $(objs[i]).find("label")[0].innerText;
299 306 var checked = $(objs[i]).find("input")[0].checked;
300   -
  307 +
301 308 data.push({
302 309 name:name,
303 310 text:text,
... ... @@ -306,12 +313,12 @@
306 313 }
307 314  
308 315 createTable(data);
309   -
  316 +
310 317 $.post("/system/line/updateUserLineInfo",{lineInfo:JSON.stringify(data)},function(data){
311 318 $.modal.msg(data.msg);
312 319 });
313 320 }
314   -
  321 +
315 322 function createTable(objs){
316 323 var options = {
317 324 url: prefix + "/list",
... ... @@ -320,7 +327,16 @@
320 327 removeUrl: prefix + "/remove",
321 328 exportUrl: prefix + "/export",
322 329 modalName: "线路档案信息",
323   - columns: []
  330 + columns: [],
  331 + rowStyle:function(row,index) {
  332 + var flag=DateMinus(row.isWarrantEndTime);
  333 + if(row.isWarrant==='1'&&!flag){
  334 + var strClass='danger';
  335 + return {classes:strClass};
  336 + }
  337 + return "";
  338 +
  339 + }
324 340 };
325 341  
326 342  
... ... @@ -337,27 +353,27 @@
337 353 visible:objs[i].checked,
338 354 align: 'center',
339 355 formatter: function(value, row, index) {
340   -
341   -
  356 +
  357 +
342 358 if(this.field == "roadType" || this.field == "busType"){
343 359 if(value != null){
344   -
  360 +
345 361 var arr = value.split(",");
346 362 value = "";
347 363 for(var i in arr){
348   -
  364 +
349 365 for(var j in dicts[this.field]){
350 366 if(dicts[this.field][j].dictValue == arr[i]){
351 367 value += dicts[this.field][j].dictLabel + ","
352 368 break;
353 369 }
354 370 }
355   -
  371 +
356 372 }
357 373 return $.table.tooltip(value.substring(0,value.length -1), 5);
358 374 }
359 375 }
360   -
  376 +
361 377 if(this.field == "isLogicDelete" || this.field == "inoutDistrict"|| this.field == "isMetro" || this.field == "hasTimelists"){
362 378 for(var j in dicts["trueFalse"]){
363 379 if(dicts["trueFalse"][j].dictValue == value){
... ... @@ -366,9 +382,9 @@
366 382 }
367 383 }
368 384 }
369   -
370   -
371   -
  385 +
  386 +
  387 +
372 388 if(dicts[this.field]){
373 389 for(var j in dicts[this.field]){
374 390 if(dicts[this.field][j].dictValue == value){
... ... @@ -377,7 +393,7 @@
377 393 }
378 394 }
379 395 }
380   -
  396 +
381 397 return $.table.tooltip(value, 5);
382 398 }
383 399 }
... ... @@ -400,7 +416,7 @@
400 416 }
401 417  
402 418 options.columns.push(col);
403   -
  419 +
404 420 }
405 421  
406 422 $.table.destroy();
... ... @@ -440,12 +456,12 @@
440 456 }
441 457  
442 458 dicts = allDicts;
443   -
444   -
  459 +
  460 +
445 461  
446 462  
447 463  
448   -
  464 +
449 465 var cols = [{
450 466 field: 'lineName',
451 467 title: '线路名称'
... ... @@ -562,6 +578,14 @@
562 578 field: 'isWarrant',
563 579 title: '是否权证'
564 580 },
  581 + {
  582 + field: 'isWarrantStartTime',
  583 + title: '权证开通日期'
  584 + },
  585 + {
  586 + field: 'isWarrantEndTime',
  587 + title: '权证到期日期'
  588 + },
565 589 {
566 590 field: 'roadType',
567 591 title: '道路类型'
... ... @@ -741,8 +765,25 @@
741 765 }
742 766 });
743 767  
744   -
  768 +
745 769 });
  770 +
  771 +
  772 + function DateMinus(date1){
  773 + if(date1==null){
  774 + return true;
  775 + }
  776 +
  777 + var sdate = new Date(date1);
  778 + var now = new Date();
  779 + var days = sdate.getTime()-now.getTime();
  780 + var day = parseInt(days / (1000 * 60 * 60 * 24));
  781 + console.log(day);
  782 + if(day<120){
  783 + return false;
  784 + }
  785 + return true;
  786 + }
746 787 </script>
747 788  
748 789 <style>
... ...