Commit a91199a8a10d0258367c299f37ff59a02aa999b9
Merge branch 'minhang' of http://222.66.0.204:8800/panzhaov5/bsth_control into minhang
Showing
34 changed files
with
1949 additions
and
204 deletions
src/main/java/com/bsth/controller/BaseController.java
| @@ -3,6 +3,7 @@ package com.bsth.controller; | @@ -3,6 +3,7 @@ package com.bsth.controller; | ||
| 3 | import com.bsth.common.ResponseCode; | 3 | import com.bsth.common.ResponseCode; |
| 4 | import com.bsth.service.BaseService; | 4 | import com.bsth.service.BaseService; |
| 5 | import com.bsth.service.schedule.utils.DataImportExportService; | 5 | import com.bsth.service.schedule.utils.DataImportExportService; |
| 6 | +import com.google.common.base.Splitter; | ||
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.data.domain.Page; | 8 | import org.springframework.data.domain.Page; |
| 8 | import org.springframework.data.domain.PageRequest; | 9 | import org.springframework.data.domain.PageRequest; |
| @@ -17,6 +18,7 @@ import org.springframework.web.multipart.MultipartFile; | @@ -17,6 +18,7 @@ import org.springframework.web.multipart.MultipartFile; | ||
| 17 | import javax.servlet.http.HttpServletResponse; | 18 | import javax.servlet.http.HttpServletResponse; |
| 18 | import java.io.*; | 19 | import java.io.*; |
| 19 | import java.util.HashMap; | 20 | import java.util.HashMap; |
| 21 | +import java.util.List; | ||
| 20 | import java.util.Map; | 22 | import java.util.Map; |
| 21 | 23 | ||
| 22 | /** | 24 | /** |
| @@ -58,8 +60,12 @@ public class BaseController<T, ID extends Serializable> { | @@ -58,8 +60,12 @@ public class BaseController<T, ID extends Serializable> { | ||
| 58 | d = Direction.ASC; | 60 | d = Direction.ASC; |
| 59 | else | 61 | else |
| 60 | d = Direction.DESC; | 62 | d = Direction.DESC; |
| 61 | - | ||
| 62 | - return baseService.list(map, new PageRequest(page, size, new Sort(d, order))); | 63 | + |
| 64 | + // 允许多个字段排序,order可以写单个字段,也可以写多个字段 | ||
| 65 | + // 多个字段格式:{col1},{col2},{col3},....,{coln} | ||
| 66 | + // 每个字段的排序方向都是一致,这个以后再看要不要改 | ||
| 67 | + List<String> list = Splitter.on(",").trimResults().splitToList(order); | ||
| 68 | + return baseService.list(map, new PageRequest(page, size, new Sort(d, list))); | ||
| 63 | } | 69 | } |
| 64 | 70 | ||
| 65 | /** | 71 | /** |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| @@ -298,8 +298,8 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -298,8 +298,8 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 298 | 298 | ||
| 299 | @RequestMapping(value = "/exportWaybill") | 299 | @RequestMapping(value = "/exportWaybill") |
| 300 | public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName, @RequestParam String clZbh, | 300 | public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName, @RequestParam String clZbh, |
| 301 | - @RequestParam String lpName) { | ||
| 302 | - return scheduleRealInfoService.exportWaybill(jName, clZbh, lpName); | 301 | + @RequestParam String lpName,@RequestParam String date) { |
| 302 | + return scheduleRealInfoService.exportWaybill(jName, clZbh, lpName,date); | ||
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | @RequestMapping(value = "/dailyInfo") | 305 | @RequestMapping(value = "/dailyInfo") |
| @@ -319,8 +319,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -319,8 +319,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | @RequestMapping(value="/findKMBC") | 321 | @RequestMapping(value="/findKMBC") |
| 322 | - public Map<String,Object> findKMBC(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName){ | ||
| 323 | - return scheduleRealInfoService.findKMBC(jName, clZbh,lpName); | 322 | + public Map<String,Object> findKMBC(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName |
| 323 | + ,@RequestParam String date){ | ||
| 324 | + return scheduleRealInfoService.findKMBC(jName, clZbh,lpName,date); | ||
| 324 | } | 325 | } |
| 325 | 326 | ||
| 326 | @RequestMapping(value="/findLpName") | 327 | @RequestMapping(value="/findLpName") |
| @@ -348,8 +349,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -348,8 +349,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 348 | * @return | 349 | * @return |
| 349 | */ | 350 | */ |
| 350 | @RequestMapping(value="/queryListWaybill") | 351 | @RequestMapping(value="/queryListWaybill") |
| 351 | - public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName){ | ||
| 352 | - return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName); | 352 | + public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName |
| 353 | + ,@RequestParam String date){ | ||
| 354 | + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date); | ||
| 353 | } | 355 | } |
| 354 | 356 | ||
| 355 | @RequestMapping(value="/statisticsDaily") | 357 | @RequestMapping(value="/statisticsDaily") |
src/main/java/com/bsth/controller/schedule/SchedulePlanInfoController.java
| @@ -2,18 +2,9 @@ package com.bsth.controller.schedule; | @@ -2,18 +2,9 @@ package com.bsth.controller.schedule; | ||
| 2 | 2 | ||
| 3 | import com.bsth.controller.BaseController; | 3 | import com.bsth.controller.BaseController; |
| 4 | import com.bsth.entity.schedule.SchedulePlanInfo; | 4 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 5 | -import com.google.common.base.Splitter; | ||
| 6 | -import org.springframework.data.domain.Page; | ||
| 7 | -import org.springframework.data.domain.PageRequest; | ||
| 8 | -import org.springframework.data.domain.Sort; | ||
| 9 | import org.springframework.web.bind.annotation.RequestMapping; | 5 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 11 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 12 | import org.springframework.web.bind.annotation.RestController; | 6 | import org.springframework.web.bind.annotation.RestController; |
| 13 | 7 | ||
| 14 | -import java.util.List; | ||
| 15 | -import java.util.Map; | ||
| 16 | - | ||
| 17 | /** | 8 | /** |
| 18 | * Created by xu on 16/6/16. | 9 | * Created by xu on 16/6/16. |
| 19 | */ | 10 | */ |
| @@ -21,32 +12,4 @@ import java.util.Map; | @@ -21,32 +12,4 @@ import java.util.Map; | ||
| 21 | @RequestMapping("spic") | 12 | @RequestMapping("spic") |
| 22 | public class SchedulePlanInfoController extends BaseController<SchedulePlanInfo, Long> { | 13 | public class SchedulePlanInfoController extends BaseController<SchedulePlanInfo, Long> { |
| 23 | 14 | ||
| 24 | - /** | ||
| 25 | - * | ||
| 26 | - * @Title: list | ||
| 27 | - * @Description: TODO(多条件分页查询) | ||
| 28 | - * @param @param map 查询条件 | ||
| 29 | - * @param @param page 页码 | ||
| 30 | - * @param @param size 每页显示数量 | ||
| 31 | - * @throws | ||
| 32 | - */ | ||
| 33 | - @RequestMapping(method = RequestMethod.GET) | ||
| 34 | - public Page<SchedulePlanInfo> list(@RequestParam Map<String, Object> map, | ||
| 35 | - @RequestParam(defaultValue = "0") int page, | ||
| 36 | - @RequestParam(defaultValue = "10") int size, | ||
| 37 | - @RequestParam(defaultValue = "id") String order, | ||
| 38 | - @RequestParam(defaultValue = "DESC") String direction){ | ||
| 39 | - | ||
| 40 | - Sort.Direction d; | ||
| 41 | - | ||
| 42 | - if(null != direction && direction.equals("ASC")) | ||
| 43 | - d = Sort.Direction.ASC; | ||
| 44 | - else | ||
| 45 | - d = Sort.Direction.DESC; | ||
| 46 | - | ||
| 47 | - // order由 col1,col2,col3 这样传入 | ||
| 48 | - List<String> list = Splitter.on(",").trimResults().splitToList(order); | ||
| 49 | - return baseService.list(map, new PageRequest(page, size, new Sort(d, list))); | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | } | 15 | } |
src/main/java/com/bsth/controller/sys/UserLineController.java
0 → 100644
| 1 | +package com.bsth.controller.sys; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import java.util.Map; | ||
| 5 | + | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 8 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 10 | +import org.springframework.web.bind.annotation.RestController; | ||
| 11 | + | ||
| 12 | +import com.bsth.controller.BaseController; | ||
| 13 | +import com.bsth.entity.sys.UserLine; | ||
| 14 | +import com.bsth.service.sys.UserLineService; | ||
| 15 | + | ||
| 16 | +@RestController | ||
| 17 | +@RequestMapping("userline") | ||
| 18 | +public class UserLineController extends BaseController<UserLine, Integer> { | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + @Autowired | ||
| 22 | + private UserLineService service; | ||
| 23 | + | ||
| 24 | + @RequestMapping(value = "/userRoleTree", method = RequestMethod.GET) | ||
| 25 | + public List<Map<String, Object>> userRoleTree(@RequestParam Map<String, Object> map){ | ||
| 26 | + | ||
| 27 | + return service.userRoleTree(map); | ||
| 28 | + | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * | ||
| 33 | + * @Title: setLineCasts | ||
| 34 | + * | ||
| 35 | + * @Description: TODO(为角色设置模块,全量覆盖) | ||
| 36 | + * | ||
| 37 | + * @param @param userId 用户ID | ||
| 38 | + * | ||
| 39 | + * @param @param mIds 线路ID字符串(1,2,3,4) | ||
| 40 | + * | ||
| 41 | + * @throws | ||
| 42 | + */ | ||
| 43 | + @RequestMapping(value = "/setLineCasts", method = RequestMethod.POST) | ||
| 44 | + public Map<String, Object> setLineCasts(@RequestParam Integer userId,@RequestParam String mIds){ | ||
| 45 | + return service.setLineCasts(userId, mIds); | ||
| 46 | + } | ||
| 47 | +} |
src/main/java/com/bsth/entity/LineInformation.java
| @@ -100,6 +100,94 @@ public class LineInformation { | @@ -100,6 +100,94 @@ public class LineInformation { | ||
| 100 | // 进场里程 | 100 | // 进场里程 |
| 101 | private Double paradeMileage; | 101 | private Double paradeMileage; |
| 102 | 102 | ||
| 103 | + // 上行进场时间 | ||
| 104 | + private Double upInTimer; | ||
| 105 | + | ||
| 106 | + // 上行出场时间 | ||
| 107 | + private Double upOutTimer; | ||
| 108 | + | ||
| 109 | + // 下行进场时间 | ||
| 110 | + private Double downInTimer; | ||
| 111 | + | ||
| 112 | + // 下行出场时间 | ||
| 113 | + private Double downOutTimer; | ||
| 114 | + | ||
| 115 | + // 上行进场里程 | ||
| 116 | + private Double upInMileage; | ||
| 117 | + | ||
| 118 | + // 上行出场里程 | ||
| 119 | + private Double upOutMileage; | ||
| 120 | + | ||
| 121 | + // 下行进场里程 | ||
| 122 | + private Double downInMileage; | ||
| 123 | + | ||
| 124 | + // 下行出场里程 | ||
| 125 | + private Double downOutMileage; | ||
| 126 | + | ||
| 127 | + public Double getUpInTimer() { | ||
| 128 | + return upInTimer; | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + public void setUpInTimer(Double upInTimer) { | ||
| 132 | + this.upInTimer = upInTimer; | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + public Double getUpOutTimer() { | ||
| 136 | + return upOutTimer; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + public void setUpOutTimer(Double upOutTimer) { | ||
| 140 | + this.upOutTimer = upOutTimer; | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + public Double getDownInTimer() { | ||
| 144 | + return downInTimer; | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + public void setDownInTimer(Double downInTimer) { | ||
| 148 | + this.downInTimer = downInTimer; | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + public Double getDownOutTimer() { | ||
| 152 | + return downOutTimer; | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + public void setDownOutTimer(Double downOutTimer) { | ||
| 156 | + this.downOutTimer = downOutTimer; | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + public Double getUpInMileage() { | ||
| 160 | + return upInMileage; | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + public void setUpInMileage(Double upInMileage) { | ||
| 164 | + this.upInMileage = upInMileage; | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + public Double getUpOutMileage() { | ||
| 168 | + return upOutMileage; | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + public void setUpOutMileage(Double upOutMileage) { | ||
| 172 | + this.upOutMileage = upOutMileage; | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + public Double getDownInMileage() { | ||
| 176 | + return downInMileage; | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + public void setDownInMileage(Double downInMileage) { | ||
| 180 | + this.downInMileage = downInMileage; | ||
| 181 | + } | ||
| 182 | + | ||
| 183 | + public Double getDownOutMileage() { | ||
| 184 | + return downOutMileage; | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + public void setDownOutMileage(Double downOutMileage) { | ||
| 188 | + this.downOutMileage = downOutMileage; | ||
| 189 | + } | ||
| 190 | + | ||
| 103 | // 出场里程 | 191 | // 出场里程 |
| 104 | private Double outMileage; | 192 | private Double outMileage; |
| 105 | 193 |
src/main/java/com/bsth/entity/sys/UserLine.java
0 → 100644
| 1 | +package com.bsth.entity.sys; | ||
| 2 | + | ||
| 3 | +import javax.persistence.Entity; | ||
| 4 | +import javax.persistence.GeneratedValue; | ||
| 5 | +import javax.persistence.GenerationType; | ||
| 6 | +import javax.persistence.Id; | ||
| 7 | +import javax.persistence.ManyToOne; | ||
| 8 | +import javax.persistence.Table; | ||
| 9 | + | ||
| 10 | +import com.bsth.entity.Line; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * | ||
| 14 | + * @ClassName: Line(用户线路分配实体类) | ||
| 15 | + * | ||
| 16 | + * @Description: TODO(用户线路分配实体类) | ||
| 17 | + * | ||
| 18 | + * @Author bsth@lq | ||
| 19 | + * | ||
| 20 | + * @Date 2016年8月26日 09:03:33 | ||
| 21 | + * | ||
| 22 | + * @Version 公交调度系统BS版 0.1 | ||
| 23 | + * | ||
| 24 | + */ | ||
| 25 | + | ||
| 26 | +@Entity | ||
| 27 | +@Table(name = "bsth_c_user_line") | ||
| 28 | +public class UserLine { | ||
| 29 | + | ||
| 30 | + @Id | ||
| 31 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 32 | + private Integer id; | ||
| 33 | + | ||
| 34 | + @ManyToOne | ||
| 35 | + private Line line; | ||
| 36 | + | ||
| 37 | + @ManyToOne | ||
| 38 | + private SysUser user; | ||
| 39 | + | ||
| 40 | + public Line getLine() { | ||
| 41 | + return line; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public Integer getId() { | ||
| 45 | + return id; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public void setId(Integer id) { | ||
| 49 | + this.id = id; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public void setLine(Line line) { | ||
| 53 | + this.line = line; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public SysUser getUser() { | ||
| 57 | + return user; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public void setUser(SysUser user) { | ||
| 61 | + this.user = user; | ||
| 62 | + } | ||
| 63 | +} |
src/main/java/com/bsth/repository/CarParkRepository.java
| @@ -66,9 +66,9 @@ public interface CarParkRepository extends BaseRepository<CarPark, Integer>{ | @@ -66,9 +66,9 @@ public interface CarParkRepository extends BaseRepository<CarPark, Integer>{ | ||
| 66 | "k.update_date AS carParkUpdateDate," + | 66 | "k.update_date AS carParkUpdateDate," + |
| 67 | "k.versions AS carParkVersions," + | 67 | "k.versions AS carParkVersions," + |
| 68 | "k.b_center_point AS carParkBcenterPoint," + | 68 | "k.b_center_point AS carParkBcenterPoint," + |
| 69 | - "AsText(k.b_park_point) AS carParkBparkPoint," + | 69 | + "ST_AsText(k.b_park_point) AS carParkBparkPoint," + |
| 70 | "k.g_center_point AS carParkGcenterPoint," + | 70 | "k.g_center_point AS carParkGcenterPoint," + |
| 71 | - "AsText(k.g_park_point) AS carParkGparkPoint, " + | 71 | + "ST_AsText(k.g_park_point) AS carParkGparkPoint, " + |
| 72 | "k.db_type AS carParkDBtype," + | 72 | "k.db_type AS carParkDBtype," + |
| 73 | "k.radius AS carParkRadius," + | 73 | "k.radius AS carParkRadius," + |
| 74 | "k.shapes_type AS carParkShapesType FROM bsth_c_car_park k where k.id = ?1", nativeQuery=true) | 74 | "k.shapes_type AS carParkShapesType FROM bsth_c_car_park k where k.id = ?1", nativeQuery=true) |
src/main/java/com/bsth/repository/LineRepository.java
| @@ -36,6 +36,6 @@ public interface LineRepository extends BaseRepository<Line, Integer> { | @@ -36,6 +36,6 @@ public interface LineRepository extends BaseRepository<Line, Integer> { | ||
| 36 | 36 | ||
| 37 | @Query(value = " SELECT l FROM Line l where l.name like ?1") | 37 | @Query(value = " SELECT l FROM Line l where l.name like ?1") |
| 38 | List<Line> findLine(String line); | 38 | List<Line> findLine(String line); |
| 39 | - | 39 | + |
| 40 | public Line findByLineCode(String string); | 40 | public Line findByLineCode(String string); |
| 41 | } | 41 | } |
src/main/java/com/bsth/repository/SectionRouteRepository.java
| @@ -51,8 +51,8 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -51,8 +51,8 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 51 | " b.middle_node AS sectionMiddleNode," + | 51 | " b.middle_node AS sectionMiddleNode," + |
| 52 | " b.section_type AS sectionType," + | 52 | " b.section_type AS sectionType," + |
| 53 | " b.csection_vector AS sectionCsectionVector," + | 53 | " b.csection_vector AS sectionCsectionVector," + |
| 54 | - " AsText(b.bsection_vector) AS sectionBsectionVector," + | ||
| 55 | - " AsText(b.gsection_vector) AS sectionGsectionVector," + | 54 | + " ST_AsText(b.bsection_vector) AS sectionBsectionVector," + |
| 55 | + " ST_AsText(b.gsection_vector) AS sectionGsectionVector," + | ||
| 56 | " b.road_coding AS sectionRoadCoding," + | 56 | " b.road_coding AS sectionRoadCoding," + |
| 57 | " b.section_distance AS sectionDistance," + | 57 | " b.section_distance AS sectionDistance," + |
| 58 | " b.section_time AS sectionTime," + | 58 | " b.section_time AS sectionTime," + |
| @@ -101,9 +101,9 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -101,9 +101,9 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 101 | "b.start_node AS sectionStartNode," + | 101 | "b.start_node AS sectionStartNode," + |
| 102 | "b.middle_node AS sectionMiddleNode," + | 102 | "b.middle_node AS sectionMiddleNode," + |
| 103 | "b.section_type AS sectionType," + | 103 | "b.section_type AS sectionType," + |
| 104 | - "AsText(b.csection_vector) AS sectionCsectionVector," + | ||
| 105 | - "AsText(b.bsection_vector) AS sectionBsectionVector," + | ||
| 106 | - "AsText(b.gsection_vector) AS sectionGsectionVector," + | 104 | + "ST_AsText(b.csection_vector) AS sectionCsectionVector," + |
| 105 | + "ST_AsText(b.bsection_vector) AS sectionBsectionVector," + | ||
| 106 | + "ST_AsText(b.gsection_vector) AS sectionGsectionVector," + | ||
| 107 | "b.section_distance AS sectionDistance," + | 107 | "b.section_distance AS sectionDistance," + |
| 108 | "b.section_time AS sectionTime," + | 108 | "b.section_time AS sectionTime," + |
| 109 | "b.db_type AS sectionDbtype," + | 109 | "b.db_type AS sectionDbtype," + |
| @@ -151,7 +151,7 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -151,7 +151,7 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 151 | */ | 151 | */ |
| 152 | @Query(value = "SELECT " + | 152 | @Query(value = "SELECT " + |
| 153 | "c.directions," + | 153 | "c.directions," + |
| 154 | - "AsText(s.bsection_vector) as bsection_vector," + | 154 | + "ST_AsText(s.bsection_vector) as bsection_vector," + |
| 155 | "s.speed_limit," + | 155 | "s.speed_limit," + |
| 156 | "s.section_name " + | 156 | "s.section_name " + |
| 157 | " FROM bsth_c_sectionroute c " + | 157 | " FROM bsth_c_sectionroute c " + |
src/main/java/com/bsth/repository/StationRouteRepository.java
| @@ -3,7 +3,7 @@ package com.bsth.repository; | @@ -3,7 +3,7 @@ package com.bsth.repository; | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import java.util.Map; | 4 | import java.util.Map; |
| 5 | 5 | ||
| 6 | - | 6 | +import com.bsth.entity.schedule.CarConfigInfo; |
| 7 | import org.springframework.data.domain.Page; | 7 | import org.springframework.data.domain.Page; |
| 8 | import org.springframework.data.domain.Pageable; | 8 | import org.springframework.data.domain.Pageable; |
| 9 | import org.springframework.data.jpa.domain.Specification; | 9 | import org.springframework.data.jpa.domain.Specification; |
| @@ -14,6 +14,7 @@ import org.springframework.stereotype.Repository; | @@ -14,6 +14,7 @@ import org.springframework.stereotype.Repository; | ||
| 14 | import org.springframework.transaction.annotation.Transactional; | 14 | import org.springframework.transaction.annotation.Transactional; |
| 15 | 15 | ||
| 16 | import com.bsth.entity.Line; | 16 | import com.bsth.entity.Line; |
| 17 | +import com.bsth.entity.LineInformation; | ||
| 17 | import com.bsth.entity.StationRoute; | 18 | import com.bsth.entity.StationRoute; |
| 18 | 19 | ||
| 19 | /** | 20 | /** |
| @@ -62,8 +63,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -62,8 +63,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 62 | "b.y AS 'station.y'," + | 63 | "b.y AS 'station.y'," + |
| 63 | "b.shapes_type AS 'station.shapesType'," + | 64 | "b.shapes_type AS 'station.shapesType'," + |
| 64 | "b.radius AS 'station.radius'," + | 65 | "b.radius AS 'station.radius'," + |
| 65 | - "AsText(b.g_polygon_grid) AS 'station.gPolygonGrid'," + | ||
| 66 | - "AsText(b.b_polygon_grid) AS 'station.bPolygonGrid'," + | 66 | + "ST_AsText(b.g_polygon_grid) AS 'station.gPolygonGrid'," + |
| 67 | + "ST_AsText(b.b_polygon_grid) AS 'station.bPolygonGrid'," + | ||
| 67 | "b.destroy AS 'station.destroy'," + | 68 | "b.destroy AS 'station.destroy'," + |
| 68 | "b.versions AS 'station.versions'," + | 69 | "b.versions AS 'station.versions'," + |
| 69 | "b.descriptions AS 'station.descriptions' FROM (" + | 70 | "b.descriptions AS 'station.descriptions' FROM (" + |
| @@ -108,7 +109,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -108,7 +109,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 108 | * | 109 | * |
| 109 | * @return List<Object[]> | 110 | * @return List<Object[]> |
| 110 | */ | 111 | */ |
| 111 | - @Query(value = "SELECT s.b_jwpoints FROM (" + | 112 | + @Query(value = "SELECT s.b_jwpoints,s.station_name FROM (" + |
| 112 | "SELECT b.station FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " + | 113 | "SELECT b.station FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " + |
| 113 | "LEFT JOIN bsth_c_station s on r.station = s.id", nativeQuery=true) | 114 | "LEFT JOIN bsth_c_station s on r.station = s.id", nativeQuery=true) |
| 114 | List<Object[]> getSelectStationRouteCenterPoints(Integer lineId,Integer direction); | 115 | List<Object[]> getSelectStationRouteCenterPoints(Integer lineId,Integer direction); |
| @@ -190,8 +191,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -190,8 +191,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 190 | " b.g_laty AS stationGlaty," + | 191 | " b.g_laty AS stationGlaty," + |
| 191 | " b.x AS stationX," + | 192 | " b.x AS stationX," + |
| 192 | " b.y AS stationY," + | 193 | " b.y AS stationY," + |
| 193 | - " AsText(b.b_polygon_grid) as stationBPolyonGrid," + | ||
| 194 | - " AsText(b.g_polygon_grid) AS stationGPloyonGrid, " + | 194 | + " ST_AsText(b.b_polygon_grid) as stationBPolyonGrid," + |
| 195 | + " ST_AsText(b.g_polygon_grid) AS stationGPloyonGrid, " + | ||
| 195 | " b.destroy AS stationDestroy," + | 196 | " b.destroy AS stationDestroy," + |
| 196 | " b.radius AS stationRadius," + | 197 | " b.radius AS stationRadius," + |
| 197 | " b.shapes_type AS stationShapesType," + | 198 | " b.shapes_type AS stationShapesType," + |
| @@ -226,17 +227,10 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -226,17 +227,10 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 226 | 227 | ||
| 227 | List<StationRoute> findByLine(Line line); | 228 | List<StationRoute> findByLine(Line line); |
| 228 | 229 | ||
| 229 | - @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH) | ||
| 230 | - @Override | ||
| 231 | - Page<StationRoute> findAll(Specification<StationRoute> spec, Pageable pageable); | ||
| 232 | - | ||
| 233 | - @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH) | ||
| 234 | - @Override | ||
| 235 | - List<StationRoute> findAll(Specification<StationRoute> spec); | ||
| 236 | - | 230 | + @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH) |
| 231 | + @Query("select s from StationRoute s where s.destroy=0") | ||
| 232 | + List<StationRoute> findAll2(); | ||
| 237 | 233 | ||
| 238 | @Query("select new map(sr.station.id as stationid, sr.stationName as stationname) from StationRoute sr where sr.line.id=?1 and sr.directions=?2") | 234 | @Query("select new map(sr.station.id as stationid, sr.stationName as stationname) from StationRoute sr where sr.line.id=?1 and sr.directions=?2") |
| 239 | List<Map<String, Object>> findStations(Integer xlid, Integer xldir); | 235 | List<Map<String, Object>> findStations(Integer xlid, Integer xldir); |
| 240 | - | ||
| 241 | - | ||
| 242 | } | 236 | } |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -20,10 +20,10 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -20,10 +20,10 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 20 | List<ScheduleRealInfo> findByLines(List<String> lines); | 20 | List<ScheduleRealInfo> findByLines(List<String> lines); |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | - @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by jName,clZbh,lpName") | 23 | + @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.bcType = 'out' order by (lpName+1)") |
| 24 | List<ScheduleRealInfo> queryUserInfo(String line,String date); | 24 | List<ScheduleRealInfo> queryUserInfo(String line,String date); |
| 25 | 25 | ||
| 26 | - @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 order by fcsj") | 26 | + @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 order by bcs") |
| 27 | List<ScheduleRealInfo> exportWaybill(String jName,String clZbh,String lpName); | 27 | List<ScheduleRealInfo> exportWaybill(String jName,String clZbh,String lpName); |
| 28 | 28 | ||
| 29 | @Query(value="select new map(clZbh as clZbh,jGh as jGh,jName as jName,sum(jhlc) as zgl,sum(addMileage) as ksgl,count(jName) as bcs) from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by clZbh,jGh") | 29 | @Query(value="select new map(clZbh as clZbh,jGh as jGh,jName as jName,sum(jhlc) as zgl,sum(addMileage) as ksgl,count(jName) as bcs) from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by clZbh,jGh") |
| @@ -54,8 +54,8 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -54,8 +54,8 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 54 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDate >= str_to_date(?2,'%Y-%m-%d') and s.scheduleDate <= str_to_date(?3,'%Y-%m-%d') and s.lpName = ?4 order by s.fcsj") | 54 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDate >= str_to_date(?2,'%Y-%m-%d') and s.scheduleDate <= str_to_date(?3,'%Y-%m-%d') and s.lpName = ?4 order by s.fcsj") |
| 55 | List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName); | 55 | List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName); |
| 56 | 56 | ||
| 57 | - @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 order by fcsj") | ||
| 58 | - List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName); | 57 | + @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDate <= str_to_date(?4,'%Y-%m-%d') order by bcs") |
| 58 | + List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date); | ||
| 59 | 59 | ||
| 60 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") | 60 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") |
| 61 | List<ScheduleRealInfo> scheduleDaily(String line,String date); | 61 | List<ScheduleRealInfo> scheduleDaily(String line,String date); |
src/main/java/com/bsth/repository/sys/UserLineRepository.java
0 → 100644
| 1 | +package com.bsth.repository.sys; | ||
| 2 | + | ||
| 3 | +import org.springframework.data.jpa.repository.Modifying; | ||
| 4 | +import org.springframework.data.jpa.repository.Query; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | +import org.springframework.transaction.annotation.Transactional; | ||
| 7 | + | ||
| 8 | +import com.bsth.entity.sys.UserLine; | ||
| 9 | +import com.bsth.repository.BaseRepository; | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +@Repository | ||
| 13 | +public interface UserLineRepository extends BaseRepository<UserLine, Integer>{ | ||
| 14 | + | ||
| 15 | + @Modifying | ||
| 16 | + @Query(value="DELETE FROM bsth_c_user_line WHERE user = ?1", nativeQuery=true) | ||
| 17 | + public void del(int userId); | ||
| 18 | + | ||
| 19 | +} |
src/main/java/com/bsth/service/impl/LineServiceImpl.java
| @@ -38,9 +38,10 @@ public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements L | @@ -38,9 +38,10 @@ public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements L | ||
| 38 | // TODO Auto-generated method stub | 38 | // TODO Auto-generated method stub |
| 39 | return repository.selectMaxIdToLineCode(); | 39 | return repository.selectMaxIdToLineCode(); |
| 40 | } | 40 | } |
| 41 | - | 41 | + |
| 42 | @Override | 42 | @Override |
| 43 | public Line findByLineCode(Integer lineCode) { | 43 | public Line findByLineCode(Integer lineCode) { |
| 44 | return repository.findByLineCode(lineCode + ""); | 44 | return repository.findByLineCode(lineCode + ""); |
| 45 | } | 45 | } |
| 46 | + | ||
| 46 | } | 47 | } |
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| @@ -457,7 +457,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -457,7 +457,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 457 | 457 | ||
| 458 | Map<String, Object> tempM = new HashMap<String,Object>(); | 458 | Map<String, Object> tempM = new HashMap<String,Object>(); |
| 459 | 459 | ||
| 460 | - tempM.put("bJwpoints", list.get(i)); | 460 | + tempM.put("bJwpoints", list.get(i)[0]); |
| 461 | + | ||
| 462 | + tempM.put("stationName", list.get(i)[1]); | ||
| 461 | 463 | ||
| 462 | resultList.add(tempM); | 464 | resultList.add(tempM); |
| 463 | 465 |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| @@ -60,7 +60,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -60,7 +60,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 60 | 60 | ||
| 61 | List<ScheduleRealInfo> queryUserInfo(String line,String date); | 61 | List<ScheduleRealInfo> queryUserInfo(String line,String date); |
| 62 | 62 | ||
| 63 | - List<ScheduleRealInfo> exportWaybill(String jName,String clZbh,String lpName); | 63 | + List<ScheduleRealInfo> exportWaybill(String jName,String clZbh,String lpName,String date); |
| 64 | 64 | ||
| 65 | List<Map<String,Object>> dailyInfo(String line,String date,String type); | 65 | List<Map<String,Object>> dailyInfo(String line,String date,String type); |
| 66 | 66 | ||
| @@ -84,7 +84,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -84,7 +84,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 84 | 84 | ||
| 85 | List<Map<String,String>> findLine(String line); | 85 | List<Map<String,String>> findLine(String line); |
| 86 | 86 | ||
| 87 | - Map<String,Object> findKMBC(String jName,String clZbh,String lpName); | 87 | + Map<String,Object> findKMBC(String jName,String clZbh,String lpName,String date); |
| 88 | 88 | ||
| 89 | List<Map<String,String>> findLpName(String lpName); | 89 | List<Map<String,String>> findLpName(String lpName); |
| 90 | 90 | ||
| @@ -92,7 +92,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -92,7 +92,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 92 | 92 | ||
| 93 | List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code); | 93 | List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code); |
| 94 | 94 | ||
| 95 | - List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName); | 95 | + List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date); |
| 96 | 96 | ||
| 97 | Map<String, Object> removeChildTask(Long taskId); | 97 | Map<String, Object> removeChildTask(Long taskId); |
| 98 | 98 |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -455,11 +455,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -455,11 +455,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 455 | * | 455 | * |
| 456 | */ | 456 | */ |
| 457 | @Override | 457 | @Override |
| 458 | - public List<ScheduleRealInfo> exportWaybill(String jName, String clZbh, String lpName) { | 458 | + public List<ScheduleRealInfo> exportWaybill(String jName, String clZbh, String lpName,String date) { |
| 459 | ReportUtils ee = new ReportUtils(); | 459 | ReportUtils ee = new ReportUtils(); |
| 460 | ReportRelatedUtils rru = new ReportRelatedUtils(); | 460 | ReportRelatedUtils rru = new ReportRelatedUtils(); |
| 461 | List<Iterator<?>> list = new ArrayList<Iterator<?>>(); | 461 | List<Iterator<?>> list = new ArrayList<Iterator<?>>(); |
| 462 | - List<ScheduleRealInfo> scheduleRealInfos = scheduleRealInfoRepository.exportWaybill(jName, clZbh, lpName); | 462 | + List<ScheduleRealInfo> scheduleRealInfos = scheduleRealInfoRepository.queryListWaybill(jName, clZbh, lpName,date); |
| 463 | List<Map<String,Object>> listMap = new ArrayList<Map<String,Object>>(); | 463 | List<Map<String,Object>> listMap = new ArrayList<Map<String,Object>>(); |
| 464 | 464 | ||
| 465 | DecimalFormat format = new DecimalFormat("0.00"); | 465 | DecimalFormat format = new DecimalFormat("0.00"); |
| @@ -979,8 +979,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -979,8 +979,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 979 | 979 | ||
| 980 | @Override | 980 | @Override |
| 981 | public Map<String, Object> findKMBC(String jName, String clZbh, | 981 | public Map<String, Object> findKMBC(String jName, String clZbh, |
| 982 | - String lpName) { | ||
| 983 | - List<ScheduleRealInfo> list = scheduleRealInfoRepository.exportWaybill(jName, clZbh, lpName); | 982 | + String lpName,String date) { |
| 983 | + List<ScheduleRealInfo> list = scheduleRealInfoRepository.queryListWaybill(jName, clZbh, lpName, date); | ||
| 984 | DecimalFormat format = new DecimalFormat("0.00"); | 984 | DecimalFormat format = new DecimalFormat("0.00"); |
| 985 | int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName); | 985 | int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName); |
| 986 | int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName); | 986 | int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName); |
| @@ -1039,8 +1039,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1039,8 +1039,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1039 | 1039 | ||
| 1040 | @Override | 1040 | @Override |
| 1041 | public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh, | 1041 | public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh, |
| 1042 | - String lpName) { | ||
| 1043 | - return scheduleRealInfoRepository.queryListWaybill(jName,clZbh,lpName); | 1042 | + String lpName,String date) { |
| 1043 | + return scheduleRealInfoRepository.queryListWaybill(jName,clZbh,lpName,date); | ||
| 1044 | } | 1044 | } |
| 1045 | 1045 | ||
| 1046 | @Override | 1046 | @Override |
src/main/java/com/bsth/service/sys/UserLineService.java
0 → 100644
| 1 | +package com.bsth.service.sys; | ||
| 2 | +import java.util.List; | ||
| 3 | +import java.util.Map; | ||
| 4 | + | ||
| 5 | +import com.bsth.entity.sys.UserLine; | ||
| 6 | +import com.bsth.service.BaseService; | ||
| 7 | + | ||
| 8 | + | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * | ||
| 12 | + * @Interface: LineService(线路service业务层实现接口) | ||
| 13 | + * | ||
| 14 | + * @extends : BaseService | ||
| 15 | + * | ||
| 16 | + * @Description: TODO(线路service业务层实现接口) | ||
| 17 | + * | ||
| 18 | + * @Author bsth@lq | ||
| 19 | + * | ||
| 20 | + * @Date 2016年4月28日 上午9:21:17 | ||
| 21 | + * | ||
| 22 | + * @Version 公交调度系统BS版 0.1 | ||
| 23 | + * | ||
| 24 | + */ | ||
| 25 | +public interface UserLineService extends BaseService<UserLine, Integer> { | ||
| 26 | + | ||
| 27 | + List<Map<String, Object>> userRoleTree(Map<String, Object> map); | ||
| 28 | + | ||
| 29 | + Map<String, Object> setLineCasts(Integer userId, String mIds); | ||
| 30 | + | ||
| 31 | +} |
src/main/java/com/bsth/service/sys/impl/UserLineServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.sys.impl; | ||
| 2 | + | ||
| 3 | +import java.util.ArrayList; | ||
| 4 | +import java.util.HashMap; | ||
| 5 | +import java.util.HashSet; | ||
| 6 | +import java.util.Iterator; | ||
| 7 | +import java.util.List; | ||
| 8 | +import java.util.Map; | ||
| 9 | +import java.util.Set; | ||
| 10 | + | ||
| 11 | +import org.apache.catalina.User; | ||
| 12 | +import org.slf4j.Logger; | ||
| 13 | +import org.slf4j.LoggerFactory; | ||
| 14 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 15 | +import org.springframework.stereotype.Service; | ||
| 16 | +import org.springframework.transaction.annotation.Transactional; | ||
| 17 | + | ||
| 18 | +import com.bsth.common.ResponseCode; | ||
| 19 | +import com.bsth.entity.Line; | ||
| 20 | +import com.bsth.entity.search.CustomerSpecs; | ||
| 21 | +import com.bsth.entity.sys.Role; | ||
| 22 | +import com.bsth.entity.sys.SysUser; | ||
| 23 | +import com.bsth.entity.sys.UserLine; | ||
| 24 | +import com.bsth.repository.LineRepository; | ||
| 25 | +import com.bsth.repository.sys.RoleRepository; | ||
| 26 | +import com.bsth.repository.sys.SysUserRepository; | ||
| 27 | +import com.bsth.repository.sys.UserLineRepository; | ||
| 28 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 29 | +import com.bsth.service.sys.UserLineService; | ||
| 30 | + | ||
| 31 | + | ||
| 32 | +/** | ||
| 33 | + * Created by xu on 16/5/31. | ||
| 34 | + */ | ||
| 35 | +@Service | ||
| 36 | +public class UserLineServiceImpl extends BaseServiceImpl<UserLine, Integer> implements UserLineService { | ||
| 37 | + | ||
| 38 | + @Autowired | ||
| 39 | + private UserLineRepository repository; | ||
| 40 | + | ||
| 41 | + @Autowired | ||
| 42 | + private SysUserRepository userRepository; | ||
| 43 | + | ||
| 44 | + @Autowired | ||
| 45 | + private RoleRepository roleRepository; | ||
| 46 | + | ||
| 47 | + @Autowired | ||
| 48 | + private LineRepository lineRepository; | ||
| 49 | + | ||
| 50 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 51 | + | ||
| 52 | + @Override | ||
| 53 | + public List<Map<String, Object>> userRoleTree(Map<String, Object> map) { | ||
| 54 | + | ||
| 55 | + CustomerSpecs spec = new CustomerSpecs<Role>(map); | ||
| 56 | + | ||
| 57 | + List<Role> roleLine = roleRepository.findAll(spec); | ||
| 58 | + | ||
| 59 | + int size = roleLine.size(); | ||
| 60 | + | ||
| 61 | + List<Map<String, Object>> list = new ArrayList<>(); | ||
| 62 | + | ||
| 63 | + if(size>0){ | ||
| 64 | + | ||
| 65 | + for(int i = 0; i <size;i++) { | ||
| 66 | + | ||
| 67 | + Map<String, Object> tempM = new HashMap<String, Object>(); | ||
| 68 | + int roleId = roleLine.get(i).getId(); | ||
| 69 | + String roleName = roleLine.get(i).getRoleName(); | ||
| 70 | + tempM.put("name", roleName); | ||
| 71 | + tempM.put("text", roleName); | ||
| 72 | + tempM.put("icon", "fa fa-database"); | ||
| 73 | + tempM.put("pId",null); | ||
| 74 | + tempM.put("id", 100+roleId); | ||
| 75 | + tempM.put("groupType", "1"); | ||
| 76 | + tempM.put("enable", true); | ||
| 77 | + Set<SysUser> user = roleLine.get(i).getUsers(); | ||
| 78 | + Iterator<SysUser> it = user.iterator(); | ||
| 79 | + List<Map<String, Object>> roleChildren = new ArrayList<>(); | ||
| 80 | + while(it.hasNext()) { | ||
| 81 | + Map<String, Object> userMap = new HashMap<String, Object>(); | ||
| 82 | + SysUser tempU = it.next(); | ||
| 83 | + String userName = tempU.getUserName(); | ||
| 84 | + int userId = tempU.getId(); | ||
| 85 | + userMap.put("name", userName); | ||
| 86 | + userMap.put("text", userName); | ||
| 87 | + userMap.put("icon", "fa fa-user"); | ||
| 88 | + userMap.put("pId",100+roleId); | ||
| 89 | + userMap.put("id", 1000+userId); | ||
| 90 | + userMap.put("userId", userId); | ||
| 91 | + userMap.put("groupType", "2"); | ||
| 92 | + userMap.put("enable", true); | ||
| 93 | + roleChildren.add(userMap); | ||
| 94 | + | ||
| 95 | + } | ||
| 96 | + tempM.put("children", roleChildren); | ||
| 97 | + list.add(tempM); | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + return list; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + @Override | ||
| 106 | + @Transactional | ||
| 107 | + public Map<String, Object> setLineCasts(Integer userId, String mIds) { | ||
| 108 | + Map<String, Object> map = new HashMap<>(); | ||
| 109 | + | ||
| 110 | + try { | ||
| 111 | + | ||
| 112 | + repository.del(userId); | ||
| 113 | + | ||
| 114 | + SysUser user = userRepository.findOne(userId); | ||
| 115 | + | ||
| 116 | + List<Integer> idList = new ArrayList<>(); | ||
| 117 | + String[] array = mIds.split(","); | ||
| 118 | + for (String id : array) { | ||
| 119 | + if (null == id || id.trim().equals("")) | ||
| 120 | + continue; | ||
| 121 | + idList.add(Integer.parseInt(id)); | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + int size = idList.size(); | ||
| 125 | + | ||
| 126 | + if(size>0) { | ||
| 127 | + | ||
| 128 | + for(int i = 0 ; i<size;i++) { | ||
| 129 | + | ||
| 130 | + UserLine entity = new UserLine(); | ||
| 131 | + | ||
| 132 | + int lineId = idList.get(i); | ||
| 133 | + | ||
| 134 | + Line line = lineRepository.findOne(lineId); | ||
| 135 | + | ||
| 136 | + entity.setUser(user); | ||
| 137 | + | ||
| 138 | + entity.setLine(line); | ||
| 139 | + | ||
| 140 | + repository.save(entity); | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + map.put("status", ResponseCode.SUCCESS); | ||
| 146 | + | ||
| 147 | + } catch (Exception e) { | ||
| 148 | + | ||
| 149 | + logger.error("", e); | ||
| 150 | + map.put("status", ResponseCode.ERROR); | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + return map; | ||
| 154 | + } | ||
| 155 | +} |
src/main/resources/static/pages/base/line/add.html
| @@ -189,6 +189,24 @@ | @@ -189,6 +189,24 @@ | ||
| 189 | </div> | 189 | </div> |
| 190 | </div> | 190 | </div> |
| 191 | 191 | ||
| 192 | + <!-- 起始站名称 --> | ||
| 193 | + <div class="form-group"> | ||
| 194 | + <label class="control-label col-md-3"> 起始站名称: </label> | ||
| 195 | + <div class="col-md-4"> | ||
| 196 | + <input type="text" class="form-control" name="startStationName" id="startStationNameInput" placeholder="起始站名称"> | ||
| 197 | + <span class="help-block"> 说明 :上行起始站名称 </span> | ||
| 198 | + </div> | ||
| 199 | + </div> | ||
| 200 | + | ||
| 201 | + <!-- 终点站名称 --> | ||
| 202 | + <div class="form-group"> | ||
| 203 | + <label class="control-label col-md-3"> 终点站名称: </label> | ||
| 204 | + <div class="col-md-4"> | ||
| 205 | + <input type="text" class="form-control" name="endStationName" id="endStationNameInput" placeholder="终点站名称"> | ||
| 206 | + <span class="help-block"> 说明 :上行终点站名称 </span> | ||
| 207 | + </div> | ||
| 208 | + </div> | ||
| 209 | + | ||
| 192 | <!-- 设备线路编码 --> | 210 | <!-- 设备线路编码 --> |
| 193 | <div class="form-group"> | 211 | <div class="form-group"> |
| 194 | <label class="control-label col-md-3"> 设备线路编码: </label> | 212 | <label class="control-label col-md-3"> 设备线路编码: </label> |
| @@ -221,27 +239,12 @@ | @@ -221,27 +239,12 @@ | ||
| 221 | </div> | 239 | </div> |
| 222 | </div> | 240 | </div> |
| 223 | 241 | ||
| 224 | - <!-- 起始站名称 --> | ||
| 225 | - <div class="form-group"> | ||
| 226 | - <label class="control-label col-md-3"> 起始站名称: </label> | ||
| 227 | - <div class="col-md-4"> | ||
| 228 | - <input type="text" class="form-control" name="startStationName" id="startStationNameInput" placeholder="起始站名称"> | ||
| 229 | - </div> | ||
| 230 | - </div> | ||
| 231 | - | ||
| 232 | - <!-- 终点站名称 --> | ||
| 233 | - <div class="form-group"> | ||
| 234 | - <label class="control-label col-md-3"> 终点站名称: </label> | ||
| 235 | - <div class="col-md-4"> | ||
| 236 | - <input type="text" class="form-control" name="endStationName" id="endStationNameInput" placeholder="终点站名称"> | ||
| 237 | - </div> | ||
| 238 | - </div> | ||
| 239 | - | ||
| 240 | <!-- 起始站首班车时间 --> | 242 | <!-- 起始站首班车时间 --> |
| 241 | <div class="form-group"> | 243 | <div class="form-group"> |
| 242 | <label class="control-label col-md-3"> 起始站首班车时间: </label> | 244 | <label class="control-label col-md-3"> 起始站首班车时间: </label> |
| 243 | <div class="col-md-4"> | 245 | <div class="col-md-4"> |
| 244 | <input type="text" class="form-control" name="startStationFirstTime" id="startStationFirstTimeInput" placeholder="起始站首班车时间"> | 246 | <input type="text" class="form-control" name="startStationFirstTime" id="startStationFirstTimeInput" placeholder="起始站首班车时间"> |
| 247 | + <span class="help-block"> 例如 :06:00 </span> | ||
| 245 | </div> | 248 | </div> |
| 246 | </div> | 249 | </div> |
| 247 | 250 | ||
| @@ -250,6 +253,7 @@ | @@ -250,6 +253,7 @@ | ||
| 250 | <label class="control-label col-md-3"> 起始站末班车时间: </label> | 253 | <label class="control-label col-md-3"> 起始站末班车时间: </label> |
| 251 | <div class="col-md-4"> | 254 | <div class="col-md-4"> |
| 252 | <input type="text" class="form-control" name="StartStationEndTime" id="StartStationEndTimeInput" placeholder="起始站末班车时间 "> | 255 | <input type="text" class="form-control" name="StartStationEndTime" id="StartStationEndTimeInput" placeholder="起始站末班车时间 "> |
| 256 | + <span class="help-block"> 例如 :17:00 </span> | ||
| 253 | </div> | 257 | </div> |
| 254 | </div> | 258 | </div> |
| 255 | 259 | ||
| @@ -259,6 +263,7 @@ | @@ -259,6 +263,7 @@ | ||
| 259 | <label class="control-label col-md-3"> 终点站首班车时间: </label> | 263 | <label class="control-label col-md-3"> 终点站首班车时间: </label> |
| 260 | <div class="col-md-4"> | 264 | <div class="col-md-4"> |
| 261 | <input type="text" class="form-control" name="endStationFirstTime" id="endStationFirstTimeInput" placeholder="终点站首班车时间"> | 265 | <input type="text" class="form-control" name="endStationFirstTime" id="endStationFirstTimeInput" placeholder="终点站首班车时间"> |
| 266 | + <span class="help-block"> 例如 :05:00 </span> | ||
| 262 | </div> | 267 | </div> |
| 263 | </div> | 268 | </div> |
| 264 | 269 | ||
| @@ -267,6 +272,7 @@ | @@ -267,6 +272,7 @@ | ||
| 267 | <label class="control-label col-md-3"> 终点站末班车时间: </label> | 272 | <label class="control-label col-md-3"> 终点站末班车时间: </label> |
| 268 | <div class="col-md-4"> | 273 | <div class="col-md-4"> |
| 269 | <input type="text" class="form-control" name="endStationEndTime" id="endStationEndTimeInput" placeholder="终点站末班车时间 "> | 274 | <input type="text" class="form-control" name="endStationEndTime" id="endStationEndTimeInput" placeholder="终点站末班车时间 "> |
| 275 | + <span class="help-block"> 例如 :18:00 </span> | ||
| 270 | </div> | 276 | </div> |
| 271 | </div> | 277 | </div> |
| 272 | 278 |
src/main/resources/static/pages/base/line/js/line-add-form.js
| @@ -162,7 +162,23 @@ $(function(){ | @@ -162,7 +162,23 @@ $(function(){ | ||
| 162 | required : true, | 162 | required : true, |
| 163 | 163 | ||
| 164 | // 最大长度 | 164 | // 最大长度 |
| 165 | - maxlength: 20 | 165 | + maxlength: 30 |
| 166 | + }, | ||
| 167 | + | ||
| 168 | + // 英文名称 | ||
| 169 | + 'es' : { | ||
| 170 | + | ||
| 171 | + // 最大长度 | ||
| 172 | + maxlength: 30 | ||
| 173 | + | ||
| 174 | + }, | ||
| 175 | + | ||
| 176 | + // 线路简称 | ||
| 177 | + 'shortName' : { | ||
| 178 | + | ||
| 179 | + // 最大长度 | ||
| 180 | + maxlength: 30 | ||
| 181 | + | ||
| 166 | }, | 182 | }, |
| 167 | 183 | ||
| 168 | // 线路编码 | 184 | // 线路编码 |
| @@ -172,9 +188,49 @@ $(function(){ | @@ -172,9 +188,49 @@ $(function(){ | ||
| 172 | required : true, | 188 | required : true, |
| 173 | 189 | ||
| 174 | // 最大长度 | 190 | // 最大长度 |
| 175 | - maxlength: 20 | 191 | + maxlength: 30 |
| 192 | + }, | ||
| 193 | + | ||
| 194 | + // 所属公司 | ||
| 195 | + 'company' : { | ||
| 196 | + | ||
| 197 | + // 最大长度 | ||
| 198 | + maxlength: 30 | ||
| 176 | }, | 199 | }, |
| 177 | 200 | ||
| 201 | + // 线路性质 | ||
| 202 | + 'nature' : { | ||
| 203 | + | ||
| 204 | + // 最大长度 | ||
| 205 | + maxlength: 30 | ||
| 206 | + | ||
| 207 | + }, | ||
| 208 | + | ||
| 209 | + // 线路等级 | ||
| 210 | + 'level' : { | ||
| 211 | + | ||
| 212 | + // 最大长度 | ||
| 213 | + maxlength: 30 | ||
| 214 | + | ||
| 215 | + }, | ||
| 216 | + | ||
| 217 | + // 起始站名称 | ||
| 218 | + 'startStationName' : { | ||
| 219 | + | ||
| 220 | + // 最大长度 | ||
| 221 | + maxlength: 30 | ||
| 222 | + | ||
| 223 | + }, | ||
| 224 | + | ||
| 225 | + // 终点站名称 | ||
| 226 | + 'endStationName' : { | ||
| 227 | + | ||
| 228 | + // 最大长度 | ||
| 229 | + maxlength: 30 | ||
| 230 | + | ||
| 231 | + }, | ||
| 232 | + | ||
| 233 | + | ||
| 178 | // 起始站调度电话 | 234 | // 起始站调度电话 |
| 179 | 'startPhone' : { | 235 | 'startPhone' : { |
| 180 | 236 | ||
| @@ -185,7 +241,10 @@ $(function(){ | @@ -185,7 +241,10 @@ $(function(){ | ||
| 185 | digits : true, | 241 | digits : true, |
| 186 | 242 | ||
| 187 | // 电话号码格式 | 243 | // 电话号码格式 |
| 188 | - isPhone : true | 244 | + isPhone : true, |
| 245 | + | ||
| 246 | + // 最大长度 | ||
| 247 | + maxlength: 30 | ||
| 189 | }, | 248 | }, |
| 190 | 249 | ||
| 191 | // 终点站调度电话 | 250 | // 终点站调度电话 |
| @@ -198,7 +257,10 @@ $(function(){ | @@ -198,7 +257,10 @@ $(function(){ | ||
| 198 | digits : true, | 257 | digits : true, |
| 199 | 258 | ||
| 200 | // 电话号码格式 | 259 | // 电话号码格式 |
| 201 | - isPhone : true | 260 | + isPhone : true, |
| 261 | + | ||
| 262 | + // 最大长度 | ||
| 263 | + maxlength: 30 | ||
| 202 | }, | 264 | }, |
| 203 | 265 | ||
| 204 | // 开辟日期 | 266 | // 开辟日期 |
| @@ -221,21 +283,27 @@ $(function(){ | @@ -221,21 +283,27 @@ $(function(){ | ||
| 221 | // 上海市线路编码 | 283 | // 上海市线路编码 |
| 222 | 'shanghaiLinecode' : { | 284 | 'shanghaiLinecode' : { |
| 223 | 285 | ||
| 224 | - // 必须输入合法的数字(负数,小数)。 | 286 | + /*// 必须输入合法的数字(负数,小数)。 |
| 225 | number : true, | 287 | number : true, |
| 226 | 288 | ||
| 227 | // 必须输入整数。 | 289 | // 必须输入整数。 |
| 228 | - digits : true | 290 | + digits : true,*/ |
| 291 | + | ||
| 292 | + // 最大长度 | ||
| 293 | + maxlength: 30 | ||
| 229 | }, | 294 | }, |
| 230 | 295 | ||
| 231 | // 设备线路编码 | 296 | // 设备线路编码 |
| 232 | 'eqLinecode' : { | 297 | 'eqLinecode' : { |
| 233 | 298 | ||
| 234 | - // 必须输入合法的数字(负数,小数)。 | 299 | + /*// 必须输入合法的数字(负数,小数)。 |
| 235 | number : true, | 300 | number : true, |
| 236 | 301 | ||
| 237 | // 必须输入整数。 | 302 | // 必须输入整数。 |
| 238 | - digits : true | 303 | + digits : true,*/ |
| 304 | + | ||
| 305 | + // 最大长度 | ||
| 306 | + maxlength: 30 | ||
| 239 | }, | 307 | }, |
| 240 | 308 | ||
| 241 | // 车辆总数 | 309 | // 车辆总数 |
| @@ -245,7 +313,10 @@ $(function(){ | @@ -245,7 +313,10 @@ $(function(){ | ||
| 245 | number : true, | 313 | number : true, |
| 246 | 314 | ||
| 247 | // 必须输入整数。 | 315 | // 必须输入整数。 |
| 248 | - digits : true | 316 | + digits : true, |
| 317 | + | ||
| 318 | + // 最大长度 | ||
| 319 | + maxlength: 8 | ||
| 249 | }, | 320 | }, |
| 250 | 321 | ||
| 251 | // 空调车辆数 | 322 | // 空调车辆数 |
| @@ -255,7 +326,10 @@ $(function(){ | @@ -255,7 +326,10 @@ $(function(){ | ||
| 255 | number : true, | 326 | number : true, |
| 256 | 327 | ||
| 257 | // 必须输入整数。 | 328 | // 必须输入整数。 |
| 258 | - digits : true | 329 | + digits : true, |
| 330 | + | ||
| 331 | + // 最大长度 | ||
| 332 | + maxlength: 8 | ||
| 259 | }, | 333 | }, |
| 260 | 334 | ||
| 261 | // 普通车辆数 | 335 | // 普通车辆数 |
| @@ -265,7 +339,10 @@ $(function(){ | @@ -265,7 +339,10 @@ $(function(){ | ||
| 265 | number : true, | 339 | number : true, |
| 266 | 340 | ||
| 267 | // 必须输入整数。 | 341 | // 必须输入整数。 |
| 268 | - digits : true | 342 | + digits : true, |
| 343 | + | ||
| 344 | + // 最大长度 | ||
| 345 | + maxlength: 8 | ||
| 269 | }, | 346 | }, |
| 270 | 347 | ||
| 271 | // 描述/说明 | 348 | // 描述/说明 |
src/main/resources/static/pages/base/line/js/line-list-table.js
| @@ -14,71 +14,16 @@ | @@ -14,71 +14,16 @@ | ||
| 14 | 14 | ||
| 15 | (function(){ | 15 | (function(){ |
| 16 | 16 | ||
| 17 | - /** 填充公司下拉框选择值 */ | ||
| 18 | - $get('/business/all', {upCode_eq: '77'}, function(array){ | ||
| 19 | - | ||
| 20 | - // 公司下拉options属性值 | ||
| 21 | - var options = '<option value="">请选择...</option>'; | ||
| 22 | - | ||
| 23 | - // 遍历array | ||
| 24 | - $.each(array, function(i,d){ | ||
| 25 | - | ||
| 26 | - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 27 | - | ||
| 28 | - }); | ||
| 29 | - | ||
| 30 | - // 填充公司下拉框options | ||
| 31 | - $('#companySelect').html(options) | ||
| 32 | - | ||
| 33 | - /** 闵行没下属公司,这里暂时注释公司值改变事件 */ | ||
| 34 | - //$('#companySelect').html(options).on('change', setbrancheCompanySelectOptions); | ||
| 35 | - | ||
| 36 | - }); | ||
| 37 | - | ||
| 38 | - /** 填充分公司下拉框。--- 闵行没下属公司,这里暂时注释*/ | ||
| 39 | - /* setbrancheCompanySelectOptions();*/ | ||
| 40 | - | ||
| 41 | - /** 填充分公司下拉框选择值 */ | ||
| 42 | - function setbrancheCompanySelectOptions(){ | ||
| 43 | - | ||
| 44 | - // 获取公司下拉框选择值 | ||
| 45 | - var businessCode = $('#companySelect').val(); | ||
| 46 | - | ||
| 47 | - // 分公司下拉框options属性值 | ||
| 48 | - var options = '<option value="">请选择...</option>'; | ||
| 49 | - | ||
| 50 | - // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码 | ||
| 51 | - if(businessCode == null || businessCode ==''){ | ||
| 52 | - | ||
| 53 | - // 填充分公司下拉框options | ||
| 54 | - $('#brancheCompanySelect').html(options); | ||
| 55 | - | ||
| 56 | - } else { | ||
| 57 | - | ||
| 58 | - /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */ | ||
| 59 | - $get('/business/all', {upCode_eq: businessCode}, function(array){ | ||
| 60 | - | ||
| 61 | - // 遍历array | ||
| 62 | - $.each(array, function(i,d){ | ||
| 63 | - | ||
| 64 | - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 65 | - | ||
| 66 | - // 填充分公司下拉框options | ||
| 67 | - $('#brancheCompanySelect').html(options); | ||
| 68 | - | ||
| 69 | - }); | ||
| 70 | - }); | ||
| 71 | - } | ||
| 72 | - } | ||
| 73 | - | ||
| 74 | /** page : 当前页;initPag : */ | 17 | /** page : 当前页;initPag : */ |
| 75 | var page = 0,initPag; | 18 | var page = 0,initPag; |
| 76 | 19 | ||
| 77 | // 选择框 | 20 | // 选择框 |
| 78 | var icheckOptions = {checkboxClass: 'icheckbox_flat-blue',increaseArea: '20%'}; | 21 | var icheckOptions = {checkboxClass: 'icheckbox_flat-blue',increaseArea: '20%'}; |
| 79 | 22 | ||
| 23 | + $('#destroy').val(0); | ||
| 24 | + | ||
| 80 | /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */ | 25 | /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */ |
| 81 | - loadTableDate(null,true); | 26 | + loadTableDate({'destroy_eq':0},true); |
| 82 | 27 | ||
| 83 | /** 重置按钮事件 */ | 28 | /** 重置按钮事件 */ |
| 84 | $('tr.filter .filter-cancel').on('click',function() { | 29 | $('tr.filter .filter-cancel').on('click',function() { |
| @@ -161,8 +106,6 @@ | @@ -161,8 +106,6 @@ | ||
| 161 | // 异步请求获取表格数据 | 106 | // 异步请求获取表格数据 |
| 162 | $.get('/line',params,function(result){ | 107 | $.get('/line',params,function(result){ |
| 163 | 108 | ||
| 164 | - debugger; | ||
| 165 | - | ||
| 166 | // 添加序号 | 109 | // 添加序号 |
| 167 | result.content.page = page; | 110 | result.content.page = page; |
| 168 | 111 | ||
| @@ -258,6 +201,64 @@ | @@ -258,6 +201,64 @@ | ||
| 258 | }); | 201 | }); |
| 259 | } | 202 | } |
| 260 | 203 | ||
| 204 | + /** 填充公司下拉框选择值 */ | ||
| 205 | + $get('/business/all', {upCode_eq: '77'}, function(array){ | ||
| 206 | + | ||
| 207 | + // 公司下拉options属性值 | ||
| 208 | + var options = '<option value="">请选择...</option>'; | ||
| 209 | + | ||
| 210 | + // 遍历array | ||
| 211 | + $.each(array, function(i,d){ | ||
| 212 | + | ||
| 213 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 214 | + | ||
| 215 | + }); | ||
| 216 | + | ||
| 217 | + // 填充公司下拉框options | ||
| 218 | + $('#companySelect').html(options) | ||
| 219 | + | ||
| 220 | + /** 闵行没下属公司,这里暂时注释公司值改变事件 */ | ||
| 221 | + //$('#companySelect').html(options).on('change', setbrancheCompanySelectOptions); | ||
| 222 | + | ||
| 223 | + }); | ||
| 224 | + | ||
| 225 | + /** 填充分公司下拉框。--- 闵行没下属公司,这里暂时注释*/ | ||
| 226 | + /* setbrancheCompanySelectOptions();*/ | ||
| 227 | + | ||
| 228 | + /** 填充分公司下拉框选择值 */ | ||
| 229 | + function setbrancheCompanySelectOptions(){ | ||
| 230 | + | ||
| 231 | + // 获取公司下拉框选择值 | ||
| 232 | + var businessCode = $('#companySelect').val(); | ||
| 233 | + | ||
| 234 | + // 分公司下拉框options属性值 | ||
| 235 | + var options = '<option value="">请选择...</option>'; | ||
| 236 | + | ||
| 237 | + // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码 | ||
| 238 | + if(businessCode == null || businessCode ==''){ | ||
| 239 | + | ||
| 240 | + // 填充分公司下拉框options | ||
| 241 | + $('#brancheCompanySelect').html(options); | ||
| 242 | + | ||
| 243 | + } else { | ||
| 244 | + | ||
| 245 | + /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */ | ||
| 246 | + $get('/business/all', {upCode_eq: businessCode}, function(array){ | ||
| 247 | + | ||
| 248 | + // 遍历array | ||
| 249 | + $.each(array, function(i,d){ | ||
| 250 | + | ||
| 251 | + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>'; | ||
| 252 | + | ||
| 253 | + // 填充分公司下拉框options | ||
| 254 | + $('#brancheCompanySelect').html(options); | ||
| 255 | + | ||
| 256 | + }); | ||
| 257 | + }); | ||
| 258 | + } | ||
| 259 | + } | ||
| 260 | + | ||
| 261 | + | ||
| 261 | /** 生成行单,这里暂时只做了单选生成。 */ | 262 | /** 生成行单,这里暂时只做了单选生成。 */ |
| 262 | $('#datatable_ajax_tools #createUsingSingle').on('click', function() { | 263 | $('#datatable_ajax_tools #createUsingSingle').on('click', function() { |
| 263 | 264 |
src/main/resources/static/pages/base/line/list.html
| @@ -110,7 +110,7 @@ | @@ -110,7 +110,7 @@ | ||
| 110 | </td> | 110 | </td> |
| 111 | <td> | 111 | <td> |
| 112 | <!-- 这里没使用字典表,暂时写在页面上 --> | 112 | <!-- 这里没使用字典表,暂时写在页面上 --> |
| 113 | - <select class="form-control form-filter " name="destroy_eq"> | 113 | + <select class="form-control form-filter " id='destroy' name="destroy_eq"> |
| 114 | <option value="">请选择...</option> | 114 | <option value="">请选择...</option> |
| 115 | <option value="0">运营</option> | 115 | <option value="0">运营</option> |
| 116 | <option value="1">撤销</option> | 116 | <option value="1">撤销</option> |
| @@ -291,4 +291,5 @@ | @@ -291,4 +291,5 @@ | ||
| 291 | </tr> | 291 | </tr> |
| 292 | {{/if}} | 292 | {{/if}} |
| 293 | </script> | 293 | </script> |
| 294 | -<script src="/pages/base/line/js/line-list-table.js"></script> | ||
| 295 | \ No newline at end of file | 294 | \ No newline at end of file |
| 295 | +<script src="/pages/base/line/js/line-list-table.js"></script> | ||
| 296 | +<!-- <a href="/pages/base/stationroute/list.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a> --> | ||
| 296 | \ No newline at end of file | 297 | \ No newline at end of file |
src/main/resources/static/pages/base/linecast/cast.html
0 → 100644
| 1 | +<link href="/pages/base/linecast/css/cast.css" rel="stylesheet" type="text/css" /> | ||
| 2 | + | ||
| 3 | +<script type="text/javascript" src="/pages/base/linecast/js/jquery.quicksearch.js"></script> | ||
| 4 | + | ||
| 5 | +<div class="page-head"> | ||
| 6 | + <div class="page-title"> | ||
| 7 | + <h1>线路分配</h1> | ||
| 8 | + </div> | ||
| 9 | +</div> | ||
| 10 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 11 | + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> | ||
| 12 | + <li><span class="active">权限管理</span> <i class="fa fa-circle"></i></li> | ||
| 13 | + <li><span class="active">线路分配</span></li> | ||
| 14 | +</ul> | ||
| 15 | + | ||
| 16 | +<div class="row"> | ||
| 17 | + <div class="col-md-4" style="padding-right: 0px;"> | ||
| 18 | + <div class="portlet light bordered" style="min-height: 520px;"> | ||
| 19 | + <div class="portlet-title"> | ||
| 20 | + <div class="caption"> | ||
| 21 | + <i class="fa fa-users font-dark"></i> | ||
| 22 | + <span class="caption-subject font-dark sbold uppercase">用户菜单</span> | ||
| 23 | + </div> | ||
| 24 | + </div> | ||
| 25 | + <div class="portlet-body"> | ||
| 26 | + <div id="modules_tree" ></div> | ||
| 27 | + </div> | ||
| 28 | + </div> | ||
| 29 | + </div> | ||
| 30 | + <div class="col-md-6" style="padding-left: 0px;"> | ||
| 31 | + <div class="portlet light bordered" style="height: 520px;"> | ||
| 32 | + <div class="portlet-body" style="min-height: 200px;" id="init-text"> | ||
| 33 | + <div class="text-info" style="text-align: center;line-height: 200px;"> | ||
| 34 | + <i class="fa fa-info"></i> 单击节点查看详细 | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + | ||
| 38 | + <div style="display:none" id="line-cast"> | ||
| 39 | + <!-- BEGIN PORTLET--> | ||
| 40 | + <div class="portlet light bordered"> | ||
| 41 | + <div class="portlet-title"> | ||
| 42 | + <div class="caption"> | ||
| 43 | + <i class="icon-bar-chart font-green"></i> | ||
| 44 | + <span class="caption-subject font-green bold uppercase">线路配置</span> | ||
| 45 | + </div> | ||
| 46 | + <div class="actions"> | ||
| 47 | + <button class="btn green btn-circle btn-sm" disabled="disabled" id="saveModuleSett"><i class="fa fa-check"></i> 保存修改</button> | ||
| 48 | + </div> | ||
| 49 | + </div> | ||
| 50 | + <div class="portlet-body"> | ||
| 51 | + <div class="form-group last" > | ||
| 52 | + <div> | ||
| 53 | + <select multiple="multiple" class="multi-select" id="moduleSettSelect" ></select> | ||
| 54 | + </div> | ||
| 55 | + </div> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + </div> | ||
| 59 | + </div> | ||
| 60 | + </div> | ||
| 61 | +</div> | ||
| 62 | + | ||
| 63 | +<script type="text/html" id="left_line_cast"> | ||
| 64 | + | ||
| 65 | +</script> | ||
| 66 | + | ||
| 67 | +<script> | ||
| 68 | + | ||
| 69 | +$(function(){ | ||
| 70 | + | ||
| 71 | + getTreeData(function(treeData){ | ||
| 72 | + | ||
| 73 | + //初始化树 | ||
| 74 | + $('#modules_tree').on('loaded.jstree', function(e, data){close_all();}).jstree({ | ||
| 75 | + 'core' : { | ||
| 76 | + 'themes' : { | ||
| 77 | + 'responsive': false | ||
| 78 | + }, | ||
| 79 | + 'data': treeData, | ||
| 80 | + 'multiple':false | ||
| 81 | + }, | ||
| 82 | + 'types' : { | ||
| 83 | + "default" : { | ||
| 84 | + "icon" : false | ||
| 85 | + }, | ||
| 86 | + 'enable_true' : { | ||
| 87 | + "icon" : 'fa fa-check icon-lg' | ||
| 88 | + }, | ||
| 89 | + 'enable_false' : { | ||
| 90 | + 'icon' : 'fa fa-close icon-lg' | ||
| 91 | + }, | ||
| 92 | + 'group':{ | ||
| 93 | + 'icon' : 'fa fa-object-group icon-lg' | ||
| 94 | + } | ||
| 95 | + }, | ||
| 96 | + 'plugins': ['types'] | ||
| 97 | + }).on('select_node.jstree', jstreeClick); | ||
| 98 | + }); | ||
| 99 | + | ||
| 100 | + $('.tooltips').tooltip(); | ||
| 101 | + | ||
| 102 | +}); | ||
| 103 | + | ||
| 104 | +function jstreeClick(){ | ||
| 105 | + | ||
| 106 | + var selected = getCurrSelNode(); | ||
| 107 | + | ||
| 108 | + var obj = selected[0].original; | ||
| 109 | + | ||
| 110 | + $('#saveModuleSett').attr('disabled', 'disabled'); | ||
| 111 | + | ||
| 112 | + if(obj.pId==null) { | ||
| 113 | + | ||
| 114 | + $('#line-cast').hide(); | ||
| 115 | + | ||
| 116 | + $('#init-text').show(); | ||
| 117 | + }else { | ||
| 118 | + | ||
| 119 | + $('#line-cast').show(); | ||
| 120 | + | ||
| 121 | + $('#init-text').hide(); | ||
| 122 | + | ||
| 123 | + var userId = obj.userId; | ||
| 124 | + | ||
| 125 | + getModuleTreeData(userId); | ||
| 126 | + | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | +} | ||
| 130 | + | ||
| 131 | +function getCurrSelNode(){ | ||
| 132 | + | ||
| 133 | + var array = []; | ||
| 134 | + | ||
| 135 | + try { | ||
| 136 | + | ||
| 137 | + array = $.jstree.reference("#modules_tree").get_selected(true); | ||
| 138 | + | ||
| 139 | + } catch (e) { | ||
| 140 | + | ||
| 141 | + console.log(e); | ||
| 142 | + | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + return array; | ||
| 146 | +} | ||
| 147 | + | ||
| 148 | +function close_all(){ | ||
| 149 | + | ||
| 150 | + $.jstree.reference("#modules_tree").close_all(); | ||
| 151 | + | ||
| 152 | +} | ||
| 153 | + | ||
| 154 | + | ||
| 155 | + | ||
| 156 | +function getTreeData(cb){ | ||
| 157 | + | ||
| 158 | + var treeData = []; | ||
| 159 | + | ||
| 160 | + $get('/userline/userRoleTree',null, function(arr){ | ||
| 161 | + | ||
| 162 | + //转换为jsTree想要的数据格式 | ||
| 163 | + treeData = createTreeData(arr); | ||
| 164 | + | ||
| 165 | + cb && cb(treeData) | ||
| 166 | + }); | ||
| 167 | +} | ||
| 168 | + | ||
| 169 | +function getModuleTreeData(userId){ | ||
| 170 | + | ||
| 171 | + | ||
| 172 | + $get('/line/all',null, function(linedata){ | ||
| 173 | + | ||
| 174 | + $get('/userline/all',{'user.id_eq':userId}, function(userlinedata){ | ||
| 175 | + | ||
| 176 | + var options = ''; | ||
| 177 | + | ||
| 178 | + var len = userlinedata.length; | ||
| 179 | + | ||
| 180 | + $.each(linedata, function(i, g){ | ||
| 181 | + | ||
| 182 | + //是否被当前用户持有 | ||
| 183 | + var selected = ''; | ||
| 184 | + | ||
| 185 | + if(len>0) { | ||
| 186 | + | ||
| 187 | + for(var j = 0;j<userlinedata.length;j++ ) { | ||
| 188 | + | ||
| 189 | + if(userlinedata[j].line.id==g.id){ | ||
| 190 | + | ||
| 191 | + selected = 'selected'; | ||
| 192 | + | ||
| 193 | + break; | ||
| 194 | + | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + } | ||
| 200 | + | ||
| 201 | + options += '<option value="'+g.id+'" ' + selected +'>'+g.name+'</option>' | ||
| 202 | + | ||
| 203 | + }); | ||
| 204 | + | ||
| 205 | + //初始化multiSelect | ||
| 206 | + $('#moduleSettSelect').html(options).multiSelect({ | ||
| 207 | + selectableOptgroup: true, | ||
| 208 | + | ||
| 209 | + selectableFooter: "<div class='multi-custom-header-left'>未分配</div>", | ||
| 210 | + selectionFooter: "<div class='multi-custom-header-right'>已分配</div>", | ||
| 211 | + | ||
| 212 | + selectableHeader: "<input type='text' class='search-input' style='width: 221px;' autocomplete='off' placeholder='搜索线路'>", | ||
| 213 | + selectionHeader: "<input type='text' class='search-input' style='width: 221px;' autocomplete='off' placeholder='搜索线路'>", | ||
| 214 | + afterInit: function(ms){ | ||
| 215 | + var that = this, | ||
| 216 | + $selectableSearch = that.$selectableUl.prev(), | ||
| 217 | + $selectionSearch = that.$selectionUl.prev(), | ||
| 218 | + selectableSearchString = '#'+that.$container.attr('id')+' .ms-elem-selectable:not(.ms-selected)', | ||
| 219 | + selectionSearchString = '#'+that.$container.attr('id')+' .ms-elem-selection.ms-selected'; | ||
| 220 | + | ||
| 221 | + that.qs1 = $selectableSearch.quicksearch(selectableSearchString) | ||
| 222 | + .on('keydown', function(e){ | ||
| 223 | + if (e.which === 40){ | ||
| 224 | + that.$selectableUl.focus(); | ||
| 225 | + return false; | ||
| 226 | + } | ||
| 227 | + }); | ||
| 228 | + | ||
| 229 | + that.qs2 = $selectionSearch.quicksearch(selectionSearchString) | ||
| 230 | + .on('keydown', function(e){ | ||
| 231 | + if (e.which == 40){ | ||
| 232 | + that.$selectionUl.focus(); | ||
| 233 | + return false; | ||
| 234 | + } | ||
| 235 | + }); | ||
| 236 | + }, | ||
| 237 | + afterSelect: function(){ | ||
| 238 | + this.qs1.cache(); | ||
| 239 | + this.qs2.cache(); | ||
| 240 | + }, | ||
| 241 | + afterDeselect: function(){ | ||
| 242 | + this.qs1.cache(); | ||
| 243 | + this.qs2.cache(); | ||
| 244 | + } | ||
| 245 | + }).on('change',function(){ | ||
| 246 | + | ||
| 247 | + if( $(this).val() ==null || $(this).val().length > 0) | ||
| 248 | + $('#saveModuleSett').removeAttr('disabled'); | ||
| 249 | + else | ||
| 250 | + $('#saveModuleSett').attr('disabled', 'disabled'); | ||
| 251 | + }); | ||
| 252 | + | ||
| 253 | + $('#moduleSettSelect').multiSelect('refresh'); | ||
| 254 | + | ||
| 255 | + }); | ||
| 256 | + | ||
| 257 | + }); | ||
| 258 | +} | ||
| 259 | + | ||
| 260 | + | ||
| 261 | +$('#saveModuleSett').on('click', function(){ | ||
| 262 | + if($(this).attr('disabled')) | ||
| 263 | + return; | ||
| 264 | + | ||
| 265 | + var ids = ''; | ||
| 266 | + | ||
| 267 | + if($('#moduleSettSelect').val() !=null) { | ||
| 268 | + | ||
| 269 | + $.each($('#moduleSettSelect').val(), function(i, mId){ | ||
| 270 | + ids += mId + ','; | ||
| 271 | + }); | ||
| 272 | + | ||
| 273 | + } | ||
| 274 | + | ||
| 275 | + var selected = getCurrSelNode(); | ||
| 276 | + | ||
| 277 | + var obj = selected[0].original; | ||
| 278 | + | ||
| 279 | + if(obj) { | ||
| 280 | + | ||
| 281 | + $post('/userline/setLineCasts', {'userId': obj.userId,mIds: ids}, function(){ | ||
| 282 | + $('#saveModuleSett').attr('disabled', 'disabled'); | ||
| 283 | + layer.msg('修改成功!'); | ||
| 284 | + }); | ||
| 285 | + | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | +}); | ||
| 289 | +</script> | ||
| 0 | \ No newline at end of file | 290 | \ No newline at end of file |
src/main/resources/static/pages/base/linecast/css/cast.css
0 → 100644
| 1 | +.jstree-default .jstree-hovered{ | ||
| 2 | + background-color: rgba(101, 155, 224, 0.19); | ||
| 3 | +} | ||
| 4 | + | ||
| 5 | +.jstree-default .jstree-clicked { | ||
| 6 | + background-color: #659BE0; | ||
| 7 | + color: white; | ||
| 8 | +} | ||
| 9 | +.layui-layer-cfm-delete .layui-layer-btn0{ | ||
| 10 | + background-color: #e73d4a; | ||
| 11 | + border-color: #CE3643; | ||
| 12 | +} | ||
| 0 | \ No newline at end of file | 13 | \ No newline at end of file |
src/main/resources/static/pages/base/linecast/js/jquery.quicksearch.js
0 → 100644
| 1 | +(function($, window, document, undefined) { | ||
| 2 | + $.fn.quicksearch = function (target, opt) { | ||
| 3 | + | ||
| 4 | + var timeout, cache, rowcache, jq_results, val = '', e = this, options = $.extend({ | ||
| 5 | + delay: 100, | ||
| 6 | + selector: null, | ||
| 7 | + stripeRows: null, | ||
| 8 | + loader: null, | ||
| 9 | + noResults: '', | ||
| 10 | + matchedResultsCount: 0, | ||
| 11 | + bind: 'keyup', | ||
| 12 | + onBefore: function () { | ||
| 13 | + return; | ||
| 14 | + }, | ||
| 15 | + onAfter: function () { | ||
| 16 | + return; | ||
| 17 | + }, | ||
| 18 | + show: function () { | ||
| 19 | + this.style.display = ""; | ||
| 20 | + }, | ||
| 21 | + hide: function () { | ||
| 22 | + this.style.display = "none"; | ||
| 23 | + }, | ||
| 24 | + prepareQuery: function (val) { | ||
| 25 | + return val.toLowerCase().split(' '); | ||
| 26 | + }, | ||
| 27 | + testQuery: function (query, txt, _row) { | ||
| 28 | + for (var i = 0; i < query.length; i += 1) { | ||
| 29 | + if (txt.indexOf(query[i]) === -1) { | ||
| 30 | + return false; | ||
| 31 | + } | ||
| 32 | + } | ||
| 33 | + return true; | ||
| 34 | + } | ||
| 35 | + }, opt); | ||
| 36 | + | ||
| 37 | + this.go = function () { | ||
| 38 | + | ||
| 39 | + var i = 0, | ||
| 40 | + numMatchedRows = 0, | ||
| 41 | + noresults = true, | ||
| 42 | + query = options.prepareQuery(val), | ||
| 43 | + val_empty = (val.replace(' ', '').length === 0); | ||
| 44 | + | ||
| 45 | + for (var i = 0, len = rowcache.length; i < len; i++) { | ||
| 46 | + if (val_empty || options.testQuery(query, cache[i], rowcache[i])) { | ||
| 47 | + options.show.apply(rowcache[i]); | ||
| 48 | + noresults = false; | ||
| 49 | + numMatchedRows++; | ||
| 50 | + } else { | ||
| 51 | + options.hide.apply(rowcache[i]); | ||
| 52 | + } | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + if (noresults) { | ||
| 56 | + this.results(false); | ||
| 57 | + } else { | ||
| 58 | + this.results(true); | ||
| 59 | + this.stripe(); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + this.matchedResultsCount = numMatchedRows; | ||
| 63 | + this.loader(false); | ||
| 64 | + options.onAfter(); | ||
| 65 | + | ||
| 66 | + return this; | ||
| 67 | + }; | ||
| 68 | + | ||
| 69 | + /* | ||
| 70 | + * External API so that users can perform search programatically. | ||
| 71 | + * */ | ||
| 72 | + this.search = function (submittedVal) { | ||
| 73 | + val = submittedVal; | ||
| 74 | + e.trigger(); | ||
| 75 | + }; | ||
| 76 | + | ||
| 77 | + /* | ||
| 78 | + * External API to get the number of matched results as seen in | ||
| 79 | + * https://github.com/ruiz107/quicksearch/commit/f78dc440b42d95ce9caed1d087174dd4359982d6 | ||
| 80 | + * */ | ||
| 81 | + this.currentMatchedResults = function() { | ||
| 82 | + return this.matchedResultsCount; | ||
| 83 | + }; | ||
| 84 | + | ||
| 85 | + this.stripe = function () { | ||
| 86 | + | ||
| 87 | + if (typeof options.stripeRows === "object" && options.stripeRows !== null) | ||
| 88 | + { | ||
| 89 | + var joined = options.stripeRows.join(' '); | ||
| 90 | + var stripeRows_length = options.stripeRows.length; | ||
| 91 | + | ||
| 92 | + jq_results.not(':hidden').each(function (i) { | ||
| 93 | + $(this).removeClass(joined).addClass(options.stripeRows[i % stripeRows_length]); | ||
| 94 | + }); | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + return this; | ||
| 98 | + }; | ||
| 99 | + | ||
| 100 | + this.strip_html = function (input) { | ||
| 101 | + var output = input.replace(new RegExp('<[^<]+\>', 'g'), ""); | ||
| 102 | + output = $.trim(output.toLowerCase()); | ||
| 103 | + return output; | ||
| 104 | + }; | ||
| 105 | + | ||
| 106 | + this.results = function (bool) { | ||
| 107 | + if (typeof options.noResults === "string" && options.noResults !== "") { | ||
| 108 | + if (bool) { | ||
| 109 | + $(options.noResults).hide(); | ||
| 110 | + } else { | ||
| 111 | + $(options.noResults).show(); | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + return this; | ||
| 115 | + }; | ||
| 116 | + | ||
| 117 | + this.loader = function (bool) { | ||
| 118 | + if (typeof options.loader === "string" && options.loader !== "") { | ||
| 119 | + (bool) ? $(options.loader).show() : $(options.loader).hide(); | ||
| 120 | + } | ||
| 121 | + return this; | ||
| 122 | + }; | ||
| 123 | + | ||
| 124 | + this.cache = function () { | ||
| 125 | + | ||
| 126 | + jq_results = $(target); | ||
| 127 | + | ||
| 128 | + if (typeof options.noResults === "string" && options.noResults !== "") { | ||
| 129 | + jq_results = jq_results.not(options.noResults); | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + var t = (typeof options.selector === "string") ? jq_results.find(options.selector) : $(target).not(options.noResults); | ||
| 133 | + cache = t.map(function () { | ||
| 134 | + return e.strip_html(this.innerHTML); | ||
| 135 | + }); | ||
| 136 | + | ||
| 137 | + rowcache = jq_results.map(function () { | ||
| 138 | + return this; | ||
| 139 | + }); | ||
| 140 | + | ||
| 141 | + /* | ||
| 142 | + * Modified fix for sync-ing "val". | ||
| 143 | + * Original fix https://github.com/michaellwest/quicksearch/commit/4ace4008d079298a01f97f885ba8fa956a9703d1 | ||
| 144 | + * */ | ||
| 145 | + val = val || this.val() || ""; | ||
| 146 | + | ||
| 147 | + return this.go(); | ||
| 148 | + }; | ||
| 149 | + | ||
| 150 | + this.trigger = function () { | ||
| 151 | + this.loader(true); | ||
| 152 | + options.onBefore(); | ||
| 153 | + | ||
| 154 | + window.clearTimeout(timeout); | ||
| 155 | + timeout = window.setTimeout(function () { | ||
| 156 | + e.go(); | ||
| 157 | + }, options.delay); | ||
| 158 | + | ||
| 159 | + return this; | ||
| 160 | + }; | ||
| 161 | + | ||
| 162 | + this.cache(); | ||
| 163 | + this.results(true); | ||
| 164 | + this.stripe(); | ||
| 165 | + this.loader(false); | ||
| 166 | + | ||
| 167 | + return this.each(function () { | ||
| 168 | + | ||
| 169 | + /* | ||
| 170 | + * Changed from .bind to .on. | ||
| 171 | + * */ | ||
| 172 | + $(this).on(options.bind, function () { | ||
| 173 | + | ||
| 174 | + val = $(this).val(); | ||
| 175 | + e.trigger(); | ||
| 176 | + }); | ||
| 177 | + }); | ||
| 178 | + | ||
| 179 | + }; | ||
| 180 | + | ||
| 181 | +}(jQuery, this, document)); | ||
| 0 | \ No newline at end of file | 182 | \ No newline at end of file |
src/main/resources/static/pages/base/stationroute/css/bmap_base.css
src/main/resources/static/pages/base/stationroute/css/img/back160.png
0 → 100644
3.28 KB
src/main/resources/static/pages/base/stationroute/edit.html
| @@ -443,6 +443,8 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | @@ -443,6 +443,8 @@ $('#edit_station_mobal').on('editSelectMobal_show', function(e, map_,ajaxd,stati | ||
| 443 | // 弹出添加成功提示消息 | 443 | // 弹出添加成功提示消息 |
| 444 | layer.msg('修改成功...'); | 444 | layer.msg('修改成功...'); |
| 445 | 445 | ||
| 446 | + /** 通知更新缓存区 */ | ||
| 447 | + $.post('http://192.168.168.171:8800/transport_server/basic/refresh',function(rs){console.log(rs)}) | ||
| 446 | 448 | ||
| 447 | }else { | 449 | }else { |
| 448 | 450 |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
| @@ -650,6 +650,8 @@ var PublicFunctions = function () { | @@ -650,6 +650,8 @@ var PublicFunctions = function () { | ||
| 650 | // 中心点坐标字符串 | 650 | // 中心点坐标字符串 |
| 651 | var bJwpointsStr = resultdata[s].bJwpoints; | 651 | var bJwpointsStr = resultdata[s].bJwpoints; |
| 652 | 652 | ||
| 653 | + var stationName = resultdata[s].stationName; | ||
| 654 | + | ||
| 653 | // 起个中心点坐标字符串 | 655 | // 起个中心点坐标字符串 |
| 654 | var bJwpointsArray = bJwpointsStr.split(' '); | 656 | var bJwpointsArray = bJwpointsStr.split(' '); |
| 655 | 657 | ||
| @@ -657,7 +659,7 @@ var PublicFunctions = function () { | @@ -657,7 +659,7 @@ var PublicFunctions = function () { | ||
| 657 | var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]); | 659 | var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]); |
| 658 | 660 | ||
| 659 | /** 在地图上画点 @param:<point_center:中心坐标点> */ | 661 | /** 在地图上画点 @param:<point_center:中心坐标点> */ |
| 660 | - WorldsBMap.drawingUpStationPoint(point_center); | 662 | + WorldsBMap.drawingUpStationPoint(point_center,stationName,s+1); |
| 661 | 663 | ||
| 662 | } | 664 | } |
| 663 | 665 |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
| @@ -684,11 +684,26 @@ var WorldsBMap = function () { | @@ -684,11 +684,26 @@ var WorldsBMap = function () { | ||
| 684 | }, | 684 | }, |
| 685 | 685 | ||
| 686 | /** 在地图上画点 @param:<point_center:中心坐标点> */ | 686 | /** 在地图上画点 @param:<point_center:中心坐标点> */ |
| 687 | - drawingUpStationPoint : function(point_center) { | 687 | + drawingUpStationPoint : function(point_center,stationName,s) { |
| 688 | 688 | ||
| 689 | // 自定义标注物图片 | 689 | // 自定义标注物图片 |
| 690 | - var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/cz.png',new BMap.Size(20, 20)); | ||
| 691 | - | 690 | + var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/gjzd.png',new BMap.Size(10, 10)); |
| 691 | + | ||
| 692 | + var html2 = '<div style="position: absolute; margin: 0pt; padding: 0pt; width: 160px; height: 26px; left: -10px; top: -35px; overflow: hidden;">' | ||
| 693 | + + '<img class="rm3_image" style="border:none;left:0px; top:0px; position:absolute;" src="/pages/base/stationroute/css/img/back160.png">' | ||
| 694 | + + '</div>' | ||
| 695 | + + '<label class=" BMapLabel" unselectable="on" style="position: absolute; -moz-user-select: none; display: inline; cursor: inherit; border: 0px none; padding: 2px 1px 1px; white-space: nowrap; font: 12px arial,simsun; z-index: 80; color: rgb(255, 102, 0); left: 15px; top: -35px;"><span style="float: left; color: #fdfdfd; margin-left: -22px; font-size: 6px;">'+ s+'</span>'+ stationName+'</label>'; | ||
| 696 | + | ||
| 697 | + | ||
| 698 | + var myRichMarker1 = new BMapLib.RichMarker(html2, point_center,{ | ||
| 699 | + "anchor" : new BMap.Size(-10,8), | ||
| 700 | + "enableDragging" : true}); | ||
| 701 | + | ||
| 702 | + | ||
| 703 | + myRichMarker1.disableDragging(); | ||
| 704 | + mapBValue.addOverlay(myRichMarker1); | ||
| 705 | + | ||
| 706 | + | ||
| 692 | // 创建标注物 | 707 | // 创建标注物 |
| 693 | marker = new BMap.Marker(point_center,{icon : icon_target}); | 708 | marker = new BMap.Marker(point_center,{icon : icon_target}); |
| 694 | 709 |
src/main/resources/static/pages/forms/statement/realDaily.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; } | ||
| 14 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title"> | ||
| 21 | + <h1>计划实际日报表</h1> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 25 | +<div class="row"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-title"> | ||
| 29 | + <form class="form-inline" action=""> | ||
| 30 | + <div style="display: inline-block;"> | ||
| 31 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 32 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 35 | + <span class="item-label" style="width: 80px;">时间: </span> | ||
| 36 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 37 | + </div> | ||
| 38 | + <div style="display: inline-block;"> | ||
| 39 | + <span class="item-label" style="width: 80px;">数据显示: </span> | ||
| 40 | + <select class="form-control" name="dataShow" id="dataShow" style="width: 180px;"> | ||
| 41 | + <option value="1">驾驶员、路牌、车辆</option> | ||
| 42 | + <option value="2">车辆、人员、路牌</option> | ||
| 43 | + <option value="3">路牌、人员、车辆</option> | ||
| 44 | + <option value="4">驾驶员</option> | ||
| 45 | + <option value="5">车辆</option> | ||
| 46 | + <option value="6">路牌</option> | ||
| 47 | + </select> | ||
| 48 | + </div> | ||
| 49 | + <div class="form-group"> | ||
| 50 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 51 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 52 | + </div> | ||
| 53 | + </form> | ||
| 54 | + </div> | ||
| 55 | + <div class="portlet-body"> | ||
| 56 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 57 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | ||
| 58 | + <thead> | ||
| 59 | + <tr> | ||
| 60 | + <th colspan="16">班次车辆人员日统计</th> | ||
| 61 | + </tr> | ||
| 62 | + </thead> | ||
| 63 | + <tbody class="realDaily"> | ||
| 64 | + | ||
| 65 | + </tbody> | ||
| 66 | + </table> | ||
| 67 | + </div> | ||
| 68 | + </div> | ||
| 69 | + </div> | ||
| 70 | + </div> | ||
| 71 | +</div> | ||
| 72 | + | ||
| 73 | +<script> | ||
| 74 | + $(function(){ | ||
| 75 | + // 关闭左侧栏 | ||
| 76 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 77 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 78 | + | ||
| 79 | + $("#date").datetimepicker({ | ||
| 80 | + format : 'YYYY-MM-DD', | ||
| 81 | + locale : 'zh-cn' | ||
| 82 | + }); | ||
| 83 | + | ||
| 84 | + $('#line').select2({ | ||
| 85 | + ajax: { | ||
| 86 | + url: '/realSchedule/findLine', | ||
| 87 | + type: 'post', | ||
| 88 | + dataType: 'json', | ||
| 89 | + delay: 150, | ||
| 90 | + data: function(params){ | ||
| 91 | + return{line: params.term}; | ||
| 92 | + }, | ||
| 93 | + processResults: function (data) { | ||
| 94 | + return { | ||
| 95 | + results: data | ||
| 96 | + }; | ||
| 97 | + }, | ||
| 98 | + cache: true | ||
| 99 | + }, | ||
| 100 | + templateResult: function(repo){ | ||
| 101 | + if (repo.loading) return repo.text; | ||
| 102 | + var h = '<span>'+repo.text+'</span>'; | ||
| 103 | + return h; | ||
| 104 | + }, | ||
| 105 | + escapeMarkup: function (markup) { return markup; }, | ||
| 106 | + minimumInputLength: 1, | ||
| 107 | + templateSelection: function(repo){ | ||
| 108 | + return repo.text; | ||
| 109 | + }, | ||
| 110 | + language: { | ||
| 111 | + noResults: function(){ | ||
| 112 | + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 113 | + }, | ||
| 114 | + inputTooShort : function(e) { | ||
| 115 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 116 | + }, | ||
| 117 | + searching : function() { | ||
| 118 | + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + }); | ||
| 122 | + | ||
| 123 | + var line; | ||
| 124 | + var date; | ||
| 125 | + $("#query").on("click",function(){ | ||
| 126 | + line = $("#line").val(); | ||
| 127 | + date = $("#date").val(); | ||
| 128 | + var dataShow = $("#dataShow").val(); | ||
| 129 | + $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ | ||
| 130 | + // 把数据填充到模版中 | ||
| 131 | + var tbodyHtml = template('realDaily_'+dataShow,{list:result}); | ||
| 132 | + // 把渲染好的模版html文本追加到表格中 | ||
| 133 | + $('#forms .realDaily').html(tbodyHtml); | ||
| 134 | + }); | ||
| 135 | + }); | ||
| 136 | + $("#export").on("click",function(){ | ||
| 137 | + $get('/realSchedule/dailyInfo',{line:line,date:date},function(result){ | ||
| 138 | + window.open("/downloadFile/download?fileName=实际计划日报表"+moment(date).format("YYYYMMDD")); | ||
| 139 | + }); | ||
| 140 | + }); | ||
| 141 | + }); | ||
| 142 | +</script> | ||
| 143 | +<script type="text/html" id="realDaily_1"> | ||
| 144 | + <tr> | ||
| 145 | + <td>驾驶员</td> | ||
| 146 | + <td>售票员</td> | ||
| 147 | + <td>路牌</td> | ||
| 148 | + <td>车辆</td> | ||
| 149 | + <td>计划里程</td> | ||
| 150 | + <td>实际计划里程</td> | ||
| 151 | + <td>营运里程</td> | ||
| 152 | + <td>空驶里程</td> | ||
| 153 | + <td>抽减里程</td> | ||
| 154 | + <td>增加里程</td> | ||
| 155 | + <td>总里程</td> | ||
| 156 | + <td>计划班次</td> | ||
| 157 | + <td>实际计划班次</td> | ||
| 158 | + <td>抽减班次</td> | ||
| 159 | + <td>增加班次</td> | ||
| 160 | + <td>实际班次</td> | ||
| 161 | + </tr> | ||
| 162 | + {{each list as obj i}} | ||
| 163 | + <tr> | ||
| 164 | + <td>{{obj.jName}}</td> | ||
| 165 | + <td>{{obj.sName}}</td> | ||
| 166 | + <td>{{obj.lpName}}</td> | ||
| 167 | + <td>{{obj.clZbh}}</td> | ||
| 168 | + <td> </td> | ||
| 169 | + <td> </td> | ||
| 170 | + <td> </td> | ||
| 171 | + <td> </td> | ||
| 172 | + <td> </td> | ||
| 173 | + <td> </td> | ||
| 174 | + <td> </td> | ||
| 175 | + <td> </td> | ||
| 176 | + <td> </td> | ||
| 177 | + <td> </td> | ||
| 178 | + <td> </td> | ||
| 179 | + <td> </td> | ||
| 180 | + </tr> | ||
| 181 | + {{/each}} | ||
| 182 | + {{if list.length == 0}} | ||
| 183 | + <tr> | ||
| 184 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 185 | + </tr> | ||
| 186 | + {{/if}} | ||
| 187 | +</script> | ||
| 188 | +<script type="text/html" id="realDaily_2"> | ||
| 189 | + <tr> | ||
| 190 | + <td>车辆</td> | ||
| 191 | + <td>驾驶员</td> | ||
| 192 | + <td>售票员</td> | ||
| 193 | + <td>路牌</td> | ||
| 194 | + <td>计划里程</td> | ||
| 195 | + <td>实际计划里程</td> | ||
| 196 | + <td>营运里程</td> | ||
| 197 | + <td>空驶里程</td> | ||
| 198 | + <td>抽减里程</td> | ||
| 199 | + <td>增加里程</td> | ||
| 200 | + <td>总里程</td> | ||
| 201 | + <td>计划班次</td> | ||
| 202 | + <td>实际计划班次</td> | ||
| 203 | + <td>抽减班次</td> | ||
| 204 | + <td>增加班次</td> | ||
| 205 | + <td>实际班次</td> | ||
| 206 | + </tr> | ||
| 207 | + {{each list as obj i}} | ||
| 208 | + <tr> | ||
| 209 | + <td>{{obj.clZbh}}</td> | ||
| 210 | + <td>{{obj.jName}}</td> | ||
| 211 | + <td>{{obj.sName}}</td> | ||
| 212 | + <td>{{obj.lpName}}</td> | ||
| 213 | + <td> </td> | ||
| 214 | + <td> </td> | ||
| 215 | + <td> </td> | ||
| 216 | + <td> </td> | ||
| 217 | + <td> </td> | ||
| 218 | + <td> </td> | ||
| 219 | + <td> </td> | ||
| 220 | + <td> </td> | ||
| 221 | + <td> </td> | ||
| 222 | + <td> </td> | ||
| 223 | + <td> </td> | ||
| 224 | + <td> </td> | ||
| 225 | + </tr> | ||
| 226 | + {{/each}} | ||
| 227 | + {{if list.length == 0}} | ||
| 228 | + <tr> | ||
| 229 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 230 | + </tr> | ||
| 231 | + {{/if}} | ||
| 232 | +</script> | ||
| 233 | +<script type="text/html" id="realDaily_3"> | ||
| 234 | + <tr> | ||
| 235 | + <td>路牌</td> | ||
| 236 | + <td>车辆</td> | ||
| 237 | + <td>驾驶员</td> | ||
| 238 | + <td>售票员</td> | ||
| 239 | + <td>计划里程</td> | ||
| 240 | + <td>实际计划里程</td> | ||
| 241 | + <td>营运里程</td> | ||
| 242 | + <td>空驶里程</td> | ||
| 243 | + <td>抽减里程</td> | ||
| 244 | + <td>增加里程</td> | ||
| 245 | + <td>总里程</td> | ||
| 246 | + <td>计划班次</td> | ||
| 247 | + <td>实际计划班次</td> | ||
| 248 | + <td>抽减班次</td> | ||
| 249 | + <td>增加班次</td> | ||
| 250 | + <td>实际班次</td> | ||
| 251 | + </tr> | ||
| 252 | + {{each list as obj i}} | ||
| 253 | + <tr> | ||
| 254 | + <td>{{obj.lpName}}</td> | ||
| 255 | + <td>{{obj.clZbh}}</td> | ||
| 256 | + <td>{{obj.jName}}</td> | ||
| 257 | + <td>{{obj.sName}}</td> | ||
| 258 | + <td> </td> | ||
| 259 | + <td> </td> | ||
| 260 | + <td> </td> | ||
| 261 | + <td> </td> | ||
| 262 | + <td> </td> | ||
| 263 | + <td> </td> | ||
| 264 | + <td> </td> | ||
| 265 | + <td> </td> | ||
| 266 | + <td> </td> | ||
| 267 | + <td> </td> | ||
| 268 | + <td> </td> | ||
| 269 | + <td> </td> | ||
| 270 | + </tr> | ||
| 271 | + {{/each}} | ||
| 272 | + {{if list.length == 0}} | ||
| 273 | + <tr> | ||
| 274 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 275 | + </tr> | ||
| 276 | + {{/if}} | ||
| 277 | +</script> | ||
| 278 | +<script type="text/html" id="realDaily_4"> | ||
| 279 | + <tr> | ||
| 280 | + <td>驾驶员</td> | ||
| 281 | + <td>计划里程</td> | ||
| 282 | + <td>实际计划里程</td> | ||
| 283 | + <td>营运里程</td> | ||
| 284 | + <td>空驶里程</td> | ||
| 285 | + <td>抽减里程</td> | ||
| 286 | + <td>增加里程</td> | ||
| 287 | + <td>总里程</td> | ||
| 288 | + <td>计划班次</td> | ||
| 289 | + <td>实际计划班次</td> | ||
| 290 | + <td>抽减班次</td> | ||
| 291 | + <td>增加班次</td> | ||
| 292 | + <td>实际班次</td> | ||
| 293 | + </tr> | ||
| 294 | + {{each list as obj i}} | ||
| 295 | + <tr> | ||
| 296 | + <td>{{obj.jName}}</td> | ||
| 297 | + <td> </td> | ||
| 298 | + <td> </td> | ||
| 299 | + <td> </td> | ||
| 300 | + <td> </td> | ||
| 301 | + <td> </td> | ||
| 302 | + <td> </td> | ||
| 303 | + <td> </td> | ||
| 304 | + <td> </td> | ||
| 305 | + <td> </td> | ||
| 306 | + <td> </td> | ||
| 307 | + <td> </td> | ||
| 308 | + <td> </td> | ||
| 309 | + </tr> | ||
| 310 | + {{/each}} | ||
| 311 | + {{if list.length == 0}} | ||
| 312 | + <tr> | ||
| 313 | + <td colspan="13"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 314 | + </tr> | ||
| 315 | + {{/if}} | ||
| 316 | +</script> | ||
| 317 | +<script type="text/html" id="realDaily_5"> | ||
| 318 | + <tr> | ||
| 319 | + <td>车辆</td> | ||
| 320 | + <td>计划里程</td> | ||
| 321 | + <td>实际计划里程</td> | ||
| 322 | + <td>营运里程</td> | ||
| 323 | + <td>空驶里程</td> | ||
| 324 | + <td>抽减里程</td> | ||
| 325 | + <td>增加里程</td> | ||
| 326 | + <td>总里程</td> | ||
| 327 | + <td>计划班次</td> | ||
| 328 | + <td>实际计划班次</td> | ||
| 329 | + <td>抽减班次</td> | ||
| 330 | + <td>增加班次</td> | ||
| 331 | + <td>实际班次</td> | ||
| 332 | + </tr> | ||
| 333 | + {{each list as obj i}} | ||
| 334 | + <tr> | ||
| 335 | + <td>{{obj.clZbh}}</td> | ||
| 336 | + <td> </td> | ||
| 337 | + <td> </td> | ||
| 338 | + <td> </td> | ||
| 339 | + <td> </td> | ||
| 340 | + <td> </td> | ||
| 341 | + <td> </td> | ||
| 342 | + <td> </td> | ||
| 343 | + <td> </td> | ||
| 344 | + <td> </td> | ||
| 345 | + <td> </td> | ||
| 346 | + <td> </td> | ||
| 347 | + <td> </td> | ||
| 348 | + </tr> | ||
| 349 | + {{/each}} | ||
| 350 | + {{if list.length == 0}} | ||
| 351 | + <tr> | ||
| 352 | + <td colspan="13"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 353 | + </tr> | ||
| 354 | + {{/if}} | ||
| 355 | +</script> | ||
| 356 | +<script type="text/html" id="realDaily_6"> | ||
| 357 | + <tr> | ||
| 358 | + <td>路牌</td> | ||
| 359 | + <td>计划里程</td> | ||
| 360 | + <td>实际计划里程</td> | ||
| 361 | + <td>营运里程</td> | ||
| 362 | + <td>空驶里程</td> | ||
| 363 | + <td>抽减里程</td> | ||
| 364 | + <td>增加里程</td> | ||
| 365 | + <td>总里程</td> | ||
| 366 | + <td>计划班次</td> | ||
| 367 | + <td>实际计划班次</td> | ||
| 368 | + <td>抽减班次</td> | ||
| 369 | + <td>增加班次</td> | ||
| 370 | + <td>实际班次</td> | ||
| 371 | + </tr> | ||
| 372 | + {{each list as obj i}} | ||
| 373 | + <tr> | ||
| 374 | + <td>{{obj.lpName}}</td> | ||
| 375 | + <td> </td> | ||
| 376 | + <td> </td> | ||
| 377 | + <td> </td> | ||
| 378 | + <td> </td> | ||
| 379 | + <td> </td> | ||
| 380 | + <td> </td> | ||
| 381 | + <td> </td> | ||
| 382 | + <td> </td> | ||
| 383 | + <td> </td> | ||
| 384 | + <td> </td> | ||
| 385 | + <td> </td> | ||
| 386 | + <td> </td> | ||
| 387 | + </tr> | ||
| 388 | + {{/each}} | ||
| 389 | + {{if list.length == 0}} | ||
| 390 | + <tr> | ||
| 391 | + <td colspan="13"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 392 | + </tr> | ||
| 393 | + {{/if}} | ||
| 394 | +</script> | ||
| 0 | \ No newline at end of file | 395 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/realDaily_minhang.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; } | ||
| 14 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title"> | ||
| 21 | + <h1>计划实际日报表</h1> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 25 | +<div class="row"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-title"> | ||
| 29 | + <form class="form-inline" action=""> | ||
| 30 | + <div style="display: inline-block;"> | ||
| 31 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 32 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 35 | + <span class="item-label" style="width: 80px;">时间: </span> | ||
| 36 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 37 | + </div> | ||
| 38 | + <div style="display: inline-block;"> | ||
| 39 | + <span class="item-label" style="width: 80px;">数据显示: </span> | ||
| 40 | + <select class="form-control" name="dataShow" id="dataShow" style="width: 180px;"> | ||
| 41 | + <option value="1">驾驶员、路牌、车辆</option> | ||
| 42 | + <option value="2">车辆、人员、路牌</option> | ||
| 43 | + <option value="3">路牌、人员、车辆</option> | ||
| 44 | + <option value="4">驾驶员</option> | ||
| 45 | + <option value="5">车辆</option> | ||
| 46 | + <option value="6">路牌</option> | ||
| 47 | + </select> | ||
| 48 | + </div> | ||
| 49 | + <div class="form-group"> | ||
| 50 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 51 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 52 | + </div> | ||
| 53 | + </form> | ||
| 54 | + </div> | ||
| 55 | + <div class="portlet-body"> | ||
| 56 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 57 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | ||
| 58 | + <thead> | ||
| 59 | + <tr> | ||
| 60 | + <th colspan="16">班次车辆人员日统计</th> | ||
| 61 | + </tr> | ||
| 62 | + </thead> | ||
| 63 | + <tbody class="realDaily"> | ||
| 64 | + | ||
| 65 | + </tbody> | ||
| 66 | + </table> | ||
| 67 | + </div> | ||
| 68 | + </div> | ||
| 69 | + </div> | ||
| 70 | + </div> | ||
| 71 | +</div> | ||
| 72 | + | ||
| 73 | +<script> | ||
| 74 | + $(function(){ | ||
| 75 | + // 关闭左侧栏 | ||
| 76 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 77 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 78 | + | ||
| 79 | + $("#date").datetimepicker({ | ||
| 80 | + format : 'YYYY-MM-DD', | ||
| 81 | + locale : 'zh-cn' | ||
| 82 | + }); | ||
| 83 | + | ||
| 84 | + $('#line').select2({ | ||
| 85 | + ajax: { | ||
| 86 | + url: '/realSchedule/findLine', | ||
| 87 | + type: 'post', | ||
| 88 | + dataType: 'json', | ||
| 89 | + delay: 150, | ||
| 90 | + data: function(params){ | ||
| 91 | + return{line: params.term}; | ||
| 92 | + }, | ||
| 93 | + processResults: function (data) { | ||
| 94 | + return { | ||
| 95 | + results: data | ||
| 96 | + }; | ||
| 97 | + }, | ||
| 98 | + cache: true | ||
| 99 | + }, | ||
| 100 | + templateResult: function(repo){ | ||
| 101 | + if (repo.loading) return repo.text; | ||
| 102 | + var h = '<span>'+repo.text+'</span>'; | ||
| 103 | + return h; | ||
| 104 | + }, | ||
| 105 | + escapeMarkup: function (markup) { return markup; }, | ||
| 106 | + minimumInputLength: 1, | ||
| 107 | + templateSelection: function(repo){ | ||
| 108 | + return repo.text; | ||
| 109 | + }, | ||
| 110 | + language: { | ||
| 111 | + noResults: function(){ | ||
| 112 | + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 113 | + }, | ||
| 114 | + inputTooShort : function(e) { | ||
| 115 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 116 | + }, | ||
| 117 | + searching : function() { | ||
| 118 | + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + }); | ||
| 122 | + | ||
| 123 | + var line; | ||
| 124 | + var date; | ||
| 125 | + $("#query").on("click",function(){ | ||
| 126 | + line = $("#line").val(); | ||
| 127 | + date = $("#date").val(); | ||
| 128 | + var dataShow = $("#dataShow").val(); | ||
| 129 | + $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ | ||
| 130 | + // 把数据填充到模版中 | ||
| 131 | + var tbodyHtml = template('realDaily_'+dataShow,{list:result}); | ||
| 132 | + // 把渲染好的模版html文本追加到表格中 | ||
| 133 | + $('#forms .realDaily').html(tbodyHtml); | ||
| 134 | + }); | ||
| 135 | + }); | ||
| 136 | + $("#export").on("click",function(){ | ||
| 137 | + $get('/realSchedule/dailyInfo',{line:line,date:date},function(result){ | ||
| 138 | + window.open("/downloadFile/download?fileName=实际计划日报表"+moment(date).format("YYYYMMDD")); | ||
| 139 | + }); | ||
| 140 | + }); | ||
| 141 | + }); | ||
| 142 | +</script> | ||
| 143 | +<script type="text/html" id="realDaily_1"> | ||
| 144 | + <tr> | ||
| 145 | + <td>驾驶员</td> | ||
| 146 | + <td>售票员</td> | ||
| 147 | + <td>路牌</td> | ||
| 148 | + <td>车辆</td> | ||
| 149 | + <td>计划里程</td> | ||
| 150 | + <td>实际计划里程</td> | ||
| 151 | + <td>营运里程</td> | ||
| 152 | + <td>空驶里程</td> | ||
| 153 | + <td>抽减里程</td> | ||
| 154 | + <td>增加里程</td> | ||
| 155 | + <td>总里程</td> | ||
| 156 | + <td>计划班次</td> | ||
| 157 | + <td>实际计划班次</td> | ||
| 158 | + <td>抽减班次</td> | ||
| 159 | + <td>增加班次</td> | ||
| 160 | + <td>实际班次</td> | ||
| 161 | + </tr> | ||
| 162 | + {{each list as obj i}} | ||
| 163 | + <tr> | ||
| 164 | + <td>{{obj.jName}}</td> | ||
| 165 | + <td>{{obj.sName}}</td> | ||
| 166 | + <td>{{obj.lpName}}</td> | ||
| 167 | + <td>{{obj.clZbh}}</td> | ||
| 168 | + <td> </td> | ||
| 169 | + <td> </td> | ||
| 170 | + <td> </td> | ||
| 171 | + <td> </td> | ||
| 172 | + <td> </td> | ||
| 173 | + <td> </td> | ||
| 174 | + <td> </td> | ||
| 175 | + <td> </td> | ||
| 176 | + <td> </td> | ||
| 177 | + <td> </td> | ||
| 178 | + <td> </td> | ||
| 179 | + <td> </td> | ||
| 180 | + </tr> | ||
| 181 | + {{/each}} | ||
| 182 | + {{if list.length == 0}} | ||
| 183 | + <tr> | ||
| 184 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 185 | + </tr> | ||
| 186 | + {{/if}} | ||
| 187 | +</script> | ||
| 188 | +<script type="text/html" id="realDaily_2"> | ||
| 189 | + <tr> | ||
| 190 | + <td>车辆</td> | ||
| 191 | + <td>驾驶员</td> | ||
| 192 | + <td>售票员</td> | ||
| 193 | + <td>路牌</td> | ||
| 194 | + <td>计划里程</td> | ||
| 195 | + <td>实际计划里程</td> | ||
| 196 | + <td>营运里程</td> | ||
| 197 | + <td>空驶里程</td> | ||
| 198 | + <td>抽减里程</td> | ||
| 199 | + <td>增加里程</td> | ||
| 200 | + <td>总里程</td> | ||
| 201 | + <td>计划班次</td> | ||
| 202 | + <td>实际计划班次</td> | ||
| 203 | + <td>抽减班次</td> | ||
| 204 | + <td>增加班次</td> | ||
| 205 | + <td>实际班次</td> | ||
| 206 | + </tr> | ||
| 207 | + {{each list as obj i}} | ||
| 208 | + <tr> | ||
| 209 | + <td>{{obj.clZbh}}</td> | ||
| 210 | + <td>{{obj.jName}}</td> | ||
| 211 | + <td>{{obj.sName}}</td> | ||
| 212 | + <td>{{obj.lpName}}</td> | ||
| 213 | + <td> </td> | ||
| 214 | + <td> </td> | ||
| 215 | + <td> </td> | ||
| 216 | + <td> </td> | ||
| 217 | + <td> </td> | ||
| 218 | + <td> </td> | ||
| 219 | + <td> </td> | ||
| 220 | + <td> </td> | ||
| 221 | + <td> </td> | ||
| 222 | + <td> </td> | ||
| 223 | + <td> </td> | ||
| 224 | + <td> </td> | ||
| 225 | + </tr> | ||
| 226 | + {{/each}} | ||
| 227 | + {{if list.length == 0}} | ||
| 228 | + <tr> | ||
| 229 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 230 | + </tr> | ||
| 231 | + {{/if}} | ||
| 232 | +</script> | ||
| 233 | +<script type="text/html" id="realDaily_3"> | ||
| 234 | + <tr> | ||
| 235 | + <td>路牌</td> | ||
| 236 | + <td>车辆</td> | ||
| 237 | + <td>驾驶员</td> | ||
| 238 | + <td>售票员</td> | ||
| 239 | + <td>计划里程</td> | ||
| 240 | + <td>实际计划里程</td> | ||
| 241 | + <td>营运里程</td> | ||
| 242 | + <td>空驶里程</td> | ||
| 243 | + <td>抽减里程</td> | ||
| 244 | + <td>增加里程</td> | ||
| 245 | + <td>总里程</td> | ||
| 246 | + <td>计划班次</td> | ||
| 247 | + <td>实际计划班次</td> | ||
| 248 | + <td>抽减班次</td> | ||
| 249 | + <td>增加班次</td> | ||
| 250 | + <td>实际班次</td> | ||
| 251 | + </tr> | ||
| 252 | + {{each list as obj i}} | ||
| 253 | + <tr> | ||
| 254 | + <td>{{obj.lpName}}</td> | ||
| 255 | + <td>{{obj.clZbh}}</td> | ||
| 256 | + <td>{{obj.jName}}</td> | ||
| 257 | + <td>{{obj.sName}}</td> | ||
| 258 | + <td> </td> | ||
| 259 | + <td> </td> | ||
| 260 | + <td> </td> | ||
| 261 | + <td> </td> | ||
| 262 | + <td> </td> | ||
| 263 | + <td> </td> | ||
| 264 | + <td> </td> | ||
| 265 | + <td> </td> | ||
| 266 | + <td> </td> | ||
| 267 | + <td> </td> | ||
| 268 | + <td> </td> | ||
| 269 | + <td> </td> | ||
| 270 | + </tr> | ||
| 271 | + {{/each}} | ||
| 272 | + {{if list.length == 0}} | ||
| 273 | + <tr> | ||
| 274 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 275 | + </tr> | ||
| 276 | + {{/if}} | ||
| 277 | +</script> | ||
| 278 | +<script type="text/html" id="realDaily_4"> | ||
| 279 | + <tr> | ||
| 280 | + <td>驾驶员</td> | ||
| 281 | + <td>计划里程</td> | ||
| 282 | + <td>实际计划里程</td> | ||
| 283 | + <td>营运里程</td> | ||
| 284 | + <td>空驶里程</td> | ||
| 285 | + <td>抽减里程</td> | ||
| 286 | + <td>增加里程</td> | ||
| 287 | + <td>总里程</td> | ||
| 288 | + <td>计划班次</td> | ||
| 289 | + <td>实际计划班次</td> | ||
| 290 | + <td>抽减班次</td> | ||
| 291 | + <td>增加班次</td> | ||
| 292 | + <td>实际班次</td> | ||
| 293 | + </tr> | ||
| 294 | + {{each list as obj i}} | ||
| 295 | + <tr> | ||
| 296 | + <td>{{obj.jName}}</td> | ||
| 297 | + <td> </td> | ||
| 298 | + <td> </td> | ||
| 299 | + <td> </td> | ||
| 300 | + <td> </td> | ||
| 301 | + <td> </td> | ||
| 302 | + <td> </td> | ||
| 303 | + <td> </td> | ||
| 304 | + <td> </td> | ||
| 305 | + <td> </td> | ||
| 306 | + <td> </td> | ||
| 307 | + <td> </td> | ||
| 308 | + <td> </td> | ||
| 309 | + </tr> | ||
| 310 | + {{/each}} | ||
| 311 | + {{if list.length == 0}} | ||
| 312 | + <tr> | ||
| 313 | + <td colspan="13"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 314 | + </tr> | ||
| 315 | + {{/if}} | ||
| 316 | +</script> | ||
| 317 | +<script type="text/html" id="realDaily_5"> | ||
| 318 | + <tr> | ||
| 319 | + <td>车辆</td> | ||
| 320 | + <td>计划里程</td> | ||
| 321 | + <td>实际计划里程</td> | ||
| 322 | + <td>营运里程</td> | ||
| 323 | + <td>空驶里程</td> | ||
| 324 | + <td>抽减里程</td> | ||
| 325 | + <td>增加里程</td> | ||
| 326 | + <td>总里程</td> | ||
| 327 | + <td>计划班次</td> | ||
| 328 | + <td>实际计划班次</td> | ||
| 329 | + <td>抽减班次</td> | ||
| 330 | + <td>增加班次</td> | ||
| 331 | + <td>实际班次</td> | ||
| 332 | + </tr> | ||
| 333 | + {{each list as obj i}} | ||
| 334 | + <tr> | ||
| 335 | + <td>{{obj.clZbh}}</td> | ||
| 336 | + <td> </td> | ||
| 337 | + <td> </td> | ||
| 338 | + <td> </td> | ||
| 339 | + <td> </td> | ||
| 340 | + <td> </td> | ||
| 341 | + <td> </td> | ||
| 342 | + <td> </td> | ||
| 343 | + <td> </td> | ||
| 344 | + <td> </td> | ||
| 345 | + <td> </td> | ||
| 346 | + <td> </td> | ||
| 347 | + <td> </td> | ||
| 348 | + </tr> | ||
| 349 | + {{/each}} | ||
| 350 | + {{if list.length == 0}} | ||
| 351 | + <tr> | ||
| 352 | + <td colspan="13"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 353 | + </tr> | ||
| 354 | + {{/if}} | ||
| 355 | +</script> | ||
| 356 | +<script type="text/html" id="realDaily_6"> | ||
| 357 | + <tr> | ||
| 358 | + <td>路牌</td> | ||
| 359 | + <td>计划里程</td> | ||
| 360 | + <td>实际计划里程</td> | ||
| 361 | + <td>营运里程</td> | ||
| 362 | + <td>空驶里程</td> | ||
| 363 | + <td>抽减里程</td> | ||
| 364 | + <td>增加里程</td> | ||
| 365 | + <td>总里程</td> | ||
| 366 | + <td>计划班次</td> | ||
| 367 | + <td>实际计划班次</td> | ||
| 368 | + <td>抽减班次</td> | ||
| 369 | + <td>增加班次</td> | ||
| 370 | + <td>实际班次</td> | ||
| 371 | + </tr> | ||
| 372 | + {{each list as obj i}} | ||
| 373 | + <tr> | ||
| 374 | + <td>{{obj.lpName}}</td> | ||
| 375 | + <td> </td> | ||
| 376 | + <td> </td> | ||
| 377 | + <td> </td> | ||
| 378 | + <td> </td> | ||
| 379 | + <td> </td> | ||
| 380 | + <td> </td> | ||
| 381 | + <td> </td> | ||
| 382 | + <td> </td> | ||
| 383 | + <td> </td> | ||
| 384 | + <td> </td> | ||
| 385 | + <td> </td> | ||
| 386 | + <td> </td> | ||
| 387 | + </tr> | ||
| 388 | + {{/each}} | ||
| 389 | + {{if list.length == 0}} | ||
| 390 | + <tr> | ||
| 391 | + <td colspan="13"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 392 | + </tr> | ||
| 393 | + {{/if}} | ||
| 394 | +</script> | ||
| 0 | \ No newline at end of file | 395 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/waybill.html
| @@ -134,10 +134,11 @@ | @@ -134,10 +134,11 @@ | ||
| 134 | } | 134 | } |
| 135 | } | 135 | } |
| 136 | }); | 136 | }); |
| 137 | - | 137 | + |
| 138 | + var date; | ||
| 138 | $("#query").on("click",function(){ | 139 | $("#query").on("click",function(){ |
| 139 | var line = $("#line").val(); | 140 | var line = $("#line").val(); |
| 140 | - var date = $("#date").val(); | 141 | + date = $("#date").val(); |
| 141 | $(".hidden").removeClass("hidden"); | 142 | $(".hidden").removeClass("hidden"); |
| 142 | $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ | 143 | $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ |
| 143 | // 把数据填充到模版中 | 144 | // 把数据填充到模版中 |
| @@ -150,10 +151,6 @@ | @@ -150,10 +151,6 @@ | ||
| 150 | var params = {}; | 151 | var params = {}; |
| 151 | var jName; | 152 | var jName; |
| 152 | $("#info tbody").on("click","tr",function(){ | 153 | $("#info tbody").on("click","tr",function(){ |
| 153 | - $('#forms .ludan_1').html(''); | ||
| 154 | - $('#forms .ludan_2').html(''); | ||
| 155 | - $('#forms .ludan_3').html(''); | ||
| 156 | - $('#forms .ludan_4').html(''); | ||
| 157 | if($(this).children().size() < 2){ | 154 | if($(this).children().size() < 2){ |
| 158 | return; | 155 | return; |
| 159 | } | 156 | } |
| @@ -168,24 +165,24 @@ | @@ -168,24 +165,24 @@ | ||
| 168 | var ludan_1 = template('ludan_1',result); | 165 | var ludan_1 = template('ludan_1',result); |
| 169 | //var ludan_4 = template('ludan_4',result); | 166 | //var ludan_4 = template('ludan_4',result); |
| 170 | // 把渲染好的模版html文本追加到表格中 | 167 | // 把渲染好的模版html文本追加到表格中 |
| 171 | - $('#forms .ludan_1').append(ludan_1); | ||
| 172 | - //$('#forms .ludan_4').append(ludan_4); | 168 | + $('#forms .ludan_1').html(ludan_1); |
| 169 | + //$('#forms .ludan_4').html(ludan_4); | ||
| 173 | }); | 170 | }); |
| 174 | - $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2]},function(result){ | 171 | + $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ |
| 175 | getTime(result); | 172 | getTime(result); |
| 176 | var ludan_2 = template('ludan_2',{list:result}); | 173 | var ludan_2 = template('ludan_2',{list:result}); |
| 177 | // 把渲染好的模版html文本追加到表格中 | 174 | // 把渲染好的模版html文本追加到表格中 |
| 178 | - $('#forms .ludan_2').append(ludan_2); | 175 | + $('#forms .ludan_2').html(ludan_2); |
| 179 | }); | 176 | }); |
| 180 | - $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2]},function(result){ | 177 | + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ |
| 181 | var ludan_3 = template('ludan_3',result); | 178 | var ludan_3 = template('ludan_3',result); |
| 182 | - $('#forms .ludan_3').append(ludan_3); | 179 | + $('#forms .ludan_3').html(ludan_3); |
| 183 | }); | 180 | }); |
| 184 | 181 | ||
| 185 | }); | 182 | }); |
| 186 | 183 | ||
| 187 | $("#export").on("click",function(){ | 184 | $("#export").on("click",function(){ |
| 188 | - $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2]},function(result){ | 185 | + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ |
| 189 | window.open("/downloadFile/download?fileName="+jName); | 186 | window.open("/downloadFile/download?fileName="+jName); |
| 190 | }); | 187 | }); |
| 191 | }); | 188 | }); |
src/main/resources/static/pages/forms/statement/waybill_minhang.html
| @@ -134,10 +134,11 @@ | @@ -134,10 +134,11 @@ | ||
| 134 | } | 134 | } |
| 135 | } | 135 | } |
| 136 | }); | 136 | }); |
| 137 | - | 137 | + |
| 138 | + var date; | ||
| 138 | $("#query").on("click",function(){ | 139 | $("#query").on("click",function(){ |
| 139 | var line = $("#line").val(); | 140 | var line = $("#line").val(); |
| 140 | - var date = $("#date").val(); | 141 | + date = $("#date").val(); |
| 141 | $(".hidden").removeClass("hidden"); | 142 | $(".hidden").removeClass("hidden"); |
| 142 | $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ | 143 | $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ |
| 143 | // 把数据填充到模版中 | 144 | // 把数据填充到模版中 |
| @@ -150,10 +151,6 @@ | @@ -150,10 +151,6 @@ | ||
| 150 | var params = {}; | 151 | var params = {}; |
| 151 | var jName; | 152 | var jName; |
| 152 | $("#info tbody").on("click","tr",function(){ | 153 | $("#info tbody").on("click","tr",function(){ |
| 153 | - $('#forms .ludan_1').html(''); | ||
| 154 | - $('#forms .ludan_2').html(''); | ||
| 155 | - $('#forms .ludan_3').html(''); | ||
| 156 | - $('#forms .ludan_4').html(''); | ||
| 157 | if($(this).children().size() < 2){ | 154 | if($(this).children().size() < 2){ |
| 158 | return; | 155 | return; |
| 159 | } | 156 | } |
| @@ -168,24 +165,24 @@ | @@ -168,24 +165,24 @@ | ||
| 168 | var ludan_1 = template('ludan_1',result); | 165 | var ludan_1 = template('ludan_1',result); |
| 169 | //var ludan_4 = template('ludan_4',result); | 166 | //var ludan_4 = template('ludan_4',result); |
| 170 | // 把渲染好的模版html文本追加到表格中 | 167 | // 把渲染好的模版html文本追加到表格中 |
| 171 | - $('#forms .ludan_1').append(ludan_1); | ||
| 172 | - //$('#forms .ludan_4').append(ludan_4); | 168 | + $('#forms .ludan_1').html(ludan_1); |
| 169 | + //$('#forms .ludan_4').html(ludan_4); | ||
| 173 | }); | 170 | }); |
| 174 | - $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2]},function(result){ | 171 | + $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ |
| 175 | getTime(result); | 172 | getTime(result); |
| 176 | var ludan_2 = template('ludan_2',{list:result}); | 173 | var ludan_2 = template('ludan_2',{list:result}); |
| 177 | // 把渲染好的模版html文本追加到表格中 | 174 | // 把渲染好的模版html文本追加到表格中 |
| 178 | - $('#forms .ludan_2').append(ludan_2); | 175 | + $('#forms .ludan_2').html(ludan_2); |
| 179 | }); | 176 | }); |
| 180 | - $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2]},function(result){ | 177 | + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ |
| 181 | var ludan_3 = template('ludan_3',result); | 178 | var ludan_3 = template('ludan_3',result); |
| 182 | - $('#forms .ludan_3').append(ludan_3); | 179 | + $('#forms .ludan_3').html(ludan_3); |
| 183 | }); | 180 | }); |
| 184 | 181 | ||
| 185 | }); | 182 | }); |
| 186 | 183 | ||
| 187 | $("#export").on("click",function(){ | 184 | $("#export").on("click",function(){ |
| 188 | - $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2]},function(result){ | 185 | + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ |
| 189 | window.open("/downloadFile/download?fileName="+jName); | 186 | window.open("/downloadFile/download?fileName="+jName); |
| 190 | }); | 187 | }); |
| 191 | }); | 188 | }); |