Commit feba253d4277730a059ee8a90890c49e4d338c6d
Merge branch 'minhang' of
http://192.168.168.201:8888/panzhaov5/bsth_control into minhang # Conflicts: # src/main/resources/application-dev.properties
Showing
54 changed files
with
2238 additions
and
1108 deletions
Too many changes to show.
To preserve performance only 54 of 621 files are displayed.
pom.xml
| @@ -225,6 +225,12 @@ | @@ -225,6 +225,12 @@ | ||
| 225 | <artifactId>spring-boot-devtools</artifactId> | 225 | <artifactId>spring-boot-devtools</artifactId> |
| 226 | <optional>true</optional> | 226 | <optional>true</optional> |
| 227 | </dependency>--> | 227 | </dependency>--> |
| 228 | + <dependency> | ||
| 229 | + <groupId>com.vividsolutions</groupId> | ||
| 230 | + <artifactId>jts</artifactId> | ||
| 231 | + <version>1.13</version> | ||
| 232 | + </dependency> | ||
| 233 | + | ||
| 228 | </dependencies> | 234 | </dependencies> |
| 229 | 235 | ||
| 230 | <dependencyManagement> | 236 | <dependencyManagement> |
src/main/java/com/bsth/controller/BaseController2.java
| @@ -187,9 +187,11 @@ public class BaseController2<T, ID extends Serializable> { | @@ -187,9 +187,11 @@ public class BaseController2<T, ID extends Serializable> { | ||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | System.out.println(outputfile.getName()); | 189 | System.out.println(outputfile.getName()); |
| 190 | + System.out.println(outputfile.getAbsolutePath()); | ||
| 191 | + | ||
| 190 | String filePath = outputfile.getAbsolutePath(); | 192 | String filePath = outputfile.getAbsolutePath(); |
| 191 | - String fp[] = filePath.split(File.separator); | ||
| 192 | - String fileName = fp[fp.length - 1]; | 193 | +// String fp[] = filePath.split(File.separator); |
| 194 | +// String fileName = fp[fp.length - 1]; | ||
| 193 | 195 | ||
| 194 | // TODO:使用ktr获取导出数据 | 196 | // TODO:使用ktr获取导出数据 |
| 195 | 197 |
src/main/java/com/bsth/controller/gps/GpsController.java
| 1 | package com.bsth.controller.gps; | 1 | package com.bsth.controller.gps; |
| 2 | 2 | ||
| 3 | -import java.util.List; | ||
| 4 | -import java.util.Map; | ||
| 5 | - | ||
| 6 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | -import org.springframework.web.bind.annotation.*; | ||
| 8 | - | ||
| 9 | import com.bsth.data.BasicData; | 3 | import com.bsth.data.BasicData; |
| 10 | import com.bsth.data.gpsdata.GpsEntity; | 4 | import com.bsth.data.gpsdata.GpsEntity; |
| 11 | import com.bsth.data.gpsdata.GpsRealData; | 5 | import com.bsth.data.gpsdata.GpsRealData; |
| 12 | import com.bsth.service.gps.GpsService; | 6 | import com.bsth.service.gps.GpsService; |
| 13 | import com.google.common.base.Splitter; | 7 | import com.google.common.base.Splitter; |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.web.bind.annotation.*; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 12 | +import java.util.Map; | ||
| 14 | 13 | ||
| 15 | @RestController | 14 | @RestController |
| 16 | @RequestMapping("gps") | 15 | @RequestMapping("gps") |
| @@ -70,7 +69,7 @@ public class GpsController { | @@ -70,7 +69,7 @@ public class GpsController { | ||
| 70 | return gpsService.history(nbbmArray, st, et); | 69 | return gpsService.history(nbbmArray, st, et); |
| 71 | } | 70 | } |
| 72 | 71 | ||
| 73 | - /*@RequestMapping(value = "/arrival/ram") | 72 | + /*@RequestMapping(value = "/analyse/ram") |
| 74 | public List<ArrivalInfo> ramData(@RequestParam String nbbm) { | 73 | public List<ArrivalInfo> ramData(@RequestParam String nbbm) { |
| 75 | return ArrivalDataBuffer.allMap.get(nbbm); | 74 | return ArrivalDataBuffer.allMap.get(nbbm); |
| 76 | }*/ | 75 | }*/ |
| @@ -84,4 +83,9 @@ public class GpsController { | @@ -84,4 +83,9 @@ public class GpsController { | ||
| 84 | public Map<String, Object> findBuffAeraByCode(@RequestParam String code,@RequestParam String type){ | 83 | public Map<String, Object> findBuffAeraByCode(@RequestParam String code,@RequestParam String type){ |
| 85 | return gpsService.findBuffAeraByCode(code, type); | 84 | return gpsService.findBuffAeraByCode(code, type); |
| 86 | } | 85 | } |
| 86 | + | ||
| 87 | + @RequestMapping(value = "/findRoadSpeed") | ||
| 88 | + public Map<String, Object> findRoadSpeed(@RequestParam String lineCode){ | ||
| 89 | + return gpsService.findRoadSpeed(lineCode); | ||
| 90 | + } | ||
| 87 | } | 91 | } |
src/main/java/com/bsth/controller/realcontrol/BasicDataController.java
| 1 | package com.bsth.controller.realcontrol; | 1 | package com.bsth.controller.realcontrol; |
| 2 | 2 | ||
| 3 | -import java.util.HashMap; | ||
| 4 | -import java.util.List; | ||
| 5 | -import java.util.Map; | ||
| 6 | - | ||
| 7 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 8 | -import org.springframework.web.bind.annotation.RestController; | ||
| 9 | - | ||
| 10 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 11 | import com.alibaba.fastjson.serializer.PropertyFilter; | 4 | import com.alibaba.fastjson.serializer.PropertyFilter; |
| 12 | import com.bsth.data.BasicData; | 5 | import com.bsth.data.BasicData; |
| 6 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 7 | +import org.springframework.web.bind.annotation.RestController; | ||
| 8 | + | ||
| 9 | +import java.util.HashMap; | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Map; | ||
| 13 | 12 | ||
| 14 | @RestController | 13 | @RestController |
| 15 | @RequestMapping("/basic") | 14 | @RequestMapping("/basic") |
src/main/java/com/bsth/controller/schedule/RerunController.java deleted
100644 → 0
| 1 | -package com.bsth.controller.schedule; | ||
| 2 | - | ||
| 3 | -import com.bsth.controller.BaseController; | ||
| 4 | -import com.bsth.entity.schedule.rule.RerunRule; | ||
| 5 | -import com.bsth.repository.schedule.RerunRuleRepository; | ||
| 6 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | -import org.springframework.web.bind.annotation.*; | ||
| 8 | - | ||
| 9 | -import java.util.Map; | ||
| 10 | - | ||
| 11 | -/** | ||
| 12 | - * Created by xu on 16/10/20. | ||
| 13 | - */ | ||
| 14 | -@RestController | ||
| 15 | -@RequestMapping("rms") | ||
| 16 | -public class RerunController extends BaseController<RerunRule, Long> { | ||
| 17 | - | ||
| 18 | - @Autowired | ||
| 19 | - private RerunRuleRepository rerunRuleRepository; | ||
| 20 | - | ||
| 21 | - @Override | ||
| 22 | - public RerunRule findById(@PathVariable("id") Long aLong) { | ||
| 23 | - return rerunRuleRepository.findOneExtend(aLong); | ||
| 24 | - } | ||
| 25 | - | ||
| 26 | - /** | ||
| 27 | - * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody | ||
| 28 | - * @Title: save | ||
| 29 | - * @Description: TODO(持久化对象) | ||
| 30 | - * @param @param t | ||
| 31 | - * @param @return 设定文件 | ||
| 32 | - * @return Map<String,Object> {status: 1(成功),-1(失败)} | ||
| 33 | - * @throws | ||
| 34 | - */ | ||
| 35 | - @RequestMapping(method = RequestMethod.POST) | ||
| 36 | - public Map<String, Object> save(@RequestBody RerunRule t){ | ||
| 37 | - return baseService.save(t); | ||
| 38 | - } | ||
| 39 | - | ||
| 40 | - | ||
| 41 | -} |
src/main/java/com/bsth/controller/schedule/TTInfoController.java deleted
100644 → 0
| 1 | -package com.bsth.controller.schedule; | ||
| 2 | - | ||
| 3 | -import com.bsth.controller.BaseController2; | ||
| 4 | -import com.bsth.entity.schedule.TTInfo; | ||
| 5 | -import com.bsth.repository.schedule.TTInfoDetailRepository; | ||
| 6 | -import com.bsth.repository.schedule.TTInfoRepository; | ||
| 7 | -import com.bsth.service.schedule.utils.DataToolsProperties; | ||
| 8 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | -import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||
| 10 | -import org.springframework.data.domain.Page; | ||
| 11 | -import org.springframework.web.bind.annotation.*; | ||
| 12 | - | ||
| 13 | -import java.util.Map; | ||
| 14 | - | ||
| 15 | -/** | ||
| 16 | - * Created by xu on 16/5/12. | ||
| 17 | - */ | ||
| 18 | -@RestController | ||
| 19 | -@RequestMapping("tic") | ||
| 20 | -@EnableConfigurationProperties(DataToolsProperties.class) | ||
| 21 | -public class TTInfoController extends BaseController2<TTInfo, Long> { | ||
| 22 | - @Autowired | ||
| 23 | - private DataToolsProperties dataToolsProperties; | ||
| 24 | - @Autowired | ||
| 25 | - private TTInfoRepository ttInfoRepository; | ||
| 26 | - @Autowired | ||
| 27 | - private TTInfoDetailRepository ttInfoDetailRepository; | ||
| 28 | - | ||
| 29 | - @Override | ||
| 30 | - protected String getDataImportKtrClasspath() { | ||
| 31 | - return dataToolsProperties.getTtinfoDatainputktr(); | ||
| 32 | - } | ||
| 33 | - | ||
| 34 | - @Override | ||
| 35 | - public TTInfo findById(@PathVariable("id") Long aLong) { | ||
| 36 | - return ttInfoRepository.findOneExtend(aLong); | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - /** | ||
| 40 | - * 验证。 | ||
| 41 | - * @param map | ||
| 42 | - * @return | ||
| 43 | - */ | ||
| 44 | - @RequestMapping(value = "/validate/equale", method = RequestMethod.GET) | ||
| 45 | - public Map<String, Object> validateData(@RequestParam Map<String, Object> map) { | ||
| 46 | - // 一般比较自编号是否重复 | ||
| 47 | - return baseService.validateEquale(map); | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - @Override | ||
| 51 | - public Page<TTInfo> list(@RequestParam Map<String, Object> map, @RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "10") int size, @RequestParam(defaultValue = "id") String order, @RequestParam(defaultValue = "DESC") String direction) { | ||
| 52 | - // 如果有isCancel键值,将其值变成boolean | ||
| 53 | - if (map.get("isCancel_eq") != null) | ||
| 54 | - map.put("isCancel_eq", new Boolean(map.get("isCancel_eq").toString())); | ||
| 55 | - | ||
| 56 | - return super.list(map, page, size, order, direction); | ||
| 57 | - } | ||
| 58 | -} |
src/main/java/com/bsth/controller/schedule/TTInfoDetailController.java
| @@ -113,6 +113,9 @@ public class TTInfoDetailController extends BaseController2<TTInfoDetail, Long> | @@ -113,6 +113,9 @@ public class TTInfoDetailController extends BaseController2<TTInfoDetail, Long> | ||
| 113 | p1.put("stationName_eq", cell_con.trim()); | 113 | p1.put("stationName_eq", cell_con.trim()); |
| 114 | p1.put("stationMark_eq", "B"); | 114 | p1.put("stationMark_eq", "B"); |
| 115 | 115 | ||
| 116 | + | ||
| 117 | + // TODO:这里要修改(起点站有启用撤销的标志的) | ||
| 118 | + | ||
| 116 | List<StationRoute> stationRouteList = (List<StationRoute>) stationRouteService.list(p1); | 119 | List<StationRoute> stationRouteList = (List<StationRoute>) stationRouteService.list(p1); |
| 117 | if (CollectionUtils.isEmpty(stationRouteList)) { | 120 | if (CollectionUtils.isEmpty(stationRouteList)) { |
| 118 | rtn.put("status", ResponseCode.ERROR); | 121 | rtn.put("status", ResponseCode.ERROR); |
src/main/java/com/bsth/controller/schedule/basicinfo/CarDeviceController.java
| 1 | -package com.bsth.controller.schedule.basicinfo; | ||
| 2 | - | ||
| 3 | -import com.bsth.common.ResponseCode; | ||
| 4 | -import com.bsth.controller.schedule.BController; | ||
| 5 | -import com.bsth.entity.CarDevice; | ||
| 6 | -import com.bsth.service.schedule.CarDeviceService; | ||
| 7 | -import com.bsth.service.schedule.ScheduleException; | ||
| 8 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 11 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 12 | -import org.springframework.web.bind.annotation.RestController; | ||
| 13 | - | ||
| 14 | -import java.util.HashMap; | ||
| 15 | -import java.util.Map; | ||
| 16 | - | ||
| 17 | -/** | ||
| 18 | - * Created by xu on 16/12/15. | ||
| 19 | - */ | ||
| 20 | -@RestController(value = "carDeviceController_sc") | ||
| 21 | -@RequestMapping("cde_sc") | ||
| 22 | -public class CarDeviceController extends BController<CarDevice, Long> { | ||
| 23 | - @Autowired | ||
| 24 | - private CarDeviceService carDeviceService; | ||
| 25 | - | ||
| 26 | - @RequestMapping(value = "/validate_qyrq", method = RequestMethod.GET) | ||
| 27 | - public Map<String, Object> validate_qyrq(@RequestParam Map<String, Object> param) { | ||
| 28 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 29 | - | ||
| 30 | - try { | ||
| 31 | - // 启用日期验证 | ||
| 32 | - CarDevice carDevice = new CarDevice( | ||
| 33 | - param.get("id_eq"), | ||
| 34 | - param.get("xl_eq"), | ||
| 35 | - param.get("cl_eq"), | ||
| 36 | - param.get("qyrq_eq") | ||
| 37 | - ); | ||
| 38 | - carDeviceService.validate_qyrq(carDevice); | ||
| 39 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 40 | - } catch (ScheduleException exp) { | ||
| 41 | - rtn.put("status", ResponseCode.ERROR); | ||
| 42 | - rtn.put("msg", exp.getMessage()); | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - return rtn; | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | -} | 1 | +package com.bsth.controller.schedule.basicinfo; |
| 2 | + | ||
| 3 | +import com.bsth.common.ResponseCode; | ||
| 4 | +import com.bsth.controller.schedule.BController; | ||
| 5 | +import com.bsth.entity.CarDevice; | ||
| 6 | +import com.bsth.service.schedule.CarDeviceService; | ||
| 7 | +import com.bsth.service.schedule.ScheduleException; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 11 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 12 | +import org.springframework.web.bind.annotation.RestController; | ||
| 13 | + | ||
| 14 | +import java.util.HashMap; | ||
| 15 | +import java.util.Map; | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * Created by xu on 16/12/15. | ||
| 19 | + */ | ||
| 20 | +@RestController(value = "carDeviceController_sc") | ||
| 21 | +@RequestMapping("cde_sc") | ||
| 22 | +public class CarDeviceController extends BController<CarDevice, Long> { | ||
| 23 | + @Autowired | ||
| 24 | + private CarDeviceService carDeviceService; | ||
| 25 | + | ||
| 26 | + @RequestMapping(value = "/validate_qyrq", method = RequestMethod.GET) | ||
| 27 | + public Map<String, Object> validate_qyrq(@RequestParam Map<String, Object> param) { | ||
| 28 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 29 | + | ||
| 30 | + try { | ||
| 31 | + // 启用日期验证 | ||
| 32 | + CarDevice carDevice = new CarDevice( | ||
| 33 | + param.get("id_eq"), | ||
| 34 | + param.get("xl_eq"), | ||
| 35 | + param.get("cl_eq"), | ||
| 36 | + param.get("qyrq_eq") | ||
| 37 | + ); | ||
| 38 | + carDeviceService.validate_qyrq(carDevice); | ||
| 39 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 40 | + } catch (ScheduleException exp) { | ||
| 41 | + rtn.put("status", ResponseCode.ERROR); | ||
| 42 | + rtn.put("msg", exp.getMessage()); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + return rtn; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | +} |
src/main/java/com/bsth/controller/schedule/basicinfo/EmployeeController.java
| 1 | -package com.bsth.controller.schedule.basicinfo; | ||
| 2 | - | ||
| 3 | -import com.bsth.common.ResponseCode; | ||
| 4 | -import com.bsth.controller.schedule.BController; | ||
| 5 | -import com.bsth.entity.Personnel; | ||
| 6 | -import com.bsth.service.schedule.EmployeeService; | ||
| 7 | -import com.bsth.service.schedule.ScheduleException; | ||
| 8 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 11 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 12 | -import org.springframework.web.bind.annotation.RestController; | ||
| 13 | - | ||
| 14 | -import java.util.HashMap; | ||
| 15 | -import java.util.Map; | ||
| 16 | - | ||
| 17 | -/** | ||
| 18 | - * 人员基础信息Controller | ||
| 19 | - */ | ||
| 20 | -@RestController | ||
| 21 | -@RequestMapping("ee") | ||
| 22 | -public class EmployeeController extends BController<Personnel, Integer> { | ||
| 23 | - @Autowired | ||
| 24 | - private EmployeeService employeeService; | ||
| 25 | - | ||
| 26 | - @RequestMapping(value = "/validate_gh", method = RequestMethod.GET) | ||
| 27 | - public Map<String, Object> validate_gh(@RequestParam Map<String, Object> param) { | ||
| 28 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 29 | - try { | ||
| 30 | - // 工号验证 | ||
| 31 | - Personnel personnel = new Personnel( | ||
| 32 | - param.get("id_eq"), | ||
| 33 | - param.get("companyCode_eq"), | ||
| 34 | - param.get("jobCode_eq") | ||
| 35 | - ); | ||
| 36 | - employeeService.validate_gh(personnel); | ||
| 37 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 38 | - } catch (ScheduleException exp) { | ||
| 39 | - rtn.put("status", ResponseCode.ERROR); | ||
| 40 | - rtn.put("msg", exp.getMessage()); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | - return rtn; | ||
| 44 | - } | ||
| 45 | -} | 1 | +package com.bsth.controller.schedule.basicinfo; |
| 2 | + | ||
| 3 | +import com.bsth.common.ResponseCode; | ||
| 4 | +import com.bsth.controller.schedule.BController; | ||
| 5 | +import com.bsth.entity.Personnel; | ||
| 6 | +import com.bsth.service.schedule.EmployeeService; | ||
| 7 | +import com.bsth.service.schedule.ScheduleException; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 11 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 12 | +import org.springframework.web.bind.annotation.RestController; | ||
| 13 | + | ||
| 14 | +import java.util.HashMap; | ||
| 15 | +import java.util.Map; | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * 人员基础信息Controller | ||
| 19 | + */ | ||
| 20 | +@RestController | ||
| 21 | +@RequestMapping("ee") | ||
| 22 | +public class EmployeeController extends BController<Personnel, Integer> { | ||
| 23 | + @Autowired | ||
| 24 | + private EmployeeService employeeService; | ||
| 25 | + | ||
| 26 | + @RequestMapping(value = "/validate_gh", method = RequestMethod.GET) | ||
| 27 | + public Map<String, Object> validate_gh(@RequestParam Map<String, Object> param) { | ||
| 28 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 29 | + try { | ||
| 30 | + // 工号验证 | ||
| 31 | + Personnel personnel = new Personnel( | ||
| 32 | + param.get("id_eq"), | ||
| 33 | + param.get("companyCode_eq"), | ||
| 34 | + param.get("jobCode_eq") | ||
| 35 | + ); | ||
| 36 | + employeeService.validate_gh(personnel); | ||
| 37 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 38 | + } catch (ScheduleException exp) { | ||
| 39 | + rtn.put("status", ResponseCode.ERROR); | ||
| 40 | + rtn.put("msg", exp.getMessage()); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + return rtn; | ||
| 44 | + } | ||
| 45 | +} |
src/main/java/com/bsth/controller/schedule/core/RerunController.java
0 → 100644
| 1 | +package com.bsth.controller.schedule.core; | ||
| 2 | + | ||
| 3 | +import com.bsth.controller.schedule.BController; | ||
| 4 | +import com.bsth.entity.schedule.rule.RerunRule; | ||
| 5 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 6 | +import org.springframework.web.bind.annotation.RestController; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * Created by xu on 16/10/20. | ||
| 10 | + */ | ||
| 11 | +@RestController | ||
| 12 | +@RequestMapping("rms") | ||
| 13 | +public class RerunController extends BController<RerunRule, Long> { | ||
| 14 | + | ||
| 15 | + | ||
| 16 | +} |
src/main/java/com/bsth/controller/schedule/core/TTInfoController.java
0 → 100644
| 1 | +package com.bsth.controller.schedule.core; | ||
| 2 | + | ||
| 3 | +import com.bsth.common.ResponseCode; | ||
| 4 | +import com.bsth.controller.schedule.BController; | ||
| 5 | +import com.bsth.entity.schedule.TTInfo; | ||
| 6 | +import com.bsth.service.schedule.ScheduleException; | ||
| 7 | +import com.bsth.service.schedule.TTInfoService; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 11 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 12 | +import org.springframework.web.bind.annotation.RestController; | ||
| 13 | + | ||
| 14 | +import java.util.HashMap; | ||
| 15 | +import java.util.Map; | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * Created by xu on 16/12/20. | ||
| 19 | + */ | ||
| 20 | +@RestController(value = "tTInfoController_ec") | ||
| 21 | +@RequestMapping(value = "tic_ec") | ||
| 22 | +public class TTInfoController extends BController<TTInfo, Long> { | ||
| 23 | + @Autowired | ||
| 24 | + private TTInfoService ttInfoService; | ||
| 25 | + | ||
| 26 | + @RequestMapping(value = "/validate_name", method = RequestMethod.GET) | ||
| 27 | + public Map<String, Object> validate_name(@RequestParam Map<String, Object> param) { | ||
| 28 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 29 | + try { | ||
| 30 | + // 名字重复验证 | ||
| 31 | + TTInfo ttInfo = new TTInfo( | ||
| 32 | + param.get("id_eq"), | ||
| 33 | + param.get("xl.id_eq"), | ||
| 34 | + param.get("name_eq"), | ||
| 35 | + param.get("rule_days_eq"), | ||
| 36 | + param.get("special_days_eq") | ||
| 37 | + ); | ||
| 38 | + ttInfoService.validate_name(ttInfo); | ||
| 39 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 40 | + } catch (ScheduleException exp) { | ||
| 41 | + rtn.put("status", ResponseCode.ERROR); | ||
| 42 | + rtn.put("msg", exp.getMessage()); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + return rtn; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + @RequestMapping(value = "/validate_n_d", method = RequestMethod.GET) | ||
| 49 | + public Map<String, Object> validate_n_d(@RequestParam Map<String, Object> param) { | ||
| 50 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 51 | + try { | ||
| 52 | + // 常规有效日重复验证 | ||
| 53 | + TTInfo ttInfo = new TTInfo( | ||
| 54 | + param.get("id_eq"), | ||
| 55 | + param.get("xl.id_eq"), | ||
| 56 | + param.get("name_eq"), | ||
| 57 | + param.get("rule_days_eq"), | ||
| 58 | + param.get("special_days_eq") | ||
| 59 | + ); | ||
| 60 | + ttInfoService.validate_n_d(ttInfo); | ||
| 61 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 62 | + } catch (ScheduleException exp) { | ||
| 63 | + rtn.put("status", ResponseCode.ERROR); | ||
| 64 | + rtn.put("msg", exp.getMessage()); | ||
| 65 | + } | ||
| 66 | + return rtn; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + @RequestMapping(value = "/validate_s_d", method = RequestMethod.GET) | ||
| 70 | + public Map<String, Object> validate_s_d(@RequestParam Map<String, Object> param) { | ||
| 71 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 72 | + try { | ||
| 73 | + // 特殊有效日重复判定 | ||
| 74 | + TTInfo ttInfo = new TTInfo( | ||
| 75 | + param.get("id_eq"), | ||
| 76 | + param.get("xl.id_eq"), | ||
| 77 | + param.get("name_eq"), | ||
| 78 | + param.get("rule_days_eq"), | ||
| 79 | + param.get("special_days_eq") | ||
| 80 | + ); | ||
| 81 | + ttInfoService.validate_s_d(ttInfo); | ||
| 82 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 83 | + } catch (ScheduleException exp) { | ||
| 84 | + rtn.put("status", ResponseCode.ERROR); | ||
| 85 | + rtn.put("msg", exp.getMessage()); | ||
| 86 | + } | ||
| 87 | + return rtn; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | +} | ||
| 91 | + | ||
| 92 | +// | ||
| 93 | +//@Autowired | ||
| 94 | +//private DataToolsProperties dataToolsProperties; | ||
| 95 | +//@Autowired | ||
| 96 | +//private TTInfoRepository ttInfoRepository; | ||
| 97 | +//@Autowired | ||
| 98 | +//private TTInfoDetailRepository ttInfoDetailRepository; | ||
| 99 | +// | ||
| 100 | +// @Override | ||
| 101 | +// protected String getDataImportKtrClasspath() { | ||
| 102 | +// return dataToolsProperties.getTtinfoDatainputktr(); | ||
| 103 | +// } | ||
| 104 | +// | ||
| 105 | +// @Override | ||
| 106 | +// public TTInfo findById(@PathVariable("id") Long aLong) { | ||
| 107 | +// return ttInfoRepository.findOneExtend(aLong); | ||
| 108 | +// } | ||
| 109 | +// | ||
| 110 | +// /** | ||
| 111 | +// * 验证。 | ||
| 112 | +// * @param map | ||
| 113 | +// * @return | ||
| 114 | +// */ | ||
| 115 | +// @RequestMapping(value = "/validate/equale", method = RequestMethod.GET) | ||
| 116 | +// public Map<String, Object> validateData(@RequestParam Map<String, Object> map) { | ||
| 117 | +// // 一般比较自编号是否重复 | ||
| 118 | +// return baseService.validateEquale(map); | ||
| 119 | +// } | ||
| 120 | +// | ||
| 121 | +// @Override | ||
| 122 | +// public Page<TTInfo> list(@RequestParam Map<String, Object> map, @RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "10") int size, @RequestParam(defaultValue = "id") String order, @RequestParam(defaultValue = "DESC") String direction) { | ||
| 123 | +// // 如果有isCancel键值,将其值变成boolean | ||
| 124 | +// if (map.get("isCancel_eq") != null) | ||
| 125 | +// map.put("isCancel_eq", new Boolean(map.get("isCancel_eq").toString())); | ||
| 126 | +// | ||
| 127 | +// return super.list(map, page, size, order, direction); | ||
| 128 | +// } | ||
| 0 | \ No newline at end of file | 129 | \ No newline at end of file |
src/main/java/com/bsth/data/gpsdata/GpsEntity.java
| @@ -74,6 +74,9 @@ public class GpsEntity { | @@ -74,6 +74,9 @@ public class GpsEntity { | ||
| 74 | /** 是否起终点站 */ | 74 | /** 是否起终点站 */ |
| 75 | private boolean sEPoint; | 75 | private boolean sEPoint; |
| 76 | 76 | ||
| 77 | + /** 站内 */ | ||
| 78 | + private boolean instation; | ||
| 79 | + | ||
| 77 | public Integer getCompanyCode() { | 80 | public Integer getCompanyCode() { |
| 78 | return companyCode; | 81 | return companyCode; |
| 79 | } | 82 | } |
| @@ -249,4 +252,12 @@ public class GpsEntity { | @@ -249,4 +252,12 @@ public class GpsEntity { | ||
| 249 | public void setsEPoint(boolean sEPoint) { | 252 | public void setsEPoint(boolean sEPoint) { |
| 250 | this.sEPoint = sEPoint; | 253 | this.sEPoint = sEPoint; |
| 251 | } | 254 | } |
| 255 | + | ||
| 256 | + public boolean isInstation() { | ||
| 257 | + return instation; | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | + public void setInstation(boolean instation) { | ||
| 261 | + this.instation = instation; | ||
| 262 | + } | ||
| 252 | } | 263 | } |
src/main/java/com/bsth/data/gpsdata/GpsRealData.java
| @@ -67,7 +67,7 @@ public class GpsRealData implements CommandLineRunner{ | @@ -67,7 +67,7 @@ public class GpsRealData implements CommandLineRunner{ | ||
| 67 | @Override | 67 | @Override |
| 68 | public void run(String... arg0) throws Exception { | 68 | public void run(String... arg0) throws Exception { |
| 69 | logger.info("gpsDataLoader,20,6"); | 69 | logger.info("gpsDataLoader,20,6"); |
| 70 | - Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS); | 70 | + Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 15, TimeUnit.SECONDS); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | public GpsEntity add(GpsEntity gps) { | 73 | public GpsEntity add(GpsEntity gps) { |
| @@ -208,20 +208,6 @@ public class GpsRealData implements CommandLineRunner{ | @@ -208,20 +208,6 @@ public class GpsRealData implements CommandLineRunner{ | ||
| 208 | 208 | ||
| 209 | //纠正走向 | 209 | //纠正走向 |
| 210 | correctUpdown(gps); | 210 | correctUpdown(gps); |
| 211 | - /*if(issEPoint(gps)) | ||
| 212 | - continue; | ||
| 213 | - | ||
| 214 | - //如果走向未知,尝试根据站点纠正走向 | ||
| 215 | - if(gps.getUpDown() == -1){ | ||
| 216 | - updown=stationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo()); | ||
| 217 | - if(updown != null) | ||
| 218 | - gps.setUpDown(updown); | ||
| 219 | - } | ||
| 220 | - //如果站点编码和走向相反(即上行站点ID,走向为下行),尝试根据站点纠正走向 | ||
| 221 | - updown=stationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo()); | ||
| 222 | - if(updown != null && !gps.getUpDown().equals(updown)){ | ||
| 223 | - gps.setUpDown(updown); | ||
| 224 | - }*/ | ||
| 225 | } | 211 | } |
| 226 | } else | 212 | } else |
| 227 | logger.error("result is null"); | 213 | logger.error("result is null"); |
| @@ -271,19 +257,9 @@ public class GpsRealData implements CommandLineRunner{ | @@ -271,19 +257,9 @@ public class GpsRealData implements CommandLineRunner{ | ||
| 271 | Integer updown=BasicData.lineStationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo()); | 257 | Integer updown=BasicData.lineStationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo()); |
| 272 | if(updown != null && !updown.equals(gps.getUpDown())) | 258 | if(updown != null && !updown.equals(gps.getUpDown())) |
| 273 | gps.setUpDown(updown); | 259 | gps.setUpDown(updown); |
| 274 | - /*//如果走向未知,尝试根据站点纠正走向 | ||
| 275 | - if(gps.getUpDown() == -1){ | ||
| 276 | - | ||
| 277 | - }*/ | ||
| 278 | 260 | ||
| 279 | if(isSEPoint(gps)) | 261 | if(isSEPoint(gps)) |
| 280 | return; | 262 | return; |
| 281 | - | ||
| 282 | - /*//如果站点编码和走向相反(即上行站点ID,走向为下行),尝试根据站点纠正走向 | ||
| 283 | - updown=BasicData.lineStationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo()); | ||
| 284 | - if(updown != null && !gps.getUpDown().equals(updown)){ | ||
| 285 | - gps.setUpDown(updown); | ||
| 286 | - }*/ | ||
| 287 | } | 263 | } |
| 288 | } | 264 | } |
| 289 | } | 265 | } |
src/main/java/com/bsth/data/gpsdata/analyse/CircleQueue.java
0 → 100644
| 1 | +package com.bsth.data.gpsdata.analyse; | ||
| 2 | + | ||
| 3 | +import java.util.Arrays; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 循环队列 | ||
| 7 | + * Created by panzhao on 2016/12/23. | ||
| 8 | + */ | ||
| 9 | +public class CircleQueue<T> { | ||
| 10 | + | ||
| 11 | + /** | ||
| 12 | + * (循环队列)数组的容量 | ||
| 13 | + */ | ||
| 14 | + public int capacity; | ||
| 15 | + | ||
| 16 | + /** | ||
| 17 | + * 数组:保存循环队列的元素 | ||
| 18 | + */ | ||
| 19 | + public Object[] elementData; | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 队头(先进先出) | ||
| 23 | + */ | ||
| 24 | + public int head = 0; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 队尾 | ||
| 28 | + */ | ||
| 29 | + public int tail = 0; | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 以指定长度的数组来创建循环队列 | ||
| 33 | + * | ||
| 34 | + * @param initSize | ||
| 35 | + */ | ||
| 36 | + public CircleQueue(final int initSize) { | ||
| 37 | + capacity = initSize; | ||
| 38 | + elementData = new Object[capacity]; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 获取循环队列的大小(包含元素的个数) | ||
| 43 | + */ | ||
| 44 | + public int size() { | ||
| 45 | + if (isEmpty()) { | ||
| 46 | + return 0; | ||
| 47 | + } else if (isFull()) { | ||
| 48 | + return capacity; | ||
| 49 | + } else { | ||
| 50 | + return tail + 1; | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * 插入队尾一个元素 | ||
| 56 | + */ | ||
| 57 | + public void add(final T element) { | ||
| 58 | + if (isEmpty()) { | ||
| 59 | + elementData[0] = element; | ||
| 60 | + } else if (isFull()) { | ||
| 61 | + elementData[head] = element; | ||
| 62 | + head++; | ||
| 63 | + tail++; | ||
| 64 | + head = head == capacity ? 0 : head; | ||
| 65 | + tail = tail == capacity ? 0 : tail; | ||
| 66 | + } else { | ||
| 67 | + elementData[tail + 1] = element; | ||
| 68 | + tail++; | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public boolean isEmpty() { | ||
| 73 | + return tail == head && tail == 0 && elementData[tail] == null; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + public boolean isFull() { | ||
| 77 | + return head != 0 && head - tail == 1 || head == 0 && tail == capacity - 1; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public void clear() { | ||
| 81 | + Arrays.fill(elementData, null); | ||
| 82 | + head = 0; | ||
| 83 | + tail = 0; | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * @return 取 循环队列里的值(先进的index=0) | ||
| 88 | + */ | ||
| 89 | + public Object[] getQueue() { | ||
| 90 | + final Object[] elementDataSort = new Object[capacity]; | ||
| 91 | + final Object[] elementDataCopy = elementData.clone(); | ||
| 92 | + if (isEmpty()) { | ||
| 93 | + } else if (isFull()) { | ||
| 94 | + int indexMax = capacity; | ||
| 95 | + int indexSort = 0; | ||
| 96 | + for (int i = head; i < indexMax;) { | ||
| 97 | + elementDataSort[indexSort] = elementDataCopy[i]; | ||
| 98 | + indexSort++; | ||
| 99 | + i++; | ||
| 100 | + if (i == capacity) { | ||
| 101 | + i = 0; | ||
| 102 | + indexMax = head; | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + } else { | ||
| 106 | + for (int i = 0; i < tail; i++) { | ||
| 107 | + elementDataSort[i] = elementDataCopy[i]; | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + return elementDataSort; | ||
| 111 | + } | ||
| 112 | +} |
src/main/java/com/bsth/data/gpsdata/analyse/GeoCacheData.java
0 → 100644
| 1 | +package com.bsth.data.gpsdata.analyse; | ||
| 2 | + | ||
| 3 | +import com.bsth.data.gpsdata.GpsEntity; | ||
| 4 | +import com.google.common.collect.ArrayListMultimap; | ||
| 5 | +import com.vividsolutions.jts.geom.Coordinate; | ||
| 6 | +import com.vividsolutions.jts.geom.GeometryFactory; | ||
| 7 | +import com.vividsolutions.jts.geom.LineString; | ||
| 8 | +import org.apache.commons.lang3.StringUtils; | ||
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 10 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 11 | +import org.springframework.jdbc.core.RowMapper; | ||
| 12 | +import org.springframework.stereotype.Component; | ||
| 13 | + | ||
| 14 | +import java.sql.ResultSet; | ||
| 15 | +import java.sql.SQLException; | ||
| 16 | +import java.util.HashMap; | ||
| 17 | +import java.util.List; | ||
| 18 | +import java.util.Map; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * Created by panzhao on 2016/12/23. | ||
| 22 | + */ | ||
| 23 | +@Component | ||
| 24 | +public class GeoCacheData { | ||
| 25 | + | ||
| 26 | + //每辆车缓存最后50条gps | ||
| 27 | + private static final int CACHE_SIZE = 50; | ||
| 28 | + private static Map<String, CircleQueue<GpsEntity>> gpsCacheMap = new HashMap<>(); | ||
| 29 | + | ||
| 30 | + //线路路段走向 | ||
| 31 | + private static ArrayListMultimap<String, LineString> sectionCacheMap; | ||
| 32 | + | ||
| 33 | + //线路站点路由 | ||
| 34 | + private static ArrayListMultimap<String, StationRoute> stationCacheMap; | ||
| 35 | + | ||
| 36 | + @Autowired | ||
| 37 | + JdbcTemplate jdbcTemplate; | ||
| 38 | + | ||
| 39 | + public void loadData(){ | ||
| 40 | + final GeometryFactory geometryFactory = new GeometryFactory(); | ||
| 41 | + //加载站点路由 | ||
| 42 | + String sql = "select r.LINE_CODE,r.DIRECTIONS,r.STATION_CODE,r.STATION_MARK,s.SHAPES_TYPE,s.G_LONX,s.G_LATY,ST_AsText(s.G_POLYGON_GRID) as G_POLYGON_GRID,s.RADIUS from bsth_c_stationroute r left join bsth_c_station s on r.station=s.id"; | ||
| 43 | + List<StationRoute> routeList = jdbcTemplate.query(sql, new RowMapper<StationRoute>() { | ||
| 44 | + @Override | ||
| 45 | + public StationRoute mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 46 | + StationRoute sRoute = new StationRoute(); | ||
| 47 | + sRoute.setCode(rs.getString("STATION_CODE")); | ||
| 48 | + sRoute.setLineCode(rs.getString("LINE_CODE")); | ||
| 49 | + sRoute.setDirections(rs.getInt("DIRECTIONS")); | ||
| 50 | + sRoute.setPoint(geometryFactory.createPoint(new Coordinate(rs.getFloat("G_LONX"), rs.getFloat("G_LATY")))); | ||
| 51 | + sRoute.setRadius(rs.getFloat("RADIUS")); | ||
| 52 | + | ||
| 53 | + String shapesType = rs.getString("SHAPES_TYPE"); | ||
| 54 | + //多边形电子围栏 | ||
| 55 | + if(StringUtils.isNotEmpty(shapesType) && shapesType.equals("d")){ | ||
| 56 | + geometryFactory.createPolygon(parsePolygon(rs.getString("G_POLYGON_GRID"))); | ||
| 57 | + } | ||
| 58 | + return sRoute; | ||
| 59 | + } | ||
| 60 | + }); | ||
| 61 | + //按线路和走向分组 | ||
| 62 | + if(routeList.size() > 0){ | ||
| 63 | + ArrayListMultimap<String, StationRoute> tempMap = ArrayListMultimap.create(); | ||
| 64 | + for(StationRoute sr : routeList){ | ||
| 65 | + tempMap.put(sr.getLineCode() + "_" + sr.getDirections(), sr); | ||
| 66 | + } | ||
| 67 | + stationCacheMap = tempMap; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + System.out.println(stationCacheMap); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public Coordinate[] parsePolygon(String polygonStr){ | ||
| 74 | + String[] coords = polygonStr.substring(11, polygonStr.length() - 2).split(",") | ||
| 75 | + ,temps; | ||
| 76 | + | ||
| 77 | + Coordinate[] cds = new Coordinate[coords.length]; | ||
| 78 | + int len = coords.length; | ||
| 79 | + for(int i = 0; i < len; i++){ | ||
| 80 | + temps = coords[i].split(" "); | ||
| 81 | + cds[i] = new Coordinate(Float.parseFloat(temps[0]), Float.parseFloat(temps[1])); | ||
| 82 | + } | ||
| 83 | + return cds; | ||
| 84 | + } | ||
| 85 | +} |
src/main/java/com/bsth/data/gpsdata/analyse/GpsAnalyse.java
0 → 100644
| 1 | +package com.bsth.data.gpsdata.analyse; | ||
| 2 | + | ||
| 3 | +import com.bsth.data.gpsdata.GpsEntity; | ||
| 4 | +import com.vividsolutions.jts.geom.GeometryFactory; | ||
| 5 | + | ||
| 6 | +import java.util.concurrent.ExecutorService; | ||
| 7 | +import java.util.concurrent.Executors; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 分析gps状态信息 | ||
| 11 | + * Created by panzhao on 2016/12/23. | ||
| 12 | + */ | ||
| 13 | +public class GpsAnalyse { | ||
| 14 | + | ||
| 15 | + //线程池 | ||
| 16 | + ExecutorService threadPool = Executors.newFixedThreadPool(50); | ||
| 17 | + | ||
| 18 | + private static GeometryFactory geometryFactory = new GeometryFactory(); | ||
| 19 | + | ||
| 20 | + public void start(GpsEntity gps){ | ||
| 21 | + threadPool.execute(new ArrivalMatchThread(gps)); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + public class ArrivalMatchThread implements Runnable{ | ||
| 25 | + | ||
| 26 | + private GpsEntity gps; | ||
| 27 | + | ||
| 28 | + public ArrivalMatchThread(GpsEntity gps){ | ||
| 29 | + this.gps = gps; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + @Override | ||
| 33 | + public void run() { | ||
| 34 | + //CircleQueue<GpsEntity> queue = gpsCacheMap.get(gps.getNbbm()); | ||
| 35 | + | ||
| 36 | + //站内还是站外 | ||
| 37 | + //Point p = geometryFactory.createPoint(new Coordinate(gps.getLat(), gps.getLon())); | ||
| 38 | + | ||
| 39 | + /*if(queue == null){ | ||
| 40 | + //首个GPS点 | ||
| 41 | + queue = new CircleQueue<>(CACHE_SIZE); | ||
| 42 | + queue.add(gps); | ||
| 43 | + }*/ | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | +} |
src/main/java/com/bsth/data/gpsdata/analyse/StationRoute.java
0 → 100644
| 1 | +package com.bsth.data.gpsdata.analyse; | ||
| 2 | + | ||
| 3 | +import com.vividsolutions.jts.geom.Point; | ||
| 4 | +import com.vividsolutions.jts.geom.Polygon; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * | ||
| 8 | + * Created by panzhao on 2016/12/23. | ||
| 9 | + */ | ||
| 10 | +public class StationRoute { | ||
| 11 | + | ||
| 12 | + /** 线路编码 */ | ||
| 13 | + private String lineCode; | ||
| 14 | + | ||
| 15 | + /** 上下行 */ | ||
| 16 | + private int directions; | ||
| 17 | + | ||
| 18 | + /** 站点编码 */ | ||
| 19 | + private String code; | ||
| 20 | + | ||
| 21 | + /** 路由顺序 */ | ||
| 22 | + private int routeSort; | ||
| 23 | + | ||
| 24 | + /** 站点位置 */ | ||
| 25 | + private Point point; | ||
| 26 | + | ||
| 27 | + /** 圆形半径 */ | ||
| 28 | + private Float radius; | ||
| 29 | + | ||
| 30 | + /** 多边形电子围栏 */ | ||
| 31 | + private Polygon polygon; | ||
| 32 | + | ||
| 33 | + public String getCode() { | ||
| 34 | + return code; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public void setCode(String code) { | ||
| 38 | + this.code = code; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + public int getRouteSort() { | ||
| 42 | + return routeSort; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public void setRouteSort(int routeSort) { | ||
| 46 | + this.routeSort = routeSort; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + public Point getPoint() { | ||
| 50 | + return point; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + public void setPoint(Point point) { | ||
| 54 | + this.point = point; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + public Float getRadius() { | ||
| 58 | + return radius; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + public void setRadius(Float radius) { | ||
| 62 | + this.radius = radius; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public Polygon getPolygon() { | ||
| 66 | + return polygon; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public void setPolygon(Polygon polygon) { | ||
| 70 | + this.polygon = polygon; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public String getLineCode() { | ||
| 74 | + return lineCode; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public void setLineCode(String lineCode) { | ||
| 78 | + this.lineCode = lineCode; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public int getDirections() { | ||
| 82 | + return directions; | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + public void setDirections(int directions) { | ||
| 86 | + this.directions = directions; | ||
| 87 | + } | ||
| 88 | +} |
src/main/java/com/bsth/entity/realcontrol/ChildTaskPlan.java
| 1 | package com.bsth.entity.realcontrol; | 1 | package com.bsth.entity.realcontrol; |
| 2 | 2 | ||
| 3 | -import javax.persistence.Entity; | ||
| 4 | -import javax.persistence.FetchType; | ||
| 5 | -import javax.persistence.GeneratedValue; | ||
| 6 | -import javax.persistence.Id; | ||
| 7 | -import javax.persistence.ManyToOne; | ||
| 8 | -import javax.persistence.NamedAttributeNode; | ||
| 9 | -import javax.persistence.NamedEntityGraph; | ||
| 10 | -import javax.persistence.NamedEntityGraphs; | ||
| 11 | -import javax.persistence.Table; | ||
| 12 | - | ||
| 13 | import com.fasterxml.jackson.annotation.JsonIgnore; | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| 14 | 4 | ||
| 5 | +import javax.persistence.*; | ||
| 6 | +import java.util.Date; | ||
| 7 | + | ||
| 15 | 8 | ||
| 16 | /** | 9 | /** |
| 17 | * | 10 | * |
| @@ -95,6 +88,10 @@ public class ChildTaskPlan { | @@ -95,6 +88,10 @@ public class ChildTaskPlan { | ||
| 95 | */ | 88 | */ |
| 96 | private String destroyReason; | 89 | private String destroyReason; |
| 97 | 90 | ||
| 91 | + /** 创建日期 */ | ||
| 92 | + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 93 | + private Date createDate; | ||
| 94 | + | ||
| 98 | /** | 95 | /** |
| 99 | * 主排班计划 | 96 | * 主排班计划 |
| 100 | */ | 97 | */ |
| @@ -233,4 +230,12 @@ public class ChildTaskPlan { | @@ -233,4 +230,12 @@ public class ChildTaskPlan { | ||
| 233 | public boolean equals(Object obj) { | 230 | public boolean equals(Object obj) { |
| 234 | return this.id.equals(((ChildTaskPlan)obj).getId()); | 231 | return this.id.equals(((ChildTaskPlan)obj).getId()); |
| 235 | } | 232 | } |
| 233 | + | ||
| 234 | + public Date getCreateDate() { | ||
| 235 | + return createDate; | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | + public void setCreateDate(Date createDate) { | ||
| 239 | + this.createDate = createDate; | ||
| 240 | + } | ||
| 236 | } | 241 | } |
src/main/java/com/bsth/entity/schedule/BEntity.java
| 1 | -package com.bsth.entity.schedule; | ||
| 2 | - | ||
| 3 | -import com.bsth.entity.sys.SysUser; | ||
| 4 | - | ||
| 5 | -import javax.persistence.*; | ||
| 6 | -import java.util.Date; | ||
| 7 | - | ||
| 8 | -/** | ||
| 9 | - * Created by xu on 16/12/14. | ||
| 10 | - */ | ||
| 11 | -@MappedSuperclass | ||
| 12 | -public class BEntity { | ||
| 13 | - | ||
| 14 | - /** 创建人 */ | ||
| 15 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 16 | - private SysUser createBy; | ||
| 17 | - /** 修改人 */ | ||
| 18 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 19 | - private SysUser updateBy; | ||
| 20 | - | ||
| 21 | - /** 创建日期 */ | ||
| 22 | - @Column(updatable = false, name = "create_date") | ||
| 23 | - private Date createDate; | ||
| 24 | - /** 修改日期 */ | ||
| 25 | - @Column(name = "update_date") | ||
| 26 | - private Date updateDate; | ||
| 27 | - | ||
| 28 | - public SysUser getCreateBy() { | ||
| 29 | - return createBy; | ||
| 30 | - } | ||
| 31 | - | ||
| 32 | - public void setCreateBy(SysUser createBy) { | ||
| 33 | - this.createBy = createBy; | ||
| 34 | - } | ||
| 35 | - | ||
| 36 | - public SysUser getUpdateBy() { | ||
| 37 | - return updateBy; | ||
| 38 | - } | ||
| 39 | - | ||
| 40 | - public void setUpdateBy(SysUser updateBy) { | ||
| 41 | - this.updateBy = updateBy; | ||
| 42 | - } | ||
| 43 | - | ||
| 44 | - public Date getCreateDate() { | ||
| 45 | - return createDate; | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | - public void setCreateDate(Date createDate) { | ||
| 49 | - this.createDate = createDate; | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - public Date getUpdateDate() { | ||
| 53 | - return updateDate; | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - public void setUpdateDate(Date updateDate) { | ||
| 57 | - this.updateDate = updateDate; | ||
| 58 | - } | ||
| 59 | -} | 1 | +package com.bsth.entity.schedule; |
| 2 | + | ||
| 3 | +import com.bsth.entity.sys.SysUser; | ||
| 4 | + | ||
| 5 | +import javax.persistence.*; | ||
| 6 | +import java.util.Date; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * Created by xu on 16/12/14. | ||
| 10 | + */ | ||
| 11 | +@MappedSuperclass | ||
| 12 | +public class BEntity { | ||
| 13 | + | ||
| 14 | + /** 创建人 */ | ||
| 15 | + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 16 | + private SysUser createBy; | ||
| 17 | + /** 修改人 */ | ||
| 18 | + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 19 | + private SysUser updateBy; | ||
| 20 | + | ||
| 21 | + /** 创建日期 */ | ||
| 22 | + @Column(updatable = false, name = "create_date") | ||
| 23 | + private Date createDate; | ||
| 24 | + /** 修改日期 */ | ||
| 25 | + @Column(name = "update_date") | ||
| 26 | + private Date updateDate; | ||
| 27 | + | ||
| 28 | + public SysUser getCreateBy() { | ||
| 29 | + return createBy; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + public void setCreateBy(SysUser createBy) { | ||
| 33 | + this.createBy = createBy; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + public SysUser getUpdateBy() { | ||
| 37 | + return updateBy; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public void setUpdateBy(SysUser updateBy) { | ||
| 41 | + this.updateBy = updateBy; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public Date getCreateDate() { | ||
| 45 | + return createDate; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public void setCreateDate(Date createDate) { | ||
| 49 | + this.createDate = createDate; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public Date getUpdateDate() { | ||
| 53 | + return updateDate; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public void setUpdateDate(Date updateDate) { | ||
| 57 | + this.updateDate = updateDate; | ||
| 58 | + } | ||
| 59 | +} |
src/main/java/com/bsth/entity/schedule/TTInfo.java
| 1 | package com.bsth.entity.schedule; | 1 | package com.bsth.entity.schedule; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.Line; | 3 | import com.bsth.entity.Line; |
| 4 | -import com.bsth.entity.sys.SysUser; | ||
| 5 | 4 | ||
| 6 | import javax.persistence.*; | 5 | import javax.persistence.*; |
| 7 | import java.util.Date; | 6 | import java.util.Date; |
| @@ -18,7 +17,7 @@ import java.util.Date; | @@ -18,7 +17,7 @@ import java.util.Date; | ||
| 18 | @NamedAttributeNode("updateBy") | 17 | @NamedAttributeNode("updateBy") |
| 19 | }) | 18 | }) |
| 20 | }) | 19 | }) |
| 21 | -public class TTInfo { | 20 | +public class TTInfo extends BEntity { |
| 22 | 21 | ||
| 23 | /** 主键Id */ | 22 | /** 主键Id */ |
| 24 | @Id | 23 | @Id |
| @@ -50,9 +49,9 @@ public class TTInfo { | @@ -50,9 +49,9 @@ public class TTInfo { | ||
| 50 | 49 | ||
| 51 | // TODO:还有很多判定条件,这里先不放 | 50 | // TODO:还有很多判定条件,这里先不放 |
| 52 | 51 | ||
| 53 | - /** 路牌数 */ | 52 | + /** 路牌数(这两个字段暂时不用) */ |
| 54 | private int lpCount; | 53 | private int lpCount; |
| 55 | - /** 圈数 */ | 54 | + /** 圈数(这两个字段暂时不倒) */ |
| 56 | private int loopCount; | 55 | private int loopCount; |
| 57 | 56 | ||
| 58 | // TODO:原系统里的分别在,圈后圈进场,意思不知道,再议 | 57 | // TODO:原系统里的分别在,圈后圈进场,意思不知道,再议 |
| @@ -62,19 +61,25 @@ public class TTInfo { | @@ -62,19 +61,25 @@ public class TTInfo { | ||
| 62 | /** 特殊有效日期(格式:2001-01-01,多个用逗号隔开) */ | 61 | /** 特殊有效日期(格式:2001-01-01,多个用逗号隔开) */ |
| 63 | private String special_days; | 62 | private String special_days; |
| 64 | 63 | ||
| 65 | - /** 操作人员关联 */ | ||
| 66 | - @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | ||
| 67 | - private SysUser createBy; | ||
| 68 | - /** 更新人员关联 */ | ||
| 69 | - @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | ||
| 70 | - private SysUser updateBy; | ||
| 71 | - // 创建日期 | ||
| 72 | - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 73 | - private Date createDate; | ||
| 74 | - // 修改日期 | ||
| 75 | - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | ||
| 76 | - private Date updateDate; | ||
| 77 | - | 64 | + public TTInfo() {} |
| 65 | + public TTInfo(Object id, Object xlid, Object name, Object nds, Object sds) { | ||
| 66 | + if (id != null) { | ||
| 67 | + this.id = Long.parseLong(id.toString()); | ||
| 68 | + } | ||
| 69 | + if (xlid != null) { | ||
| 70 | + this.xl = new Line(); | ||
| 71 | + this.xl.setId(Integer.valueOf(xlid.toString())); | ||
| 72 | + } | ||
| 73 | + if (name != null) { | ||
| 74 | + this.name = String.valueOf(name); | ||
| 75 | + } | ||
| 76 | + if (nds != null) { | ||
| 77 | + this.rule_days = String.valueOf(nds); | ||
| 78 | + } | ||
| 79 | + if (sds != null) { | ||
| 80 | + this.special_days = String.valueOf(sds); | ||
| 81 | + } | ||
| 82 | + } | ||
| 78 | 83 | ||
| 79 | public Long getId() { | 84 | public Long getId() { |
| 80 | return id; | 85 | return id; |
| @@ -164,38 +169,6 @@ public class TTInfo { | @@ -164,38 +169,6 @@ public class TTInfo { | ||
| 164 | this.special_days = special_days; | 169 | this.special_days = special_days; |
| 165 | } | 170 | } |
| 166 | 171 | ||
| 167 | - public SysUser getCreateBy() { | ||
| 168 | - return createBy; | ||
| 169 | - } | ||
| 170 | - | ||
| 171 | - public void setCreateBy(SysUser createBy) { | ||
| 172 | - this.createBy = createBy; | ||
| 173 | - } | ||
| 174 | - | ||
| 175 | - public SysUser getUpdateBy() { | ||
| 176 | - return updateBy; | ||
| 177 | - } | ||
| 178 | - | ||
| 179 | - public void setUpdateBy(SysUser updateBy) { | ||
| 180 | - this.updateBy = updateBy; | ||
| 181 | - } | ||
| 182 | - | ||
| 183 | - public Date getCreateDate() { | ||
| 184 | - return createDate; | ||
| 185 | - } | ||
| 186 | - | ||
| 187 | - public void setCreateDate(Date createDate) { | ||
| 188 | - this.createDate = createDate; | ||
| 189 | - } | ||
| 190 | - | ||
| 191 | - public Date getUpdateDate() { | ||
| 192 | - return updateDate; | ||
| 193 | - } | ||
| 194 | - | ||
| 195 | - public void setUpdateDate(Date updateDate) { | ||
| 196 | - this.updateDate = updateDate; | ||
| 197 | - } | ||
| 198 | - | ||
| 199 | public Boolean getIsCancel() { | 172 | public Boolean getIsCancel() { |
| 200 | return isCancel; | 173 | return isCancel; |
| 201 | } | 174 | } |
src/main/java/com/bsth/entity/schedule/TTInfoDetail.java
| @@ -3,10 +3,8 @@ package com.bsth.entity.schedule; | @@ -3,10 +3,8 @@ package com.bsth.entity.schedule; | ||
| 3 | import com.bsth.entity.CarPark; | 3 | import com.bsth.entity.CarPark; |
| 4 | import com.bsth.entity.Line; | 4 | import com.bsth.entity.Line; |
| 5 | import com.bsth.entity.Station; | 5 | import com.bsth.entity.Station; |
| 6 | -import com.bsth.entity.sys.SysUser; | ||
| 7 | 6 | ||
| 8 | import javax.persistence.*; | 7 | import javax.persistence.*; |
| 9 | -import java.util.Date; | ||
| 10 | 8 | ||
| 11 | /** | 9 | /** |
| 12 | * 时刻表明细 | 10 | * 时刻表明细 |
| @@ -23,7 +21,7 @@ import java.util.Date; | @@ -23,7 +21,7 @@ import java.util.Date; | ||
| 23 | @NamedAttributeNode("tcc") | 21 | @NamedAttributeNode("tcc") |
| 24 | }) | 22 | }) |
| 25 | }) | 23 | }) |
| 26 | -public class TTInfoDetail { | 24 | +public class TTInfoDetail extends BEntity { |
| 27 | 25 | ||
| 28 | /** 主健Id */ | 26 | /** 主健Id */ |
| 29 | @Id | 27 | @Id |
| @@ -85,20 +83,6 @@ public class TTInfoDetail { | @@ -85,20 +83,6 @@ public class TTInfoDetail { | ||
| 85 | /** 备注 */ | 83 | /** 备注 */ |
| 86 | private String remark; | 84 | private String remark; |
| 87 | 85 | ||
| 88 | - /** 创建人 */ | ||
| 89 | - @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | ||
| 90 | - private SysUser createBy; | ||
| 91 | - /** 修改人 */ | ||
| 92 | - @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | ||
| 93 | - private SysUser updateBy; | ||
| 94 | - | ||
| 95 | - /** 创建日期 */ | ||
| 96 | - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 97 | - private Date createDate; | ||
| 98 | - /** 修改日期 */ | ||
| 99 | - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | ||
| 100 | - private Date updateDate; | ||
| 101 | - | ||
| 102 | public Long getId() { | 86 | public Long getId() { |
| 103 | return id; | 87 | return id; |
| 104 | } | 88 | } |
| @@ -235,38 +219,6 @@ public class TTInfoDetail { | @@ -235,38 +219,6 @@ public class TTInfoDetail { | ||
| 235 | this.remark = remark; | 219 | this.remark = remark; |
| 236 | } | 220 | } |
| 237 | 221 | ||
| 238 | - public SysUser getCreateBy() { | ||
| 239 | - return createBy; | ||
| 240 | - } | ||
| 241 | - | ||
| 242 | - public void setCreateBy(SysUser createBy) { | ||
| 243 | - this.createBy = createBy; | ||
| 244 | - } | ||
| 245 | - | ||
| 246 | - public SysUser getUpdateBy() { | ||
| 247 | - return updateBy; | ||
| 248 | - } | ||
| 249 | - | ||
| 250 | - public void setUpdateBy(SysUser updateBy) { | ||
| 251 | - this.updateBy = updateBy; | ||
| 252 | - } | ||
| 253 | - | ||
| 254 | - public Date getCreateDate() { | ||
| 255 | - return createDate; | ||
| 256 | - } | ||
| 257 | - | ||
| 258 | - public void setCreateDate(Date createDate) { | ||
| 259 | - this.createDate = createDate; | ||
| 260 | - } | ||
| 261 | - | ||
| 262 | - public Date getUpdateDate() { | ||
| 263 | - return updateDate; | ||
| 264 | - } | ||
| 265 | - | ||
| 266 | - public void setUpdateDate(Date updateDate) { | ||
| 267 | - this.updateDate = updateDate; | ||
| 268 | - } | ||
| 269 | - | ||
| 270 | public CarPark getTcc() { | 222 | public CarPark getTcc() { |
| 271 | return tcc; | 223 | return tcc; |
| 272 | } | 224 | } |
src/main/java/com/bsth/entity/schedule/rule/RerunRule.java
| 1 | package com.bsth.entity.schedule.rule; | 1 | package com.bsth.entity.schedule.rule; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.Line; | 3 | import com.bsth.entity.Line; |
| 4 | -import com.bsth.entity.schedule.CarConfigInfo; | ||
| 5 | -import com.bsth.entity.schedule.EmployeeConfigInfo; | ||
| 6 | -import com.bsth.entity.schedule.GuideboardInfo; | ||
| 7 | -import com.bsth.entity.schedule.TTInfo; | ||
| 8 | -import com.bsth.entity.sys.SysUser; | 4 | +import com.bsth.entity.schedule.*; |
| 9 | 5 | ||
| 10 | import javax.persistence.*; | 6 | import javax.persistence.*; |
| 11 | -import java.util.Date; | ||
| 12 | 7 | ||
| 13 | /** | 8 | /** |
| 14 | * 套跑规则。 | 9 | * 套跑规则。 |
| @@ -41,7 +36,7 @@ import java.util.Date; | @@ -41,7 +36,7 @@ import java.util.Date; | ||
| 41 | }) | 36 | }) |
| 42 | 37 | ||
| 43 | 38 | ||
| 44 | -public class RerunRule { | 39 | +public class RerunRule extends BEntity { |
| 45 | /** 主键Id */ | 40 | /** 主键Id */ |
| 46 | @Id | 41 | @Id |
| 47 | @GeneratedValue | 42 | @GeneratedValue |
| @@ -84,19 +79,6 @@ public class RerunRule { | @@ -84,19 +79,6 @@ public class RerunRule { | ||
| 84 | @Column(nullable = false) | 79 | @Column(nullable = false) |
| 85 | private Boolean isCancel = false; | 80 | private Boolean isCancel = false; |
| 86 | 81 | ||
| 87 | - /** 创建人 */ | ||
| 88 | - @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | ||
| 89 | - private SysUser createBy; | ||
| 90 | - /** 修改人 */ | ||
| 91 | - @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) | ||
| 92 | - private SysUser updateBy; | ||
| 93 | - /** 创建日期 */ | ||
| 94 | - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 95 | - private Date createDate; | ||
| 96 | - /** 修改日期 */ | ||
| 97 | - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | ||
| 98 | - private Date updateDate; | ||
| 99 | - | ||
| 100 | public Long getId() { | 82 | public Long getId() { |
| 101 | return id; | 83 | return id; |
| 102 | } | 84 | } |
| @@ -177,34 +159,6 @@ public class RerunRule { | @@ -177,34 +159,6 @@ public class RerunRule { | ||
| 177 | this.useEmployeeConfig = useEmployeeConfig; | 159 | this.useEmployeeConfig = useEmployeeConfig; |
| 178 | } | 160 | } |
| 179 | 161 | ||
| 180 | - public SysUser getCreateBy() { | ||
| 181 | - return createBy; | ||
| 182 | - } | ||
| 183 | - | ||
| 184 | - public void setCreateBy(SysUser createBy) { | ||
| 185 | - this.createBy = createBy; | ||
| 186 | - } | ||
| 187 | - | ||
| 188 | - public SysUser getUpdateBy() { | ||
| 189 | - return updateBy; | ||
| 190 | - } | ||
| 191 | - | ||
| 192 | - public void setUpdateBy(SysUser updateBy) { | ||
| 193 | - this.updateBy = updateBy; | ||
| 194 | - } | ||
| 195 | - | ||
| 196 | - public Date getCreateDate() { | ||
| 197 | - return createDate; | ||
| 198 | - } | ||
| 199 | - | ||
| 200 | - public void setCreateDate(Date createDate) { | ||
| 201 | - this.createDate = createDate; | ||
| 202 | - } | ||
| 203 | - | ||
| 204 | - public Date getUpdateDate() { | ||
| 205 | - return updateDate; | ||
| 206 | - } | ||
| 207 | - | ||
| 208 | public Boolean getIsCancel() { | 162 | public Boolean getIsCancel() { |
| 209 | return isCancel; | 163 | return isCancel; |
| 210 | } | 164 | } |
| @@ -213,7 +167,4 @@ public class RerunRule { | @@ -213,7 +167,4 @@ public class RerunRule { | ||
| 213 | this.isCancel = isCancel; | 167 | this.isCancel = isCancel; |
| 214 | } | 168 | } |
| 215 | 169 | ||
| 216 | - public void setUpdateDate(Date updateDate) { | ||
| 217 | - this.updateDate = updateDate; | ||
| 218 | - } | ||
| 219 | } | 170 | } |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -33,11 +33,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -33,11 +33,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 33 | + " s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by clZbh,jGh,jName") | 33 | + " s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by clZbh,jGh,jName") |
| 34 | List<Map<String, Object>> dailyInfo(String line,String date); | 34 | List<Map<String, Object>> dailyInfo(String line,String date); |
| 35 | 35 | ||
| 36 | - @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,d.sender,d.timestamp," | ||
| 37 | - + " d.txt_content FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 " | ||
| 38 | - + "d ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND " | ||
| 39 | - + " DATE_FORMAT(r.schedule_date,'%Y-%m-%d') = ?2 and r.cl_zbh like %?3% order by d.timestamp",nativeQuery=true) | ||
| 40 | - List<Object[]> historyMessage(String line,String date,String code); | 36 | + @Query(value="select t.car_code,d.sender,d.txt_content,d.timestamp,0 as xlbm from (" |
| 37 | + + " select equipment_code,car_code from bsth_c_cars where id in(" | ||
| 38 | + + " select cl from bsth_c_s_ccinfo where xl in ( " | ||
| 39 | + + " select id from bsth_c_line where line_code=?1 ))) t" | ||
| 40 | + + " left join bsth_v_directive_60 d on t.equipment_code=d.device_id " | ||
| 41 | + + " where d.timestamp >=?2 and d.timestamp <=?3 and t.car_code like %?4% ",nativeQuery=true) | ||
| 42 | + List<Object[]> historyMessage(String line,long d,long t,String code); | ||
| 41 | 43 | ||
| 42 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs " | 44 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs " |
| 43 | + " FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 d " | 45 | + " FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 d " |
src/main/java/com/bsth/service/gps/GpsService.java
| @@ -14,4 +14,6 @@ public interface GpsService { | @@ -14,4 +14,6 @@ public interface GpsService { | ||
| 14 | Map<String, Object> search(Map<String, Object> map, int page, int size, String order, String direction); | 14 | Map<String, Object> search(Map<String, Object> map, int page, int size, String order, String direction); |
| 15 | 15 | ||
| 16 | Map<String,Object> removeRealGps(String device); | 16 | Map<String,Object> removeRealGps(String device); |
| 17 | + | ||
| 18 | + Map<String,Object> findRoadSpeed(String lineCode); | ||
| 17 | } | 19 | } |
src/main/java/com/bsth/service/gps/GpsServiceImpl.java
| 1 | package com.bsth.service.gps; | 1 | package com.bsth.service.gps; |
| 2 | 2 | ||
| 3 | -import java.lang.reflect.Field; | ||
| 4 | -import java.sql.Connection; | ||
| 5 | -import java.sql.PreparedStatement; | ||
| 6 | -import java.sql.ResultSet; | ||
| 7 | -import java.util.ArrayList; | ||
| 8 | -import java.util.Calendar; | ||
| 9 | -import java.util.Collection; | ||
| 10 | -import java.util.Collections; | ||
| 11 | -import java.util.Comparator; | ||
| 12 | -import java.util.Date; | ||
| 13 | -import java.util.HashMap; | ||
| 14 | -import java.util.List; | ||
| 15 | -import java.util.Map; | ||
| 16 | - | ||
| 17 | -import org.apache.commons.lang3.StringUtils; | ||
| 18 | -import org.slf4j.Logger; | ||
| 19 | -import org.slf4j.LoggerFactory; | ||
| 20 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 21 | -import org.springframework.stereotype.Service; | ||
| 22 | - | ||
| 23 | import com.bsth.common.ResponseCode; | 3 | import com.bsth.common.ResponseCode; |
| 24 | import com.bsth.data.BasicData; | 4 | import com.bsth.data.BasicData; |
| 25 | import com.bsth.data.arrival.ArrivalEntity; | 5 | import com.bsth.data.arrival.ArrivalEntity; |
| @@ -31,6 +11,19 @@ import com.bsth.util.DateUtils; | @@ -31,6 +11,19 @@ import com.bsth.util.DateUtils; | ||
| 31 | import com.bsth.util.TransGPS; | 11 | import com.bsth.util.TransGPS; |
| 32 | import com.bsth.util.TransGPS.Location; | 12 | import com.bsth.util.TransGPS.Location; |
| 33 | import com.bsth.util.db.DBUtils_MS; | 13 | import com.bsth.util.db.DBUtils_MS; |
| 14 | +import org.apache.commons.lang3.StringUtils; | ||
| 15 | +import org.slf4j.Logger; | ||
| 16 | +import org.slf4j.LoggerFactory; | ||
| 17 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 18 | +import org.springframework.dao.DataAccessException; | ||
| 19 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 20 | +import org.springframework.stereotype.Service; | ||
| 21 | + | ||
| 22 | +import java.lang.reflect.Field; | ||
| 23 | +import java.sql.Connection; | ||
| 24 | +import java.sql.PreparedStatement; | ||
| 25 | +import java.sql.ResultSet; | ||
| 26 | +import java.util.*; | ||
| 34 | 27 | ||
| 35 | @Service | 28 | @Service |
| 36 | public class GpsServiceImpl implements GpsService { | 29 | public class GpsServiceImpl implements GpsService { |
| @@ -51,6 +44,9 @@ public class GpsServiceImpl implements GpsService { | @@ -51,6 +44,9 @@ public class GpsServiceImpl implements GpsService { | ||
| 51 | @Autowired | 44 | @Autowired |
| 52 | GpsRealData gpsRealData; | 45 | GpsRealData gpsRealData; |
| 53 | 46 | ||
| 47 | + @Autowired | ||
| 48 | + JdbcTemplate jdbcTemplate; | ||
| 49 | + | ||
| 54 | // 历史gps查询 | 50 | // 历史gps查询 |
| 55 | @Override | 51 | @Override |
| 56 | public List<Map<String, Object>> history(String device, Long startTime, Long endTime, int directions) { | 52 | public List<Map<String, Object>> history(String device, Long startTime, Long endTime, int directions) { |
| @@ -199,9 +195,9 @@ public class GpsServiceImpl implements GpsService { | @@ -199,9 +195,9 @@ public class GpsServiceImpl implements GpsService { | ||
| 199 | inv = inv.substring(0, inv.length() - 1); | 195 | inv = inv.substring(0, inv.length() - 1); |
| 200 | 196 | ||
| 201 | // 查询到离站数据 | 197 | // 查询到离站数据 |
| 202 | - Map<String, ArrivalEntity> arrivalMap = findArrivalByTs(weekOfYear/* 30 */, st, et, inv); | 198 | + //Map<String, ArrivalEntity> arrivalMap = findArrivalByTs(weekOfYear/* 30 */, st, et, inv); |
| 203 | 199 | ||
| 204 | - String sql = "select DEVICE_ID,LON,LAT,TS,INOUT_STOP,SERVICE_STATE ,STOP_NO from bsth_c_gps_info where days_year=? and device_id in (" | 200 | + String sql = "select DEVICE_ID,LON,LAT,TS,INOUT_STOP,SERVICE_STATE ,STOP_NO,DIRECTION,LINE_ID,SPEED_GPS from bsth_c_gps_info where days_year=? and device_id in (" |
| 205 | + inv + ") and ts > ? and ts < ?"; | 201 | + inv + ") and ts > ? and ts < ?"; |
| 206 | try { | 202 | try { |
| 207 | conn = DBUtils_MS.getConnection(); | 203 | conn = DBUtils_MS.getConnection(); |
| @@ -235,15 +231,19 @@ public class GpsServiceImpl implements GpsService { | @@ -235,15 +231,19 @@ public class GpsServiceImpl implements GpsService { | ||
| 235 | map.put("ts", rs.getLong("TS")); | 231 | map.put("ts", rs.getLong("TS")); |
| 236 | map.put("timestamp", rs.getLong("TS")); | 232 | map.put("timestamp", rs.getLong("TS")); |
| 237 | map.put("stopNo", rs.getString("STOP_NO")); | 233 | map.put("stopNo", rs.getString("STOP_NO")); |
| 234 | + map.put("direction", rs.getFloat("DIRECTION")); | ||
| 235 | + | ||
| 236 | + map.put("lineId", rs.getString("LINE_ID")); | ||
| 237 | + map.put("speed", rs.getFloat("SPEED_GPS")); | ||
| 238 | 238 | ||
| 239 | inOutStop = rs.getInt("INOUT_STOP"); | 239 | inOutStop = rs.getInt("INOUT_STOP"); |
| 240 | map.put("inout_stop", inOutStop); | 240 | map.put("inout_stop", inOutStop); |
| 241 | 241 | ||
| 242 | - arrival = arrivalMap.get(rs.getString("DEVICE_ID") + "_" + rs.getLong("TS")); | ||
| 243 | - if (arrival != null) { | ||
| 244 | - map.put("inout_stop_info", arrival); | ||
| 245 | - map.put("inout_stop", arrival.getInOut()); | ||
| 246 | - } | 242 | + /*analyse = arrivalMap.get(rs.getString("DEVICE_ID") + "_" + rs.getLong("TS")); |
| 243 | + if (analyse != null) { | ||
| 244 | + map.put("inout_stop_info", analyse); | ||
| 245 | + map.put("inout_stop", analyse.getInOut()); | ||
| 246 | + }*/ | ||
| 247 | map.put("nbbm", BasicData.deviceId2NbbmMap.get(rs.getString("DEVICE_ID"))); | 247 | map.put("nbbm", BasicData.deviceId2NbbmMap.get(rs.getString("DEVICE_ID"))); |
| 248 | map.put("state", 0); | 248 | map.put("state", 0); |
| 249 | // 上下行 | 249 | // 上下行 |
| @@ -388,6 +388,22 @@ public class GpsServiceImpl implements GpsService { | @@ -388,6 +388,22 @@ public class GpsServiceImpl implements GpsService { | ||
| 388 | return rs; | 388 | return rs; |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | + @Override | ||
| 392 | + public Map<String, Object> findRoadSpeed(String lineCode) { | ||
| 393 | + Map<String, Object> rs = new HashMap<>(); | ||
| 394 | + | ||
| 395 | + try { | ||
| 396 | + String sql = "select ID, ST_AsText(GROAD_VECTOR) as GROAD_VECTOR,ROAD_CODE,ROAD_NAME,SPEED from bsth_c_road where road_code in(select section_code from bsth_c_sectionroute where line_code=? and destroy=0)"; | ||
| 397 | + List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, lineCode); | ||
| 398 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 399 | + rs.put("roads", list); | ||
| 400 | + } catch (DataAccessException e) { | ||
| 401 | + logger.error("", e); | ||
| 402 | + rs.put("status", ResponseCode.ERROR); | ||
| 403 | + } | ||
| 404 | + return rs; | ||
| 405 | + } | ||
| 406 | + | ||
| 391 | private void sortGpsList(final Field f, List<GpsEntity> rs) { | 407 | private void sortGpsList(final Field f, List<GpsEntity> rs) { |
| 392 | Collections.sort(rs, new Comparator<GpsEntity>() { | 408 | Collections.sort(rs, new Comparator<GpsEntity>() { |
| 393 | 409 |
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| @@ -573,6 +573,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | @@ -573,6 +573,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | ||
| 573 | String tomorrow = sdfnyr.format(DateUtils.addDays(new Date(), +1)); | 573 | String tomorrow = sdfnyr.format(DateUtils.addDays(new Date(), +1)); |
| 574 | // 查询所有班次 | 574 | // 查询所有班次 |
| 575 | List<SchedulePlanInfo> schedulePlanList = schedulePlanInfoRepository.findLineScheduleBc(tomorrow); | 575 | List<SchedulePlanInfo> schedulePlanList = schedulePlanInfoRepository.findLineScheduleBc(tomorrow); |
| 576 | + int j = 0; // 初始化标识 | ||
| 576 | if(schedulePlanList != null ){ | 577 | if(schedulePlanList != null ){ |
| 577 | int size = schedulePlanList.size(); | 578 | int size = schedulePlanList.size(); |
| 578 | for (int i = 0; i < size; i++) { | 579 | for (int i = 0; i < size; i++) { |
| @@ -583,7 +584,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | @@ -583,7 +584,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | ||
| 583 | if(line.getInUse() == null || line.getInUse() == 0){ | 584 | if(line.getInUse() == null || line.getInUse() == 0){ |
| 584 | continue; | 585 | continue; |
| 585 | } | 586 | } |
| 586 | - if(i == 0){// 第一次,则初始化值 | 587 | + if(++j == 1){// 第一次,则初始化值 |
| 587 | zbh = schedulePlanInfo.getClZbh(); | 588 | zbh = schedulePlanInfo.getClZbh(); |
| 588 | lp = schedulePlanInfo.getLp(); | 589 | lp = schedulePlanInfo.getLp(); |
| 589 | // 拼装XML | 590 | // 拼装XML |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -613,11 +613,32 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -613,11 +613,32 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 613 | 613 | ||
| 614 | @Override | 614 | @Override |
| 615 | public List<Object[]> historyMessage(String line, String date, String code) { | 615 | public List<Object[]> historyMessage(String line, String date, String code) { |
| 616 | + | ||
| 617 | + String sql="select t.car_code,d.sender,d.txt_content,d.timestamp from (" | ||
| 618 | + + " select equipment_code,car_code from bsth_c_cars where id in(" | ||
| 619 | + + " select cl from bsth_c_s_ccinfo where xl in ( " | ||
| 620 | + + " select id from bsth_c_line where line_code=?1 ))) t" | ||
| 621 | + + " left join bsth_v_directive_60 d on t.equipment_code=d.device_id " | ||
| 622 | + + " where d.timestamp >=?2 and d.timestamp <=?3 and t.car_code like '%?4%'"; | ||
| 616 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | 623 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| 617 | - List<Object[]> list = scheduleRealInfoRepository.historyMessage(line, date, code); | 624 | + long d= 0; |
| 625 | + long t=0; | ||
| 626 | + if(date.length()>0){ | ||
| 627 | + try { | ||
| 628 | + d=sdf.parse(date+" 00:00:00").getTime(); | ||
| 629 | + t=sdf.parse(date+" 23:59:59").getTime(); | ||
| 630 | + } catch (ParseException e) { | ||
| 631 | + // TODO Auto-generated catch block | ||
| 632 | + e.printStackTrace(); | ||
| 633 | + } | ||
| 634 | + | ||
| 635 | + } | ||
| 636 | + | ||
| 637 | + List<Object[]> list = scheduleRealInfoRepository.historyMessage(line,d,t, code); | ||
| 618 | for(Object[] obj:list){ | 638 | for(Object[] obj:list){ |
| 619 | if(obj != null){ | 639 | if(obj != null){ |
| 620 | - obj[4] = sdf.format(new Date(Long.parseLong(obj[4].toString()))); | 640 | + obj[3] = sdf.format(new Date(Long.parseLong(obj[3].toString()))); |
| 641 | + obj[4] = BasicData.lineCode2NameMap.get(line); | ||
| 621 | } | 642 | } |
| 622 | } | 643 | } |
| 623 | return list; | 644 | return list; |
| @@ -1129,10 +1150,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1129,10 +1150,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1129 | addMileage += tempJhlc; | 1150 | addMileage += tempJhlc; |
| 1130 | ljbc++; | 1151 | ljbc++; |
| 1131 | }else{ | 1152 | }else{ |
| 1132 | - if(scheduleRealInfo.getBcType().equals("normal")){ | 1153 | + if( !(scheduleRealInfo.getBcType().equals("in") |
| 1154 | + ||scheduleRealInfo.getBcType().equals("out")) ){ | ||
| 1133 | jhbc++; | 1155 | jhbc++; |
| 1156 | + jhlc += tempJhlc; | ||
| 1134 | } | 1157 | } |
| 1135 | - jhlc += tempJhlc; | 1158 | + |
| 1136 | if(scheduleRealInfo.getStatus() == -1){ | 1159 | if(scheduleRealInfo.getStatus() == -1){ |
| 1137 | remMileage += tempJhlc; | 1160 | remMileage += tempJhlc; |
| 1138 | cjbc++; | 1161 | cjbc++; |
| @@ -1143,11 +1166,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1143,11 +1166,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1143 | if(childTaskPlans.isEmpty()){ | 1166 | if(childTaskPlans.isEmpty()){ |
| 1144 | if(scheduleRealInfo.getBcType().equals("in") || | 1167 | if(scheduleRealInfo.getBcType().equals("in") || |
| 1145 | scheduleRealInfo.getBcType().equals("out")){ | 1168 | scheduleRealInfo.getBcType().equals("out")){ |
| 1146 | - ksgl += tempJhlc; | ||
| 1147 | jcclc +=tempJhlc; | 1169 | jcclc +=tempJhlc; |
| 1148 | - }else if(scheduleRealInfo.getBcType().equals("venting")){ | ||
| 1149 | - ksgl += tempJhlc; | ||
| 1150 | - }else{ | 1170 | + } |
| 1171 | + //主任务 放空班次属于营运 | ||
| 1172 | +// else if(scheduleRealInfo.getBcType().equals("venting")){ | ||
| 1173 | +// ksgl += tempJhlc; | ||
| 1174 | +// } | ||
| 1175 | + else{ | ||
| 1151 | if(scheduleRealInfo.getStatus() != -1){ | 1176 | if(scheduleRealInfo.getStatus() != -1){ |
| 1152 | yygl += tempJhlc; | 1177 | yygl += tempJhlc; |
| 1153 | } | 1178 | } |
| @@ -1160,8 +1185,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1160,8 +1185,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1160 | ksgl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 1185 | ksgl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 1161 | }else{ | 1186 | }else{ |
| 1162 | if(childTaskPlan.isDestroy()){ | 1187 | if(childTaskPlan.isDestroy()){ |
| 1163 | - remMileage += tempJhlc; | ||
| 1164 | - cjbc++; | 1188 | + remMileage += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 1189 | +// cjbc++; | ||
| 1165 | }else{ | 1190 | }else{ |
| 1166 | yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 1191 | yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 1167 | } | 1192 | } |
| @@ -1175,12 +1200,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1175,12 +1200,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1175 | map.put("addMileage", format.format(addMileage)); | 1200 | map.put("addMileage", format.format(addMileage)); |
| 1176 | map.put("yygl", format.format(yygl)); | 1201 | map.put("yygl", format.format(yygl)); |
| 1177 | map.put("ksgl", format.format(ksgl)); | 1202 | map.put("ksgl", format.format(ksgl)); |
| 1178 | - map.put("realMileage", format.format(yygl+ksgl)); | 1203 | + map.put("realMileage", format.format(yygl+ksgl+jcclc)); |
| 1179 | map.put("jhbc", jhbc); | 1204 | map.put("jhbc", jhbc); |
| 1180 | map.put("cjbc", cjbc); | 1205 | map.put("cjbc", cjbc); |
| 1181 | map.put("ljbc", ljbc); | 1206 | map.put("ljbc", ljbc); |
| 1182 | map.put("sjbc", jhbc-cjbc+ljbc); | 1207 | map.put("sjbc", jhbc-cjbc+ljbc); |
| 1183 | map.put("jcclc", jcclc); | 1208 | map.put("jcclc", jcclc); |
| 1209 | + map.put("zkslc", ksgl+jcclc); | ||
| 1184 | return map; | 1210 | return map; |
| 1185 | } | 1211 | } |
| 1186 | 1212 | ||
| @@ -1259,115 +1285,121 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1259,115 +1285,121 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1259 | Map<String,Object> map = new HashMap<String, Object>(); | 1285 | Map<String,Object> map = new HashMap<String, Object>(); |
| 1260 | for(ScheduleRealInfo scheduleRealInfo: list){ | 1286 | for(ScheduleRealInfo scheduleRealInfo: list){ |
| 1261 | if(scheduleRealInfo != null){ | 1287 | if(scheduleRealInfo != null){ |
| 1262 | - Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); | ||
| 1263 | - //计算实际里程,少驶里程,计划里程=实际里程+少驶里程 | ||
| 1264 | - if(childTaskPlans.isEmpty()){ | ||
| 1265 | - tempJhlc = scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc(); | ||
| 1266 | - jhlc += tempJhlc; | ||
| 1267 | - if(scheduleRealInfo.getStatus() == 2){ | ||
| 1268 | - sjgl += tempJhlc; | ||
| 1269 | - }else if(scheduleRealInfo.getStatus() == -1){ | ||
| 1270 | - ssgl += tempJhlc; | ||
| 1271 | - if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("路阻") != -1){ | ||
| 1272 | - ssgl_lz += tempJhlc; | ||
| 1273 | - }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("吊慢") != -1){ | ||
| 1274 | - ssgl_dm += tempJhlc; | ||
| 1275 | - }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("故障") != -1){ | ||
| 1276 | - ssgl_gz += tempJhlc; | ||
| 1277 | - }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("纠纷") != -1){ | ||
| 1278 | - ssgl_jf += tempJhlc; | ||
| 1279 | - }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("肇事") != -1){ | ||
| 1280 | - ssgl_zs += tempJhlc; | ||
| 1281 | - }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("缺人") != -1){ | ||
| 1282 | - ssgl_qr += tempJhlc; | ||
| 1283 | - }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("缺车") != -1){ | ||
| 1284 | - ssgl_qc += tempJhlc; | ||
| 1285 | - }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("客稀") != -1){ | ||
| 1286 | - ssgl_kx += tempJhlc; | ||
| 1287 | - }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("气候") != -1){ | ||
| 1288 | - ssgl_qh += tempJhlc; | ||
| 1289 | - }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("援外") != -1){ | ||
| 1290 | - ssgl_yw += tempJhlc; | ||
| 1291 | - }else{ | ||
| 1292 | - ssgl_other += tempJhlc; | ||
| 1293 | - } | ||
| 1294 | - | 1288 | + |
| 1289 | + if(!(scheduleRealInfo.getBcType().equals("in") | ||
| 1290 | + ||scheduleRealInfo.getBcType().equals("out")) ){ | ||
| 1291 | + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); | ||
| 1292 | + //计算实际里程,少驶里程,计划里程=实际里程+少驶里程 | ||
| 1293 | + if(childTaskPlans.isEmpty()){ | ||
| 1294 | + tempJhlc = scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc(); | ||
| 1295 | //临加公里 | 1295 | //临加公里 |
| 1296 | if(scheduleRealInfo.isSflj()){ | 1296 | if(scheduleRealInfo.isSflj()){ |
| 1297 | ljgl += tempJhlc; | 1297 | ljgl += tempJhlc; |
| 1298 | + }else{ | ||
| 1299 | + jhlc += tempJhlc; | ||
| 1298 | } | 1300 | } |
| 1299 | - }else{ | ||
| 1300 | - ssgl += tempJhlc; | ||
| 1301 | - ssgl_other += tempJhlc; | ||
| 1302 | - } | ||
| 1303 | - }else{ | ||
| 1304 | - Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | ||
| 1305 | - while(it.hasNext()){ | ||
| 1306 | - ChildTaskPlan childTaskPlan = it.next(); | ||
| 1307 | - childMileage = childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | ||
| 1308 | - jhlc += childMileage; | ||
| 1309 | - if(childTaskPlan.isDestroy()){ | ||
| 1310 | - ssgl += childMileage; | ||
| 1311 | - if(childTaskPlan.getDestroyReason().equals("路阻")){ | ||
| 1312 | - ssgl_lz += childTaskPlan.getMileage(); | ||
| 1313 | - }else if(childTaskPlan.getDestroyReason().equals("吊慢")){ | ||
| 1314 | - ssgl_dm += childTaskPlan.getMileage(); | ||
| 1315 | - }else if(childTaskPlan.getDestroyReason().equals("故障")){ | ||
| 1316 | - ssgl_gz += childTaskPlan.getMileage(); | ||
| 1317 | - }else if(childTaskPlan.getDestroyReason().equals("纠纷")){ | ||
| 1318 | - ssgl_jf += childTaskPlan.getMileage(); | ||
| 1319 | - }else if(childTaskPlan.getDestroyReason().equals("肇事")){ | ||
| 1320 | - ssgl_zs += childTaskPlan.getMileage(); | ||
| 1321 | - }else if(childTaskPlan.getDestroyReason().equals("缺人")){ | ||
| 1322 | - ssgl_qr += childTaskPlan.getMileage(); | ||
| 1323 | - }else if(childTaskPlan.getDestroyReason().equals("缺车")){ | ||
| 1324 | - ssgl_qc += childTaskPlan.getMileage(); | ||
| 1325 | - }else if(childTaskPlan.getDestroyReason().equals("客稀")){ | ||
| 1326 | - ssgl_kx += childTaskPlan.getMileage(); | ||
| 1327 | - }else if(childTaskPlan.getDestroyReason().equals("气候")){ | ||
| 1328 | - ssgl_qh += childTaskPlan.getMileage(); | ||
| 1329 | - }else if(childTaskPlan.getDestroyReason().equals("援外")){ | ||
| 1330 | - ssgl_yw += childTaskPlan.getMileage(); | 1301 | + if(scheduleRealInfo.getStatus() == 2){ |
| 1302 | + sjgl += tempJhlc; | ||
| 1303 | + }else if(scheduleRealInfo.getStatus() == -1){ | ||
| 1304 | + ssgl += tempJhlc; | ||
| 1305 | + if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("路阻") != -1){ | ||
| 1306 | + ssgl_lz += tempJhlc; | ||
| 1307 | + }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("吊慢") != -1){ | ||
| 1308 | + ssgl_dm += tempJhlc; | ||
| 1309 | + }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("故障") != -1){ | ||
| 1310 | + ssgl_gz += tempJhlc; | ||
| 1311 | + }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("纠纷") != -1){ | ||
| 1312 | + ssgl_jf += tempJhlc; | ||
| 1313 | + }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("肇事") != -1){ | ||
| 1314 | + ssgl_zs += tempJhlc; | ||
| 1315 | + }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("缺人") != -1){ | ||
| 1316 | + ssgl_qr += tempJhlc; | ||
| 1317 | + }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("缺车") != -1){ | ||
| 1318 | + ssgl_qc += tempJhlc; | ||
| 1319 | + }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("客稀") != -1){ | ||
| 1320 | + ssgl_kx += tempJhlc; | ||
| 1321 | + }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("气候") != -1){ | ||
| 1322 | + ssgl_qh += tempJhlc; | ||
| 1323 | + }else if((scheduleRealInfo.getRemarks()==null?"":scheduleRealInfo.getRemarks()).indexOf("援外") != -1){ | ||
| 1324 | + ssgl_yw += tempJhlc; | ||
| 1331 | }else{ | 1325 | }else{ |
| 1332 | - ssgl_other += childTaskPlan.getMileage(); | 1326 | + ssgl_other += tempJhlc; |
| 1333 | } | 1327 | } |
| 1328 | + | ||
| 1329 | + | ||
| 1334 | }else{ | 1330 | }else{ |
| 1335 | - sjgl += childMileage; | 1331 | + ssgl += tempJhlc; |
| 1332 | + ssgl_other += tempJhlc; | ||
| 1333 | + } | ||
| 1334 | + }else{ | ||
| 1335 | + Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | ||
| 1336 | + while(it.hasNext()){ | ||
| 1337 | + ChildTaskPlan childTaskPlan = it.next(); | ||
| 1338 | + childMileage = childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | ||
| 1339 | + jhlc += childMileage; | ||
| 1340 | + if(childTaskPlan.isDestroy()){ | ||
| 1341 | + ssgl += childMileage; | ||
| 1342 | + if(childTaskPlan.getDestroyReason().equals("路阻")){ | ||
| 1343 | + ssgl_lz += childTaskPlan.getMileage(); | ||
| 1344 | + }else if(childTaskPlan.getDestroyReason().equals("吊慢")){ | ||
| 1345 | + ssgl_dm += childTaskPlan.getMileage(); | ||
| 1346 | + }else if(childTaskPlan.getDestroyReason().equals("故障")){ | ||
| 1347 | + ssgl_gz += childTaskPlan.getMileage(); | ||
| 1348 | + }else if(childTaskPlan.getDestroyReason().equals("纠纷")){ | ||
| 1349 | + ssgl_jf += childTaskPlan.getMileage(); | ||
| 1350 | + }else if(childTaskPlan.getDestroyReason().equals("肇事")){ | ||
| 1351 | + ssgl_zs += childTaskPlan.getMileage(); | ||
| 1352 | + }else if(childTaskPlan.getDestroyReason().equals("缺人")){ | ||
| 1353 | + ssgl_qr += childTaskPlan.getMileage(); | ||
| 1354 | + }else if(childTaskPlan.getDestroyReason().equals("缺车")){ | ||
| 1355 | + ssgl_qc += childTaskPlan.getMileage(); | ||
| 1356 | + }else if(childTaskPlan.getDestroyReason().equals("客稀")){ | ||
| 1357 | + ssgl_kx += childTaskPlan.getMileage(); | ||
| 1358 | + }else if(childTaskPlan.getDestroyReason().equals("气候")){ | ||
| 1359 | + ssgl_qh += childTaskPlan.getMileage(); | ||
| 1360 | + }else if(childTaskPlan.getDestroyReason().equals("援外")){ | ||
| 1361 | + ssgl_yw += childTaskPlan.getMileage(); | ||
| 1362 | + }else{ | ||
| 1363 | + ssgl_other += childTaskPlan.getMileage(); | ||
| 1364 | + } | ||
| 1365 | + }else{ | ||
| 1366 | + sjgl += childMileage; | ||
| 1367 | + } | ||
| 1336 | } | 1368 | } |
| 1337 | } | 1369 | } |
| 1338 | - } | ||
| 1339 | - | ||
| 1340 | - //班次 | ||
| 1341 | - jhbc++; | ||
| 1342 | - String[] fcsj = scheduleRealInfo.getFcsj().split(":"); | ||
| 1343 | - String[] fcsjActual = (scheduleRealInfo.getFcsjActual()==null?"0:00":scheduleRealInfo.getFcsjActual()).split(":"); | ||
| 1344 | - if((Integer.parseInt(fcsj[0])*60+Integer.parseInt(fcsj[1])) > sj_0 && (Integer.parseInt(fcsj[0])*60+Integer.parseInt(fcsj[1])) < sj_1){ | ||
| 1345 | - jhbc_m++; | ||
| 1346 | - }else if((Integer.parseInt(fcsj[0])*60+Integer.parseInt(fcsj[1])) > sj_2 && (Integer.parseInt(fcsj[0])*60+Integer.parseInt(fcsj[1])) < sj_3){ | ||
| 1347 | - jhbc_a++; | ||
| 1348 | - } | ||
| 1349 | - if(scheduleRealInfo.getStatus() == 2){ | ||
| 1350 | - sjbc++; | ||
| 1351 | - if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_1){ | ||
| 1352 | - sjbc_m++; | ||
| 1353 | - }else if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_3){ | ||
| 1354 | - sjbc_a++; | 1370 | + |
| 1371 | + //班次 | ||
| 1372 | + jhbc++; | ||
| 1373 | + String[] fcsj = scheduleRealInfo.getFcsj().split(":"); | ||
| 1374 | + String[] fcsjActual = (scheduleRealInfo.getFcsjActual()==null?"0:00":scheduleRealInfo.getFcsjActual()).split(":"); | ||
| 1375 | + if((Integer.parseInt(fcsj[0])*60+Integer.parseInt(fcsj[1])) > sj_0 && (Integer.parseInt(fcsj[0])*60+Integer.parseInt(fcsj[1])) < sj_1){ | ||
| 1376 | + jhbc_m++; | ||
| 1377 | + }else if((Integer.parseInt(fcsj[0])*60+Integer.parseInt(fcsj[1])) > sj_2 && (Integer.parseInt(fcsj[0])*60+Integer.parseInt(fcsj[1])) < sj_3){ | ||
| 1378 | + jhbc_a++; | ||
| 1355 | } | 1379 | } |
| 1356 | - } | ||
| 1357 | - if(scheduleRealInfo.isSflj()){ | ||
| 1358 | - ljbc++; | ||
| 1359 | - if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_1){ | ||
| 1360 | - ljbc_m++; | ||
| 1361 | - }else if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_3){ | ||
| 1362 | - ljbc_a++; | 1380 | + if(scheduleRealInfo.getStatus() == 2){ |
| 1381 | + sjbc++; | ||
| 1382 | + if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_1){ | ||
| 1383 | + sjbc_m++; | ||
| 1384 | + }else if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_3){ | ||
| 1385 | + sjbc_a++; | ||
| 1386 | + } | ||
| 1363 | } | 1387 | } |
| 1364 | - } | ||
| 1365 | - if(scheduleRealInfo.getBcType().equals("venting")){ | ||
| 1366 | - fzbc++; | ||
| 1367 | - if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_1){ | ||
| 1368 | - fzbc_m++; | ||
| 1369 | - }else if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_3){ | ||
| 1370 | - fzbc_a++; | 1388 | + if(scheduleRealInfo.isSflj()){ |
| 1389 | + ljbc++; | ||
| 1390 | + if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_1){ | ||
| 1391 | + ljbc_m++; | ||
| 1392 | + }else if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_3){ | ||
| 1393 | + ljbc_a++; | ||
| 1394 | + } | ||
| 1395 | + } | ||
| 1396 | + if(scheduleRealInfo.getBcType().equals("venting")){ | ||
| 1397 | + fzbc++; | ||
| 1398 | + if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_1){ | ||
| 1399 | + fzbc_m++; | ||
| 1400 | + }else if((Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0])*60+Integer.parseInt(fcsjActual[1])) < sj_3){ | ||
| 1401 | + fzbc_a++; | ||
| 1402 | + } | ||
| 1371 | } | 1403 | } |
| 1372 | } | 1404 | } |
| 1373 | } | 1405 | } |
src/main/java/com/bsth/service/schedule/CarConfigInfoService.java
| @@ -6,6 +6,6 @@ import com.bsth.entity.schedule.CarConfigInfo; | @@ -6,6 +6,6 @@ import com.bsth.entity.schedule.CarConfigInfo; | ||
| 6 | * Created by xu on 16/5/9. | 6 | * Created by xu on 16/5/9. |
| 7 | */ | 7 | */ |
| 8 | public interface CarConfigInfoService extends BService<CarConfigInfo, Long> { | 8 | public interface CarConfigInfoService extends BService<CarConfigInfo, Long> { |
| 9 | - public void validate_cars(CarConfigInfo carConfigInfo) throws ScheduleException; | ||
| 10 | - public void toggleCancel(Long id) throws ScheduleException; | 9 | + void validate_cars(CarConfigInfo carConfigInfo) throws ScheduleException; |
| 10 | + void toggleCancel(Long id) throws ScheduleException; | ||
| 11 | } | 11 | } |
src/main/java/com/bsth/service/schedule/CarDeviceService.java
| 1 | -package com.bsth.service.schedule; | ||
| 2 | - | ||
| 3 | -import com.bsth.entity.CarDevice; | ||
| 4 | - | ||
| 5 | -/** | ||
| 6 | - * Created by xu on 16/12/15. | ||
| 7 | - */ | ||
| 8 | -public interface CarDeviceService extends BService<CarDevice, Long> { | ||
| 9 | - void validate_qyrq(CarDevice carDevice) throws ScheduleException; | ||
| 10 | -} | 1 | +package com.bsth.service.schedule; |
| 2 | + | ||
| 3 | +import com.bsth.entity.CarDevice; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * Created by xu on 16/12/15. | ||
| 7 | + */ | ||
| 8 | +public interface CarDeviceService extends BService<CarDevice, Long> { | ||
| 9 | + void validate_qyrq(CarDevice carDevice) throws ScheduleException; | ||
| 10 | +} |
src/main/java/com/bsth/service/schedule/EmployeeService.java
| 1 | -package com.bsth.service.schedule; | ||
| 2 | - | ||
| 3 | -import com.bsth.entity.Personnel; | ||
| 4 | - | ||
| 5 | -/** | ||
| 6 | - * Created by xu on 16/12/15. | ||
| 7 | - */ | ||
| 8 | -public interface EmployeeService extends BService<Personnel, Integer> { | ||
| 9 | - public void validate_gh(Personnel personnel) throws ScheduleException; | ||
| 10 | -} | 1 | +package com.bsth.service.schedule; |
| 2 | + | ||
| 3 | +import com.bsth.entity.Personnel; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * Created by xu on 16/12/15. | ||
| 7 | + */ | ||
| 8 | +public interface EmployeeService extends BService<Personnel, Integer> { | ||
| 9 | + public void validate_gh(Personnel personnel) throws ScheduleException; | ||
| 10 | +} |
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
| @@ -912,7 +912,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -912,7 +912,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 912 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 912 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 913 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); | 913 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| 914 | Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>(); | 914 | Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>(); |
| 915 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"); | 915 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| 916 | 916 | ||
| 917 | String company = map.get("company").toString(); | 917 | String company = map.get("company").toString(); |
| 918 | String subCompany = map.get("subCompany").toString(); | 918 | String subCompany = map.get("subCompany").toString(); |
src/main/java/com/bsth/service/schedule/RerunService.java
| 1 | package com.bsth.service.schedule; | 1 | package com.bsth.service.schedule; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.rule.RerunRule; | 3 | import com.bsth.entity.schedule.rule.RerunRule; |
| 4 | -import com.bsth.service.BaseService; | ||
| 5 | 4 | ||
| 6 | /** | 5 | /** |
| 7 | * Created by xu on 16/10/20. | 6 | * Created by xu on 16/10/20. |
| 8 | */ | 7 | */ |
| 9 | -public interface RerunService extends BaseService<RerunRule, Long> { | 8 | +public interface RerunService extends BService<RerunRule, Long> { |
| 10 | } | 9 | } |
src/main/java/com/bsth/service/schedule/RerunServiceImpl.java deleted
100644 → 0
| 1 | -package com.bsth.service.schedule; | ||
| 2 | - | ||
| 3 | -import com.bsth.common.ResponseCode; | ||
| 4 | -import com.bsth.entity.schedule.rule.RerunRule; | ||
| 5 | -import com.bsth.repository.schedule.RerunRuleRepository; | ||
| 6 | -import com.bsth.service.impl.BaseServiceImpl; | ||
| 7 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | -import org.springframework.stereotype.Service; | ||
| 9 | - | ||
| 10 | -import javax.transaction.Transactional; | ||
| 11 | -import java.util.HashMap; | ||
| 12 | -import java.util.Map; | ||
| 13 | - | ||
| 14 | -/** | ||
| 15 | - * Created by xu on 16/10/20. | ||
| 16 | - */ | ||
| 17 | -@Service | ||
| 18 | -public class RerunServiceImpl extends BaseServiceImpl<RerunRule, Long> implements RerunService { | ||
| 19 | - | ||
| 20 | - @Autowired | ||
| 21 | - private RerunRuleRepository rerunRuleRepository; | ||
| 22 | - | ||
| 23 | - @Override | ||
| 24 | - @Transactional | ||
| 25 | - public Map<String, Object> delete(Long aLong) { | ||
| 26 | - // 获取带作废的数据 | ||
| 27 | - RerunRule rerunRule = rerunRuleRepository.findOne(aLong); | ||
| 28 | - | ||
| 29 | - toogleIsCancel(rerunRule); | ||
| 30 | - | ||
| 31 | - Map<String, Object> map = new HashMap<>(); | ||
| 32 | - map.put("status", ResponseCode.SUCCESS); | ||
| 33 | - | ||
| 34 | - return map; | ||
| 35 | - | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | - /** | ||
| 39 | - * 撤销/作废切换。 | ||
| 40 | - * @param rerunRule | ||
| 41 | - */ | ||
| 42 | - private void toogleIsCancel(RerunRule rerunRule) { | ||
| 43 | - boolean isCancel = rerunRule.getIsCancel(); | ||
| 44 | - if (isCancel) { | ||
| 45 | - rerunRule.setIsCancel(false); | ||
| 46 | - } else { | ||
| 47 | - rerunRule.setIsCancel(true); | ||
| 48 | - } | ||
| 49 | - } | ||
| 50 | -} |
src/main/java/com/bsth/service/schedule/TTInfoService.java
| 1 | package com.bsth.service.schedule; | 1 | package com.bsth.service.schedule; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.TTInfo; | 3 | import com.bsth.entity.schedule.TTInfo; |
| 4 | -import com.bsth.service.BaseService; | ||
| 5 | 4 | ||
| 6 | /** | 5 | /** |
| 7 | * Created by xu on 16/5/12. | 6 | * Created by xu on 16/5/12. |
| 8 | */ | 7 | */ |
| 9 | -public interface TTInfoService extends BaseService<TTInfo, Long> { | 8 | +public interface TTInfoService extends BService<TTInfo, Long> { |
| 9 | + void validate_name(TTInfo ttInfo) throws ScheduleException; | ||
| 10 | + void validate_n_d(TTInfo ttInfo) throws ScheduleException; | ||
| 11 | + void validate_s_d(TTInfo ttInfo) throws ScheduleException; | ||
| 12 | + void toggleCancel(Long id) throws ScheduleException; | ||
| 13 | + | ||
| 10 | } | 14 | } |
src/main/java/com/bsth/service/schedule/TTInfoServiceImpl.java deleted
100644 → 0
| 1 | -package com.bsth.service.schedule; | ||
| 2 | - | ||
| 3 | -import com.bsth.common.ResponseCode; | ||
| 4 | -import com.bsth.entity.schedule.TTInfo; | ||
| 5 | -import com.bsth.repository.schedule.TTInfoRepository; | ||
| 6 | -import com.bsth.service.impl.BaseServiceImpl; | ||
| 7 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | -import org.springframework.stereotype.Service; | ||
| 9 | - | ||
| 10 | -import javax.transaction.Transactional; | ||
| 11 | -import java.util.HashMap; | ||
| 12 | -import java.util.Map; | ||
| 13 | - | ||
| 14 | -/** | ||
| 15 | - * Created by xu on 16/5/12. | ||
| 16 | - */ | ||
| 17 | -@Service | ||
| 18 | -@Transactional | ||
| 19 | -public class TTInfoServiceImpl extends BaseServiceImpl<TTInfo, Long> implements TTInfoService { | ||
| 20 | - @Autowired | ||
| 21 | - private TTInfoRepository ttInfoRepository; | ||
| 22 | - | ||
| 23 | - @Transactional | ||
| 24 | - @Override | ||
| 25 | - public Map<String, Object> delete(Long aLong) { | ||
| 26 | - // 获取待作废的数据 | ||
| 27 | - TTInfo ttInfo = ttInfoRepository.findOne(aLong); | ||
| 28 | - | ||
| 29 | - toogleIsCancel(ttInfo); | ||
| 30 | - | ||
| 31 | - Map<String, Object> map = new HashMap<>(); | ||
| 32 | - map.put("status", ResponseCode.SUCCESS); | ||
| 33 | - | ||
| 34 | - return map; | ||
| 35 | - } | ||
| 36 | - | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - private void toogleIsCancel(TTInfo ttInfo) { | ||
| 40 | - boolean isCancel = ttInfo.getIsCancel(); | ||
| 41 | - if (isCancel) { | ||
| 42 | - ttInfo.setIsCancel(false); | ||
| 43 | - } else { | ||
| 44 | - ttInfo.setIsCancel(true); | ||
| 45 | - } | ||
| 46 | - } | ||
| 47 | -} |
src/main/java/com/bsth/service/schedule/impl/CarDeviceServiceImpl.java
| 1 | -package com.bsth.service.schedule.impl; | ||
| 2 | - | ||
| 3 | -import com.bsth.entity.CarDevice; | ||
| 4 | -import com.bsth.entity.Cars; | ||
| 5 | -import com.bsth.service.CarsService; | ||
| 6 | -import com.bsth.service.schedule.CarDeviceService; | ||
| 7 | -import com.bsth.service.schedule.ScheduleException; | ||
| 8 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | -import org.springframework.stereotype.Service; | ||
| 10 | -import org.springframework.transaction.annotation.Transactional; | ||
| 11 | -import org.springframework.util.CollectionUtils; | ||
| 12 | - | ||
| 13 | -import java.util.HashMap; | ||
| 14 | -import java.util.Map; | ||
| 15 | - | ||
| 16 | -/** | ||
| 17 | - * Created by xu on 16/12/15. | ||
| 18 | - */ | ||
| 19 | -@Service(value = "carDeviceServiceImpl_sc") | ||
| 20 | -public class CarDeviceServiceImpl extends BServiceImpl<CarDevice, Long> implements CarDeviceService { | ||
| 21 | - @Autowired | ||
| 22 | - private CarsService carsService; | ||
| 23 | - | ||
| 24 | - @Transactional | ||
| 25 | - @Override | ||
| 26 | - public CarDevice save(CarDevice carDevice) { | ||
| 27 | - // 查找对应的车辆基础信息,更新设备编号数据 | ||
| 28 | - Cars cars = carsService.findById(carDevice.getCl()); | ||
| 29 | - cars.setEquipmentCode(carDevice.getNewDeviceNo()); | ||
| 30 | - return super.save(carDevice); | ||
| 31 | - } | ||
| 32 | - | ||
| 33 | - @Transactional | ||
| 34 | - @Override | ||
| 35 | - public void validate_qyrq(CarDevice carDevice) throws ScheduleException { | ||
| 36 | - if (carDevice.getXl() == null) { | ||
| 37 | - throw new ScheduleException("线路未选择"); | ||
| 38 | - } | ||
| 39 | - if (carDevice.getCl() == null) { | ||
| 40 | - throw new ScheduleException("车辆未选择"); | ||
| 41 | - } | ||
| 42 | - Map<String, Object> param = new HashMap<>(); | ||
| 43 | - if (carDevice.getId() != null) { | ||
| 44 | - param.put("id_ne", carDevice.getId()); | ||
| 45 | - } | ||
| 46 | - param.put("xl_eq", carDevice.getXl()); | ||
| 47 | - param.put("cl_eq", carDevice.getCl()); | ||
| 48 | - param.put("qyrq_ge", carDevice.getQyrq()); | ||
| 49 | - if (!CollectionUtils.isEmpty(list(param))) { | ||
| 50 | - throw new ScheduleException("启用日期必须比历史的启用日期大"); | ||
| 51 | - } | ||
| 52 | - } | ||
| 53 | - | ||
| 54 | - @Transactional | ||
| 55 | - @Override | ||
| 56 | - public void delete(Long aLong) throws ScheduleException { | ||
| 57 | - toggleCancel(aLong); | ||
| 58 | - } | ||
| 59 | - | ||
| 60 | - @Transactional | ||
| 61 | - public void toggleCancel(Long id) throws ScheduleException { | ||
| 62 | - CarDevice carDevice = findById(id); | ||
| 63 | - if (carDevice.getIsCancel()) { | ||
| 64 | - carDevice.setIsCancel(false); | ||
| 65 | - } else { | ||
| 66 | - carDevice.setIsCancel(true); | ||
| 67 | - } | ||
| 68 | - } | ||
| 69 | -} | 1 | +package com.bsth.service.schedule.impl; |
| 2 | + | ||
| 3 | +import com.bsth.entity.CarDevice; | ||
| 4 | +import com.bsth.entity.Cars; | ||
| 5 | +import com.bsth.service.CarsService; | ||
| 6 | +import com.bsth.service.schedule.CarDeviceService; | ||
| 7 | +import com.bsth.service.schedule.ScheduleException; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.stereotype.Service; | ||
| 10 | +import org.springframework.transaction.annotation.Transactional; | ||
| 11 | +import org.springframework.util.CollectionUtils; | ||
| 12 | + | ||
| 13 | +import java.util.HashMap; | ||
| 14 | +import java.util.Map; | ||
| 15 | + | ||
| 16 | +/** | ||
| 17 | + * Created by xu on 16/12/15. | ||
| 18 | + */ | ||
| 19 | +@Service(value = "carDeviceServiceImpl_sc") | ||
| 20 | +public class CarDeviceServiceImpl extends BServiceImpl<CarDevice, Long> implements CarDeviceService { | ||
| 21 | + @Autowired | ||
| 22 | + private CarsService carsService; | ||
| 23 | + | ||
| 24 | + @Transactional | ||
| 25 | + @Override | ||
| 26 | + public CarDevice save(CarDevice carDevice) { | ||
| 27 | + // 查找对应的车辆基础信息,更新设备编号数据 | ||
| 28 | + Cars cars = carsService.findById(carDevice.getCl()); | ||
| 29 | + cars.setEquipmentCode(carDevice.getNewDeviceNo()); | ||
| 30 | + return super.save(carDevice); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + @Transactional | ||
| 34 | + @Override | ||
| 35 | + public void validate_qyrq(CarDevice carDevice) throws ScheduleException { | ||
| 36 | + if (carDevice.getXl() == null) { | ||
| 37 | + throw new ScheduleException("线路未选择"); | ||
| 38 | + } | ||
| 39 | + if (carDevice.getCl() == null) { | ||
| 40 | + throw new ScheduleException("车辆未选择"); | ||
| 41 | + } | ||
| 42 | + Map<String, Object> param = new HashMap<>(); | ||
| 43 | + if (carDevice.getId() != null) { | ||
| 44 | + param.put("id_ne", carDevice.getId()); | ||
| 45 | + } | ||
| 46 | + param.put("xl_eq", carDevice.getXl()); | ||
| 47 | + param.put("cl_eq", carDevice.getCl()); | ||
| 48 | + param.put("qyrq_ge", carDevice.getQyrq()); | ||
| 49 | + if (!CollectionUtils.isEmpty(list(param))) { | ||
| 50 | + throw new ScheduleException("启用日期必须比历史的启用日期大"); | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @Transactional | ||
| 55 | + @Override | ||
| 56 | + public void delete(Long aLong) throws ScheduleException { | ||
| 57 | + toggleCancel(aLong); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + @Transactional | ||
| 61 | + public void toggleCancel(Long id) throws ScheduleException { | ||
| 62 | + CarDevice carDevice = findById(id); | ||
| 63 | + if (carDevice.getIsCancel()) { | ||
| 64 | + carDevice.setIsCancel(false); | ||
| 65 | + } else { | ||
| 66 | + carDevice.setIsCancel(true); | ||
| 67 | + } | ||
| 68 | + } | ||
| 69 | +} |
src/main/java/com/bsth/service/schedule/impl/EmployeeServiceImpl.java
| 1 | -package com.bsth.service.schedule.impl; | ||
| 2 | - | ||
| 3 | -import com.bsth.entity.Personnel; | ||
| 4 | -import com.bsth.service.schedule.EmployeeService; | ||
| 5 | -import com.bsth.service.schedule.ScheduleException; | ||
| 6 | -import org.springframework.stereotype.Service; | ||
| 7 | -import org.springframework.transaction.annotation.Transactional; | ||
| 8 | -import org.springframework.util.CollectionUtils; | ||
| 9 | - | ||
| 10 | -import java.util.HashMap; | ||
| 11 | -import java.util.Map; | ||
| 12 | - | ||
| 13 | -/** | ||
| 14 | - * Created by xu on 16/12/15. | ||
| 15 | - */ | ||
| 16 | -@Service | ||
| 17 | -public class EmployeeServiceImpl extends BServiceImpl<Personnel, Integer> implements EmployeeService { | ||
| 18 | - @Override | ||
| 19 | - @Transactional | ||
| 20 | - public void validate_gh(Personnel personnel) throws ScheduleException { | ||
| 21 | - // 查询条件 | ||
| 22 | - Map<String, Object> param = new HashMap<>(); | ||
| 23 | - if (personnel.getId() != null) { | ||
| 24 | - param.put("id_ne", personnel.getId()); | ||
| 25 | - } | ||
| 26 | - param.put("companyCode_eq", personnel.getCompanyCode()); | ||
| 27 | - param.put("jobCode_eq", personnel.getJobCode()); | ||
| 28 | - if (!CollectionUtils.isEmpty(list(param))) { | ||
| 29 | - throw new ScheduleException("相同公司工号重复"); | ||
| 30 | - } | ||
| 31 | - } | ||
| 32 | -} | 1 | +package com.bsth.service.schedule.impl; |
| 2 | + | ||
| 3 | +import com.bsth.entity.Personnel; | ||
| 4 | +import com.bsth.service.schedule.EmployeeService; | ||
| 5 | +import com.bsth.service.schedule.ScheduleException; | ||
| 6 | +import org.springframework.stereotype.Service; | ||
| 7 | +import org.springframework.transaction.annotation.Transactional; | ||
| 8 | +import org.springframework.util.CollectionUtils; | ||
| 9 | + | ||
| 10 | +import java.util.HashMap; | ||
| 11 | +import java.util.Map; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * Created by xu on 16/12/15. | ||
| 15 | + */ | ||
| 16 | +@Service | ||
| 17 | +public class EmployeeServiceImpl extends BServiceImpl<Personnel, Integer> implements EmployeeService { | ||
| 18 | + @Override | ||
| 19 | + @Transactional | ||
| 20 | + public void validate_gh(Personnel personnel) throws ScheduleException { | ||
| 21 | + // 查询条件 | ||
| 22 | + Map<String, Object> param = new HashMap<>(); | ||
| 23 | + if (personnel.getId() != null) { | ||
| 24 | + param.put("id_ne", personnel.getId()); | ||
| 25 | + } | ||
| 26 | + param.put("companyCode_eq", personnel.getCompanyCode()); | ||
| 27 | + param.put("jobCode_eq", personnel.getJobCode()); | ||
| 28 | + if (!CollectionUtils.isEmpty(list(param))) { | ||
| 29 | + throw new ScheduleException("相同公司工号重复"); | ||
| 30 | + } | ||
| 31 | + } | ||
| 32 | +} |
src/main/java/com/bsth/service/schedule/impl/RerunServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.schedule.impl; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.schedule.rule.RerunRule; | ||
| 4 | +import com.bsth.service.schedule.RerunService; | ||
| 5 | +import com.bsth.service.schedule.ScheduleException; | ||
| 6 | +import org.springframework.stereotype.Service; | ||
| 7 | +import org.springframework.transaction.annotation.Transactional; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * Created by xu on 16/10/20. | ||
| 11 | + */ | ||
| 12 | +@Service | ||
| 13 | +public class RerunServiceImpl extends BServiceImpl<RerunRule, Long> implements RerunService { | ||
| 14 | + | ||
| 15 | + @Transactional | ||
| 16 | + @Override | ||
| 17 | + public void delete(Long aLong) throws ScheduleException { | ||
| 18 | + toggleCancel(aLong); | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + private void toggleCancel(Long id) throws ScheduleException { | ||
| 22 | + RerunRule rerunRule = findById(id); | ||
| 23 | + if (rerunRule.getIsCancel()) { | ||
| 24 | + rerunRule.setIsCancel(false); | ||
| 25 | + } else { | ||
| 26 | + rerunRule.setIsCancel(true); | ||
| 27 | + } | ||
| 28 | + } | ||
| 29 | +} |
src/main/java/com/bsth/service/schedule/impl/TTInfoServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.schedule.impl; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.schedule.TTInfo; | ||
| 4 | +import com.bsth.service.schedule.ScheduleException; | ||
| 5 | +import com.bsth.service.schedule.TTInfoService; | ||
| 6 | +import org.apache.commons.lang3.StringUtils; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | +import org.springframework.transaction.annotation.Transactional; | ||
| 9 | +import org.springframework.util.CollectionUtils; | ||
| 10 | + | ||
| 11 | +import java.util.HashMap; | ||
| 12 | +import java.util.List; | ||
| 13 | +import java.util.Map; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * Created by xu on 16/12/20. | ||
| 17 | + */ | ||
| 18 | +@Service | ||
| 19 | +public class TTInfoServiceImpl extends BServiceImpl<TTInfo, Long> implements TTInfoService { | ||
| 20 | + | ||
| 21 | + @Override | ||
| 22 | + public void validate_name(TTInfo ttInfo) throws ScheduleException { | ||
| 23 | + // 名字重复验证 | ||
| 24 | + Map<String, Object> param = new HashMap<>(); | ||
| 25 | + if (ttInfo.getId() != null) { | ||
| 26 | + param.put("id_ne", ttInfo.getId()); | ||
| 27 | + } | ||
| 28 | + param.put("xl.id_eq", ttInfo.getXl().getId()); | ||
| 29 | + param.put("name_eq", ttInfo.getName()); | ||
| 30 | + | ||
| 31 | + if (!CollectionUtils.isEmpty(list(param))) { | ||
| 32 | + throw new ScheduleException("名字重复"); | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @Override | ||
| 37 | + public void validate_n_d(TTInfo ttInfo) throws ScheduleException { | ||
| 38 | + // 常规有效日重复验证 | ||
| 39 | + // 找出所有未作废,已启用的时刻表,验证 | ||
| 40 | + Map<String, Object> param = new HashMap<>(); | ||
| 41 | + if (ttInfo.getId() != null) { | ||
| 42 | + param.put("id_ne", ttInfo.getId()); | ||
| 43 | + } | ||
| 44 | + param.put("xl.id_eq", ttInfo.getXl().getId()); | ||
| 45 | + param.put("isCancel_eq", false); | ||
| 46 | + param.put("isEnableDisTemplate_eq", true); | ||
| 47 | + List<TTInfo> ttInfos = list(param); | ||
| 48 | + if (StringUtils.isEmpty(ttInfo.getRule_days())) { | ||
| 49 | + throw new ScheduleException("常规有效日为空"); | ||
| 50 | + } else { | ||
| 51 | + String[] nds = ttInfo.getRule_days().split(","); | ||
| 52 | + for (TTInfo t : ttInfos) { | ||
| 53 | + String[] nds_e = t.getRule_days().split(","); | ||
| 54 | + for (int i = 0; i < 7; i++) { | ||
| 55 | + if ("0".equals(nds[i])) { | ||
| 56 | + // | ||
| 57 | + } else { | ||
| 58 | + if (nds[i].equals(nds_e[i])) { | ||
| 59 | + throw new ScheduleException("当前常规有效日期已经使用"); | ||
| 60 | + } | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @Override | ||
| 68 | + public void validate_s_d(TTInfo ttInfo) throws ScheduleException { | ||
| 69 | + // 特殊有效日重复验证 | ||
| 70 | + // 找出所有未作废,已启用的时刻表,验证 | ||
| 71 | + Map<String, Object> param = new HashMap<>(); | ||
| 72 | + if (ttInfo.getId() != null) { | ||
| 73 | + param.put("id_ne", ttInfo.getId()); | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + param.put("xl.id_eq", ttInfo.getXl().getId()); | ||
| 77 | + param.put("isCancel_eq", false); | ||
| 78 | + param.put("isEnableDisTemplate_eq", true); | ||
| 79 | + List<TTInfo> ttInfos = list(param); | ||
| 80 | + if (StringUtils.isEmpty(ttInfo.getSpecial_days())) { | ||
| 81 | + // | ||
| 82 | + } else { | ||
| 83 | + String[] sds = ttInfo.getSpecial_days().split(","); | ||
| 84 | + for (TTInfo t : ttInfos) { | ||
| 85 | + if (StringUtils.isEmpty(t.getSpecial_days())) { | ||
| 86 | + // | ||
| 87 | + } else { | ||
| 88 | + for (String sd : sds) { | ||
| 89 | + if (t.getSpecial_days().indexOf(sd) != -1) { | ||
| 90 | + throw new ScheduleException("当前特殊日期已经使用"); | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | + } | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + | ||
| 99 | + @Transactional | ||
| 100 | + @Override | ||
| 101 | + public void delete(Long aLong) throws ScheduleException { | ||
| 102 | + toggleCancel(aLong); | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + @Transactional | ||
| 106 | + @Override | ||
| 107 | + public void toggleCancel(Long id) throws ScheduleException { | ||
| 108 | + TTInfo ttInfo = findById(id); | ||
| 109 | + if (ttInfo.getIsCancel()) { | ||
| 110 | + ttInfo.setIsCancel(false); | ||
| 111 | + } else { | ||
| 112 | + ttInfo.setIsCancel(true); | ||
| 113 | + } | ||
| 114 | + } | ||
| 115 | +} |
src/main/resources/application-dev.properties
| @@ -32,38 +32,4 @@ spring.datasource.validation-query=select 1 | @@ -32,38 +32,4 @@ spring.datasource.validation-query=select 1 | ||
| 32 | http.gps.real.url= http://192.168.168.201:9090/transport_server/rtgps/ | 32 | http.gps.real.url= http://192.168.168.201:9090/transport_server/rtgps/ |
| 33 | #http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/ | 33 | #http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/ |
| 34 | ##\u6D88\u606F\u4E0B\u53D1 | 34 | ##\u6D88\u606F\u4E0B\u53D1 |
| 35 | -http.send.directive = http://192.168.168.201:9090/transport_server/message/server.port=9088 | ||
| 36 | -management.port= 9001 | ||
| 37 | -management.address= 127.0.0.1 | ||
| 38 | - | ||
| 39 | -spring.jpa.hibernate.ddl-auto= update | ||
| 40 | -spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 41 | -#DATABASE | ||
| 42 | -spring.jpa.database= MYSQL | ||
| 43 | -spring.jpa.show-sql= true | ||
| 44 | -spring.datasource.driver-class-name= com.mysql.jdbc.Driver | ||
| 45 | -spring.datasource.url= jdbc:mysql://127.0.0.1/qp_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 46 | -spring.datasource.username= root | ||
| 47 | -spring.datasource.password= | ||
| 48 | -#spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 49 | -#spring.datasource.username= root | ||
| 50 | -#spring.datasource.password= root | ||
| 51 | -#DATASOURCE | ||
| 52 | -spring.datasource.max-active=100 | ||
| 53 | -spring.datasource.max-idle=8 | ||
| 54 | -spring.datasource.min-idle=8 | ||
| 55 | -spring.datasource.initial-size=5 | ||
| 56 | - | ||
| 57 | -spring.datasource.test-on-borrow=true | ||
| 58 | -spring.datasource.test-on-connect=true | ||
| 59 | -spring.datasource.test-on-return=true | ||
| 60 | -spring.datasource.test-while-idle=true | ||
| 61 | -spring.datasource.validation-query=select 1 | ||
| 62 | - | ||
| 63 | -## | ||
| 64 | -#222.66.0.204:5555 | ||
| 65 | -##\u5B9E\u65F6gps | ||
| 66 | -http.gps.real.url= http://192.168.168.201:9090/transport_server/rtgps/ | ||
| 67 | -#http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/ | ||
| 68 | -##\u6D88\u606F\u4E0B\u53D1 | ||
| 69 | http.send.directive = http://192.168.168.201:9090/transport_server/message/ | 35 | http.send.directive = http://192.168.168.201:9090/transport_server/message/ |
| 70 | \ No newline at end of file | 36 | \ No newline at end of file |
src/main/resources/datatools/ktrs/ttinfodetailDataInput.ktr
| @@ -116,6 +116,27 @@ | @@ -116,6 +116,27 @@ | ||
| 116 | <bordercolorblue>100</bordercolorblue> | 116 | <bordercolorblue>100</bordercolorblue> |
| 117 | <drawshadow>Y</drawshadow> | 117 | <drawshadow>Y</drawshadow> |
| 118 | </notepad> | 118 | </notepad> |
| 119 | + <notepad> | ||
| 120 | + <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | ||
| 121 | + <xloc>721</xloc> | ||
| 122 | + <yloc>762</yloc> | ||
| 123 | + <width>333</width> | ||
| 124 | + <heigth>90</heigth> | ||
| 125 | + <fontname>YaHei Consolas Hybrid</fontname> | ||
| 126 | + <fontsize>12</fontsize> | ||
| 127 | + <fontbold>N</fontbold> | ||
| 128 | + <fontitalic>N</fontitalic> | ||
| 129 | + <fontcolorred>0</fontcolorred> | ||
| 130 | + <fontcolorgreen>0</fontcolorgreen> | ||
| 131 | + <fontcolorblue>0</fontcolorblue> | ||
| 132 | + <backgroundcolorred>255</backgroundcolorred> | ||
| 133 | + <backgroundcolorgreen>205</backgroundcolorgreen> | ||
| 134 | + <backgroundcolorblue>112</backgroundcolorblue> | ||
| 135 | + <bordercolorred>100</bordercolorred> | ||
| 136 | + <bordercolorgreen>100</bordercolorgreen> | ||
| 137 | + <bordercolorblue>100</bordercolorblue> | ||
| 138 | + <drawshadow>Y</drawshadow> | ||
| 139 | + </notepad> | ||
| 119 | </notepads> | 140 | </notepads> |
| 120 | <connection> | 141 | <connection> |
| 121 | <name>bus_control_variable</name> | 142 | <name>bus_control_variable</name> |
| @@ -130,6 +151,7 @@ | @@ -130,6 +151,7 @@ | ||
| 130 | <data_tablespace/> | 151 | <data_tablespace/> |
| 131 | <index_tablespace/> | 152 | <index_tablespace/> |
| 132 | <attributes> | 153 | <attributes> |
| 154 | + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | ||
| 133 | <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | 155 | <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> |
| 134 | <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | 156 | <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> |
| 135 | <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | 157 | <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> |
| @@ -437,7 +459,7 @@ | @@ -437,7 +459,7 @@ | ||
| 437 | <optimizationLevel>9</optimizationLevel> | 459 | <optimizationLevel>9</optimizationLevel> |
| 438 | <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | 460 | <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> |
| 439 | <jsScript_name>Script 1</jsScript_name> | 461 | <jsScript_name>Script 1</jsScript_name> |
| 440 | - <jsScript_script>//Script here

// 添加站点标识
var cc_groups = qdzgroups.split(","); // 所有班次起点站数组
var zdzname = cc_groups[gno]; // 出场班次的终点站是下个班次的起始站
var endZdtype = 'E';</jsScript_script> | 462 | + <jsScript_script>//Script here

// 添加站点标识
var cc_groups = qdzgroups.split(","); // 所有班次起点站数组
var zdzname = cc_groups[gno]; // 出场班次的终点站是下个班次的起始站
var endZdtype = 'E';

var destory = 0; // 未撤销flag</jsScript_script> |
| 441 | </jsScript> </jsScripts> <fields> <field> <name>zdzname</name> | 463 | </jsScript> </jsScripts> <fields> <field> <name>zdzname</name> |
| 442 | <rename>zdzname</rename> | 464 | <rename>zdzname</rename> |
| 443 | <type>String</type> | 465 | <type>String</type> |
| @@ -450,6 +472,12 @@ | @@ -450,6 +472,12 @@ | ||
| 450 | <length>-1</length> | 472 | <length>-1</length> |
| 451 | <precision>-1</precision> | 473 | <precision>-1</precision> |
| 452 | <replace>N</replace> | 474 | <replace>N</replace> |
| 475 | + </field> <field> <name>destory</name> | ||
| 476 | + <rename>destory</rename> | ||
| 477 | + <type>Integer</type> | ||
| 478 | + <length>-1</length> | ||
| 479 | + <precision>-1</precision> | ||
| 480 | + <replace>N</replace> | ||
| 453 | </field> </fields> <cluster_schema/> | 481 | </field> </fields> <cluster_schema/> |
| 454 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 482 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 455 | <xloc>575</xloc> | 483 | <xloc>575</xloc> |
| @@ -1341,6 +1369,12 @@ | @@ -1341,6 +1369,12 @@ | ||
| 1341 | <condition>=</condition> | 1369 | <condition>=</condition> |
| 1342 | <name2/> | 1370 | <name2/> |
| 1343 | </key> | 1371 | </key> |
| 1372 | + <key> | ||
| 1373 | + <name>destory</name> | ||
| 1374 | + <field>destroy</field> | ||
| 1375 | + <condition>=</condition> | ||
| 1376 | + <name2/> | ||
| 1377 | + </key> | ||
| 1344 | <value> | 1378 | <value> |
| 1345 | <name>station</name> | 1379 | <name>station</name> |
| 1346 | <rename>zdzid</rename> | 1380 | <rename>zdzid</rename> |
| @@ -1677,6 +1711,12 @@ | @@ -1677,6 +1711,12 @@ | ||
| 1677 | <condition>=</condition> | 1711 | <condition>=</condition> |
| 1678 | <name2/> | 1712 | <name2/> |
| 1679 | </key> | 1713 | </key> |
| 1714 | + <key> | ||
| 1715 | + <name>destory</name> | ||
| 1716 | + <field>destroy</field> | ||
| 1717 | + <condition>=</condition> | ||
| 1718 | + <name2/> | ||
| 1719 | + </key> | ||
| 1680 | <value> | 1720 | <value> |
| 1681 | <name>station_name</name> | 1721 | <name>station_name</name> |
| 1682 | <rename>zdzname</rename> | 1722 | <rename>zdzname</rename> |
| @@ -1737,6 +1777,12 @@ | @@ -1737,6 +1777,12 @@ | ||
| 1737 | <condition>=</condition> | 1777 | <condition>=</condition> |
| 1738 | <name2/> | 1778 | <name2/> |
| 1739 | </key> | 1779 | </key> |
| 1780 | + <key> | ||
| 1781 | + <name>destory</name> | ||
| 1782 | + <field>destroy</field> | ||
| 1783 | + <condition>=</condition> | ||
| 1784 | + <name2/> | ||
| 1785 | + </key> | ||
| 1740 | <value> | 1786 | <value> |
| 1741 | <name>station</name> | 1787 | <name>station</name> |
| 1742 | <rename>qdzid</rename> | 1788 | <rename>qdzid</rename> |
| @@ -1845,6 +1891,12 @@ | @@ -1845,6 +1891,12 @@ | ||
| 1845 | <condition>=</condition> | 1891 | <condition>=</condition> |
| 1846 | <name2/> | 1892 | <name2/> |
| 1847 | </key> | 1893 | </key> |
| 1894 | + <key> | ||
| 1895 | + <name>destory</name> | ||
| 1896 | + <field>destroy</field> | ||
| 1897 | + <condition>=</condition> | ||
| 1898 | + <name2/> | ||
| 1899 | + </key> | ||
| 1848 | <value> | 1900 | <value> |
| 1849 | <name>directions</name> | 1901 | <name>directions</name> |
| 1850 | <rename>sxx</rename> | 1902 | <rename>sxx</rename> |
| @@ -1872,8 +1924,8 @@ | @@ -1872,8 +1924,8 @@ | ||
| 1872 | <schema_name/> | 1924 | <schema_name/> |
| 1873 | </partitioning> | 1925 | </partitioning> |
| 1874 | <connection>bus_control_variable</connection> | 1926 | <connection>bus_control_variable</connection> |
| 1875 | - <cache>N</cache> | ||
| 1876 | - <cache_load_all>N</cache_load_all> | 1927 | + <cache>Y</cache> |
| 1928 | + <cache_load_all>Y</cache_load_all> | ||
| 1877 | <cache_size>0</cache_size> | 1929 | <cache_size>0</cache_size> |
| 1878 | <lookup> | 1930 | <lookup> |
| 1879 | <schema/> | 1931 | <schema/> |
| @@ -1899,6 +1951,12 @@ | @@ -1899,6 +1951,12 @@ | ||
| 1899 | <condition>=</condition> | 1951 | <condition>=</condition> |
| 1900 | <name2/> | 1952 | <name2/> |
| 1901 | </key> | 1953 | </key> |
| 1954 | + <key> | ||
| 1955 | + <name>destory</name> | ||
| 1956 | + <field>destroy</field> | ||
| 1957 | + <condition>=</condition> | ||
| 1958 | + <name2/> | ||
| 1959 | + </key> | ||
| 1902 | <value> | 1960 | <value> |
| 1903 | <name>station_name</name> | 1961 | <name>station_name</name> |
| 1904 | <rename>zdzname_calcu</rename> | 1962 | <rename>zdzname_calcu</rename> |
| @@ -1953,6 +2011,12 @@ | @@ -1953,6 +2011,12 @@ | ||
| 1953 | <condition>=</condition> | 2011 | <condition>=</condition> |
| 1954 | <name2/> | 2012 | <name2/> |
| 1955 | </key> | 2013 | </key> |
| 2014 | + <key> | ||
| 2015 | + <name>destory</name> | ||
| 2016 | + <field>destroy</field> | ||
| 2017 | + <condition>=</condition> | ||
| 2018 | + <name2/> | ||
| 2019 | + </key> | ||
| 1956 | <value> | 2020 | <value> |
| 1957 | <name>directions</name> | 2021 | <name>directions</name> |
| 1958 | <rename>sxx2</rename> | 2022 | <rename>sxx2</rename> |
| @@ -1989,7 +2053,7 @@ | @@ -1989,7 +2053,7 @@ | ||
| 1989 | <optimizationLevel>9</optimizationLevel> | 2053 | <optimizationLevel>9</optimizationLevel> |
| 1990 | <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | 2054 | <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> |
| 1991 | <jsScript_name>Script 1</jsScript_name> | 2055 | <jsScript_name>Script 1</jsScript_name> |
| 1992 | - <jsScript_script>//Script here

// 添加站点标识
var sendZdtype = 'B';
var endZdtype = 'E';
</jsScript_script> | 2056 | + <jsScript_script>//Script here

// 添加站点标识
var sendZdtype = 'B';
var endZdtype = 'E';

var destory = 0; // 未撤销flag</jsScript_script> |
| 1993 | </jsScript> </jsScripts> <fields> <field> <name>sendZdtype</name> | 2057 | </jsScript> </jsScripts> <fields> <field> <name>sendZdtype</name> |
| 1994 | <rename>sendZdtype</rename> | 2058 | <rename>sendZdtype</rename> |
| 1995 | <type>String</type> | 2059 | <type>String</type> |
| @@ -2002,6 +2066,12 @@ | @@ -2002,6 +2066,12 @@ | ||
| 2002 | <length>-1</length> | 2066 | <length>-1</length> |
| 2003 | <precision>-1</precision> | 2067 | <precision>-1</precision> |
| 2004 | <replace>N</replace> | 2068 | <replace>N</replace> |
| 2069 | + </field> <field> <name>destory</name> | ||
| 2070 | + <rename>destory</rename> | ||
| 2071 | + <type>Integer</type> | ||
| 2072 | + <length>-1</length> | ||
| 2073 | + <precision>-1</precision> | ||
| 2074 | + <replace>N</replace> | ||
| 2005 | </field> </fields> <cluster_schema/> | 2075 | </field> </fields> <cluster_schema/> |
| 2006 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 2076 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 2007 | <xloc>588</xloc> | 2077 | <xloc>588</xloc> |
| @@ -2539,7 +2609,7 @@ | @@ -2539,7 +2609,7 @@ | ||
| 2539 | <optimizationLevel>9</optimizationLevel> | 2609 | <optimizationLevel>9</optimizationLevel> |
| 2540 | <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | 2610 | <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> |
| 2541 | <jsScript_name>Script 1</jsScript_name> | 2611 | <jsScript_name>Script 1</jsScript_name> |
| 2542 | - <jsScript_script>//Script here

// 添加站点标识
var cc_groups = qdzgroups.split(","); // 所有班次起点站数组
var qdzname_calcu = cc_groups[gno - 2]; // 进场班次的起点站是上一个班次的终点站,这里只有上一个班次的起点站,还需要计算
var startZdtype_calcu = 'B';
var endZdtype_calcu = 'E';</jsScript_script> | 2612 | + <jsScript_script>//Script here

// 添加站点标识
var cc_groups = qdzgroups.split(","); // 所有班次起点站数组
var qdzname_calcu = cc_groups[gno - 2]; // 进场班次的起点站是上一个班次的终点站,这里只有上一个班次的起点站,还需要计算
var startZdtype_calcu = 'B';
var endZdtype_calcu = 'E';

var destory = 0; // 未撤销flag</jsScript_script> |
| 2543 | </jsScript> </jsScripts> <fields> <field> <name>qdzname_calcu</name> | 2613 | </jsScript> </jsScripts> <fields> <field> <name>qdzname_calcu</name> |
| 2544 | <rename>qdzname_calcu</rename> | 2614 | <rename>qdzname_calcu</rename> |
| 2545 | <type>String</type> | 2615 | <type>String</type> |
| @@ -2558,6 +2628,12 @@ | @@ -2558,6 +2628,12 @@ | ||
| 2558 | <length>-1</length> | 2628 | <length>-1</length> |
| 2559 | <precision>-1</precision> | 2629 | <precision>-1</precision> |
| 2560 | <replace>N</replace> | 2630 | <replace>N</replace> |
| 2631 | + </field> <field> <name>destory</name> | ||
| 2632 | + <rename>destory</rename> | ||
| 2633 | + <type>Integer</type> | ||
| 2634 | + <length>-1</length> | ||
| 2635 | + <precision>-1</precision> | ||
| 2636 | + <replace>N</replace> | ||
| 2561 | </field> </fields> <cluster_schema/> | 2637 | </field> </fields> <cluster_schema/> |
| 2562 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 2638 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 2563 | <xloc>754</xloc> | 2639 | <xloc>754</xloc> |
src/main/resources/datatools/ktrs/ttinfodetailDataOutput.ktr
| @@ -74,6 +74,27 @@ | @@ -74,6 +74,27 @@ | ||
| 74 | <is_key_private>N</is_key_private> | 74 | <is_key_private>N</is_key_private> |
| 75 | </info> | 75 | </info> |
| 76 | <notepads> | 76 | <notepads> |
| 77 | + <notepad> | ||
| 78 | + <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | ||
| 79 | + <xloc>114</xloc> | ||
| 80 | + <yloc>227</yloc> | ||
| 81 | + <width>333</width> | ||
| 82 | + <heigth>90</heigth> | ||
| 83 | + <fontname>YaHei Consolas Hybrid</fontname> | ||
| 84 | + <fontsize>12</fontsize> | ||
| 85 | + <fontbold>N</fontbold> | ||
| 86 | + <fontitalic>N</fontitalic> | ||
| 87 | + <fontcolorred>0</fontcolorred> | ||
| 88 | + <fontcolorgreen>0</fontcolorgreen> | ||
| 89 | + <fontcolorblue>0</fontcolorblue> | ||
| 90 | + <backgroundcolorred>255</backgroundcolorred> | ||
| 91 | + <backgroundcolorgreen>205</backgroundcolorgreen> | ||
| 92 | + <backgroundcolorblue>112</backgroundcolorblue> | ||
| 93 | + <bordercolorred>100</bordercolorred> | ||
| 94 | + <bordercolorgreen>100</bordercolorgreen> | ||
| 95 | + <bordercolorblue>100</bordercolorblue> | ||
| 96 | + <drawshadow>Y</drawshadow> | ||
| 97 | + </notepad> | ||
| 77 | </notepads> | 98 | </notepads> |
| 78 | <connection> | 99 | <connection> |
| 79 | <name>bus_control_variable</name> | 100 | <name>bus_control_variable</name> |
| @@ -88,6 +109,7 @@ | @@ -88,6 +109,7 @@ | ||
| 88 | <data_tablespace/> | 109 | <data_tablespace/> |
| 89 | <index_tablespace/> | 110 | <index_tablespace/> |
| 90 | <attributes> | 111 | <attributes> |
| 112 | + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | ||
| 91 | <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | 113 | <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> |
| 92 | <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | 114 | <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> |
| 93 | <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | 115 | <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> |
| @@ -243,6 +265,73 @@ | @@ -243,6 +265,73 @@ | ||
| 243 | <hop> <from>路牌名字查找</from><to>排序记录</to><enabled>Y</enabled> </hop> | 265 | <hop> <from>路牌名字查找</from><to>排序记录</to><enabled>Y</enabled> </hop> |
| 244 | </order> | 266 | </order> |
| 245 | <step> | 267 | <step> |
| 268 | + <name>Excel输出</name> | ||
| 269 | + <type>ExcelOutput</type> | ||
| 270 | + <description/> | ||
| 271 | + <distribute>Y</distribute> | ||
| 272 | + <custom_distribution/> | ||
| 273 | + <copies>1</copies> | ||
| 274 | + <partitioning> | ||
| 275 | + <method>none</method> | ||
| 276 | + <schema_name/> | ||
| 277 | + </partitioning> | ||
| 278 | + <header>Y</header> | ||
| 279 | + <footer>N</footer> | ||
| 280 | + <encoding/> | ||
| 281 | + <append>N</append> | ||
| 282 | + <add_to_result_filenames>Y</add_to_result_filenames> | ||
| 283 | + <file> | ||
| 284 | + <name>${filepath}</name> | ||
| 285 | + <extention/> | ||
| 286 | + <do_not_open_newfile_init>N</do_not_open_newfile_init> | ||
| 287 | + <create_parent_folder>N</create_parent_folder> | ||
| 288 | + <split>N</split> | ||
| 289 | + <add_date>N</add_date> | ||
| 290 | + <add_time>N</add_time> | ||
| 291 | + <SpecifyFormat>N</SpecifyFormat> | ||
| 292 | + <date_time_format/> | ||
| 293 | + <sheetname>Sheet1</sheetname> | ||
| 294 | + <autosizecolums>N</autosizecolums> | ||
| 295 | + <nullisblank>N</nullisblank> | ||
| 296 | + <protect_sheet>N</protect_sheet> | ||
| 297 | + <password>Encrypted </password> | ||
| 298 | + <splitevery>0</splitevery> | ||
| 299 | + <usetempfiles>N</usetempfiles> | ||
| 300 | + <tempdirectory/> | ||
| 301 | + </file> | ||
| 302 | + <template> | ||
| 303 | + <enabled>N</enabled> | ||
| 304 | + <append>N</append> | ||
| 305 | + <filename>template.xls</filename> | ||
| 306 | + </template> | ||
| 307 | + <fields> | ||
| 308 | + </fields> | ||
| 309 | + <custom> | ||
| 310 | + <header_font_name>arial</header_font_name> | ||
| 311 | + <header_font_size>10</header_font_size> | ||
| 312 | + <header_font_bold>N</header_font_bold> | ||
| 313 | + <header_font_italic>N</header_font_italic> | ||
| 314 | + <header_font_underline>no</header_font_underline> | ||
| 315 | + <header_font_orientation>horizontal</header_font_orientation> | ||
| 316 | + <header_font_color>black</header_font_color> | ||
| 317 | + <header_background_color>none</header_background_color> | ||
| 318 | + <header_row_height>255</header_row_height> | ||
| 319 | + <header_alignment>left</header_alignment> | ||
| 320 | + <header_image/> | ||
| 321 | + <row_font_name>arial</row_font_name> | ||
| 322 | + <row_font_size>10</row_font_size> | ||
| 323 | + <row_font_color>black</row_font_color> | ||
| 324 | + <row_background_color>none</row_background_color> | ||
| 325 | + </custom> | ||
| 326 | + <cluster_schema/> | ||
| 327 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 328 | + <xloc>731</xloc> | ||
| 329 | + <yloc>65</yloc> | ||
| 330 | + <draw>Y</draw> | ||
| 331 | + </GUI> | ||
| 332 | + </step> | ||
| 333 | + | ||
| 334 | + <step> | ||
| 246 | <name>列转行</name> | 335 | <name>列转行</name> |
| 247 | <type>Denormaliser</type> | 336 | <type>Denormaliser</type> |
| 248 | <description/> | 337 | <description/> |
| @@ -368,6 +457,30 @@ | @@ -368,6 +457,30 @@ | ||
| 368 | </step> | 457 | </step> |
| 369 | 458 | ||
| 370 | <step> | 459 | <step> |
| 460 | + <name>字段选择</name> | ||
| 461 | + <type>SelectValues</type> | ||
| 462 | + <description/> | ||
| 463 | + <distribute>Y</distribute> | ||
| 464 | + <custom_distribution/> | ||
| 465 | + <copies>1</copies> | ||
| 466 | + <partitioning> | ||
| 467 | + <method>none</method> | ||
| 468 | + <schema_name/> | ||
| 469 | + </partitioning> | ||
| 470 | + <fields> <field> <name>lp_name</name> | ||
| 471 | + <rename>路牌</rename> | ||
| 472 | + <length>-2</length> | ||
| 473 | + <precision>-2</precision> | ||
| 474 | + </field> <select_unspecified>Y</select_unspecified> | ||
| 475 | + </fields> <cluster_schema/> | ||
| 476 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 477 | + <xloc>534</xloc> | ||
| 478 | + <yloc>243</yloc> | ||
| 479 | + <draw>Y</draw> | ||
| 480 | + </GUI> | ||
| 481 | + </step> | ||
| 482 | + | ||
| 483 | + <step> | ||
| 371 | <name>排序记录</name> | 484 | <name>排序记录</name> |
| 372 | <type>SortRows</type> | 485 | <type>SortRows</type> |
| 373 | <description/> | 486 | <description/> |
| @@ -434,97 +547,6 @@ | @@ -434,97 +547,6 @@ | ||
| 434 | </step> | 547 | </step> |
| 435 | 548 | ||
| 436 | <step> | 549 | <step> |
| 437 | - <name>Excel输出</name> | ||
| 438 | - <type>ExcelOutput</type> | ||
| 439 | - <description/> | ||
| 440 | - <distribute>Y</distribute> | ||
| 441 | - <custom_distribution/> | ||
| 442 | - <copies>1</copies> | ||
| 443 | - <partitioning> | ||
| 444 | - <method>none</method> | ||
| 445 | - <schema_name/> | ||
| 446 | - </partitioning> | ||
| 447 | - <header>Y</header> | ||
| 448 | - <footer>N</footer> | ||
| 449 | - <encoding/> | ||
| 450 | - <append>N</append> | ||
| 451 | - <add_to_result_filenames>Y</add_to_result_filenames> | ||
| 452 | - <file> | ||
| 453 | - <name>${filepath}</name> | ||
| 454 | - <extention/> | ||
| 455 | - <do_not_open_newfile_init>N</do_not_open_newfile_init> | ||
| 456 | - <create_parent_folder>N</create_parent_folder> | ||
| 457 | - <split>N</split> | ||
| 458 | - <add_date>N</add_date> | ||
| 459 | - <add_time>N</add_time> | ||
| 460 | - <SpecifyFormat>N</SpecifyFormat> | ||
| 461 | - <date_time_format/> | ||
| 462 | - <sheetname>Sheet1</sheetname> | ||
| 463 | - <autosizecolums>N</autosizecolums> | ||
| 464 | - <nullisblank>N</nullisblank> | ||
| 465 | - <protect_sheet>N</protect_sheet> | ||
| 466 | - <password>Encrypted </password> | ||
| 467 | - <splitevery>0</splitevery> | ||
| 468 | - <usetempfiles>N</usetempfiles> | ||
| 469 | - <tempdirectory/> | ||
| 470 | - </file> | ||
| 471 | - <template> | ||
| 472 | - <enabled>N</enabled> | ||
| 473 | - <append>N</append> | ||
| 474 | - <filename>template.xls</filename> | ||
| 475 | - </template> | ||
| 476 | - <fields> | ||
| 477 | - </fields> | ||
| 478 | - <custom> | ||
| 479 | - <header_font_name>arial</header_font_name> | ||
| 480 | - <header_font_size>10</header_font_size> | ||
| 481 | - <header_font_bold>N</header_font_bold> | ||
| 482 | - <header_font_italic>N</header_font_italic> | ||
| 483 | - <header_font_underline>no</header_font_underline> | ||
| 484 | - <header_font_orientation>horizontal</header_font_orientation> | ||
| 485 | - <header_font_color>black</header_font_color> | ||
| 486 | - <header_background_color>none</header_background_color> | ||
| 487 | - <header_row_height>255</header_row_height> | ||
| 488 | - <header_alignment>left</header_alignment> | ||
| 489 | - <header_image/> | ||
| 490 | - <row_font_name>arial</row_font_name> | ||
| 491 | - <row_font_size>10</row_font_size> | ||
| 492 | - <row_font_color>black</row_font_color> | ||
| 493 | - <row_background_color>none</row_background_color> | ||
| 494 | - </custom> | ||
| 495 | - <cluster_schema/> | ||
| 496 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 497 | - <xloc>731</xloc> | ||
| 498 | - <yloc>65</yloc> | ||
| 499 | - <draw>Y</draw> | ||
| 500 | - </GUI> | ||
| 501 | - </step> | ||
| 502 | - | ||
| 503 | - <step> | ||
| 504 | - <name>字段选择</name> | ||
| 505 | - <type>SelectValues</type> | ||
| 506 | - <description/> | ||
| 507 | - <distribute>Y</distribute> | ||
| 508 | - <custom_distribution/> | ||
| 509 | - <copies>1</copies> | ||
| 510 | - <partitioning> | ||
| 511 | - <method>none</method> | ||
| 512 | - <schema_name/> | ||
| 513 | - </partitioning> | ||
| 514 | - <fields> <field> <name>lp_name</name> | ||
| 515 | - <rename>路牌</rename> | ||
| 516 | - <length>-2</length> | ||
| 517 | - <precision>-2</precision> | ||
| 518 | - </field> <select_unspecified>Y</select_unspecified> | ||
| 519 | - </fields> <cluster_schema/> | ||
| 520 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 521 | - <xloc>534</xloc> | ||
| 522 | - <yloc>243</yloc> | ||
| 523 | - <draw>Y</draw> | ||
| 524 | - </GUI> | ||
| 525 | - </step> | ||
| 526 | - | ||
| 527 | - <step> | ||
| 528 | <name>路牌名字查找</name> | 550 | <name>路牌名字查找</name> |
| 529 | <type>DBLookup</type> | 551 | <type>DBLookup</type> |
| 530 | <description/> | 552 | <description/> |
| @@ -536,8 +558,8 @@ | @@ -536,8 +558,8 @@ | ||
| 536 | <schema_name/> | 558 | <schema_name/> |
| 537 | </partitioning> | 559 | </partitioning> |
| 538 | <connection>bus_control_variable</connection> | 560 | <connection>bus_control_variable</connection> |
| 539 | - <cache>N</cache> | ||
| 540 | - <cache_load_all>N</cache_load_all> | 561 | + <cache>Y</cache> |
| 562 | + <cache_load_all>Y</cache_load_all> | ||
| 541 | <cache_size>0</cache_size> | 563 | <cache_size>0</cache_size> |
| 542 | <lookup> | 564 | <lookup> |
| 543 | <schema/> | 565 | <schema/> |
src/main/resources/datatools/ktrs/ttinfodetailDataOutputMetaData.ktr
| @@ -89,6 +89,27 @@ | @@ -89,6 +89,27 @@ | ||
| 89 | <is_key_private>N</is_key_private> | 89 | <is_key_private>N</is_key_private> |
| 90 | </info> | 90 | </info> |
| 91 | <notepads> | 91 | <notepads> |
| 92 | + <notepad> | ||
| 93 | + <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | ||
| 94 | + <xloc>165</xloc> | ||
| 95 | + <yloc>402</yloc> | ||
| 96 | + <width>333</width> | ||
| 97 | + <heigth>90</heigth> | ||
| 98 | + <fontname>YaHei Consolas Hybrid</fontname> | ||
| 99 | + <fontsize>12</fontsize> | ||
| 100 | + <fontbold>N</fontbold> | ||
| 101 | + <fontitalic>N</fontitalic> | ||
| 102 | + <fontcolorred>0</fontcolorred> | ||
| 103 | + <fontcolorgreen>0</fontcolorgreen> | ||
| 104 | + <fontcolorblue>0</fontcolorblue> | ||
| 105 | + <backgroundcolorred>255</backgroundcolorred> | ||
| 106 | + <backgroundcolorgreen>205</backgroundcolorgreen> | ||
| 107 | + <backgroundcolorblue>112</backgroundcolorblue> | ||
| 108 | + <bordercolorred>100</bordercolorred> | ||
| 109 | + <bordercolorgreen>100</bordercolorgreen> | ||
| 110 | + <bordercolorblue>100</bordercolorblue> | ||
| 111 | + <drawshadow>Y</drawshadow> | ||
| 112 | + </notepad> | ||
| 92 | </notepads> | 113 | </notepads> |
| 93 | <connection> | 114 | <connection> |
| 94 | <name>bus_control_variable</name> | 115 | <name>bus_control_variable</name> |
| @@ -103,6 +124,7 @@ | @@ -103,6 +124,7 @@ | ||
| 103 | <data_tablespace/> | 124 | <data_tablespace/> |
| 104 | <index_tablespace/> | 125 | <index_tablespace/> |
| 105 | <attributes> | 126 | <attributes> |
| 127 | + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | ||
| 106 | <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | 128 | <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> |
| 107 | <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | 129 | <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> |
| 108 | <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | 130 | <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> |
| @@ -322,8 +344,8 @@ | @@ -322,8 +344,8 @@ | ||
| 322 | </step> | 344 | </step> |
| 323 | 345 | ||
| 324 | <step> | 346 | <step> |
| 325 | - <name>时刻表明细分组数据</name> | ||
| 326 | - <type>TableInput</type> | 347 | + <name>字段选择</name> |
| 348 | + <type>SelectValues</type> | ||
| 327 | <description/> | 349 | <description/> |
| 328 | <distribute>Y</distribute> | 350 | <distribute>Y</distribute> |
| 329 | <custom_distribution/> | 351 | <custom_distribution/> |
| @@ -332,24 +354,30 @@ | @@ -332,24 +354,30 @@ | ||
| 332 | <method>none</method> | 354 | <method>none</method> |
| 333 | <schema_name/> | 355 | <schema_name/> |
| 334 | </partitioning> | 356 | </partitioning> |
| 335 | - <connection>bus_control_variable</connection> | ||
| 336 | - <sql>select 
fcno
, min(xl_dir) xl_dir
,min(qdz) qdz
,min(zdz) zdz
,bc_type 
from bsth_c_s_ttinfo_detail
where ttinfo = ${ttinfoid}
group by fcno,bc_type</sql> | ||
| 337 | - <limit>0</limit> | ||
| 338 | - <lookup/> | ||
| 339 | - <execute_each_row>N</execute_each_row> | ||
| 340 | - <variables_active>Y</variables_active> | ||
| 341 | - <lazy_conversion_active>N</lazy_conversion_active> | ||
| 342 | - <cluster_schema/> | 357 | + <fields> <field> <name>fieldname</name> |
| 358 | + <rename/> | ||
| 359 | + <length>-2</length> | ||
| 360 | + <precision>-2</precision> | ||
| 361 | + </field> <field> <name>fieldtype</name> | ||
| 362 | + <rename/> | ||
| 363 | + <length>-2</length> | ||
| 364 | + <precision>-2</precision> | ||
| 365 | + </field> <field> <name>fcno</name> | ||
| 366 | + <rename/> | ||
| 367 | + <length>-2</length> | ||
| 368 | + <precision>-2</precision> | ||
| 369 | + </field> <select_unspecified>N</select_unspecified> | ||
| 370 | + </fields> <cluster_schema/> | ||
| 343 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 371 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 344 | - <xloc>56</xloc> | ||
| 345 | - <yloc>185</yloc> | 372 | + <xloc>533</xloc> |
| 373 | + <yloc>325</yloc> | ||
| 346 | <draw>Y</draw> | 374 | <draw>Y</draw> |
| 347 | </GUI> | 375 | </GUI> |
| 348 | </step> | 376 | </step> |
| 349 | 377 | ||
| 350 | <step> | 378 | <step> |
| 351 | - <name>过滤记录</name> | ||
| 352 | - <type>FilterRows</type> | 379 | + <name>排序记录</name> |
| 380 | + <type>SortRows</type> | ||
| 353 | <description/> | 381 | <description/> |
| 354 | <distribute>Y</distribute> | 382 | <distribute>Y</distribute> |
| 355 | <custom_distribution/> | 383 | <custom_distribution/> |
| @@ -358,27 +386,32 @@ | @@ -358,27 +386,32 @@ | ||
| 358 | <method>none</method> | 386 | <method>none</method> |
| 359 | <schema_name/> | 387 | <schema_name/> |
| 360 | </partitioning> | 388 | </partitioning> |
| 361 | -<send_true_to/> | ||
| 362 | -<send_false_to/> | ||
| 363 | - <compare> | ||
| 364 | -<condition> | ||
| 365 | - <negated>N</negated> | ||
| 366 | - <leftvalue>bc_type</leftvalue> | ||
| 367 | - <function>IS NOT NULL</function> | ||
| 368 | - <rightvalue/> | ||
| 369 | - </condition> | ||
| 370 | - </compare> | 389 | + <directory>%%java.io.tmpdir%%</directory> |
| 390 | + <prefix>out</prefix> | ||
| 391 | + <sort_size>1000000</sort_size> | ||
| 392 | + <free_memory/> | ||
| 393 | + <compress>N</compress> | ||
| 394 | + <compress_variable/> | ||
| 395 | + <unique_rows>N</unique_rows> | ||
| 396 | + <fields> | ||
| 397 | + <field> | ||
| 398 | + <name>fcno</name> | ||
| 399 | + <ascending>Y</ascending> | ||
| 400 | + <case_sensitive>N</case_sensitive> | ||
| 401 | + <presorted>N</presorted> | ||
| 402 | + </field> | ||
| 403 | + </fields> | ||
| 371 | <cluster_schema/> | 404 | <cluster_schema/> |
| 372 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 405 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 373 | - <xloc>182</xloc> | ||
| 374 | - <yloc>189</yloc> | 406 | + <xloc>642</xloc> |
| 407 | + <yloc>325</yloc> | ||
| 375 | <draw>Y</draw> | 408 | <draw>Y</draw> |
| 376 | </GUI> | 409 | </GUI> |
| 377 | </step> | 410 | </step> |
| 378 | 411 | ||
| 379 | <step> | 412 | <step> |
| 380 | - <name>计算站点</name> | ||
| 381 | - <type>ScriptValueMod</type> | 413 | + <name>时刻表明细分组数据</name> |
| 414 | + <type>TableInput</type> | ||
| 382 | <description/> | 415 | <description/> |
| 383 | <distribute>Y</distribute> | 416 | <distribute>Y</distribute> |
| 384 | <custom_distribution/> | 417 | <custom_distribution/> |
| @@ -387,21 +420,17 @@ | @@ -387,21 +420,17 @@ | ||
| 387 | <method>none</method> | 420 | <method>none</method> |
| 388 | <schema_name/> | 421 | <schema_name/> |
| 389 | </partitioning> | 422 | </partitioning> |
| 390 | - <compatible>N</compatible> | ||
| 391 | - <optimizationLevel>9</optimizationLevel> | ||
| 392 | - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | ||
| 393 | - <jsScript_name>Script 1</jsScript_name> | ||
| 394 | - <jsScript_script>//Script here

var zd;

if (bc_type == 'in') {
 zd = qdz;
} else if (bc_type == 'out') {
 zd = zdz;
} else if (bc_type == 'normal') {
 zd = qdz;
} else {
 zd = qdz;
}
</jsScript_script> | ||
| 395 | - </jsScript> </jsScripts> <fields> <field> <name>zd</name> | ||
| 396 | - <rename>zd</rename> | ||
| 397 | - <type>String</type> | ||
| 398 | - <length>-1</length> | ||
| 399 | - <precision>-1</precision> | ||
| 400 | - <replace>N</replace> | ||
| 401 | - </field> </fields> <cluster_schema/> | 423 | + <connection>bus_control_variable</connection> |
| 424 | + <sql>select 
fcno
, min(xl_dir) xl_dir
,min(qdz) qdz
,min(zdz) zdz
,bc_type 
from bsth_c_s_ttinfo_detail
where ttinfo = ${ttinfoid}
group by fcno,bc_type</sql> | ||
| 425 | + <limit>0</limit> | ||
| 426 | + <lookup/> | ||
| 427 | + <execute_each_row>N</execute_each_row> | ||
| 428 | + <variables_active>Y</variables_active> | ||
| 429 | + <lazy_conversion_active>N</lazy_conversion_active> | ||
| 430 | + <cluster_schema/> | ||
| 402 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 431 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 403 | - <xloc>300</xloc> | ||
| 404 | - <yloc>190</yloc> | 432 | + <xloc>56</xloc> |
| 433 | + <yloc>185</yloc> | ||
| 405 | <draw>Y</draw> | 434 | <draw>Y</draw> |
| 406 | </GUI> | 435 | </GUI> |
| 407 | </step> | 436 | </step> |
| @@ -418,8 +447,8 @@ | @@ -418,8 +447,8 @@ | ||
| 418 | <schema_name/> | 447 | <schema_name/> |
| 419 | </partitioning> | 448 | </partitioning> |
| 420 | <connection>bus_control_variable</connection> | 449 | <connection>bus_control_variable</connection> |
| 421 | - <cache>N</cache> | ||
| 422 | - <cache_load_all>N</cache_load_all> | 450 | + <cache>Y</cache> |
| 451 | + <cache_load_all>Y</cache_load_all> | ||
| 423 | <cache_size>0</cache_size> | 452 | <cache_size>0</cache_size> |
| 424 | <lookup> | 453 | <lookup> |
| 425 | <schema/> | 454 | <schema/> |
| @@ -455,8 +484,8 @@ | @@ -455,8 +484,8 @@ | ||
| 455 | </step> | 484 | </step> |
| 456 | 485 | ||
| 457 | <step> | 486 | <step> |
| 458 | - <name>计算反范式元数据</name> | ||
| 459 | - <type>ScriptValueMod</type> | 487 | + <name>生成路牌字段</name> |
| 488 | + <type>RowGenerator</type> | ||
| 460 | <description/> | 489 | <description/> |
| 461 | <distribute>Y</distribute> | 490 | <distribute>Y</distribute> |
| 462 | <custom_distribution/> | 491 | <custom_distribution/> |
| @@ -465,39 +494,53 @@ | @@ -465,39 +494,53 @@ | ||
| 465 | <method>none</method> | 494 | <method>none</method> |
| 466 | <schema_name/> | 495 | <schema_name/> |
| 467 | </partitioning> | 496 | </partitioning> |
| 468 | - <compatible>N</compatible> | ||
| 469 | - <optimizationLevel>9</optimizationLevel> | ||
| 470 | - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | ||
| 471 | - <jsScript_name>Script 1</jsScript_name> | ||
| 472 | - <jsScript_script>//Script here

var targetfieldname; // 目标字段名
var targettype; // 目标类型
var valuefieldname; // 值字段名
var keyvalue; // 关键字值

if (bc_type == 'in') {
 targetfieldname = '进场' + fcno;
} else if (bc_type == 'out') {
 targetfieldname = '出场' + fcno;
} else if (bc_type == 'normal') {
 targetfieldname = zdname + fcno;
} else {
 targetfieldname = zdname + fcno;
} 

targettype = 'String';
valuefieldname = 'fcsj';
keyvalue = fcno;
</jsScript_script> | ||
| 473 | - </jsScript> </jsScripts> <fields> <field> <name>targetfieldname</name> | ||
| 474 | - <rename>targetfieldname</rename> | ||
| 475 | - <type>String</type> | ||
| 476 | - <length>-1</length> | ||
| 477 | - <precision>-1</precision> | ||
| 478 | - <replace>N</replace> | ||
| 479 | - </field> <field> <name>targettype</name> | ||
| 480 | - <rename>targettype</rename> | 497 | + <fields> |
| 498 | + <field> | ||
| 499 | + <name>fieldname</name> | ||
| 481 | <type>String</type> | 500 | <type>String</type> |
| 501 | + <format/> | ||
| 502 | + <currency/> | ||
| 503 | + <decimal/> | ||
| 504 | + <group/> | ||
| 505 | + <nullif>路牌</nullif> | ||
| 482 | <length>-1</length> | 506 | <length>-1</length> |
| 483 | <precision>-1</precision> | 507 | <precision>-1</precision> |
| 484 | - <replace>N</replace> | ||
| 485 | - </field> <field> <name>valuefieldname</name> | ||
| 486 | - <rename>valuefieldname</rename> | 508 | + <set_empty_string>N</set_empty_string> |
| 509 | + </field> | ||
| 510 | + <field> | ||
| 511 | + <name>fieldtype</name> | ||
| 487 | <type>String</type> | 512 | <type>String</type> |
| 513 | + <format/> | ||
| 514 | + <currency/> | ||
| 515 | + <decimal/> | ||
| 516 | + <group/> | ||
| 517 | + <nullif>String</nullif> | ||
| 488 | <length>-1</length> | 518 | <length>-1</length> |
| 489 | <precision>-1</precision> | 519 | <precision>-1</precision> |
| 490 | - <replace>N</replace> | ||
| 491 | - </field> <field> <name>keyvalue</name> | ||
| 492 | - <rename>keyvalue</rename> | ||
| 493 | - <type>String</type> | 520 | + <set_empty_string>N</set_empty_string> |
| 521 | + </field> | ||
| 522 | + <field> | ||
| 523 | + <name>fcno</name> | ||
| 524 | + <type>Integer</type> | ||
| 525 | + <format/> | ||
| 526 | + <currency/> | ||
| 527 | + <decimal/> | ||
| 528 | + <group/> | ||
| 529 | + <nullif>0</nullif> | ||
| 494 | <length>-1</length> | 530 | <length>-1</length> |
| 495 | <precision>-1</precision> | 531 | <precision>-1</precision> |
| 496 | - <replace>N</replace> | ||
| 497 | - </field> </fields> <cluster_schema/> | 532 | + <set_empty_string>N</set_empty_string> |
| 533 | + </field> | ||
| 534 | + </fields> | ||
| 535 | + <limit>1</limit> | ||
| 536 | + <never_ending>N</never_ending> | ||
| 537 | + <interval_in_ms>5000</interval_in_ms> | ||
| 538 | + <row_time_field>now</row_time_field> | ||
| 539 | + <last_time_field>FiveSecondsAgo</last_time_field> | ||
| 540 | + <cluster_schema/> | ||
| 498 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 541 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 499 | - <xloc>410</xloc> | ||
| 500 | - <yloc>64</yloc> | 542 | + <xloc>530</xloc> |
| 543 | + <yloc>194</yloc> | ||
| 501 | <draw>Y</draw> | 544 | <draw>Y</draw> |
| 502 | </GUI> | 545 | </GUI> |
| 503 | </step> | 546 | </step> |
| @@ -539,8 +582,8 @@ | @@ -539,8 +582,8 @@ | ||
| 539 | </step> | 582 | </step> |
| 540 | 583 | ||
| 541 | <step> | 584 | <step> |
| 542 | - <name>字段选择</name> | ||
| 543 | - <type>SelectValues</type> | 585 | + <name>计算反范式元数据</name> |
| 586 | + <type>ScriptValueMod</type> | ||
| 544 | <description/> | 587 | <description/> |
| 545 | <distribute>Y</distribute> | 588 | <distribute>Y</distribute> |
| 546 | <custom_distribution/> | 589 | <custom_distribution/> |
| @@ -549,30 +592,46 @@ | @@ -549,30 +592,46 @@ | ||
| 549 | <method>none</method> | 592 | <method>none</method> |
| 550 | <schema_name/> | 593 | <schema_name/> |
| 551 | </partitioning> | 594 | </partitioning> |
| 552 | - <fields> <field> <name>fieldname</name> | ||
| 553 | - <rename/> | ||
| 554 | - <length>-2</length> | ||
| 555 | - <precision>-2</precision> | ||
| 556 | - </field> <field> <name>fieldtype</name> | ||
| 557 | - <rename/> | ||
| 558 | - <length>-2</length> | ||
| 559 | - <precision>-2</precision> | ||
| 560 | - </field> <field> <name>fcno</name> | ||
| 561 | - <rename/> | ||
| 562 | - <length>-2</length> | ||
| 563 | - <precision>-2</precision> | ||
| 564 | - </field> <select_unspecified>N</select_unspecified> | ||
| 565 | - </fields> <cluster_schema/> | 595 | + <compatible>N</compatible> |
| 596 | + <optimizationLevel>9</optimizationLevel> | ||
| 597 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | ||
| 598 | + <jsScript_name>Script 1</jsScript_name> | ||
| 599 | + <jsScript_script>//Script here

var targetfieldname; // 目标字段名
var targettype; // 目标类型
var valuefieldname; // 值字段名
var keyvalue; // 关键字值

if (bc_type == 'in') {
 targetfieldname = '进场' + fcno;
} else if (bc_type == 'out') {
 targetfieldname = '出场' + fcno;
} else if (bc_type == 'normal') {
 targetfieldname = zdname + fcno;
} else {
 targetfieldname = zdname + fcno;
} 

targettype = 'String';
valuefieldname = 'fcsj';
keyvalue = fcno;
</jsScript_script> | ||
| 600 | + </jsScript> </jsScripts> <fields> <field> <name>targetfieldname</name> | ||
| 601 | + <rename>targetfieldname</rename> | ||
| 602 | + <type>String</type> | ||
| 603 | + <length>-1</length> | ||
| 604 | + <precision>-1</precision> | ||
| 605 | + <replace>N</replace> | ||
| 606 | + </field> <field> <name>targettype</name> | ||
| 607 | + <rename>targettype</rename> | ||
| 608 | + <type>String</type> | ||
| 609 | + <length>-1</length> | ||
| 610 | + <precision>-1</precision> | ||
| 611 | + <replace>N</replace> | ||
| 612 | + </field> <field> <name>valuefieldname</name> | ||
| 613 | + <rename>valuefieldname</rename> | ||
| 614 | + <type>String</type> | ||
| 615 | + <length>-1</length> | ||
| 616 | + <precision>-1</precision> | ||
| 617 | + <replace>N</replace> | ||
| 618 | + </field> <field> <name>keyvalue</name> | ||
| 619 | + <rename>keyvalue</rename> | ||
| 620 | + <type>String</type> | ||
| 621 | + <length>-1</length> | ||
| 622 | + <precision>-1</precision> | ||
| 623 | + <replace>N</replace> | ||
| 624 | + </field> </fields> <cluster_schema/> | ||
| 566 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 625 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 567 | - <xloc>533</xloc> | ||
| 568 | - <yloc>325</yloc> | 626 | + <xloc>410</xloc> |
| 627 | + <yloc>64</yloc> | ||
| 569 | <draw>Y</draw> | 628 | <draw>Y</draw> |
| 570 | </GUI> | 629 | </GUI> |
| 571 | </step> | 630 | </step> |
| 572 | 631 | ||
| 573 | <step> | 632 | <step> |
| 574 | - <name>生成路牌字段</name> | ||
| 575 | - <type>RowGenerator</type> | 633 | + <name>计算站点</name> |
| 634 | + <type>ScriptValueMod</type> | ||
| 576 | <description/> | 635 | <description/> |
| 577 | <distribute>Y</distribute> | 636 | <distribute>Y</distribute> |
| 578 | <custom_distribution/> | 637 | <custom_distribution/> |
| @@ -581,60 +640,28 @@ | @@ -581,60 +640,28 @@ | ||
| 581 | <method>none</method> | 640 | <method>none</method> |
| 582 | <schema_name/> | 641 | <schema_name/> |
| 583 | </partitioning> | 642 | </partitioning> |
| 584 | - <fields> | ||
| 585 | - <field> | ||
| 586 | - <name>fieldname</name> | ||
| 587 | - <type>String</type> | ||
| 588 | - <format/> | ||
| 589 | - <currency/> | ||
| 590 | - <decimal/> | ||
| 591 | - <group/> | ||
| 592 | - <nullif>路牌</nullif> | ||
| 593 | - <length>-1</length> | ||
| 594 | - <precision>-1</precision> | ||
| 595 | - <set_empty_string>N</set_empty_string> | ||
| 596 | - </field> | ||
| 597 | - <field> | ||
| 598 | - <name>fieldtype</name> | 643 | + <compatible>N</compatible> |
| 644 | + <optimizationLevel>9</optimizationLevel> | ||
| 645 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | ||
| 646 | + <jsScript_name>Script 1</jsScript_name> | ||
| 647 | + <jsScript_script>//Script here

var zd;

if (bc_type == 'in') {
 zd = qdz;
} else if (bc_type == 'out') {
 zd = zdz;
} else if (bc_type == 'normal') {
 zd = qdz;
} else {
 zd = qdz;
}
</jsScript_script> | ||
| 648 | + </jsScript> </jsScripts> <fields> <field> <name>zd</name> | ||
| 649 | + <rename>zd</rename> | ||
| 599 | <type>String</type> | 650 | <type>String</type> |
| 600 | - <format/> | ||
| 601 | - <currency/> | ||
| 602 | - <decimal/> | ||
| 603 | - <group/> | ||
| 604 | - <nullif>String</nullif> | ||
| 605 | - <length>-1</length> | ||
| 606 | - <precision>-1</precision> | ||
| 607 | - <set_empty_string>N</set_empty_string> | ||
| 608 | - </field> | ||
| 609 | - <field> | ||
| 610 | - <name>fcno</name> | ||
| 611 | - <type>Integer</type> | ||
| 612 | - <format/> | ||
| 613 | - <currency/> | ||
| 614 | - <decimal/> | ||
| 615 | - <group/> | ||
| 616 | - <nullif>0</nullif> | ||
| 617 | <length>-1</length> | 651 | <length>-1</length> |
| 618 | <precision>-1</precision> | 652 | <precision>-1</precision> |
| 619 | - <set_empty_string>N</set_empty_string> | ||
| 620 | - </field> | ||
| 621 | - </fields> | ||
| 622 | - <limit>1</limit> | ||
| 623 | - <never_ending>N</never_ending> | ||
| 624 | - <interval_in_ms>5000</interval_in_ms> | ||
| 625 | - <row_time_field>now</row_time_field> | ||
| 626 | - <last_time_field>FiveSecondsAgo</last_time_field> | ||
| 627 | - <cluster_schema/> | 653 | + <replace>N</replace> |
| 654 | + </field> </fields> <cluster_schema/> | ||
| 628 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 655 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 629 | - <xloc>530</xloc> | ||
| 630 | - <yloc>194</yloc> | 656 | + <xloc>300</xloc> |
| 657 | + <yloc>190</yloc> | ||
| 631 | <draw>Y</draw> | 658 | <draw>Y</draw> |
| 632 | </GUI> | 659 | </GUI> |
| 633 | </step> | 660 | </step> |
| 634 | 661 | ||
| 635 | <step> | 662 | <step> |
| 636 | - <name>排序记录</name> | ||
| 637 | - <type>SortRows</type> | 663 | + <name>过滤记录</name> |
| 664 | + <type>FilterRows</type> | ||
| 638 | <description/> | 665 | <description/> |
| 639 | <distribute>Y</distribute> | 666 | <distribute>Y</distribute> |
| 640 | <custom_distribution/> | 667 | <custom_distribution/> |
| @@ -643,25 +670,20 @@ | @@ -643,25 +670,20 @@ | ||
| 643 | <method>none</method> | 670 | <method>none</method> |
| 644 | <schema_name/> | 671 | <schema_name/> |
| 645 | </partitioning> | 672 | </partitioning> |
| 646 | - <directory>%%java.io.tmpdir%%</directory> | ||
| 647 | - <prefix>out</prefix> | ||
| 648 | - <sort_size>1000000</sort_size> | ||
| 649 | - <free_memory/> | ||
| 650 | - <compress>N</compress> | ||
| 651 | - <compress_variable/> | ||
| 652 | - <unique_rows>N</unique_rows> | ||
| 653 | - <fields> | ||
| 654 | - <field> | ||
| 655 | - <name>fcno</name> | ||
| 656 | - <ascending>Y</ascending> | ||
| 657 | - <case_sensitive>N</case_sensitive> | ||
| 658 | - <presorted>N</presorted> | ||
| 659 | - </field> | ||
| 660 | - </fields> | 673 | +<send_true_to/> |
| 674 | +<send_false_to/> | ||
| 675 | + <compare> | ||
| 676 | +<condition> | ||
| 677 | + <negated>N</negated> | ||
| 678 | + <leftvalue>bc_type</leftvalue> | ||
| 679 | + <function>IS NOT NULL</function> | ||
| 680 | + <rightvalue/> | ||
| 681 | + </condition> | ||
| 682 | + </compare> | ||
| 661 | <cluster_schema/> | 683 | <cluster_schema/> |
| 662 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | 684 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 663 | - <xloc>642</xloc> | ||
| 664 | - <yloc>325</yloc> | 685 | + <xloc>182</xloc> |
| 686 | + <yloc>189</yloc> | ||
| 665 | <draw>Y</draw> | 687 | <draw>Y</draw> |
| 666 | </GUI> | 688 | </GUI> |
| 667 | </step> | 689 | </step> |
src/main/resources/datatools/ktrs/ttinfodetailoutputforedit.ktr
| @@ -89,6 +89,27 @@ | @@ -89,6 +89,27 @@ | ||
| 89 | <is_key_private>N</is_key_private> | 89 | <is_key_private>N</is_key_private> |
| 90 | </info> | 90 | </info> |
| 91 | <notepads> | 91 | <notepads> |
| 92 | + <notepad> | ||
| 93 | + <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | ||
| 94 | + <xloc>135</xloc> | ||
| 95 | + <yloc>299</yloc> | ||
| 96 | + <width>333</width> | ||
| 97 | + <heigth>90</heigth> | ||
| 98 | + <fontname>YaHei Consolas Hybrid</fontname> | ||
| 99 | + <fontsize>12</fontsize> | ||
| 100 | + <fontbold>N</fontbold> | ||
| 101 | + <fontitalic>N</fontitalic> | ||
| 102 | + <fontcolorred>0</fontcolorred> | ||
| 103 | + <fontcolorgreen>0</fontcolorgreen> | ||
| 104 | + <fontcolorblue>0</fontcolorblue> | ||
| 105 | + <backgroundcolorred>255</backgroundcolorred> | ||
| 106 | + <backgroundcolorgreen>205</backgroundcolorgreen> | ||
| 107 | + <backgroundcolorblue>112</backgroundcolorblue> | ||
| 108 | + <bordercolorred>100</bordercolorred> | ||
| 109 | + <bordercolorgreen>100</bordercolorgreen> | ||
| 110 | + <bordercolorblue>100</bordercolorblue> | ||
| 111 | + <drawshadow>Y</drawshadow> | ||
| 112 | + </notepad> | ||
| 92 | </notepads> | 113 | </notepads> |
| 93 | <connection> | 114 | <connection> |
| 94 | <name>bus_control_variable</name> | 115 | <name>bus_control_variable</name> |
| @@ -103,6 +124,7 @@ | @@ -103,6 +124,7 @@ | ||
| 103 | <data_tablespace/> | 124 | <data_tablespace/> |
| 104 | <index_tablespace/> | 125 | <index_tablespace/> |
| 105 | <attributes> | 126 | <attributes> |
| 127 | + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | ||
| 106 | <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | 128 | <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> |
| 107 | <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | 129 | <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> |
| 108 | <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | 130 | <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> |
| @@ -4544,8 +4566,8 @@ | @@ -4544,8 +4566,8 @@ | ||
| 4544 | <schema_name/> | 4566 | <schema_name/> |
| 4545 | </partitioning> | 4567 | </partitioning> |
| 4546 | <connection>bus_control_variable</connection> | 4568 | <connection>bus_control_variable</connection> |
| 4547 | - <cache>N</cache> | ||
| 4548 | - <cache_load_all>N</cache_load_all> | 4569 | + <cache>Y</cache> |
| 4570 | + <cache_load_all>Y</cache_load_all> | ||
| 4549 | <cache_size>0</cache_size> | 4571 | <cache_size>0</cache_size> |
| 4550 | <lookup> | 4572 | <lookup> |
| 4551 | <schema/> | 4573 | <schema/> |
| @@ -4598,8 +4620,8 @@ | @@ -4598,8 +4620,8 @@ | ||
| 4598 | <schema_name/> | 4620 | <schema_name/> |
| 4599 | </partitioning> | 4621 | </partitioning> |
| 4600 | <connection>bus_control_variable</connection> | 4622 | <connection>bus_control_variable</connection> |
| 4601 | - <cache>N</cache> | ||
| 4602 | - <cache_load_all>N</cache_load_all> | 4623 | + <cache>Y</cache> |
| 4624 | + <cache_load_all>Y</cache_load_all> | ||
| 4603 | <cache_size>0</cache_size> | 4625 | <cache_size>0</cache_size> |
| 4604 | <lookup> | 4626 | <lookup> |
| 4605 | <schema/> | 4627 | <schema/> |
src/main/resources/ms-jdbc.properties
| @@ -3,7 +3,13 @@ | @@ -3,7 +3,13 @@ | ||
| 3 | #ms.mysql.username= root | 3 | #ms.mysql.username= root |
| 4 | #ms.mysql.password= 123456 | 4 | #ms.mysql.password= 123456 |
| 5 | 5 | ||
| 6 | +#ms.mysql.driver= com.mysql.jdbc.Driver | ||
| 7 | +#ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 | ||
| 8 | +#ms.mysql.username= root | ||
| 9 | +#ms.mysql.password= root2jsp | ||
| 10 | + | ||
| 11 | + | ||
| 6 | ms.mysql.driver= com.mysql.jdbc.Driver | 12 | ms.mysql.driver= com.mysql.jdbc.Driver |
| 7 | -ms.mysql.url= jdbc:mysql://192.168.168.171:3306/ms?useUnicode=true&characterEncoding=utf-8 | 13 | +ms.mysql.url= jdbc:mysql://192.168.168.117:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 8 | ms.mysql.username= root | 14 | ms.mysql.username= root |
| 9 | -ms.mysql.password= root2jsp | ||
| 10 | \ No newline at end of file | 15 | \ No newline at end of file |
| 16 | +ms.mysql.password= root |
src/main/resources/static/assets/bower_components/handsontable/.bower.json
0 → 100644
| 1 | +{ | ||
| 2 | + "name": "handsontable", | ||
| 3 | + "description": "Spreadsheet-like data grid editor that provides copy/paste functionality compatible with Excel/Google Docs", | ||
| 4 | + "version": "0.24.3", | ||
| 5 | + "main": [ | ||
| 6 | + "./dist/handsontable.js", | ||
| 7 | + "./dist/handsontable.css" | ||
| 8 | + ], | ||
| 9 | + "homepage": "http://handsontable.com/", | ||
| 10 | + "repository": { | ||
| 11 | + "type": "git", | ||
| 12 | + "url": "https://github.com/handsontable/handsontable.git" | ||
| 13 | + }, | ||
| 14 | + "authors": [ | ||
| 15 | + "Handsoncode", | ||
| 16 | + "Handsoncode <hello@handsontable.com>" | ||
| 17 | + ], | ||
| 18 | + "keywords": [ | ||
| 19 | + "data", | ||
| 20 | + "grid", | ||
| 21 | + "table", | ||
| 22 | + "editor", | ||
| 23 | + "grid-editor", | ||
| 24 | + "data-grid", | ||
| 25 | + "data-table", | ||
| 26 | + "spreadsheet", | ||
| 27 | + "excel", | ||
| 28 | + "tabular-data", | ||
| 29 | + "edit-cell", | ||
| 30 | + "editable-table", | ||
| 31 | + "data-spreadsheet" | ||
| 32 | + ], | ||
| 33 | + "ignore": [ | ||
| 34 | + "**/.*", | ||
| 35 | + "components", | ||
| 36 | + "demo", | ||
| 37 | + "node_modules", | ||
| 38 | + "src", | ||
| 39 | + "test" | ||
| 40 | + ], | ||
| 41 | + "dependencies": { | ||
| 42 | + "zeroclipboard": "^2.2.0", | ||
| 43 | + "moment": "^2.9.0", | ||
| 44 | + "pikaday": "^1.3.2" | ||
| 45 | + }, | ||
| 46 | + "devDependencies": { | ||
| 47 | + "chroma-js": "~0.5.6" | ||
| 48 | + }, | ||
| 49 | + "_release": "0.24.3", | ||
| 50 | + "_resolution": { | ||
| 51 | + "type": "version", | ||
| 52 | + "tag": "0.24.3", | ||
| 53 | + "commit": "eb19e2e0a364f0f535380238ddb10a2dd4fc150a" | ||
| 54 | + }, | ||
| 55 | + "_source": "https://github.com/handsontable/handsontable.git", | ||
| 56 | + "_target": "~0.24.0", | ||
| 57 | + "_originalSource": "handsontable" | ||
| 58 | +} | ||
| 0 | \ No newline at end of file | 59 | \ No newline at end of file |
src/main/resources/static/assets/bower_components/handsontable/CHANGELOG.md
0 → 100644
| 1 | +All releases are described at https://github.com/handsontable/handsontable/releases |
src/main/resources/static/assets/bower_components/handsontable/CNAME
0 → 100644
| 1 | +handsontable.com |
src/main/resources/static/assets/bower_components/handsontable/CONTRIBUTING.md
0 → 100644
| 1 | +# Contributing to Handsontable | ||
| 2 | + | ||
| 3 | +Your contributions to the project are very welcome. If you would like to fix a bug or propose a new feature, you can submit a Pull Request. | ||
| 4 | + | ||
| 5 | +To help us merge your Pull Request, please make sure you follow these points: | ||
| 6 | + | ||
| 7 | +1. Please make your fix on a separate branch. This makes merging much easier. | ||
| 8 | +2. Do not edit files in `dist/` directory (e.g: `handsontable.js`, `handsontable.css`, `handsontable.full.js`, `handsontable.full.css`). Instead, try to edit files inside the `src/` directory and then use `grunt` to make a build. More information about this on wiki page [Building](https://github.com/handsontable/handsontable/wiki/Building). | ||
| 9 | +3. **Very important:** For any change that you make, **please try to also add a test case(s)** in `tests/jasmine/spec/` or `src/3rdparty/walkontable/test/jasmine/spec/`. This helps us understand the issue and make sure that it will stay fixed forever. See [Testing](https://github.com/handsontable/handsontable/wiki/Testing) | ||
| 10 | +4. **Very important:** Please review our [coding style](https://github.com/handsontable/handsontable/wiki/Coding-style) for instructions on how to maintain a fork and submit patches. | ||
| 11 | +5. Describe the problem in the Pull Request description (of course you would do it, why do I mention that?) | ||
| 12 | + | ||
| 13 | +Thank you for your commitment! | ||
| 14 | + | ||
| 15 | +## Team rules | ||
| 16 | + | ||
| 17 | +The Handsontable team utilizes Git-Flow. See [How we use Git-Flow](https://github.com/handsontable/handsontable/wiki/How-we-use-Git-Flow) |
src/main/resources/static/assets/bower_components/handsontable/Gruntfile.js
0 → 100644
| 1 | +/** | ||
| 2 | + * This file is used to build Handsontable from `src/*` | ||
| 3 | + * | ||
| 4 | + * Installation: | ||
| 5 | + * 1. Install Grunt CLI (`npm install -g grunt-cli`) | ||
| 6 | + * 1. Install Grunt 0.4.0 and other dependencies (`npm install`) | ||
| 7 | + * | ||
| 8 | + * Build: | ||
| 9 | + * Execute `grunt` from root directory of this directory (where Gruntfile.js is) | ||
| 10 | + * To execute automatically after each change, execute `grunt --force default watch` | ||
| 11 | + * To execute build followed by the test run, execute `grunt test` | ||
| 12 | + * | ||
| 13 | + * Result: | ||
| 14 | + * building Handsontable will create files: | ||
| 15 | + * - dist/handsontable.js | ||
| 16 | + * - dist/handsontable.css | ||
| 17 | + * - dist/handsontable.full.js | ||
| 18 | + * - dist/handsontable.full.css | ||
| 19 | + * - dist/handsontable.full.min.js | ||
| 20 | + * - dist/handsontable.full.min.css | ||
| 21 | + * | ||
| 22 | + * See http://gruntjs.com/getting-started for more information about Grunt | ||
| 23 | + */ | ||
| 24 | +var browsers = [ | ||
| 25 | + { | ||
| 26 | + browserName: 'firefox', | ||
| 27 | + platform: 'Windows 7' | ||
| 28 | + }, | ||
| 29 | + { | ||
| 30 | + browserName: 'chrome', | ||
| 31 | + platform: 'Windows 7' | ||
| 32 | + }, | ||
| 33 | + { | ||
| 34 | + browserName: 'opera', | ||
| 35 | + platform: 'Windows 7' | ||
| 36 | + }, | ||
| 37 | + //{ | ||
| 38 | + // browserName: 'internet explorer', | ||
| 39 | + // version: '8', | ||
| 40 | + // platform: 'Windows 7' | ||
| 41 | + //}, | ||
| 42 | + //{ | ||
| 43 | + // browserName: 'internet explorer', | ||
| 44 | + // version: '9', | ||
| 45 | + // platform: 'Windows 7' | ||
| 46 | + //}, | ||
| 47 | + { | ||
| 48 | + browserName: 'internet explorer', | ||
| 49 | + version: '10', | ||
| 50 | + platform: 'Windows 8' | ||
| 51 | + } | ||
| 52 | +]; | ||
| 53 | + | ||
| 54 | +module.exports = function(grunt) { | ||
| 55 | + | ||
| 56 | + require('time-grunt')(grunt); | ||
| 57 | + require('load-grunt-tasks')(grunt); | ||
| 58 | + | ||
| 59 | + grunt.initConfig({ | ||
| 60 | + pkg: grunt.file.readJSON('package.json'), | ||
| 61 | + gitinfo: {}, | ||
| 62 | + | ||
| 63 | + meta: { | ||
| 64 | + src: [ | ||
| 65 | + 'src/*.js', | ||
| 66 | + 'src/editors/*.js', | ||
| 67 | + 'src/plugins/**/!(*.spec).js', | ||
| 68 | + 'src/renderers/*.js', | ||
| 69 | + 'src/validators/*.js', | ||
| 70 | + 'src/shims/*.js', | ||
| 71 | + 'src/3rdparty/*.js' | ||
| 72 | + ], | ||
| 73 | + walkontable: [ | ||
| 74 | + 'src/3rdparty/walkontable/src/**/*.js' | ||
| 75 | + ], | ||
| 76 | + vendor: [ | ||
| 77 | + 'lib/numeral/numeral.js' | ||
| 78 | + ] | ||
| 79 | + }, | ||
| 80 | + | ||
| 81 | + watch: { | ||
| 82 | + options: { | ||
| 83 | + livereload: true // works with Chrome LiveReload extension. See: https://github.com/gruntjs/grunt-contrib-watch | ||
| 84 | + }, | ||
| 85 | + files: [ | ||
| 86 | + 'src/**/*(*.js|*.css|*.html)', | ||
| 87 | + '!src/3rdparty/walkontable/test/**/*', | ||
| 88 | + 'lib/**/*(*.js|*.css)' | ||
| 89 | + ], | ||
| 90 | + tasks: ['build-dev'] | ||
| 91 | + }, | ||
| 92 | + | ||
| 93 | + jasmine: { | ||
| 94 | + options: { | ||
| 95 | + page: { | ||
| 96 | + viewportSize: { | ||
| 97 | + width: 1200, | ||
| 98 | + height: 1000 | ||
| 99 | + } | ||
| 100 | + }, | ||
| 101 | + }, | ||
| 102 | + handsontableStandalone: { | ||
| 103 | + src: [ | ||
| 104 | + 'dist/handsontable.js', | ||
| 105 | + 'demo/js/numeral.de-de.js', | ||
| 106 | + 'demo/js/backbone/lodash.underscore.js', | ||
| 107 | + 'demo/js/backbone/backbone.js', | ||
| 108 | + 'demo/js/backbone/backbone-relational/backbone-relational.js', | ||
| 109 | + 'demo/js/jquery-ui/js/jquery-ui.custom.js', | ||
| 110 | + 'plugins/removeRow/handsontable.removeRow.js' | ||
| 111 | + ], | ||
| 112 | + options: { | ||
| 113 | + specs: [ | ||
| 114 | + 'test/jasmine/spec/*Spec.js', | ||
| 115 | + 'test/jasmine/spec/!(mobile)*/*Spec.js', | ||
| 116 | + 'src/plugins/*/test/*.spec.js', | ||
| 117 | + 'plugins/*/test/*.spec.js', | ||
| 118 | + 'test/jasmine/spec/MemoryLeakTest.js' | ||
| 119 | + ], | ||
| 120 | + styles: [ | ||
| 121 | + 'test/jasmine/css/SpecRunner.css', | ||
| 122 | + 'dist/handsontable.min.css', | ||
| 123 | + 'plugins/removeRow/handsontable.removeRow.css', | ||
| 124 | + 'demo/js/jquery-ui/css/ui-bootstrap/jquery-ui.custom.css', | ||
| 125 | + 'demo/js/pikaday/css/pikaday.css' | ||
| 126 | + ], | ||
| 127 | + vendor: [ | ||
| 128 | + 'demo/js/jquery.min.js', | ||
| 129 | + 'lib/numeral/numeral.js', | ||
| 130 | + 'demo/js/moment/moment.js', | ||
| 131 | + 'demo/js/pikaday/pikaday.js', | ||
| 132 | + 'demo/js/ZeroClipboard.js', | ||
| 133 | + 'test/jasmine/lib/jasmine-extensions.js' | ||
| 134 | + ], | ||
| 135 | + helpers: [ | ||
| 136 | + 'test/jasmine/spec/SpecHelper.js', | ||
| 137 | + 'test/jasmine/lib/nodeShim.js', | ||
| 138 | + 'test/jasmine/spec/test-init.js' | ||
| 139 | + ], | ||
| 140 | + outfile: 'test/jasmine/SpecRunner.html', | ||
| 141 | + template: 'test/jasmine/templates/SpecRunner.tmpl', | ||
| 142 | + keepRunner: true | ||
| 143 | + } | ||
| 144 | + }, | ||
| 145 | + handsontableFull: { | ||
| 146 | + src: [ | ||
| 147 | + 'dist/handsontable.full.min.js', | ||
| 148 | + 'demo/js/numeral.de-de.js', | ||
| 149 | + 'demo/js/backbone/lodash.underscore.js', | ||
| 150 | + 'demo/js/backbone/backbone.js', | ||
| 151 | + 'demo/js/backbone/backbone-relational/backbone-relational.js', | ||
| 152 | + 'demo/js/jquery-ui/js/jquery-ui.custom.js', | ||
| 153 | + 'plugins/removeRow/handsontable.removeRow.js' | ||
| 154 | + ], | ||
| 155 | + options: { | ||
| 156 | + specs: [ | ||
| 157 | + 'test/jasmine/spec/*Spec.js', | ||
| 158 | + 'test/jasmine/spec/!(mobile)*/*Spec.js', | ||
| 159 | + 'src/plugins/*/test/*.spec.js', | ||
| 160 | + 'plugins/*/test/*.spec.js', | ||
| 161 | + 'test/jasmine/spec/MemoryLeakTest.js' | ||
| 162 | + ], | ||
| 163 | + styles: [ | ||
| 164 | + 'test/jasmine/css/SpecRunner.css', | ||
| 165 | + 'dist/handsontable.min.css', | ||
| 166 | + 'plugins/removeRow/handsontable.removeRow.css', | ||
| 167 | + 'demo/js/jquery-ui/css/ui-bootstrap/jquery-ui.custom.css', | ||
| 168 | + 'demo/js/pikaday/css/pikaday.css' | ||
| 169 | + ], | ||
| 170 | + vendor: [ | ||
| 171 | + 'demo/js/jquery.min.js', | ||
| 172 | + 'demo/js/moment/moment.js', | ||
| 173 | + 'test/jasmine/lib/jasmine-extensions.js' | ||
| 174 | + ], | ||
| 175 | + helpers: [ | ||
| 176 | + 'test/jasmine/spec/SpecHelper.js', | ||
| 177 | + 'test/jasmine/lib/nodeShim.js', | ||
| 178 | + 'test/jasmine/spec/test-init.js' | ||
| 179 | + ], | ||
| 180 | + outfile: 'test/jasmine/SpecRunner.html', | ||
| 181 | + template: 'test/jasmine/templates/SpecRunner.tmpl', | ||
| 182 | + keepRunner: true | ||
| 183 | + } | ||
| 184 | + }, | ||
| 185 | + walkontable: { | ||
| 186 | + src: [ | ||
| 187 | + 'dist/handsontable.min.js' | ||
| 188 | + ], | ||
| 189 | + options: { | ||
| 190 | + specs: [ | ||
| 191 | + 'src/3rdparty/walkontable/test/jasmine/spec/**/*.spec.js' | ||
| 192 | + ], | ||
| 193 | + styles: [ | ||
| 194 | + 'src/3rdparty/walkontable/css/walkontable.css' | ||
| 195 | + ], | ||
| 196 | + vendor: [ | ||
| 197 | + 'demo/js/jquery.min.js', | ||
| 198 | + 'lib/numeral/numeral.js', | ||
| 199 | + 'demo/js/moment/moment.js', | ||
| 200 | + 'demo/js/pikaday/pikaday.js', | ||
| 201 | + 'demo/js/ZeroClipboard.js', | ||
| 202 | + 'demo/js/numeral.de-de.js' | ||
| 203 | + ], | ||
| 204 | + helpers: [ | ||
| 205 | + 'src/3rdparty/walkontable/test/jasmine/SpecHelper.js', | ||
| 206 | + 'test/jasmine/lib/nodeShim.js', | ||
| 207 | + 'src/3rdparty/walkontable/test/jasmine/test-init.js' | ||
| 208 | + | ||
| 209 | + ], | ||
| 210 | + outfile: 'src/3rdparty/walkontable/test/jasmine/SpecRunner.html', | ||
| 211 | + template: 'test/jasmine/templates/SpecRunner.tmpl', | ||
| 212 | + keepRunner: true | ||
| 213 | + } | ||
| 214 | + }, | ||
| 215 | + mobile: { | ||
| 216 | + src: [ | ||
| 217 | + 'dist/handsontable.min.js', | ||
| 218 | + 'demo/js/numeral.de-de.js', | ||
| 219 | + 'demo/js/backbone/lodash.underscore.js', | ||
| 220 | + 'demo/js/backbone/backbone.js', | ||
| 221 | + 'demo/js/backbone/backbone-relational/backbone-relational.js', | ||
| 222 | + 'demo/js/jquery-ui/js/jquery-ui.custom.js', | ||
| 223 | + 'plugins/removeRow/handsontable.removeRow.js' | ||
| 224 | + ], | ||
| 225 | + options: { | ||
| 226 | + specs: [ | ||
| 227 | + 'test/jasmine/spec/mobile/*Spec.js', | ||
| 228 | + 'src/plugins/*/test/mobile/*.spec.js' | ||
| 229 | + ], | ||
| 230 | + styles: [ | ||
| 231 | + 'test/jasmine/css/SpecRunner.css', | ||
| 232 | + 'dist/handsontable.min.css', | ||
| 233 | + 'plugins/removeRow/handsontable.removeRow.css', | ||
| 234 | + 'demo/js/jquery-ui/css/ui-bootstrap/jquery-ui.custom.css', | ||
| 235 | + 'demo/js/pikaday/css/pikaday.css' | ||
| 236 | + ], | ||
| 237 | + vendor: [ | ||
| 238 | + 'demo/js/jquery.min.js', | ||
| 239 | + 'lib/numeral/numeral.js', | ||
| 240 | + 'demo/js/ZeroClipboard.js', | ||
| 241 | + 'demo/js/moment/moment.js', | ||
| 242 | + 'demo/js/pikaday/pikaday.js', | ||
| 243 | + 'test/jasmine/lib/jasmine-extensions.js' | ||
| 244 | + ], | ||
| 245 | + helpers: [ | ||
| 246 | + 'test/jasmine/spec/SpecHelper.js', | ||
| 247 | + 'test/jasmine/spec/MobileSpecHelper.js', | ||
| 248 | + 'test/jasmine/lib/nodeShim.js', | ||
| 249 | + 'test/jasmine/spec/test-init.js' | ||
| 250 | + ], | ||
| 251 | + outfile: 'test/jasmine/MobileSpecRunner.html', | ||
| 252 | + template: 'test/jasmine/templates/SpecRunner.tmpl', | ||
| 253 | + keepRunner: true | ||
| 254 | + } | ||
| 255 | + } | ||
| 256 | + }, | ||
| 257 | + | ||
| 258 | + connect: { | ||
| 259 | + server: { | ||
| 260 | + options: { | ||
| 261 | + port: 8080, | ||
| 262 | + base: '.', | ||
| 263 | + keepalive: true | ||
| 264 | + } | ||
| 265 | + }, | ||
| 266 | + sauce: { | ||
| 267 | + options: { | ||
| 268 | + port: 9999, | ||
| 269 | + base: '.', | ||
| 270 | + keepalive: false | ||
| 271 | + } | ||
| 272 | + } | ||
| 273 | + }, | ||
| 274 | + 'saucelabs-jasmine': { | ||
| 275 | + handsontable: { | ||
| 276 | + options: { | ||
| 277 | + urls: ['http://localhost:9999/test/jasmine/SpecRunner.html'], | ||
| 278 | + build: '<%= pkg.version %>-<%= gitinfo.local.branch.current.name %>', | ||
| 279 | + concurrency: 3, | ||
| 280 | + browsers: browsers, | ||
| 281 | + testname: 'Development test (Handsontable)' | ||
| 282 | + } | ||
| 283 | + }, | ||
| 284 | + walkontable: { | ||
| 285 | + options: { | ||
| 286 | + urls: ['http://localhost:9999/src/3rdparty/walkontable/test/jasmine/SpecRunner.html'], | ||
| 287 | + build: '<%= pkg.version %>-<%= gitinfo.local.branch.current.name %>', | ||
| 288 | + concurrency: 3, | ||
| 289 | + browsers: browsers, | ||
| 290 | + testname: 'Development test (Walkontable)' | ||
| 291 | + } | ||
| 292 | + } | ||
| 293 | + }, | ||
| 294 | + | ||
| 295 | + jshint: { | ||
| 296 | + options: { | ||
| 297 | + jshintrc: true | ||
| 298 | + }, | ||
| 299 | + handsontable: '<%= meta.src %>', | ||
| 300 | + walkontable: '<%= meta.walkontable %>' | ||
| 301 | + }, | ||
| 302 | + | ||
| 303 | + jscs: { | ||
| 304 | + handsontable: { | ||
| 305 | + files: { | ||
| 306 | + src: ['<%= meta.src %>', '!src/shims/classes.js'] | ||
| 307 | + } | ||
| 308 | + }, | ||
| 309 | + walkontable: { | ||
| 310 | + files: { | ||
| 311 | + src: ['<%= meta.walkontable %>', '!src/shims/classes.js'] | ||
| 312 | + } | ||
| 313 | + }, | ||
| 314 | + options: { | ||
| 315 | + config: '.jscsrc', | ||
| 316 | + esnext: true, | ||
| 317 | + verbose: true | ||
| 318 | + } | ||
| 319 | + }, | ||
| 320 | + | ||
| 321 | + hotBuilder: { | ||
| 322 | + handsontable: { | ||
| 323 | + files: { | ||
| 324 | + dist: 'package.json' | ||
| 325 | + } | ||
| 326 | + }, | ||
| 327 | + handsontableDev: { | ||
| 328 | + files: { | ||
| 329 | + dist: 'package.json' | ||
| 330 | + }, | ||
| 331 | + options: { | ||
| 332 | + devMode: true | ||
| 333 | + } | ||
| 334 | + }, | ||
| 335 | + handsontableCustom: { | ||
| 336 | + files: { | ||
| 337 | + dist: 'package.json' | ||
| 338 | + }, | ||
| 339 | + options: { | ||
| 340 | + disableUI: false | ||
| 341 | + } | ||
| 342 | + }, | ||
| 343 | + options: { | ||
| 344 | + minify: true | ||
| 345 | + } | ||
| 346 | + } | ||
| 347 | + }); | ||
| 348 | + | ||
| 349 | + // Default task. | ||
| 350 | + grunt.registerTask('default', ['jscs', 'jshint', 'gitinfo', 'build']); | ||
| 351 | + grunt.registerTask('build', ['hotBuilder:handsontable']); | ||
| 352 | + grunt.registerTask('build-dev', ['hotBuilder:handsontableDev']); | ||
| 353 | + grunt.registerTask('build-custom', ['hotBuilder:handsontableCustom']); | ||
| 354 | + grunt.registerTask('test', ['default', 'jasmine:handsontableStandalone', 'jasmine:handsontableFull', 'jasmine:walkontable', 'jasmine:mobile:build']); | ||
| 355 | + grunt.registerTask('test:handsontable', ['default', 'jasmine:handsontableStandalone']); | ||
| 356 | + grunt.registerTask('test:handsontableStandalone', ['test:handsontable']); | ||
| 357 | + grunt.registerTask('test:handsontableFull', ['default', 'jasmine:handsontableFull']); | ||
| 358 | + grunt.registerTask('test:walkontable', ['default', 'jasmine:walkontable']); | ||
| 359 | + grunt.registerTask('test:mobile', ['default', 'jasmine:mobile:build']); | ||
| 360 | + grunt.registerTask('sauce', ['default', 'connect:sauce', 'saucelabs-jasmine:walkontable', 'saucelabs-jasmine:handsontable']); | ||
| 361 | + grunt.registerTask('sauce:handsontable', ['default', 'connect:sauce', 'saucelabs-jasmine:handsontable']); | ||
| 362 | + grunt.registerTask('sauce:walkontable', ['default', 'connect:sauce', 'saucelabs-jasmine:walkontable']); | ||
| 363 | + | ||
| 364 | + grunt.registerTask('test-handsontable-standalone', ['default', 'jasmine:handsontableStandalone']); | ||
| 365 | + grunt.registerTask('test-handsontable-full', ['default', 'jasmine:handsontableFull']); | ||
| 366 | + grunt.registerTask('test-handsontable', ['test-handsontable-standalone']); | ||
| 367 | + | ||
| 368 | + grunt.loadTasks('tasks'); | ||
| 369 | + grunt.loadNpmTasks('hot-builder'); | ||
| 370 | + grunt.loadNpmTasks('grunt-jscs'); | ||
| 371 | +}; |
src/main/resources/static/assets/bower_components/handsontable/LICENSE
0 → 100644
| 1 | +(The MIT License) | ||
| 2 | + | ||
| 3 | +Copyright (c) 2012-2014 Marcin Warpechowski | ||
| 4 | +Copyright (c) 2015 Handsoncode sp. z o.o. <hello@handsoncode.net> | ||
| 5 | + | ||
| 6 | +Permission is hereby granted, free of charge, to any person obtaining | ||
| 7 | +a copy of this software and associated documentation files (the | ||
| 8 | +'Software'), to deal in the Software without restriction, including | ||
| 9 | +without limitation the rights to use, copy, modify, merge, publish, | ||
| 10 | +distribute, sublicense, and/or sell copies of the Software, and to | ||
| 11 | +permit persons to whom the Software is furnished to do so, subject to | ||
| 12 | +the following conditions: | ||
| 13 | + | ||
| 14 | +The above copyright notice and this permission notice shall be | ||
| 15 | +included in all copies or substantial portions of the Software. | ||
| 16 | + | ||
| 17 | +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
| 18 | +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 19 | +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
| 20 | +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
| 21 | +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
| 22 | +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| 23 | +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
src/main/resources/static/assets/bower_components/handsontable/README.md
0 → 100644
| 1 | +# Handsontable [](https://travis-ci.org/handsontable/handsontable) | ||
| 2 | + | ||
| 3 | +Handsontable is a data grid component with an Excel-like appearance. Built in JavaScript, it integrates with any data source and comes with [features](http://docs.handsontable.com/0.17.0/tutorial-features.html) like data validation, sorting, grouping, data binding or column ordering. Actively supported by the Handsoncode team and the GitHub community. | ||
| 4 | + | ||
| 5 | +Check out the demos at http://handsontable.com/examples.html or fork the example on | ||
| 6 | +[JSFiddle](http://jsfiddle.net/js_ziggle/hU6Kz/3228/) to see Handsontable in action. | ||
| 7 | + | ||
| 8 | +- - - | ||
| 9 | + | ||
| 10 | +### Quick start | ||
| 11 | + | ||
| 12 | +1. A recommended way to install Handsontable is through [Bower](http://bower.io/search/?q=handsontable) package manager using the following command: | ||
| 13 | + | ||
| 14 | + `bower install handsontable --save` | ||
| 15 | + | ||
| 16 | + Alternatively, you can [download it in a ZIP file](https://github.com/handsontable/handsontable/archive/master.zip). | ||
| 17 | + | ||
| 18 | +2. After Handsontable is downloaded, embed the code into your project. All the files that you need are in the `dist\` directory: | ||
| 19 | + | ||
| 20 | + ```html | ||
| 21 | + <script src="dist/handsontable.full.js"></script> | ||
| 22 | + <link rel="stylesheet" media="screen" href="dist/handsontable.full.css"> | ||
| 23 | + ``` | ||
| 24 | + | ||
| 25 | +3. Then, create a new `Handsontable` object, passing a reference to an empty div as a first argument. After that, load some data if you wish: | ||
| 26 | + | ||
| 27 | + ```html | ||
| 28 | + <div id="example"></div> | ||
| 29 | + | ||
| 30 | + <script> | ||
| 31 | + var data = [ | ||
| 32 | + ["", "Kia", "Nissan", "Toyota", "Honda"], | ||
| 33 | + ["2008", 10, 11, 12, 13], | ||
| 34 | + ["2009", 20, 11, 14, 13], | ||
| 35 | + ["2010", 30, 15, 12, 13] | ||
| 36 | + ]; | ||
| 37 | + | ||
| 38 | + var container = document.getElementById('example'); | ||
| 39 | + var hot = new Handsontable(container, | ||
| 40 | + { | ||
| 41 | + data: data | ||
| 42 | + }); | ||
| 43 | + </script> | ||
| 44 | + ``` | ||
| 45 | + | ||
| 46 | +### API Reference | ||
| 47 | + | ||
| 48 | +- [Core methods](http://docs.handsontable.com/Core.html) | ||
| 49 | +- [Options](http://docs.handsontable.com/Options.html) | ||
| 50 | +- [Hooks](http://docs.handsontable.com/Hooks.html) | ||
| 51 | + | ||
| 52 | +## AMD support | ||
| 53 | + | ||
| 54 | +If you use a modular script loader than Handsontable is not bound to the global object and will fit nicely in your build process. You can require Handsontable just like any other module. | ||
| 55 | + | ||
| 56 | +```javascript | ||
| 57 | +require(['handsontable'], function(Handsontable) { | ||
| 58 | + var hot = new Handsontable(document.getElementById('example'), { | ||
| 59 | + data: [[1, 2, 3, 4], [1, 2, 3, 4]] | ||
| 60 | + }); | ||
| 61 | +}); | ||
| 62 | +``` | ||
| 63 | + | ||
| 64 | +## CommonJS module support | ||
| 65 | + | ||
| 66 | +If you use a CommonJS compatible environment you can use the require function to import Handsontable. | ||
| 67 | + | ||
| 68 | + | ||
| 69 | +```javascript | ||
| 70 | +var handsontable = require('handsontable'); | ||
| 71 | +``` | ||
| 72 | + | ||
| 73 | +To bundle handsontable with [Browserify](http://browserify.org) you must specify the module names of all required modules by Handsontable: | ||
| 74 | + | ||
| 75 | +`browserify main.js -o bundle.js -r moment -r pikaday -r zeroclipboard` | ||
| 76 | + | ||
| 77 | +### Troubleshooting | ||
| 78 | + | ||
| 79 | +Please follow this guidelines when reporting bugs and feature requests: | ||
| 80 | + | ||
| 81 | +1. Use [GitHub Issues](https://github.com/handsontable/handsontable/issues) board to report bugs and feature requests (not our email address) | ||
| 82 | +2. Please **always** write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it. | ||
| 83 | +3. If possible, please add a JSFiddle link that shows the problem (start by forking [this fiddle](http://jsfiddle.net/js_ziggle/hU6Kz/3228/)). It saves us much time. | ||
| 84 | +4. If you can't reproduce it on JSFiddle, please add a screenshot that shows the problem. JSFiddle is much more appreciated because it lets us start fixing straight away. | ||
| 85 | + | ||
| 86 | +Thanks for understanding! | ||
| 87 | + | ||
| 88 | +### Compatibility | ||
| 89 | + | ||
| 90 | +Handsontable is compatible with IE 9+, Firefox, Chrome, Safari and Opera. | ||
| 91 | + | ||
| 92 | +### Want to help? | ||
| 93 | + | ||
| 94 | +Please see [CONTRIBUTING.md](CONTRIBUTING.md) | ||
| 95 | + | ||
| 96 | +### Changelog | ||
| 97 | + | ||
| 98 | +To see the list of recent changes, see [Releases section](https://github.com/handsontable/handsontable/releases). | ||
| 99 | + | ||
| 100 | +### License | ||
| 101 | + | ||
| 102 | +The MIT License (see the [LICENSE](https://github.com/handsontable/handsontable/blob/master/LICENSE) file for the full text) | ||
| 103 | + | ||
| 104 | +### Contact | ||
| 105 | + | ||
| 106 | +You can contact us at hello@handsontable.com. |
src/main/resources/static/assets/bower_components/handsontable/bower.json
0 → 100644
| 1 | +{ | ||
| 2 | + "name": "handsontable", | ||
| 3 | + "description": "Spreadsheet-like data grid editor that provides copy/paste functionality compatible with Excel/Google Docs", | ||
| 4 | + "version": "0.24.3", | ||
| 5 | + "main": ["./dist/handsontable.js", "./dist/handsontable.css"], | ||
| 6 | + "homepage": "http://handsontable.com/", | ||
| 7 | + "repository": { | ||
| 8 | + "type": "git", | ||
| 9 | + "url": "https://github.com/handsontable/handsontable.git" | ||
| 10 | + }, | ||
| 11 | + "authors": [ | ||
| 12 | + "Handsoncode", "Handsoncode <hello@handsontable.com>" | ||
| 13 | + ], | ||
| 14 | + "keywords": [ | ||
| 15 | + "data", | ||
| 16 | + "grid", | ||
| 17 | + "table", | ||
| 18 | + "editor", | ||
| 19 | + "grid-editor", | ||
| 20 | + "data-grid", | ||
| 21 | + "data-table", | ||
| 22 | + "spreadsheet", | ||
| 23 | + "excel", | ||
| 24 | + "tabular-data", | ||
| 25 | + "edit-cell", | ||
| 26 | + "editable-table", | ||
| 27 | + "data-spreadsheet" | ||
| 28 | + ], | ||
| 29 | + "ignore": [ | ||
| 30 | + "**/.*", | ||
| 31 | + "components", | ||
| 32 | + "demo", | ||
| 33 | + "node_modules", | ||
| 34 | + "src", | ||
| 35 | + "test" | ||
| 36 | + ], | ||
| 37 | + "dependencies": { | ||
| 38 | + "zeroclipboard": "^2.2.0", | ||
| 39 | + "moment": "^2.9.0", | ||
| 40 | + "pikaday": "^1.3.2" | ||
| 41 | + }, | ||
| 42 | + "devDependencies": { | ||
| 43 | + "chroma-js": "~0.5.6" | ||
| 44 | + } | ||
| 45 | +} |
src/main/resources/static/assets/bower_components/handsontable/dist/README.md
0 → 100644
| 1 | +# Handsontable distributions | ||
| 2 | + | ||
| 3 | +## Full distribution (recommended) | ||
| 4 | + | ||
| 5 | +The full distribution allows you to use Handsontable by just including 2 files: | ||
| 6 | +```html | ||
| 7 | +<script src="dist/handsontable.full.js"></script> | ||
| 8 | +<link rel="stylesheet" media="screen" href="dist/handsontable.full.css"> | ||
| 9 | +``` | ||
| 10 | +(It may also require Pikaday and moment.js, if you're using the Datepicker for date input) | ||
| 11 | + | ||
| 12 | +**handsontable.full.js** and **handsontable.full.css** are compiled with ___all___ the needed dependencies. | ||
| 13 | + | ||
| 14 | +Using this has the same effect as loading all the dependencies from the Bare distribution (see below). | ||
| 15 | + | ||
| 16 | +## Bare distribution | ||
| 17 | + | ||
| 18 | +If you are a "Bob the Builder" kind of hacker, you will need to load Handsontable JS, CSS and their dependencies: | ||
| 19 | +```html | ||
| 20 | +<!-- Required dependencies (as external scripts) --> | ||
| 21 | +<script src="lib/pikaday/pikaday.js"></script> | ||
| 22 | +<script src="lib/moment/moment.js"></script> | ||
| 23 | +<script src="lib/zeroclipboard/ZeroClipboard.js"></script> | ||
| 24 | +<!-- Handsontable bare files --> | ||
| 25 | +<script src="dist/handsontable.js"></script> | ||
| 26 | +<link rel="stylesheet" media="screen" href="dist/handsontable.css"> | ||
| 27 | +``` | ||
| 28 | + | ||
| 29 | +**handsontable.js** and **handsontable.css** are compiled ___without___ the needed dependencies. | ||
| 30 | + | ||
| 31 | +## Custom distribution | ||
| 32 | + | ||
| 33 | +If you want to build your own custom Handsontable package distribution check out our [tool](https://github.com/handsontable/hot-builder) designed for this. |