Commit 52674257d1eb8b02bbeabfb11dde1f685082055c
1 parent
ec25859a
1、添加dubbo配置(pom配置,相关dubbo消费者配置)
2、修改安全配置(开放health接口访问) 3、添加时刻表明细controller_facade,TTInfoDetailController_facade 4、添加时刻表班型明细controller_facade,TTInfoBxDetailController_facade 5、添加排班明细controller_facade,SchedulePlanInfoController_facade 6、添加日志服务controller_facade,LogController_facde 7、添加logManage相关页面 8、修改时刻表明细编辑页面,添加班型编辑列,修改相关指令
Showing
35 changed files
with
1992 additions
and
30 deletions
pom.xml
| @@ -296,12 +296,70 @@ | @@ -296,12 +296,70 @@ | ||
| 296 | <version>1.1.8</version> | 296 | <version>1.1.8</version> |
| 297 | </dependency> | 297 | </dependency> |
| 298 | 298 | ||
| 299 | + <!-- dubbo 需要的jar start --> | ||
| 300 | + <dependency> | ||
| 301 | + <groupId>com.alibaba</groupId> | ||
| 302 | + <artifactId>dubbo</artifactId> | ||
| 303 | + <!--<version>2.6.3</version>--> | ||
| 304 | + <version>2.5.3</version> | ||
| 305 | + <exclusions> | ||
| 306 | + <exclusion> | ||
| 307 | + <groupId>org.springframework</groupId> | ||
| 308 | + <artifactId>spring</artifactId> | ||
| 309 | + </exclusion> | ||
| 310 | + <exclusion> | ||
| 311 | + <groupId>log4j</groupId> | ||
| 312 | + <artifactId>log4j</artifactId> | ||
| 313 | + </exclusion> | ||
| 314 | + </exclusions> | ||
| 315 | + </dependency> | ||
| 316 | + | ||
| 317 | + <dependency> | ||
| 318 | + <groupId>org.apache.zookeeper</groupId> | ||
| 319 | + <artifactId>zookeeper</artifactId> | ||
| 320 | + <version>3.4.5</version> | ||
| 321 | + <exclusions> | ||
| 322 | + <exclusion> | ||
| 323 | + <groupId>org.slf4j</groupId> | ||
| 324 | + <artifactId>slf4j-log4j12</artifactId> | ||
| 325 | + </exclusion> | ||
| 326 | + </exclusions> | ||
| 327 | + </dependency> | ||
| 328 | + | ||
| 329 | + <dependency> | ||
| 330 | + <groupId>com.101tec</groupId> | ||
| 331 | + <artifactId>zkclient</artifactId> | ||
| 332 | + <version>0.3</version> | ||
| 333 | + </dependency> | ||
| 334 | + | ||
| 299 | <!-- plan common工程依赖 --> | 335 | <!-- plan common工程依赖 --> |
| 300 | <dependency> | 336 | <dependency> |
| 301 | <groupId>com.bsth.control_v2</groupId> | 337 | <groupId>com.bsth.control_v2</groupId> |
| 302 | <artifactId>plan_module-common</artifactId> | 338 | <artifactId>plan_module-common</artifactId> |
| 303 | <version>1.0-SNAPSHOT</version> | 339 | <version>1.0-SNAPSHOT</version> |
| 304 | </dependency> | 340 | </dependency> |
| 341 | + <!-- plan common config 工程依赖 --> | ||
| 342 | + <dependency> | ||
| 343 | + <groupId>com.bsth.control_v2</groupId> | ||
| 344 | + <artifactId>plan_module-common-config</artifactId> | ||
| 345 | + <version>1.0-SNAPSHOT</version> | ||
| 346 | + </dependency> | ||
| 347 | + <dependency> | ||
| 348 | + <groupId>org.slf4j</groupId> | ||
| 349 | + <artifactId>slf4j-api</artifactId> | ||
| 350 | + <version>1.7.7</version> | ||
| 351 | + </dependency> | ||
| 352 | + <dependency> | ||
| 353 | + <groupId>ch.qos.logback</groupId> | ||
| 354 | + <artifactId>logback-classic</artifactId> | ||
| 355 | + <version>1.1.3</version> | ||
| 356 | + </dependency> | ||
| 357 | + <dependency> | ||
| 358 | + <groupId>org.slf4j</groupId> | ||
| 359 | + <artifactId>log4j-over-slf4j</artifactId> | ||
| 360 | + <version>1.7.7</version> | ||
| 361 | + </dependency> | ||
| 362 | + | ||
| 305 | </dependencies> | 363 | </dependencies> |
| 306 | 364 | ||
| 307 | <dependencyManagement> | 365 | <dependencyManagement> |
| @@ -323,8 +381,8 @@ | @@ -323,8 +381,8 @@ | ||
| 323 | <artifactId>maven-compiler-plugin</artifactId> | 381 | <artifactId>maven-compiler-plugin</artifactId> |
| 324 | <version>2.3.2</version><!--$NO-MVN-MAN-VER$ --> | 382 | <version>2.3.2</version><!--$NO-MVN-MAN-VER$ --> |
| 325 | <configuration> | 383 | <configuration> |
| 326 | - <source>1.7</source> | ||
| 327 | - <target>1.7</target> | 384 | + <source>1.8</source> |
| 385 | + <target>1.8</target> | ||
| 328 | </configuration> | 386 | </configuration> |
| 329 | </plugin> | 387 | </plugin> |
| 330 | <plugin> | 388 | <plugin> |
src/main/java/com/bsth/common/Constants.java
| @@ -21,6 +21,9 @@ public class Constants { | @@ -21,6 +21,9 @@ public class Constants { | ||
| 21 | public static final String LOGIN_FAILURE = "/user/loginFailure"; | 21 | public static final String LOGIN_FAILURE = "/user/loginFailure"; |
| 22 | public static final String CAPTCHA = "/captcha.jpg"; | 22 | public static final String CAPTCHA = "/captcha.jpg"; |
| 23 | 23 | ||
| 24 | + // springboot manage health的检测url | ||
| 25 | + public static final String ACTUATOR_MANAGEMENT_HEALTH = "/manage/health"; | ||
| 26 | + | ||
| 24 | //对外的营运数据接口 | 27 | //对外的营运数据接口 |
| 25 | public static final String SERVICE_INTERFACE = "/companyService/**"; | 28 | public static final String SERVICE_INTERFACE = "/companyService/**"; |
| 26 | 29 |
src/main/java/com/bsth/controller/schedule/BController_facade.java
0 → 100644
| 1 | +package com.bsth.controller.schedule; | ||
| 2 | + | ||
| 3 | +import com.bsth.common.Constants; | ||
| 4 | +import com.bsth.common.ResponseCode; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.dto.PageRequestDto; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.exception.PlanModuleException; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 8 | +import com.bsth.entity.sys.SysUser; | ||
| 9 | +import com.bsth.service.sys.SysUserService; | ||
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | +import org.springframework.web.bind.annotation.*; | ||
| 12 | + | ||
| 13 | +import javax.servlet.http.HttpSession; | ||
| 14 | +import java.io.Serializable; | ||
| 15 | +import java.util.Date; | ||
| 16 | +import java.util.HashMap; | ||
| 17 | +import java.util.List; | ||
| 18 | +import java.util.Map; | ||
| 19 | + | ||
| 20 | +public abstract class BController_facade<Id extends Serializable, DTO> { | ||
| 21 | + protected abstract BServiceFacade<Id, DTO> getBServiceFacade(); | ||
| 22 | + | ||
| 23 | + @Autowired | ||
| 24 | + private SysUserService sysUserService; | ||
| 25 | + | ||
| 26 | + //---------------- 设置操作用户 ----------------// | ||
| 27 | + public void setCreateUserInfo(DTO dto, Integer userId, Date createDate) { | ||
| 28 | + throw new PlanModuleException("子类必须override setCUserInfo方法!"); | ||
| 29 | + } | ||
| 30 | + public void setUpdateUserInfo(DTO dto, Integer userId, Date updateDate) { | ||
| 31 | + throw new PlanModuleException("子类必须override setUpdateUserInfo方法!"); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + //---------------- 扩展的save,update,delete操作 --------------------// | ||
| 35 | + protected boolean isSaveExtend() { | ||
| 36 | + return false; | ||
| 37 | + } | ||
| 38 | + protected DTO saveExtend(DTO dto) { | ||
| 39 | + throw new PlanModuleException("子类如果isSaveExtend()==true,必须覆写saveExtend!"); | ||
| 40 | + } | ||
| 41 | + protected boolean isUpdateExtend() { | ||
| 42 | + return false; | ||
| 43 | + } | ||
| 44 | + protected DTO updateExtend(DTO dto) { | ||
| 45 | + throw new PlanModuleException("子类如果isUpdateExtend()==true,必须覆写updateExtend!"); | ||
| 46 | + } | ||
| 47 | + protected boolean isDeleteExtend() { | ||
| 48 | + return false; | ||
| 49 | + } | ||
| 50 | + protected void deleteExtend(Id id) { | ||
| 51 | + throw new PlanModuleException("子类如果isDeleteExtend()==true,必须覆写deleteExtend!"); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + //---------------- CRUD 操作 ----------------// | ||
| 55 | + // Create操作 | ||
| 56 | + @RequestMapping(method = RequestMethod.POST) | ||
| 57 | + public Map<String, Object> save(@RequestBody DTO dto, HttpSession httpSession) { | ||
| 58 | + String userName = String.valueOf(httpSession.getAttribute(Constants.SESSION_USERNAME)); | ||
| 59 | + SysUser sysUser = sysUserService.findByUserName(userName); | ||
| 60 | + setCreateUserInfo(dto, sysUser.getId(), new Date()); | ||
| 61 | + setUpdateUserInfo(dto, sysUser.getId(), new Date()); | ||
| 62 | + | ||
| 63 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 64 | + try { | ||
| 65 | + DTO dto_saved; | ||
| 66 | + if (isSaveExtend()) { | ||
| 67 | + dto_saved = saveExtend(dto); | ||
| 68 | + } else { | ||
| 69 | + dto_saved = getBServiceFacade().save(dto); | ||
| 70 | + } | ||
| 71 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 72 | + rtn.put("data", dto_saved); | ||
| 73 | + } catch (Exception exp) { | ||
| 74 | + rtn.put("status", ResponseCode.ERROR); | ||
| 75 | + rtn.put("msg", exp.getMessage()); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + return rtn; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + // Update操作 | ||
| 82 | + @RequestMapping(value="/{id}", method = RequestMethod.POST) | ||
| 83 | + public Map<String, Object> update(@RequestBody DTO dto, HttpSession httpSession) { | ||
| 84 | + String userName = String.valueOf(httpSession.getAttribute(Constants.SESSION_USERNAME)); | ||
| 85 | + SysUser sysUser = sysUserService.findByUserName(userName); | ||
| 86 | + setUpdateUserInfo(dto, sysUser.getId(), new Date()); | ||
| 87 | + | ||
| 88 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 89 | + try { | ||
| 90 | + DTO dto_updated; | ||
| 91 | + if (isUpdateExtend()) { | ||
| 92 | + dto_updated = updateExtend(dto); | ||
| 93 | + } else { | ||
| 94 | + dto_updated = getBServiceFacade().save(dto); | ||
| 95 | + } | ||
| 96 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 97 | + rtn.put("data", dto_updated); | ||
| 98 | + } catch (Exception exp) { | ||
| 99 | + rtn.put("status", ResponseCode.ERROR); | ||
| 100 | + rtn.put("msg", exp.getMessage()); | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + return rtn; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + // Research操作 | ||
| 107 | + @RequestMapping(value = "/{id}", method = RequestMethod.GET) | ||
| 108 | + public Map<String, Object> findById(@PathVariable("id") Id id) { | ||
| 109 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 110 | + try { | ||
| 111 | + DTO dto = getBServiceFacade().findById(id); | ||
| 112 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 113 | + rtn.put("data", dto); | ||
| 114 | + } catch (Exception exp) { | ||
| 115 | + rtn.put("status", ResponseCode.ERROR); | ||
| 116 | + rtn.put("msg", exp.getMessage()); | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + return rtn; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + // 查询所有操作 | ||
| 123 | + @RequestMapping(value = "/all", method = RequestMethod.GET) | ||
| 124 | + public Map<String, Object> list(@RequestParam Map<String, Object> param) { | ||
| 125 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 126 | + try { | ||
| 127 | + List<DTO> tList = getBServiceFacade().list(param); | ||
| 128 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 129 | + rtn.put("data", tList); | ||
| 130 | + } catch (Exception exp) { | ||
| 131 | + rtn.put("status", ResponseCode.ERROR); | ||
| 132 | + rtn.put("msg", exp.getMessage()); | ||
| 133 | + } | ||
| 134 | + return rtn; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + // 分页查询操作 | ||
| 138 | + @RequestMapping(method = RequestMethod.GET) | ||
| 139 | + public Map<String, Object> list( | ||
| 140 | + @RequestParam Map<String, Object> map, | ||
| 141 | + @RequestParam(defaultValue = "0") int page, | ||
| 142 | + @RequestParam(defaultValue = "10") int size, | ||
| 143 | + @RequestParam(defaultValue = "id") String order, | ||
| 144 | + @RequestParam(defaultValue = "DESC") String direction) { | ||
| 145 | + PageRequestDto pageRequestDto = PageRequestDto.getBuilder() | ||
| 146 | + .setPage(page) | ||
| 147 | + .setSize(size) | ||
| 148 | + .setOrder(order) | ||
| 149 | + .setDirection(direction) | ||
| 150 | + .build(); | ||
| 151 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 152 | + try { | ||
| 153 | + rtn.put("data", getBServiceFacade().list(map, pageRequestDto)); | ||
| 154 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 155 | + } catch (Exception exp) { | ||
| 156 | + rtn.put("status", ResponseCode.ERROR); | ||
| 157 | + rtn.put("msg", exp.getMessage()); | ||
| 158 | + } | ||
| 159 | + return rtn; | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + // Delete操作 | ||
| 163 | + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) | ||
| 164 | + public Map<String, Object> delete(@PathVariable("id") Id id, HttpSession httpSession) { | ||
| 165 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 166 | + try { | ||
| 167 | + // 由于种种原因,这里不保存用户和操作时间了 | ||
| 168 | + if (isDeleteExtend()) { | ||
| 169 | + deleteExtend(id); | ||
| 170 | + } else { | ||
| 171 | + getBServiceFacade().delete(id); | ||
| 172 | + } | ||
| 173 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 174 | + } catch (Exception exp) { | ||
| 175 | + rtn.put("status", ResponseCode.ERROR); | ||
| 176 | + rtn.put("msg", exp.getMessage()); | ||
| 177 | + } | ||
| 178 | + return rtn; | ||
| 179 | + } | ||
| 180 | +} |
src/main/java/com/bsth/controller/schedule/core/LogController_facade.java
0 → 100644
| 1 | +package com.bsth.controller.schedule.core; | ||
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.control_v2.plan_module.common.dto.schedule.log.ModuleOperatorLogDto; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.service.log.LogServiceFacade; | ||
| 7 | +import com.bsth.controller.schedule.BController_facade; | ||
| 8 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 9 | +import org.springframework.web.bind.annotation.RestController; | ||
| 10 | + | ||
| 11 | +@RestController | ||
| 12 | +@RequestMapping("s_log") | ||
| 13 | +public class LogController_facade extends BController_facade<Long, ModuleOperatorLogDto> { | ||
| 14 | + @Reference | ||
| 15 | + private LogServiceFacade logServiceFacade; | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + protected BServiceFacade<Long, ModuleOperatorLogDto> getBServiceFacade() { | ||
| 19 | + return logServiceFacade; | ||
| 20 | + } | ||
| 21 | +} |
src/main/java/com/bsth/controller/schedule/core/SchedulePlanInfoController.java
| @@ -15,8 +15,8 @@ import java.util.Map; | @@ -15,8 +15,8 @@ import java.util.Map; | ||
| 15 | /** | 15 | /** |
| 16 | * Created by xu on 17/5/1. | 16 | * Created by xu on 17/5/1. |
| 17 | */ | 17 | */ |
| 18 | -@RestController | ||
| 19 | -@RequestMapping("spic") | 18 | +//@RestController |
| 19 | +//@RequestMapping("spic") | ||
| 20 | public class SchedulePlanInfoController extends BController<SchedulePlanInfo, Long> { | 20 | public class SchedulePlanInfoController extends BController<SchedulePlanInfo, Long> { |
| 21 | @Autowired | 21 | @Autowired |
| 22 | private SchedulePlanInfoService schedulePlanInfoService; | 22 | private SchedulePlanInfoService schedulePlanInfoService; |
src/main/java/com/bsth/controller/schedule/core/SchedulePlanInfoController_facade.java
0 → 100644
| 1 | +package com.bsth.controller.schedule.core; | ||
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.common.ResponseCode; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.dto.schedule.PlanInfoDto; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 8 | +import com.bsth.control_v2.plan_module.common.service.schedule.PlanInfoServiceFacade; | ||
| 9 | +import com.bsth.control_v2.plan_module.common.utils.SystemInfoUtils; | ||
| 10 | +import com.bsth.controller.schedule.BController_facade; | ||
| 11 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 12 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 13 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 14 | +import org.springframework.web.bind.annotation.RestController; | ||
| 15 | + | ||
| 16 | +import java.util.Date; | ||
| 17 | +import java.util.HashMap; | ||
| 18 | +import java.util.Map; | ||
| 19 | + | ||
| 20 | +@RestController | ||
| 21 | +@RequestMapping("spic") | ||
| 22 | +public class SchedulePlanInfoController_facade extends BController_facade<Long, PlanInfoDto> { | ||
| 23 | + @Reference | ||
| 24 | + private PlanInfoServiceFacade planInfoServiceFacade; | ||
| 25 | + | ||
| 26 | + @Override | ||
| 27 | + protected BServiceFacade<Long, PlanInfoDto> getBServiceFacade() { | ||
| 28 | + return planInfoServiceFacade; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + @Override | ||
| 32 | + public void setCreateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date createDate) { | ||
| 33 | + UserDto userDto = UserDto.getBuilder() | ||
| 34 | + .setId(userId) | ||
| 35 | + .build(); | ||
| 36 | + planInfoDto.setCreateBy(userDto); | ||
| 37 | + planInfoDto.setCreateDate(createDate); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + @Override | ||
| 41 | + public void setUpdateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date updateDate) { | ||
| 42 | + UserDto userDto = UserDto.getBuilder() | ||
| 43 | + .setId(userId) | ||
| 44 | + .build(); | ||
| 45 | + planInfoDto.setUpdateBy(userDto); | ||
| 46 | + planInfoDto.setUpdateDate(updateDate); | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + @Override | ||
| 50 | + protected boolean isUpdateExtend() { | ||
| 51 | + return true; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @Override | ||
| 55 | + protected PlanInfoDto updateExtend(PlanInfoDto planInfoDto) { | ||
| 56 | + return this.planInfoServiceFacade.updateInfo(planInfoDto, SystemInfoUtils.createClientSystemInfo()); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + @RequestMapping(value = "/groupextinfos/{xlid}/{date}", method = RequestMethod.GET) | ||
| 60 | + public Map<String, Object> findGroupInfoExt( | ||
| 61 | + @PathVariable(value = "xlid") Integer xlid, | ||
| 62 | + @PathVariable(value = "date") Date scheduleDate) { | ||
| 63 | + Map<String, Object> resultMap = new HashMap<>(); | ||
| 64 | + try { | ||
| 65 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 66 | + resultMap.put("data", this.planInfoServiceFacade.findPlanGroupInfo(xlid, scheduleDate)); | ||
| 67 | + | ||
| 68 | + } catch (Exception exp) { | ||
| 69 | + exp.printStackTrace(); | ||
| 70 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 71 | + resultMap.put("msg", exp.getLocalizedMessage()); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + return resultMap; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + @RequestMapping(value = "/lastestsd/{xlid}", method = RequestMethod.GET) | ||
| 78 | + public Map<String, Object> findLastestPlanDate( | ||
| 79 | + @PathVariable(value = "xlid") Integer xlid) { | ||
| 80 | + Map<String, Object> resultMap = new HashMap<>(); | ||
| 81 | + try { | ||
| 82 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 83 | + resultMap.put("data", this.planInfoServiceFacade.findLastestPlanInfoDate(xlid)); | ||
| 84 | + | ||
| 85 | + } catch (Exception exp) { | ||
| 86 | + exp.printStackTrace(); | ||
| 87 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 88 | + resultMap.put("msg", exp.getLocalizedMessage()); | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + return resultMap; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + | ||
| 95 | +} |
src/main/java/com/bsth/controller/schedule/core/TTInfoBxDetailController_facade.java
0 → 100644
| 1 | +package com.bsth.controller.schedule.core; | ||
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.control_v2.plan_module.common.dto.schedule.timetable.TTInfoBxDetailDto; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade; | ||
| 8 | +import com.bsth.controller.schedule.BController_facade; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.RestController; | ||
| 11 | + | ||
| 12 | +import java.util.Date; | ||
| 13 | + | ||
| 14 | +@RestController | ||
| 15 | +@RequestMapping("tibxdc") | ||
| 16 | +public class TTInfoBxDetailController_facade extends BController_facade<Long, TTInfoBxDetailDto> { | ||
| 17 | + @Reference | ||
| 18 | + private TTInfoBxDetailServiceFacade ttInfoBxDetailServiceFacade; | ||
| 19 | + | ||
| 20 | + @Override | ||
| 21 | + protected BServiceFacade<Long, TTInfoBxDetailDto> getBServiceFacade() { | ||
| 22 | + return ttInfoBxDetailServiceFacade; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + public void setCreateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date createDate) { | ||
| 27 | + UserDto userDto = UserDto.getBuilder() | ||
| 28 | + .setId(userId) | ||
| 29 | + .build(); | ||
| 30 | + ttInfoBxDetailDto.setCreateBy(userDto); | ||
| 31 | + ttInfoBxDetailDto.setCreateDate(createDate); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + @Override | ||
| 35 | + public void setUpdateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date updateDate) { | ||
| 36 | + UserDto userDto = UserDto.getBuilder() | ||
| 37 | + .setId(userId) | ||
| 38 | + .build(); | ||
| 39 | + ttInfoBxDetailDto.setUpdateBy(userDto); | ||
| 40 | + ttInfoBxDetailDto.setUpdateDate(updateDate); | ||
| 41 | + } | ||
| 42 | +} |
src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController.java
| @@ -21,8 +21,8 @@ import java.util.Map; | @@ -21,8 +21,8 @@ import java.util.Map; | ||
| 21 | /** | 21 | /** |
| 22 | * Created by xu on 17/1/4. | 22 | * Created by xu on 17/1/4. |
| 23 | */ | 23 | */ |
| 24 | -@RestController | ||
| 25 | -@RequestMapping("tidc") | 24 | +//@RestController |
| 25 | +//@RequestMapping("tidc") | ||
| 26 | public class TTInfoDetailController extends BController<TTInfoDetail, Long> { | 26 | public class TTInfoDetailController extends BController<TTInfoDetail, Long> { |
| 27 | @Autowired | 27 | @Autowired |
| 28 | private TTInfoDetailService ttInfoDetailService; | 28 | private TTInfoDetailService ttInfoDetailService; |
src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController_facade.java
0 → 100644
| 1 | +package com.bsth.controller.schedule.core; | ||
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.common.ResponseCode; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.dto.schedule.timetable.TTInfoDetailDto; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 8 | +import com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoDetailServiceFacade; | ||
| 9 | +import com.bsth.control_v2.plan_module.common.utils.SystemInfoUtils; | ||
| 10 | +import com.bsth.controller.schedule.BController_facade; | ||
| 11 | +import com.bsth.service.schedule.TTInfoDetailService; | ||
| 12 | +import com.bsth.service.schedule.datatools.TTInfoDetailForEdit; | ||
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 15 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 16 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 17 | +import org.springframework.web.bind.annotation.RestController; | ||
| 18 | + | ||
| 19 | +import java.util.Date; | ||
| 20 | +import java.util.HashMap; | ||
| 21 | +import java.util.List; | ||
| 22 | +import java.util.Map; | ||
| 23 | + | ||
| 24 | +@RestController | ||
| 25 | +@RequestMapping("tidc") | ||
| 26 | +public class TTInfoDetailController_facade extends BController_facade<Long, TTInfoDetailDto> { | ||
| 27 | + @Reference | ||
| 28 | + private TTInfoDetailServiceFacade ttInfoDetailServiceFacade; | ||
| 29 | + | ||
| 30 | + @Override | ||
| 31 | + protected BServiceFacade<Long, TTInfoDetailDto> getBServiceFacade() { | ||
| 32 | + return ttInfoDetailServiceFacade; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + @Override | ||
| 36 | + public void setCreateUserInfo(TTInfoDetailDto ttInfoDetailDto, Integer userId, Date createDate) { | ||
| 37 | + UserDto userDto = UserDto.getBuilder() | ||
| 38 | + .setId(userId) | ||
| 39 | + .build(); | ||
| 40 | + ttInfoDetailDto.setCreateBy(userDto); | ||
| 41 | + ttInfoDetailDto.setCreateDate(createDate); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + @Override | ||
| 45 | + public void setUpdateUserInfo(TTInfoDetailDto ttInfoDetailDto, Integer userId, Date updateDate) { | ||
| 46 | + UserDto userDto = UserDto.getBuilder() | ||
| 47 | + .setId(userId) | ||
| 48 | + .build(); | ||
| 49 | + ttInfoDetailDto.setUpdateBy(userDto); | ||
| 50 | + ttInfoDetailDto.setUpdateDate(updateDate); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @Override | ||
| 54 | + protected boolean isSaveExtend() { | ||
| 55 | + return true; | ||
| 56 | + } | ||
| 57 | + @Override | ||
| 58 | + protected TTInfoDetailDto saveExtend(TTInfoDetailDto ttInfoDetailDto) { | ||
| 59 | + return ttInfoDetailServiceFacade.updateInfo(ttInfoDetailDto, SystemInfoUtils.createClientSystemInfo()); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + @Override | ||
| 63 | + protected boolean isUpdateExtend() { | ||
| 64 | + return true; | ||
| 65 | + } | ||
| 66 | + @Override | ||
| 67 | + protected TTInfoDetailDto updateExtend(TTInfoDetailDto ttInfoDetailDto) { | ||
| 68 | + return ttInfoDetailServiceFacade.updateInfo(ttInfoDetailDto, SystemInfoUtils.createClientSystemInfo()); | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + @Override | ||
| 72 | + protected boolean isDeleteExtend() { | ||
| 73 | + return true; | ||
| 74 | + } | ||
| 75 | + @Override | ||
| 76 | + protected void deleteExtend(Long aLong) { | ||
| 77 | + ttInfoDetailServiceFacade.deleteInfo(aLong, SystemInfoUtils.createClientSystemInfo()); | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + //--------------- TODO:以下操作不属于BController_facade,暂时没用定义在TTInfoDetailServiceFacade中 ----------// | ||
| 81 | + @Autowired | ||
| 82 | + private TTInfoDetailService ttInfoDetailService; | ||
| 83 | + /** | ||
| 84 | + * 获取时刻表明细编辑信息。 | ||
| 85 | + * @param xlid 线路id | ||
| 86 | + * @param ttid 时刻表id | ||
| 87 | + * @return | ||
| 88 | + */ | ||
| 89 | + @RequestMapping(value = "/edit/{xlid}/{ttid}", method = RequestMethod.GET) | ||
| 90 | + public Map<String, Object> getEditInfo(@PathVariable("xlid") Integer xlid, | ||
| 91 | + @PathVariable("ttid") Long ttid) { | ||
| 92 | + | ||
| 93 | + // 获取最大的发车数,用于输出数据的数量 | ||
| 94 | + Long maxfcno = ttInfoDetailService.findMaxFcno(xlid, ttid); | ||
| 95 | + | ||
| 96 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 97 | + try { | ||
| 98 | + TTInfoDetailForEdit.EditInfo editInfo = ttInfoDetailService.getEditInfo(xlid, ttid, maxfcno); | ||
| 99 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 100 | + rtn.put("data", editInfo); | ||
| 101 | + } catch (Exception exp) { | ||
| 102 | + rtn.put("status", ResponseCode.ERROR); | ||
| 103 | + rtn.put("msg", exp.getMessage()); | ||
| 104 | + } | ||
| 105 | + return rtn; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + @RequestMapping(value = "/zd_tcc", method = RequestMethod.GET) | ||
| 109 | + public Map<String, Object> getZdAndTccInfo(Integer lineid, Integer xldir, Integer lineversion) { | ||
| 110 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 111 | + try { | ||
| 112 | + List<Map<String, Object>> list = ttInfoDetailService.findZdAndTcc(lineid, xldir, lineversion); | ||
| 113 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 114 | + rtn.put("data", list); | ||
| 115 | + } catch (Exception exp) { | ||
| 116 | + rtn.put("status", ResponseCode.ERROR); | ||
| 117 | + rtn.put("msg", exp.getMessage()); | ||
| 118 | + } | ||
| 119 | + return rtn; | ||
| 120 | + } | ||
| 121 | +} |
src/main/java/com/bsth/entity/schedule/TTInfoDetail.java
| @@ -80,6 +80,8 @@ public class TTInfoDetail extends BEntity { | @@ -80,6 +80,8 @@ public class TTInfoDetail extends BEntity { | ||
| 80 | private Double jhlc; | 80 | private Double jhlc; |
| 81 | /** 班次历时 */ | 81 | /** 班次历时 */ |
| 82 | private Integer bcsj; | 82 | private Integer bcsj; |
| 83 | + /** 例保时间(主要是进出场班次使用) */ | ||
| 84 | + private Integer lbsj; | ||
| 83 | 85 | ||
| 84 | /** 班次类型 字典type=ScheduleType */ | 86 | /** 班次类型 字典type=ScheduleType */ |
| 85 | @Column(nullable = false) | 87 | @Column(nullable = false) |
| @@ -230,6 +232,14 @@ public class TTInfoDetail extends BEntity { | @@ -230,6 +232,14 @@ public class TTInfoDetail extends BEntity { | ||
| 230 | this.bcsj = bcsj; | 232 | this.bcsj = bcsj; |
| 231 | } | 233 | } |
| 232 | 234 | ||
| 235 | + public Integer getLbsj() { | ||
| 236 | + return lbsj; | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + public void setLbsj(Integer lbsj) { | ||
| 240 | + this.lbsj = lbsj; | ||
| 241 | + } | ||
| 242 | + | ||
| 233 | public String getBcType() { | 243 | public String getBcType() { |
| 234 | return bcType; | 244 | return bcType; |
| 235 | } | 245 | } |
src/main/java/com/bsth/filter/BaseFilter.java
| @@ -17,7 +17,7 @@ public abstract class BaseFilter implements Filter { | @@ -17,7 +17,7 @@ public abstract class BaseFilter implements Filter { | ||
| 17 | * 白名单 | 17 | * 白名单 |
| 18 | */ | 18 | */ |
| 19 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, | 19 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, |
| 20 | - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL, Constants.STATION_AND_SECTION_COUNT }; | 20 | + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL, Constants.STATION_AND_SECTION_COUNT, Constants.ACTUATOR_MANAGEMENT_HEALTH }; |
| 21 | 21 | ||
| 22 | @Override | 22 | @Override |
| 23 | public void destroy() { | 23 | public void destroy() { |
src/main/resources/META-INF/drools.packagebuilder.conf
0 → 100644
| 1 | +# 貌似用import accumulate报错,使用配置文件方式 | ||
| 2 | + | ||
| 3 | +drools.accumulate.function.gidscount = com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.GidsCountFunction | ||
| 4 | +drools.accumulate.function.gidfbtime = com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.GidFbTimeFunction | ||
| 5 | +drools.accumulate.function.gidfbfcno = com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.GidFbFcnoFunction | ||
| 6 | + | ||
| 7 | +drools.accumulate.function.lpinforesult = com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo.LpInfoResultsFunction | ||
| 8 | +drools.accumulate.function.minruleqyrq = com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo.MinRuleQyrqFunction | ||
| 9 | + | ||
| 10 | +drools.accumulate.function.vrb = com.bsth.service.schedule.impl.plan.kBase1.core.validate.ValidRepeatBcFunction | ||
| 11 | +drools.accumulate.function.vwrb = com.bsth.service.schedule.impl.plan.kBase1.core.validate.ValidWholeRerunBcFunction | ||
| 12 | +drools.accumulate.function.vwlp = com.bsth.service.schedule.impl.plan.kBase1.core.validate.ValidWantLpFunction |
src/main/resources/application-dev.properties
| 1 | server.port=9088 | 1 | server.port=9088 |
| 2 | -management.port= 9001 | ||
| 3 | -management.address= 127.0.0.1 | 2 | +#management.port= 9001 |
| 3 | +#management.address= 127.0.0.1 | ||
| 4 | +management.security.enabled=false | ||
| 5 | +management.context-path=/manage | ||
| 6 | +dubbo.use=false | ||
| 4 | 7 | ||
| 5 | spring.jpa.hibernate.ddl-auto= update | 8 | spring.jpa.hibernate.ddl-auto= update |
| 6 | spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | 9 | spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
| @@ -8,10 +11,10 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | @@ -8,10 +11,10 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 8 | spring.jpa.database= MYSQL | 11 | spring.jpa.database= MYSQL |
| 9 | spring.jpa.show-sql= true | 12 | spring.jpa.show-sql= true |
| 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver | 13 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -#spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 14 | +#spring.datasource.url= jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 12 | spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 15 | spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 13 | spring.datasource.username= root | 16 | spring.datasource.username= root |
| 14 | -spring.datasource.password= root | 17 | +spring.datasource.password= |
| 15 | #spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 18 | #spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 16 | #spring.datasource.username= root | 19 | #spring.datasource.username= root |
| 17 | #spring.datasource.password= root | 20 | #spring.datasource.password= root |
src/main/resources/application-prod.properties
| 1 | server.port=9088 | 1 | server.port=9088 |
| 2 | -management.port= 9001 | ||
| 3 | -management.address= 127.0.0.1 | 2 | +#management.port= 9001 |
| 3 | +#management.address= 127.0.0.1 | ||
| 4 | +management.security.enabled=false | ||
| 5 | +management.context-path=/manage | ||
| 6 | +dubbo.use=true | ||
| 4 | 7 | ||
| 5 | spring.jpa.hibernate.ddl-auto= update | 8 | spring.jpa.hibernate.ddl-auto= update |
| 6 | spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | 9 | spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
src/main/resources/dubbo/applicationContext_dubbo_consumer.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" | ||
| 3 | + xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
| 4 | + http://www.springframework.org/schema/beans/spring-beans.xsd | ||
| 5 | + http://code.alibabatech.com/schema/dubbo | ||
| 6 | + http://code.alibabatech.com/schema/dubbo/dubbo.xsd"> | ||
| 7 | + | ||
| 8 | + <!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样 --> | ||
| 9 | + <dubbo:application name="bsth_control_v2" /> | ||
| 10 | + | ||
| 11 | + <!-- 使用zookeeper注册中心暴露服务地址 --> | ||
| 12 | + <!-- 注册中心地址 --> | ||
| 13 | + <dubbo:registry protocol="zookeeper" address="127.0.0.1:2181" check="false" /> | ||
| 14 | + | ||
| 15 | + <!-- 时刻表班型明细服务 --> | ||
| 16 | + <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade" id="tTInfoBxDetailServiceFacadeImpl" check="false" /> | ||
| 17 | + <!-- 时刻表明细服务 --> | ||
| 18 | + <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoDetailServiceFacade" id="tTInfoDetailServiceFacadeImpl" check="false" /> | ||
| 19 | + <!-- 排班明细服务 --> | ||
| 20 | + <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.PlanInfoServiceFacade" id="planInfoServiceFacadeImpl" check="false" /> | ||
| 21 | + <!-- 日志服务 --> | ||
| 22 | + <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.log.LogServiceFacade" id="logServiceFacadeImpl" check="false" /> | ||
| 23 | + | ||
| 24 | +</beans> | ||
| 0 | \ No newline at end of file | 25 | \ No newline at end of file |
src/main/resources/dubbo/config-dev.properties
0 → 100644
| 1 | +# application名字 | ||
| 2 | +spring.dubbo.application.name=bsth_control_v2 | ||
| 3 | +# zookeeper注册中心地址 | ||
| 4 | +spring.dubbo.registry=zookeeper://127.0.0.1:2181 | ||
| 5 | + | ||
| 6 | +#----------- dubbo:consumer 性能调优选项 -------------# | ||
| 7 | +# 远程服务调用超时时间,单位毫秒,这里设置30分钟 | ||
| 8 | +spring.dubbo.consumer.timeout=1800000 | ||
| 9 | +# 远程服务调用重试次数,0表示不需要重试 | ||
| 10 | +spring.dubbo.consumer.retries=0 | ||
| 11 | +#----------- dubbo:consumer 服务治理选项 -------------# | ||
| 12 | +# 启动不检查提供者是否存在 | ||
| 13 | +spring.dubbo.consumer.check=false | ||
| 0 | \ No newline at end of file | 14 | \ No newline at end of file |
src/main/resources/dubbo/config-prod.properties
0 → 100644
src/main/resources/static/pages/scheduleApp/Gruntfile.js
| @@ -119,7 +119,8 @@ module.exports = function (grunt) { | @@ -119,7 +119,8 @@ module.exports = function (grunt) { | ||
| 119 | 'module/core/scheduleRuleManage/route.js', // 排班规则管理模块 | 119 | 'module/core/scheduleRuleManage/route.js', // 排班规则管理模块 |
| 120 | 'module/core/ttInfoManage/route.js', // 时刻表管理模块 | 120 | 'module/core/ttInfoManage/route.js', // 时刻表管理模块 |
| 121 | 'module/core/ttInfoManage/detailedit/route.js', // 时刻表明细管理模块 | 121 | 'module/core/ttInfoManage/detailedit/route.js', // 时刻表明细管理模块 |
| 122 | - 'module/core/ttInfoManage2/route.js' // 智能时刻表管理模块 | 122 | + 'module/core/ttInfoManage2/route.js', // 智能时刻表管理模块 |
| 123 | + 'module/sys/logManage/route.js' // 日志管理模块 | ||
| 123 | ], | 124 | ], |
| 124 | dest: 'module/common/prj-common-ui-route-state.js' | 125 | dest: 'module/common/prj-common-ui-route-state.js' |
| 125 | }, | 126 | }, |
| @@ -139,6 +140,7 @@ module.exports = function (grunt) { | @@ -139,6 +140,7 @@ module.exports = function (grunt) { | ||
| 139 | 'module/core/schedulePlanManage/service.js', // 排班计划管理service | 140 | 'module/core/schedulePlanManage/service.js', // 排班计划管理service |
| 140 | 'module/core/scheduleRuleManage/service.js', // 排班规则管理service | 141 | 'module/core/scheduleRuleManage/service.js', // 排班规则管理service |
| 141 | 'module/core/ttInfoManage/service.js', // 时刻表管理service | 142 | 'module/core/ttInfoManage/service.js', // 时刻表管理service |
| 143 | + 'module/sys/logManage/service.js', // 日志管理service | ||
| 142 | 'module/common/prj-common-globalservice-legacy.js' // 其他用service | 144 | 'module/common/prj-common-globalservice-legacy.js' // 其他用service |
| 143 | ], | 145 | ], |
| 144 | dest: 'module/common/prj-common-globalservice.js' | 146 | dest: 'module/common/prj-common-globalservice.js' |
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTable.js
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | * saTimeTable指令,时刻表显示指令,excel表格形式,支持菜单,事件处理。 | 2 | * saTimeTable指令,时刻表显示指令,excel表格形式,支持菜单,事件处理。 |
| 3 | * name(必须),控件的名字 | 3 | * name(必须),控件的名字 |
| 4 | * celldbclickFn,单元格双击事件 | 4 | * celldbclickFn,单元格双击事件 |
| 5 | + * lpbxdbclickFn,路牌班型单元双击事件 | ||
| 5 | * ds,外部数据源 | 6 | * ds,外部数据源 |
| 6 | * | 7 | * |
| 7 | * TODO:优化开发中 | 8 | * TODO:优化开发中 |
| @@ -175,6 +176,24 @@ angular.module('ScheduleApp').factory( | @@ -175,6 +176,24 @@ angular.module('ScheduleApp').factory( | ||
| 175 | return bcInfo; | 176 | return bcInfo; |
| 176 | }, | 177 | }, |
| 177 | 178 | ||
| 179 | + /** | ||
| 180 | + * 创建班型信息。 | ||
| 181 | + * @param bcInfo new BcInfo | ||
| 182 | + */ | ||
| 183 | + createBxInfo: function(bcInfo) { | ||
| 184 | + var bxInfo = {}; | ||
| 185 | + bxInfo.xl = {}; | ||
| 186 | + bxInfo.ttinfo = {}; | ||
| 187 | + bxInfo.lp = {}; | ||
| 188 | + bxInfo.lp.id = bcInfo && bcInfo.lpId; | ||
| 189 | + bxInfo.lp.lpName = bcInfo && bcInfo.lpName; | ||
| 190 | + bxInfo.bxType1 = "_null_"; | ||
| 191 | + bxInfo.bxType2 = "_null_"; | ||
| 192 | + bxInfo.bxPds = "0"; | ||
| 193 | + | ||
| 194 | + return bxInfo; | ||
| 195 | + }, | ||
| 196 | + | ||
| 178 | // TODO: | 197 | // TODO: |
| 179 | initTTInfoDetail: function(formobj, cellinfo, colinfo, xlid, xlname, ttid, ttname) { | 198 | initTTInfoDetail: function(formobj, cellinfo, colinfo, xlid, xlname, ttid, ttname) { |
| 180 | formobj.xl = {}; | 199 | formobj.xl = {}; |
| @@ -216,7 +235,8 @@ angular.module('ScheduleApp').directive( | @@ -216,7 +235,8 @@ angular.module('ScheduleApp').directive( | ||
| 216 | scope: { // 独立作用域 | 235 | scope: { // 独立作用域 |
| 217 | // 注意:数据暂时从外部ngModel里获取,以后内部自己处理 | 236 | // 注意:数据暂时从外部ngModel里获取,以后内部自己处理 |
| 218 | ds: "=ngModel", | 237 | ds: "=ngModel", |
| 219 | - celldbclickFn: "&celldbclick" | 238 | + celldbclickFn: "&celldbclick", |
| 239 | + lpbxdbclickFn: "&lpbxdbclick" | ||
| 220 | 240 | ||
| 221 | // TODO: | 241 | // TODO: |
| 222 | 242 | ||
| @@ -293,6 +313,9 @@ angular.module('ScheduleApp').directive( | @@ -293,6 +313,9 @@ angular.module('ScheduleApp').directive( | ||
| 293 | } | 313 | } |
| 294 | } | 314 | } |
| 295 | }; | 315 | }; |
| 316 | + scope[ctrlAs].$$bx_cell_dbclick = function(rowindex) { | ||
| 317 | + scope[ctrlAs].lpbxdbclickFn()(rowindex); | ||
| 318 | + }; | ||
| 296 | 319 | ||
| 297 | // ------------------- 监控function ------------------// | 320 | // ------------------- 监控function ------------------// |
| 298 | // 监控明细数据,生成表头的tooltip | 321 | // 监控明细数据,生成表头的tooltip |
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTableTemplate.html
| @@ -312,12 +312,23 @@ | @@ -312,12 +312,23 @@ | ||
| 312 | 312 | ||
| 313 | <div class="tt_table_head" style="z-index: 120; top: 0;"> | 313 | <div class="tt_table_head" style="z-index: 120; top: 0;"> |
| 314 | <dl style="height: 36px; border-bottom: 2px solid #96b9d7;"> | 314 | <dl style="height: 36px; border-bottom: 2px solid #96b9d7;"> |
| 315 | - <dt style="width: 50px;"> | 315 | + <dt style="width: 50px; text-align: center;"> |
| 316 | 序号 | 316 | 序号 |
| 317 | </dt> | 317 | </dt> |
| 318 | + | ||
| 318 | <dt style="width: 55px; border-right: 2px solid #96b9d7;"> | 319 | <dt style="width: 55px; border-right: 2px solid #96b9d7;"> |
| 319 | 路牌 | 320 | 路牌 |
| 320 | </dt> | 321 | </dt> |
| 322 | + | ||
| 323 | + <dt style="width: 50px;"> | ||
| 324 | + 班型1 | ||
| 325 | + </dt> | ||
| 326 | + <dt style="width: 50px;"> | ||
| 327 | + 班型2 | ||
| 328 | + </dt> | ||
| 329 | + <dt style="width: 50px; border-right: 2px solid #96b9d7;"> | ||
| 330 | + 配档数 | ||
| 331 | + </dt> | ||
| 321 | </dl> | 332 | </dl> |
| 322 | </div> | 333 | </div> |
| 323 | 334 | ||
| @@ -327,8 +338,9 @@ | @@ -327,8 +338,9 @@ | ||
| 327 | <dt> | 338 | <dt> |
| 328 | 序号 | 339 | 序号 |
| 329 | </dt> | 340 | </dt> |
| 341 | + | ||
| 330 | <dt ng-repeat="head in $saTimeTableCtrl.ds.detailHeads track by $index"> | 342 | <dt ng-repeat="head in $saTimeTableCtrl.ds.detailHeads track by $index"> |
| 331 | - {{(head != '路牌' && head != '空驶班次/空驶里程' && head != '运营班次/运营里程') ? (head.substr(0, 1) + $index): head}} | 343 | + {{(head != '路牌' && head != '班型1' && head != '班型2' && head != '配档数' && head != '空驶班次/空驶里程' && head != '运营班次/运营里程') ? (head.substr(0, 1) + ($index - 3)): head}} |
| 332 | </dt> | 344 | </dt> |
| 333 | </dl> | 345 | </dl> |
| 334 | </div> | 346 | </div> |
| @@ -336,30 +348,80 @@ | @@ -336,30 +348,80 @@ | ||
| 336 | <div class="tt_table_body" style="z-index: 100; background: white;"> | 348 | <div class="tt_table_body" style="z-index: 100; background: white;"> |
| 337 | <dl ng-repeat="info in $saTimeTableCtrl.ds.detailInfos track by $index" | 349 | <dl ng-repeat="info in $saTimeTableCtrl.ds.detailInfos track by $index" |
| 338 | ng-init="rowIndex = $index"> | 350 | ng-init="rowIndex = $index"> |
| 351 | + | ||
| 339 | <dd style="width: 50px;"> | 352 | <dd style="width: 50px;"> |
| 340 | {{rowIndex + 1}} | 353 | {{rowIndex + 1}} |
| 341 | </dd> | 354 | </dd> |
| 355 | + | ||
| 342 | <dd ng-repeat="cell in info track by $index" | 356 | <dd ng-repeat="cell in info track by $index" |
| 343 | ng-init="colIndex = $index" | 357 | ng-init="colIndex = $index" |
| 344 | - ng-click="$saTimeTableCtrl.$$cell_click(rowIndex, colIndex, cell)" | ||
| 345 | - ng-dblclick="$saTimeTableCtrl.$$cell_dbclick(rowIndex, colIndex, cell)" | 358 | + ng-dblclick="$saTimeTableCtrl.$$bx_cell_dbclick(rowIndex)" |
| 346 | ng-if="$index == 0" style="width: 55px; border-right: 2px solid #96b9d7;"> | 359 | ng-if="$index == 0" style="width: 55px; border-right: 2px solid #96b9d7;"> |
| 347 | {{cell.fcsj}} | 360 | {{cell.fcsj}} |
| 348 | </dd> | 361 | </dd> |
| 349 | 362 | ||
| 363 | + <dd style="width: 50px;" | ||
| 364 | + ng-if="$saTimeTableCtrl.ds.rowBxInfo.length > rowIndex" | ||
| 365 | + ng-dblclick="$saTimeTableCtrl.$$bx_cell_dbclick(rowIndex)"> | ||
| 366 | + {{$saTimeTableCtrl.ds.rowBxInfo[rowIndex].bxType1 | dict:'ScheduleBxType':'未知'}} | ||
| 367 | + </dd> | ||
| 368 | + <dd style="width: 50px;" | ||
| 369 | + ng-if="$saTimeTableCtrl.ds.rowBxInfo.length > rowIndex" | ||
| 370 | + ng-dblclick="$saTimeTableCtrl.$$bx_cell_dbclick(rowIndex)"> | ||
| 371 | + {{$saTimeTableCtrl.ds.rowBxInfo[rowIndex].bxType2 | dict:'ScheduleBxType':'未知'}} | ||
| 372 | + </dd> | ||
| 373 | + <dd style="width: 50px; border-right: 2px solid #96b9d7;" | ||
| 374 | + ng-if="$saTimeTableCtrl.ds.rowBxInfo.length > rowIndex" | ||
| 375 | + ng-dblclick="$saTimeTableCtrl.$$bx_cell_dbclick(rowIndex)"> | ||
| 376 | + {{$saTimeTableCtrl.ds.rowBxInfo[rowIndex].bxPds}} | ||
| 377 | + </dd> | ||
| 378 | + | ||
| 379 | + <dd style="width: 50px;" | ||
| 380 | + ng-if="$saTimeTableCtrl.ds.rowBxInfo.length <= rowIndex" | ||
| 381 | + ng-dblclick="$saTimeTableCtrl.$$bx_cell_dbclick(rowIndex)"> | ||
| 382 | + _null_ | ||
| 383 | + </dd> | ||
| 384 | + <dd style="width: 50px;" | ||
| 385 | + ng-if="$saTimeTableCtrl.ds.rowBxInfo.length <= rowIndex" | ||
| 386 | + ng-dblclick="$saTimeTableCtrl.$$bx_cell_dbclick(rowIndex)"> | ||
| 387 | + _null_ | ||
| 388 | + </dd> | ||
| 389 | + <dd style="width: 50px; border-right: 2px solid #96b9d7;" | ||
| 390 | + ng-if="$saTimeTableCtrl.ds.rowBxInfo.length <= rowIndex" | ||
| 391 | + ng-dblclick="$saTimeTableCtrl.$$bx_cell_dbclick(rowIndex)"> | ||
| 392 | + 0 | ||
| 393 | + </dd> | ||
| 394 | + | ||
| 350 | </dl> | 395 | </dl> |
| 351 | </div> | 396 | </div> |
| 352 | 397 | ||
| 353 | <div class="tt_table_body"> | 398 | <div class="tt_table_body"> |
| 354 | <dl ng-repeat="info in $saTimeTableCtrl.ds.detailInfos track by $index" | 399 | <dl ng-repeat="info in $saTimeTableCtrl.ds.detailInfos track by $index" |
| 355 | ng-init="rowIndex = $index"> | 400 | ng-init="rowIndex = $index"> |
| 401 | + | ||
| 356 | <dd> | 402 | <dd> |
| 357 | {{rowIndex + 1}} | 403 | {{rowIndex + 1}} |
| 358 | </dd> | 404 | </dd> |
| 405 | + | ||
| 406 | + <dd> | ||
| 407 | + 路牌 | ||
| 408 | + </dd> | ||
| 409 | + | ||
| 410 | + <dd style="width: 50px;"> | ||
| 411 | + 班型1 | ||
| 412 | + </dd> | ||
| 413 | + <dd style="width: 50px;"> | ||
| 414 | + 班型2 | ||
| 415 | + </dd> | ||
| 416 | + <dd style="width: 50px; border-right: 2px solid #96b9d7;"> | ||
| 417 | + 配档数 | ||
| 418 | + </dd> | ||
| 419 | + | ||
| 359 | <dd ng-repeat="cell in info track by $index" | 420 | <dd ng-repeat="cell in info track by $index" |
| 360 | ng-init="colIndex = $index" | 421 | ng-init="colIndex = $index" |
| 361 | ng-click="$saTimeTableCtrl.$$cell_click(rowIndex, colIndex, cell)" | 422 | ng-click="$saTimeTableCtrl.$$cell_click(rowIndex, colIndex, cell)" |
| 362 | ng-dblclick="$saTimeTableCtrl.$$cell_dbclick(rowIndex, colIndex, cell)" | 423 | ng-dblclick="$saTimeTableCtrl.$$cell_dbclick(rowIndex, colIndex, cell)" |
| 424 | + ng-if="$index > 0" | ||
| 363 | ng-class="{ | 425 | ng-class="{ |
| 364 | lpName: !cell.ttdid, | 426 | lpName: !cell.ttdid, |
| 365 | error: cell.isValidInfo, | 427 | error: cell.isValidInfo, |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
| @@ -4066,6 +4066,7 @@ angular.module('ScheduleApp').directive('saBcgroup', [ | @@ -4066,6 +4066,7 @@ angular.module('ScheduleApp').directive('saBcgroup', [ | ||
| 4066 | * saTimeTable指令,时刻表显示指令,excel表格形式,支持菜单,事件处理。 | 4066 | * saTimeTable指令,时刻表显示指令,excel表格形式,支持菜单,事件处理。 |
| 4067 | * name(必须),控件的名字 | 4067 | * name(必须),控件的名字 |
| 4068 | * celldbclickFn,单元格双击事件 | 4068 | * celldbclickFn,单元格双击事件 |
| 4069 | + * lpbxdbclickFn,路牌班型单元双击事件 | ||
| 4069 | * ds,外部数据源 | 4070 | * ds,外部数据源 |
| 4070 | * | 4071 | * |
| 4071 | * TODO:优化开发中 | 4072 | * TODO:优化开发中 |
| @@ -4239,6 +4240,24 @@ angular.module('ScheduleApp').factory( | @@ -4239,6 +4240,24 @@ angular.module('ScheduleApp').factory( | ||
| 4239 | return bcInfo; | 4240 | return bcInfo; |
| 4240 | }, | 4241 | }, |
| 4241 | 4242 | ||
| 4243 | + /** | ||
| 4244 | + * 创建班型信息。 | ||
| 4245 | + * @param bcInfo new BcInfo | ||
| 4246 | + */ | ||
| 4247 | + createBxInfo: function(bcInfo) { | ||
| 4248 | + var bxInfo = {}; | ||
| 4249 | + bxInfo.xl = {}; | ||
| 4250 | + bxInfo.ttinfo = {}; | ||
| 4251 | + bxInfo.lp = {}; | ||
| 4252 | + bxInfo.lp.id = bcInfo && bcInfo.lpId; | ||
| 4253 | + bxInfo.lp.lpName = bcInfo && bcInfo.lpName; | ||
| 4254 | + bxInfo.bxType1 = "_null_"; | ||
| 4255 | + bxInfo.bxType2 = "_null_"; | ||
| 4256 | + bxInfo.bxPds = "0"; | ||
| 4257 | + | ||
| 4258 | + return bxInfo; | ||
| 4259 | + }, | ||
| 4260 | + | ||
| 4242 | // TODO: | 4261 | // TODO: |
| 4243 | initTTInfoDetail: function(formobj, cellinfo, colinfo, xlid, xlname, ttid, ttname) { | 4262 | initTTInfoDetail: function(formobj, cellinfo, colinfo, xlid, xlname, ttid, ttname) { |
| 4244 | formobj.xl = {}; | 4263 | formobj.xl = {}; |
| @@ -4280,7 +4299,8 @@ angular.module('ScheduleApp').directive( | @@ -4280,7 +4299,8 @@ angular.module('ScheduleApp').directive( | ||
| 4280 | scope: { // 独立作用域 | 4299 | scope: { // 独立作用域 |
| 4281 | // 注意:数据暂时从外部ngModel里获取,以后内部自己处理 | 4300 | // 注意:数据暂时从外部ngModel里获取,以后内部自己处理 |
| 4282 | ds: "=ngModel", | 4301 | ds: "=ngModel", |
| 4283 | - celldbclickFn: "&celldbclick" | 4302 | + celldbclickFn: "&celldbclick", |
| 4303 | + lpbxdbclickFn: "&lpbxdbclick" | ||
| 4284 | 4304 | ||
| 4285 | // TODO: | 4305 | // TODO: |
| 4286 | 4306 | ||
| @@ -4357,6 +4377,9 @@ angular.module('ScheduleApp').directive( | @@ -4357,6 +4377,9 @@ angular.module('ScheduleApp').directive( | ||
| 4357 | } | 4377 | } |
| 4358 | } | 4378 | } |
| 4359 | }; | 4379 | }; |
| 4380 | + scope[ctrlAs].$$bx_cell_dbclick = function(rowindex) { | ||
| 4381 | + scope[ctrlAs].lpbxdbclickFn()(rowindex); | ||
| 4382 | + }; | ||
| 4360 | 4383 | ||
| 4361 | // ------------------- 监控function ------------------// | 4384 | // ------------------- 监控function ------------------// |
| 4362 | // 监控明细数据,生成表头的tooltip | 4385 | // 监控明细数据,生成表头的tooltip |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
| @@ -829,6 +829,48 @@ angular.module('ScheduleApp').factory( | @@ -829,6 +829,48 @@ angular.module('ScheduleApp').factory( | ||
| 829 | } | 829 | } |
| 830 | } | 830 | } |
| 831 | ), | 831 | ), |
| 832 | + rest_bx: $resource( | ||
| 833 | + '/tibxdc/:id', | ||
| 834 | + {order: 'createDate', direction: 'DESC', id: '@id'}, | ||
| 835 | + { | ||
| 836 | + list: { | ||
| 837 | + method: 'GET', | ||
| 838 | + params: { | ||
| 839 | + page: 0 | ||
| 840 | + }, | ||
| 841 | + transformResponse: function(rs) { | ||
| 842 | + var dst = angular.fromJson(rs); | ||
| 843 | + if (dst.status == 'SUCCESS') { | ||
| 844 | + return dst.data; | ||
| 845 | + } else { | ||
| 846 | + return dst; // 业务错误留给控制器处理 | ||
| 847 | + } | ||
| 848 | + } | ||
| 849 | + }, | ||
| 850 | + get: { | ||
| 851 | + method: 'GET', | ||
| 852 | + transformResponse: function(rs) { | ||
| 853 | + var dst = angular.fromJson(rs); | ||
| 854 | + if (dst.status == 'SUCCESS') { | ||
| 855 | + return dst.data; | ||
| 856 | + } else { | ||
| 857 | + return dst; // 业务错误留给控制器处理 | ||
| 858 | + } | ||
| 859 | + } | ||
| 860 | + }, | ||
| 861 | + save: { | ||
| 862 | + method: 'POST', | ||
| 863 | + transformResponse: function(rs) { | ||
| 864 | + var dst = angular.fromJson(rs); | ||
| 865 | + if (dst.status == 'SUCCESS') { | ||
| 866 | + return dst.data; | ||
| 867 | + } else { | ||
| 868 | + return dst; // 业务错误留给控制器处理 | ||
| 869 | + } | ||
| 870 | + } | ||
| 871 | + } | ||
| 872 | + } | ||
| 873 | + ), | ||
| 832 | import: $resource( | 874 | import: $resource( |
| 833 | '/tidc/importFile', | 875 | '/tidc/importFile', |
| 834 | {}, | 876 | {}, |
| @@ -899,6 +941,50 @@ angular.module('ScheduleApp').factory( | @@ -899,6 +941,50 @@ angular.module('ScheduleApp').factory( | ||
| 899 | 941 | ||
| 900 | ] | 942 | ] |
| 901 | ); | 943 | ); |
| 944 | +// 时刻表日志管理service | ||
| 945 | +angular.module('ScheduleApp').factory( | ||
| 946 | + 'TimetableLogManageService_g', | ||
| 947 | + [ | ||
| 948 | + '$resource', | ||
| 949 | + function($resource) { | ||
| 950 | + return { | ||
| 951 | + rest: $resource( | ||
| 952 | + '/s_log/:id', | ||
| 953 | + {order: 'opEndTime', direction: 'DESC', id: '@id'}, | ||
| 954 | + { | ||
| 955 | + list: { | ||
| 956 | + method: 'GET', | ||
| 957 | + params: { | ||
| 958 | + page: 0 | ||
| 959 | + }, | ||
| 960 | + transformResponse: function(rs) { | ||
| 961 | + var dst = angular.fromJson(rs); | ||
| 962 | + if (dst.status == 'SUCCESS') { | ||
| 963 | + return dst.data; | ||
| 964 | + } else { | ||
| 965 | + return dst; // 业务错误留给控制器处理 | ||
| 966 | + } | ||
| 967 | + } | ||
| 968 | + }, | ||
| 969 | + get: { | ||
| 970 | + method: 'GET', | ||
| 971 | + transformResponse: function(rs) { | ||
| 972 | + var dst = angular.fromJson(rs); | ||
| 973 | + if (dst.status == 'SUCCESS') { | ||
| 974 | + return dst.data; | ||
| 975 | + } else { | ||
| 976 | + return dst; | ||
| 977 | + } | ||
| 978 | + } | ||
| 979 | + } | ||
| 980 | + } | ||
| 981 | + ) | ||
| 982 | + | ||
| 983 | + | ||
| 984 | + }; | ||
| 985 | + } | ||
| 986 | + ] | ||
| 987 | +); | ||
| 902 | // 项目通用的全局service服务,供不同的controller使用,自定义指令不使用 | 988 | // 项目通用的全局service服务,供不同的controller使用,自定义指令不使用 |
| 903 | 989 | ||
| 904 | // 文件下载服务 | 990 | // 文件下载服务 |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
| @@ -1224,6 +1224,25 @@ ScheduleApp.config([ | @@ -1224,6 +1224,25 @@ ScheduleApp.config([ | ||
| 1224 | }] | 1224 | }] |
| 1225 | } | 1225 | } |
| 1226 | }) | 1226 | }) |
| 1227 | + .state("ttInfoDetailManage_bx_detail_edit", { // 时刻表详细信息班型单元格编辑 | ||
| 1228 | + url: '/ttInfoDetailManage_bx_detail_edit/:xlid/:ttid/:xlname/:ttname/:rowindex/:lineversion', | ||
| 1229 | + views: { | ||
| 1230 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-bx-detail.html'} | ||
| 1231 | + }, | ||
| 1232 | + resolve: { | ||
| 1233 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 1234 | + return $ocLazyLoad.load({ | ||
| 1235 | + name: 'ttInfoDetailManage_bx_detail_edit_module', | ||
| 1236 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 1237 | + files: [ | ||
| 1238 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 1239 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 1240 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js" | ||
| 1241 | + ] | ||
| 1242 | + }); | ||
| 1243 | + }] | ||
| 1244 | + } | ||
| 1245 | + }) | ||
| 1227 | .state("ttInfoDetailManage_detail_edit", { // 时刻表详细信息单元格编辑 | 1246 | .state("ttInfoDetailManage_detail_edit", { // 时刻表详细信息单元格编辑 |
| 1228 | url: '/ttInfoDetailManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname/:rowindex/:colindex/:lineversion', | 1247 | url: '/ttInfoDetailManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname/:rowindex/:colindex/:lineversion', |
| 1229 | views: { | 1248 | views: { |
| @@ -1382,4 +1401,62 @@ ScheduleApp.config([ | @@ -1382,4 +1401,62 @@ ScheduleApp.config([ | ||
| 1382 | 1401 | ||
| 1383 | 1402 | ||
| 1384 | } | 1403 | } |
| 1404 | +]); | ||
| 1405 | +// ui route 配置 | ||
| 1406 | + | ||
| 1407 | +/** 日志管理配置route */ | ||
| 1408 | +ScheduleApp.config([ | ||
| 1409 | + '$stateProvider', | ||
| 1410 | + function($stateProvider) { | ||
| 1411 | + $stateProvider | ||
| 1412 | + .state('logManage', { // index页面 | ||
| 1413 | + url: '/logManage', | ||
| 1414 | + views: { | ||
| 1415 | + "": { | ||
| 1416 | + templateUrl: 'pages/scheduleApp/module/sys/logManage/index.html' | ||
| 1417 | + }, | ||
| 1418 | + "logManage_list@logManage": { | ||
| 1419 | + templateUrl: 'pages/scheduleApp/module/sys/logManage/list.html' | ||
| 1420 | + } | ||
| 1421 | + }, | ||
| 1422 | + | ||
| 1423 | + resolve: { | ||
| 1424 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 1425 | + return $ocLazyLoad.load({ | ||
| 1426 | + name: 'logManage_module', | ||
| 1427 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 1428 | + files: [ | ||
| 1429 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 1430 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 1431 | + "pages/scheduleApp/module/sys/logManage/module.js" | ||
| 1432 | + ] | ||
| 1433 | + }); | ||
| 1434 | + }] | ||
| 1435 | + } | ||
| 1436 | + }) | ||
| 1437 | + .state('logManage_detail', { // detail.html页面 | ||
| 1438 | + url: 'logManage_detail/:id', | ||
| 1439 | + views: { | ||
| 1440 | + "": {templateUrl: 'pages/scheduleApp/module/sys/logManage/detail.html'} | ||
| 1441 | + }, | ||
| 1442 | + resolve: { | ||
| 1443 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 1444 | + return $ocLazyLoad.load({ | ||
| 1445 | + name: 'logManage_detail_module', | ||
| 1446 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 1447 | + files: [ | ||
| 1448 | + "pages/scheduleApp/module/sys/logManage/module.js" | ||
| 1449 | + ] | ||
| 1450 | + }); | ||
| 1451 | + }] | ||
| 1452 | + } | ||
| 1453 | + }) | ||
| 1454 | + | ||
| 1455 | + | ||
| 1456 | + | ||
| 1457 | + | ||
| 1458 | + | ||
| 1459 | + | ||
| 1460 | + | ||
| 1461 | + } | ||
| 1385 | ]); | 1462 | ]); |
| 1386 | \ No newline at end of file | 1463 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-bx-detail.html
0 → 100644
| 1 | +<div ng-controller="TimeTableBxDetailManageFormCtrl_old 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.title2"></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 | + <div class="form-group has-success has-feedback"> | ||
| 48 | + <label class="col-md-2 control-label">线路*:</label> | ||
| 49 | + <div class="col-md-3"> | ||
| 50 | + <input type="text" class="form-control" name="xl" | ||
| 51 | + ng-model="ctrl.xlname" | ||
| 52 | + readonly required/> | ||
| 53 | + </div> | ||
| 54 | + <!-- 隐藏块,显示验证信息 --> | ||
| 55 | + <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required"> | ||
| 56 | + 线路必须存在 | ||
| 57 | + </div> | ||
| 58 | + </div> | ||
| 59 | + | ||
| 60 | + <div class="form-group has-success has-feedback"> | ||
| 61 | + <label class="col-md-2 control-label">时刻表名称*:</label> | ||
| 62 | + <div class="col-md-3"> | ||
| 63 | + <input type="text" class="form-control" name="ttinfo" | ||
| 64 | + ng-model="ctrl.ttname" | ||
| 65 | + readonly required/> | ||
| 66 | + </div> | ||
| 67 | + <!-- 隐藏块,显示验证信息 --> | ||
| 68 | + <div class="alert alert-danger well-sm" ng-show="myForm.ttinfo.$error.required"> | ||
| 69 | + 时刻表必须存在 | ||
| 70 | + </div> | ||
| 71 | + </div> | ||
| 72 | + | ||
| 73 | + <div class="form-group has-success has-feedback"> | ||
| 74 | + <label class="col-md-2 control-label">路牌*:</label> | ||
| 75 | + <div class="col-md-3"> | ||
| 76 | + <input type="text" class="form-control" name="lp" | ||
| 77 | + ng-model="ctrl.bxInfo.lp.lpName" | ||
| 78 | + readonly required/> | ||
| 79 | + </div> | ||
| 80 | + <!-- 隐藏块,显示验证信息 --> | ||
| 81 | + <div class="alert alert-danger well-sm" ng-show="myForm.lp.$error.required"> | ||
| 82 | + 路牌必须存在 | ||
| 83 | + </div> | ||
| 84 | + </div> | ||
| 85 | + | ||
| 86 | + <div class="form-group has-success has-feedback"> | ||
| 87 | + <label class="col-md-2 control-label">班型1*:</label> | ||
| 88 | + <div class="col-md-3"> | ||
| 89 | + <sa-Select5 name="bxType1" | ||
| 90 | + model="ctrl.bxInfo" | ||
| 91 | + cmaps="{'bxType1': 'code'}" | ||
| 92 | + dcname="bxType1" | ||
| 93 | + icname="code" | ||
| 94 | + dsparams="{{ {type: 'dic', param: 'ScheduleBxType' } | json }}" | ||
| 95 | + iterobjname="item" | ||
| 96 | + iterobjexp="item.name" | ||
| 97 | + searchph="请选择班型类型..." | ||
| 98 | + searchexp="this.name" | ||
| 99 | + required | ||
| 100 | + > | ||
| 101 | + </sa-Select5> | ||
| 102 | + </div> | ||
| 103 | + <!-- 隐藏块,显示验证信息 --> | ||
| 104 | + <div class="alert alert-danger well-sm" ng-show="myForm.bxType1.$error.required"> | ||
| 105 | + 班型类型必须选择 | ||
| 106 | + </div> | ||
| 107 | + | ||
| 108 | + </div> | ||
| 109 | + | ||
| 110 | + <div class="form-group has-success has-feedback"> | ||
| 111 | + <label class="col-md-2 control-label">班型2*:</label> | ||
| 112 | + <div class="col-md-3"> | ||
| 113 | + <sa-Select5 name="bxType2" | ||
| 114 | + model="ctrl.bxInfo" | ||
| 115 | + cmaps="{'bxType2': 'code'}" | ||
| 116 | + dcname="bxType2" | ||
| 117 | + icname="code" | ||
| 118 | + dsparams="{{ {type: 'dic', param: 'ScheduleBxType' } | json }}" | ||
| 119 | + iterobjname="item" | ||
| 120 | + iterobjexp="item.name" | ||
| 121 | + searchph="请选择班型类型..." | ||
| 122 | + searchexp="this.name" | ||
| 123 | + required | ||
| 124 | + > | ||
| 125 | + </sa-Select5> | ||
| 126 | + </div> | ||
| 127 | + <!-- 隐藏块,显示验证信息 --> | ||
| 128 | + <div class="alert alert-danger well-sm" ng-show="myForm.bxType2.$error.required"> | ||
| 129 | + 班型类型必须选择 | ||
| 130 | + </div> | ||
| 131 | + | ||
| 132 | + </div> | ||
| 133 | + | ||
| 134 | + <div class="form-group"> | ||
| 135 | + <label class="col-md-2 control-label">配档数*:</label> | ||
| 136 | + <div class="col-md-3"> | ||
| 137 | + <input type="text" class="form-control" name="bxPds" | ||
| 138 | + ng-model="ctrl.bxInfo.bxPds" required | ||
| 139 | + /> | ||
| 140 | + </div> | ||
| 141 | + <!-- 隐藏块,显示验证信息 --> | ||
| 142 | + <div class="alert alert-danger well-sm" ng-show="myForm.bxPds.$error.required"> | ||
| 143 | + 人员配档数必须填写 | ||
| 144 | + </div> | ||
| 145 | + | ||
| 146 | + </div> | ||
| 147 | + | ||
| 148 | + </div> | ||
| 149 | + | ||
| 150 | + <div class="form-actions"> | ||
| 151 | + <div class="row"> | ||
| 152 | + <div class="col-md-offset-3 col-md-4"> | ||
| 153 | + <button type="submit" class="btn green" | ||
| 154 | + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button> | ||
| 155 | + <a type="button" class="btn default" | ||
| 156 | + 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> | ||
| 157 | + </div> | ||
| 158 | + </div> | ||
| 159 | + </div> | ||
| 160 | + | ||
| 161 | + </form> | ||
| 162 | + | ||
| 163 | + </div> | ||
| 164 | + | ||
| 165 | + | ||
| 166 | + </div> | ||
| 167 | + | ||
| 168 | +</div> | ||
| 0 | \ No newline at end of file | 169 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail.html
| @@ -160,8 +160,8 @@ | @@ -160,8 +160,8 @@ | ||
| 160 | </div> | 160 | </div> |
| 161 | 161 | ||
| 162 | </div> | 162 | </div> |
| 163 | - <div class="form-group"> | ||
| 164 | - <label class="col-md-2 control-label">计划里程:</label> | 163 | + <div class="form-group has-success has-feedback"> |
| 164 | + <label class="col-md-2 control-label">计划里程*:</label> | ||
| 165 | <div class="col-md-3"> | 165 | <div class="col-md-3"> |
| 166 | <input type="text" class="form-control" name="jhlc" | 166 | <input type="text" class="form-control" name="jhlc" |
| 167 | ng-model="ctrl.TimeTableDetailForSave.jhlc" required ng-pattern="ctrl.float_regex" | 167 | ng-model="ctrl.TimeTableDetailForSave.jhlc" required ng-pattern="ctrl.float_regex" |
| @@ -176,8 +176,8 @@ | @@ -176,8 +176,8 @@ | ||
| 176 | </div> | 176 | </div> |
| 177 | 177 | ||
| 178 | </div> | 178 | </div> |
| 179 | - <div class="form-group"> | ||
| 180 | - <label class="col-md-2 control-label">班次历时:</label> | 179 | + <div class="form-group has-success has-feedback"> |
| 180 | + <label class="col-md-2 control-label">班次历时*:</label> | ||
| 181 | <div class="col-md-3"> | 181 | <div class="col-md-3"> |
| 182 | <input type="text" class="form-control" name="bcsj" | 182 | <input type="text" class="form-control" name="bcsj" |
| 183 | ng-model="ctrl.TimeTableDetailForSave.bcsj" required ng-pattern="ctrl.number_regex" | 183 | ng-model="ctrl.TimeTableDetailForSave.bcsj" required ng-pattern="ctrl.number_regex" |
| @@ -192,6 +192,20 @@ | @@ -192,6 +192,20 @@ | ||
| 192 | </div> | 192 | </div> |
| 193 | 193 | ||
| 194 | </div> | 194 | </div> |
| 195 | + | ||
| 196 | + <div class="form-group"> | ||
| 197 | + <label class="col-md-2 control-label">例保时间:</label> | ||
| 198 | + <div class="col-md-3"> | ||
| 199 | + <input type="text" class="form-control" name="lbsj" | ||
| 200 | + ng-model="ctrl.TimeTableDetailForSave.lbsj" ng-pattern="ctrl.number_regex" | ||
| 201 | + /> | ||
| 202 | + </div> | ||
| 203 | + <!-- 隐藏块,显示验证信息 --> | ||
| 204 | + <div class="alert alert-danger well-sm" ng-show="myForm.lbsj.$error.pattern"> | ||
| 205 | + 输入整数 | ||
| 206 | + </div> | ||
| 207 | + </div> | ||
| 208 | + | ||
| 195 | <div class="form-group has-success has-feedback"> | 209 | <div class="form-group has-success has-feedback"> |
| 196 | <label class="col-md-2 control-label">班次类型*:</label> | 210 | <label class="col-md-2 control-label">班次类型*:</label> |
| 197 | <div class="col-md-3"> | 211 | <div class="col-md-3"> |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit3.html
| @@ -139,14 +139,14 @@ | @@ -139,14 +139,14 @@ | ||
| 139 | 139 | ||
| 140 | <!--<div ng-view></div>--> | 140 | <!--<div ng-view></div>--> |
| 141 | <div style="height: {{ctrl.ttHeight}}px;" | 141 | <div style="height: {{ctrl.ttHeight}}px;" |
| 142 | - ng-show="ctrl.currentView.viewId == 1"> | ||
| 143 | - <sa-Timetable name="tt" ng-model="ctrl.editInfo" ng-model-options="{ getterSetter: true }" celldbclick="ctrl.singleEditBcDetail"> | 142 | + ng-if="ctrl.currentView.viewId == 1"> |
| 143 | + <sa-Timetable name="tt" ng-model="ctrl.editInfo" ng-model-options="{ getterSetter: true }" celldbclick="ctrl.singleEditBcDetail" lpbxdbclick="ctrl.lpbxEditDetail"> | ||
| 144 | 144 | ||
| 145 | </sa-Timetable> | 145 | </sa-Timetable> |
| 146 | </div> | 146 | </div> |
| 147 | 147 | ||
| 148 | <div style="height: {{ctrl.ttHeight}}px;" | 148 | <div style="height: {{ctrl.ttHeight}}px;" |
| 149 | - ng-show="ctrl.currentView.viewId == 2"> | 149 | + ng-if="ctrl.currentView.viewId == 2"> |
| 150 | <sa-Timetable2 name="tt2" ng-model="ctrl.pvInfo" ng-model-options="{ getterSetter: true }" > | 150 | <sa-Timetable2 name="tt2" ng-model="ctrl.pvInfo" ng-model-options="{ getterSetter: true }" > |
| 151 | 151 | ||
| 152 | </sa-Timetable2> | 152 | </sa-Timetable2> |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/route.js
| @@ -81,6 +81,25 @@ ScheduleApp.config([ | @@ -81,6 +81,25 @@ ScheduleApp.config([ | ||
| 81 | }] | 81 | }] |
| 82 | } | 82 | } |
| 83 | }) | 83 | }) |
| 84 | + .state("ttInfoDetailManage_bx_detail_edit", { // 时刻表详细信息班型单元格编辑 | ||
| 85 | + url: '/ttInfoDetailManage_bx_detail_edit/:xlid/:ttid/:xlname/:ttname/:rowindex/:lineversion', | ||
| 86 | + views: { | ||
| 87 | + "": {templateUrl: 'pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-bx-detail.html'} | ||
| 88 | + }, | ||
| 89 | + resolve: { | ||
| 90 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 91 | + return $ocLazyLoad.load({ | ||
| 92 | + name: 'ttInfoDetailManage_bx_detail_edit_module', | ||
| 93 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 94 | + files: [ | ||
| 95 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 96 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 97 | + "pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js" | ||
| 98 | + ] | ||
| 99 | + }); | ||
| 100 | + }] | ||
| 101 | + } | ||
| 102 | + }) | ||
| 84 | .state("ttInfoDetailManage_detail_edit", { // 时刻表详细信息单元格编辑 | 103 | .state("ttInfoDetailManage_detail_edit", { // 时刻表详细信息单元格编辑 |
| 85 | url: '/ttInfoDetailManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname/:rowindex/:colindex/:lineversion', | 104 | url: '/ttInfoDetailManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname/:rowindex/:colindex/:lineversion', |
| 86 | views: { | 105 | views: { |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js
| @@ -9,7 +9,7 @@ angular.module('ScheduleApp').factory( | @@ -9,7 +9,7 @@ angular.module('ScheduleApp').factory( | ||
| 9 | 'SaTimeTableUtils', | 9 | 'SaTimeTableUtils', |
| 10 | function(service, service2, $state, $q, SaTimeTableUtils) { | 10 | function(service, service2, $state, $q, SaTimeTableUtils) { |
| 11 | 11 | ||
| 12 | - // 查询对象类 | 12 | + // 班次查询对象类 |
| 13 | var queryClass = service.rest; | 13 | var queryClass = service.rest; |
| 14 | 14 | ||
| 15 | // 时刻表信息(编辑视图使用) | 15 | // 时刻表信息(编辑视图使用) |
| @@ -17,6 +17,7 @@ angular.module('ScheduleApp').factory( | @@ -17,6 +17,7 @@ angular.module('ScheduleApp').factory( | ||
| 17 | detailHeads: [], // 时刻表头信息 | 17 | detailHeads: [], // 时刻表头信息 |
| 18 | detailInfos: [], // 时刻表明细信息 | 18 | detailInfos: [], // 时刻表明细信息 |
| 19 | columnBcInfo: [], // 每列班次的信息 | 19 | columnBcInfo: [], // 每列班次的信息 |
| 20 | + rowBxInfo: [], // 每行路牌班型相关信息 | ||
| 20 | yydesc: "" // 营运汇总描述 | 21 | yydesc: "" // 营运汇总描述 |
| 21 | }; | 22 | }; |
| 22 | 23 | ||
| @@ -69,6 +70,7 @@ angular.module('ScheduleApp').factory( | @@ -69,6 +70,7 @@ angular.module('ScheduleApp').factory( | ||
| 69 | detailHeads: [], // 时刻表头信息 | 70 | detailHeads: [], // 时刻表头信息 |
| 70 | detailInfos: [], // 时刻表明细信息 | 71 | detailInfos: [], // 时刻表明细信息 |
| 71 | columnBcInfo: [], // 每列班次的信息(保存每列的站点信息) | 72 | columnBcInfo: [], // 每列班次的信息(保存每列的站点信息) |
| 73 | + rowBxInfo: [], // 每行路牌班型相关信息 | ||
| 72 | yydesc: "" // 营运汇总描述 | 74 | yydesc: "" // 营运汇总描述 |
| 73 | }; | 75 | }; |
| 74 | 76 | ||
| @@ -107,6 +109,79 @@ angular.module('ScheduleApp').factory( | @@ -107,6 +109,79 @@ angular.module('ScheduleApp').factory( | ||
| 107 | } | 109 | } |
| 108 | 110 | ||
| 109 | console.log(editInfo.columnBcInfo); | 111 | console.log(editInfo.columnBcInfo); |
| 112 | + | ||
| 113 | + //--------------- 获取班型信息 ----------------// | ||
| 114 | + | ||
| 115 | + // 1、在detailHeads第一个位置后插入(班型1,班型2,配档数)列 | ||
| 116 | + if (editInfo.detailHeads && editInfo.detailHeads.length > 0) { | ||
| 117 | + editInfo.detailHeads.shift(); | ||
| 118 | + editInfo.detailHeads.unshift("路牌", "班型1", "班型2", "配档数"); | ||
| 119 | + } | ||
| 120 | + // 2、构造班型数据(TODO:这里模拟entity dto) | ||
| 121 | + editInfo.rowBxInfo = []; | ||
| 122 | + var olp_index = {}; // key为路牌id,value为rowBxInfo的下标 | ||
| 123 | + // 2-1、从detailInfos中构造初始班型数据(模拟创建TTInfoBxDetailDto) | ||
| 124 | + var bxInfo_temp = {}; | ||
| 125 | + for (i = 0; i < editInfo.detailInfos.length; i++) { | ||
| 126 | + for (j = 0; j < editInfo.detailInfos[i].length; j++) { | ||
| 127 | + bxInfo_temp = SaTimeTableUtils.createBxInfo( | ||
| 128 | + editInfo.detailInfos[i][j]); | ||
| 129 | + if (bxInfo_temp.lp && bxInfo_temp.lp.id) { | ||
| 130 | + // 覆值线路id和时刻表id | ||
| 131 | + bxInfo_temp.xl.id = xlid; | ||
| 132 | + bxInfo_temp.ttinfo.id = ttid; | ||
| 133 | + editInfo.rowBxInfo.push(bxInfo_temp); | ||
| 134 | + | ||
| 135 | + // 路牌索引 | ||
| 136 | + olp_index[bxInfo_temp.lp.id] = i; | ||
| 137 | + break; | ||
| 138 | + } | ||
| 139 | + } | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + // 2-2:TODO:从后台获取班型数据(TTInfoBxDetailDto格式),并更新editInfo.rowBxInfo中的对应路牌班型值 | ||
| 143 | + var lp_bx_index; | ||
| 144 | + service.rest_bx.list( | ||
| 145 | + {page : 0, size : 1000, "xl.id_eq" : xlid, "ttinfo.id_eq" : ttid}, | ||
| 146 | + function(result) { | ||
| 147 | + if (result && result.content) { | ||
| 148 | + for (i = 0; i < result.content.length; i++) { | ||
| 149 | + bxInfo_temp = result.content[i]; | ||
| 150 | + if (olp_index[bxInfo_temp.lp.id] >= 0) { | ||
| 151 | + lp_bx_index = olp_index[bxInfo_temp.lp.id]; | ||
| 152 | + // assign id | ||
| 153 | + editInfo.rowBxInfo[lp_bx_index].id = bxInfo_temp.id; | ||
| 154 | + // assign班型 | ||
| 155 | + editInfo.rowBxInfo[lp_bx_index].bxType1 = bxInfo_temp.bxType1; | ||
| 156 | + editInfo.rowBxInfo[lp_bx_index].bxType2 = bxInfo_temp.bxType2; | ||
| 157 | + // assign配挡数 | ||
| 158 | + editInfo.rowBxInfo[lp_bx_index].bxPds = bxInfo_temp.bxPds; | ||
| 159 | + // assign创建人时间 | ||
| 160 | + editInfo.rowBxInfo[lp_bx_index].createBy = bxInfo_temp.createBy; | ||
| 161 | + editInfo.rowBxInfo[lp_bx_index].createDate = bxInfo_temp.createDate; | ||
| 162 | + } | ||
| 163 | + } | ||
| 164 | + } | ||
| 165 | + }); | ||
| 166 | + | ||
| 167 | + | ||
| 168 | + // if (editInfo.detailInfos && editInfo.detailInfos.length > 0) { | ||
| 169 | + // for (var i = 0; i < editInfo.detailInfos.length; i++) { | ||
| 170 | + // editInfo.rowBxInfo.push( | ||
| 171 | + // { | ||
| 172 | + // id: 1, | ||
| 173 | + // xl: {id: 10066}, | ||
| 174 | + // lineVersion: 0, | ||
| 175 | + // ttinfo: {id: 855}, | ||
| 176 | + // lp: {id: 1438, lpName: "1"}, | ||
| 177 | + // "bxType1" : "bx1", | ||
| 178 | + // "bxType2" : "bx2", | ||
| 179 | + // "bxPds" : "pds" | ||
| 180 | + // } | ||
| 181 | + // ); | ||
| 182 | + // } | ||
| 183 | + // } | ||
| 184 | + | ||
| 110 | } else { | 185 | } else { |
| 111 | alert(result.msg); | 186 | alert(result.msg); |
| 112 | } | 187 | } |
| @@ -251,6 +326,16 @@ angular.module('ScheduleApp').factory( | @@ -251,6 +326,16 @@ angular.module('ScheduleApp').factory( | ||
| 251 | param.lineId = lineId; | 326 | param.lineId = lineId; |
| 252 | param.version = version; | 327 | param.version = version; |
| 253 | return service2.versiondesc.do(param).$promise; | 328 | return service2.versiondesc.do(param).$promise; |
| 329 | + }, | ||
| 330 | + | ||
| 331 | + /** | ||
| 332 | + * 更新班型信息。 | ||
| 333 | + * @param lineId | ||
| 334 | + * @param version | ||
| 335 | + * @returns {*|Function|promise|n} | ||
| 336 | + */ | ||
| 337 | + updateBXInfo: function(bxInfo) { | ||
| 338 | + return service.rest_bx.save(bxInfo).$promise; | ||
| 254 | } | 339 | } |
| 255 | 340 | ||
| 256 | }; | 341 | }; |
| @@ -406,6 +491,23 @@ angular.module('ScheduleApp').controller( | @@ -406,6 +491,23 @@ angular.module('ScheduleApp').controller( | ||
| 406 | } | 491 | } |
| 407 | ); | 492 | ); |
| 408 | }; | 493 | }; |
| 494 | + /** | ||
| 495 | + * 路牌行点击编辑明细。 | ||
| 496 | + * @param rowIndex | ||
| 497 | + */ | ||
| 498 | + self.lpbxEditDetail = function(rowIndex) { | ||
| 499 | + $state.go('ttInfoDetailManage_bx_detail_edit', | ||
| 500 | + { | ||
| 501 | + xlid: self.xlid, | ||
| 502 | + ttid: self.ttid, | ||
| 503 | + xlname: self.xlname, | ||
| 504 | + ttname: self.ttname, | ||
| 505 | + rowindex: rowIndex, | ||
| 506 | + lineversion: self.lineversion | ||
| 507 | + } | ||
| 508 | + ); | ||
| 509 | + | ||
| 510 | + }; | ||
| 409 | 511 | ||
| 410 | // 批量修改 | 512 | // 批量修改 |
| 411 | self.editInfos = function() { | 513 | self.editInfos = function() { |
| @@ -539,6 +641,62 @@ angular.module('ScheduleApp').controller( | @@ -539,6 +641,62 @@ angular.module('ScheduleApp').controller( | ||
| 539 | ] | 641 | ] |
| 540 | ); | 642 | ); |
| 541 | 643 | ||
| 644 | +// edit-bx-detail.html 班型信息修改页面 | ||
| 645 | +angular.module('ScheduleApp').controller( | ||
| 646 | + 'TimeTableBxDetailManageFormCtrl_old', | ||
| 647 | + [ | ||
| 648 | + 'TimeTableDetailManageService_old', | ||
| 649 | + '$stateParams', | ||
| 650 | + '$state', | ||
| 651 | + function(service, $stateParams, $state) { | ||
| 652 | + var self = this; | ||
| 653 | + | ||
| 654 | + // 获取传过来的id,有的话就是修改,获取一遍数据 | ||
| 655 | + self.xlid = $stateParams.xlid; // 获取传过来的线路id | ||
| 656 | + self.ttid = $stateParams.ttid; // 获取传过来的时刻表id | ||
| 657 | + self.xlname = $stateParams.xlname; // 获取传过来的线路名字 | ||
| 658 | + self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字 | ||
| 659 | + self.rowindex = $stateParams.rowindex; // 修改的第几行 | ||
| 660 | + self.lineversion = $stateParams.lineversion; // 线路版本 | ||
| 661 | + | ||
| 662 | + self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息"; | ||
| 663 | + self.title_tip = "版本加载中..."; | ||
| 664 | + service.versiondesc(self.xlid, self.lineversion).then( | ||
| 665 | + function(result) { | ||
| 666 | + self.title_tip = "线路版本(" + result.desc + ")"; | ||
| 667 | + } | ||
| 668 | + ); | ||
| 669 | + | ||
| 670 | + // 获取班型信息 | ||
| 671 | + self.bxInfo = {}; | ||
| 672 | + if (service.getEditInfo().rowBxInfo && service.getEditInfo().rowBxInfo.length > self.rowindex) { | ||
| 673 | + self.bxInfo = service.getEditInfo().rowBxInfo[self.rowindex]; | ||
| 674 | + self.title2 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息"; | ||
| 675 | + self.title2 += "->路牌" + self.bxInfo.lp.lpName; | ||
| 676 | + self.title2 += "->班型信息"; | ||
| 677 | + } | ||
| 678 | + // 更新班型信息 | ||
| 679 | + self.submit = function() { | ||
| 680 | + // assign线路版本 | ||
| 681 | + self.bxInfo.lineVersion = self.lineversion; | ||
| 682 | + service.updateBXInfo(self.bxInfo).then( | ||
| 683 | + function(result) { | ||
| 684 | + // 跳转 | ||
| 685 | + $state.go("ttInfoDetailManage_edit3", { | ||
| 686 | + xlid: self.xlid, | ||
| 687 | + ttid: self.ttid, | ||
| 688 | + xlname: self.xlname, | ||
| 689 | + ttname: self.ttname, | ||
| 690 | + lineversion: self.lineversion | ||
| 691 | + }); | ||
| 692 | + } | ||
| 693 | + ); | ||
| 694 | + }; | ||
| 695 | + | ||
| 696 | + } | ||
| 697 | + ] | ||
| 698 | +); | ||
| 699 | + | ||
| 542 | // edit-detail.html 具体班次明细修改页面 | 700 | // edit-detail.html 具体班次明细修改页面 |
| 543 | angular.module('ScheduleApp').controller( | 701 | angular.module('ScheduleApp').controller( |
| 544 | 'TimeTableDetailManageFormCtrl_old', | 702 | 'TimeTableDetailManageFormCtrl_old', |
| @@ -661,7 +819,7 @@ angular.module('ScheduleApp').controller( | @@ -661,7 +819,7 @@ angular.module('ScheduleApp').controller( | ||
| 661 | ] | 819 | ] |
| 662 | ); | 820 | ); |
| 663 | 821 | ||
| 664 | -// edit-detail2.html 具体班次明细修改页面 | 822 | +// edit-detail2.html 具体班次明细修改页面(批量修改) |
| 665 | angular.module('ScheduleApp').controller( | 823 | angular.module('ScheduleApp').controller( |
| 666 | 'TimeTableDetailManageFormCtrl_old2', | 824 | 'TimeTableDetailManageFormCtrl_old2', |
| 667 | [ | 825 | [ |
| @@ -810,7 +968,7 @@ angular.module('ScheduleApp').controller( | @@ -810,7 +968,7 @@ angular.module('ScheduleApp').controller( | ||
| 810 | ] | 968 | ] |
| 811 | ); | 969 | ); |
| 812 | 970 | ||
| 813 | -// edit-mulselect.html 班次批量选择页面 | 971 | +// edit-mulselect.html 班次批量选择页面(批量选择) |
| 814 | angular.module('ScheduleApp').controller( | 972 | angular.module('ScheduleApp').controller( |
| 815 | 'TimeTableDetailManageFormCtrl_mulselect', | 973 | 'TimeTableDetailManageFormCtrl_mulselect', |
| 816 | [ | 974 | [ |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/service.js
| @@ -146,6 +146,48 @@ angular.module('ScheduleApp').factory( | @@ -146,6 +146,48 @@ angular.module('ScheduleApp').factory( | ||
| 146 | } | 146 | } |
| 147 | } | 147 | } |
| 148 | ), | 148 | ), |
| 149 | + rest_bx: $resource( | ||
| 150 | + '/tibxdc/:id', | ||
| 151 | + {order: 'createDate', direction: 'DESC', id: '@id'}, | ||
| 152 | + { | ||
| 153 | + list: { | ||
| 154 | + method: 'GET', | ||
| 155 | + params: { | ||
| 156 | + page: 0 | ||
| 157 | + }, | ||
| 158 | + transformResponse: function(rs) { | ||
| 159 | + var dst = angular.fromJson(rs); | ||
| 160 | + if (dst.status == 'SUCCESS') { | ||
| 161 | + return dst.data; | ||
| 162 | + } else { | ||
| 163 | + return dst; // 业务错误留给控制器处理 | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | + }, | ||
| 167 | + get: { | ||
| 168 | + method: 'GET', | ||
| 169 | + transformResponse: function(rs) { | ||
| 170 | + var dst = angular.fromJson(rs); | ||
| 171 | + if (dst.status == 'SUCCESS') { | ||
| 172 | + return dst.data; | ||
| 173 | + } else { | ||
| 174 | + return dst; // 业务错误留给控制器处理 | ||
| 175 | + } | ||
| 176 | + } | ||
| 177 | + }, | ||
| 178 | + save: { | ||
| 179 | + method: 'POST', | ||
| 180 | + transformResponse: function(rs) { | ||
| 181 | + var dst = angular.fromJson(rs); | ||
| 182 | + if (dst.status == 'SUCCESS') { | ||
| 183 | + return dst.data; | ||
| 184 | + } else { | ||
| 185 | + return dst; // 业务错误留给控制器处理 | ||
| 186 | + } | ||
| 187 | + } | ||
| 188 | + } | ||
| 189 | + } | ||
| 190 | + ), | ||
| 149 | import: $resource( | 191 | import: $resource( |
| 150 | '/tidc/importFile', | 192 | '/tidc/importFile', |
| 151 | {}, | 193 | {}, |
src/main/resources/static/pages/scheduleApp/module/sys/logManage/detail.html
0 → 100644
src/main/resources/static/pages/scheduleApp/module/sys/logManage/index.html
0 → 100644
| 1 | +<div class="page-head"> | ||
| 2 | + <div class="page-title"> | ||
| 3 | + <h1>日志管理</h1> | ||
| 4 | + </div> | ||
| 5 | +</div> | ||
| 6 | + | ||
| 7 | +<ul class="page-breadcrumb breadcrumb"> | ||
| 8 | + <li> | ||
| 9 | + <a href="/pages/home.html" data-pjax>首页</a> | ||
| 10 | + <i class="fa fa-circle"></i> | ||
| 11 | + </li> | ||
| 12 | + <li> | ||
| 13 | + <span class="active">运营计划管理</span> | ||
| 14 | + <i class="fa fa-circle"></i> | ||
| 15 | + </li> | ||
| 16 | + <li> | ||
| 17 | + <span class="active">日志管理</span> | ||
| 18 | + </li> | ||
| 19 | +</ul> | ||
| 20 | + | ||
| 21 | +<div class="row"> | ||
| 22 | + <div class="col-md-12" ng-controller="LogManageIndexCtrl as ctrl"> | ||
| 23 | + <style> | ||
| 24 | + .dropdown-menu { | ||
| 25 | + border-color: #32c5d2; | ||
| 26 | + } | ||
| 27 | + .btn-group > .dropdown-menu:before { | ||
| 28 | + border-bottom-color: #32c5d2; | ||
| 29 | + } | ||
| 30 | + </style> | ||
| 31 | + | ||
| 32 | + <div class="portlet light bordered"> | ||
| 33 | + <div class="portlet-title"> | ||
| 34 | + <div class="caption font-dark"> | ||
| 35 | + <i class="fa fa-database font-dark"></i> | ||
| 36 | + <span class="caption-subject bold uppercase">时刻表日志</span> | ||
| 37 | + </div> | ||
| 38 | + </div> | ||
| 39 | + | ||
| 40 | + <div class="portlet-body"> | ||
| 41 | + <div ui-view="logManage_list"></div> | ||
| 42 | + </div> | ||
| 43 | + </div> | ||
| 44 | + </div> | ||
| 45 | +</div> | ||
| 0 | \ No newline at end of file | 46 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/sys/logManage/list.html
0 → 100644
| 1 | +<div ng-controller="LogManageListCtrl as ctrl"> | ||
| 2 | + <div class="fixDiv"> | ||
| 3 | + <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> | ||
| 4 | + <thead> | ||
| 5 | + <tr role="row" class="heading"> | ||
| 6 | + <th style="width: 70px;">序号</th> | ||
| 7 | + <th style="width: 150px;">线路</th> | ||
| 8 | + <th style="width: 180px;">业务操作类型</th> | ||
| 9 | + <th style="width: 220px;">操作人/操作时间/耗时</th> | ||
| 10 | + <th style="width: 420px;">数据对比</th> | ||
| 11 | + <th style="width: 40%">操作</th> | ||
| 12 | + </tr> | ||
| 13 | + <tr role="row" class="filter"> | ||
| 14 | + <td></td> | ||
| 15 | + <td> | ||
| 16 | + <sa-Select5 name="xl" | ||
| 17 | + model="ctrl.searchCondition()" | ||
| 18 | + cmaps="{'qXlId_eq' : 'id'}" | ||
| 19 | + dcname="qXlId_eq" | ||
| 20 | + icname="id" | ||
| 21 | + dsparams="{{ {type: 'ajax', param:{type: 'all', 'destroy_eq': 0}, atype:'xl' } | json }}" | ||
| 22 | + iterobjname="item" | ||
| 23 | + iterobjexp="item.name" | ||
| 24 | + searchph="请输拼音..." | ||
| 25 | + searchexp="this.name" | ||
| 26 | + required > | ||
| 27 | + </sa-Select5> | ||
| 28 | + </td> | ||
| 29 | + <td> | ||
| 30 | + <sa-Select5 name="logType" | ||
| 31 | + model="ctrl.searchCondition()" | ||
| 32 | + cmaps="{'moduleOperatorType_eeq': 'name'}" | ||
| 33 | + dcname="moduleOperatorType_eeq" | ||
| 34 | + icname="name" | ||
| 35 | + dsparams="{{ {type: 'dic', param: 'tt_log_m_o_type' } | json }}" | ||
| 36 | + iterobjname="item" | ||
| 37 | + iterobjexp="item.name" | ||
| 38 | + searchph="请选择..." | ||
| 39 | + searchexp="this.name" | ||
| 40 | + > | ||
| 41 | + </sa-Select5> | ||
| 42 | + </td> | ||
| 43 | + <td></td> | ||
| 44 | + <td></td> | ||
| 45 | + <td> | ||
| 46 | + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" style="margin-right: 0;" | ||
| 47 | + ng-click="ctrl.doPage()"> | ||
| 48 | + <i class="fa fa-search"></i> 搜索</button> | ||
| 49 | + <button class="btn btn-sm red btn-outline filter-cancel" | ||
| 50 | + ng-click="ctrl.reset()"> | ||
| 51 | + <i class="fa fa-times"></i> 重置</button> | ||
| 52 | + </td> | ||
| 53 | + </tr> | ||
| 54 | + | ||
| 55 | + </thead> | ||
| 56 | + <tbody> | ||
| 57 | + <tr ng-repeat="info in ctrl.page()['content']" > | ||
| 58 | + <td> | ||
| 59 | + <div> | ||
| 60 | + <a href="#"> | ||
| 61 | + <i class="fa fa-list-ol" aria-hidden="true"></i> | ||
| 62 | + {{$index + ctrl.page().number * 10 + 1}} | ||
| 63 | + </a> | ||
| 64 | + </div> | ||
| 65 | + </td> | ||
| 66 | + <td> | ||
| 67 | + <div> | ||
| 68 | + <a href="#"> | ||
| 69 | + <span ng-bind="info.qXlName"></span> | ||
| 70 | + </a> | ||
| 71 | + </div> | ||
| 72 | + | ||
| 73 | + </td> | ||
| 74 | + <td> | ||
| 75 | + <span ng-bind="info.moduleOperatorType"></span> | ||
| 76 | + </td> | ||
| 77 | + <td> | ||
| 78 | + <div> | ||
| 79 | + <a href="#"> | ||
| 80 | + <i class="fa fa-user"></i> | ||
| 81 | + <span ng-bind="info.opUserName"></span> | ||
| 82 | + </a> | ||
| 83 | + </div> | ||
| 84 | + <div> | ||
| 85 | + <a href="#" | ||
| 86 | + tooltip-animation="false" | ||
| 87 | + tooltip-placement="top" | ||
| 88 | + uib-tooltip="开始时间:{{info.opStartTime | date: 'yyyy-MM-dd HH:mm:ss' }}" | ||
| 89 | + tooltip-class="headClass"> | ||
| 90 | + 操作时间 | ||
| 91 | + <span ng-bind="(info.opStartTime | date: 'yyyy-MM-dd HH:mm:ss')"></span> | ||
| 92 | + </a> | ||
| 93 | + </div> | ||
| 94 | + <div> | ||
| 95 | + <a href="#"> | ||
| 96 | + <span>{{"耗时:" + (info.opEndTime - info.opStartTime) / 1000 + "秒"}}</span> | ||
| 97 | + </a> | ||
| 98 | + </div> | ||
| 99 | + </td> | ||
| 100 | + <td> | ||
| 101 | + <div ng-if="info.moduleOperatorType=='时刻表明细-新增'"> | ||
| 102 | + <div style="text-align: center;"> | ||
| 103 | + <a href="#" | ||
| 104 | + tooltip-animation="false" | ||
| 105 | + tooltip-placement="top" | ||
| 106 | + uib-tooltip="{{info.obj_after.ttinfo.name}}" | ||
| 107 | + tooltip-class="headClass"> | ||
| 108 | + {{"时刻表:" + info.obj_after.ttinfo.name}} | ||
| 109 | + </a> | ||
| 110 | + </div> | ||
| 111 | + <div style="text-align: center;"> | ||
| 112 | + <div class="col-md-12"> | ||
| 113 | + <h4>新增后数据</h4> | ||
| 114 | + <div> | ||
| 115 | + <a href="#"> | ||
| 116 | + <span>{{"路牌:" + info.obj_after.lp.lpName}}</span> | ||
| 117 | + </a> | ||
| 118 | + </div> | ||
| 119 | + <div> | ||
| 120 | + <a href="#"> | ||
| 121 | + <span>{{"发车顺序号:" + info.obj_after.fcno}}</span> | ||
| 122 | + </a> | ||
| 123 | + </div> | ||
| 124 | + <div> | ||
| 125 | + <a href="#"> | ||
| 126 | + <span>{{"发车时间:" + info.obj_after.fcsj}}</span> | ||
| 127 | + </a> | ||
| 128 | + </div> | ||
| 129 | + </div> | ||
| 130 | + </div> | ||
| 131 | + | ||
| 132 | + </div> | ||
| 133 | + <div ng-if="info.moduleOperatorType=='时刻表明细-删除'"> | ||
| 134 | + <div style="text-align: center;"> | ||
| 135 | + <a href="#" | ||
| 136 | + tooltip-animation="false" | ||
| 137 | + tooltip-placement="top" | ||
| 138 | + uib-tooltip="{{info.obj_after.ttinfo.name}}" | ||
| 139 | + tooltip-class="headClass"> | ||
| 140 | + {{"时刻表:" + info.obj_after.ttinfo.name}} | ||
| 141 | + </a> | ||
| 142 | + </div> | ||
| 143 | + <div style="text-align: center;"> | ||
| 144 | + <div class="col-md-12"> | ||
| 145 | + <h4>删除前数据</h4> | ||
| 146 | + <div> | ||
| 147 | + <a href="#"> | ||
| 148 | + <span>{{"路牌:" + info.obj_before.lp.lpName}}</span> | ||
| 149 | + </a> | ||
| 150 | + </div> | ||
| 151 | + <div> | ||
| 152 | + <a href="#"> | ||
| 153 | + <span>{{"发车顺序号:" + info.obj_before.fcno}}</span> | ||
| 154 | + </a> | ||
| 155 | + </div> | ||
| 156 | + <div> | ||
| 157 | + <a href="#"> | ||
| 158 | + <span>{{"发车时间:" + info.obj_before.fcsj}}</span> | ||
| 159 | + </a> | ||
| 160 | + </div> | ||
| 161 | + </div> | ||
| 162 | + </div> | ||
| 163 | + | ||
| 164 | + </div> | ||
| 165 | + <div ng-if="info.moduleOperatorType=='时刻表明细-修改'" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | ||
| 166 | + <div style="text-align: center;"> | ||
| 167 | + <a href="#" | ||
| 168 | + tooltip-animation="false" | ||
| 169 | + tooltip-placement="top" | ||
| 170 | + uib-tooltip="{{info.obj_after.ttinfo.name}}" | ||
| 171 | + tooltip-class="headClass"> | ||
| 172 | + {{"时刻表:" + info.obj_after.ttinfo.name}} | ||
| 173 | + </a> | ||
| 174 | + </div> | ||
| 175 | + <div> | ||
| 176 | + <div class="col-md-6"> | ||
| 177 | + <h4>修改前数据</h4> | ||
| 178 | + <div ng-repeat="diff in info.diff_before" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | ||
| 179 | + <a href="#" | ||
| 180 | + tooltip-animation="false" | ||
| 181 | + tooltip-placement="top" | ||
| 182 | + uib-tooltip="{{diff}}" | ||
| 183 | + tooltip-class="headClass"> | ||
| 184 | + {{diff}} | ||
| 185 | + </a> | ||
| 186 | + </div> | ||
| 187 | + </div> | ||
| 188 | + <div class="col-md-6"> | ||
| 189 | + <h4>修改后数据</h4> | ||
| 190 | + <div ng-repeat="diff in info.diff_after" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | ||
| 191 | + <a href="#" | ||
| 192 | + tooltip-animation="false" | ||
| 193 | + tooltip-placement="top" | ||
| 194 | + uib-tooltip="{{diff}}" | ||
| 195 | + tooltip-class="headClass"> | ||
| 196 | + {{diff}} | ||
| 197 | + </a> | ||
| 198 | + </div> | ||
| 199 | + </div> | ||
| 200 | + </div> | ||
| 201 | + </div> | ||
| 202 | + | ||
| 203 | + <div ng-if="info.moduleOperatorType=='排班计划明细-修改'" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | ||
| 204 | + | ||
| 205 | + <div style="text-align: center;"> | ||
| 206 | + <a href="#"> | ||
| 207 | + {{"排班日期:"}}{{info.obj_after.scheduleDate | date: 'yyyy-MM-dd'}} | ||
| 208 | + {{" 路牌:" + info.obj_after.lpName}} | ||
| 209 | + {{" 发车时间:" + info.obj_after.fcsj}} | ||
| 210 | + </a> | ||
| 211 | + </div> | ||
| 212 | + | ||
| 213 | + <div> | ||
| 214 | + <div class="col-md-6"> | ||
| 215 | + <h4>修改前数据</h4> | ||
| 216 | + <div ng-repeat="diff in info.p_diff_before" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | ||
| 217 | + <a href="#" | ||
| 218 | + tooltip-animation="false" | ||
| 219 | + tooltip-placement="top" | ||
| 220 | + uib-tooltip="{{diff}}" | ||
| 221 | + tooltip-class="headClass"> | ||
| 222 | + {{diff}} | ||
| 223 | + </a> | ||
| 224 | + </div> | ||
| 225 | + </div> | ||
| 226 | + <div class="col-md-6"> | ||
| 227 | + <h4>修改后数据</h4> | ||
| 228 | + <div ng-repeat="diff in info.p_diff_after" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | ||
| 229 | + <a href="#" | ||
| 230 | + tooltip-animation="false" | ||
| 231 | + tooltip-placement="top" | ||
| 232 | + uib-tooltip="{{diff}}" | ||
| 233 | + tooltip-class="headClass"> | ||
| 234 | + {{diff}} | ||
| 235 | + </a> | ||
| 236 | + </div> | ||
| 237 | + </div> | ||
| 238 | + </div> | ||
| 239 | + | ||
| 240 | + </div> | ||
| 241 | + | ||
| 242 | + </td> | ||
| 243 | + <td> | ||
| 244 | + <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>--> | ||
| 245 | + <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> | ||
| 246 | + <a ui-sref="logManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细数据 </a> | ||
| 247 | + </td> | ||
| 248 | + </tr> | ||
| 249 | + </tbody> | ||
| 250 | + </table> | ||
| 251 | + </div> | ||
| 252 | + | ||
| 253 | + <div class="pageBar"> | ||
| 254 | + <div class="pageBarLeft"> | ||
| 255 | + {{'显示从' + ctrl.page()['uiFromRecord'] + '到' + ctrl.page()['uiToRecord'] + ' 共' + ctrl.page()['totalElements'] + '条' + ' 每页显示10条'}} | ||
| 256 | + </div> | ||
| 257 | + | ||
| 258 | + <div class="pageBarRight"> | ||
| 259 | + <uib-pagination total-items="ctrl.page()['totalElements']" | ||
| 260 | + ng-model="ctrl.page()['uiNumber']" | ||
| 261 | + ng-change="ctrl.doPage()" | ||
| 262 | + rotate="false" | ||
| 263 | + max-size="10" | ||
| 264 | + boundary-links="true" | ||
| 265 | + first-text="首页" | ||
| 266 | + previous-text="上一页" | ||
| 267 | + next-text="下一页" | ||
| 268 | + last-text="尾页"> | ||
| 269 | + </uib-pagination> | ||
| 270 | + </div> | ||
| 271 | + </div> | ||
| 272 | + | ||
| 273 | +</div> | ||
| 0 | \ No newline at end of file | 274 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/sys/logManage/module.js
0 → 100644
| 1 | +// 日志管理service,包装外部定义的globalservice,并保存一定的操作状态 | ||
| 2 | +angular.module('ScheduleApp').factory( | ||
| 3 | + 'LogManageService', | ||
| 4 | + [ | ||
| 5 | + 'TimetableLogManageService_g', | ||
| 6 | + 'TTInfoManageService_g', | ||
| 7 | + function(service, tservice) { | ||
| 8 | + // 当前查询的内容条件搜索对象 | ||
| 9 | + var currentSearchCondition = {page: 0}; | ||
| 10 | + // 当前查询返回的信息 | ||
| 11 | + var currentPage = { // 后台spring data返回的格式 | ||
| 12 | + totalElements: 0, | ||
| 13 | + number: 0, // 后台返回的页码,spring返回从0开始 | ||
| 14 | + content: [], | ||
| 15 | + | ||
| 16 | + uiNumber: 1, // 页面绑定的页码 | ||
| 17 | + uiFromRecord: 0, // 页面绑定,当前页第几条记录 | ||
| 18 | + uiToRecord: 0 // 页面绑定,当前页到第几条记录 | ||
| 19 | + }; | ||
| 20 | + | ||
| 21 | + var calcuDiff_internal = function( | ||
| 22 | + info, property, diff_before, diff_after, desc) { | ||
| 23 | + var before_value; | ||
| 24 | + var after_value; | ||
| 25 | + before_value = info.obj_before && info.obj_before[property]; | ||
| 26 | + after_value = info.obj_after && info.obj_after[property]; | ||
| 27 | + if (before_value !== undefined && before_value !== after_value) { | ||
| 28 | + diff_before.push(desc + ":" + (before_value == null ? "" : before_value)); | ||
| 29 | + diff_after.push(desc + ":" + (after_value == null ? "" : after_value)); | ||
| 30 | + } | ||
| 31 | + }; | ||
| 32 | + | ||
| 33 | + var calcuPlanInfoModifyDiff = function(info) { // 计算排班明细修改描述 | ||
| 34 | + var diff_before = []; | ||
| 35 | + var diff_after = []; | ||
| 36 | + var rtn = [diff_before, diff_after]; | ||
| 37 | + | ||
| 38 | + // 车辆 | ||
| 39 | + calcuDiff_internal(info, "clZbh", diff_before, diff_after, "车辆"); | ||
| 40 | + // 驾驶员 | ||
| 41 | + calcuDiff_internal(info, "jName", diff_before, diff_after, "驾驶员"); | ||
| 42 | + // 驾驶员工号 | ||
| 43 | + calcuDiff_internal(info, "jGh", diff_before, diff_after, "驾驶员工号"); | ||
| 44 | + // 售票员 | ||
| 45 | + calcuDiff_internal(info, "sName", diff_before, diff_after, "售票员"); | ||
| 46 | + // 售票员工号 | ||
| 47 | + calcuDiff_internal(info, "sGh", diff_before, diff_after, "售票员工号"); | ||
| 48 | + // 起点站 | ||
| 49 | + calcuDiff_internal(info, "qdzName", diff_before, diff_after, "起点站"); | ||
| 50 | + // 起点站code | ||
| 51 | + calcuDiff_internal(info, "qdzCode", diff_before, diff_after, "起点站code"); | ||
| 52 | + // 终点站 | ||
| 53 | + calcuDiff_internal(info, "zdzName", diff_before, diff_after, "终点站"); | ||
| 54 | + // 终点站code | ||
| 55 | + calcuDiff_internal(info, "zdzCode", diff_before, diff_after, "终点站code"); | ||
| 56 | + | ||
| 57 | + return rtn; | ||
| 58 | + }; | ||
| 59 | + | ||
| 60 | + var calcuTimeTableModifyDiff = function(info) { // 计算时刻表明细修改描述 | ||
| 61 | + var diff_before = []; | ||
| 62 | + var diff_after = []; | ||
| 63 | + var rtn = [diff_before, diff_after]; | ||
| 64 | + // 方向 | ||
| 65 | + calcuDiff_internal(info, "xlDir", diff_before, diff_after, "方向"); | ||
| 66 | + // 起点站名字 | ||
| 67 | + calcuDiff_internal(info, "qdzName", diff_before, diff_after, "起点站"); | ||
| 68 | + // 起点站编码 | ||
| 69 | + calcuDiff_internal(info, "qdzCode", diff_before, diff_after, "起点站code"); | ||
| 70 | + // 终点站名字 | ||
| 71 | + calcuDiff_internal(info, "zdzName", diff_before, diff_after, "终点站"); | ||
| 72 | + // 终点站编码 | ||
| 73 | + calcuDiff_internal(info, "zdzCode", diff_before, diff_after, "终点站code"); | ||
| 74 | + // 发车时间 | ||
| 75 | + calcuDiff_internal(info, "fcsj", diff_before, diff_after, "发车时间"); | ||
| 76 | + // 计划里程 | ||
| 77 | + calcuDiff_internal(info, "jhlc", diff_before, diff_after, "计划里程"); | ||
| 78 | + // 班次历时 | ||
| 79 | + calcuDiff_internal(info, "bcsj", diff_before, diff_after, "班次历时"); | ||
| 80 | + // 例保时间 | ||
| 81 | + calcuDiff_internal(info, "lbsj", diff_before, diff_after, "例保时间"); | ||
| 82 | + // 班次类型 | ||
| 83 | + calcuDiff_internal(info, "bcType", diff_before, diff_after, "班次类型"); | ||
| 84 | + // 是否分班 | ||
| 85 | + calcuDiff_internal(info, "isFB", diff_before, diff_after, "是否分班"); | ||
| 86 | + // 是否停驶 | ||
| 87 | + calcuDiff_internal(info, "isTS", diff_before, diff_after, "是否停驶"); | ||
| 88 | + // 备注 | ||
| 89 | + calcuDiff_internal(info, "remark", diff_before, diff_after, "备注"); | ||
| 90 | + | ||
| 91 | + return rtn; | ||
| 92 | + }; | ||
| 93 | + | ||
| 94 | + // 查询对象类 | ||
| 95 | + var queryClass = service.rest; | ||
| 96 | + | ||
| 97 | + return { | ||
| 98 | + getTimetableLogQueryClass: function() { | ||
| 99 | + return queryClass; | ||
| 100 | + }, | ||
| 101 | + getSearchCondition: function() { | ||
| 102 | + currentSearchCondition.page = currentPage.uiNumber - 1; | ||
| 103 | + | ||
| 104 | + return currentSearchCondition; | ||
| 105 | + }, | ||
| 106 | + getPage: function(page) { | ||
| 107 | + if (page) { | ||
| 108 | + currentPage.totalElements = page.totalElements; | ||
| 109 | + currentPage.number = page.number; | ||
| 110 | + currentPage.content = page.content; | ||
| 111 | + | ||
| 112 | + // 计算当前页开始记录,结束记录 | ||
| 113 | + if (page.numberOfElements && page.numberOfElements > 0) { | ||
| 114 | + currentPage.uiFromRecord = page.number * 10 + 1; | ||
| 115 | + currentPage.uiToRecord = page.number * 10 + page.numberOfElements; | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + // 解析op_before和op_after字符串对象 | ||
| 119 | + angular.forEach(page.content, function(obj) { | ||
| 120 | + obj.obj_before = (!obj.opBeforeJson ? {} : angular.fromJson(obj.opBeforeJson)); | ||
| 121 | + obj.obj_after = (!obj.opAfterJson ? {} : angular.fromJson(obj.opAfterJson)); | ||
| 122 | + }); | ||
| 123 | + | ||
| 124 | + // 计算时刻表明细修改描述 | ||
| 125 | + angular.forEach(page.content, function(obj) { | ||
| 126 | + var diff = calcuTimeTableModifyDiff(obj); | ||
| 127 | + obj.diff_before = diff[0]; | ||
| 128 | + obj.diff_after = diff[1]; | ||
| 129 | + }); | ||
| 130 | + // 计算排班明细修改描述 | ||
| 131 | + angular.forEach(page.content, function(obj) { | ||
| 132 | + var diff = calcuPlanInfoModifyDiff(obj); | ||
| 133 | + obj.p_diff_before = diff[0]; | ||
| 134 | + obj.p_diff_after = diff[1]; | ||
| 135 | + }); | ||
| 136 | + } | ||
| 137 | + return currentPage; | ||
| 138 | + }, | ||
| 139 | + resetStatus: function() { | ||
| 140 | + currentSearchCondition = {page: 0}; | ||
| 141 | + currentPage = { | ||
| 142 | + totalElements: 0, | ||
| 143 | + number: 0, | ||
| 144 | + content: [], | ||
| 145 | + uiNumber: 1, | ||
| 146 | + uiFromRecord: 0, | ||
| 147 | + uiToRecord: 0 | ||
| 148 | + }; | ||
| 149 | + }, | ||
| 150 | + | ||
| 151 | + /** | ||
| 152 | + * 获取线路版本描述。 | ||
| 153 | + * @param lineId | ||
| 154 | + * @param version | ||
| 155 | + * @returns {*|Function|promise|n} | ||
| 156 | + */ | ||
| 157 | + versiondesc: function(lineId, version) { | ||
| 158 | + var param = {}; | ||
| 159 | + param.lineId = lineId; | ||
| 160 | + param.version = version; | ||
| 161 | + return tservice.versiondesc.do(param).$promise; | ||
| 162 | + } | ||
| 163 | + }; | ||
| 164 | + } | ||
| 165 | + ] | ||
| 166 | +); | ||
| 167 | + | ||
| 168 | +// index.html控制器 | ||
| 169 | +angular.module('ScheduleApp').controller( | ||
| 170 | + 'LogManageIndexCtrl', | ||
| 171 | + [ | ||
| 172 | + '$state', | ||
| 173 | + function($state) { | ||
| 174 | + var self = this; | ||
| 175 | + | ||
| 176 | + // TODO: | ||
| 177 | + } | ||
| 178 | + ] | ||
| 179 | +); | ||
| 180 | + | ||
| 181 | +// list.html控制器 | ||
| 182 | +angular.module('ScheduleApp').controller( | ||
| 183 | + 'LogManageListCtrl', | ||
| 184 | + [ | ||
| 185 | + 'LogManageService', | ||
| 186 | + function(service) { | ||
| 187 | + var self = this; | ||
| 188 | + var TimetableLog = service.getTimetableLogQueryClass(); | ||
| 189 | + | ||
| 190 | + self.page = function() { | ||
| 191 | + return service.getPage(); | ||
| 192 | + }; | ||
| 193 | + | ||
| 194 | + self.searchCondition = function() { | ||
| 195 | + return service.getSearchCondition(); | ||
| 196 | + }; | ||
| 197 | + | ||
| 198 | + self.doPage = function() { | ||
| 199 | + var page = TimetableLog.list(self.searchCondition(), function() { | ||
| 200 | + service.getPage(page); | ||
| 201 | + }); | ||
| 202 | + }; | ||
| 203 | + | ||
| 204 | + self.reset = function() { | ||
| 205 | + service.resetStatus(); | ||
| 206 | + var page = TimetableLog.list(self.searchCondition(), function() { | ||
| 207 | + service.getPage(page); | ||
| 208 | + }); | ||
| 209 | + }; | ||
| 210 | + | ||
| 211 | + self.doPage(); | ||
| 212 | + | ||
| 213 | + self.lineVersionTip = "载入中..."; | ||
| 214 | + var currentTTInfoForLineVersion; | ||
| 215 | + self.getLineVersion = function(info) { | ||
| 216 | + var lineVersion; | ||
| 217 | + // 1、时刻表,时刻表明细 | ||
| 218 | + if (info.moduleType == '时刻表明细' || info.moduleType == '时刻表') { | ||
| 219 | + lineVersion = info.obj_after && info.obj_after.lineVersion; | ||
| 220 | + if (!lineVersion) { | ||
| 221 | + lineVersion = info.obj_before && info.obj_before.lineVersion; | ||
| 222 | + } | ||
| 223 | + } | ||
| 224 | + // 2、排班明细 | ||
| 225 | + if (info.moduleType == '排班计划明细') { | ||
| 226 | + lineVersion = info.obj_after && info.obj_after.ttInfo && info.obj_after.ttInfo.lineVersion; | ||
| 227 | + if (!lineVersion) { | ||
| 228 | + lineVersion = info.obj_before && info.obj_before.ttInfo && info.obj_before.ttInfo.lineVersion; | ||
| 229 | + } | ||
| 230 | + } | ||
| 231 | + | ||
| 232 | + return lineVersion; | ||
| 233 | + }; | ||
| 234 | + self.getLineVersionTip = function(info) { | ||
| 235 | + if (currentTTInfoForLineVersion != info) { | ||
| 236 | + service.versiondesc(info.qXlId, self.getLineVersion(info)).then( | ||
| 237 | + function(result) { | ||
| 238 | + self.lineVersionTip = result.desc; | ||
| 239 | + currentTTInfoForLineVersion = info; | ||
| 240 | + } | ||
| 241 | + ); | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + }; | ||
| 245 | + | ||
| 246 | + } | ||
| 247 | + ] | ||
| 248 | +); | ||
| 249 | + | ||
| 250 | +// detail.html控制器 | ||
| 251 | +angular.module('ScheduleApp').controller( | ||
| 252 | + 'LogManageDetailCtrl', | ||
| 253 | + [ | ||
| 254 | + 'LogManageService', | ||
| 255 | + '$stateParams', | ||
| 256 | + function(service, $stateParams) { | ||
| 257 | + var self = this; | ||
| 258 | + var TimetableLog = service.getTimetableLogQueryClass(); | ||
| 259 | + var id = $stateParams.id; | ||
| 260 | + | ||
| 261 | + self.title = ""; | ||
| 262 | + self.timetableManageForDetail = {}; | ||
| 263 | + | ||
| 264 | + TimetableLog.get({id: id}, function(value) { | ||
| 265 | + self.timetableManageForDetail = value; | ||
| 266 | + | ||
| 267 | + // TODO:标题 | ||
| 268 | + self.title = "修改内容比较"; | ||
| 269 | + | ||
| 270 | + }); | ||
| 271 | + } | ||
| 272 | + ] | ||
| 273 | +); | ||
| 274 | + | ||
| 275 | + | ||
| 276 | + | ||
| 277 | + | ||
| 278 | + | ||
| 279 | + | ||
| 280 | + | ||
| 281 | + | ||
| 282 | + | ||
| 283 | + |
src/main/resources/static/pages/scheduleApp/module/sys/logManage/route.js
0 → 100644
| 1 | +// ui route 配置 | ||
| 2 | + | ||
| 3 | +/** 日志管理配置route */ | ||
| 4 | +ScheduleApp.config([ | ||
| 5 | + '$stateProvider', | ||
| 6 | + function($stateProvider) { | ||
| 7 | + $stateProvider | ||
| 8 | + .state('logManage', { // index页面 | ||
| 9 | + url: '/logManage', | ||
| 10 | + views: { | ||
| 11 | + "": { | ||
| 12 | + templateUrl: 'pages/scheduleApp/module/sys/logManage/index.html' | ||
| 13 | + }, | ||
| 14 | + "logManage_list@logManage": { | ||
| 15 | + templateUrl: 'pages/scheduleApp/module/sys/logManage/list.html' | ||
| 16 | + } | ||
| 17 | + }, | ||
| 18 | + | ||
| 19 | + resolve: { | ||
| 20 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 21 | + return $ocLazyLoad.load({ | ||
| 22 | + name: 'logManage_module', | ||
| 23 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 24 | + files: [ | ||
| 25 | + "assets/bower_components/angular-ui-select/dist/select.min.css", | ||
| 26 | + "assets/bower_components/angular-ui-select/dist/select.min.js", | ||
| 27 | + "pages/scheduleApp/module/sys/logManage/module.js" | ||
| 28 | + ] | ||
| 29 | + }); | ||
| 30 | + }] | ||
| 31 | + } | ||
| 32 | + }) | ||
| 33 | + .state('logManage_detail', { // detail.html页面 | ||
| 34 | + url: 'logManage_detail/:id', | ||
| 35 | + views: { | ||
| 36 | + "": {templateUrl: 'pages/scheduleApp/module/sys/logManage/detail.html'} | ||
| 37 | + }, | ||
| 38 | + resolve: { | ||
| 39 | + deps: ['$ocLazyLoad', function($ocLazyLoad) { | ||
| 40 | + return $ocLazyLoad.load({ | ||
| 41 | + name: 'logManage_detail_module', | ||
| 42 | + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置 | ||
| 43 | + files: [ | ||
| 44 | + "pages/scheduleApp/module/sys/logManage/module.js" | ||
| 45 | + ] | ||
| 46 | + }); | ||
| 47 | + }] | ||
| 48 | + } | ||
| 49 | + }) | ||
| 50 | + | ||
| 51 | + | ||
| 52 | + | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + | ||
| 56 | + | ||
| 57 | + } | ||
| 58 | +]); | ||
| 0 | \ No newline at end of file | 59 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/sys/logManage/service.js
0 → 100644
| 1 | +// 时刻表日志管理service | ||
| 2 | +angular.module('ScheduleApp').factory( | ||
| 3 | + 'TimetableLogManageService_g', | ||
| 4 | + [ | ||
| 5 | + '$resource', | ||
| 6 | + function($resource) { | ||
| 7 | + return { | ||
| 8 | + rest: $resource( | ||
| 9 | + '/s_log/:id', | ||
| 10 | + {order: 'opEndTime', direction: 'DESC', id: '@id'}, | ||
| 11 | + { | ||
| 12 | + list: { | ||
| 13 | + method: 'GET', | ||
| 14 | + params: { | ||
| 15 | + page: 0 | ||
| 16 | + }, | ||
| 17 | + transformResponse: function(rs) { | ||
| 18 | + var dst = angular.fromJson(rs); | ||
| 19 | + if (dst.status == 'SUCCESS') { | ||
| 20 | + return dst.data; | ||
| 21 | + } else { | ||
| 22 | + return dst; // 业务错误留给控制器处理 | ||
| 23 | + } | ||
| 24 | + } | ||
| 25 | + }, | ||
| 26 | + get: { | ||
| 27 | + method: 'GET', | ||
| 28 | + transformResponse: function(rs) { | ||
| 29 | + var dst = angular.fromJson(rs); | ||
| 30 | + if (dst.status == 'SUCCESS') { | ||
| 31 | + return dst.data; | ||
| 32 | + } else { | ||
| 33 | + return dst; | ||
| 34 | + } | ||
| 35 | + } | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + ) | ||
| 39 | + | ||
| 40 | + | ||
| 41 | + }; | ||
| 42 | + } | ||
| 43 | + ] | ||
| 44 | +); | ||
| 0 | \ No newline at end of file | 45 | \ No newline at end of file |