Commit 583330788c9ba33a656935b8d7a4d3d6d3ab51f7

Authored by 娄高锋
2 parents 32ce6f15 c4c70082

Merge branch 'pudong_jdk8' of 192.168.168.201:panzhaov5/bsth_control into pudong_jdk8

src/main/java/com/bsth/controller/schedule/core/legacy/TTInfoDetailController.java
... ... @@ -132,11 +132,60 @@ public class TTInfoDetailController extends BController<TTInfoDetail, Long> {
132 132 return ttInfoDetailService.skbDetailMxSave(entities);
133 133 }
134 134  
  135 + // 导出预览视图数据
135 136 @GetMapping(value = "/exportPvInfo/{id}")
136 137 public void exportPvInfo(@PathVariable("id") Long ttInfoId, HttpServletResponse response) throws Exception {
137 138 DataToolsFile dataToolsFile = this.ttInfoDetailService.exportPvInfo(ttInfoId);
138 139 MyHttpUtils.responseStreamFile(response, dataToolsFile.getFile());
139 140 }
  141 + // 添加路牌
  142 + @GetMapping(value = "/addLp/{ttInfoId}/{lpId}")
  143 + public Map<String, Object> addLp(@PathVariable("ttInfoId") Long ttInfoId, @PathVariable("lpId") Long lpId) {
  144 + Map<String, Object> rtn = new HashMap<>();
  145 + try {
  146 + this.ttInfoDetailService.addLp(ttInfoId, lpId);
  147 + rtn.put("status", ResponseCode.SUCCESS);
  148 + rtn.put("data", "添加路牌成功!");
  149 + } catch (Exception exp) {
  150 + exp.printStackTrace();
  151 + rtn.put("status", ResponseCode.ERROR);
  152 + rtn.put("msg", "添加路牌失败:" + exp.getMessage());
  153 + }
  154 + return rtn;
  155 + }
  156 + // 删除路牌
  157 + @GetMapping(value = "/removeLp/{ttInfoId}/{lpId}")
  158 + public Map<String, Object> removeLp(@PathVariable("ttInfoId") Long ttInfoId, @PathVariable("lpId") Long lpId) {
  159 + Map<String, Object> rtn = new HashMap<>();
  160 + try {
  161 + this.ttInfoDetailService.removeBcByLp(ttInfoId, lpId);
  162 + rtn.put("status", ResponseCode.SUCCESS);
  163 + rtn.put("data", "删除路牌成功!");
  164 + } catch (Exception exp) {
  165 + exp.printStackTrace();
  166 + rtn.put("status", ResponseCode.ERROR);
  167 + rtn.put("msg", "删除路牌失败:" + exp.getMessage());
  168 + }
  169 + return rtn;
  170 + }
  171 + // 调换路牌
  172 + @GetMapping(value = "/switchLp/{ttInfoId}/{lpAId}/{lpBId}")
  173 + public Map<String, Object> switchLp(@PathVariable("ttInfoId") Long ttInfoId,
  174 + @PathVariable("lpAId") Long lpAId,
  175 + @PathVariable("lpBId") Long lpBId) {
  176 + Map<String, Object> rtn = new HashMap<>();
  177 + try {
  178 + this.ttInfoDetailService.switchBcByLp(ttInfoId, lpAId, lpBId);
  179 + rtn.put("status", ResponseCode.SUCCESS);
  180 + rtn.put("data", "调换路牌成功!");
  181 + } catch (Exception exp) {
  182 + exp.printStackTrace();
  183 + rtn.put("status", ResponseCode.ERROR);
  184 + rtn.put("msg", "调换路牌失败:" + exp.getMessage());
  185 + }
  186 + return rtn;
  187 + }
  188 +
