Commit 878dd61442d761f1f03dfce030a30aeb9a007257
1 parent
4a0cb023
Update
Showing
10 changed files
with
50 additions
and
114 deletions
src/main/java/com/bsth/controller/schedule/core/GuideboardInfoController.java
| @@ -48,8 +48,8 @@ public class GuideboardInfoController extends BController<GuideboardInfo, Long> | @@ -48,8 +48,8 @@ public class GuideboardInfoController extends BController<GuideboardInfo, Long> | ||
| 48 | return guideboardInfoRepository.findLpName(ttid); | 48 | return guideboardInfoRepository.findLpName(ttid); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | - @RequestMapping(value = "/validate1", method = RequestMethod.GET) | ||
| 52 | - public Map<String, Object> validate1(@RequestParam Map<String, Object> param) { | 51 | + @RequestMapping(value = "/validate_lpno", method = RequestMethod.GET) |
| 52 | + public Map<String, Object> validate_lpno(@RequestParam Map<String, Object> param) { | ||
| 53 | Map<String, Object> rtn = new HashMap<>(); | 53 | Map<String, Object> rtn = new HashMap<>(); |
| 54 | try { | 54 | try { |
| 55 | // 路牌编号验证 | 55 | // 路牌编号验证 |
| @@ -59,7 +59,7 @@ public class GuideboardInfoController extends BController<GuideboardInfo, Long> | @@ -59,7 +59,7 @@ public class GuideboardInfoController extends BController<GuideboardInfo, Long> | ||
| 59 | param.get("lpNo_eq"), | 59 | param.get("lpNo_eq"), |
| 60 | null | 60 | null |
| 61 | ); | 61 | ); |
| 62 | - guideboardInfoService.validate(guideboardInfo); | 62 | + guideboardInfoService.validate_lpno(guideboardInfo); |
| 63 | rtn.put("status", ResponseCode.SUCCESS); | 63 | rtn.put("status", ResponseCode.SUCCESS); |
| 64 | } catch (ScheduleException exp) { | 64 | } catch (ScheduleException exp) { |
| 65 | rtn.put("status", ResponseCode.ERROR); | 65 | rtn.put("status", ResponseCode.ERROR); |
| @@ -68,8 +68,8 @@ public class GuideboardInfoController extends BController<GuideboardInfo, Long> | @@ -68,8 +68,8 @@ public class GuideboardInfoController extends BController<GuideboardInfo, Long> | ||
| 68 | return rtn; | 68 | return rtn; |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | - @RequestMapping(value = "/validate2", method = RequestMethod.GET) | ||
| 72 | - public Map<String, Object> validate2(@RequestParam Map<String, Object> param) { | 71 | + @RequestMapping(value = "/validate_lpname", method = RequestMethod.GET) |
| 72 | + public Map<String, Object> validate_lpname(@RequestParam Map<String, Object> param) { | ||
| 73 | Map<String, Object> rtn = new HashMap<>(); | 73 | Map<String, Object> rtn = new HashMap<>(); |
| 74 | try { | 74 | try { |
| 75 | // 路牌名称验证 | 75 | // 路牌名称验证 |
| @@ -79,7 +79,7 @@ public class GuideboardInfoController extends BController<GuideboardInfo, Long> | @@ -79,7 +79,7 @@ public class GuideboardInfoController extends BController<GuideboardInfo, Long> | ||
| 79 | null, | 79 | null, |
| 80 | param.get("lpName_eq") | 80 | param.get("lpName_eq") |
| 81 | ); | 81 | ); |
| 82 | - guideboardInfoService.validate(guideboardInfo); | 82 | + guideboardInfoService.validate_lpname(guideboardInfo); |
| 83 | rtn.put("status", ResponseCode.SUCCESS); | 83 | rtn.put("status", ResponseCode.SUCCESS); |
| 84 | } catch (ScheduleException exp) { | 84 | } catch (ScheduleException exp) { |
| 85 | rtn.put("status", ResponseCode.ERROR); | 85 | rtn.put("status", ResponseCode.ERROR); |
src/main/java/com/bsth/entity/schedule/GuideboardInfo.java
| 1 | package com.bsth.entity.schedule; | 1 | package com.bsth.entity.schedule; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.Line; | 3 | import com.bsth.entity.Line; |
| 4 | -import com.bsth.entity.sys.SysUser; | ||
| 5 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 6 | 5 | ||
| 7 | import javax.persistence.*; | 6 | import javax.persistence.*; |
| 8 | -import java.util.Date; | ||
| 9 | 7 | ||
| 10 | /** | 8 | /** |
| 11 | * 路牌信息。 | 9 | * 路牌信息。 |
| @@ -18,7 +16,7 @@ import java.util.Date; | @@ -18,7 +16,7 @@ import java.util.Date; | ||
| 18 | }) | 16 | }) |
| 19 | }) | 17 | }) |
| 20 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | 18 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) |
| 21 | -public class GuideboardInfo { | 19 | +public class GuideboardInfo extends BEntity { |
| 22 | 20 | ||
| 23 | /** 主键Id */ | 21 | /** 主键Id */ |
| 24 | @Id | 22 | @Id |
| @@ -43,21 +41,6 @@ public class GuideboardInfo { | @@ -43,21 +41,6 @@ public class GuideboardInfo { | ||
| 43 | @Column(nullable = false) | 41 | @Column(nullable = false) |
| 44 | private Boolean isCancel = false; | 42 | private Boolean isCancel = false; |
| 45 | 43 | ||
| 46 | - /** 创建人 */ | ||
| 47 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 48 | - private SysUser createBy; | ||
| 49 | - /** 修改人 */ | ||
| 50 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 51 | - private SysUser updateBy; | ||
| 52 | - | ||
| 53 | - /** 创建日期 */ | ||
| 54 | - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 55 | - private Date createDate; | ||
| 56 | - /** 修改日期 */ | ||
| 57 | - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | ||
| 58 | - private Date updateDate; | ||
| 59 | - | ||
| 60 | - | ||
| 61 | public GuideboardInfo() {} | 44 | public GuideboardInfo() {} |
| 62 | 45 | ||
| 63 | public GuideboardInfo(Object id, Object xlid, Object lpNo, Object lpName) { | 46 | public GuideboardInfo(Object id, Object xlid, Object lpNo, Object lpName) { |
| @@ -126,38 +109,6 @@ public class GuideboardInfo { | @@ -126,38 +109,6 @@ public class GuideboardInfo { | ||
| 126 | this.lpType = lpType; | 109 | this.lpType = lpType; |
| 127 | } | 110 | } |
| 128 | 111 | ||
| 129 | - public SysUser getCreateBy() { | ||
| 130 | - return createBy; | ||
| 131 | - } | ||
| 132 | - | ||
| 133 | - public void setCreateBy(SysUser createBy) { | ||
| 134 | - this.createBy = createBy; | ||
| 135 | - } | ||
| 136 | - | ||
| 137 | - public SysUser getUpdateBy() { | ||
| 138 | - return updateBy; | ||
| 139 | - } | ||
| 140 | - | ||
| 141 | - public void setUpdateBy(SysUser updateBy) { | ||
| 142 | - this.updateBy = updateBy; | ||
| 143 | - } | ||
| 144 | - | ||
| 145 | - public Date getCreateDate() { | ||
| 146 | - return createDate; | ||
| 147 | - } | ||
| 148 | - | ||
| 149 | - public void setCreateDate(Date createDate) { | ||
| 150 | - this.createDate = createDate; | ||
| 151 | - } | ||
| 152 | - | ||
| 153 | - public Date getUpdateDate() { | ||
| 154 | - return updateDate; | ||
| 155 | - } | ||
| 156 | - | ||
| 157 | - public void setUpdateDate(Date updateDate) { | ||
| 158 | - this.updateDate = updateDate; | ||
| 159 | - } | ||
| 160 | - | ||
| 161 | public Boolean getIsCancel() { | 112 | public Boolean getIsCancel() { |
| 162 | return isCancel; | 113 | return isCancel; |
| 163 | } | 114 | } |
src/main/java/com/bsth/service/schedule/GuideboardInfoService.java
| @@ -6,6 +6,8 @@ import com.bsth.entity.schedule.GuideboardInfo; | @@ -6,6 +6,8 @@ import com.bsth.entity.schedule.GuideboardInfo; | ||
| 6 | * Created by xu on 16/5/11. | 6 | * Created by xu on 16/5/11. |
| 7 | */ | 7 | */ |
| 8 | public interface GuideboardInfoService extends BService<GuideboardInfo, Long> { | 8 | public interface GuideboardInfoService extends BService<GuideboardInfo, Long> { |
| 9 | - public void validate(GuideboardInfo guideboardInfo) throws ScheduleException; | 9 | + public void validate_lpno(GuideboardInfo guideboardInfo) throws ScheduleException; |
| 10 | + public void validate_lpname(GuideboardInfo guideboardInfo) throws ScheduleException; | ||
| 10 | public void toggleCancel(Long id) throws ScheduleException; | 11 | public void toggleCancel(Long id) throws ScheduleException; |
| 12 | + | ||
| 11 | } | 13 | } |
src/main/java/com/bsth/service/schedule/impl/GuideboardInfoServiceImpl.java
| @@ -22,52 +22,44 @@ public class GuideboardInfoServiceImpl extends BServiceImpl<GuideboardInfo, Long | @@ -22,52 +22,44 @@ public class GuideboardInfoServiceImpl extends BServiceImpl<GuideboardInfo, Long | ||
| 22 | @Autowired | 22 | @Autowired |
| 23 | private TTInfoDetailService ttInfoDetailService; | 23 | private TTInfoDetailService ttInfoDetailService; |
| 24 | 24 | ||
| 25 | - // 验证方法 | ||
| 26 | - @Transactional | ||
| 27 | - public void validate(GuideboardInfo guideboardInfo) throws ScheduleException { | 25 | + @Override |
| 26 | + public void validate_lpno(GuideboardInfo guideboardInfo) throws ScheduleException { | ||
| 28 | // 查询条件 | 27 | // 查询条件 |
| 29 | Map<String, Object> param = new HashMap<>(); | 28 | Map<String, Object> param = new HashMap<>(); |
| 30 | - if (guideboardInfo.getId() != null) | 29 | + if (guideboardInfo.getId() != null) { |
| 31 | param.put("id_ne", guideboardInfo.getId()); | 30 | param.put("id_ne", guideboardInfo.getId()); |
| 31 | + } | ||
| 32 | 32 | ||
| 33 | if (guideboardInfo.getXl() == null || guideboardInfo.getXl().getId() == null) { | 33 | if (guideboardInfo.getXl() == null || guideboardInfo.getXl().getId() == null) { |
| 34 | throw new ScheduleException("线路未选择"); | 34 | throw new ScheduleException("线路未选择"); |
| 35 | } else { | 35 | } else { |
| 36 | + param.put("isCancel_eq", false); // 作废的也算入判定区 | ||
| 36 | param.put("xl.id_eq", guideboardInfo.getXl().getId()); | 37 | param.put("xl.id_eq", guideboardInfo.getXl().getId()); |
| 38 | + param.put("lpNo_eq", guideboardInfo.getLpNo()); | ||
| 39 | + if (!CollectionUtils.isEmpty(list(param))) { | ||
| 40 | + throw new ScheduleException("路牌编号重复"); | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + } | ||
| 37 | 44 | ||
| 38 | -// param.put("isCancel_eq", false); // 作废的也算入判定区 | ||
| 39 | - if (guideboardInfo.getLpNo() != null) { | ||
| 40 | - if (guideboardInfo.getLpName() != null) { | ||
| 41 | - // 如果两个都写了,分开查询 | ||
| 42 | - param.put("lpNo_eq", guideboardInfo.getLpNo()); | ||
| 43 | - if (!CollectionUtils.isEmpty(list(param))) { | ||
| 44 | - throw new ScheduleException("路牌编号重复"); | ||
| 45 | - } | ||
| 46 | - param.remove("lpNo_eq"); | ||
| 47 | - param.put("lpName_eq", guideboardInfo.getLpName()); | ||
| 48 | - if (!CollectionUtils.isEmpty(list(param))) { | ||
| 49 | - throw new ScheduleException("路牌名称重复"); | ||
| 50 | - } | 45 | + @Override |
| 46 | + public void validate_lpname(GuideboardInfo guideboardInfo) throws ScheduleException { | ||
| 47 | + // 查询条件 | ||
| 48 | + Map<String, Object> param = new HashMap<>(); | ||
| 49 | + if (guideboardInfo.getId() != null) { | ||
| 50 | + param.put("id_ne", guideboardInfo.getId()); | ||
| 51 | + } | ||
| 51 | 52 | ||
| 52 | - } else { | ||
| 53 | - param.put("lpNo_eq", guideboardInfo.getLpNo()); | ||
| 54 | - if (!CollectionUtils.isEmpty(list(param))) { | ||
| 55 | - throw new ScheduleException("路牌编号重复"); | ||
| 56 | - } | ||
| 57 | - } | ||
| 58 | - } else { | ||
| 59 | - if (guideboardInfo.getLpName() != null) { | ||
| 60 | - param.put("lpName_eq", guideboardInfo.getLpName()); | ||
| 61 | - if (!CollectionUtils.isEmpty(list(param))) { | ||
| 62 | - throw new ScheduleException("路牌名字重复"); | ||
| 63 | - } | ||
| 64 | - } else { | ||
| 65 | - // 都为空 | ||
| 66 | - throw new ScheduleException("路牌编号名字都为空"); | ||
| 67 | - } | 53 | + if (guideboardInfo.getXl() == null || guideboardInfo.getXl().getId() == null) { |
| 54 | + throw new ScheduleException("线路未选择"); | ||
| 55 | + } else { | ||
| 56 | + param.put("isCancel_eq", false); // 作废的也算入判定区 | ||
| 57 | + param.put("xl.id_eq", guideboardInfo.getXl().getId()); | ||
| 58 | + param.put("lpName_eq", guideboardInfo.getLpName()); | ||
| 59 | + if (!CollectionUtils.isEmpty(list(param))) { | ||
| 60 | + throw new ScheduleException("路牌名字重复"); | ||
| 68 | } | 61 | } |
| 69 | } | 62 | } |
| 70 | - | ||
| 71 | } | 63 | } |
| 72 | 64 | ||
| 73 | @Transactional | 65 | @Transactional |
| @@ -83,7 +75,8 @@ public class GuideboardInfoServiceImpl extends BServiceImpl<GuideboardInfo, Long | @@ -83,7 +75,8 @@ public class GuideboardInfoServiceImpl extends BServiceImpl<GuideboardInfo, Long | ||
| 83 | GuideboardInfo guideboardInfo = findById(id); | 75 | GuideboardInfo guideboardInfo = findById(id); |
| 84 | Map<String, Object> param = new HashMap<>(); | 76 | Map<String, Object> param = new HashMap<>(); |
| 85 | if (guideboardInfo.getIsCancel()) { | 77 | if (guideboardInfo.getIsCancel()) { |
| 86 | - validate(guideboardInfo); | 78 | + validate_lpno(guideboardInfo); |
| 79 | + validate_lpname(guideboardInfo); | ||
| 87 | guideboardInfo.setIsCancel(false); | 80 | guideboardInfo.setIsCancel(false); |
| 88 | } else { | 81 | } else { |
| 89 | param.clear(); | 82 | param.clear(); |
| @@ -96,7 +89,7 @@ public class GuideboardInfoServiceImpl extends BServiceImpl<GuideboardInfo, Long | @@ -96,7 +89,7 @@ public class GuideboardInfoServiceImpl extends BServiceImpl<GuideboardInfo, Long | ||
| 96 | } else { | 89 | } else { |
| 97 | throw new ScheduleException("在时刻表" + | 90 | throw new ScheduleException("在时刻表" + |
| 98 | ttInfoDetailList.get(0).getTtinfo().getName() + | 91 | ttInfoDetailList.get(0).getTtinfo().getName() + |
| 99 | - "已使用,无法删除!"); | 92 | + "已使用,无法作废!"); |
| 100 | } | 93 | } |
| 101 | } | 94 | } |
| 102 | } | 95 | } |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice-legacy.js
| @@ -263,7 +263,7 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | @@ -263,7 +263,7 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | ||
| 263 | gbv1: { // 路牌序号验证 | 263 | gbv1: { // 路牌序号验证 |
| 264 | template: {'xl.id_eq': -1, 'lpNo_eq': 'ddd'}, | 264 | template: {'xl.id_eq': -1, 'lpNo_eq': 'ddd'}, |
| 265 | remote: $resource( | 265 | remote: $resource( |
| 266 | - '/gic/validate1', | 266 | + '/gic/validate_lpno', |
| 267 | {}, | 267 | {}, |
| 268 | { | 268 | { |
| 269 | do: { | 269 | do: { |
| @@ -275,7 +275,7 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | @@ -275,7 +275,7 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | ||
| 275 | gbv2: { // 路牌名称验证 | 275 | gbv2: { // 路牌名称验证 |
| 276 | template: {'xl.id_eq': -1, 'lpName_eq': 'ddd'}, | 276 | template: {'xl.id_eq': -1, 'lpName_eq': 'ddd'}, |
| 277 | remote: $resource( | 277 | remote: $resource( |
| 278 | - '/gic/validate2', | 278 | + '/gic/validate_lpname', |
| 279 | {}, | 279 | {}, |
| 280 | { | 280 | { |
| 281 | do: { | 281 | do: { |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
| @@ -295,7 +295,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService_g', ['$resource', | @@ -295,7 +295,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService_g', ['$resource', | ||
| 295 | return { | 295 | return { |
| 296 | rest: $resource( | 296 | rest: $resource( |
| 297 | '/gic/:id', | 297 | '/gic/:id', |
| 298 | - {order: 'xl,isCancel', direction: 'DESC,ASC', id: '@id_route'}, | 298 | + {order: 'xl,isCancel', direction: 'DESC,ASC', id: '@id'}, |
| 299 | { | 299 | { |
| 300 | list: { | 300 | list: { |
| 301 | method: 'GET', | 301 | method: 'GET', |
| @@ -817,7 +817,7 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | @@ -817,7 +817,7 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | ||
| 817 | gbv1: { // 路牌序号验证 | 817 | gbv1: { // 路牌序号验证 |
| 818 | template: {'xl.id_eq': -1, 'lpNo_eq': 'ddd'}, | 818 | template: {'xl.id_eq': -1, 'lpNo_eq': 'ddd'}, |
| 819 | remote: $resource( | 819 | remote: $resource( |
| 820 | - '/gic/validate1', | 820 | + '/gic/validate_lpno', |
| 821 | {}, | 821 | {}, |
| 822 | { | 822 | { |
| 823 | do: { | 823 | do: { |
| @@ -829,7 +829,7 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | @@ -829,7 +829,7 @@ angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', fun | ||
| 829 | gbv2: { // 路牌名称验证 | 829 | gbv2: { // 路牌名称验证 |
| 830 | template: {'xl.id_eq': -1, 'lpName_eq': 'ddd'}, | 830 | template: {'xl.id_eq': -1, 'lpName_eq': 'ddd'}, |
| 831 | remote: $resource( | 831 | remote: $resource( |
| 832 | - '/gic/validate2', | 832 | + '/gic/validate_lpname', |
| 833 | {}, | 833 | {}, |
| 834 | { | 834 | { |
| 835 | do: { | 835 | do: { |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/form.html
| @@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
| 63 | name="lpNo" placeholder="请输入路牌编号..." min="1" required | 63 | name="lpNo" placeholder="请输入路牌编号..." min="1" required |
| 64 | remote-Validation | 64 | remote-Validation |
| 65 | remotevtype="gbv1" | 65 | remotevtype="gbv1" |
| 66 | - remotevparam="{{ {'id_eq': ctrl.guideboardManageForForm.id, 'xl.id_eq': ctrl.guideboardManageForForm.xl.id, 'lpNo_eq': ctrl.guideboardManageForForm.lpNo} | json}}" | 66 | + remotevparam="{{ {'xl.id_eq': ctrl.guideboardManageForForm.xl.id, 'lpNo_eq': ctrl.guideboardManageForForm.lpNo} | json}}" |
| 67 | 67 | ||
| 68 | /> | 68 | /> |
| 69 | </div> | 69 | </div> |
| @@ -85,7 +85,7 @@ | @@ -85,7 +85,7 @@ | ||
| 85 | name="lpName" placeholder="请输入路牌名字..." required | 85 | name="lpName" placeholder="请输入路牌名字..." required |
| 86 | remote-Validation | 86 | remote-Validation |
| 87 | remotevtype="gbv2" | 87 | remotevtype="gbv2" |
| 88 | - remotevparam="{{ {'id_eq': ctrl.guideboardManageForForm.id, 'xl.id_eq': ctrl.guideboardManageForForm.xl.id, 'lpName_eq': ctrl.guideboardManageForForm.lpName} | json}}" | 88 | + remotevparam="{{ {'xl.id_eq': ctrl.guideboardManageForForm.xl.id, 'lpName_eq': ctrl.guideboardManageForForm.lpName} | json}}" |
| 89 | 89 | ||
| 90 | /> | 90 | /> |
| 91 | </div> | 91 | </div> |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/list.html
| @@ -77,8 +77,8 @@ | @@ -77,8 +77,8 @@ | ||
| 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="guideboardManage_detail({id : info.id})" class="btn btn-info btn-sm"> 详细 </a> | 78 | <a ui-sref="guideboardManage_detail({id : info.id})" class="btn btn-info btn-sm"> 详细 </a> |
| 79 | <a ui-sref="guideboardManage_edit({id: info.id})" class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 修改 </a> | 79 | <a ui-sref="guideboardManage_edit({id: info.id})" class="btn btn-info btn-sm" ng-if="info.isCancel == '0'"> 修改 </a> |
| 80 | - <a ng-click="ctrl.toggleCancel(info.id)" class="btn btn-danger btn-sm" ng-if="info.isCancel == '0'"> 作废 </a> | ||
| 81 | - <a ng-click="ctrl.toggleCancel(info.id)" class="btn btn-success btn-sm" ng-if="info.isCancel == '1'"> 撤销 </a> | 80 | + <a ng-click="ctrl.toggleGuideboard(info.id)" class="btn btn-danger btn-sm" ng-if="info.isCancel == '0'"> 作废 </a> |
| 81 | + <a ng-click="ctrl.toggleGuideboard(info.id)" class="btn btn-success btn-sm" ng-if="info.isCancel == '1'"> 撤销 </a> | ||
| 82 | </td> | 82 | </td> |
| 83 | </tr> | 83 | </tr> |
| 84 | </tbody> | 84 | </tbody> |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/module.js
| @@ -180,18 +180,8 @@ angular.module('ScheduleApp').controller( | @@ -180,18 +180,8 @@ angular.module('ScheduleApp').controller( | ||
| 180 | service.getPage(result); | 180 | service.getPage(result); |
| 181 | }); | 181 | }); |
| 182 | }; | 182 | }; |
| 183 | - self.toggleTtinfo = function(id) { | ||
| 184 | - Gb.delete({id: id}, function(result) { | ||
| 185 | - if (result.message) { // 暂时这样做,之后全局拦截 | ||
| 186 | - alert("失败:" + result.message); | ||
| 187 | - } else { | ||
| 188 | - self.doPage(); | ||
| 189 | - } | ||
| 190 | - }); | ||
| 191 | - }; | ||
| 192 | - | ||
| 193 | // 作废切换 | 183 | // 作废切换 |
| 194 | - self.toggleCancel = function(id) { | 184 | + self.toggleGuideboard = function(id) { |
| 195 | Gb.delete({id: id}, function(result) { | 185 | Gb.delete({id: id}, function(result) { |
| 196 | if (result.status == "ERROR") { // 暂时这样做,之后全局拦截 | 186 | if (result.status == "ERROR") { // 暂时这样做,之后全局拦截 |
| 197 | alert("失败:" + result.msg); | 187 | alert("失败:" + result.msg); |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/service.js
| @@ -3,7 +3,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService_g', ['$resource', | @@ -3,7 +3,7 @@ angular.module('ScheduleApp').factory('GuideboardManageService_g', ['$resource', | ||
| 3 | return { | 3 | return { |
| 4 | rest: $resource( | 4 | rest: $resource( |
| 5 | '/gic/:id', | 5 | '/gic/:id', |
| 6 | - {order: 'xl,isCancel', direction: 'DESC,ASC', id: '@id_route'}, | 6 | + {order: 'xl,isCancel', direction: 'DESC,ASC', id: '@id'}, |
| 7 | { | 7 | { |
| 8 | list: { | 8 | list: { |
| 9 | method: 'GET', | 9 | method: 'GET', |