Commit 52e8edf46c1150de72a30cd88ba741a85cfdcc7e
1 parent
87f6daff
update
Showing
19 changed files
with
415 additions
and
251 deletions
src/main/java/com/bsth/controller/StationRouteController.java
| 1 | package com.bsth.controller; | 1 | package com.bsth.controller; |
| 2 | 2 | ||
| 3 | -import java.util.List; | ||
| 4 | -import java.util.Map; | ||
| 5 | - | 3 | +import com.bsth.entity.StationRoute; |
| 4 | +import com.bsth.repository.StationRouteRepository; | ||
| 5 | +import com.bsth.service.StationRouteService; | ||
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.web.bind.annotation.RequestMapping; | 7 | import org.springframework.web.bind.annotation.RequestMapping; |
| 8 | import org.springframework.web.bind.annotation.RequestMethod; | 8 | import org.springframework.web.bind.annotation.RequestMethod; |
| 9 | import org.springframework.web.bind.annotation.RequestParam; | 9 | import org.springframework.web.bind.annotation.RequestParam; |
| 10 | import org.springframework.web.bind.annotation.RestController; | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | 11 | ||
| 12 | -import com.bsth.entity.StationRoute; | ||
| 13 | -import com.bsth.service.StationRouteService; | 12 | +import java.util.List; |
| 13 | +import java.util.Map; | ||
| 14 | 14 | ||
| 15 | /** | 15 | /** |
| 16 | * | 16 | * |
| @@ -33,6 +33,8 @@ public class StationRouteController extends BaseController<StationRoute, Integer | @@ -33,6 +33,8 @@ public class StationRouteController extends BaseController<StationRoute, Integer | ||
| 33 | 33 | ||
| 34 | @Autowired | 34 | @Autowired |
| 35 | StationRouteService service; | 35 | StationRouteService service; |
| 36 | + @Autowired | ||
| 37 | + StationRouteRepository stationRouteRepository; | ||
| 36 | 38 | ||
| 37 | /** | 39 | /** |
| 38 | * @Description :TODO(查询树站点与路段数据) | 40 | * @Description :TODO(查询树站点与路段数据) |
| @@ -112,5 +114,12 @@ public class StationRouteController extends BaseController<StationRoute, Integer | @@ -112,5 +114,12 @@ public class StationRouteController extends BaseController<StationRoute, Integer | ||
| 112 | 114 | ||
| 113 | return service.findStationRouteInfo(map); | 115 | return service.findStationRouteInfo(map); |
| 114 | } | 116 | } |
| 117 | + | ||
| 118 | + @RequestMapping(value = "/stations", method = RequestMethod.GET) | ||
| 119 | + public List<Map<String, Object>> findStations(Integer xlid, Integer xldir) { | ||
| 120 | + return stationRouteRepository.findStations(xlid, xldir); | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + | ||
| 115 | 124 | ||
| 116 | } | 125 | } |
src/main/java/com/bsth/controller/schedule/TTInfoController.java
| @@ -2,6 +2,7 @@ package com.bsth.controller.schedule; | @@ -2,6 +2,7 @@ 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.TTInfo; | 4 | import com.bsth.entity.schedule.TTInfo; |
| 5 | +import com.bsth.repository.schedule.TTInfoDetailRepository; | ||
| 5 | import com.bsth.repository.schedule.TTInfoRepository; | 6 | import com.bsth.repository.schedule.TTInfoRepository; |
| 6 | import com.bsth.service.schedule.utils.DataToolsProperties; | 7 | import com.bsth.service.schedule.utils.DataToolsProperties; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -21,6 +22,8 @@ public class TTInfoController extends BaseController<TTInfo, Long> { | @@ -21,6 +22,8 @@ public class TTInfoController extends BaseController<TTInfo, Long> { | ||
| 21 | private DataToolsProperties dataToolsProperties; | 22 | private DataToolsProperties dataToolsProperties; |
| 22 | @Autowired | 23 | @Autowired |
| 23 | private TTInfoRepository ttInfoRepository; | 24 | private TTInfoRepository ttInfoRepository; |
| 25 | + @Autowired | ||
| 26 | + private TTInfoDetailRepository ttInfoDetailRepository; | ||
| 24 | 27 | ||
| 25 | @Override | 28 | @Override |
| 26 | protected String getDataImportKtrClasspath() { | 29 | protected String getDataImportKtrClasspath() { |
src/main/java/com/bsth/controller/schedule/TTInfoDetailController.java
| @@ -4,13 +4,11 @@ import com.bsth.common.ResponseCode; | @@ -4,13 +4,11 @@ import com.bsth.common.ResponseCode; | ||
| 4 | import com.bsth.controller.BaseController; | 4 | import com.bsth.controller.BaseController; |
| 5 | import com.bsth.entity.CarPark; | 5 | import com.bsth.entity.CarPark; |
| 6 | import com.bsth.entity.schedule.TTInfoDetail; | 6 | import com.bsth.entity.schedule.TTInfoDetail; |
| 7 | +import com.bsth.repository.schedule.TTInfoDetailRepository; | ||
| 7 | import com.bsth.service.CarParkService; | 8 | import com.bsth.service.CarParkService; |
| 8 | import com.bsth.service.schedule.TTInfoDetailServiceImpl; | 9 | import com.bsth.service.schedule.TTInfoDetailServiceImpl; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 11 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 12 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 13 | -import org.springframework.web.bind.annotation.RestController; | 11 | +import org.springframework.web.bind.annotation.*; |
| 14 | import org.springframework.web.multipart.MultipartFile; | 12 | import org.springframework.web.multipart.MultipartFile; |
| 15 | 13 | ||
| 16 | import java.util.HashMap; | 14 | import java.util.HashMap; |
| @@ -27,6 +25,8 @@ public class TTInfoDetailController extends BaseController<TTInfoDetail, Long> { | @@ -27,6 +25,8 @@ public class TTInfoDetailController extends BaseController<TTInfoDetail, Long> { | ||
| 27 | private TTInfoDetailServiceImpl ttInfoDetailService; | 25 | private TTInfoDetailServiceImpl ttInfoDetailService; |
| 28 | @Autowired | 26 | @Autowired |
| 29 | private CarParkService carParkService; | 27 | private CarParkService carParkService; |
| 28 | + @Autowired | ||
| 29 | + private TTInfoDetailRepository ttInfoDetailRepository; | ||
| 30 | 30 | ||
| 31 | @RequestMapping(value = "/dataImportExtend", method = RequestMethod.POST) | 31 | @RequestMapping(value = "/dataImportExtend", method = RequestMethod.POST) |
| 32 | public Map<String, Object> uploadDataAndImport( | 32 | public Map<String, Object> uploadDataAndImport( |
| @@ -63,4 +63,24 @@ public class TTInfoDetailController extends BaseController<TTInfoDetail, Long> { | @@ -63,4 +63,24 @@ public class TTInfoDetailController extends BaseController<TTInfoDetail, Long> { | ||
| 63 | // TODO:返回类型需要修正 | 63 | // TODO:返回类型需要修正 |
| 64 | return ttInfoDetailService.getEditInfo(xlid, ttid); | 64 | return ttInfoDetailService.getEditInfo(xlid, ttid); |
| 65 | } | 65 | } |
| 66 | + | ||
| 67 | + /** | ||
| 68 | + * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody | ||
| 69 | + * @Title: save | ||
| 70 | + * @Description: TODO(持久化对象) | ||
| 71 | + * @param @param t | ||
| 72 | + * @param @return 设定文件 | ||
| 73 | + * @return Map<String,Object> {status: 1(成功),-1(失败)} | ||
| 74 | + * @throws | ||
| 75 | + */ | ||
| 76 | + @RequestMapping(method = RequestMethod.POST) | ||
| 77 | + public Map<String, Object> save(@RequestBody TTInfoDetail t){ | ||
| 78 | + | ||
| 79 | + return baseService.save(t); | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + @Override | ||
| 83 | + public TTInfoDetail findById(@PathVariable("id") Long aLong) { | ||
| 84 | + return ttInfoDetailRepository.findOneExtend(aLong); | ||
| 85 | + } | ||
| 66 | } | 86 | } |
src/main/java/com/bsth/entity/StationRoute.java
| 1 | package com.bsth.entity; | 1 | package com.bsth.entity; |
| 2 | 2 | ||
| 3 | +import javax.persistence.*; | ||
| 3 | import java.util.Date; | 4 | import java.util.Date; |
| 4 | 5 | ||
| 5 | -import javax.persistence.Column; | ||
| 6 | -import javax.persistence.Entity; | ||
| 7 | -import javax.persistence.FetchType; | ||
| 8 | -import javax.persistence.GeneratedValue; | ||
| 9 | -import javax.persistence.GenerationType; | ||
| 10 | -import javax.persistence.Id; | ||
| 11 | -import javax.persistence.ManyToOne; | ||
| 12 | -import javax.persistence.NamedAttributeNode; | ||
| 13 | -import javax.persistence.NamedEntityGraph; | ||
| 14 | -import javax.persistence.NamedEntityGraphs; | ||
| 15 | -import javax.persistence.Table; | ||
| 16 | - | ||
| 17 | -import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 18 | - | ||
| 19 | /** | 6 | /** |
| 20 | * | 7 | * |
| 21 | * @ClassName : StationRoute(站点路由实体类) | 8 | * @ClassName : StationRoute(站点路由实体类) |
| @@ -112,7 +99,6 @@ public class StationRoute { | @@ -112,7 +99,6 @@ public class StationRoute { | ||
| 112 | private Date updateDate; | 99 | private Date updateDate; |
| 113 | 100 | ||
| 114 | // 站点信息 | 101 | // 站点信息 |
| 115 | - @JsonIgnore | ||
| 116 | @ManyToOne(fetch = FetchType.LAZY) | 102 | @ManyToOne(fetch = FetchType.LAZY) |
| 117 | private Station station; | 103 | private Station station; |
| 118 | 104 |
src/main/java/com/bsth/entity/schedule/TTInfoDetail.java
| @@ -16,6 +16,7 @@ import java.util.Date; | @@ -16,6 +16,7 @@ import java.util.Date; | ||
| 16 | @NamedEntityGraphs({ | 16 | @NamedEntityGraphs({ |
| 17 | @NamedEntityGraph(name = "tTInfoDetail_xl_lp_qdz_zdz_tcc", attributeNodes = { | 17 | @NamedEntityGraph(name = "tTInfoDetail_xl_lp_qdz_zdz_tcc", attributeNodes = { |
| 18 | @NamedAttributeNode("xl"), | 18 | @NamedAttributeNode("xl"), |
| 19 | + @NamedAttributeNode("ttinfo"), | ||
| 19 | @NamedAttributeNode("lp"), | 20 | @NamedAttributeNode("lp"), |
| 20 | @NamedAttributeNode("qdz"), | 21 | @NamedAttributeNode("qdz"), |
| 21 | @NamedAttributeNode("zdz"), | 22 | @NamedAttributeNode("zdz"), |
| @@ -34,7 +35,7 @@ public class TTInfoDetail { | @@ -34,7 +35,7 @@ public class TTInfoDetail { | ||
| 34 | @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) | 35 | @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) |
| 35 | private Line xl; | 36 | private Line xl; |
| 36 | /** 时刻表主对象关联 */ | 37 | /** 时刻表主对象关联 */ |
| 37 | - @ManyToOne(optional = false, cascade = CascadeType.ALL, fetch = FetchType.LAZY) | 38 | + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) |
| 38 | private TTInfo ttinfo; | 39 | private TTInfo ttinfo; |
| 39 | /** 关联的路牌 */ | 40 | /** 关联的路牌 */ |
| 40 | @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) | 41 | @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) |
src/main/java/com/bsth/repository/StationRouteRepository.java
| 1 | package com.bsth.repository; | 1 | package com.bsth.repository; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | +import java.util.Map; | ||
| 4 | 5 | ||
| 6 | +import com.bsth.entity.schedule.CarConfigInfo; | ||
| 7 | +import org.springframework.data.domain.Page; | ||
| 8 | +import org.springframework.data.domain.Pageable; | ||
| 9 | +import org.springframework.data.jpa.domain.Specification; | ||
| 5 | import org.springframework.data.jpa.repository.EntityGraph; | 10 | import org.springframework.data.jpa.repository.EntityGraph; |
| 6 | import org.springframework.data.jpa.repository.Modifying; | 11 | import org.springframework.data.jpa.repository.Modifying; |
| 7 | import org.springframework.data.jpa.repository.Query; | 12 | import org.springframework.data.jpa.repository.Query; |
| @@ -225,4 +230,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -225,4 +230,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 225 | @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH) | 230 | @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH) |
| 226 | @Query("select s from StationRoute s where s.destroy=0") | 231 | @Query("select s from StationRoute s where s.destroy=0") |
| 227 | List<StationRoute> findAll2(); | 232 | List<StationRoute> findAll2(); |
| 233 | + | ||
| 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") | ||
| 235 | + List<Map<String, Object>> findStations(Integer xlid, Integer xldir); | ||
| 228 | } | 236 | } |
src/main/java/com/bsth/repository/schedule/TTInfoDetailRepository.java
| 1 | package com.bsth.repository.schedule; | 1 | package com.bsth.repository.schedule; |
| 2 | 2 | ||
| 3 | +import com.bsth.entity.schedule.CarConfigInfo; | ||
| 3 | import com.bsth.entity.schedule.TTInfoDetail; | 4 | import com.bsth.entity.schedule.TTInfoDetail; |
| 4 | import com.bsth.repository.BaseRepository; | 5 | import com.bsth.repository.BaseRepository; |
| 5 | import org.springframework.data.domain.Page; | 6 | import org.springframework.data.domain.Page; |
| @@ -25,6 +26,13 @@ public interface TTInfoDetailRepository extends BaseRepository<TTInfoDetail, Lon | @@ -25,6 +26,13 @@ public interface TTInfoDetailRepository extends BaseRepository<TTInfoDetail, Lon | ||
| 25 | @Override | 26 | @Override |
| 26 | List<TTInfoDetail> findAll(Specification<TTInfoDetail> spec); | 27 | List<TTInfoDetail> findAll(Specification<TTInfoDetail> spec); |
| 27 | 28 | ||
| 29 | + @EntityGraph(value = "tTInfoDetail_xl_lp_qdz_zdz_tcc", type = EntityGraph.EntityGraphType.FETCH) | ||
| 30 | + @Query("select cc from TTInfoDetail cc where cc.id=?1") | ||
| 31 | + TTInfoDetail findOneExtend(Long aLong); | ||
| 32 | + | ||
| 33 | + void deleteByTtinfoId(Long ttid); | ||
| 34 | + | ||
| 28 | @Query(value = "select max(tt.fcno) from TTInfoDetail tt where tt.xl.id =?1 and tt.ttinfo.id =?2") | 35 | @Query(value = "select max(tt.fcno) from TTInfoDetail tt where tt.xl.id =?1 and tt.ttinfo.id =?2") |
| 29 | Long findMaxFcno(Integer xlid, Long ttinfoid); | 36 | Long findMaxFcno(Integer xlid, Long ttinfoid); |
| 37 | + | ||
| 30 | } | 38 | } |
src/main/java/com/bsth/service/schedule/TTInfoServiceImpl.java
| 1 | package com.bsth.service.schedule; | 1 | package com.bsth.service.schedule; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.TTInfo; | 3 | import com.bsth.entity.schedule.TTInfo; |
| 4 | +import com.bsth.repository.schedule.TTInfoDetailRepository; | ||
| 4 | import com.bsth.service.impl.BaseServiceImpl; | 5 | import com.bsth.service.impl.BaseServiceImpl; |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 5 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
| 6 | 8 | ||
| 9 | +import javax.transaction.Transactional; | ||
| 10 | +import java.util.Map; | ||
| 11 | + | ||
| 7 | /** | 12 | /** |
| 8 | * Created by xu on 16/5/12. | 13 | * Created by xu on 16/5/12. |
| 9 | */ | 14 | */ |
| 10 | @Service | 15 | @Service |
| 16 | +@Transactional | ||
| 11 | public class TTInfoServiceImpl extends BaseServiceImpl<TTInfo, Long> implements TTInfoService { | 17 | public class TTInfoServiceImpl extends BaseServiceImpl<TTInfo, Long> implements TTInfoService { |
| 18 | + @Autowired | ||
| 19 | + private TTInfoDetailRepository ttInfoDetailRepository; | ||
| 20 | + | ||
| 21 | + @Override | ||
| 22 | + public Map<String, Object> delete(Long aLong) { | ||
| 23 | + ttInfoDetailRepository.deleteByTtinfoId(aLong); | ||
| 24 | + return super.delete(aLong); | ||
| 25 | + } | ||
| 12 | } | 26 | } |
src/main/java/com/bsth/service/schedule/rules/strategy/IStrategyImpl.java
| @@ -36,7 +36,8 @@ public class IStrategyImpl implements IStrategy { | @@ -36,7 +36,8 @@ public class IStrategyImpl implements IStrategy { | ||
| 36 | // TODO:本来要使用规则判定到底使用哪张时刻表,这里选用第一张 | 36 | // TODO:本来要使用规则判定到底使用哪张时刻表,这里选用第一张 |
| 37 | // 查询参数 | 37 | // 查询参数 |
| 38 | Map<String, Object> param = new HashMap<>(); | 38 | Map<String, Object> param = new HashMap<>(); |
| 39 | - param.put("xl.id_eq", xlId); | 39 | + param.put("xl.id_eq", xlId); // 线路id |
| 40 | + param.put("isEnableDisTemplate_eq", true); // 是否启用 | ||
| 40 | Iterable<TTInfo> ttInfoIterable = ttInfoService.list(param); | 41 | Iterable<TTInfo> ttInfoIterable = ttInfoService.list(param); |
| 41 | Iterator<TTInfo> ttInfoIterator = ttInfoIterable.iterator(); | 42 | Iterator<TTInfo> ttInfoIterator = ttInfoIterable.iterator(); |
| 42 | if (!ttInfoIterator.hasNext()) | 43 | if (!ttInfoIterator.hasNext()) |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
| @@ -408,6 +408,26 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | @@ -408,6 +408,26 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | ||
| 408 | } | 408 | } |
| 409 | } | 409 | } |
| 410 | ), | 410 | ), |
| 411 | + zd: $resource( | ||
| 412 | + '/stationroute/stations', | ||
| 413 | + {order: 'stationCode', direction: 'ASC'}, | ||
| 414 | + { | ||
| 415 | + list: { | ||
| 416 | + method: 'GET', | ||
| 417 | + isArray: true | ||
| 418 | + } | ||
| 419 | + } | ||
| 420 | + ), | ||
| 421 | + tcc: $resource( | ||
| 422 | + '/carpark/:type', | ||
| 423 | + {order: 'parkCode', direction: 'ASC'}, | ||
| 424 | + { | ||
| 425 | + list: { | ||
| 426 | + method: 'GET', | ||
| 427 | + isArray: true | ||
| 428 | + } | ||
| 429 | + } | ||
| 430 | + ), | ||
| 411 | ry: $resource( | 431 | ry: $resource( |
| 412 | '/personnel/:type', | 432 | '/personnel/:type', |
| 413 | {order: 'personnelName', direction: 'ASC'}, | 433 | {order: 'personnelName', direction: 'ASC'}, |
| @@ -791,6 +811,8 @@ angular.module('ScheduleApp').directive("saSelect3", [ | @@ -791,6 +811,8 @@ angular.module('ScheduleApp').directive("saSelect3", [ | ||
| 791 | } | 811 | } |
| 792 | // 这里直接将$$data_real数据深拷贝到$$data | 812 | // 这里直接将$$data_real数据深拷贝到$$data |
| 793 | angular.copy(scope[ctrlAs].$$data_real, scope[ctrlAs].$$data); | 813 | angular.copy(scope[ctrlAs].$$data_real, scope[ctrlAs].$$data); |
| 814 | + | ||
| 815 | + console.log(scope[ctrlAs].$$data); | ||
| 794 | }; | 816 | }; |
| 795 | 817 | ||
| 796 | /** | 818 | /** |
| @@ -803,7 +825,7 @@ angular.module('ScheduleApp').directive("saSelect3", [ | @@ -803,7 +825,7 @@ angular.module('ScheduleApp').directive("saSelect3", [ | ||
| 803 | //console.log("start"); | 825 | //console.log("start"); |
| 804 | // 清空内部数据 | 826 | // 清空内部数据 |
| 805 | scope[ctrlAs].$$data_real = []; | 827 | scope[ctrlAs].$$data_real = []; |
| 806 | - scope[ctrlAs].$$data = [] | 828 | + scope[ctrlAs].$$data = []; |
| 807 | for (var i = 0; i < result.length; i ++) { | 829 | for (var i = 0; i < result.length; i ++) { |
| 808 | if ($icname_s_attr) { | 830 | if ($icname_s_attr) { |
| 809 | if ($mlp_attr) { | 831 | if ($mlp_attr) { |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
| @@ -209,6 +209,9 @@ angular.module('ScheduleApp').factory('TimeTableManageService_g', ['$resource', | @@ -209,6 +209,9 @@ angular.module('ScheduleApp').factory('TimeTableManageService_g', ['$resource', | ||
| 209 | }, | 209 | }, |
| 210 | save: { | 210 | save: { |
| 211 | method: 'POST' | 211 | method: 'POST' |
| 212 | + }, | ||
| 213 | + delete: { | ||
| 214 | + method: 'DELETE' | ||
| 212 | } | 215 | } |
| 213 | } | 216 | } |
| 214 | ), | 217 | ), |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
| @@ -561,6 +561,25 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | @@ -561,6 +561,25 @@ ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvi | ||
| 561 | }] | 561 | }] |
| 562 | } | 562 | } |
| 563 | }) | 563 | }) |
| 564 | + .state("timeTableDetailInfoManage_detail_edit", { | ||
| 565 | + url: '/timeTableDetailInfoManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname', | ||
| 566 | + views: { | ||
| 567 | + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail_info_edit.html'} | ||
| 568 | + }, | ||
| 569 | + resolve: { | ||
| 570 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 571 | + return $ocLazyLoad.load({ | ||
| 572 | + name: 'timeTableDetailInfoManage_module', | ||
| 573 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 574 | + files: [ | ||
| 575 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 576 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 577 | + "pages/scheduleApp/module/core/timeTableManage/timeTableDetailManage.js" | ||
| 578 | + ] | ||
| 579 | + }); | ||
| 580 | + }] | ||
| 581 | + } | ||
| 582 | + }) | ||
| 564 | 583 | ||
| 565 | // 排班规则管理模块 | 584 | // 排班规则管理模块 |
| 566 | .state("scheduleRuleManage", { | 585 | .state("scheduleRuleManage", { |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/detail_info.html
| @@ -38,38 +38,10 @@ | @@ -38,38 +38,10 @@ | ||
| 38 | <span class="caption-subject bold uppercase" ng-bind="ctrl.title"></span> | 38 | <span class="caption-subject bold uppercase" ng-bind="ctrl.title"></span> |
| 39 | </div> | 39 | </div> |
| 40 | <div class="actions"> | 40 | <div class="actions"> |
| 41 | - <a href="javascirpt:" class="btn btn-circle blue"> | ||
| 42 | - <i class="fa fa-plus"></i> | ||
| 43 | - 动态生成 | ||
| 44 | - </a> | ||
| 45 | - <a href="javascirpt:" class="btn btn-circle blue"> | ||
| 46 | - <i class="fa fa-plus"></i> | ||
| 47 | - 分班 | ||
| 48 | - </a> | ||
| 49 | - <a href="javascirpt:" class="btn btn-circle blue"> | ||
| 50 | - <i class="fa fa-plus"></i> | ||
| 51 | - 取消分班 | ||
| 52 | - </a> | ||
| 53 | - <a href="javascirpt:" class="btn btn-circle blue"> | ||
| 54 | - <i class="fa fa-plus"></i> | ||
| 55 | - 反向 | ||
| 56 | - </a> | ||
| 57 | - <a href="javascirpt:" class="btn btn-circle blue"> | ||
| 58 | - <i class="fa fa-plus"></i> | ||
| 59 | - 批量选择 | ||
| 60 | - </a> | ||
| 61 | - <a href="javascirpt:" class="btn btn-circle blue"> | ||
| 62 | - <i class="fa fa-plus"></i> | ||
| 63 | - 批量修改 | ||
| 64 | - </a> | ||
| 65 | - <a href="javascirpt:" class="btn btn-circle blue"> | ||
| 66 | - <i class="fa fa-plus"></i> | ||
| 67 | - 删除 | ||
| 68 | - </a> | ||
| 69 | <div class="btn-group"> | 41 | <div class="btn-group"> |
| 70 | <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> | 42 | <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown"> |
| 71 | <i class="fa fa-share"></i> | 43 | <i class="fa fa-share"></i> |
| 72 | - <span>系统工具</span> | 44 | + <span>数据工具</span> |
| 73 | <i class="fa fa-angle-down"></i> | 45 | <i class="fa fa-angle-down"></i> |
| 74 | </a> | 46 | </a> |
| 75 | <ul class="dropdown-menu pull-right"> | 47 | <ul class="dropdown-menu pull-right"> |
| @@ -118,11 +90,17 @@ | @@ -118,11 +90,17 @@ | ||
| 118 | </a> | 90 | </a> |
| 119 | <ul class="dropdown-menu pull-left"> | 91 | <ul class="dropdown-menu pull-left"> |
| 120 | <li> | 92 | <li> |
| 121 | - <a href="javascript:" class="tool-action" ng-click="ctrl.editBcInfo(cell)"> | 93 | + <a href="javascript:" class="tool-action" ui-sref="timeTableDetailInfoManage_detail_edit({id: cell.ttdid, xlid: ctrl.xlid, ttid: ctrl.ttid, xlname: ctrl.xlname, ttname: ctrl.ttname})"> |
| 122 | <i class="fa fa-file-excel-o"></i> | 94 | <i class="fa fa-file-excel-o"></i> |
| 123 | 修改 | 95 | 修改 |
| 124 | </a> | 96 | </a> |
| 125 | </li> | 97 | </li> |
| 98 | + <li> | ||
| 99 | + <a href="javascript:" class="tool-action" ui-sref="timeTableDetailInfoManage_detail_edit({id: cell.ttdid, xlid: ctrl.xlid, ttid: ctrl.ttid, xlname: ctrl.xlname, ttname: ctrl.ttname})"> | ||
| 100 | + <i class="fa fa-file-excel-o"></i> | ||
| 101 | + 分班 | ||
| 102 | + </a> | ||
| 103 | + </li> | ||
| 126 | <li class="divider"></li> | 104 | <li class="divider"></li> |
| 127 | <li> | 105 | <li> |
| 128 | <a href="javascript:" class="tool-action"> | 106 | <a href="javascript:" class="tool-action"> |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/detail_info_edit.html
0 → 100644
| 1 | +<div ng-controller="TimeTableDetailManageFormCtrl as ctrl"> | ||
| 2 | + <div class="page-head"> | ||
| 3 | + <div class="page-title"> | ||
| 4 | + <h1>修改班次信息</h1> | ||
| 5 | + </div> | ||
| 6 | + </div> | ||
| 7 | + | ||
| 8 | + <ul class="page-breadcrumb breadcrumb"> | ||
| 9 | + <li> | ||
| 10 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 11 | + <i class="fa fa-circle"></i> | ||
| 12 | + </li> | ||
| 13 | + <li> | ||
| 14 | + <span class="active">运营计划管理</span> | ||
| 15 | + <i class="fa fa-circle"></i> | ||
| 16 | + </li> | ||
| 17 | + <li> | ||
| 18 | + <a ui-sref="timeTableManage">时刻表管理</a> | ||
| 19 | + <i class="fa fa-circle"></i> | ||
| 20 | + </li> | ||
| 21 | + <li> | ||
| 22 | + <a ui-sref="timeTableDetailInfoManage({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})"><span ng-bind="ctrl.title1"></span></a> | ||
| 23 | + <i class="fa fa-circle"></i> | ||
| 24 | + </li> | ||
| 25 | + <li> | ||
| 26 | + <span class="active">修改班次信息</span> | ||
| 27 | + </li> | ||
| 28 | + </ul> | ||
| 29 | + | ||
| 30 | + <div class="portlet light bordered"> | ||
| 31 | + <div class="portlet-title"> | ||
| 32 | + <div class="caption"> | ||
| 33 | + <i class="icon-equalizer font-red-sunglo"></i> <span | ||
| 34 | + class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title2"></span> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + | ||
| 38 | + <div class="portlet-body form"> | ||
| 39 | + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | ||
| 40 | + <div class="form-body"> | ||
| 41 | + <div class="form-group has-success has-feedback"> | ||
| 42 | + <label class="col-md-3 control-label">线路*:</label> | ||
| 43 | + <div class="col-md-7"> | ||
| 44 | + <input type="text" class="form-control" | ||
| 45 | + ng-value="ctrl.TimeTableDetailForSave.xl.name" | ||
| 46 | + readonly/> | ||
| 47 | + </div> | ||
| 48 | + | ||
| 49 | + </div> | ||
| 50 | + <div class="form-group has-success has-feedback"> | ||
| 51 | + <label class="col-md-3 control-label">时刻表名称*:</label> | ||
| 52 | + <div class="col-md-7"> | ||
| 53 | + <input type="text" class="form-control" | ||
| 54 | + ng-value="ctrl.TimeTableDetailForSave.ttinfo.name" | ||
| 55 | + readonly/> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + <div class="form-group has-success has-feedback"> | ||
| 59 | + <label class="col-md-3 control-label">路牌*:</label> | ||
| 60 | + <div class="col-md-7"> | ||
| 61 | + <input type="text" class="form-control" | ||
| 62 | + ng-value="ctrl.TimeTableDetailForSave.lp.lpName" | ||
| 63 | + readonly/> | ||
| 64 | + </div> | ||
| 65 | + | ||
| 66 | + </div> | ||
| 67 | + <div class="form-group has-success has-feedback"> | ||
| 68 | + <label class="col-md-3 control-label">发车顺序号*:</label> | ||
| 69 | + <div class="col-md-7"> | ||
| 70 | + <input type="text" class="form-control" | ||
| 71 | + ng-value="ctrl.TimeTableDetailForSave.fcno" | ||
| 72 | + readonly/> | ||
| 73 | + </div> | ||
| 74 | + | ||
| 75 | + </div> | ||
| 76 | + <div class="form-group has-success has-feedback"> | ||
| 77 | + <label class="col-md-3 control-label">方向*:</label> | ||
| 78 | + <div class="col-md-7"> | ||
| 79 | + <sa-Radiogroup model="ctrl.TimeTableDetailForSave.xlDir" dicgroup="LineTrend" name="xlDir" required></sa-Radiogroup> | ||
| 80 | + </div> | ||
| 81 | + <!-- 隐藏块,显示验证信息 --> | ||
| 82 | + <div class="alert alert-danger well-sm" ng-show="myForm.xlDir.$error.required"> | ||
| 83 | + 请选择线路上下行 | ||
| 84 | + </div> | ||
| 85 | + | ||
| 86 | + </div> | ||
| 87 | + <div class="form-group"> | ||
| 88 | + <label class="col-md-3 control-label">起点站:</label> | ||
| 89 | + <div class="col-md-7"> | ||
| 90 | + <sa-Select3 model="ctrl.TimeTableDetailForSave" | ||
| 91 | + name="qdz" | ||
| 92 | + placeholder="请输拼音..." | ||
| 93 | + dcvalue="{{ctrl.TimeTableDetailForSave.qdz.id}}" | ||
| 94 | + dcname="qdz.id" | ||
| 95 | + icname="stationid" | ||
| 96 | + icnames="stationname" | ||
| 97 | + datatype="zd" | ||
| 98 | + dataassociate="true" | ||
| 99 | + dataparam="{{ {'xlid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir} | json }}" | ||
| 100 | + mlp="true" | ||
| 101 | + > | ||
| 102 | + </sa-Select3> | ||
| 103 | + </div> | ||
| 104 | + </div> | ||
| 105 | + <div class="form-group"> | ||
| 106 | + <label class="col-md-3 control-label">终点站:</label> | ||
| 107 | + <div class="col-md-7"> | ||
| 108 | + <sa-Select3 model="ctrl.TimeTableDetailForSave" | ||
| 109 | + name="zdz" | ||
| 110 | + placeholder="请输拼音..." | ||
| 111 | + dcvalue="{{ctrl.TimeTableDetailForSave.zdz.id}}" | ||
| 112 | + dcname="zdz.id" | ||
| 113 | + icname="stationid" | ||
| 114 | + icnames="stationname" | ||
| 115 | + datatype="zd" | ||
| 116 | + dataassociate="true" | ||
| 117 | + dataparam="{{ {'xlid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir} | json }}" | ||
| 118 | + mlp="true" | ||
| 119 | + > | ||
| 120 | + </sa-Select3> | ||
| 121 | + </div> | ||
| 122 | + </div> | ||
| 123 | + <div class="form-group"> | ||
| 124 | + <label class="col-md-3 control-label">停车场:</label> | ||
| 125 | + <div class="col-md-7"> | ||
| 126 | + <sa-Select3 model="ctrl.TimeTableDetailForSave" | ||
| 127 | + name="tcc" | ||
| 128 | + placeholder="请输拼音..." | ||
| 129 | + dcvalue="{{ctrl.TimeTableDetailForSave.tcc.id}}" | ||
| 130 | + dcname="tcc.id" | ||
| 131 | + icname="id" | ||
| 132 | + icnames="parkName" | ||
| 133 | + datatype="tcc" | ||
| 134 | + mlp="true" | ||
| 135 | + > | ||
| 136 | + </sa-Select3> | ||
| 137 | + </div> | ||
| 138 | + </div> | ||
| 139 | + | ||
| 140 | + <div class="form-group has-success has-feedback"> | ||
| 141 | + <label class="col-md-3 control-label">发车时间*:</label> | ||
| 142 | + <div class="col-md-7"> | ||
| 143 | + <input type="text" class="form-control" | ||
| 144 | + ng-model="ctrl.TimeTableDetailForSave.fcsj" | ||
| 145 | + /> | ||
| 146 | + </div> | ||
| 147 | + | ||
| 148 | + </div> | ||
| 149 | + <div class="form-group"> | ||
| 150 | + <label class="col-md-3 control-label">对应班次数:</label> | ||
| 151 | + <div class="col-md-7"> | ||
| 152 | + <input type="text" class="form-control" | ||
| 153 | + ng-value="ctrl.TimeTableDetailForSave.bcs" | ||
| 154 | + readonly/> | ||
| 155 | + </div> | ||
| 156 | + | ||
| 157 | + </div> | ||
| 158 | + <div class="form-group"> | ||
| 159 | + <label class="col-md-3 control-label">计划里程:</label> | ||
| 160 | + <div class="col-md-7"> | ||
| 161 | + <input type="text" class="form-control" | ||
| 162 | + ng-model="ctrl.TimeTableDetailForSave.jhlc" | ||
| 163 | + /> | ||
| 164 | + </div> | ||
| 165 | + | ||
| 166 | + </div> | ||
| 167 | + <div class="form-group"> | ||
| 168 | + <label class="col-md-3 control-label">班次历时:</label> | ||
| 169 | + <div class="col-md-7"> | ||
| 170 | + <input type="text" class="form-control" | ||
| 171 | + ng-model="ctrl.TimeTableDetailForSave.bcsj" | ||
| 172 | + /> | ||
| 173 | + </div> | ||
| 174 | + | ||
| 175 | + </div> | ||
| 176 | + <div class="form-group has-success has-feedback"> | ||
| 177 | + <label class="col-md-3 control-label">班次类型*:</label> | ||
| 178 | + <div class="col-md-7"> | ||
| 179 | + <sa-Select3 model="ctrl.TimeTableDetailForSave" | ||
| 180 | + name="bcType" | ||
| 181 | + placeholder="请选择班次类型..." | ||
| 182 | + dcvalue="{{ctrl.TimeTableDetailForSave.bcType}}" | ||
| 183 | + dcname="bcType" | ||
| 184 | + icname="code" | ||
| 185 | + icnames="name" | ||
| 186 | + datatype="ScheduleType" | ||
| 187 | + required > | ||
| 188 | + </sa-Select3> | ||
| 189 | + </div> | ||
| 190 | + | ||
| 191 | + </div> | ||
| 192 | + <div class="form-group"> | ||
| 193 | + <label class="col-md-3 control-label">备注:</label> | ||
| 194 | + <div class="col-md-7"> | ||
| 195 | + <textarea class="form-control" | ||
| 196 | + ng-model="ctrl.TimeTableDetailForSave.remark" | ||
| 197 | + /> | ||
| 198 | + </div> | ||
| 199 | + | ||
| 200 | + </div> | ||
| 201 | + | ||
| 202 | + </div> | ||
| 203 | + | ||
| 204 | + <div class="form-actions"> | ||
| 205 | + <div class="row"> | ||
| 206 | + <div class="col-md-offset-3 col-md-4"> | ||
| 207 | + <button type="submit" class="btn green" | ||
| 208 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | ||
| 209 | + <a type="button" class="btn default" | ||
| 210 | + ui-sref="timeTableDetailInfoManage({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})" ><i class="fa fa-times"></i> 取消</a> | ||
| 211 | + </div> | ||
| 212 | + </div> | ||
| 213 | + </div> | ||
| 214 | + </form> | ||
| 215 | + | ||
| 216 | + </div> | ||
| 217 | + </div> | ||
| 218 | + | ||
| 219 | + | ||
| 220 | + | ||
| 221 | + | ||
| 222 | +</div> |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/detail_info_form.html deleted
100644 → 0
| 1 | -<div class="modal-header"> | ||
| 2 | - <h3 class="modal-title">班次详细信息</h3> | ||
| 3 | -</div> | ||
| 4 | - | ||
| 5 | -<div class="modal-body"> | ||
| 6 | - | ||
| 7 | - <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> | ||
| 8 | - <div class="form-body"> | ||
| 9 | - <div class="form-group has-success has-feedback"> | ||
| 10 | - <label class="col-md-2 control-label">线路*:</label> | ||
| 11 | - <div class="col-md-3"> | ||
| 12 | - <input type="text" class="form-control" | ||
| 13 | - ng-model="ctrl.TimeTableDetailForSave.xl.name" | ||
| 14 | - readonly/> | ||
| 15 | - </div> | ||
| 16 | - | ||
| 17 | - </div> | ||
| 18 | - <div class="form-group has-success has-feedback"> | ||
| 19 | - <label class="col-md-2 control-label">时刻表名称*:</label> | ||
| 20 | - <div class="col-md-3"> | ||
| 21 | - <input type="text" class="form-control" | ||
| 22 | - ng-model="ctrl.TimeTableDetailForSave.ttinfo.name" | ||
| 23 | - readonly/> | ||
| 24 | - </div> | ||
| 25 | - </div> | ||
| 26 | - <div class="form-group has-success has-feedback"> | ||
| 27 | - <label class="col-md-2 control-label">路牌*:</label> | ||
| 28 | - <div class="col-md-3"> | ||
| 29 | - <input type="text" class="form-control" | ||
| 30 | - ng-model="ctrl.TimeTableDetailForSave.lp.lpName" | ||
| 31 | - readonly/> | ||
| 32 | - </div> | ||
| 33 | - | ||
| 34 | - </div> | ||
| 35 | - <div class="form-group has-success has-feedback"> | ||
| 36 | - <label class="col-md-2 control-label">发车顺序号*:</label> | ||
| 37 | - <div class="col-md-3"> | ||
| 38 | - <input type="text" class="form-control" | ||
| 39 | - ng-model="ctrl.TimeTableDetailForSave.lp.fcno" | ||
| 40 | - readonly/> | ||
| 41 | - </div> | ||
| 42 | - | ||
| 43 | - </div> | ||
| 44 | - <div class="form-group has-success has-feedback"> | ||
| 45 | - <label class="col-md-2 control-label">方向*:</label> | ||
| 46 | - <div class="col-md-3"> | ||
| 47 | - <input type="text" class="form-control" | ||
| 48 | - ng-model="ctrl.TimeTableDetailForSave.xlDir" | ||
| 49 | - readonly/> | ||
| 50 | - </div> | ||
| 51 | - | ||
| 52 | - </div> | ||
| 53 | - <div class="form-group has-success has-feedback"> | ||
| 54 | - <label class="col-md-2 control-label">起点站*:</label> | ||
| 55 | - <div class="col-md-3"> | ||
| 56 | - <input type="text" class="form-control" | ||
| 57 | - ng-model="ctrl.TimeTableDetailForSave.qdz.stationName" | ||
| 58 | - readonly/> | ||
| 59 | - </div> | ||
| 60 | - </div> | ||
| 61 | - <div class="form-group has-success has-feedback"> | ||
| 62 | - <label class="col-md-2 control-label">终点站*:</label> | ||
| 63 | - <div class="col-md-3"> | ||
| 64 | - <input type="text" class="form-control" | ||
| 65 | - ng-model="ctrl.TimeTableDetailForSave.zdz.stationName" | ||
| 66 | - readonly/> | ||
| 67 | - </div> | ||
| 68 | - | ||
| 69 | - </div> | ||
| 70 | - <div class="form-group has-success has-feedback"> | ||
| 71 | - <label class="col-md-2 control-label">发车时间*:</label> | ||
| 72 | - <div class="col-md-3"> | ||
| 73 | - <input type="text" class="form-control" | ||
| 74 | - ng-model="ctrl.TimeTableDetailForSave.fcsj" | ||
| 75 | - readonly/> | ||
| 76 | - </div> | ||
| 77 | - | ||
| 78 | - </div> | ||
| 79 | - <div class="form-group"> | ||
| 80 | - <label class="col-md-2 control-label">对应班次数:</label> | ||
| 81 | - <div class="col-md-3"> | ||
| 82 | - <input type="text" class="form-control" | ||
| 83 | - ng-model="ctrl.TimeTableDetailForSave.bcs" | ||
| 84 | - readonly/> | ||
| 85 | - </div> | ||
| 86 | - | ||
| 87 | - </div> | ||
| 88 | - <div class="form-group"> | ||
| 89 | - <label class="col-md-2 control-label">计划里程:</label> | ||
| 90 | - <div class="col-md-3"> | ||
| 91 | - <input type="text" class="form-control" | ||
| 92 | - ng-model="ctrl.TimeTableDetailForSave.jhlc" | ||
| 93 | - readonly/> | ||
| 94 | - </div> | ||
| 95 | - | ||
| 96 | - </div> | ||
| 97 | - <div class="form-group"> | ||
| 98 | - <label class="col-md-2 control-label">班次历时:</label> | ||
| 99 | - <div class="col-md-3"> | ||
| 100 | - <input type="text" class="form-control" | ||
| 101 | - ng-model="ctrl.TimeTableDetailForSave.bcsj" | ||
| 102 | - readonly/> | ||
| 103 | - </div> | ||
| 104 | - | ||
| 105 | - </div> | ||
| 106 | - <div class="form-group has-success has-feedback"> | ||
| 107 | - <label class="col-md-2 control-label">班次类型:</label> | ||
| 108 | - <div class="col-md-3"> | ||
| 109 | - <input type="text" class="form-control" | ||
| 110 | - ng-model="ctrl.TimeTableDetailForSave.bcType" | ||
| 111 | - readonly/> | ||
| 112 | - </div> | ||
| 113 | - | ||
| 114 | - </div> | ||
| 115 | - <div class="form-group"> | ||
| 116 | - <label class="col-md-2 control-label">备注:</label> | ||
| 117 | - <div class="col-md-3"> | ||
| 118 | - <textarea class="form-control" | ||
| 119 | - ng-model="ctrl.TimeTableDetailForSave.remark" | ||
| 120 | - readonly/> | ||
| 121 | - </div> | ||
| 122 | - | ||
| 123 | - </div> | ||
| 124 | - | ||
| 125 | - </div> | ||
| 126 | - | ||
| 127 | - <div class="form-actions"> | ||
| 128 | - <div class="row"> | ||
| 129 | - <div class="col-md-offset-3 col-md-4"> | ||
| 130 | - <button type="submit" class="btn green" | ||
| 131 | - ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | ||
| 132 | - <a type="button" class="btn default" ng-click="ctrl.close()" ><i class="fa fa-times"></i> 取消</a> | ||
| 133 | - </div> | ||
| 134 | - </div> | ||
| 135 | - </div> | ||
| 136 | - </form> | ||
| 137 | - | ||
| 138 | -</div> | ||
| 139 | - | ||
| 140 | -<div class="modal-footer"> | ||
| 141 | - <!--<button class="btn btn-primary" ng-click="ctrl.close()">关闭</button>--> | ||
| 142 | -</div> | ||
| 143 | \ No newline at end of file | 0 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/list.html
| @@ -77,6 +77,7 @@ | @@ -77,6 +77,7 @@ | ||
| 77 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> | 77 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 78 | <a ui-sref="timeTableManage_detail({id: info.id})" class="btn default blue-stripe btn-sm"> 详细 </a> | 78 | <a ui-sref="timeTableManage_detail({id: info.id})" class="btn default blue-stripe btn-sm"> 详细 </a> |
| 79 | <a ui-sref="timeTableManage_edit({id: info.id})" class="btn default blue-stripe btn-sm"> 修改 </a> | 79 | <a ui-sref="timeTableManage_edit({id: info.id})" class="btn default blue-stripe btn-sm"> 修改 </a> |
| 80 | + <a ng-click="ctrl.deleteTTinfo(info.id)" class="btn default blue-stripe btn-sm"> 删除 </a> | ||
| 80 | </td> | 81 | </td> |
| 81 | </tr> | 82 | </tr> |
| 82 | </tbody> | 83 | </tbody> |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/timeTableDetailManage.js
| @@ -33,15 +33,15 @@ angular.module('ScheduleApp').factory('TimeTableDetailManageService', ['TimeTabl | @@ -33,15 +33,15 @@ angular.module('ScheduleApp').factory('TimeTableDetailManageService', ['TimeTabl | ||
| 33 | 33 | ||
| 34 | angular.module('ScheduleApp').controller('TimeTableDetailManageCtrl', ['TimeTableDetailManageService', '$stateParams', '$uibModal', function(timeTableDetailManageService, $stateParams, $uibModal) { | 34 | angular.module('ScheduleApp').controller('TimeTableDetailManageCtrl', ['TimeTableDetailManageService', '$stateParams', '$uibModal', function(timeTableDetailManageService, $stateParams, $uibModal) { |
| 35 | var self = this; | 35 | var self = this; |
| 36 | - var xlid = $stateParams.xlid; // 获取传过来的线路id | ||
| 37 | - var ttid = $stateParams.ttid; // 获取传过来的时刻表id | ||
| 38 | - var xlname = $stateParams.xlname; // 获取传过来的线路名字 | ||
| 39 | - var ttname = $stateParams.ttname; // 获取传过来的时刻表名字 | 36 | + self.xlid = $stateParams.xlid; // 获取传过来的线路id |
| 37 | + self.ttid = $stateParams.ttid; // 获取传过来的时刻表id | ||
| 38 | + self.xlname = $stateParams.xlname; // 获取传过来的线路名字 | ||
| 39 | + self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字 | ||
| 40 | 40 | ||
| 41 | - this.title = xlname + "(" + ttname + ")" + "时刻表明细信息"; | 41 | + self.title = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息"; |
| 42 | 42 | ||
| 43 | // 载入待编辑的时刻表明细数据 | 43 | // 载入待编辑的时刻表明细数据 |
| 44 | - timeTableDetailManageService.getEditInfo(xlid, ttid).then( | 44 | + timeTableDetailManageService.getEditInfo(self.xlid, self.ttid).then( |
| 45 | function(result) { | 45 | function(result) { |
| 46 | // TODO;获取数据待展示 | 46 | // TODO;获取数据待展示 |
| 47 | self.detailHeads = result.header; | 47 | self.detailHeads = result.header; |
| @@ -52,52 +52,23 @@ angular.module('ScheduleApp').controller('TimeTableDetailManageCtrl', ['TimeTabl | @@ -52,52 +52,23 @@ angular.module('ScheduleApp').controller('TimeTableDetailManageCtrl', ['TimeTabl | ||
| 52 | } | 52 | } |
| 53 | ); | 53 | ); |
| 54 | 54 | ||
| 55 | - // 修改班次信息 | ||
| 56 | - self.editBcInfo = function(bcinfo) { | ||
| 57 | - // 班次信息id | ||
| 58 | - var ttdid = bcinfo["ttdid"]; | ||
| 59 | - | ||
| 60 | - console.log("ttdid=" + ttdid); | ||
| 61 | - | ||
| 62 | - // large方式弹出模态对话框 | ||
| 63 | - var modalInstance = $uibModal.open({ | ||
| 64 | - templateUrl: '/pages/scheduleApp/module/core/timeTableManage/detail_info_form.html', | ||
| 65 | - size: "lg", | ||
| 66 | - animation: true, | ||
| 67 | - backdrop: 'static', | ||
| 68 | - resolve: { | ||
| 69 | - // 传递给controller | ||
| 70 | - r_ttdid: function() {return ttdid} | ||
| 71 | - }, | ||
| 72 | - windowClass: 'center-modal', | ||
| 73 | - controller: 'TimeTableDetailManageFormCtrl', | ||
| 74 | - controllerAs: 'ctrl', | ||
| 75 | - bindToController: true | ||
| 76 | - }); | ||
| 77 | - | ||
| 78 | - modalInstance.result.then( | ||
| 79 | - function() { | ||
| 80 | - console.log("detail_info_form.html打开"); | ||
| 81 | - }, | ||
| 82 | - function() { | ||
| 83 | - console.log("detail_info_form.html消失") | ||
| 84 | - } | ||
| 85 | - ); | ||
| 86 | - | ||
| 87 | - }; | ||
| 88 | - | ||
| 89 | - | ||
| 90 | - | ||
| 91 | }]); | 55 | }]); |
| 92 | 56 | ||
| 93 | -angular.module('ScheduleApp').controller('TimeTableDetailManageFormCtrl', ['TimeTableDetailManageService', '$modalInstance', 'r_ttdid', function(timeTableDetailManageService, $modalInstance, r_ttdid) { | 57 | +angular.module('ScheduleApp').controller('TimeTableDetailManageFormCtrl', ['TimeTableDetailManageService', '$stateParams', '$state', function(timeTableDetailManageService, $stateParams, $state) { |
| 94 | var self = this; | 58 | var self = this; |
| 95 | 59 | ||
| 96 | // 欲保存的busInfo信息,绑定 | 60 | // 欲保存的busInfo信息,绑定 |
| 97 | self.TimeTableDetailForSave = {}; | 61 | self.TimeTableDetailForSave = {}; |
| 98 | 62 | ||
| 99 | // 获取传过来的id,有的话就是修改,获取一遍数据 | 63 | // 获取传过来的id,有的话就是修改,获取一遍数据 |
| 100 | - var id = r_ttdid; | 64 | + var id = $stateParams.id; // 时刻明细班次id |
| 65 | + self.xlid = $stateParams.xlid; // 获取传过来的线路id | ||
| 66 | + self.ttid = $stateParams.ttid; // 获取传过来的时刻表id | ||
| 67 | + self.xlname = $stateParams.xlname; // 获取传过来的线路名字 | ||
| 68 | + self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字 | ||
| 69 | + | ||
| 70 | + self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息"; | ||
| 71 | + | ||
| 101 | if (id) { | 72 | if (id) { |
| 102 | self.TimeTableDetailForSave.id = id; | 73 | self.TimeTableDetailForSave.id = id; |
| 103 | timeTableDetailManageService.getDetail(id).then( | 74 | timeTableDetailManageService.getDetail(id).then( |
| @@ -106,6 +77,13 @@ angular.module('ScheduleApp').controller('TimeTableDetailManageFormCtrl', ['Time | @@ -106,6 +77,13 @@ angular.module('ScheduleApp').controller('TimeTableDetailManageFormCtrl', ['Time | ||
| 106 | for (key in result) { | 77 | for (key in result) { |
| 107 | self.TimeTableDetailForSave[key] = result[key]; | 78 | self.TimeTableDetailForSave[key] = result[key]; |
| 108 | } | 79 | } |
| 80 | + | ||
| 81 | + self.title2 = | ||
| 82 | + self.xlname + "(" + self.ttname + ")" + "时刻表明细信息" + | ||
| 83 | + "->路牌" + self.TimeTableDetailForSave.lp.lpName + | ||
| 84 | + "->发车顺序号" + self.TimeTableDetailForSave.fcno + | ||
| 85 | + "->班次详细信息"; | ||
| 86 | + | ||
| 109 | }, | 87 | }, |
| 110 | function(result) { | 88 | function(result) { |
| 111 | alert("出错啦!"); | 89 | alert("出错啦!"); |
| @@ -124,7 +102,12 @@ angular.module('ScheduleApp').controller('TimeTableDetailManageFormCtrl', ['Time | @@ -124,7 +102,12 @@ angular.module('ScheduleApp').controller('TimeTableDetailManageFormCtrl', ['Time | ||
| 124 | // TODO:弹出框方式以后改 | 102 | // TODO:弹出框方式以后改 |
| 125 | if (result.status == 'SUCCESS') { | 103 | if (result.status == 'SUCCESS') { |
| 126 | alert("保存成功!"); | 104 | alert("保存成功!"); |
| 127 | - $modalInstance.dismiss("cancel"); | 105 | + $state.go("timeTableDetailInfoManage", { |
| 106 | + xlid: self.xlid, | ||
| 107 | + ttid: self.ttid, | ||
| 108 | + xlname: self.xlname, | ||
| 109 | + ttname: self.ttname | ||
| 110 | + }); | ||
| 128 | } else { | 111 | } else { |
| 129 | alert("保存异常!"); | 112 | alert("保存异常!"); |
| 130 | } | 113 | } |
| @@ -136,9 +119,4 @@ angular.module('ScheduleApp').controller('TimeTableDetailManageFormCtrl', ['Time | @@ -136,9 +119,4 @@ angular.module('ScheduleApp').controller('TimeTableDetailManageFormCtrl', ['Time | ||
| 136 | ); | 119 | ); |
| 137 | }; | 120 | }; |
| 138 | 121 | ||
| 139 | - // 关闭窗口 | ||
| 140 | - self.close = function() { | ||
| 141 | - $modalInstance.dismiss("cancel"); | ||
| 142 | - }; | ||
| 143 | - | ||
| 144 | }]); | 122 | }]); |
| 145 | \ No newline at end of file | 123 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/timeTableManage/timeTableManage.js
| @@ -56,6 +56,14 @@ angular.module('ScheduleApp').factory('TimeTableManageService', ['TimeTableManag | @@ -56,6 +56,14 @@ angular.module('ScheduleApp').factory('TimeTableManageService', ['TimeTableManag | ||
| 56 | */ | 56 | */ |
| 57 | saveDetail: function(obj) { | 57 | saveDetail: function(obj) { |
| 58 | return service.rest.save(obj).$promise; | 58 | return service.rest.save(obj).$promise; |
| 59 | + }, | ||
| 60 | + /** | ||
| 61 | + * 删除信息。 | ||
| 62 | + * @param id 主键id | ||
| 63 | + * @returns {*|Function|promise|n} | ||
| 64 | + */ | ||
| 65 | + deleteDetail: function(id) { | ||
| 66 | + return service.rest.delete({id: id}).$promise; | ||
| 59 | } | 67 | } |
| 60 | }; | 68 | }; |
| 61 | 69 | ||
| @@ -182,6 +190,31 @@ angular.module('ScheduleApp').controller('TimeTableManageListCtrl', ['TimeTableM | @@ -182,6 +190,31 @@ angular.module('ScheduleApp').controller('TimeTableManageListCtrl', ['TimeTableM | ||
| 182 | return timeTableManageService.resetSearchCondition(); | 190 | return timeTableManageService.resetSearchCondition(); |
| 183 | }; | 191 | }; |
| 184 | 192 | ||
| 193 | + // 删除时刻表 | ||
| 194 | + self.deleteTTinfo = function(id) { | ||
| 195 | + // TODO: | ||
| 196 | + timeTableManageService.deleteDetail(id).then( | ||
| 197 | + function(result) { | ||
| 198 | + alert("删除成功!"); | ||
| 199 | + | ||
| 200 | + timeTableManageService.getPage().then( | ||
| 201 | + function(result) { | ||
| 202 | + self.pageInfo.totalItems = result.totalElements; | ||
| 203 | + self.pageInfo.currentPage = result.number + 1; | ||
| 204 | + self.pageInfo.infos = result.content; | ||
| 205 | + schedulePlanManageService.setCurrentPageNo(result.number + 1); | ||
| 206 | + }, | ||
| 207 | + function(result) { | ||
| 208 | + alert("出错啦!"); | ||
| 209 | + } | ||
| 210 | + ); | ||
| 211 | + }, | ||
| 212 | + function(result) { | ||
| 213 | + alert("出错啦!"); | ||
| 214 | + } | ||
| 215 | + ); | ||
| 216 | + }; | ||
| 217 | + | ||
| 185 | // 导入excel | 218 | // 导入excel |
| 186 | self.importData = function($index) { | 219 | self.importData = function($index) { |
| 187 | // 线路名称 | 220 | // 线路名称 |
src/test/java/com/bsth/service/schedule/rules/DroolsRulesTest.java
| @@ -64,8 +64,8 @@ public class DroolsRulesTest { | @@ -64,8 +64,8 @@ public class DroolsRulesTest { | ||
| 64 | // 2、创建fact对象 | 64 | // 2、创建fact对象 |
| 65 | 65 | ||
| 66 | ScheduleCalcuParam_input scheduleCalcuParam_input = new ScheduleCalcuParam_input(); | 66 | ScheduleCalcuParam_input scheduleCalcuParam_input = new ScheduleCalcuParam_input(); |
| 67 | - scheduleCalcuParam_input.setFromDate(new DateTime(2016, 7, 22, 0, 0)); | ||
| 68 | - scheduleCalcuParam_input.setToDate(new DateTime(2016, 8, 10, 0, 0)); | 67 | + scheduleCalcuParam_input.setFromDate(new DateTime(2016, 8, 1, 0, 0)); |
| 68 | + scheduleCalcuParam_input.setToDate(new DateTime(2016, 8, 2, 0, 0)); | ||
| 69 | scheduleCalcuParam_input.setTtinfoId(1L); | 69 | scheduleCalcuParam_input.setTtinfoId(1L); |
| 70 | 70 | ||
| 71 | ScheduleRule_input scheduleRule_input1 = new ScheduleRule_input(); | 71 | ScheduleRule_input scheduleRule_input1 = new ScheduleRule_input(); |