140 189  
141 190 @RequestMapping(value = "/exportDTDFile/{type}", method = RequestMethod.POST)
142 191 public void exportFile(
... ...
src/main/java/com/bsth/repository/schedule/TTInfoDetailRepository.java
1 1 package com.bsth.repository.schedule;
2 2  
3   -import com.bsth.entity.schedule.CarConfigInfo;
4 3 import com.bsth.entity.schedule.TTInfoDetail;
5 4 import com.bsth.repository.BaseRepository;
6 5 import org.springframework.data.domain.Page;
... ... @@ -10,9 +9,6 @@ import org.springframework.data.jpa.repository.EntityGraph;
10 9 import org.springframework.data.jpa.repository.Modifying;
11 10 import org.springframework.data.jpa.repository.Query;
12 11 import org.springframework.stereotype.Repository;
13   -import org.springframework.transaction.annotation.Isolation;
14   -import org.springframework.transaction.annotation.Propagation;
15   -import org.springframework.transaction.annotation.Transactional;
16 12  
17 13 import java.util.List;
18 14  
... ... @@ -42,9 +38,15 @@ public interface TTInfoDetailRepository extends BaseRepository&lt;TTInfoDetail, Lon
42 38 @Query(value = "select max(tt.fcno) as mx from bsth_c_s_ttinfo_detail tt where tt.xl =?1 and tt.ttinfo =?2", nativeQuery = true)
43 39 Long findMaxFcno(Integer xlid, Long ttinfoid);
44 40  
  41 + @Query(value = "select max(tt.bcs) as mx from bsth_c_s_ttinfo_detail tt where tt.ttinfo =?1", nativeQuery = true)
  42 + Long findMaxBcs(Long ttinfoid);
  43 +
45 44 @Query(value = "select tt from TTInfoDetail tt where tt.xl.id = ?1 and tt.ttinfo.id = ?2 and tt.lp.id = ?3 order by tt.fcno asc")
46 45 List<TTInfoDetail> findBcdetails(Integer xlId, Long ttinfoId, Long lpId);
47 46  
  47 + @Query(value = "select tt from TTInfoDetail tt where tt.ttinfo.id = ?1 and tt.lp.id = ?2 order by tt.fcno asc")
  48 + List<TTInfoDetail> findBcdetails(Long ttinfoId, Long lpId);
  49 +
48 50 List<TTInfoDetail> findByTtinfoId(Long id);
49 51  
50 52 @Modifying
... ... @@ -52,6 +54,10 @@ public interface TTInfoDetailRepository extends BaseRepository&lt;TTInfoDetail, Lon
52 54 void deleteByTtinfoIdWithModify(Long ttinfoid);
53 55  
54 56 @Modifying
  57 + @Query(value = "delete from TTInfoDetail t where t.ttinfo.id = ?1 and t.lp.id = ?2")
  58 + void deleteByTtinfoIdAndLpidWithModify(Long ttinfoid, Long lpid);
  59 +
  60 + @Modifying
55 61 @Query(value = "delete from TTInfoDetail t where t.xl.id=?1 and t.ttinfo.id = ?2")
56 62 void deltidc(int xl , Long ttinfoid );
57 63 }
... ...
src/main/java/com/bsth/service/schedule/TTInfoDetailService.java
... ... @@ -41,6 +41,27 @@ public interface TTInfoDetailService extends BService&lt;TTInfoDetail, Long&gt; {
41 41 */
42 42 DataToolsFile exportPvInfo(Long ttInfoId) throws ScheduleException;
43 43  
  44 + /**
  45 + * 添加路牌(默认添加一个班次)。
  46 + * @param ttInfoId 时刻表Id
  47 + * @param lpId 路牌Id
  48 + */
  49 + void addLp(Long ttInfoId, Long lpId);
  50 +
  51 + /**
  52 + * 删除指定路牌的所有班次。
  53 + * @param ttInfoId 时刻表Id
  54 + * @param lpId 路牌Id
  55 + */
  56 + void removeBcByLp(Long ttInfoId, Long lpId);
  57 +
  58 + /**
  59 + * 将路牌A的班次和路牌B的班次调换。
  60 + * @param ttInfoId 时刻表Id
  61 + * @param lpAId 路牌AId
  62 + * @param lpBId 路牌BId
  63 + */
  64 + void switchBcByLp(Long ttInfoId, Long lpAId, Long lpBId);
44 65  
45 66 /**
46 67 * 获取时刻表最大发车顺序号
... ...
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
... ... @@ -16,6 +16,7 @@ import com.bsth.repository.schedule.GuideboardInfoRepository;
16 16 import com.bsth.repository.schedule.TTInfoDetailRepository;
17 17 import com.bsth.repository.schedule.TTInfoRepository;
18 18 import com.bsth.repository.sys.SysUserRepository;
  19 +import com.bsth.security.util.SecurityUtils;
19 20 import com.bsth.service.CarParkService;
20 21 import com.bsth.service.LineInformationService;
21 22 import com.bsth.service.LineService;
... ... @@ -38,6 +39,7 @@ import org.apache.poi.xssf.usermodel.XSSFCell;
38 39 import org.joda.time.DateTime;
39 40 import org.slf4j.Logger;
40 41 import org.slf4j.LoggerFactory;
  42 +import org.springframework.beans.BeanUtils;
41 43 import org.springframework.beans.factory.annotation.Autowired;
42 44 import org.springframework.beans.factory.annotation.Qualifier;
43 45 import org.springframework.jdbc.core.JdbcTemplate;
... ... @@ -335,6 +337,62 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
335 337 return sortedList;
336 338 }
337 339  
  340 + @Transactional
  341 + @Override
  342 + public void addLp(Long ttInfoId, Long lpId) {
  343 + List<TTInfoDetail> bcList = this.ttInfoDetailRepository.findBcdetails(ttInfoId, lpId);
  344 + if (!CollectionUtils.isEmpty(bcList)) {
  345 + throw new RuntimeException("路牌已经存在!");
  346 + }
  347 + List<TTInfoDetail> allBcList = this.ttInfoDetailRepository.findByTtinfoId(ttInfoId);
  348 + if (CollectionUtils.isEmpty(allBcList)) {
  349 + throw new RuntimeException("时刻表没有班次(添加路牌至少需要一个班次)!");
  350 + }
  351 +
  352 + Integer maxBcs = this.ttInfoDetailRepository.findMaxBcs(ttInfoId).intValue();
  353 + GuideboardInfo lpInfo = this.guideboardInfoRepository.findById(lpId).get();
  354 + // 将当前时刻表的第一个班次作为新增路牌的第一个班次,然后设置发车时间为00:00
  355 + TTInfoDetail firstBc = allBcList.get(0);
  356 + TTInfoDetail newBc = new TTInfoDetail();
  357 + BeanUtils.copyProperties(firstBc, newBc);
  358 + newBc.setId(null);
  359 + newBc.setLp(lpInfo);
  360 + newBc.setFcno(1);
  361 + newBc.setBcs(maxBcs + 1);
  362 + newBc.setFcsj("00:00");
  363 + newBc.setCreateDate(new Date());
  364 + newBc.setUpdateDate(new Date());
  365 + newBc.setCreateBy(SecurityUtils.getCurrentUser());
  366 + newBc.setUpdateBy(SecurityUtils.getCurrentUser());
  367 +
  368 + this.ttInfoDetailRepository.save(newBc);
  369 + }
  370 +
  371 + @Transactional
  372 + @Override
  373 + public void removeBcByLp(Long ttInfoId, Long lpId) {
  374 + this.ttInfoDetailRepository.deleteByTtinfoIdAndLpidWithModify(ttInfoId, lpId);
  375 + }
  376 +
  377 + @Transactional
  378 + @Override
  379 + public void switchBcByLp(Long ttInfoId, Long lpAId, Long lpBId) {
  380 + List<TTInfoDetail> lpABcList = this.ttInfoDetailRepository.findBcdetails(ttInfoId, lpAId);
  381 + List<TTInfoDetail> lpBBcList = this.ttInfoDetailRepository.findBcdetails(ttInfoId, lpBId);
  382 +
  383 + if (!CollectionUtils.isEmpty(lpABcList) && !CollectionUtils.isEmpty(lpBBcList)) {
  384 + GuideboardInfo lpA = lpABcList.get(0).getLp();
  385 + GuideboardInfo lpB = lpBBcList.get(0).getLp();
  386 +
  387 + for (TTInfoDetail lpABc : lpABcList) {
  388 + lpABc.setLp(lpB);
  389 + }
  390 + for (TTInfoDetail lpBBc : lpBBcList) {
  391 + lpBBc.setLp(lpA);
  392 + }
  393 + }
  394 + }
  395 +
338 396 @Override
339 397 public TTInfoDetailForEdit.EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException {
340 398 return ttInfoDetailForEdit.getEditInfo(xlid, ttid, maxfcno);
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
... ... @@ -994,6 +994,60 @@ angular.module(&#39;ScheduleApp&#39;).factory(
994 994 }
995 995 ),
996 996  
  997 + addLp: $resource(
  998 + '/tidc/addLp/:ttInfoId/:lpId',
  999 + {},
  1000 + {
  1001 + do: {
  1002 + method: 'GET',
  1003 + transformResponse: function(rs) {
  1004 + var dst = angular.fromJson(rs);
  1005 + if (dst.status == 'SUCCESS') {
  1006 + return {msg: dst.data};
  1007 + } else {
  1008 + return {error: dst.msg}; // 业务错误留给控制器处理
  1009 + }
  1010 + }
  1011 + }
  1012 + }
  1013 + ),
  1014 +
  1015 + removeLp: $resource(
  1016 + '/tidc/removeLp/:ttInfoId/:lpId',
  1017 + {},
  1018 + {
  1019 + do: {
  1020 + method: 'GET',
  1021 + transformResponse: function(rs) {
  1022 + var dst = angular.fromJson(rs);
  1023 + if (dst.status == 'SUCCESS') {
  1024 + return {msg: dst.data};
  1025 + } else {
  1026 + return {error: dst.msg}; // 业务错误留给控制器处理
  1027 + }
  1028 + }
  1029 + }
  1030 + }
  1031 + ),
  1032 +
  1033 + switchLp: $resource(
  1034 + '/tidc/switchLp/:ttInfoId/:lpAId/:lpBId',
  1035 + {},
  1036 + {
  1037 + do: {
  1038 + method: 'GET',
  1039 + transformResponse: function(rs) {
  1040 + var dst = angular.fromJson(rs);
  1041 + if (dst.status == 'SUCCESS') {
  1042 + return {msg: dst.data};
  1043 + } else {
  1044 + return {error: dst.msg}; // 业务错误留给控制器处理
  1045 + }
  1046 + }
  1047 + }
  1048 + }
  1049 + ),
  1050 +
997 1051 edit: $resource(
998 1052 '/tidc/edit/:xlid/:ttid',
999 1053 {},
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
... ... @@ -1357,13 +1357,70 @@ ScheduleApp.config([
1357 1357 }]
1358 1358 }
1359 1359 })
1360   -
  1360 + .state("ttInfoDetailManage_detail_edit_addLp", { // 时刻表 添加路牌
  1361 + url: '/ttInfoDetailManage_detail_edit_addLp/:xlid/:ttid/:xlname/:ttname/:lineversion',
  1362 + views: {
  1363 + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-addLp.html'}
  1364 + },
  1365 + resolve: {
  1366 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  1367 + return $ocLazyLoad.load({
  1368 + name: 'ttInfoDetailManage_detail_edit_addLp',
  1369 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  1370 + files: [
  1371 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  1372 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  1373 + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js"
  1374 + ]
  1375 + });
  1376 + }]
  1377 + }
  1378 + })
  1379 + .state("ttInfoDetailManage_detail_edit_removeLp", { // 时刻表 删除路牌
  1380 + url: '/ttInfoDetailManage_detail_edit_removeLp/:xlid/:ttid/:xlname/:ttname/:lineversion',
  1381 + views: {
  1382 + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-removeLp.html'}
  1383 + },
  1384 + resolve: {
  1385 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  1386 + return $ocLazyLoad.load({
  1387 + name: 'ttInfoDetailManage_detail_edit_removeLp',
  1388 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  1389 + files: [
  1390 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  1391 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  1392 + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js"
  1393 + ]
  1394 + });
  1395 + }]
  1396 + }
  1397 + })
  1398 + .state("ttInfoDetailManage_detail_edit_switchLp", { // 时刻表 调换路牌
  1399 + url: '/ttInfoDetailManage_detail_edit_switchLp/:xlid/:ttid/:xlname/:ttname/:lineversion',
  1400 + views: {
  1401 + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-switchLp.html'}
  1402 + },
  1403 + resolve: {
  1404 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  1405 + return $ocLazyLoad.load({
  1406 + name: 'ttInfoDetailManage_detail_edit_switchLp',
  1407 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  1408 + files: [
  1409 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  1410 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  1411 + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js"
  1412 + ]
  1413 + });
  1414 + }]
  1415 + }
  1416 + })
1361 1417  
1362 1418  
1363 1419 ;
1364 1420  
1365 1421 }
1366   -]);
  1422 +]);
  1423 +
1367 1424 // ui route 配置
1368 1425  
1369 1426 /** 时刻表管理配置route */
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-addLp.html 0 → 100644
  1 +<div ng-controller="TimeTableDetailManageFormCtrl_addLp 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="ttInfoManage">时刻表管理</a>
  19 + <i class="fa fa-circle"></i>
  20 + </li>
  21 + <li>
  22 + <a ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid: ctrl.ttid, xlname: ctrl.xlname, ttname: ctrl.ttname, lineversion: ctrl.lineversion})"><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 + <div>
  34 + <i class="icon-equalizer font-red-sunglo"></i>
  35 + <span class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title1"></span>
  36 + </div>
  37 + <div style="padding-top: 10px;">
  38 + <i class="icon-equalizer font-red-sunglo"></i>
  39 + <span class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title_tip"></span>
  40 + </div>
  41 + </div>
  42 + </div>
  43 +
  44 + <div class="portlet-body form">
  45 + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm">
  46 + <div class="form-body">
  47 +
  48 + <div class="form-group">
  49 + <label class="col-md-2 control-label">路牌:</label>
  50 + <div class="col-md-3">
  51 + <sa-Select5 name="lp"
  52 + model="ctrl.formInfo"
  53 + cmaps="{'lpId' : 'id'}"
  54 + dcname="lpId"
  55 + icname="id"
  56 + dsparams="{{ {type: 'ajax', param:{'xl.id_eq': ctrl.xlid, 'type': 'all'}, atype:'lpInfo2' } | json }}"
  57 + iterobjname="item"
  58 + iterobjexp="item.lpName"
  59 + searchph="输入路牌名字"
  60 + searchexp="this.lpName"
  61 + required
  62 + >
  63 + </sa-Select5>
  64 + </div>
  65 + <!-- 隐藏块,显示验证信息 -->
  66 + <div class="alert alert-danger well-sm" ng-show="myForm.lp.$error.required">
  67 + 请选择路牌
  68 + </div>
  69 + </div>
  70 +
  71 + </div>
  72 +
  73 + <div class="form-actions">
  74 + <div class="row">
  75 + <div class="col-md-offset-3 col-md-4">
  76 + <button type="submit" class="btn green"
  77 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
  78 + <a type="button" class="btn default"
  79 + ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname, lineversion : ctrl.lineversion})" ><i class="fa fa-times"></i> 取消</a>
  80 + </div>
  81 + </div>
  82 + </div>
  83 + </form>
  84 +
  85 + </div>
  86 +
  87 + </div>
  88 +
  89 +</div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail2.html
1 1 <div ng-controller="TimeTableDetailManageFormCtrl_old2 as ctrl">
2 2 <div class="page-head">
3 3 <div class="page-title">
4   - <h1>修改班次信息</h1>
  4 + <h1>时刻表管理</h1>
5 5 </div>
6 6 </div>
7 7  
... ... @@ -23,7 +23,7 @@
23 23 <i class="fa fa-circle"></i>
24 24 </li>
25 25 <li>
26   - <span class="active">修改班次信息</span>
  26 + <span class="active">批量修改</span>
27 27 </li>
28 28 </ul>
29 29  
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-mulselect.html
1 1 <div ng-controller="TimeTableDetailManageFormCtrl_mulselect as ctrl">
2 2 <div class="page-head">
3 3 <div class="page-title">
4   - <h1>修改班次信息</h1>
  4 + <h1>时刻表管理</h1>
5 5 </div>
6 6 </div>
7 7  
... ... @@ -19,19 +19,25 @@
19 19 <i class="fa fa-circle"></i>
20 20 </li>
21 21 <li>
22   - <a ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname})"><span ng-bind="ctrl.title1"></span></a>
  22 + <a ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname, lineversion: ctrl.lineversion})"><span ng-bind="ctrl.title1"></span></a>
23 23 <i class="fa fa-circle"></i>
24 24 </li>
25 25 <li>
26   - <span class="active">修改班次信息</span>
  26 + <span class="active">批量选择</span>
27 27 </li>
28 28 </ul>
29 29  
30 30 <div class="portlet light bordered">
31 31 <div class="portlet-title">
32 32 <div class="caption">
33   - <i class="icon-equalizer font-red-sunglo"></i> <span
34   - class="caption-subject font-red-sunglo bold uppercase" >批量选择</span>
  33 + <div>
  34 + <i class="icon-equalizer font-red-sunglo"></i>
  35 + <span class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title1"></span>
  36 + </div>
  37 + <div style="padding-top: 10px;">
  38 + <i class="icon-equalizer font-red-sunglo"></i>
  39 + <span class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title_tip"></span>
  40 + </div>
35 41 </div>
36 42 </div>
37 43  
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-removeLp.html 0 → 100644
  1 +<div ng-controller="TimeTableDetailManageFormCtrl_removeLp 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="ttInfoManage">时刻表管理</a>
  19 + <i class="fa fa-circle"></i>
  20 + </li>
  21 + <li>
  22 + <a ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid: ctrl.ttid, xlname: ctrl.xlname, ttname: ctrl.ttname, lineversion: ctrl.lineversion})"><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 + <div>
  34 + <i class="icon-equalizer font-red-sunglo"></i>
  35 + <span class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title1"></span>
  36 + </div>
  37 + <div style="padding-top: 10px;">
  38 + <i class="icon-equalizer font-red-sunglo"></i>
  39 + <span class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title_tip"></span>
  40 + </div>
  41 + </div>
  42 + </div>
  43 +
  44 + <div class="portlet-body form">
  45 + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm">
  46 + <div class="form-body">
  47 +
  48 + <div class="form-group">
  49 + <label class="col-md-2 control-label">路牌:</label>
  50 + <div class="col-md-3">
  51 + <sa-Select5 name="lp"
  52 + model="ctrl.formInfo"
  53 + cmaps="{'lpId' : 'id'}"
  54 + dcname="lpId"
  55 + icname="id"
  56 + dsparams="{{ {type: 'ajax', param:{'xl.id_eq': ctrl.xlid, 'type': 'all'}, atype:'lpInfo2' } | json }}"
  57 + iterobjname="item"
  58 + iterobjexp="item.lpName"
  59 + searchph="输入路牌名字"
  60 + searchexp="this.lpName"
  61 + required
  62 + >
  63 + </sa-Select5>
  64 + </div>
  65 + <!-- 隐藏块,显示验证信息 -->
  66 + <div class="alert alert-danger well-sm" ng-show="myForm.lp.$error.required">
  67 + 请选择路牌
  68 + </div>
  69 + </div>
  70 +
  71 + </div>
  72 +
  73 + <div class="form-actions">
  74 + <div class="row">
  75 + <div class="col-md-offset-3 col-md-4">
  76 + <button type="submit" class="btn green"
  77 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
  78 + <a type="button" class="btn default"
  79 + ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname, lineversion : ctrl.lineversion})" ><i class="fa fa-times"></i> 取消</a>
  80 + </div>
  81 + </div>
  82 + </div>
  83 + </form>
  84 +
  85 + </div>
  86 +
  87 + </div>
  88 +
  89 +</div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-switchLp.html 0 → 100644
  1 +<div ng-controller="TimeTableDetailManageFormCtrl_switchLp 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="ttInfoManage">时刻表管理</a>
  19 + <i class="fa fa-circle"></i>
  20 + </li>
  21 + <li>
  22 + <a ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid: ctrl.ttid, xlname: ctrl.xlname, ttname: ctrl.ttname, lineversion: ctrl.lineversion})"><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 + <div>
  34 + <i class="icon-equalizer font-red-sunglo"></i>
  35 + <span class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title1"></span>
  36 + </div>
  37 + <div style="padding-top: 10px;">
  38 + <i class="icon-equalizer font-red-sunglo"></i>
  39 + <span class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title_tip"></span>
  40 + </div>
  41 + </div>
  42 + </div>
  43 +
  44 + <div class="portlet-body form">
  45 + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm">
  46 + <div class="form-body">
  47 +
  48 + <div class="form-group">
  49 + <label class="col-md-2 control-label">路牌A:</label>
  50 + <div class="col-md-3">
  51 + <sa-Select5 name="lpA"
  52 + model="ctrl.formInfo"
  53 + cmaps="{'lpAId' : 'id'}"
  54 + dcname="lpAId"
  55 + icname="id"
  56 + dsparams="{{ {type: 'ajax', param:{'xl.id_eq': ctrl.xlid, 'type': 'all'}, atype:'lpInfo2' } | json }}"
  57 + iterobjname="item"
  58 + iterobjexp="item.lpName"
  59 + searchph="输入路牌名字"
  60 + searchexp="this.lpName"
  61 + required
  62 + >
  63 + </sa-Select5>
  64 + </div>
  65 + <!-- 隐藏块,显示验证信息 -->
  66 + <div class="alert alert-danger well-sm" ng-show="myForm.lpA.$error.required">
  67 + 请选择路牌A
  68 + </div>
  69 + </div>
  70 +
  71 + <div class="form-group">
  72 + <label class="col-md-2 control-label">路牌B:</label>
  73 + <div class="col-md-3">
  74 + <sa-Select5 name="lpB"
  75 + model="ctrl.formInfo"
  76 + cmaps="{'lpBId' : 'id'}"
  77 + dcname="lpBId"
  78 + icname="id"
  79 + dsparams="{{ {type: 'ajax', param:{'xl.id_eq': ctrl.xlid, 'type': 'all'}, atype:'lpInfo2' } | json }}"
  80 + iterobjname="item"
  81 + iterobjexp="item.lpName"
  82 + searchph="输入路牌名字"
  83 + searchexp="this.lpName"
  84 + required
  85 + >
  86 + </sa-Select5>
  87 + </div>
  88 + <!-- 隐藏块,显示验证信息 -->
  89 + <div class="alert alert-danger well-sm" ng-show="myForm.lpB.$error.required">
  90 + 请选择路牌B
  91 + </div>
  92 + </div>
  93 +
  94 + </div>
  95 +
  96 + <div class="form-actions">
  97 + <div class="row">
  98 + <div class="col-md-offset-3 col-md-4">
  99 + <button type="submit" class="btn green"
  100 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
  101 + <a type="button" class="btn default"
  102 + ui-sref="ttInfoDetailManage_edit3({xlid: ctrl.xlid, ttid : ctrl.ttid, xlname: ctrl.xlname, ttname : ctrl.ttname, lineversion : ctrl.lineversion})" ><i class="fa fa-times"></i> 取消</a>
  103 + </div>
  104 + </div>
  105 + </div>
  106 + </form>
  107 +
  108 + </div>
  109 +
  110 + </div>
  111 +
  112 +</div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit3.html
... ... @@ -121,6 +121,24 @@
121 121 取消选择
122 122 </a>
123 123 <a href="javascript:" style="padding-right: 5px;"
  124 + ng-click="ctrl.toAddLp()"
  125 + ng-show="ctrl.currentView.btn7">
  126 + <i class="fa fa-th-list" aria-hidden="true"></i>
  127 + 增加路牌
  128 + </a>
  129 + <a href="javascript:" style="padding-right: 5px;"
  130 + ng-click="ctrl.toRemoveLp()"
  131 + ng-show="ctrl.currentView.btn8">
  132 + <i class="fa fa-th-list" aria-hidden="true"></i>
  133 + 删除路牌
  134 + </a>
  135 + <a href="javascript:" style="padding-right: 5px;"
  136 + ng-click="ctrl.toSwitchLp()"
  137 + ng-show="ctrl.currentView.btn9">
  138 + <i class="fa fa-th-list" aria-hidden="true"></i>
  139 + 调换路牌
  140 + </a>
  141 + <a href="javascript:" style="padding-right: 5px;"
124 142 ng-click="ctrl.refresh()"
125 143 ng-show="ctrl.currentView.btn5">
126 144 <i class="fa fa-refresh"></i>
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/route.js
... ... @@ -157,10 +157,66 @@ ScheduleApp.config([
157 157 }]
158 158 }
159 159 })
160   -
  160 + .state("ttInfoDetailManage_detail_edit_addLp", { // 时刻表 添加路牌
  161 + url: '/ttInfoDetailManage_detail_edit_addLp/:xlid/:ttid/:xlname/:ttname/:lineversion',
  162 + views: {
  163 + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-addLp.html'}
  164 + },
  165 + resolve: {
  166 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  167 + return $ocLazyLoad.load({
  168 + name: 'ttInfoDetailManage_detail_edit_addLp',
  169 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  170 + files: [
  171 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  172 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  173 + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js"
  174 + ]
  175 + });
  176 + }]
  177 + }
  178 + })
  179 + .state("ttInfoDetailManage_detail_edit_removeLp", { // 时刻表 删除路牌
  180 + url: '/ttInfoDetailManage_detail_edit_removeLp/:xlid/:ttid/:xlname/:ttname/:lineversion',
  181 + views: {
  182 + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-removeLp.html'}
  183 + },
  184 + resolve: {
  185 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  186 + return $ocLazyLoad.load({
  187 + name: 'ttInfoDetailManage_detail_edit_removeLp',
  188 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  189 + files: [
  190 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  191 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  192 + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js"
  193 + ]
  194 + });
  195 + }]
  196 + }
  197 + })
  198 + .state("ttInfoDetailManage_detail_edit_switchLp", { // 时刻表 调换路牌
  199 + url: '/ttInfoDetailManage_detail_edit_switchLp/:xlid/:ttid/:xlname/:ttname/:lineversion',
  200 + views: {
  201 + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-switchLp.html'}
  202 + },
  203 + resolve: {
  204 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  205 + return $ocLazyLoad.load({
  206 + name: 'ttInfoDetailManage_detail_edit_switchLp',
  207 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  208 + files: [
  209 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  210 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  211 + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js"
  212 + ]
  213 + });
  214 + }]
  215 + }
  216 + })
161 217  
162 218  
163 219 ;
164 220  
165 221 }
166   -]);
167 222 \ No newline at end of file
  223 +]);
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js
... ... @@ -64,6 +64,16 @@ angular.module(&#39;ScheduleApp&#39;).factory(
64 64 return service.pvInfoExport.do({id: ttInfoId}).$promise;
65 65 },
66 66  
  67 + addLpPromise: function(ttInfoId, lpId) {
  68 + return service.addLp.do({ttInfoId: ttInfoId, lpId: lpId}).$promise;
  69 + },
  70 + removeLpPromise: function(ttInfoId, lpId) {
  71 + return service.removeLp.do({ttInfoId: ttInfoId, lpId: lpId}).$promise;
  72 + },
  73 + switchLpPromise: function(ttInfoId, lpAId, lpBId) {
  74 + return service.switchLp.do({ttInfoId: ttInfoId, lpAId: lpAId, lpBId: lpBId}).$promise;
  75 + },
  76 +
67 77 /**
68 78 * 获取编辑用的时刻表明细数据。
69 79 * @param xlid 线路id
... ... @@ -444,7 +454,10 @@ angular.module(&#39;ScheduleApp&#39;).controller(
444 454 btn2 : true,
445 455 btn3 : true,
446 456 btn4 : true,
447   - btn5 : true
  457 + btn5 : true,
  458 + btn7 : true,
  459 + btn8 : true,
  460 + btn9 : true
448 461 },
449 462 "preView" : {
450 463 viewId : 2,
... ... @@ -658,6 +671,37 @@ angular.module(&#39;ScheduleApp&#39;).controller(
658 671 );
659 672 };
660 673  
  674 + // 增加路牌(跳转页面)
  675 + self.toAddLp = function() {
  676 + $state.go("ttInfoDetailManage_detail_edit_addLp", {
  677 + xlid: self.xlid,
  678 + ttid: self.ttid,
  679 + xlname: self.xlname,
  680 + ttname: self.ttname,
  681 + lineversion: self.lineversion
  682 + });
  683 + };
  684 + // 删除路牌(跳转页面)
  685 + self.toRemoveLp = function() {
  686 + $state.go("ttInfoDetailManage_detail_edit_removeLp", {
  687 + xlid: self.xlid,
  688 + ttid: self.ttid,
  689 + xlname: self.xlname,
  690 + ttname: self.ttname,
  691 + lineversion: self.lineversion
  692 + });
  693 + };
  694 + // 调换路牌(跳转页面)
  695 + self.toSwitchLp = function() {
  696 + $state.go("ttInfoDetailManage_detail_edit_switchLp", {
  697 + xlid: self.xlid,
  698 + ttid: self.ttid,
  699 + xlname: self.xlname,
  700 + ttname: self.ttname,
  701 + lineversion: self.lineversion
  702 + });
  703 + };
  704 +
661 705 }
662 706  
663 707 ]
... ... @@ -1013,7 +1057,13 @@ angular.module(&#39;ScheduleApp&#39;).controller(
1013 1057 self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字
1014 1058 self.lineversion = $stateParams.lineversion; // 线路版本
1015 1059  
1016   - self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息";
  1060 + self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息 批量条件选择班次";
  1061 + self.title_tip = "版本加载中...";
  1062 + service.versiondesc(self.xlid, self.lineversion).then(
  1063 + function(result) {
  1064 + self.title_tip = "线路版本(" + result.desc + ")";
  1065 + }
  1066 + );
1017 1067  
1018 1068 self.xldir = 2; // 线路上下行
1019 1069 self.starttime = undefined; // 开始时间
... ... @@ -1070,3 +1120,156 @@ angular.module(&#39;ScheduleApp&#39;).controller(
1070 1120 ]
1071 1121 );
1072 1122  
  1123 +// edit-addLp.html 添加路牌页面
  1124 +angular.module('ScheduleApp').controller(
  1125 + 'TimeTableDetailManageFormCtrl_addLp',
  1126 + [
  1127 + 'TimeTableDetailManageService_old',
  1128 + '$stateParams',
  1129 + '$state',
  1130 + function(service, $stateParams, $state) {
  1131 + var self = this;
  1132 +
  1133 + // 获取传过来的id,有的话就是修改,获取一遍数据
  1134 + self.xlid = $stateParams.xlid; // 获取传过来的线路id
  1135 + self.ttid = $stateParams.ttid; // 获取传过来的时刻表id
  1136 + self.xlname = $stateParams.xlname; // 获取传过来的线路名字
  1137 + self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字
  1138 + self.lineversion = $stateParams.lineversion; // 线路版本
  1139 +
  1140 + self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息 添加路牌";
  1141 + self.title_tip = "版本加载中...";
  1142 + service.versiondesc(self.xlid, self.lineversion).then(
  1143 + function(result) {
  1144 + self.title_tip = "线路版本(" + result.desc + ")";
  1145 + }
  1146 + );
  1147 +
  1148 + // form数据
  1149 + self.formInfo = {};
  1150 + // from提交
  1151 + self.submit = function() {
  1152 + service.addLpPromise(self.ttid, self.formInfo.lpId).then(
  1153 + function(rst) {
  1154 + if (rst.error) {
  1155 + alert(rst.error);
  1156 + } else {
  1157 + service.refreshEditInfo(self.xlid, self.ttid);
  1158 + $state.go("ttInfoDetailManage_edit3", {
  1159 + xlid: self.xlid,
  1160 + ttid: self.ttid,
  1161 + xlname: self.xlname,
  1162 + ttname: self.ttname,
  1163 + lineversion: self.lineversion
  1164 + });
  1165 + }
  1166 + }
  1167 + );
  1168 + };
  1169 +
  1170 + }
  1171 + ]
  1172 +);
  1173 +
  1174 +// edit-removeLp.html 删除路牌页面
  1175 +angular.module('ScheduleApp').controller(
  1176 + 'TimeTableDetailManageFormCtrl_removeLp',
  1177 + [
  1178 + 'TimeTableDetailManageService_old',
  1179 + '$stateParams',
  1180 + '$state',
  1181 + function(service, $stateParams, $state) {
  1182 + var self = this;
  1183 +
  1184 + // 获取传过来的id,有的话就是修改,获取一遍数据
  1185 + self.xlid = $stateParams.xlid; // 获取传过来的线路id
  1186 + self.ttid = $stateParams.ttid; // 获取传过来的时刻表id
  1187 + self.xlname = $stateParams.xlname; // 获取传过来的线路名字
  1188 + self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字
  1189 + self.lineversion = $stateParams.lineversion; // 线路版本
  1190 +
  1191 + self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息 删除路牌";
  1192 + self.title_tip = "版本加载中...";
  1193 + service.versiondesc(self.xlid, self.lineversion).then(
  1194 + function(result) {
  1195 + self.title_tip = "线路版本(" + result.desc + ")";
  1196 + }
  1197 + );
  1198 +
  1199 + // form数据
  1200 + self.formInfo = {};
  1201 + // from提交
  1202 + self.submit = function() {
  1203 + service.removeLpPromise(self.ttid, self.formInfo.lpId).then(
  1204 + function(rst) {
  1205 + if (rst.error) {
  1206 + alert(rst.error);
  1207 + } else {
  1208 + service.refreshEditInfo(self.xlid, self.ttid);
  1209 + $state.go("ttInfoDetailManage_edit3", {
  1210 + xlid: self.xlid,
  1211 + ttid: self.ttid,
  1212 + xlname: self.xlname,
  1213 + ttname: self.ttname,
  1214 + lineversion: self.lineversion
  1215 + });
  1216 + }
  1217 + }
  1218 + );
  1219 + };
  1220 +
  1221 + }
  1222 + ]
  1223 +);
  1224 +
  1225 +// edit-switchLp.html 调换路牌页面
  1226 +angular.module('ScheduleApp').controller(
  1227 + 'TimeTableDetailManageFormCtrl_switchLp',
  1228 + [
  1229 + 'TimeTableDetailManageService_old',
  1230 + '$stateParams',
  1231 + '$state',
  1232 + function(service, $stateParams, $state) {
  1233 + var self = this;
  1234 +
  1235 + // 获取传过来的id,有的话就是修改,获取一遍数据
  1236 + self.xlid = $stateParams.xlid; // 获取传过来的线路id
  1237 + self.ttid = $stateParams.ttid; // 获取传过来的时刻表id
  1238 + self.xlname = $stateParams.xlname; // 获取传过来的线路名字
  1239 + self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字
  1240 + self.lineversion = $stateParams.lineversion; // 线路版本
  1241 +
  1242 + self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息 路牌A和路牌B的班次互换";
  1243 + self.title_tip = "版本加载中...";
  1244 + service.versiondesc(self.xlid, self.lineversion).then(
  1245 + function(result) {
  1246 + self.title_tip = "线路版本(" + result.desc + ")";
  1247 + }
  1248 + );
  1249 +
  1250 + // form数据
  1251 + self.formInfo = {};
  1252 + // from提交
  1253 + self.submit = function() {
  1254 + service.switchLpPromise(self.ttid, self.formInfo.lpAId, self.formInfo.lpBId).then(
  1255 + function(rst) {
  1256 + if (rst.error) {
  1257 + alert(rst.error);
  1258 + } else {
  1259 + service.refreshEditInfo(self.xlid, self.ttid);
  1260 + $state.go("ttInfoDetailManage_edit3", {
  1261 + xlid: self.xlid,
  1262 + ttid: self.ttid,
  1263 + xlname: self.xlname,
  1264 + ttname: self.ttname,
  1265 + lineversion: self.lineversion
  1266 + });
  1267 + }
  1268 + }
  1269 + );
  1270 +
  1271 + };
  1272 +
  1273 + }
  1274 + ]
  1275 +);
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/service.js
... ... @@ -234,6 +234,60 @@ angular.module(&#39;ScheduleApp&#39;).factory(
234 234 }
235 235 ),
236 236  
  237 + addLp: $resource(
  238 + '/tidc/addLp/:ttInfoId/:lpId',
  239 + {},
  240 + {
  241 + do: {
  242 + method: 'GET',
  243 + transformResponse: function(rs) {
  244 + var dst = angular.fromJson(rs);
  245 + if (dst.status == 'SUCCESS') {
  246 + return {msg: dst.data};
  247 + } else {
  248 + return {error: dst.msg}; // 业务错误留给控制器处理
  249 + }
  250 + }
  251 + }
  252 + }
  253 + ),
  254 +
  255 + removeLp: $resource(
  256 + '/tidc/removeLp/:ttInfoId/:lpId',
  257 + {},
  258 + {
  259 + do: {
  260 + method: 'GET',
  261 + transformResponse: function(rs) {
  262 + var dst = angular.fromJson(rs);
  263 + if (dst.status == 'SUCCESS') {
  264 + return {msg: dst.data};
  265 + } else {
  266 + return {error: dst.msg}; // 业务错误留给控制器处理
  267 + }
  268 + }
  269 + }
  270 + }
  271 + ),
  272 +
  273 + switchLp: $resource(
  274 + '/tidc/switchLp/:ttInfoId/:lpAId/:lpBId',
  275 + {},
  276 + {
  277 + do: {
  278 + method: 'GET',
  279 + transformResponse: function(rs) {
  280 + var dst = angular.fromJson(rs);
  281 + if (dst.status == 'SUCCESS') {
  282 + return {msg: dst.data};
  283 + } else {
  284 + return {error: dst.msg}; // 业务错误留给控制器处理
  285 + }
  286 + }
  287 + }
  288 + }
  289 + ),
  290 +
237 291 edit: $resource(
238 292 '/tidc/edit/:xlid/:ttid',
239 293 {},
... ...