Commit 009fc291ff472fd6ffd15b647a2687b3f016031e
Merge branch 'minhang' of
http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
59 changed files
with
2479 additions
and
620 deletions
Too many changes to show.
To preserve performance only 59 of 87 files are displayed.
src/main/java/com/bsth/Application.java
| ... | ... | @@ -17,7 +17,7 @@ import java.util.concurrent.ScheduledExecutorService; |
| 17 | 17 | @SpringBootApplication |
| 18 | 18 | public class Application extends SpringBootServletInitializer { |
| 19 | 19 | |
| 20 | - public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(15); | |
| 20 | + public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(16); | |
| 21 | 21 | |
| 22 | 22 | @Override |
| 23 | 23 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | ... | ... |
src/main/java/com/bsth/XDApplication.java
| ... | ... | @@ -4,10 +4,14 @@ import com.bsth.data.BasicData; |
| 4 | 4 | import com.bsth.data.ThreadMonotor; |
| 5 | 5 | import com.bsth.data.car_out_info.UpdateDBThread; |
| 6 | 6 | import com.bsth.data.directive.DirectivesPstThread; |
| 7 | +import com.bsth.data.forecast.SampleTimeDataLoader; | |
| 7 | 8 | import com.bsth.data.gpsdata.thread.GpsDataLoaderThread; |
| 8 | 9 | import com.bsth.data.gpsdata.thread.OfflineMonitorThread; |
| 10 | +import com.bsth.data.msg_queue.DirectivePushQueue; | |
| 11 | +import com.bsth.data.msg_queue.WebSocketPushQueue; | |
| 9 | 12 | import com.bsth.data.schedule.edit_logs.SeiPstThread; |
| 10 | 13 | import com.bsth.data.schedule.late_adjust.ScheduleLateThread; |
| 14 | +import com.bsth.data.schedule.signal.SchSiginUpdateDBThread; | |
| 11 | 15 | import com.bsth.data.schedule.thread.CalcOilThread; |
| 12 | 16 | import com.bsth.data.schedule.thread.SchedulePstThread; |
| 13 | 17 | import com.bsth.data.schedule.thread.ScheduleRefreshThread; |
| ... | ... | @@ -56,6 +60,10 @@ public class XDApplication implements CommandLineRunner { |
| 56 | 60 | ThreadMonotor threadMonotor; |
| 57 | 61 | @Autowired |
| 58 | 62 | SeiPstThread seiPstThread; |
| 63 | + @Autowired | |
| 64 | + SampleTimeDataLoader sampleTimeDataLoader; | |
| 65 | + @Autowired | |
| 66 | + SchSiginUpdateDBThread schSiginUpdateDBThread; | |
| 59 | 67 | |
| 60 | 68 | private static long timeDiff; |
| 61 | 69 | private static long timeDiffTraffic; |
| ... | ... | @@ -116,30 +124,31 @@ public class XDApplication implements CommandLineRunner { |
| 116 | 124 | public void prodInit(){ |
| 117 | 125 | log.info("prodInit..."); |
| 118 | 126 | ScheduledExecutorService sexec = Application.mainServices; |
| 119 | - //发车信息 | |
| 120 | - sexec.scheduleWithFixedDelay(fcxxUpdateThread, 60, 40, TimeUnit.SECONDS); | |
| 121 | - //抓取GPS数据 | |
| 122 | - sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS); | |
| 123 | - //GPS设备掉离线 | |
| 124 | - sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS); | |
| 125 | - //班次更新线程 | |
| 126 | - sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); | |
| 127 | - //班次延迟入库线程 | |
| 128 | - sexec.scheduleWithFixedDelay(schedulePstThread, 60, 10, TimeUnit.SECONDS); | |
| 129 | - //班次修正日志入库 | |
| 130 | - sexec.scheduleWithFixedDelay(seiPstThread, 60, 60, TimeUnit.SECONDS); | |
| 131 | - //检查班次误点 | |
| 132 | - sexec.scheduleWithFixedDelay(scheduleLateThread, 60, 30, TimeUnit.SECONDS); | |
| 133 | - //调度指令延迟入库 | |
| 134 | - sexec.scheduleWithFixedDelay(directivesPstThread, 180, 100, TimeUnit.SECONDS); | |
| 127 | + | |
| 128 | + /** 线调业务 */ | |
| 129 | + sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS);//抓取GPS数据 | |
| 130 | + sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);//GPS设备掉离线 | |
| 131 | + sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);//班次更新线程 | |
| 132 | + sexec.scheduleWithFixedDelay(schedulePstThread, 60, 10, TimeUnit.SECONDS);//班次延迟入库线程 | |
| 133 | + sexec.scheduleWithFixedDelay(seiPstThread, 60, 60, TimeUnit.SECONDS);//班次修正日志入库 | |
| 134 | + sexec.scheduleWithFixedDelay(scheduleLateThread, 60, 30, TimeUnit.SECONDS);//检查班次误点 | |
| 135 | + sexec.scheduleWithFixedDelay(directivesPstThread, 180, 100, TimeUnit.SECONDS);//调度指令延迟入库 | |
| 136 | + sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);//线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) | |
| 137 | + sexec.scheduleWithFixedDelay(sampleTimeDataLoader, 12, 120 * 60, TimeUnit.SECONDS);//到离站预测需要的站点间耗时数据 | |
| 138 | + sexec.scheduleWithFixedDelay(basicDataLoader, 2, 2, TimeUnit.HOURS);//基础数据更新 | |
| 139 | + DirectivePushQueue.start();//消息队列 -指令,系统下发的 | |
| 140 | + WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 | |
| 141 | + | |
| 142 | + /** 线调为其他程序提供的数据 --写入数据库 */ | |
| 143 | + sexec.scheduleWithFixedDelay(fcxxUpdateThread, 60, 40, TimeUnit.SECONDS);//发车信息(发车屏、信息发布) | |
| 144 | + //线路首末班数据(网关用,班次更新时写入) | |
| 145 | + //com.bsth.data.schedule.f_a_l.FirstAndLastHandler | |
| 146 | + sexec.scheduleWithFixedDelay(schSiginUpdateDBThread, 60, 60 * 30, TimeUnit.SECONDS);//无法自动完成的班次信息(网关用,补信号) | |
| 135 | 147 | |
| 136 | 148 | //运管处静态数据提交 |
| 137 | 149 | log.info(timeDiff / 1000 / 60 + "分钟之后提交到运管处"); |
| 138 | 150 | sexec.scheduleAtFixedRate(submitToTrafficManage, timeDiffTraffic / 1000, 60 * 60 * 24, TimeUnit.SECONDS); |
| 139 | 151 | //计算油、公里加注 |
| 140 | 152 | sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS); |
| 141 | - | |
| 142 | - //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) | |
| 143 | - sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS); | |
| 144 | 153 | } |
| 145 | 154 | } | ... | ... |
src/main/java/com/bsth/controller/LineController.java
| 1 | 1 | package com.bsth.controller; |
| 2 | 2 | |
| 3 | +import java.util.HashMap; | |
| 3 | 4 | import java.util.Map; |
| 4 | 5 | |
| 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 7 | import org.springframework.web.bind.annotation.RequestMapping; |
| 7 | 8 | import org.springframework.web.bind.annotation.RequestMethod; |
| 9 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 8 | 10 | import org.springframework.web.bind.annotation.RestController; |
| 9 | 11 | |
| 12 | +import com.bsth.common.ResponseCode; | |
| 10 | 13 | import com.bsth.entity.Line; |
| 11 | 14 | import com.bsth.service.LineService; |
| 12 | 15 | import com.bsth.util.GetUIDAndCode; |
| ... | ... | @@ -50,12 +53,22 @@ public class LineController extends BaseController<Line, Integer> { |
| 50 | 53 | */ |
| 51 | 54 | @RequestMapping(method = RequestMethod.POST) |
| 52 | 55 | public Map<String, Object> save(Line t){ |
| 53 | - | |
| 56 | + Map<String, Object> map = new HashMap<>(); | |
| 54 | 57 | if(t.getId()==null) { |
| 55 | 58 | |
| 56 | 59 | t.setId(Integer.valueOf(t.getLineCode())); |
| 57 | 60 | |
| 58 | 61 | } |
| 62 | + if( (t.getId().toString().length()) > 6) { | |
| 63 | + | |
| 64 | + map.put("status", ResponseCode.ERROR); | |
| 65 | + return map; | |
| 66 | + } | |
| 59 | 67 | return service.save(t); |
| 60 | 68 | } |
| 69 | + | |
| 70 | + @RequestMapping(value ="/findById" , method = RequestMethod.GET) | |
| 71 | + Line findByID(@RequestParam(defaultValue = "id") Integer id){ | |
| 72 | + return service.findById(id); | |
| 73 | + } | |
| 61 | 74 | } | ... | ... |
src/main/java/com/bsth/controller/StationRouteController.java
| ... | ... | @@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RestController; |
| 12 | 12 | import java.util.List; |
| 13 | 13 | import java.util.Map; |
| 14 | 14 | |
| 15 | +import javax.servlet.http.HttpServletResponse; | |
| 16 | + | |
| 15 | 17 | /** |
| 16 | 18 | * |
| 17 | 19 | * @ClassName: StationRouteController(站点路由控制器) |
| ... | ... | @@ -48,6 +50,18 @@ public class StationRouteController extends BaseController<StationRoute, Integer |
| 48 | 50 | } |
| 49 | 51 | |
| 50 | 52 | /** |
| 53 | + * @Description :TODO(查询路段信息) | |
| 54 | + * | |
| 55 | + * @param map <line.id_eq:线路ID; directions_eq:方向> | |
| 56 | + * | |
| 57 | + * @return Map<String, Object> | |
| 58 | + */ | |
| 59 | + @RequestMapping(value = "/export" , method = RequestMethod.GET) | |
| 60 | + public Map<String, Object> export(@RequestParam Integer id, HttpServletResponse resp) { | |
| 61 | + return service.getSectionRouteExport(id, resp); | |
| 62 | + } | |
| 63 | + | |
| 64 | + /** | |
| 51 | 65 | * @param String |
| 52 | 66 | * @throws |
| 53 | 67 | * @Description: TODO(批量撤销站点) | ... | ... |
src/main/java/com/bsth/data/BasicData.java
| 1 | 1 | package com.bsth.data; |
| 2 | 2 | |
| 3 | -import com.bsth.Application; | |
| 4 | 3 | import com.bsth.data.gpsdata.arrival.GeoCacheData; |
| 5 | 4 | import com.bsth.data.pinyin.PersionPinYinBuffer; |
| 6 | 5 | import com.bsth.entity.*; |
| ... | ... | @@ -13,12 +12,10 @@ import org.apache.commons.lang3.StringUtils; |
| 13 | 12 | import org.slf4j.Logger; |
| 14 | 13 | import org.slf4j.LoggerFactory; |
| 15 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | -import org.springframework.boot.CommandLineRunner; | |
| 17 | 15 | import org.springframework.jdbc.core.JdbcTemplate; |
| 18 | 16 | import org.springframework.stereotype.Component; |
| 19 | 17 | |
| 20 | 18 | import java.util.*; |
| 21 | -import java.util.concurrent.TimeUnit; | |
| 22 | 19 | |
| 23 | 20 | /** |
| 24 | 21 | * @author PanZhao |
| ... | ... | @@ -27,7 +24,7 @@ import java.util.concurrent.TimeUnit; |
| 27 | 24 | * @date 2016年8月10日 下午3:27:45 |
| 28 | 25 | */ |
| 29 | 26 | @Component |
| 30 | -public class BasicData implements CommandLineRunner { | |
| 27 | +public class BasicData { | |
| 31 | 28 | |
| 32 | 29 | //公司代码和公司名对照(K: 公司编码,V:公司名) |
| 33 | 30 | public static Map<String, String> businessCodeNameMap; |
| ... | ... | @@ -80,14 +77,6 @@ public class BasicData implements CommandLineRunner { |
| 80 | 77 | |
| 81 | 78 | static Logger logger = LoggerFactory.getLogger(BasicData.class); |
| 82 | 79 | |
| 83 | - @Autowired | |
| 84 | - BasicDataLoader dataLoader; | |
| 85 | - | |
| 86 | - @Override | |
| 87 | - public void run(String... arg0) throws Exception { | |
| 88 | - Application.mainServices.scheduleWithFixedDelay(dataLoader, 2, 2, TimeUnit.HOURS); | |
| 89 | - } | |
| 90 | - | |
| 91 | 80 | public static String getStationNameByCode(String code, String prefix){ |
| 92 | 81 | String name = stationCode2NameMap.get(code); |
| 93 | 82 | return name != null? name: stationCode2NameMap.get(prefix + code); | ... | ... |
src/main/java/com/bsth/data/forecast/ForecastRealServer.java
| 1 | 1 | package com.bsth.data.forecast; |
| 2 | 2 | |
| 3 | -import com.bsth.Application; | |
| 4 | 3 | import com.bsth.data.forecast.entity.ForecastResult; |
| 5 | 4 | import com.bsth.data.forecast.entity.ForecastResult.ForecastResultItem; |
| 6 | 5 | import com.bsth.data.forecast.entity.SimpleRoute; |
| ... | ... | @@ -13,7 +12,6 @@ import com.google.common.collect.ArrayListMultimap; |
| 13 | 12 | import org.slf4j.Logger; |
| 14 | 13 | import org.slf4j.LoggerFactory; |
| 15 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | -import org.springframework.boot.CommandLineRunner; | |
| 17 | 15 | import org.springframework.stereotype.Component; |
| 18 | 16 | |
| 19 | 17 | import java.text.DecimalFormat; |
| ... | ... | @@ -21,7 +19,6 @@ import java.util.ArrayList; |
| 21 | 19 | import java.util.HashMap; |
| 22 | 20 | import java.util.List; |
| 23 | 21 | import java.util.Map; |
| 24 | -import java.util.concurrent.TimeUnit; | |
| 25 | 22 | |
| 26 | 23 | /** |
| 27 | 24 | * |
| ... | ... | @@ -32,10 +29,7 @@ import java.util.concurrent.TimeUnit; |
| 32 | 29 | * |
| 33 | 30 | */ |
| 34 | 31 | @Component |
| 35 | -public class ForecastRealServer implements CommandLineRunner { | |
| 36 | - | |
| 37 | - @Autowired | |
| 38 | - SampleTimeDataLoader dataLoader; | |
| 32 | +public class ForecastRealServer { | |
| 39 | 33 | |
| 40 | 34 | @Autowired |
| 41 | 35 | DayOfSchedule dayOfSchedule; |
| ... | ... | @@ -57,12 +51,6 @@ public class ForecastRealServer implements CommandLineRunner { |
| 57 | 51 | forecastMap = new HashMap<>(); |
| 58 | 52 | } |
| 59 | 53 | |
| 60 | - @Override | |
| 61 | - public void run(String... arg0) throws Exception { | |
| 62 | - //2小时更新一次站点间耗时数据 | |
| 63 | - Application.mainServices.scheduleWithFixedDelay(dataLoader, 12, 120 * 60, TimeUnit.SECONDS); | |
| 64 | - } | |
| 65 | - | |
| 66 | 54 | /** |
| 67 | 55 | * |
| 68 | 56 | * @Title: forecast | ... | ... |
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
| ... | ... | @@ -163,6 +163,7 @@ public class InOutStationSignalHandle extends SignalHandle{ |
| 163 | 163 | |
| 164 | 164 | //实发时间 |
| 165 | 165 | sch.setFcsjActualAll(rsT); |
| 166 | + sch.setSiginCompate(1); | |
| 166 | 167 | //通知客户端 |
| 167 | 168 | sendUtils.sendFcsj(sch); |
| 168 | 169 | //持久化 |
| ... | ... | @@ -316,7 +317,7 @@ public class InOutStationSignalHandle extends SignalHandle{ |
| 316 | 317 | long rsT = lineConfigData.applyIn(sch, gps.getTimestamp()); |
| 317 | 318 | |
| 318 | 319 | sch.setZdsjActualAll(rsT); |
| 319 | - | |
| 320 | + sch.setSiginCompate(2); | |
| 320 | 321 | //通知误点停靠程序,有车辆到站 |
| 321 | 322 | LateAdjustHandle.carArrive(gps); |
| 322 | 323 | ... | ... |
src/main/java/com/bsth/data/msg_queue/DirectivePushQueue.java
| ... | ... | @@ -5,7 +5,6 @@ import com.bsth.service.directive.DirectiveService; |
| 5 | 5 | import org.slf4j.Logger; |
| 6 | 6 | import org.slf4j.LoggerFactory; |
| 7 | 7 | import org.springframework.beans.BeansException; |
| 8 | -import org.springframework.boot.CommandLineRunner; | |
| 9 | 8 | import org.springframework.context.ApplicationContext; |
| 10 | 9 | import org.springframework.context.ApplicationContextAware; |
| 11 | 10 | import org.springframework.stereotype.Component; |
| ... | ... | @@ -17,7 +16,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; |
| 17 | 16 | * Created by panzhao on 2017/5/11. |
| 18 | 17 | */ |
| 19 | 18 | @Component |
| 20 | -public class DirectivePushQueue implements CommandLineRunner, ApplicationContextAware { | |
| 19 | +public class DirectivePushQueue implements ApplicationContextAware { | |
| 21 | 20 | |
| 22 | 21 | static ConcurrentLinkedQueue<QueueData_Directive> linkedList; |
| 23 | 22 | static DataPushThread thread; |
| ... | ... | @@ -80,10 +79,10 @@ public class DirectivePushQueue implements CommandLineRunner, ApplicationContext |
| 80 | 79 | return linkedList.size(); |
| 81 | 80 | } |
| 82 | 81 | |
| 83 | - @Override | |
| 82 | +/* @Override | |
| 84 | 83 | public void run(String... strings) throws Exception { |
| 85 | 84 | start(); |
| 86 | - } | |
| 85 | + }*/ | |
| 87 | 86 | |
| 88 | 87 | @Override |
| 89 | 88 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { | ... | ... |
src/main/java/com/bsth/data/msg_queue/WebSocketPushQueue.java
| ... | ... | @@ -3,7 +3,6 @@ package com.bsth.data.msg_queue; |
| 3 | 3 | import com.bsth.common.Constants; |
| 4 | 4 | import org.slf4j.Logger; |
| 5 | 5 | import org.slf4j.LoggerFactory; |
| 6 | -import org.springframework.boot.CommandLineRunner; | |
| 7 | 6 | import org.springframework.stereotype.Component; |
| 8 | 7 | import org.springframework.web.socket.TextMessage; |
| 9 | 8 | import org.springframework.web.socket.WebSocketSession; |
| ... | ... | @@ -15,7 +14,7 @@ import java.util.concurrent.ConcurrentLinkedQueue; |
| 15 | 14 | * Created by panzhao on 2017/5/11. |
| 16 | 15 | */ |
| 17 | 16 | @Component |
| 18 | -public class WebSocketPushQueue implements CommandLineRunner { | |
| 17 | +public class WebSocketPushQueue { | |
| 19 | 18 | |
| 20 | 19 | static ConcurrentLinkedQueue<QueueData> linkedList; |
| 21 | 20 | static DataPushThread thread; |
| ... | ... | @@ -54,10 +53,6 @@ public class WebSocketPushQueue implements CommandLineRunner { |
| 54 | 53 | return linkedList.size(); |
| 55 | 54 | } |
| 56 | 55 | |
| 57 | - @Override | |
| 58 | - public void run(String... strings) throws Exception { | |
| 59 | - start(); | |
| 60 | - } | |
| 61 | 56 | |
| 62 | 57 | public static class DataPushThread extends Thread { |
| 63 | 58 | ... | ... |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| ... | ... | @@ -729,7 +729,7 @@ public class DayOfSchedule { |
| 729 | 729 | /** |
| 730 | 730 | * @Title: prveNotExecNum |
| 731 | 731 | * @Description: TODO(班次之前未执行班次数量) |
| 732 | - */ | |
| 732 | + | |
| 733 | 733 | public int prveNotExecNum(ScheduleRealInfo sch) { |
| 734 | 734 | int n = 0; |
| 735 | 735 | List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh()); |
| ... | ... | @@ -741,29 +741,29 @@ public class DayOfSchedule { |
| 741 | 741 | break; |
| 742 | 742 | } |
| 743 | 743 | return n; |
| 744 | - } | |
| 744 | + }*/ | |
| 745 | 745 | |
| 746 | 746 | /** |
| 747 | 747 | * @Title: validEndTime |
| 748 | 748 | * @Description: TODO(是否是有效的到达时间) |
| 749 | - */ | |
| 749 | + | |
| 750 | 750 | public boolean validEndTime(ScheduleRealInfo sch, Long ts) { |
| 751 | 751 | if (sch.getFcsjActualTime() != null && sch.getFcsjActualTime() > ts) |
| 752 | 752 | return false; |
| 753 | 753 | |
| 754 | 754 | return validTime(sch, ts); |
| 755 | - } | |
| 755 | + }*/ | |
| 756 | 756 | |
| 757 | 757 | /** |
| 758 | 758 | * @Title: validStartTime |
| 759 | 759 | * @Description: TODO(是否是合适的发车时间) |
| 760 | - */ | |
| 760 | + | |
| 761 | 761 | public boolean validStartTime(ScheduleRealInfo sch, Long ts) { |
| 762 | 762 | if (sch.getZdsjActualTime() != null && sch.getZdsjActualTime() < ts) |
| 763 | 763 | return false; |
| 764 | 764 | |
| 765 | 765 | return validTime(sch, ts); |
| 766 | - } | |
| 766 | + }*/ | |
| 767 | 767 | |
| 768 | 768 | public boolean validTime(ScheduleRealInfo sch, Long ts) { |
| 769 | 769 | List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh()); |
| ... | ... | @@ -875,9 +875,9 @@ public class DayOfSchedule { |
| 875 | 875 | return outList; |
| 876 | 876 | } |
| 877 | 877 | |
| 878 | - public Set<String> allCar() { | |
| 878 | +/* public Set<String> allCar() { | |
| 879 | 879 | return nbbmScheduleMap.keySet(); |
| 880 | - } | |
| 880 | + }*/ | |
| 881 | 881 | |
| 882 | 882 | public Collection<ScheduleRealInfo> findAll() { |
| 883 | 883 | return nbbmScheduleMap.values(); |
| ... | ... | @@ -939,12 +939,12 @@ public class DayOfSchedule { |
| 939 | 939 | return ups; |
| 940 | 940 | } |
| 941 | 941 | |
| 942 | - public void removeNbbm2SchMapp(ScheduleRealInfo sch, String nbbm) { | |
| 943 | - nbbmScheduleMap.remove(nbbm, sch); | |
| 942 | + public void removeNbbm2SchMapp(ScheduleRealInfo sch) { | |
| 943 | + nbbmScheduleMap.remove(sch.getClZbh(), sch); | |
| 944 | 944 | } |
| 945 | 945 | |
| 946 | - public void addNbbm2SchMapp(ScheduleRealInfo sch, String nbbm) { | |
| 947 | - nbbmScheduleMap.put(nbbm, sch); | |
| 946 | + public void addNbbm2SchMapp(ScheduleRealInfo sch) { | |
| 947 | + nbbmScheduleMap.put(sch.getClZbh(), sch); | |
| 948 | 948 | } |
| 949 | 949 | |
| 950 | 950 | public void reCalcExecPlan(String nbbm) { | ... | ... |
src/main/java/com/bsth/data/schedule/signal/SchSiginUpdateDBThread.java
0 → 100644
| 1 | +package com.bsth.data.schedule.signal; | |
| 2 | + | |
| 3 | +import org.slf4j.Logger; | |
| 4 | +import org.slf4j.LoggerFactory; | |
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | +import org.springframework.stereotype.Component; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Created by panzhao on 2017/8/14. | |
| 10 | + */ | |
| 11 | +@Component | |
| 12 | +public class SchSiginUpdateDBThread extends Thread{ | |
| 13 | + | |
| 14 | + @Autowired | |
| 15 | + SignalComplateHandler signalComplateHandler; | |
| 16 | + | |
| 17 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 18 | + | |
| 19 | + @Override | |
| 20 | + public void run() { | |
| 21 | + try{ | |
| 22 | + signalComplateHandler.handler(); | |
| 23 | + }catch (Exception e){ | |
| 24 | + logger.error("", e); | |
| 25 | + } | |
| 26 | + } | |
| 27 | +} | ... | ... |
src/main/java/com/bsth/data/schedule/signal/SignalComplateHandler.java
0 → 100644
| 1 | +package com.bsth.data.schedule.signal; | |
| 2 | + | |
| 3 | +import com.bsth.data.schedule.DayOfSchedule; | |
| 4 | +import com.bsth.data.schedule.signal.entity.SchSiginCompate; | |
| 5 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 6 | +import com.bsth.util.db.DBUtils_MS; | |
| 7 | +import org.apache.commons.lang3.StringUtils; | |
| 8 | +import org.slf4j.Logger; | |
| 9 | +import org.slf4j.LoggerFactory; | |
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 11 | +import org.springframework.jdbc.core.BatchPreparedStatementSetter; | |
| 12 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 13 | +import org.springframework.jdbc.datasource.DataSourceTransactionManager; | |
| 14 | +import org.springframework.stereotype.Component; | |
| 15 | +import org.springframework.transaction.TransactionDefinition; | |
| 16 | +import org.springframework.transaction.TransactionStatus; | |
| 17 | +import org.springframework.transaction.support.DefaultTransactionDefinition; | |
| 18 | + | |
| 19 | +import java.sql.PreparedStatement; | |
| 20 | +import java.sql.SQLException; | |
| 21 | +import java.util.ArrayList; | |
| 22 | +import java.util.Collection; | |
| 23 | +import java.util.Date; | |
| 24 | +import java.util.List; | |
| 25 | + | |
| 26 | +/** | |
| 27 | + * 班次信号补全(写入数据库,网关以补发的形式提交运管处) | |
| 28 | + * Created by panzhao on 2017/8/13. | |
| 29 | + */ | |
| 30 | +@Component | |
| 31 | +public class SignalComplateHandler { | |
| 32 | + | |
| 33 | + @Autowired | |
| 34 | + DayOfSchedule dayOfSchedule; | |
| 35 | + | |
| 36 | + Logger log = LoggerFactory.getLogger(this.getClass()); | |
| 37 | + | |
| 38 | + public void handler(){ | |
| 39 | + Collection<ScheduleRealInfo> all = dayOfSchedule.findAll(); | |
| 40 | + List<SchSiginCompate> list = new ArrayList<>(); | |
| 41 | + | |
| 42 | + SchSiginCompate siginCompate; | |
| 43 | + Date d = new Date(); | |
| 44 | + long et = System.currentTimeMillis() - (1000 * 60 * 60 * 2), | |
| 45 | + st = et - (1000 * 60 * 60 * 2); | |
| 46 | + for(ScheduleRealInfo sch : all){ | |
| 47 | + if(sch.getDfsjT() > et || sch.getDfsjT() < st) | |
| 48 | + continue; | |
| 49 | + | |
| 50 | + //能自动完成的 | |
| 51 | + if(sch.getSiginCompate() >= 2) | |
| 52 | + continue; | |
| 53 | + | |
| 54 | + //烂班 | |
| 55 | + if(sch.isDestroy()) | |
| 56 | + continue; | |
| 57 | + | |
| 58 | + //空驶任务 | |
| 59 | + if(dayOfSchedule.emptyService(sch)) | |
| 60 | + continue; | |
| 61 | + | |
| 62 | + siginCompate = new SchSiginCompate(sch); | |
| 63 | + if(siginCompate == null || StringUtils.isEmpty(siginCompate.getDeciveId())) | |
| 64 | + continue; | |
| 65 | + | |
| 66 | + //标记已经补发 | |
| 67 | + sch.setSiginCompate(3); | |
| 68 | + //标记入库 | |
| 69 | + dayOfSchedule.save(sch); | |
| 70 | + siginCompate.setCreateDate(d); | |
| 71 | + list.add(siginCompate); | |
| 72 | + } | |
| 73 | + | |
| 74 | + put(list); | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void put(final List<SchSiginCompate> list){ | |
| 78 | + if(null == list || list.size() == 0) | |
| 79 | + return; | |
| 80 | + | |
| 81 | + JdbcTemplate jdbcTemp = new JdbcTemplate(DBUtils_MS.getDataSource()); | |
| 82 | + //编程式事务 | |
| 83 | + DataSourceTransactionManager tran = new DataSourceTransactionManager(jdbcTemp.getDataSource()); | |
| 84 | + DefaultTransactionDefinition def = new DefaultTransactionDefinition(); | |
| 85 | + def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); | |
| 86 | + TransactionStatus status = tran.getTransaction(def); | |
| 87 | + | |
| 88 | + try{ | |
| 89 | + jdbcTemp.batchUpdate("insert into bsth_t_sigin_complate(id, rq, line_code, device_id, up_down, s_code, e_code, st, et, create_date, status) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new BatchPreparedStatementSetter() { | |
| 90 | + @Override | |
| 91 | + public void setValues(PreparedStatement ps, int i) throws SQLException { | |
| 92 | + SchSiginCompate sc = list.get(i); | |
| 93 | + ps.setLong(1, sc.getId()); | |
| 94 | + ps.setString(2, sc.getRq()); | |
| 95 | + ps.setString(3, sc.getLineCode()); | |
| 96 | + ps.setString(4, sc.getDeciveId()); | |
| 97 | + ps.setInt(5, sc.getUpDown()); | |
| 98 | + ps.setString(6, sc.getsCode()); | |
| 99 | + ps.setString(7, sc.geteCode()); | |
| 100 | + ps.setLong(8, sc.getSt()); | |
| 101 | + ps.setLong(9, sc.getEt()); | |
| 102 | + ps.setDate(10, new java.sql.Date(sc.getCreateDate().getTime())); | |
| 103 | + ps.setInt(11, sc.getStatus()); | |
| 104 | + } | |
| 105 | + | |
| 106 | + @Override | |
| 107 | + public int getBatchSize() { | |
| 108 | + return list.size(); | |
| 109 | + } | |
| 110 | + }); | |
| 111 | + | |
| 112 | + tran.commit(status); | |
| 113 | + log.info("补信号班次入库," + list.size()); | |
| 114 | + }catch (Exception e){ | |
| 115 | + log.error("", e); | |
| 116 | + tran.rollback(status); | |
| 117 | + } | |
| 118 | + } | |
| 119 | + | |
| 120 | + | |
| 121 | +} | ... | ... |
src/main/java/com/bsth/data/schedule/signal/entity/SchSiginCompate.java
0 → 100644
| 1 | +package com.bsth.data.schedule.signal.entity; | |
| 2 | + | |
| 3 | +import com.bsth.data.BasicData; | |
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 5 | + | |
| 6 | +import java.util.Date; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 班次信号补偿 | |
| 10 | + * Created by panzhao on 2017/8/13. | |
| 11 | + */ | |
| 12 | +public class SchSiginCompate { | |
| 13 | + | |
| 14 | + /** 实际班次ID */ | |
| 15 | + private long id; | |
| 16 | + | |
| 17 | + /** 班次日期 */ | |
| 18 | + private String rq; | |
| 19 | + | |
| 20 | + /** 线路编码 */ | |
| 21 | + private String lineCode; | |
| 22 | + | |
| 23 | + /** 设备号 */ | |
| 24 | + private String deciveId; | |
| 25 | + | |
| 26 | + /** 上下行 */ | |
| 27 | + private int upDown; | |
| 28 | + | |
| 29 | + /** 起始站编码 */ | |
| 30 | + private String sCode; | |
| 31 | + | |
| 32 | + /** 终点站编码 */ | |
| 33 | + private String eCode; | |
| 34 | + | |
| 35 | + /** 开始时间戳 */ | |
| 36 | + private long st; | |
| 37 | + | |
| 38 | + /** 结束时间戳 */ | |
| 39 | + private long et; | |
| 40 | + | |
| 41 | + /** 入库时间 */ | |
| 42 | + private Date createDate; | |
| 43 | + | |
| 44 | + private int status = 0; | |
| 45 | + | |
| 46 | + public SchSiginCompate(ScheduleRealInfo sch) { | |
| 47 | + this.id = sch.getId(); | |
| 48 | + this.rq = sch.getScheduleDateStr(); | |
| 49 | + this.lineCode = sch.getXlBm(); | |
| 50 | + this.upDown = Integer.parseInt(sch.getXlDir()); | |
| 51 | + this.deciveId = BasicData.deviceId2NbbmMap.inverse().get(sch.getClZbh()); | |
| 52 | + this.sCode = sch.getQdzCode(); | |
| 53 | + this.eCode = sch.getZdzCode(); | |
| 54 | + this.st = sch.getDfsjT(); | |
| 55 | + this.et = sch.getZdsjT(); | |
| 56 | + | |
| 57 | + if(sch.getFcsjActualTime() != null) | |
| 58 | + this.st = sch.getFcsjActualTime(); | |
| 59 | + if(sch.getZdsjActualTime() != null) | |
| 60 | + this.et = sch.getZdsjActualTime(); | |
| 61 | + } | |
| 62 | + | |
| 63 | + public long getId() { | |
| 64 | + return id; | |
| 65 | + } | |
| 66 | + | |
| 67 | + public void setId(long id) { | |
| 68 | + this.id = id; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public String getRq() { | |
| 72 | + return rq; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void setRq(String rq) { | |
| 76 | + this.rq = rq; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public String getLineCode() { | |
| 80 | + return lineCode; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public void setLineCode(String lineCode) { | |
| 84 | + this.lineCode = lineCode; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public String getDeciveId() { | |
| 88 | + return deciveId; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public void setDeciveId(String deciveId) { | |
| 92 | + this.deciveId = deciveId; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public int getUpDown() { | |
| 96 | + return upDown; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public void setUpDown(int upDown) { | |
| 100 | + this.upDown = upDown; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public String getsCode() { | |
| 104 | + return sCode; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public void setsCode(String sCode) { | |
| 108 | + this.sCode = sCode; | |
| 109 | + } | |
| 110 | + | |
| 111 | + public String geteCode() { | |
| 112 | + return eCode; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public void seteCode(String eCode) { | |
| 116 | + this.eCode = eCode; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public long getSt() { | |
| 120 | + return st; | |
| 121 | + } | |
| 122 | + | |
| 123 | + public void setSt(long st) { | |
| 124 | + this.st = st; | |
| 125 | + } | |
| 126 | + | |
| 127 | + public long getEt() { | |
| 128 | + return et; | |
| 129 | + } | |
| 130 | + | |
| 131 | + public void setEt(long et) { | |
| 132 | + this.et = et; | |
| 133 | + } | |
| 134 | + | |
| 135 | + public Date getCreateDate() { | |
| 136 | + return createDate; | |
| 137 | + } | |
| 138 | + | |
| 139 | + public void setCreateDate(Date createDate) { | |
| 140 | + this.createDate = createDate; | |
| 141 | + } | |
| 142 | + | |
| 143 | + public int getStatus() { | |
| 144 | + return status; | |
| 145 | + } | |
| 146 | + | |
| 147 | + public void setStatus(int status) { | |
| 148 | + this.status = status; | |
| 149 | + } | |
| 150 | +} | ... | ... |
src/main/java/com/bsth/entity/Personnel.java
| ... | ... | @@ -44,7 +44,7 @@ public class Personnel extends BEntity { |
| 44 | 44 | @Formula(" concat(company_code, '_', branche_company_code) ") |
| 45 | 45 | private String cgsbm; |
| 46 | 46 | |
| 47 | - /** 工号 */ | |
| 47 | + /** 工号(员工编号带公司编码前缀) */ | |
| 48 | 48 | @Column(nullable = false) |
| 49 | 49 | private String jobCode; |
| 50 | 50 | /** 姓名 */ |
| ... | ... | @@ -59,10 +59,17 @@ public class Personnel extends BEntity { |
| 59 | 59 | private String personnelType; |
| 60 | 60 | /** 所属岗位/工种(字典类型gzType) */ |
| 61 | 61 | private String posts; |
| 62 | - | |
| 62 | + | |
| 63 | + /** 工号 */ | |
| 64 | + @Column(nullable = false) | |
| 65 | + private String jobCodeori; | |
| 63 | 66 | /** 身份证 */ |
| 64 | 67 | private String card; |
| 65 | 68 | |
| 69 | + | |
| 70 | + /** 备注 */ | |
| 71 | + private String remark; | |
| 72 | + | |
| 66 | 73 | public Personnel() {} |
| 67 | 74 | |
| 68 | 75 | public Personnel(Object id, Object companyCode, Object gh) { |
| ... | ... | @@ -231,4 +238,20 @@ public class Personnel extends BEntity { |
| 231 | 238 | public void setCgsbm(String cgsbm) { |
| 232 | 239 | this.cgsbm = cgsbm; |
| 233 | 240 | } |
| 241 | + | |
| 242 | + public String getJobCodeori() { | |
| 243 | + return jobCodeori; | |
| 244 | + } | |
| 245 | + | |
| 246 | + public void setJobCodeori(String jobCodeori) { | |
| 247 | + this.jobCodeori = jobCodeori; | |
| 248 | + } | |
| 249 | + | |
| 250 | + public String getRemark() { | |
| 251 | + return remark; | |
| 252 | + } | |
| 253 | + | |
| 254 | + public void setRemark(String remark) { | |
| 255 | + this.remark = remark; | |
| 256 | + } | |
| 234 | 257 | } | ... | ... |
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
| ... | ... | @@ -214,6 +214,9 @@ public class ScheduleRealInfo { |
| 214 | 214 | @JsonIgnore |
| 215 | 215 | private int saveFailCount=0; |
| 216 | 216 | |
| 217 | + /** 是否需要补充GPS信号 (网关提交至运管处动态数据用) 1: 能发车, 2:能到达 3: 补发过*/ | |
| 218 | + private int siginCompate; | |
| 219 | + | |
| 217 | 220 | public boolean isDfAuto() { |
| 218 | 221 | return dfAuto; |
| 219 | 222 | } |
| ... | ... | @@ -303,10 +306,10 @@ public class ScheduleRealInfo { |
| 303 | 306 | String old = this.getRemarks(); |
| 304 | 307 | if(StringUtils.isBlank(old)) |
| 305 | 308 | old = ""; |
| 306 | - | |
| 309 | + | |
| 307 | 310 | old += remark + ";"; |
| 308 | 311 | this.setRemarks(old); |
| 309 | - | |
| 312 | + | |
| 310 | 313 | } |
| 311 | 314 | |
| 312 | 315 | public Long getId() { |
| ... | ... | @@ -622,12 +625,12 @@ public class ScheduleRealInfo { |
| 622 | 625 | this.dfsjT = dfsjT; |
| 623 | 626 | this.dfsj = fmtHHmm.print(this.dfsjT); |
| 624 | 627 | } |
| 625 | - | |
| 628 | + | |
| 626 | 629 | public void setDfsjAll(String dfsj) { |
| 627 | 630 | this.dfsjT = fmtyyyyMMddHHmm.parseMillis(this.realExecDate + dfsj); |
| 628 | 631 | this.dfsj = dfsj; |
| 629 | 632 | } |
| 630 | - | |
| 633 | + | |
| 631 | 634 | public void calcEndTime(){ |
| 632 | 635 | //计划终点时间 |
| 633 | 636 | if(this.getBcsj() != null){ |
| ... | ... | @@ -665,33 +668,33 @@ public class ScheduleRealInfo { |
| 665 | 668 | public void setSflj(boolean sflj) { |
| 666 | 669 | this.sflj = sflj; |
| 667 | 670 | } |
| 668 | - | |
| 671 | + | |
| 669 | 672 | /** |
| 670 | - * | |
| 671 | - * @Title: setFcsjAll | |
| 672 | - * @Description: TODO(设置计划发车时间) | |
| 673 | + * | |
| 674 | + * @Title: setFcsjAll | |
| 675 | + * @Description: TODO(设置计划发车时间) | |
| 673 | 676 | * @throws |
| 674 | 677 | */ |
| 675 | 678 | public void setFcsjAll(String fcsj){ |
| 676 | 679 | this.fcsjT = fmtyyyyMMddHHmm.parseMillis(this.realExecDate + fcsj); |
| 677 | 680 | this.fcsj = fcsj; |
| 678 | 681 | } |
| 679 | - | |
| 682 | + | |
| 680 | 683 | /** |
| 681 | - * | |
| 682 | - * @Title: setFcsjAll | |
| 683 | - * @Description: TODO(设置计划发车时间) | |
| 684 | + * | |
| 685 | + * @Title: setFcsjAll | |
| 686 | + * @Description: TODO(设置计划发车时间) | |
| 684 | 687 | * @throws |
| 685 | 688 | */ |
| 686 | 689 | public void setFcsjAll(Long fcsjT){ |
| 687 | 690 | this.fcsjT = fcsjT; |
| 688 | 691 | this.fcsj = fmtHHmm.print(fcsjT); |
| 689 | 692 | } |
| 690 | - | |
| 693 | + | |
| 691 | 694 | /** |
| 692 | - * | |
| 693 | - * @Title: setFcsjActualAll | |
| 694 | - * @Description: TODO(设置实际发车时间 字符串) | |
| 695 | + * | |
| 696 | + * @Title: setFcsjActualAll | |
| 697 | + * @Description: TODO(设置实际发车时间 字符串) | |
| 695 | 698 | * @throws |
| 696 | 699 | */ |
| 697 | 700 | public void setFcsjActualAll(String fcsjActual){ |
| ... | ... | @@ -699,11 +702,11 @@ public class ScheduleRealInfo { |
| 699 | 702 | this.fcsjActual = fcsjActual; |
| 700 | 703 | calcStatus(); |
| 701 | 704 | } |
| 702 | - | |
| 705 | + | |
| 703 | 706 | /** |
| 704 | - * | |
| 705 | - * @Title: setFcsjActualAll | |
| 706 | - * @Description: TODO(设置实际发车时间 时间戳) | |
| 707 | + * | |
| 708 | + * @Title: setFcsjActualAll | |
| 709 | + * @Description: TODO(设置实际发车时间 时间戳) | |
| 707 | 710 | * @throws |
| 708 | 711 | */ |
| 709 | 712 | public void setFcsjActualAll(Long t){ |
| ... | ... | @@ -713,25 +716,25 @@ public class ScheduleRealInfo { |
| 713 | 716 | //更新班次状态 |
| 714 | 717 | calcStatus(); |
| 715 | 718 | } |
| 716 | - | |
| 719 | + | |
| 717 | 720 | /** |
| 718 | - * | |
| 719 | - * @Title: setFcsjActualAll | |
| 720 | - * @Description: TODO(设置实际终点时间) | |
| 721 | + * | |
| 722 | + * @Title: setFcsjActualAll | |
| 723 | + * @Description: TODO(设置实际终点时间) | |
| 721 | 724 | * @throws |
| 722 | 725 | */ |
| 723 | 726 | public void setZdsjActualAll(Long t){ |
| 724 | 727 | this.zdsjActualTime = t; |
| 725 | 728 | this.zdsjActual = fmtHHmm.print(t); |
| 726 | - | |
| 729 | + | |
| 727 | 730 | //更新班次状态 |
| 728 | 731 | calcStatus(); |
| 729 | 732 | } |
| 730 | - | |
| 733 | + | |
| 731 | 734 | /** |
| 732 | - * | |
| 733 | - * @Title: setFcsjActualAll | |
| 734 | - * @Description: TODO(设置实际终点时间) | |
| 735 | + * | |
| 736 | + * @Title: setFcsjActualAll | |
| 737 | + * @Description: TODO(设置实际终点时间) | |
| 735 | 738 | * @throws |
| 736 | 739 | */ |
| 737 | 740 | public void setZdsjActualAll(String zdsjActual){ |
| ... | ... | @@ -740,7 +743,7 @@ public class ScheduleRealInfo { |
| 740 | 743 | |
| 741 | 744 | calcStatus(); |
| 742 | 745 | } |
| 743 | - | |
| 746 | + | |
| 744 | 747 | public Long getSpId() { |
| 745 | 748 | return spId; |
| 746 | 749 | } |
| ... | ... | @@ -760,11 +763,11 @@ public class ScheduleRealInfo { |
| 760 | 763 | public void calcStatus() { |
| 761 | 764 | if(this.status == -1) |
| 762 | 765 | return; |
| 763 | - | |
| 766 | + | |
| 764 | 767 | this.status = 0; |
| 765 | 768 | if(StringUtils.isNotBlank(this.fcsjActual)){ |
| 766 | 769 | this.status = 1; |
| 767 | - | |
| 770 | + | |
| 768 | 771 | //进出场班次并且没有计划里程的 |
| 769 | 772 | if((this.bcType.equals("out") || this.bcType.equals("in")) |
| 770 | 773 | && this.jhlc == null){ |
| ... | ... | @@ -774,7 +777,7 @@ public class ScheduleRealInfo { |
| 774 | 777 | if(StringUtils.isNotBlank(this.zdsjActual)) |
| 775 | 778 | this.status = 2; |
| 776 | 779 | } |
| 777 | - | |
| 780 | + | |
| 778 | 781 | public void destroy(){ |
| 779 | 782 | this.jhlc = 0.0; |
| 780 | 783 | if(this.isSflj()) |
| ... | ... | @@ -782,11 +785,11 @@ public class ScheduleRealInfo { |
| 782 | 785 | this.status = -1; |
| 783 | 786 | this.clearFcsjActual(); |
| 784 | 787 | } |
| 785 | - | |
| 788 | + | |
| 786 | 789 | public boolean isDestroy(){ |
| 787 | 790 | return this.status == -1; |
| 788 | 791 | } |
| 789 | - | |
| 792 | + | |
| 790 | 793 | /* public boolean isNotDestroy(){ |
| 791 | 794 | return this.status != -1; |
| 792 | 795 | }*/ |
| ... | ... | @@ -806,18 +809,18 @@ public class ScheduleRealInfo { |
| 806 | 809 | public void setScheduleDateStr(String scheduleDateStr) { |
| 807 | 810 | this.scheduleDateStr = scheduleDateStr; |
| 808 | 811 | } |
| 809 | - | |
| 812 | + | |
| 810 | 813 | public void clearFcsjActual(){ |
| 811 | 814 | this.setFcsjActual(null); |
| 812 | 815 | this.setFcsjActualTime(null); |
| 813 | 816 | this.calcStatus(); |
| 814 | 817 | } |
| 815 | - | |
| 818 | + | |
| 816 | 819 | //清除实际终点时间 |
| 817 | 820 | public void clearZdsjActual(){ |
| 818 | 821 | this.setZdsjActual(null); |
| 819 | 822 | this.setZdsjActualTime(null); |
| 820 | - | |
| 823 | + | |
| 821 | 824 | calcStatus(); |
| 822 | 825 | } |
| 823 | 826 | |
| ... | ... | @@ -922,4 +925,12 @@ public class ScheduleRealInfo { |
| 922 | 925 | public void setSaveFailCount(int saveFailCount) { |
| 923 | 926 | this.saveFailCount = saveFailCount; |
| 924 | 927 | } |
| 928 | + | |
| 929 | + public int getSiginCompate() { | |
| 930 | + return siginCompate; | |
| 931 | + } | |
| 932 | + | |
| 933 | + public void setSiginCompate(int siginCompate) { | |
| 934 | + this.siginCompate = siginCompate; | |
| 935 | + } | |
| 925 | 936 | } | ... | ... |
src/main/java/com/bsth/repository/StationRouteRepository.java
| ... | ... | @@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional; |
| 15 | 15 | |
| 16 | 16 | import com.bsth.entity.Line; |
| 17 | 17 | import com.bsth.entity.StationRoute; |
| 18 | +import com.bsth.entity.StationRouteCache; | |
| 18 | 19 | |
| 19 | 20 | /** |
| 20 | 21 | * |
| ... | ... | @@ -86,6 +87,9 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int |
| 86 | 87 | "ON a.`stationRoute.station` = b.id ORDER BY a.`stationRoute.stationRouteCode` ASC", nativeQuery=true) |
| 87 | 88 | List<Object[]> findPoints(int line,int directions); |
| 88 | 89 | |
| 90 | + @Query("select r from StationRoute r where r.line.id=?1 and r.destroy=0 order by r.directions ASC ,r.stationRouteCode ASC") | |
| 91 | + // @Query(value = "SELECT * from bsth_c_stationroute line = ?1 and destroy=0 bsth_c_station ORDER BY directions ASC, stationRouteCode ASC", nativeQuery=true) | |
| 92 | + List<StationRoute> findStationExport(int line); | |
| 89 | 93 | |
| 90 | 94 | /** |
| 91 | 95 | * @Description :TODO(查询线路某方向下的站点序号与类型) | ... | ... |
src/main/java/com/bsth/service/LineService.java
| 1 | 1 | package com.bsth.service; |
| 2 | 2 | |
| 3 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 4 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 5 | + | |
| 3 | 6 | import com.bsth.entity.Line; |
| 4 | 7 | |
| 5 | 8 | /** |
| ... | ... | @@ -27,4 +30,6 @@ public interface LineService extends BaseService<Line, Integer> { |
| 27 | 30 | long selectMaxIdToLineCode(); |
| 28 | 31 | |
| 29 | 32 | Line findByLineCode(String lineCode); |
| 33 | + | |
| 34 | + Line findById(Integer id); | |
| 30 | 35 | } | ... | ... |
src/main/java/com/bsth/service/StationRouteService.java
| ... | ... | @@ -3,6 +3,8 @@ package com.bsth.service; |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import java.util.Map; |
| 5 | 5 | |
| 6 | +import javax.servlet.http.HttpServletResponse; | |
| 7 | + | |
| 6 | 8 | import com.bsth.entity.StationRoute; |
| 7 | 9 | |
| 8 | 10 | /** |
| ... | ... | @@ -105,5 +107,10 @@ public interface StationRouteService extends BaseService<StationRoute, Integer> |
| 105 | 107 | |
| 106 | 108 | Map<String, Object> upddis(Map<String, Object> map); |
| 107 | 109 | |
| 108 | - | |
| 110 | + /** | |
| 111 | + * @param id | |
| 112 | + * @return | |
| 113 | + */ | |
| 114 | + Map<String, Object> getSectionRouteExport(Integer id, HttpServletResponse resp); | |
| 115 | + | |
| 109 | 116 | } | ... | ... |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| ... | ... | @@ -673,9 +673,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 673 | 673 | if(sfqr == 1){ |
| 674 | 674 | where += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'"; |
| 675 | 675 | } |
| 676 | - where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 676 | +// where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 677 | + where += " and bc_type != 'ldks'"; | |
| 677 | 678 | |
| 678 | - String sql = "select id, schedule_date_Str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc," | |
| 679 | + String sql = "select id, schedule_date_Str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type," | |
| 679 | 680 | + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" |
| 680 | 681 | + " from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"'" |
| 681 | 682 | + " and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'"+where+""; |
| ... | ... | @@ -699,6 +700,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 699 | 700 | schedule.setZdsjActual(rs.getString("zdsj_actual")); |
| 700 | 701 | schedule.setQdzName(rs.getString("qdz_name")); |
| 701 | 702 | schedule.setZdzName(rs.getString("zdz_name")); |
| 703 | + schedule.setBcType(rs.getString("bc_type")); | |
| 702 | 704 | schedule.setXlDir(rs.getString("xl_dir")); |
| 703 | 705 | schedule.setStatus(rs.getInt("status")); |
| 704 | 706 | schedule.setRemarks(rs.getString("remarks")); |
| ... | ... | @@ -832,7 +834,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 832 | 834 | if(model.length() != 0){ |
| 833 | 835 | sql = "select sp.id from " |
| 834 | 836 | + "(select id, tt_info, xl_bm, lp, fcsj from bsth_c_s_sp_info where schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'" |
| 835 | - + " and tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks') sp" | |
| 837 | + + " and tt_info = '" + model + "' and bc_type != 'ldks') sp" | |
| 836 | 838 | + " left join bsth_c_s_ttinfo_detail tt on sp.tt_info = tt.ttinfo and sp.xl_bm = tt.xl and sp.lp = tt.lp and sp.fcsj = tt.fcsj"; |
| 837 | 839 | |
| 838 | 840 | ttList = jdbcTemplate.query(sql, |
| ... | ... | @@ -915,6 +917,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 915 | 917 | for(String key : keyMap.keySet()){ |
| 916 | 918 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 917 | 919 | Map<Long, ScheduleRealInfo> sortMap = new HashMap<Long, ScheduleRealInfo>(); |
| 920 | + Map<Long, Map<String, Object>> sortMap1 = new HashMap<Long, Map<String, Object>>(); | |
| 918 | 921 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); |
| 919 | 922 | List<Long> keyList = new ArrayList<Long>(); |
| 920 | 923 | List<Long> keyList2 = new ArrayList<Long>(); |
| ... | ... | @@ -946,30 +949,25 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 946 | 949 | for(int i = 1; i < keyList.size(); i++){ |
| 947 | 950 | ScheduleRealInfo schedule1 = sortMap.get(keyList.get(i - 1)); |
| 948 | 951 | ScheduleRealInfo schedule2 = sortMap.get(keyList.get(i)); |
| 949 | - if(!tsSet.contains(schedule1.getId())){ | |
| 950 | - if(sfqr == 1 && time1 > schedule1.getFcsjT()){ | |
| 951 | - jhyysj += schedule2.getFcsjT() - time1; | |
| 952 | - }else if(sfqr == 1 && time2 < schedule2.getFcsjT()){ | |
| 953 | - jhyysj += time2 - schedule1.getFcsjT(); | |
| 952 | + if(!tsSet.contains(schedule1.getId()) && !schedule1.getBcType().toString().equals("in") && !schedule1.getBcType().toString().equals("out")){ | |
| 953 | + long fcsj1 = schedule1.getFcsjT(); | |
| 954 | + long fcsj2 = schedule2.getFcsjT(); | |
| 955 | + if(tsSet.contains(schedule2.getId()) || schedule2.getBcType().toString().equals("in") || schedule2.getBcType().toString().equals("out")){ | |
| 956 | + fcsj2 = schedule1.getZdsjT(); | |
| 957 | + } | |
| 958 | + if(sfqr == 1 && time1 > fcsj1){ | |
| 959 | + jhyysj += fcsj2 - time1; | |
| 960 | + }else if(sfqr == 1 && time2 < fcsj2){ | |
| 961 | + jhyysj += time2 - fcsj1; | |
| 954 | 962 | }else{ |
| 955 | - jhyysj += schedule2.getFcsjT() - schedule1.getFcsjT(); | |
| 963 | + jhyysj += fcsj2 - fcsj1; | |
| 956 | 964 | } |
| 957 | - jhyysj1 += schedule2.getFcsjT() - schedule1.getFcsjT(); | |
| 958 | - } | |
| 959 | - long zdsj2 = schedule2.getZdsjT(); | |
| 960 | - long fcsj2 = schedule2.getFcsjT(); | |
| 961 | - if(fcsj2 > zdsj2) | |
| 962 | - zdsj2 += 1440l; | |
| 963 | - if(sfqr == 1 && time1 > fcsj2){ | |
| 964 | - jhyssj += zdsj2 - time1; | |
| 965 | - }else if(sfqr == 1 && time2 < zdsj2){ | |
| 966 | - jhyssj += time2 - fcsj2; | |
| 967 | - }else{ | |
| 968 | - jhyssj += zdsj2 - fcsj2; | |
| 965 | + if(jhyysj < 0){ | |
| 966 | + System.out.println(fcsj2 + " - " + fcsj1); | |
| 967 | + } | |
| 968 | + jhyysj1 += fcsj2 - fcsj1; | |
| 969 | 969 | } |
| 970 | - jhyssj1 += zdsj2 - fcsj2; | |
| 971 | - jhlc += schedule2.getJhlc()==null?0:schedule2.getJhlc(); | |
| 972 | - if(i == 1){ | |
| 970 | + if(i == 1 && schedule1.getBcType().toString().equals("normal")){ | |
| 973 | 971 | long zdsj1 = schedule1.getZdsjT(); |
| 974 | 972 | long fcsj1 = schedule1.getFcsjT(); |
| 975 | 973 | if(fcsj1 > zdsj1) |
| ... | ... | @@ -984,12 +982,27 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 984 | 982 | jhyssj1 += zdsj1 - fcsj1; |
| 985 | 983 | jhlc += schedule1.getJhlc()==null?0:schedule1.getJhlc(); |
| 986 | 984 | } |
| 985 | + if(schedule2.getBcType().toString().equals("normal")){ | |
| 986 | + long zdsj2 = schedule2.getZdsjT(); | |
| 987 | + long fcsj2 = schedule2.getFcsjT(); | |
| 988 | + if(fcsj2 > zdsj2) | |
| 989 | + zdsj2 += 1440l; | |
| 990 | + if(sfqr == 1 && time1 > fcsj2){ | |
| 991 | + jhyssj += zdsj2 - time1; | |
| 992 | + }else if(sfqr == 1 && time2 < zdsj2){ | |
| 993 | + jhyssj += time2 - fcsj2; | |
| 994 | + }else{ | |
| 995 | + jhyssj += zdsj2 - fcsj2; | |
| 996 | + } | |
| 997 | + jhyssj1 += zdsj2 - fcsj2; | |
| 998 | + jhlc += schedule2.getJhlc()==null?0:schedule2.getJhlc(); | |
| 999 | + } | |
| 987 | 1000 | } |
| 988 | 1001 | |
| 989 | 1002 | for(int i = 0; i < keyList.size(); i++){ |
| 990 | 1003 | Map<String, Object> m = new HashMap<String, Object>(); |
| 991 | 1004 | ScheduleRealInfo schedule = sortMap.get(keyList.get(i)); |
| 992 | - | |
| 1005 | + | |
| 993 | 1006 | if(cMap.containsKey(schedule.getId())){ |
| 994 | 1007 | List<ChildTaskPlan> cTasks = cMap.get(schedule.getId()); |
| 995 | 1008 | for(ChildTaskPlan childTaskPlan : cTasks){ |
| ... | ... | @@ -1012,6 +1025,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1012 | 1025 | temp.put("fcsj", null); |
| 1013 | 1026 | } |
| 1014 | 1027 | } |
| 1028 | + temp.put("bcType", schedule.getBcType()); | |
| 1015 | 1029 | mapList.add(temp); |
| 1016 | 1030 | } |
| 1017 | 1031 | }else{ |
| ... | ... | @@ -1029,6 +1043,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1029 | 1043 | m.put("zdsj", null); |
| 1030 | 1044 | m.put("fcsj", null); |
| 1031 | 1045 | } |
| 1046 | + m.put("bcType", schedule.getBcType()); | |
| 1032 | 1047 | mapList.add(m); |
| 1033 | 1048 | } |
| 1034 | 1049 | } |
| ... | ... | @@ -1036,6 +1051,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1036 | 1051 | for(Map<String, Object> m : mapList){ |
| 1037 | 1052 | if(m.get("fcsj") != null && m.get("fcsj").toString().trim().length()!=0){ |
| 1038 | 1053 | keyList2.add(Long.valueOf(m.get("fcsj").toString())); |
| 1054 | + sortMap1.put(Long.valueOf(m.get("fcsj").toString()), m); | |
| 1039 | 1055 | } |
| 1040 | 1056 | } |
| 1041 | 1057 | Collections.sort(keyList2); |
| ... | ... | @@ -1043,36 +1059,31 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1043 | 1059 | for(int i = 1; i < keyList2.size(); i++){ |
| 1044 | 1060 | long fcsj1 = keyList2.get(i - 1); |
| 1045 | 1061 | long fcsj2 = keyList2.get(i); |
| 1046 | - if(fcsj2 - fcsj1 < 90){ | |
| 1047 | - if(sfqr == 1 && time1 > fcsj1){ | |
| 1048 | - sjyysj += fcsj2 - time1; | |
| 1049 | - }else if(sfqr == 1 && time2 < fcsj2){ | |
| 1050 | - sjyysj += time2 - fcsj1; | |
| 1051 | - }else{ | |
| 1052 | - sjyysj += fcsj2 - fcsj1; | |
| 1053 | - } | |
| 1054 | - sjyysj1 += fcsj2 - fcsj1; | |
| 1062 | + Map<String, Object> m1 = sortMap1.get(fcsj1); | |
| 1063 | + Map<String, Object> m2 = sortMap1.get(fcsj2); | |
| 1064 | + if(m1.get("bcType").toString().equals("in") || m1.get("bcType").toString().equals("out")) | |
| 1065 | + continue; | |
| 1066 | + if(m2.get("bcType").toString().equals("in") || m2.get("bcType").toString().equals("out")){ | |
| 1067 | + fcsj2 = Long.valueOf(m1.get("zdsj").toString()); | |
| 1068 | + } else if(i == keyList.size() - 1){ | |
| 1069 | + fcsj2 = Long.valueOf(m2.get("zdsj").toString()); | |
| 1070 | + } | |
| 1071 | + if(sfqr == 1 && time1 > fcsj1){ | |
| 1072 | + sjyysj += fcsj2 - time1; | |
| 1073 | + }else if(sfqr == 1 && time2 < fcsj2){ | |
| 1074 | + sjyysj += time2 - fcsj1; | |
| 1075 | + }else{ | |
| 1076 | + sjyysj += fcsj2 - fcsj1; | |
| 1055 | 1077 | } |
| 1078 | + sjyysj1 += fcsj2 - fcsj1; | |
| 1056 | 1079 | } |
| 1057 | 1080 | |
| 1058 | - for(int i = 1; i < mapList.size(); i++){ | |
| 1059 | - Map<String, Object> m1 = mapList.get(i - 1); | |
| 1060 | - Map<String, Object> m2 = mapList.get(i); | |
| 1061 | -// if(m1.get("fcsj") != null && m2.get("fcsj") != null){ | |
| 1062 | -// long fcsj2 = Long.valueOf(m2.get("fcsj").toString()); | |
| 1063 | -// long fcsj1 = Long.valueOf(m1.get("fcsj").toString()); | |
| 1064 | -// if(sfqr == 1 && time1 > fcsj1){ | |
| 1065 | -// sjyysj += fcsj2 - time1; | |
| 1066 | -// }else if(sfqr == 1 && time2 < fcsj2){ | |
| 1067 | -// sjyysj += time2 - fcsj1; | |
| 1068 | -// }else{ | |
| 1069 | -// sjyysj += fcsj2 - fcsj1; | |
| 1070 | -// } | |
| 1071 | -// sjyysj1 += fcsj2 - fcsj1; | |
| 1072 | -// } | |
| 1073 | - if(m2.get("fcsj") != null && m2.get("zdsj") != null){ | |
| 1074 | - long zdsj = Long.valueOf(m2.get("zdsj").toString()); | |
| 1075 | - long fcsj = Long.valueOf(m2.get("fcsj").toString()); | |
| 1081 | + for(int i = 0; i < mapList.size(); i++){ | |
| 1082 | + Map<String, Object> m = mapList.get(i); | |
| 1083 | + if(m.get("fcsj") != null && m.get("zdsj") != null && | |
| 1084 | + !m.get("bcType").toString().equals("in") && !m.get("bcType").toString().equals("out")){ | |
| 1085 | + long zdsj = Long.valueOf(m.get("zdsj").toString()); | |
| 1086 | + long fcsj = Long.valueOf(m.get("fcsj").toString()); | |
| 1076 | 1087 | if(fcsj > zdsj) |
| 1077 | 1088 | zdsj += 1440l; |
| 1078 | 1089 | if(sfqr == 1 && time1 > fcsj){ |
| ... | ... | @@ -1083,22 +1094,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1083 | 1094 | sjyssj += zdsj - fcsj; |
| 1084 | 1095 | } |
| 1085 | 1096 | sjyssj1 += zdsj - fcsj; |
| 1086 | - sjlc += Double.valueOf(m2.get("lc").toString()); | |
| 1087 | - } | |
| 1088 | - if(i == 1 && m1.get("fcsj") != null && m1.get("zdsj") != null){ | |
| 1089 | - long zdsj = Long.valueOf(m1.get("zdsj").toString()); | |
| 1090 | - long fcsj = Long.valueOf(m1.get("fcsj").toString()); | |
| 1091 | - if(fcsj > zdsj) | |
| 1092 | - zdsj += 1440l; | |
| 1093 | - if(sfqr == 1 && time1 > fcsj){ | |
| 1094 | - sjyssj += zdsj - time1; | |
| 1095 | - }else if(sfqr == 1 && time2 < zdsj){ | |
| 1096 | - sjyssj += time2 - fcsj; | |
| 1097 | - }else{ | |
| 1098 | - sjyssj += zdsj - fcsj; | |
| 1099 | - } | |
| 1100 | - sjyssj1 += zdsj - fcsj; | |
| 1101 | - sjlc += Double.valueOf(m1.get("lc").toString()); | |
| 1097 | + sjlc += Double.valueOf(m.get("lc").toString()); | |
| 1102 | 1098 | } |
| 1103 | 1099 | } |
| 1104 | 1100 | tempMap.put("company", companyName); | ... | ... |
src/main/java/com/bsth/service/impl/LineServiceImpl.java
| ... | ... | @@ -44,4 +44,10 @@ public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements L |
| 44 | 44 | return repository.findByLineCode(lineCode); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | + @Override | |
| 48 | + public Line findById(Integer id) { | |
| 49 | + // TODO Auto-generated method stub | |
| 50 | + return repository.findOne(id); | |
| 51 | + } | |
| 52 | + | |
| 47 | 53 | } | ... | ... |
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| ... | ... | @@ -11,6 +11,7 @@ import com.bsth.repository.StationRepository; |
| 11 | 11 | import com.bsth.repository.StationRouteCacheRepository; |
| 12 | 12 | import com.bsth.repository.StationRouteRepository; |
| 13 | 13 | import com.bsth.service.StationRouteService; |
| 14 | +import com.bsth.util.ExcelUtil; | |
| 14 | 15 | import com.bsth.util.FTPClientUtils; |
| 15 | 16 | import com.bsth.util.PackTarGZUtils; |
| 16 | 17 | import com.bsth.util.Geo.GeoUtils; |
| ... | ... | @@ -29,6 +30,8 @@ import java.io.InputStream; |
| 29 | 30 | import java.text.DecimalFormat; |
| 30 | 31 | import java.util.*; |
| 31 | 32 | |
| 33 | +import javax.servlet.http.HttpServletResponse; | |
| 34 | + | |
| 32 | 35 | /** |
| 33 | 36 | * |
| 34 | 37 | * @ClassName: StationRouteServiceImpl(站点路由service业务层实现类) |
| ... | ... | @@ -71,6 +74,57 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 71 | 74 | return repository.findAll(new CustomerSpecs<StationRoute>(map), new Sort(orderList)); |
| 72 | 75 | } |
| 73 | 76 | |
| 77 | + @Override | |
| 78 | + public Map<String, Object> getSectionRouteExport(Integer id, HttpServletResponse resp) { | |
| 79 | + Map<String, Object> resultMap = new HashMap<String, Object>(); | |
| 80 | + try { | |
| 81 | + // List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>(); | |
| 82 | + Map<String,Object> resultExcel = new HashMap<String,Object>();//导出参数的对象 | |
| 83 | + /* 添加表头*/ | |
| 84 | + List<String> title = new ArrayList<String>(); | |
| 85 | + title.add("线路ID"); | |
| 86 | + title.add("方向"); | |
| 87 | + title.add("站点ID"); | |
| 88 | + title.add("站点顺序号"); | |
| 89 | + title.add("站点备注"); | |
| 90 | + title.add("站点名称"); | |
| 91 | + title.add("站点距离(km)"); | |
| 92 | + title.add("站点时长(min)"); | |
| 93 | + title.add("线路名称"); | |
| 94 | + resultExcel.put("title", title); | |
| 95 | + /* 添加表单*/ | |
| 96 | + Map<String,List<String>> temp = new HashMap<String,List<String>>(); | |
| 97 | + List<StationRoute> strtionList = repository.findStationExport(id); | |
| 98 | + if(strtionList == null){ | |
| 99 | + logger.info("没有数据导,出用户信息失败!"); | |
| 100 | + } else { | |
| 101 | + | |
| 102 | + for (int i = 0; i < strtionList.size(); i++) { | |
| 103 | + StationRoute station = strtionList.get(i); | |
| 104 | + | |
| 105 | + List<String> varList = new ArrayList<String>(); | |
| 106 | + varList.add(station.getLine().getId().toString()); | |
| 107 | + varList.add(station.getDirections().toString()); | |
| 108 | + varList.add(station.getStationCode()); | |
| 109 | + varList.add(station.getStationRouteCode().toString()); | |
| 110 | + varList.add(station.getStationMark()); | |
| 111 | + varList.add(station.getStationName()); | |
| 112 | + varList.add(station.getDistances().toString()); | |
| 113 | + varList.add(station.getToTime().toString()); | |
| 114 | + varList.add(station.getLine().getName()); | |
| 115 | + temp.put((i+1)+"", varList); | |
| 116 | + } | |
| 117 | + } | |
| 118 | + resultExcel.put("content", temp); | |
| 119 | + ExcelUtil excelUtil = new ExcelUtil(); | |
| 120 | + excelUtil.buildExcelDocument(resultExcel, strtionList.get(0).getLine().getName()+"线路站点",resp); | |
| 121 | + resultMap.put("status", ResponseCode.SUCCESS); | |
| 122 | + } catch (Exception e) { | |
| 123 | + resultMap.put("status", ResponseCode.ERROR); | |
| 124 | + logger.error("save erro.", e); | |
| 125 | + } | |
| 126 | + return resultMap; | |
| 127 | + } | |
| 74 | 128 | |
| 75 | 129 | /** |
| 76 | 130 | * @Description : TODO(根据路段路由Id批量撤销路段) | ... | ... |
src/main/java/com/bsth/service/impl/StationServiceImpl.java
| ... | ... | @@ -689,7 +689,7 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 689 | 689 | String bJwpoints[] = stationNameList.get(k)[0].toString().split(" "); |
| 690 | 690 | Point p2 = new Point(Double.parseDouble(bJwpoints[0]),Double.parseDouble(bJwpoints[1])); |
| 691 | 691 | double jl = GeoUtils.getDistance(p1, p2); |
| 692 | - if(jl<=20d) { | |
| 692 | + if(jl<=60d) { | |
| 693 | 693 | rsM.put("id", stationNameList.get(k)[1]); |
| 694 | 694 | temp = true; |
| 695 | 695 | break; | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -3012,10 +3012,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 3012 | 3012 | if (sch == null) |
| 3013 | 3013 | continue; |
| 3014 | 3014 | |
| 3015 | - if (cpc.getClZbh() != null && !carExist(sch.getGsBm(), cpc.getClZbh())) { | |
| 3016 | - rs.put("msg", "车辆 " + cpc.getClZbh() + " <a href=\"/#/busInfoManage\" target=_blank>车辆基础信息</a> 里找不到!"); | |
| 3017 | - rs.put("status", ResponseCode.ERROR); | |
| 3018 | - return rs; | |
| 3015 | + if (cpc.getClZbh() != null) { | |
| 3016 | + if(!carExist(sch.getGsBm(), cpc.getClZbh())) { | |
| 3017 | + rs.put("msg", "车辆 " + cpc.getClZbh() + " <a href=\"/#/busInfoManage\" target=_blank>车辆基础信息</a> 里找不到!"); | |
| 3018 | + rs.put("status", ResponseCode.ERROR); | |
| 3019 | + return rs; | |
| 3020 | + } | |
| 3021 | + else if(!sch.getGsBm().equals(BasicData.nbbm2CompanyCodeMap.get(cpc.getClZbh()))){ | |
| 3022 | + rs.put("msg", sch.getXlName() + "所属的公司编码下找不到自编号为【" + cpc.getClZbh() + "】的车辆"); | |
| 3023 | + rs.put("status", ResponseCode.ERROR); | |
| 3024 | + return rs; | |
| 3025 | + } | |
| 3019 | 3026 | } |
| 3020 | 3027 | |
| 3021 | 3028 | if (StringUtils.isNotEmpty(cpc.getJsy())) { |
| ... | ... | @@ -4440,9 +4447,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4440 | 4447 | try { |
| 4441 | 4448 | List<String> leftList = Splitter.on(",").splitToList(leftIdx); |
| 4442 | 4449 | List<String> rightList = Splitter.on(",").splitToList(rightIdx); |
| 4443 | - | |
| 4444 | - //有班次变更的车辆 | |
| 4445 | - Set<String> cars = new HashSet<>(); | |
| 4450 | + Set<String> lpSet = new HashSet<>(); | |
| 4446 | 4451 | |
| 4447 | 4452 | List<ScheduleRealInfo> largeList, smallList; |
| 4448 | 4453 | if (leftList.size() > rightList.size()) { |
| ... | ... | @@ -4463,7 +4468,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4463 | 4468 | //不对称时多出来的 |
| 4464 | 4469 | lpChangeByLeft(leftSch, largeList.get(i - 1), type); |
| 4465 | 4470 | ts.add(leftSch); |
| 4466 | - cars.add(leftSch.getClZbh()); | |
| 4471 | + lpSet.add(leftSch.getXlBm() + "_" + leftSch.getLpName()); | |
| 4467 | 4472 | continue; |
| 4468 | 4473 | } |
| 4469 | 4474 | |
| ... | ... | @@ -4471,13 +4476,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4471 | 4476 | lpChange(leftSch, rightSch, type); |
| 4472 | 4477 | ts.add(leftSch); |
| 4473 | 4478 | |
| 4474 | - cars.add(leftSch.getClZbh()); | |
| 4475 | - cars.add(rightSch.getClZbh()); | |
| 4479 | + lpSet.add(leftSch.getXlBm() + "_" + leftSch.getLpName()); | |
| 4480 | + lpSet.add(rightSch.getXlBm() + "_" + rightSch.getLpName()); | |
| 4476 | 4481 | } |
| 4477 | 4482 | |
| 4478 | - //重新计算起点应到时间 | |
| 4479 | - for(String nbbm : cars){ | |
| 4480 | - ts.addAll(dayOfSchedule.updateQdzTimePlan(nbbm)); | |
| 4483 | + //重新计算路牌的起点应到时间 | |
| 4484 | + for(String lpName : lpSet){ | |
| 4485 | + ts.addAll(dayOfSchedule.updateQdzTimePlan(lpName)); | |
| 4481 | 4486 | } |
| 4482 | 4487 | |
| 4483 | 4488 | for (ScheduleRealInfo sch : ts) { |
| ... | ... | @@ -4505,6 +4510,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4505 | 4510 | |
| 4506 | 4511 | @Override |
| 4507 | 4512 | public void lpChange(ScheduleRealInfo leftSch, ScheduleRealInfo rightSch, int type) { |
| 4513 | + //释放班次映射 | |
| 4514 | + if(type > 0) { | |
| 4515 | + dayOfSchedule.removeNbbm2SchMapp(leftSch); | |
| 4516 | + dayOfSchedule.removeNbbm2SchMapp(rightSch); | |
| 4517 | + } | |
| 4518 | + | |
| 4519 | + //对调数据 | |
| 4508 | 4520 | LpData leftData = new LpData(leftSch); |
| 4509 | 4521 | LpData rightData = new LpData(rightSch); |
| 4510 | 4522 | |
| ... | ... | @@ -4512,12 +4524,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4512 | 4524 | rightData.appendTo(leftSch, type); |
| 4513 | 4525 | |
| 4514 | 4526 | if(type > 0){ |
| 4515 | - //更新车辆和班次映射信息 | |
| 4516 | - dayOfSchedule.removeNbbm2SchMapp(leftSch, leftData.getNbbm()); | |
| 4517 | - dayOfSchedule.removeNbbm2SchMapp(rightSch, rightData.getNbbm()); | |
| 4518 | - | |
| 4519 | - dayOfSchedule.addNbbm2SchMapp(leftSch, rightData.getNbbm()); | |
| 4520 | - dayOfSchedule.addNbbm2SchMapp(rightSch, leftData.getNbbm()); | |
| 4527 | + //重新映射 | |
| 4528 | + dayOfSchedule.addNbbm2SchMapp(leftSch); | |
| 4529 | + dayOfSchedule.addNbbm2SchMapp(rightSch); | |
| 4521 | 4530 | } |
| 4522 | 4531 | } |
| 4523 | 4532 | |
| ... | ... | @@ -4528,14 +4537,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4528 | 4537 | * @param type |
| 4529 | 4538 | */ |
| 4530 | 4539 | public void lpChangeByLeft(ScheduleRealInfo leftSch, ScheduleRealInfo rightSch, int type) { |
| 4531 | - LpData rightData = new LpData(rightSch); | |
| 4540 | + //释放班次映射 | |
| 4541 | + if(type > 0) | |
| 4542 | + dayOfSchedule.removeNbbm2SchMapp(leftSch); | |
| 4532 | 4543 | |
| 4544 | + LpData rightData = new LpData(rightSch); | |
| 4533 | 4545 | rightData.appendTo(leftSch, type); |
| 4534 | 4546 | |
| 4535 | - if(type > 0){ | |
| 4536 | - //更新车辆和班次映射信息 | |
| 4537 | - dayOfSchedule.addNbbm2SchMapp(leftSch, rightData.getNbbm()); | |
| 4538 | - } | |
| 4547 | + //重新映射 | |
| 4548 | + if(type > 0) | |
| 4549 | + dayOfSchedule.addNbbm2SchMapp(leftSch); | |
| 4550 | + | |
| 4539 | 4551 | } |
| 4540 | 4552 | |
| 4541 | 4553 | @Override | ... | ... |
src/main/java/com/bsth/service/schedule/datatools/CarsDataToolsImpl.java
| ... | ... | @@ -121,6 +121,8 @@ public class CarsDataToolsImpl implements DataToolsService { |
| 121 | 121 | ktrParms.put("transpath", ktrFile.getAbsolutePath()); |
| 122 | 122 | ktrParms.put("filename", "车辆基础信息_download-"); |
| 123 | 123 | |
| 124 | + ktrParms.putAll(params); | |
| 125 | + | |
| 124 | 126 | DataToolsFile file = dataToolsService.exportData(ktrParms); |
| 125 | 127 | |
| 126 | 128 | LOGGER.info("//---------------- 导出车辆基础信息 success... ----------------//"); | ... | ... |
src/main/java/com/bsth/service/schedule/datatools/EmployeeDataToolsImpl.java
| ... | ... | @@ -121,6 +121,8 @@ public class EmployeeDataToolsImpl implements DataToolsService { |
| 121 | 121 | ktrParms.put("transpath", ktrFile.getAbsolutePath()); |
| 122 | 122 | ktrParms.put("filename", "人员基础信息_download-"); |
| 123 | 123 | |
| 124 | + ktrParms.putAll(params); | |
| 125 | + | |
| 124 | 126 | DataToolsFile file = dataToolsService.exportData(ktrParms); |
| 125 | 127 | |
| 126 | 128 | LOGGER.info("//---------------- 导出人员基础信息 success... ----------------//"); | ... | ... |
src/main/java/com/bsth/util/ExcelUtil.java
0 → 100644
| 1 | +package com.bsth.util; | |
| 2 | + | |
| 3 | +import java.io.OutputStream; | |
| 4 | +import java.net.URLEncoder; | |
| 5 | +import java.util.List; | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 8 | +import javax.servlet.http.HttpServletResponse; | |
| 9 | + | |
| 10 | +import org.apache.poi.hssf.usermodel.HSSFCellStyle; | |
| 11 | +import org.apache.poi.hssf.usermodel.HSSFFont; | |
| 12 | +import org.apache.poi.hssf.usermodel.HSSFRow; | |
| 13 | +import org.apache.poi.hssf.usermodel.HSSFSheet; | |
| 14 | +import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
| 15 | +import org.apache.poi.hssf.util.HSSFColor; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * @ClassName: ExcelUtil.java | |
| 19 | + * @Description: TODO() | |
| 20 | + * @author: YouRuiFeng | |
| 21 | + * @date: 2017-8-13 下午3:00:44 | |
| 22 | + * | |
| 23 | + */ | |
| 24 | + | |
| 25 | +@SuppressWarnings("deprecation") | |
| 26 | +public class ExcelUtil { | |
| 27 | + | |
| 28 | + | |
| 29 | + public void buildExcelDocument(Map<String, Object> map, String exportName, HttpServletResponse response) throws Exception { | |
| 30 | + // 声明一个工作薄 | |
| 31 | + HSSFWorkbook workbook = new HSSFWorkbook(); | |
| 32 | + /* // 生成一个表格 | |
| 33 | + HSSFSheet sheet = workbook.createSheet(title); | |
| 34 | + // 设置表格默认列宽度为15个字节 | |
| 35 | + sheet.setDefaultColumnWidth((short) 15);*/ | |
| 36 | + // 生成一个样式 | |
| 37 | + HSSFCellStyle style = workbook.createCellStyle(); | |
| 38 | + // 设置这些样式 | |
| 39 | + style.setFillForegroundColor(HSSFColor.SKY_BLUE.index); | |
| 40 | + style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); | |
| 41 | + style.setBorderBottom(HSSFCellStyle.BORDER_THIN); | |
| 42 | + style.setBorderLeft(HSSFCellStyle.BORDER_THIN); | |
| 43 | + style.setBorderRight(HSSFCellStyle.BORDER_THIN); | |
| 44 | + style.setBorderTop(HSSFCellStyle.BORDER_THIN); | |
| 45 | + style.setAlignment(HSSFCellStyle.ALIGN_CENTER); | |
| 46 | + // 生成一个字体 | |
| 47 | + HSSFFont font = workbook.createFont(); | |
| 48 | + font.setColor(HSSFColor.VIOLET.index); | |
| 49 | + font.setFontHeightInPoints((short) 12); | |
| 50 | + font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); | |
| 51 | + // 把字体应用到当前的样式 | |
| 52 | + style.setFont(font); | |
| 53 | + HSSFCellStyle cellStyle =workbook.createCellStyle(); | |
| 54 | + cellStyle.setFont(font); | |
| 55 | + cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER); //水平布局:居中 | |
| 56 | + cellStyle.setWrapText(true); | |
| 57 | + | |
| 58 | + //获取sheet名称 | |
| 59 | + String sheetName = (null==map.get("sheetName"))?"Sheet":map.get("sheetName").toString(); | |
| 60 | + List<String> titleList = (List<String>) map.get("title"); | |
| 61 | + Map<String,List<String>> content = (Map<String,List<String>>)map.get("content"); | |
| 62 | + //设置wordsheet名 | |
| 63 | + HSSFSheet sheet = workbook.createSheet(sheetName); | |
| 64 | + //创建第一行 | |
| 65 | + HSSFRow row = sheet.createRow(0); | |
| 66 | + //设置 ABCD列名 | |
| 67 | + sheet.autoSizeColumn((short)0); | |
| 68 | + for(int i=0;i<titleList.size();i++){ | |
| 69 | + row.createCell(i).setCellValue(titleList.get(i)); | |
| 70 | + row.setRowStyle(cellStyle); | |
| 71 | + } | |
| 72 | + for(int i=1;i<=content.size();i++){ | |
| 73 | + sheet.autoSizeColumn((short)i); //调整第一列宽度 | |
| 74 | + HSSFRow row_ = sheet.createRow(i); | |
| 75 | + List<String> temp = content.get(i+""); | |
| 76 | + for(int j=0;j<temp.size();j++){ | |
| 77 | + row_.createCell(j).setCellValue(temp.get(j)); | |
| 78 | + row_.setRowStyle(cellStyle); | |
| 79 | + } | |
| 80 | + } | |
| 81 | + String filename =exportName+ ".xls"; | |
| 82 | + response.reset();//设置为没有缓存 | |
| 83 | + response.setContentType("application/vnd.ms-excel;charset=utf-8"); | |
| 84 | + response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); | |
| 85 | + OutputStream ouputStream = response.getOutputStream(); | |
| 86 | + workbook.write(ouputStream); | |
| 87 | + ouputStream.flush(); | |
| 88 | + ouputStream.close(); | |
| 89 | + | |
| 90 | + } | |
| 91 | +} | ... | ... |
src/main/resources/datatools/ktrs/carsDataInput.ktr
| ... | ... | @@ -271,9 +271,16 @@ |
| 271 | 271 | </attributes> |
| 272 | 272 | </connection> |
| 273 | 273 | <order> |
| 274 | - <hop> <from>获取变量</from><to>原始系统导出的Excel输入</to><enabled>Y</enabled> </hop> | |
| 275 | 274 | <hop> <from>插入/更新bsth_c_cars 2</from><to>错误输出 2</to><enabled>Y</enabled> </hop> |
| 276 | - <hop> <from>原始系统导出的Excel输入</from><to>插入/更新bsth_c_cars 2</to><enabled>Y</enabled> </hop> | |
| 275 | + <hop> <from>获取变量</from><to>原始系统导出的Excel输入</to><enabled>Y</enabled> </hop> | |
| 276 | + <hop> <from>原始系统导出的Excel输入</from><to>内部编码不为空</to><enabled>Y</enabled> </hop> | |
| 277 | + <hop> <from>内部编码不为空</from><to>添加查询常量</to><enabled>Y</enabled> </hop> | |
| 278 | + <hop> <from>添加查询常量</from><to>公司查询</to><enabled>Y</enabled> </hop> | |
| 279 | + <hop> <from>公司查询</from><to>公司代码不为空</to><enabled>Y</enabled> </hop> | |
| 280 | + <hop> <from>公司代码不为空</from><to>分公司查询</to><enabled>Y</enabled> </hop> | |
| 281 | + <hop> <from>分公司查询</from><to>分公司代码不为空</to><enabled>Y</enabled> </hop> | |
| 282 | + <hop> <from>分公司代码不为空</from><to>车辆编码</to><enabled>Y</enabled> </hop> | |
| 283 | + <hop> <from>车辆编码</from><to>插入/更新bsth_c_cars 2</to><enabled>Y</enabled> </hop> | |
| 277 | 284 | </order> |
| 278 | 285 | <step> |
| 279 | 286 | <name>原始系统导出的Excel输入</name> |
| ... | ... | @@ -322,18 +329,6 @@ |
| 322 | 329 | <group/> |
| 323 | 330 | </field> |
| 324 | 331 | <field> |
| 325 | - <name>车辆编码</name> | |
| 326 | - <type>String</type> | |
| 327 | - <length>-1</length> | |
| 328 | - <precision>-1</precision> | |
| 329 | - <trim_type>none</trim_type> | |
| 330 | - <repeat>N</repeat> | |
| 331 | - <format/> | |
| 332 | - <currency/> | |
| 333 | - <decimal/> | |
| 334 | - <group/> | |
| 335 | - </field> | |
| 336 | - <field> | |
| 337 | 332 | <name>内部编码</name> |
| 338 | 333 | <type>String</type> |
| 339 | 334 | <length>-1</length> |
| ... | ... | @@ -358,18 +353,6 @@ |
| 358 | 353 | <group/> |
| 359 | 354 | </field> |
| 360 | 355 | <field> |
| 361 | - <name>所属公司代码</name> | |
| 362 | - <type>String</type> | |
| 363 | - <length>-1</length> | |
| 364 | - <precision>-1</precision> | |
| 365 | - <trim_type>none</trim_type> | |
| 366 | - <repeat>N</repeat> | |
| 367 | - <format/> | |
| 368 | - <currency/> | |
| 369 | - <decimal/> | |
| 370 | - <group/> | |
| 371 | - </field> | |
| 372 | - <field> | |
| 373 | 356 | <name>所属分公司</name> |
| 374 | 357 | <type>String</type> |
| 375 | 358 | <length>-1</length> |
| ... | ... | @@ -382,18 +365,6 @@ |
| 382 | 365 | <group/> |
| 383 | 366 | </field> |
| 384 | 367 | <field> |
| 385 | - <name>所属分公司代码</name> | |
| 386 | - <type>String</type> | |
| 387 | - <length>-1</length> | |
| 388 | - <precision>-1</precision> | |
| 389 | - <trim_type>none</trim_type> | |
| 390 | - <repeat>N</repeat> | |
| 391 | - <format/> | |
| 392 | - <currency/> | |
| 393 | - <decimal/> | |
| 394 | - <group/> | |
| 395 | - </field> | |
| 396 | - <field> | |
| 397 | 368 | <name>设备供应厂商</name> |
| 398 | 369 | <type>String</type> |
| 399 | 370 | <length>-1</length> |
| ... | ... | @@ -445,8 +416,8 @@ |
| 445 | 416 | <spreadsheet_type>JXL</spreadsheet_type> |
| 446 | 417 | <cluster_schema/> |
| 447 | 418 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 448 | - <xloc>131</xloc> | |
| 449 | - <yloc>58</yloc> | |
| 419 | + <xloc>218</xloc> | |
| 420 | + <yloc>59</yloc> | |
| 450 | 421 | <draw>Y</draw> |
| 451 | 422 | </GUI> |
| 452 | 423 | </step> |
| ... | ... | @@ -463,7 +434,7 @@ |
| 463 | 434 | <schema_name/> |
| 464 | 435 | </partitioning> |
| 465 | 436 | <connection>bus_control_variable</connection> |
| 466 | - <commit>1000</commit> | |
| 437 | + <commit>500</commit> | |
| 467 | 438 | <update_bypassed>N</update_bypassed> |
| 468 | 439 | <lookup> |
| 469 | 440 | <schema/> |
| ... | ... | @@ -481,7 +452,7 @@ |
| 481 | 452 | </value> |
| 482 | 453 | <value> |
| 483 | 454 | <name>car_code</name> |
| 484 | - <rename>车辆编码</rename> | |
| 455 | + <rename>cl_code</rename> | |
| 485 | 456 | <update>Y</update> |
| 486 | 457 | </value> |
| 487 | 458 | <value> |
| ... | ... | @@ -496,7 +467,7 @@ |
| 496 | 467 | </value> |
| 497 | 468 | <value> |
| 498 | 469 | <name>business_code</name> |
| 499 | - <rename>所属公司代码</rename> | |
| 470 | + <rename>gs_code</rename> | |
| 500 | 471 | <update>Y</update> |
| 501 | 472 | </value> |
| 502 | 473 | <value> |
| ... | ... | @@ -506,7 +477,7 @@ |
| 506 | 477 | </value> |
| 507 | 478 | <value> |
| 508 | 479 | <name>branche_company_code</name> |
| 509 | - <rename>所属分公司代码</rename> | |
| 480 | + <rename>fgs_code</rename> | |
| 510 | 481 | <update>Y</update> |
| 511 | 482 | </value> |
| 512 | 483 | <value> |
| ... | ... | @@ -522,8 +493,8 @@ |
| 522 | 493 | </lookup> |
| 523 | 494 | <cluster_schema/> |
| 524 | 495 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 525 | - <xloc>516</xloc> | |
| 526 | - <yloc>138</yloc> | |
| 496 | + <xloc>690</xloc> | |
| 497 | + <yloc>393</yloc> | |
| 527 | 498 | <draw>Y</draw> |
| 528 | 499 | </GUI> |
| 529 | 500 | </step> |
| ... | ... | @@ -567,8 +538,8 @@ |
| 567 | 538 | </fields> |
| 568 | 539 | <cluster_schema/> |
| 569 | 540 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 570 | - <xloc>134</xloc> | |
| 571 | - <yloc>183</yloc> | |
| 541 | + <xloc>70</xloc> | |
| 542 | + <yloc>59</yloc> | |
| 572 | 543 | <draw>Y</draw> |
| 573 | 544 | </GUI> |
| 574 | 545 | </step> |
| ... | ... | @@ -630,21 +601,11 @@ |
| 630 | 601 | <format/> |
| 631 | 602 | </field> |
| 632 | 603 | <field> |
| 633 | - <name>所属公司代码</name> | |
| 634 | - <type>String</type> | |
| 635 | - <format/> | |
| 636 | - </field> | |
| 637 | - <field> | |
| 638 | 604 | <name>所属分公司</name> |
| 639 | 605 | <type>String</type> |
| 640 | 606 | <format/> |
| 641 | 607 | </field> |
| 642 | 608 | <field> |
| 643 | - <name>所属分公司代码</name> | |
| 644 | - <type>String</type> | |
| 645 | - <format/> | |
| 646 | - </field> | |
| 647 | - <field> | |
| 648 | 609 | <name>设备供应厂商</name> |
| 649 | 610 | <type>String</type> |
| 650 | 611 | <format/> |
| ... | ... | @@ -694,8 +655,266 @@ |
| 694 | 655 | </custom> |
| 695 | 656 | <cluster_schema/> |
| 696 | 657 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 697 | - <xloc>328</xloc> | |
| 698 | - <yloc>140</yloc> | |
| 658 | + <xloc>502</xloc> | |
| 659 | + <yloc>395</yloc> | |
| 660 | + <draw>Y</draw> | |
| 661 | + </GUI> | |
| 662 | + </step> | |
| 663 | + | |
| 664 | + <step> | |
| 665 | + <name>内部编码不为空</name> | |
| 666 | + <type>FilterRows</type> | |
| 667 | + <description/> | |
| 668 | + <distribute>Y</distribute> | |
| 669 | + <custom_distribution/> | |
| 670 | + <copies>1</copies> | |
| 671 | + <partitioning> | |
| 672 | + <method>none</method> | |
| 673 | + <schema_name/> | |
| 674 | + </partitioning> | |
| 675 | +<send_true_to/> | |
| 676 | +<send_false_to/> | |
| 677 | + <compare> | |
| 678 | +<condition> | |
| 679 | + <negated>N</negated> | |
| 680 | + <conditions> | |
| 681 | + <condition> | |
| 682 | + <negated>N</negated> | |
| 683 | + <leftvalue>内部编码</leftvalue> | |
| 684 | + <function>IS NOT NULL</function> | |
| 685 | + <rightvalue/> | |
| 686 | + </condition> | |
| 687 | + </conditions> | |
| 688 | + </condition> | |
| 689 | + </compare> | |
| 690 | + <cluster_schema/> | |
| 691 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 692 | + <xloc>218</xloc> | |
| 693 | + <yloc>164</yloc> | |
| 694 | + <draw>Y</draw> | |
| 695 | + </GUI> | |
| 696 | + </step> | |
| 697 | + | |
| 698 | + <step> | |
| 699 | + <name>添加查询常量</name> | |
| 700 | + <type>ScriptValueMod</type> | |
| 701 | + <description/> | |
| 702 | + <distribute>Y</distribute> | |
| 703 | + <custom_distribution/> | |
| 704 | + <copies>1</copies> | |
| 705 | + <partitioning> | |
| 706 | + <method>none</method> | |
| 707 | + <schema_name/> | |
| 708 | + </partitioning> | |
| 709 | + <compatible>N</compatible> | |
| 710 | + <optimizationLevel>9</optimizationLevel> | |
| 711 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 712 | + <jsScript_name>Script 1</jsScript_name> | |
| 713 | + <jsScript_script>//Script here

var up_code = '88';</jsScript_script> | |
| 714 | + </jsScript> </jsScripts> <fields> <field> <name>up_code</name> | |
| 715 | + <rename>up_code</rename> | |
| 716 | + <type>String</type> | |
| 717 | + <length>-1</length> | |
| 718 | + <precision>-1</precision> | |
| 719 | + <replace>N</replace> | |
| 720 | + </field> </fields> <cluster_schema/> | |
| 721 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 722 | + <xloc>389</xloc> | |
| 723 | + <yloc>61</yloc> | |
| 724 | + <draw>Y</draw> | |
| 725 | + </GUI> | |
| 726 | + </step> | |
| 727 | + | |
| 728 | + <step> | |
| 729 | + <name>公司查询</name> | |
| 730 | + <type>DBLookup</type> | |
| 731 | + <description/> | |
| 732 | + <distribute>Y</distribute> | |
| 733 | + <custom_distribution/> | |
| 734 | + <copies>1</copies> | |
| 735 | + <partitioning> | |
| 736 | + <method>none</method> | |
| 737 | + <schema_name/> | |
| 738 | + </partitioning> | |
| 739 | + <connection>bus_control_variable</connection> | |
| 740 | + <cache>N</cache> | |
| 741 | + <cache_load_all>N</cache_load_all> | |
| 742 | + <cache_size>0</cache_size> | |
| 743 | + <lookup> | |
| 744 | + <schema/> | |
| 745 | + <table>bsth_c_business</table> | |
| 746 | + <orderby/> | |
| 747 | + <fail_on_multiple>N</fail_on_multiple> | |
| 748 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 749 | + <key> | |
| 750 | + <name>up_code</name> | |
| 751 | + <field>up_code</field> | |
| 752 | + <condition>=</condition> | |
| 753 | + <name2/> | |
| 754 | + </key> | |
| 755 | + <key> | |
| 756 | + <name>所属公司</name> | |
| 757 | + <field>business_name</field> | |
| 758 | + <condition>=</condition> | |
| 759 | + <name2/> | |
| 760 | + </key> | |
| 761 | + <value> | |
| 762 | + <name>business_code</name> | |
| 763 | + <rename>gs_code</rename> | |
| 764 | + <default/> | |
| 765 | + <type>String</type> | |
| 766 | + </value> | |
| 767 | + </lookup> | |
| 768 | + <cluster_schema/> | |
| 769 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 770 | + <xloc>540</xloc> | |
| 771 | + <yloc>59</yloc> | |
| 772 | + <draw>Y</draw> | |
| 773 | + </GUI> | |
| 774 | + </step> | |
| 775 | + | |
| 776 | + <step> | |
| 777 | + <name>公司代码不为空</name> | |
| 778 | + <type>FilterRows</type> | |
| 779 | + <description/> | |
| 780 | + <distribute>Y</distribute> | |
| 781 | + <custom_distribution/> | |
| 782 | + <copies>1</copies> | |
| 783 | + <partitioning> | |
| 784 | + <method>none</method> | |
| 785 | + <schema_name/> | |
| 786 | + </partitioning> | |
| 787 | +<send_true_to/> | |
| 788 | +<send_false_to/> | |
| 789 | + <compare> | |
| 790 | +<condition> | |
| 791 | + <negated>N</negated> | |
| 792 | + <conditions> | |
| 793 | + <condition> | |
| 794 | + <negated>N</negated> | |
| 795 | + <leftvalue>gs_code</leftvalue> | |
| 796 | + <function>IS NOT NULL</function> | |
| 797 | + <rightvalue/> | |
| 798 | + </condition> | |
| 799 | + </conditions> | |
| 800 | + </condition> | |
| 801 | + </compare> | |
| 802 | + <cluster_schema/> | |
| 803 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 804 | + <xloc>542</xloc> | |
| 805 | + <yloc>164</yloc> | |
| 806 | + <draw>Y</draw> | |
| 807 | + </GUI> | |
| 808 | + </step> | |
| 809 | + | |
| 810 | + <step> | |
| 811 | + <name>分公司查询</name> | |
| 812 | + <type>DBLookup</type> | |
| 813 | + <description/> | |
| 814 | + <distribute>Y</distribute> | |
| 815 | + <custom_distribution/> | |
| 816 | + <copies>1</copies> | |
| 817 | + <partitioning> | |
| 818 | + <method>none</method> | |
| 819 | + <schema_name/> | |
| 820 | + </partitioning> | |
| 821 | + <connection>bus_control_variable</connection> | |
| 822 | + <cache>N</cache> | |
| 823 | + <cache_load_all>N</cache_load_all> | |
| 824 | + <cache_size>0</cache_size> | |
| 825 | + <lookup> | |
| 826 | + <schema/> | |
| 827 | + <table>bsth_c_business</table> | |
| 828 | + <orderby/> | |
| 829 | + <fail_on_multiple>N</fail_on_multiple> | |
| 830 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 831 | + <key> | |
| 832 | + <name>gs_code</name> | |
| 833 | + <field>up_code</field> | |
| 834 | + <condition>=</condition> | |
| 835 | + <name2/> | |
| 836 | + </key> | |
| 837 | + <key> | |
| 838 | + <name>所属分公司</name> | |
| 839 | + <field>business_name</field> | |
| 840 | + <condition>=</condition> | |
| 841 | + <name2/> | |
| 842 | + </key> | |
| 843 | + <value> | |
| 844 | + <name>business_code</name> | |
| 845 | + <rename>fgs_code</rename> | |
| 846 | + <default/> | |
| 847 | + <type>String</type> | |
| 848 | + </value> | |
| 849 | + </lookup> | |
| 850 | + <cluster_schema/> | |
| 851 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 852 | + <xloc>683</xloc> | |
| 853 | + <yloc>59</yloc> | |
| 854 | + <draw>Y</draw> | |
| 855 | + </GUI> | |
| 856 | + </step> | |
| 857 | + | |
| 858 | + <step> | |
| 859 | + <name>分公司代码不为空</name> | |
| 860 | + <type>FilterRows</type> | |
| 861 | + <description/> | |
| 862 | + <distribute>Y</distribute> | |
| 863 | + <custom_distribution/> | |
| 864 | + <copies>1</copies> | |
| 865 | + <partitioning> | |
| 866 | + <method>none</method> | |
| 867 | + <schema_name/> | |
| 868 | + </partitioning> | |
| 869 | +<send_true_to/> | |
| 870 | +<send_false_to/> | |
| 871 | + <compare> | |
| 872 | +<condition> | |
| 873 | + <negated>N</negated> | |
| 874 | + <conditions> | |
| 875 | + <condition> | |
| 876 | + <negated>N</negated> | |
| 877 | + <leftvalue>fgs_code</leftvalue> | |
| 878 | + <function>IS NOT NULL</function> | |
| 879 | + <rightvalue/> | |
| 880 | + </condition> | |
| 881 | + </conditions> | |
| 882 | + </condition> | |
| 883 | + </compare> | |
| 884 | + <cluster_schema/> | |
| 885 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 886 | + <xloc>685</xloc> | |
| 887 | + <yloc>162</yloc> | |
| 888 | + <draw>Y</draw> | |
| 889 | + </GUI> | |
| 890 | + </step> | |
| 891 | + | |
| 892 | + <step> | |
| 893 | + <name>车辆编码</name> | |
| 894 | + <type>ScriptValueMod</type> | |
| 895 | + <description/> | |
| 896 | + <distribute>Y</distribute> | |
| 897 | + <custom_distribution/> | |
| 898 | + <copies>1</copies> | |
| 899 | + <partitioning> | |
| 900 | + <method>none</method> | |
| 901 | + <schema_name/> | |
| 902 | + </partitioning> | |
| 903 | + <compatible>N</compatible> | |
| 904 | + <optimizationLevel>9</optimizationLevel> | |
| 905 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 906 | + <jsScript_name>Script 1</jsScript_name> | |
| 907 | + <jsScript_script>//Script here

var cl_code = gs_code + "0" + 内部编码;</jsScript_script> | |
| 908 | + </jsScript> </jsScripts> <fields> <field> <name>cl_code</name> | |
| 909 | + <rename>cl_code</rename> | |
| 910 | + <type>String</type> | |
| 911 | + <length>-1</length> | |
| 912 | + <precision>-1</precision> | |
| 913 | + <replace>N</replace> | |
| 914 | + </field> </fields> <cluster_schema/> | |
| 915 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 916 | + <xloc>688</xloc> | |
| 917 | + <yloc>273</yloc> | |
| 699 | 918 | <draw>Y</draw> |
| 700 | 919 | </GUI> |
| 701 | 920 | </step> | ... | ... |
src/main/resources/datatools/ktrs/carsDataOutput.ktr
| ... | ... | @@ -10,6 +10,11 @@ |
| 10 | 10 | <directory>/</directory> |
| 11 | 11 | <parameters> |
| 12 | 12 | <parameter> |
| 13 | + <name>cgsbm_in</name> | |
| 14 | + <default_value/> | |
| 15 | + <description>分公司编码</description> | |
| 16 | + </parameter> | |
| 17 | + <parameter> | |
| 13 | 18 | <name>filepath</name> |
| 14 | 19 | <default_value/> |
| 15 | 20 | <description>excel文件路径</description> |
| ... | ... | @@ -266,8 +271,11 @@ |
| 266 | 271 | </attributes> |
| 267 | 272 | </connection> |
| 268 | 273 | <order> |
| 269 | - <hop> <from>表输入</from><to>字段选择</to><enabled>Y</enabled> </hop> | |
| 270 | 274 | <hop> <from>字段选择</from><to>Excel输出</to><enabled>Y</enabled> </hop> |
| 275 | + <hop> <from>车辆信息表输入</from><to>添加查询常量</to><enabled>Y</enabled> </hop> | |
| 276 | + <hop> <from>添加查询常量</from><to>公司查询</to><enabled>Y</enabled> </hop> | |
| 277 | + <hop> <from>公司查询</from><to>分公司查询</to><enabled>Y</enabled> </hop> | |
| 278 | + <hop> <from>分公司查询</from><to>字段选择</to><enabled>Y</enabled> </hop> | |
| 271 | 279 | </order> |
| 272 | 280 | <step> |
| 273 | 281 | <name>Excel输出</name> |
| ... | ... | @@ -316,11 +324,6 @@ |
| 316 | 324 | <format/> |
| 317 | 325 | </field> |
| 318 | 326 | <field> |
| 319 | - <name>车辆编码</name> | |
| 320 | - <type>String</type> | |
| 321 | - <format/> | |
| 322 | - </field> | |
| 323 | - <field> | |
| 324 | 327 | <name>内部编码</name> |
| 325 | 328 | <type>String</type> |
| 326 | 329 | <format/> |
| ... | ... | @@ -331,21 +334,11 @@ |
| 331 | 334 | <format/> |
| 332 | 335 | </field> |
| 333 | 336 | <field> |
| 334 | - <name>所属公司代码</name> | |
| 335 | - <type>String</type> | |
| 336 | - <format/> | |
| 337 | - </field> | |
| 338 | - <field> | |
| 339 | 337 | <name>所属分公司</name> |
| 340 | 338 | <type>String</type> |
| 341 | 339 | <format/> |
| 342 | 340 | </field> |
| 343 | 341 | <field> |
| 344 | - <name>所属分公司代码</name> | |
| 345 | - <type>String</type> | |
| 346 | - <format/> | |
| 347 | - </field> | |
| 348 | - <field> | |
| 349 | 342 | <name>设备供应厂商</name> |
| 350 | 343 | <type>String</type> |
| 351 | 344 | <format/> |
| ... | ... | @@ -375,8 +368,8 @@ |
| 375 | 368 | </custom> |
| 376 | 369 | <cluster_schema/> |
| 377 | 370 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 378 | - <xloc>282</xloc> | |
| 379 | - <yloc>169</yloc> | |
| 371 | + <xloc>514</xloc> | |
| 372 | + <yloc>293</yloc> | |
| 380 | 373 | <draw>Y</draw> |
| 381 | 374 | </GUI> |
| 382 | 375 | </step> |
| ... | ... | @@ -396,30 +389,18 @@ |
| 396 | 389 | <rename>车牌号</rename> |
| 397 | 390 | <length>-2</length> |
| 398 | 391 | <precision>-2</precision> |
| 399 | - </field> <field> <name>car_code</name> | |
| 400 | - <rename>车辆编码</rename> | |
| 401 | - <length>-2</length> | |
| 402 | - <precision>-2</precision> | |
| 403 | 392 | </field> <field> <name>inside_code</name> |
| 404 | 393 | <rename>内部编码</rename> |
| 405 | 394 | <length>-2</length> |
| 406 | 395 | <precision>-2</precision> |
| 407 | - </field> <field> <name>company</name> | |
| 396 | + </field> <field> <name>gs</name> | |
| 408 | 397 | <rename>所属公司</rename> |
| 409 | 398 | <length>-2</length> |
| 410 | 399 | <precision>-2</precision> |
| 411 | - </field> <field> <name>business_code</name> | |
| 412 | - <rename>所属公司代码</rename> | |
| 413 | - <length>-2</length> | |
| 414 | - <precision>-2</precision> | |
| 415 | - </field> <field> <name>branche_company</name> | |
| 400 | + </field> <field> <name>fgs</name> | |
| 416 | 401 | <rename>所属分公司</rename> |
| 417 | 402 | <length>-2</length> |
| 418 | 403 | <precision>-2</precision> |
| 419 | - </field> <field> <name>branche_company_code</name> | |
| 420 | - <rename>所属分公司代码</rename> | |
| 421 | - <length>-2</length> | |
| 422 | - <precision>-2</precision> | |
| 423 | 404 | </field> <field> <name>supplier_name</name> |
| 424 | 405 | <rename>设备供应厂商</rename> |
| 425 | 406 | <length>-2</length> |
| ... | ... | @@ -431,14 +412,14 @@ |
| 431 | 412 | </field> <select_unspecified>N</select_unspecified> |
| 432 | 413 | </fields> <cluster_schema/> |
| 433 | 414 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 434 | - <xloc>280</xloc> | |
| 435 | - <yloc>67</yloc> | |
| 415 | + <xloc>512</xloc> | |
| 416 | + <yloc>181</yloc> | |
| 436 | 417 | <draw>Y</draw> |
| 437 | 418 | </GUI> |
| 438 | 419 | </step> |
| 439 | 420 | |
| 440 | 421 | <step> |
| 441 | - <name>表输入</name> | |
| 422 | + <name>车辆信息表输入</name> | |
| 442 | 423 | <type>TableInput</type> |
| 443 | 424 | <description/> |
| 444 | 425 | <distribute>Y</distribute> |
| ... | ... | @@ -449,11 +430,11 @@ |
| 449 | 430 | <schema_name/> |
| 450 | 431 | </partitioning> |
| 451 | 432 | <connection>bus_control_variable</connection> |
| 452 | - <sql>SELECT * FROM bsth_c_cars;</sql> | |
| 433 | + <sql>SELECT * FROM bsth_c_cars
where concat(business_code, '_', branche_company_code) in (${cgsbm_in})</sql> | |
| 453 | 434 | <limit>0</limit> |
| 454 | 435 | <lookup/> |
| 455 | 436 | <execute_each_row>N</execute_each_row> |
| 456 | - <variables_active>N</variables_active> | |
| 437 | + <variables_active>Y</variables_active> | |
| 457 | 438 | <lazy_conversion_active>N</lazy_conversion_active> |
| 458 | 439 | <cluster_schema/> |
| 459 | 440 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| ... | ... | @@ -463,6 +444,132 @@ |
| 463 | 444 | </GUI> |
| 464 | 445 | </step> |
| 465 | 446 | |
| 447 | + <step> | |
| 448 | + <name>添加查询常量</name> | |
| 449 | + <type>ScriptValueMod</type> | |
| 450 | + <description/> | |
| 451 | + <distribute>Y</distribute> | |
| 452 | + <custom_distribution/> | |
| 453 | + <copies>1</copies> | |
| 454 | + <partitioning> | |
| 455 | + <method>none</method> | |
| 456 | + <schema_name/> | |
| 457 | + </partitioning> | |
| 458 | + <compatible>N</compatible> | |
| 459 | + <optimizationLevel>9</optimizationLevel> | |
| 460 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 461 | + <jsScript_name>Script 1</jsScript_name> | |
| 462 | + <jsScript_script>//Script here

var up_code = '88';</jsScript_script> | |
| 463 | + </jsScript> </jsScripts> <fields> <field> <name>up_code</name> | |
| 464 | + <rename>up_code</rename> | |
| 465 | + <type>String</type> | |
| 466 | + <length>-1</length> | |
| 467 | + <precision>-1</precision> | |
| 468 | + <replace>N</replace> | |
| 469 | + </field> </fields> <cluster_schema/> | |
| 470 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 471 | + <xloc>244</xloc> | |
| 472 | + <yloc>67</yloc> | |
| 473 | + <draw>Y</draw> | |
| 474 | + </GUI> | |
| 475 | + </step> | |
| 476 | + | |
| 477 | + <step> | |
| 478 | + <name>公司查询</name> | |
| 479 | + <type>DBLookup</type> | |
| 480 | + <description/> | |
| 481 | + <distribute>Y</distribute> | |
| 482 | + <custom_distribution/> | |
| 483 | + <copies>1</copies> | |
| 484 | + <partitioning> | |
| 485 | + <method>none</method> | |
| 486 | + <schema_name/> | |
| 487 | + </partitioning> | |
| 488 | + <connection>bus_control_variable</connection> | |
| 489 | + <cache>N</cache> | |
| 490 | + <cache_load_all>N</cache_load_all> | |
| 491 | + <cache_size>0</cache_size> | |
| 492 | + <lookup> | |
| 493 | + <schema/> | |
| 494 | + <table>bsth_c_business</table> | |
| 495 | + <orderby/> | |
| 496 | + <fail_on_multiple>N</fail_on_multiple> | |
| 497 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 498 | + <key> | |
| 499 | + <name>up_code</name> | |
| 500 | + <field>up_code</field> | |
| 501 | + <condition>=</condition> | |
| 502 | + <name2/> | |
| 503 | + </key> | |
| 504 | + <key> | |
| 505 | + <name>business_code</name> | |
| 506 | + <field>business_code</field> | |
| 507 | + <condition>=</condition> | |
| 508 | + <name2/> | |
| 509 | + </key> | |
| 510 | + <value> | |
| 511 | + <name>business_name</name> | |
| 512 | + <rename>gs</rename> | |
| 513 | + <default/> | |
| 514 | + <type>String</type> | |
| 515 | + </value> | |
| 516 | + </lookup> | |
| 517 | + <cluster_schema/> | |
| 518 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 519 | + <xloc>381</xloc> | |
| 520 | + <yloc>68</yloc> | |
| 521 | + <draw>Y</draw> | |
| 522 | + </GUI> | |
| 523 | + </step> | |
| 524 | + | |
| 525 | + <step> | |
| 526 | + <name>分公司查询</name> | |
| 527 | + <type>DBLookup</type> | |
| 528 | + <description/> | |
| 529 | + <distribute>Y</distribute> | |
| 530 | + <custom_distribution/> | |
| 531 | + <copies>1</copies> | |
| 532 | + <partitioning> | |
| 533 | + <method>none</method> | |
| 534 | + <schema_name/> | |
| 535 | + </partitioning> | |
| 536 | + <connection>bus_control_variable</connection> | |
| 537 | + <cache>N</cache> | |
| 538 | + <cache_load_all>N</cache_load_all> | |
| 539 | + <cache_size>0</cache_size> | |
| 540 | + <lookup> | |
| 541 | + <schema/> | |
| 542 | + <table>bsth_c_business</table> | |
| 543 | + <orderby/> | |
| 544 | + <fail_on_multiple>N</fail_on_multiple> | |
| 545 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 546 | + <key> | |
| 547 | + <name>business_code</name> | |
| 548 | + <field>up_code</field> | |
| 549 | + <condition>=</condition> | |
| 550 | + <name2/> | |
| 551 | + </key> | |
| 552 | + <key> | |
| 553 | + <name>branche_company_code</name> | |
| 554 | + <field>business_code</field> | |
| 555 | + <condition>=</condition> | |
| 556 | + <name2/> | |
| 557 | + </key> | |
| 558 | + <value> | |
| 559 | + <name>business_name</name> | |
| 560 | + <rename>fgs</rename> | |
| 561 | + <default/> | |
| 562 | + <type>String</type> | |
| 563 | + </value> | |
| 564 | + </lookup> | |
| 565 | + <cluster_schema/> | |
| 566 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 567 | + <xloc>508</xloc> | |
| 568 | + <yloc>68</yloc> | |
| 569 | + <draw>Y</draw> | |
| 570 | + </GUI> | |
| 571 | + </step> | |
| 572 | + | |
| 466 | 573 | <step_error_handling> |
| 467 | 574 | </step_error_handling> |
| 468 | 575 | <slave-step-copy-partition-distribution> | ... | ... |
src/main/resources/datatools/ktrs/employeesDataInput.ktr
| ... | ... | @@ -273,13 +273,20 @@ |
| 273 | 273 | <order> |
| 274 | 274 | <hop> <from>插入/更新bsth_c_personnel</from><to>错误输出</to><enabled>Y</enabled> </hop> |
| 275 | 275 | <hop> <from>获取变量</from><to>原始系统导出的Excel输入</to><enabled>Y</enabled> </hop> |
| 276 | - <hop> <from>原始系统导出的Excel输入</from><to>过滤记录</to><enabled>Y</enabled> </hop> | |
| 277 | - <hop> <from>过滤记录</from><to>JavaScript代码</to><enabled>Y</enabled> </hop> | |
| 278 | - <hop> <from>JavaScript代码</from><to>插入/更新bsth_c_personnel</to><enabled>Y</enabled> </hop> | |
| 276 | + <hop> <from>添加查询常量</from><to>公司查询</to><enabled>Y</enabled> </hop> | |
| 277 | + <hop> <from>原始系统导出的Excel输入</from><to>工号不为空</to><enabled>Y</enabled> </hop> | |
| 278 | + <hop> <from>工号不为空</from><to>添加查询常量</to><enabled>Y</enabled> </hop> | |
| 279 | + <hop> <from>公司查询</from><to>公司代码不为空</to><enabled>Y</enabled> </hop> | |
| 280 | + <hop> <from>公司代码不为空</from><to>分公司查询</to><enabled>Y</enabled> </hop> | |
| 281 | + <hop> <from>分公司查询</from><to>分公司代码不为空</to><enabled>Y</enabled> </hop> | |
| 282 | + <hop> <from>分公司代码不为空</from><to>处理工号前缀</to><enabled>Y</enabled> </hop> | |
| 283 | + <hop> <from>处理工号前缀</from><to>岗位数据查询</to><enabled>Y</enabled> </hop> | |
| 284 | + <hop> <from>岗位数据查询</from><to>性别数据查询</to><enabled>Y</enabled> </hop> | |
| 285 | + <hop> <from>性别数据查询</from><to>插入/更新bsth_c_personnel</to><enabled>Y</enabled> </hop> | |
| 279 | 286 | </order> |
| 280 | 287 | <step> |
| 281 | - <name>JavaScript代码</name> | |
| 282 | - <type>ScriptValueMod</type> | |
| 288 | + <name>公司代码不为空</name> | |
| 289 | + <type>FilterRows</type> | |
| 283 | 290 | <description/> |
| 284 | 291 | <distribute>Y</distribute> |
| 285 | 292 | <custom_distribution/> |
| ... | ... | @@ -288,21 +295,155 @@ |
| 288 | 295 | <method>none</method> |
| 289 | 296 | <schema_name/> |
| 290 | 297 | </partitioning> |
| 291 | - <compatible>N</compatible> | |
| 292 | - <optimizationLevel>9</optimizationLevel> | |
| 293 | - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 294 | - <jsScript_name>Script 1</jsScript_name> | |
| 295 | - <jsScript_script>//Script here

var gh_calcu = 工号;

if (工号.indexOf(所属公司代码 + "-") < 0) {
 gh_calcu = 所属公司代码 + "-" + 工号;
} </jsScript_script> | |
| 296 | - </jsScript> </jsScripts> <fields> <field> <name>gh_calcu</name> | |
| 297 | - <rename>gh_calcu</rename> | |
| 298 | +<send_true_to/> | |
| 299 | +<send_false_to/> | |
| 300 | + <compare> | |
| 301 | +<condition> | |
| 302 | + <negated>N</negated> | |
| 303 | + <conditions> | |
| 304 | + <condition> | |
| 305 | + <negated>N</negated> | |
| 306 | + <leftvalue>gs_code</leftvalue> | |
| 307 | + <function>IS NOT NULL</function> | |
| 308 | + <rightvalue/> | |
| 309 | + </condition> | |
| 310 | + </conditions> | |
| 311 | + </condition> | |
| 312 | + </compare> | |
| 313 | + <cluster_schema/> | |
| 314 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 315 | + <xloc>583</xloc> | |
| 316 | + <yloc>175</yloc> | |
| 317 | + <draw>Y</draw> | |
| 318 | + </GUI> | |
| 319 | + </step> | |
| 320 | + | |
| 321 | + <step> | |
| 322 | + <name>公司查询</name> | |
| 323 | + <type>DBLookup</type> | |
| 324 | + <description/> | |
| 325 | + <distribute>Y</distribute> | |
| 326 | + <custom_distribution/> | |
| 327 | + <copies>1</copies> | |
| 328 | + <partitioning> | |
| 329 | + <method>none</method> | |
| 330 | + <schema_name/> | |
| 331 | + </partitioning> | |
| 332 | + <connection>bus_control_variable</connection> | |
| 333 | + <cache>N</cache> | |
| 334 | + <cache_load_all>N</cache_load_all> | |
| 335 | + <cache_size>0</cache_size> | |
| 336 | + <lookup> | |
| 337 | + <schema/> | |
| 338 | + <table>bsth_c_business</table> | |
| 339 | + <orderby/> | |
| 340 | + <fail_on_multiple>N</fail_on_multiple> | |
| 341 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 342 | + <key> | |
| 343 | + <name>up_code</name> | |
| 344 | + <field>up_code</field> | |
| 345 | + <condition>=</condition> | |
| 346 | + <name2/> | |
| 347 | + </key> | |
| 348 | + <key> | |
| 349 | + <name>所属公司</name> | |
| 350 | + <field>business_name</field> | |
| 351 | + <condition>=</condition> | |
| 352 | + <name2/> | |
| 353 | + </key> | |
| 354 | + <value> | |
| 355 | + <name>business_code</name> | |
| 356 | + <rename>gs_code</rename> | |
| 357 | + <default/> | |
| 298 | 358 | <type>String</type> |
| 299 | - <length>-1</length> | |
| 300 | - <precision>-1</precision> | |
| 301 | - <replace>N</replace> | |
| 302 | - </field> </fields> <cluster_schema/> | |
| 359 | + </value> | |
| 360 | + </lookup> | |
| 361 | + <cluster_schema/> | |
| 362 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 363 | + <xloc>583</xloc> | |
| 364 | + <yloc>83</yloc> | |
| 365 | + <draw>Y</draw> | |
| 366 | + </GUI> | |
| 367 | + </step> | |
| 368 | + | |
| 369 | + <step> | |
| 370 | + <name>分公司代码不为空</name> | |
| 371 | + <type>FilterRows</type> | |
| 372 | + <description/> | |
| 373 | + <distribute>Y</distribute> | |
| 374 | + <custom_distribution/> | |
| 375 | + <copies>1</copies> | |
| 376 | + <partitioning> | |
| 377 | + <method>none</method> | |
| 378 | + <schema_name/> | |
| 379 | + </partitioning> | |
| 380 | +<send_true_to/> | |
| 381 | +<send_false_to/> | |
| 382 | + <compare> | |
| 383 | +<condition> | |
| 384 | + <negated>N</negated> | |
| 385 | + <conditions> | |
| 386 | + <condition> | |
| 387 | + <negated>N</negated> | |
| 388 | + <leftvalue>fgs_code</leftvalue> | |
| 389 | + <function>IS NOT NULL</function> | |
| 390 | + <rightvalue/> | |
| 391 | + </condition> | |
| 392 | + </conditions> | |
| 393 | + </condition> | |
| 394 | + </compare> | |
| 395 | + <cluster_schema/> | |
| 303 | 396 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 304 | - <xloc>362</xloc> | |
| 305 | - <yloc>190</yloc> | |
| 397 | + <xloc>756</xloc> | |
| 398 | + <yloc>178</yloc> | |
| 399 | + <draw>Y</draw> | |
| 400 | + </GUI> | |
| 401 | + </step> | |
| 402 | + | |
| 403 | + <step> | |
| 404 | + <name>分公司查询</name> | |
| 405 | + <type>DBLookup</type> | |
| 406 | + <description/> | |
| 407 | + <distribute>Y</distribute> | |
| 408 | + <custom_distribution/> | |
| 409 | + <copies>1</copies> | |
| 410 | + <partitioning> | |
| 411 | + <method>none</method> | |
| 412 | + <schema_name/> | |
| 413 | + </partitioning> | |
| 414 | + <connection>bus_control_variable</connection> | |
| 415 | + <cache>N</cache> | |
| 416 | + <cache_load_all>N</cache_load_all> | |
| 417 | + <cache_size>0</cache_size> | |
| 418 | + <lookup> | |
| 419 | + <schema/> | |
| 420 | + <table>bsth_c_business</table> | |
| 421 | + <orderby/> | |
| 422 | + <fail_on_multiple>N</fail_on_multiple> | |
| 423 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 424 | + <key> | |
| 425 | + <name>gs_code</name> | |
| 426 | + <field>up_code</field> | |
| 427 | + <condition>=</condition> | |
| 428 | + <name2/> | |
| 429 | + </key> | |
| 430 | + <key> | |
| 431 | + <name>所属分公司</name> | |
| 432 | + <field>business_name</field> | |
| 433 | + <condition>=</condition> | |
| 434 | + <name2/> | |
| 435 | + </key> | |
| 436 | + <value> | |
| 437 | + <name>business_code</name> | |
| 438 | + <rename>fgs_code</rename> | |
| 439 | + <default/> | |
| 440 | + <type>String</type> | |
| 441 | + </value> | |
| 442 | + </lookup> | |
| 443 | + <cluster_schema/> | |
| 444 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 445 | + <xloc>756</xloc> | |
| 446 | + <yloc>83</yloc> | |
| 306 | 447 | <draw>Y</draw> |
| 307 | 448 | </GUI> |
| 308 | 449 | </step> |
| ... | ... | @@ -366,7 +507,7 @@ |
| 366 | 507 | <group/> |
| 367 | 508 | </field> |
| 368 | 509 | <field> |
| 369 | - <name>所属公司</name> | |
| 510 | + <name>性别</name> | |
| 370 | 511 | <type>String</type> |
| 371 | 512 | <length>-1</length> |
| 372 | 513 | <precision>-1</precision> |
| ... | ... | @@ -378,7 +519,7 @@ |
| 378 | 519 | <group/> |
| 379 | 520 | </field> |
| 380 | 521 | <field> |
| 381 | - <name>所属公司代码</name> | |
| 522 | + <name>所属公司</name> | |
| 382 | 523 | <type>String</type> |
| 383 | 524 | <length>-1</length> |
| 384 | 525 | <precision>-1</precision> |
| ... | ... | @@ -402,7 +543,43 @@ |
| 402 | 543 | <group/> |
| 403 | 544 | </field> |
| 404 | 545 | <field> |
| 405 | - <name>所属分公司代码</name> | |
| 546 | + <name>一卡通号</name> | |
| 547 | + <type>String</type> | |
| 548 | + <length>-1</length> | |
| 549 | + <precision>-1</precision> | |
| 550 | + <trim_type>none</trim_type> | |
| 551 | + <repeat>N</repeat> | |
| 552 | + <format>#</format> | |
| 553 | + <currency/> | |
| 554 | + <decimal/> | |
| 555 | + <group/> | |
| 556 | + </field> | |
| 557 | + <field> | |
| 558 | + <name>运营服务证号</name> | |
| 559 | + <type>String</type> | |
| 560 | + <length>-1</length> | |
| 561 | + <precision>-1</precision> | |
| 562 | + <trim_type>none</trim_type> | |
| 563 | + <repeat>N</repeat> | |
| 564 | + <format>#</format> | |
| 565 | + <currency/> | |
| 566 | + <decimal/> | |
| 567 | + <group/> | |
| 568 | + </field> | |
| 569 | + <field> | |
| 570 | + <name>岗位</name> | |
| 571 | + <type>String</type> | |
| 572 | + <length>-1</length> | |
| 573 | + <precision>-1</precision> | |
| 574 | + <trim_type>none</trim_type> | |
| 575 | + <repeat>N</repeat> | |
| 576 | + <format/> | |
| 577 | + <currency/> | |
| 578 | + <decimal/> | |
| 579 | + <group/> | |
| 580 | + </field> | |
| 581 | + <field> | |
| 582 | + <name>备注</name> | |
| 406 | 583 | <type>String</type> |
| 407 | 584 | <length>-1</length> |
| 408 | 585 | <precision>-1</precision> |
| ... | ... | @@ -441,8 +618,168 @@ |
| 441 | 618 | <spreadsheet_type>JXL</spreadsheet_type> |
| 442 | 619 | <cluster_schema/> |
| 443 | 620 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 444 | - <xloc>158</xloc> | |
| 445 | - <yloc>57</yloc> | |
| 621 | + <xloc>236</xloc> | |
| 622 | + <yloc>83</yloc> | |
| 623 | + <draw>Y</draw> | |
| 624 | + </GUI> | |
| 625 | + </step> | |
| 626 | + | |
| 627 | + <step> | |
| 628 | + <name>处理工号前缀</name> | |
| 629 | + <type>ScriptValueMod</type> | |
| 630 | + <description/> | |
| 631 | + <distribute>Y</distribute> | |
| 632 | + <custom_distribution/> | |
| 633 | + <copies>1</copies> | |
| 634 | + <partitioning> | |
| 635 | + <method>none</method> | |
| 636 | + <schema_name/> | |
| 637 | + </partitioning> | |
| 638 | + <compatible>N</compatible> | |
| 639 | + <optimizationLevel>9</optimizationLevel> | |
| 640 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 641 | + <jsScript_name>Script 1</jsScript_name> | |
| 642 | + <jsScript_script>//Script here

var gh_calcu = 工号;

if (工号.indexOf(gs_code + "-") < 0) {
 gh_calcu = gs_code + "-" + 工号;
} </jsScript_script> | |
| 643 | + </jsScript> </jsScripts> <fields> <field> <name>gh_calcu</name> | |
| 644 | + <rename>gh_calcu</rename> | |
| 645 | + <type>String</type> | |
| 646 | + <length>-1</length> | |
| 647 | + <precision>-1</precision> | |
| 648 | + <replace>N</replace> | |
| 649 | + </field> </fields> <cluster_schema/> | |
| 650 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 651 | + <xloc>758</xloc> | |
| 652 | + <yloc>297</yloc> | |
| 653 | + <draw>Y</draw> | |
| 654 | + </GUI> | |
| 655 | + </step> | |
| 656 | + | |
| 657 | + <step> | |
| 658 | + <name>岗位数据查询</name> | |
| 659 | + <type>DBLookup</type> | |
| 660 | + <description/> | |
| 661 | + <distribute>Y</distribute> | |
| 662 | + <custom_distribution/> | |
| 663 | + <copies>1</copies> | |
| 664 | + <partitioning> | |
| 665 | + <method>none</method> | |
| 666 | + <schema_name/> | |
| 667 | + </partitioning> | |
| 668 | + <connection>bus_control_variable</connection> | |
| 669 | + <cache>N</cache> | |
| 670 | + <cache_load_all>N</cache_load_all> | |
| 671 | + <cache_size>0</cache_size> | |
| 672 | + <lookup> | |
| 673 | + <schema/> | |
| 674 | + <table>bsth_c_sys_dictionary</table> | |
| 675 | + <orderby/> | |
| 676 | + <fail_on_multiple>N</fail_on_multiple> | |
| 677 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 678 | + <key> | |
| 679 | + <name>gzType</name> | |
| 680 | + <field>d_group</field> | |
| 681 | + <condition>=</condition> | |
| 682 | + <name2/> | |
| 683 | + </key> | |
| 684 | + <key> | |
| 685 | + <name>岗位</name> | |
| 686 | + <field>d_name</field> | |
| 687 | + <condition>=</condition> | |
| 688 | + <name2/> | |
| 689 | + </key> | |
| 690 | + <value> | |
| 691 | + <name>d_code</name> | |
| 692 | + <rename>posts</rename> | |
| 693 | + <default/> | |
| 694 | + <type>String</type> | |
| 695 | + </value> | |
| 696 | + </lookup> | |
| 697 | + <cluster_schema/> | |
| 698 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 699 | + <xloc>588</xloc> | |
| 700 | + <yloc>296</yloc> | |
| 701 | + <draw>Y</draw> | |
| 702 | + </GUI> | |
| 703 | + </step> | |
| 704 | + | |
| 705 | + <step> | |
| 706 | + <name>工号不为空</name> | |
| 707 | + <type>FilterRows</type> | |
| 708 | + <description/> | |
| 709 | + <distribute>Y</distribute> | |
| 710 | + <custom_distribution/> | |
| 711 | + <copies>1</copies> | |
| 712 | + <partitioning> | |
| 713 | + <method>none</method> | |
| 714 | + <schema_name/> | |
| 715 | + </partitioning> | |
| 716 | +<send_true_to/> | |
| 717 | +<send_false_to/> | |
| 718 | + <compare> | |
| 719 | +<condition> | |
| 720 | + <negated>N</negated> | |
| 721 | + <conditions> | |
| 722 | + <condition> | |
| 723 | + <negated>N</negated> | |
| 724 | + <leftvalue>工号</leftvalue> | |
| 725 | + <function>IS NOT NULL</function> | |
| 726 | + <rightvalue/> | |
| 727 | + </condition> | |
| 728 | + </conditions> | |
| 729 | + </condition> | |
| 730 | + </compare> | |
| 731 | + <cluster_schema/> | |
| 732 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 733 | + <xloc>238</xloc> | |
| 734 | + <yloc>178</yloc> | |
| 735 | + <draw>Y</draw> | |
| 736 | + </GUI> | |
| 737 | + </step> | |
| 738 | + | |
| 739 | + <step> | |
| 740 | + <name>性别数据查询</name> | |
| 741 | + <type>DBLookup</type> | |
| 742 | + <description/> | |
| 743 | + <distribute>Y</distribute> | |
| 744 | + <custom_distribution/> | |
| 745 | + <copies>1</copies> | |
| 746 | + <partitioning> | |
| 747 | + <method>none</method> | |
| 748 | + <schema_name/> | |
| 749 | + </partitioning> | |
| 750 | + <connection>bus_control_variable</connection> | |
| 751 | + <cache>N</cache> | |
| 752 | + <cache_load_all>N</cache_load_all> | |
| 753 | + <cache_size>0</cache_size> | |
| 754 | + <lookup> | |
| 755 | + <schema/> | |
| 756 | + <table>bsth_c_sys_dictionary</table> | |
| 757 | + <orderby/> | |
| 758 | + <fail_on_multiple>N</fail_on_multiple> | |
| 759 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 760 | + <key> | |
| 761 | + <name>sexType</name> | |
| 762 | + <field>d_group</field> | |
| 763 | + <condition>=</condition> | |
| 764 | + <name2/> | |
| 765 | + </key> | |
| 766 | + <key> | |
| 767 | + <name>性别</name> | |
| 768 | + <field>d_name</field> | |
| 769 | + <condition>=</condition> | |
| 770 | + <name2/> | |
| 771 | + </key> | |
| 772 | + <value> | |
| 773 | + <name>d_code</name> | |
| 774 | + <rename>sex</rename> | |
| 775 | + <default/> | |
| 776 | + <type>String</type> | |
| 777 | + </value> | |
| 778 | + </lookup> | |
| 779 | + <cluster_schema/> | |
| 780 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 781 | + <xloc>456</xloc> | |
| 782 | + <yloc>299</yloc> | |
| 446 | 783 | <draw>Y</draw> |
| 447 | 784 | </GUI> |
| 448 | 785 | </step> |
| ... | ... | @@ -459,7 +796,7 @@ |
| 459 | 796 | <schema_name/> |
| 460 | 797 | </partitioning> |
| 461 | 798 | <connection>bus_control_variable</connection> |
| 462 | - <commit>5000</commit> | |
| 799 | + <commit>500</commit> | |
| 463 | 800 | <update_bypassed>N</update_bypassed> |
| 464 | 801 | <lookup> |
| 465 | 802 | <schema/> |
| ... | ... | @@ -471,18 +808,13 @@ |
| 471 | 808 | <name2/> |
| 472 | 809 | </key> |
| 473 | 810 | <value> |
| 474 | - <name>personnel_name</name> | |
| 475 | - <rename>姓名</rename> | |
| 476 | - <update>Y</update> | |
| 477 | - </value> | |
| 478 | - <value> | |
| 479 | 811 | <name>company</name> |
| 480 | 812 | <rename>所属公司</rename> |
| 481 | 813 | <update>Y</update> |
| 482 | 814 | </value> |
| 483 | 815 | <value> |
| 484 | 816 | <name>company_code</name> |
| 485 | - <rename>所属公司代码</rename> | |
| 817 | + <rename>gs_code</rename> | |
| 486 | 818 | <update>Y</update> |
| 487 | 819 | </value> |
| 488 | 820 | <value> |
| ... | ... | @@ -492,7 +824,17 @@ |
| 492 | 824 | </value> |
| 493 | 825 | <value> |
| 494 | 826 | <name>branche_company_code</name> |
| 495 | - <rename>所属分公司代码</rename> | |
| 827 | + <rename>fgs_code</rename> | |
| 828 | + <update>Y</update> | |
| 829 | + </value> | |
| 830 | + <value> | |
| 831 | + <name>ic_card_code</name> | |
| 832 | + <rename>一卡通号</rename> | |
| 833 | + <update>Y</update> | |
| 834 | + </value> | |
| 835 | + <value> | |
| 836 | + <name>papers_code</name> | |
| 837 | + <rename>运营服务证号</rename> | |
| 496 | 838 | <update>Y</update> |
| 497 | 839 | </value> |
| 498 | 840 | <value> |
| ... | ... | @@ -500,11 +842,78 @@ |
| 500 | 842 | <rename>gh_calcu</rename> |
| 501 | 843 | <update>Y</update> |
| 502 | 844 | </value> |
| 845 | + <value> | |
| 846 | + <name>job_codeori</name> | |
| 847 | + <rename>工号</rename> | |
| 848 | + <update>Y</update> | |
| 849 | + </value> | |
| 850 | + <value> | |
| 851 | + <name>personnel_name</name> | |
| 852 | + <rename>姓名</rename> | |
| 853 | + <update>Y</update> | |
| 854 | + </value> | |
| 855 | + <value> | |
| 856 | + <name>personnel_type</name> | |
| 857 | + <rename>sex</rename> | |
| 858 | + <update>Y</update> | |
| 859 | + </value> | |
| 860 | + <value> | |
| 861 | + <name>posts</name> | |
| 862 | + <rename>posts</rename> | |
| 863 | + <update>Y</update> | |
| 864 | + </value> | |
| 865 | + <value> | |
| 866 | + <name>remark</name> | |
| 867 | + <rename>备注</rename> | |
| 868 | + <update>Y</update> | |
| 869 | + </value> | |
| 503 | 870 | </lookup> |
| 504 | 871 | <cluster_schema/> |
| 505 | 872 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 506 | - <xloc>576</xloc> | |
| 507 | - <yloc>56</yloc> | |
| 873 | + <xloc>240</xloc> | |
| 874 | + <yloc>297</yloc> | |
| 875 | + <draw>Y</draw> | |
| 876 | + </GUI> | |
| 877 | + </step> | |
| 878 | + | |
| 879 | + <step> | |
| 880 | + <name>添加查询常量</name> | |
| 881 | + <type>ScriptValueMod</type> | |
| 882 | + <description/> | |
| 883 | + <distribute>Y</distribute> | |
| 884 | + <custom_distribution/> | |
| 885 | + <copies>1</copies> | |
| 886 | + <partitioning> | |
| 887 | + <method>none</method> | |
| 888 | + <schema_name/> | |
| 889 | + </partitioning> | |
| 890 | + <compatible>N</compatible> | |
| 891 | + <optimizationLevel>9</optimizationLevel> | |
| 892 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 893 | + <jsScript_name>Script 1</jsScript_name> | |
| 894 | + <jsScript_script>//Script here

var up_code = '88';
var sexType = 'sexType';
var gzType = 'gzType';</jsScript_script> | |
| 895 | + </jsScript> </jsScripts> <fields> <field> <name>up_code</name> | |
| 896 | + <rename>up_code</rename> | |
| 897 | + <type>String</type> | |
| 898 | + <length>-1</length> | |
| 899 | + <precision>-1</precision> | |
| 900 | + <replace>N</replace> | |
| 901 | + </field> <field> <name>sexType</name> | |
| 902 | + <rename>sexType</rename> | |
| 903 | + <type>String</type> | |
| 904 | + <length>-1</length> | |
| 905 | + <precision>-1</precision> | |
| 906 | + <replace>N</replace> | |
| 907 | + </field> <field> <name>gzType</name> | |
| 908 | + <rename>gzType</rename> | |
| 909 | + <type>String</type> | |
| 910 | + <length>-1</length> | |
| 911 | + <precision>-1</precision> | |
| 912 | + <replace>N</replace> | |
| 913 | + </field> </fields> <cluster_schema/> | |
| 914 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 915 | + <xloc>414</xloc> | |
| 916 | + <yloc>85</yloc> | |
| 508 | 917 | <draw>Y</draw> |
| 509 | 918 | </GUI> |
| 510 | 919 | </step> |
| ... | ... | @@ -548,49 +957,8 @@ |
| 548 | 957 | </fields> |
| 549 | 958 | <cluster_schema/> |
| 550 | 959 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 551 | - <xloc>90</xloc> | |
| 552 | - <yloc>148</yloc> | |
| 553 | - <draw>Y</draw> | |
| 554 | - </GUI> | |
| 555 | - </step> | |
| 556 | - | |
| 557 | - <step> | |
| 558 | - <name>过滤记录</name> | |
| 559 | - <type>FilterRows</type> | |
| 560 | - <description/> | |
| 561 | - <distribute>Y</distribute> | |
| 562 | - <custom_distribution/> | |
| 563 | - <copies>1</copies> | |
| 564 | - <partitioning> | |
| 565 | - <method>none</method> | |
| 566 | - <schema_name/> | |
| 567 | - </partitioning> | |
| 568 | -<send_true_to/> | |
| 569 | -<send_false_to/> | |
| 570 | - <compare> | |
| 571 | -<condition> | |
| 572 | - <negated>N</negated> | |
| 573 | - <conditions> | |
| 574 | - <condition> | |
| 575 | - <negated>N</negated> | |
| 576 | - <leftvalue>工号</leftvalue> | |
| 577 | - <function>IS NOT NULL</function> | |
| 578 | - <rightvalue/> | |
| 579 | - </condition> | |
| 580 | - <condition> | |
| 581 | - <negated>N</negated> | |
| 582 | - <operator>AND</operator> | |
| 583 | - <leftvalue>所属公司代码</leftvalue> | |
| 584 | - <function>IS NOT NULL</function> | |
| 585 | - <rightvalue/> | |
| 586 | - </condition> | |
| 587 | - </conditions> | |
| 588 | - </condition> | |
| 589 | - </compare> | |
| 590 | - <cluster_schema/> | |
| 591 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 592 | - <xloc>358</xloc> | |
| 593 | - <yloc>57</yloc> | |
| 960 | + <xloc>70</xloc> | |
| 961 | + <yloc>85</yloc> | |
| 594 | 962 | <draw>Y</draw> |
| 595 | 963 | </GUI> |
| 596 | 964 | </step> |
| ... | ... | @@ -652,7 +1020,7 @@ |
| 652 | 1020 | <format/> |
| 653 | 1021 | </field> |
| 654 | 1022 | <field> |
| 655 | - <name>所属公司代码</name> | |
| 1023 | + <name>gs_code</name> | |
| 656 | 1024 | <type>String</type> |
| 657 | 1025 | <format/> |
| 658 | 1026 | </field> |
| ... | ... | @@ -662,7 +1030,7 @@ |
| 662 | 1030 | <format/> |
| 663 | 1031 | </field> |
| 664 | 1032 | <field> |
| 665 | - <name>所属分公司代码</name> | |
| 1033 | + <name>fgs_code</name> | |
| 666 | 1034 | <type>String</type> |
| 667 | 1035 | <format/> |
| 668 | 1036 | </field> |
| ... | ... | @@ -711,8 +1079,8 @@ |
| 711 | 1079 | </custom> |
| 712 | 1080 | <cluster_schema/> |
| 713 | 1081 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 714 | - <xloc>578</xloc> | |
| 715 | - <yloc>223</yloc> | |
| 1082 | + <xloc>240</xloc> | |
| 1083 | + <yloc>442</yloc> | |
| 716 | 1084 | <draw>Y</draw> |
| 717 | 1085 | </GUI> |
| 718 | 1086 | </step> | ... | ... |
src/main/resources/datatools/ktrs/employeesDataOutput.ktr
| ... | ... | @@ -10,6 +10,11 @@ |
| 10 | 10 | <directory>/</directory> |
| 11 | 11 | <parameters> |
| 12 | 12 | <parameter> |
| 13 | + <name>cgsbm_in</name> | |
| 14 | + <default_value/> | |
| 15 | + <description>分公司编码</description> | |
| 16 | + </parameter> | |
| 17 | + <parameter> | |
| 13 | 18 | <name>filepath</name> |
| 14 | 19 | <default_value/> |
| 15 | 20 | <description>excel文件路径</description> |
| ... | ... | @@ -266,8 +271,14 @@ |
| 266 | 271 | </attributes> |
| 267 | 272 | </connection> |
| 268 | 273 | <order> |
| 274 | + <hop> <from>人员信息表输入</from><to>添加查询常量</to><enabled>Y</enabled> </hop> | |
| 275 | + <hop> <from>岗位数据查询</from><to>性别数据查询</to><enabled>Y</enabled> </hop> | |
| 269 | 276 | <hop> <from>字段选择</from><to>Excel输出</to><enabled>Y</enabled> </hop> |
| 270 | - <hop> <from>表输入</from><to>字段选择</to><enabled>Y</enabled> </hop> | |
| 277 | + <hop> <from>性别数据查询</from><to>处理工号</to><enabled>Y</enabled> </hop> | |
| 278 | + <hop> <from>处理工号</from><to>字段选择</to><enabled>Y</enabled> </hop> | |
| 279 | + <hop> <from>添加查询常量</from><to>公司查询</to><enabled>Y</enabled> </hop> | |
| 280 | + <hop> <from>公司查询</from><to>分公司查询</to><enabled>Y</enabled> </hop> | |
| 281 | + <hop> <from>分公司查询</from><to>岗位数据查询</to><enabled>Y</enabled> </hop> | |
| 271 | 282 | </order> |
| 272 | 283 | <step> |
| 273 | 284 | <name>Excel输出</name> |
| ... | ... | @@ -321,12 +332,12 @@ |
| 321 | 332 | <format/> |
| 322 | 333 | </field> |
| 323 | 334 | <field> |
| 324 | - <name>所属公司</name> | |
| 335 | + <name>性别</name> | |
| 325 | 336 | <type>String</type> |
| 326 | 337 | <format/> |
| 327 | 338 | </field> |
| 328 | 339 | <field> |
| 329 | - <name>所属公司代码</name> | |
| 340 | + <name>所属公司</name> | |
| 330 | 341 | <type>String</type> |
| 331 | 342 | <format/> |
| 332 | 343 | </field> |
| ... | ... | @@ -336,7 +347,22 @@ |
| 336 | 347 | <format/> |
| 337 | 348 | </field> |
| 338 | 349 | <field> |
| 339 | - <name>所属分公司代码</name> | |
| 350 | + <name>一卡通号</name> | |
| 351 | + <type>String</type> | |
| 352 | + <format/> | |
| 353 | + </field> | |
| 354 | + <field> | |
| 355 | + <name>运营服务证号</name> | |
| 356 | + <type>String</type> | |
| 357 | + <format/> | |
| 358 | + </field> | |
| 359 | + <field> | |
| 360 | + <name>岗位</name> | |
| 361 | + <type>String</type> | |
| 362 | + <format/> | |
| 363 | + </field> | |
| 364 | + <field> | |
| 365 | + <name>备注</name> | |
| 340 | 366 | <type>String</type> |
| 341 | 367 | <format/> |
| 342 | 368 | </field> |
| ... | ... | @@ -360,13 +386,177 @@ |
| 360 | 386 | </custom> |
| 361 | 387 | <cluster_schema/> |
| 362 | 388 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 363 | - <xloc>346</xloc> | |
| 389 | + <xloc>625</xloc> | |
| 390 | + <yloc>443</yloc> | |
| 391 | + <draw>Y</draw> | |
| 392 | + </GUI> | |
| 393 | + </step> | |
| 394 | + | |
| 395 | + <step> | |
| 396 | + <name>人员信息表输入</name> | |
| 397 | + <type>TableInput</type> | |
| 398 | + <description/> | |
| 399 | + <distribute>Y</distribute> | |
| 400 | + <custom_distribution/> | |
| 401 | + <copies>1</copies> | |
| 402 | + <partitioning> | |
| 403 | + <method>none</method> | |
| 404 | + <schema_name/> | |
| 405 | + </partitioning> | |
| 406 | + <connection>bus_control_variable</connection> | |
| 407 | + <sql>SELECT * FROM bsth_c_personnel
where concat(company_code, '_', branche_company_code) in (${cgsbm_in})</sql> | |
| 408 | + <limit>0</limit> | |
| 409 | + <lookup/> | |
| 410 | + <execute_each_row>N</execute_each_row> | |
| 411 | + <variables_active>Y</variables_active> | |
| 412 | + <lazy_conversion_active>N</lazy_conversion_active> | |
| 413 | + <cluster_schema/> | |
| 414 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 415 | + <xloc>112</xloc> | |
| 364 | 416 | <yloc>66</yloc> |
| 365 | 417 | <draw>Y</draw> |
| 366 | 418 | </GUI> |
| 367 | 419 | </step> |
| 368 | 420 | |
| 369 | 421 | <step> |
| 422 | + <name>添加查询常量</name> | |
| 423 | + <type>ScriptValueMod</type> | |
| 424 | + <description/> | |
| 425 | + <distribute>Y</distribute> | |
| 426 | + <custom_distribution/> | |
| 427 | + <copies>1</copies> | |
| 428 | + <partitioning> | |
| 429 | + <method>none</method> | |
| 430 | + <schema_name/> | |
| 431 | + </partitioning> | |
| 432 | + <compatible>N</compatible> | |
| 433 | + <optimizationLevel>9</optimizationLevel> | |
| 434 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 435 | + <jsScript_name>Script 1</jsScript_name> | |
| 436 | + <jsScript_script>//Script here

var up_code = '88';
var sexType = 'sexType';
var gzType = 'gzType';</jsScript_script> | |
| 437 | + </jsScript> </jsScripts> <fields> <field> <name>up_code</name> | |
| 438 | + <rename>up_code</rename> | |
| 439 | + <type>String</type> | |
| 440 | + <length>-1</length> | |
| 441 | + <precision>-1</precision> | |
| 442 | + <replace>N</replace> | |
| 443 | + </field> <field> <name>sexType</name> | |
| 444 | + <rename>sexType</rename> | |
| 445 | + <type>String</type> | |
| 446 | + <length>-1</length> | |
| 447 | + <precision>-1</precision> | |
| 448 | + <replace>N</replace> | |
| 449 | + </field> <field> <name>gzType</name> | |
| 450 | + <rename>gzType</rename> | |
| 451 | + <type>String</type> | |
| 452 | + <length>-1</length> | |
| 453 | + <precision>-1</precision> | |
| 454 | + <replace>N</replace> | |
| 455 | + </field> </fields> <cluster_schema/> | |
| 456 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 457 | + <xloc>235</xloc> | |
| 458 | + <yloc>65</yloc> | |
| 459 | + <draw>Y</draw> | |
| 460 | + </GUI> | |
| 461 | + </step> | |
| 462 | + | |
| 463 | + <step> | |
| 464 | + <name>岗位数据查询</name> | |
| 465 | + <type>DBLookup</type> | |
| 466 | + <description/> | |
| 467 | + <distribute>Y</distribute> | |
| 468 | + <custom_distribution/> | |
| 469 | + <copies>1</copies> | |
| 470 | + <partitioning> | |
| 471 | + <method>none</method> | |
| 472 | + <schema_name/> | |
| 473 | + </partitioning> | |
| 474 | + <connection>bus_control_variable</connection> | |
| 475 | + <cache>N</cache> | |
| 476 | + <cache_load_all>N</cache_load_all> | |
| 477 | + <cache_size>0</cache_size> | |
| 478 | + <lookup> | |
| 479 | + <schema/> | |
| 480 | + <table>bsth_c_sys_dictionary</table> | |
| 481 | + <orderby/> | |
| 482 | + <fail_on_multiple>N</fail_on_multiple> | |
| 483 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 484 | + <key> | |
| 485 | + <name>gzType</name> | |
| 486 | + <field>d_group</field> | |
| 487 | + <condition>=</condition> | |
| 488 | + <name2/> | |
| 489 | + </key> | |
| 490 | + <key> | |
| 491 | + <name>posts</name> | |
| 492 | + <field>d_code</field> | |
| 493 | + <condition>=</condition> | |
| 494 | + <name2/> | |
| 495 | + </key> | |
| 496 | + <value> | |
| 497 | + <name>d_name</name> | |
| 498 | + <rename>gz</rename> | |
| 499 | + <default/> | |
| 500 | + <type>String</type> | |
| 501 | + </value> | |
| 502 | + </lookup> | |
| 503 | + <cluster_schema/> | |
| 504 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 505 | + <xloc>423</xloc> | |
| 506 | + <yloc>235</yloc> | |
| 507 | + <draw>Y</draw> | |
| 508 | + </GUI> | |
| 509 | + </step> | |
| 510 | + | |
| 511 | + <step> | |
| 512 | + <name>性别数据查询</name> | |
| 513 | + <type>DBLookup</type> | |
| 514 | + <description/> | |
| 515 | + <distribute>Y</distribute> | |
| 516 | + <custom_distribution/> | |
| 517 | + <copies>1</copies> | |
| 518 | + <partitioning> | |
| 519 | + <method>none</method> | |
| 520 | + <schema_name/> | |
| 521 | + </partitioning> | |
| 522 | + <connection>bus_control_variable</connection> | |
| 523 | + <cache>N</cache> | |
| 524 | + <cache_load_all>N</cache_load_all> | |
| 525 | + <cache_size>0</cache_size> | |
| 526 | + <lookup> | |
| 527 | + <schema/> | |
| 528 | + <table>bsth_c_sys_dictionary</table> | |
| 529 | + <orderby/> | |
| 530 | + <fail_on_multiple>N</fail_on_multiple> | |
| 531 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 532 | + <key> | |
| 533 | + <name>sexType</name> | |
| 534 | + <field>d_group</field> | |
| 535 | + <condition>=</condition> | |
| 536 | + <name2/> | |
| 537 | + </key> | |
| 538 | + <key> | |
| 539 | + <name>personnel_type</name> | |
| 540 | + <field>d_code</field> | |
| 541 | + <condition>=</condition> | |
| 542 | + <name2/> | |
| 543 | + </key> | |
| 544 | + <value> | |
| 545 | + <name>d_name</name> | |
| 546 | + <rename>sex</rename> | |
| 547 | + <default/> | |
| 548 | + <type>String</type> | |
| 549 | + </value> | |
| 550 | + </lookup> | |
| 551 | + <cluster_schema/> | |
| 552 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 553 | + <xloc>423</xloc> | |
| 554 | + <yloc>339</yloc> | |
| 555 | + <draw>Y</draw> | |
| 556 | + </GUI> | |
| 557 | + </step> | |
| 558 | + | |
| 559 | + <step> | |
| 370 | 560 | <name>字段选择</name> |
| 371 | 561 | <type>SelectValues</type> |
| 372 | 562 | <description/> |
| ... | ... | @@ -381,38 +571,80 @@ |
| 381 | 571 | <rename>姓名</rename> |
| 382 | 572 | <length>-2</length> |
| 383 | 573 | <precision>-2</precision> |
| 384 | - </field> <field> <name>job_code</name> | |
| 574 | + </field> <field> <name>jc</name> | |
| 385 | 575 | <rename>工号</rename> |
| 386 | 576 | <length>-2</length> |
| 387 | 577 | <precision>-2</precision> |
| 388 | - </field> <field> <name>company</name> | |
| 389 | - <rename>所属公司</rename> | |
| 578 | + </field> <field> <name>sex</name> | |
| 579 | + <rename>性别</rename> | |
| 390 | 580 | <length>-2</length> |
| 391 | 581 | <precision>-2</precision> |
| 392 | - </field> <field> <name>company_code</name> | |
| 393 | - <rename>所属公司代码</rename> | |
| 582 | + </field> <field> <name>gs</name> | |
| 583 | + <rename>所属公司</rename> | |
| 394 | 584 | <length>-2</length> |
| 395 | 585 | <precision>-2</precision> |
| 396 | - </field> <field> <name>branche_company</name> | |
| 586 | + </field> <field> <name>fgs</name> | |
| 397 | 587 | <rename>所属分公司</rename> |
| 398 | 588 | <length>-2</length> |
| 399 | 589 | <precision>-2</precision> |
| 400 | - </field> <field> <name>branche_company_code</name> | |
| 401 | - <rename>所属分公司代码</rename> | |
| 590 | + </field> <field> <name>ic_card_code</name> | |
| 591 | + <rename>一卡通号</rename> | |
| 592 | + <length>-2</length> | |
| 593 | + <precision>-2</precision> | |
| 594 | + </field> <field> <name>papers_code</name> | |
| 595 | + <rename>运营服务证号</rename> | |
| 596 | + <length>-2</length> | |
| 597 | + <precision>-2</precision> | |
| 598 | + </field> <field> <name>gz</name> | |
| 599 | + <rename>岗位</rename> | |
| 600 | + <length>-2</length> | |
| 601 | + <precision>-2</precision> | |
| 602 | + </field> <field> <name>remark</name> | |
| 603 | + <rename>备注</rename> | |
| 402 | 604 | <length>-2</length> |
| 403 | 605 | <precision>-2</precision> |
| 404 | 606 | </field> <select_unspecified>N</select_unspecified> |
| 405 | 607 | </fields> <cluster_schema/> |
| 406 | 608 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 407 | - <xloc>221</xloc> | |
| 408 | - <yloc>66</yloc> | |
| 609 | + <xloc>623</xloc> | |
| 610 | + <yloc>339</yloc> | |
| 409 | 611 | <draw>Y</draw> |
| 410 | 612 | </GUI> |
| 411 | 613 | </step> |
| 412 | 614 | |
| 413 | 615 | <step> |
| 414 | - <name>表输入</name> | |
| 415 | - <type>TableInput</type> | |
| 616 | + <name>处理工号</name> | |
| 617 | + <type>ScriptValueMod</type> | |
| 618 | + <description/> | |
| 619 | + <distribute>Y</distribute> | |
| 620 | + <custom_distribution/> | |
| 621 | + <copies>1</copies> | |
| 622 | + <partitioning> | |
| 623 | + <method>none</method> | |
| 624 | + <schema_name/> | |
| 625 | + </partitioning> | |
| 626 | + <compatible>N</compatible> | |
| 627 | + <optimizationLevel>9</optimizationLevel> | |
| 628 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 629 | + <jsScript_name>Script 1</jsScript_name> | |
| 630 | + <jsScript_script>//Script here

var jc;
jc = job_code.split("-")[1];</jsScript_script> | |
| 631 | + </jsScript> </jsScripts> <fields> <field> <name>jc</name> | |
| 632 | + <rename>jc</rename> | |
| 633 | + <type>String</type> | |
| 634 | + <length>-1</length> | |
| 635 | + <precision>-1</precision> | |
| 636 | + <replace>N</replace> | |
| 637 | + </field> </fields> <cluster_schema/> | |
| 638 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 639 | + <xloc>423</xloc> | |
| 640 | + <yloc>444</yloc> | |
| 641 | + <draw>Y</draw> | |
| 642 | + </GUI> | |
| 643 | + </step> | |
| 644 | + | |
| 645 | + <step> | |
| 646 | + <name>公司查询</name> | |
| 647 | + <type>DBLookup</type> | |
| 416 | 648 | <description/> |
| 417 | 649 | <distribute>Y</distribute> |
| 418 | 650 | <custom_distribution/> |
| ... | ... | @@ -422,16 +654,86 @@ |
| 422 | 654 | <schema_name/> |
| 423 | 655 | </partitioning> |
| 424 | 656 | <connection>bus_control_variable</connection> |
| 425 | - <sql>SELECT * FROM bsth_c_personnel;</sql> | |
| 426 | - <limit>0</limit> | |
| 427 | - <lookup/> | |
| 428 | - <execute_each_row>N</execute_each_row> | |
| 429 | - <variables_active>N</variables_active> | |
| 430 | - <lazy_conversion_active>N</lazy_conversion_active> | |
| 657 | + <cache>N</cache> | |
| 658 | + <cache_load_all>N</cache_load_all> | |
| 659 | + <cache_size>0</cache_size> | |
| 660 | + <lookup> | |
| 661 | + <schema/> | |
| 662 | + <table>bsth_c_business</table> | |
| 663 | + <orderby/> | |
| 664 | + <fail_on_multiple>N</fail_on_multiple> | |
| 665 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 666 | + <key> | |
| 667 | + <name>up_code</name> | |
| 668 | + <field>up_code</field> | |
| 669 | + <condition>=</condition> | |
| 670 | + <name2/> | |
| 671 | + </key> | |
| 672 | + <key> | |
| 673 | + <name>company_code</name> | |
| 674 | + <field>business_code</field> | |
| 675 | + <condition>=</condition> | |
| 676 | + <name2/> | |
| 677 | + </key> | |
| 678 | + <value> | |
| 679 | + <name>business_name</name> | |
| 680 | + <rename>gs</rename> | |
| 681 | + <default/> | |
| 682 | + <type>String</type> | |
| 683 | + </value> | |
| 684 | + </lookup> | |
| 431 | 685 | <cluster_schema/> |
| 432 | 686 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 433 | - <xloc>112</xloc> | |
| 434 | - <yloc>66</yloc> | |
| 687 | + <xloc>361</xloc> | |
| 688 | + <yloc>65</yloc> | |
| 689 | + <draw>Y</draw> | |
| 690 | + </GUI> | |
| 691 | + </step> | |
| 692 | + | |
| 693 | + <step> | |
| 694 | + <name>分公司查询</name> | |
| 695 | + <type>DBLookup</type> | |
| 696 | + <description/> | |
| 697 | + <distribute>Y</distribute> | |
| 698 | + <custom_distribution/> | |
| 699 | + <copies>1</copies> | |
| 700 | + <partitioning> | |
| 701 | + <method>none</method> | |
| 702 | + <schema_name/> | |
| 703 | + </partitioning> | |
| 704 | + <connection>bus_control_variable</connection> | |
| 705 | + <cache>N</cache> | |
| 706 | + <cache_load_all>N</cache_load_all> | |
| 707 | + <cache_size>0</cache_size> | |
| 708 | + <lookup> | |
| 709 | + <schema/> | |
| 710 | + <table>bsth_c_business</table> | |
| 711 | + <orderby/> | |
| 712 | + <fail_on_multiple>N</fail_on_multiple> | |
| 713 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 714 | + <key> | |
| 715 | + <name>company_code</name> | |
| 716 | + <field>up_code</field> | |
| 717 | + <condition>=</condition> | |
| 718 | + <name2/> | |
| 719 | + </key> | |
| 720 | + <key> | |
| 721 | + <name>branche_company_code</name> | |
| 722 | + <field>business_code</field> | |
| 723 | + <condition>=</condition> | |
| 724 | + <name2/> | |
| 725 | + </key> | |
| 726 | + <value> | |
| 727 | + <name>business_name</name> | |
| 728 | + <rename>fgs</rename> | |
| 729 | + <default/> | |
| 730 | + <type>String</type> | |
| 731 | + </value> | |
| 732 | + </lookup> | |
| 733 | + <cluster_schema/> | |
| 734 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 735 | + <xloc>479</xloc> | |
| 736 | + <yloc>67</yloc> | |
| 435 | 737 | <draw>Y</draw> |
| 436 | 738 | </GUI> |
| 437 | 739 | </step> | ... | ... |
src/main/resources/static/pages/base/line/edit.html
| ... | ... | @@ -46,6 +46,10 @@ |
| 46 | 46 | |
| 47 | 47 | <!-- 表单分组组件 form-group START --> |
| 48 | 48 | <div class="form-group"> |
| 49 | + <!-- in_use字段 START --> | |
| 50 | + <input type="hidden" name="inUse" id="inUseInput" placeholder="隐藏字段" readonly="readonly"> | |
| 51 | + <!-- in_use字段 END --> | |
| 52 | + | |
| 49 | 53 | <!-- 线路编码 (* 必填项) START --> |
| 50 | 54 | <div class="col-md-6"> |
| 51 | 55 | <label class="control-label col-md-5"> | ... | ... |
src/main/resources/static/pages/base/line/js/line-add-form.js
| ... | ... | @@ -9,12 +9,12 @@ |
| 9 | 9 | |
| 10 | 10 | $(function(){ |
| 11 | 11 | /** 获取线路编码 @param cb <回调函数> */ |
| 12 | - function getLineCode(cb) { | |
| 13 | - /** get请求获取线路编码。返回线路编码值 */ | |
| 12 | + /*function getLineCode(cb) { | |
| 13 | + *//** get请求获取线路编码。返回线路编码值 *//* | |
| 14 | 14 | $.get('/line/getLineCode',function(lineCode){ |
| 15 | 15 | return cb && cb(lineCode); |
| 16 | 16 | }); |
| 17 | - } | |
| 17 | + }*/ | |
| 18 | 18 | /** 填充分公司下拉框选择值 */ |
| 19 | 19 | function setbrancheCompanySelectOptions(){ |
| 20 | 20 | // 获取公司下拉框选择值 |
| ... | ... | @@ -48,11 +48,11 @@ $(function(){ |
| 48 | 48 | $('#shortNameInput').val(pinyin.getCamelChars(val)); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - /** 获取线路编码元素并设值 @param 匿名函数 */ | |
| 51 | + /** 获取线路编码元素并设值 @param 匿名函数 *//* | |
| 52 | 52 | getLineCode(function(result){ |
| 53 | 53 | // 设置线路编码值 |
| 54 | 54 | $('#lineCodeInput').val(result); |
| 55 | - }) | |
| 55 | + })*/ | |
| 56 | 56 | /** 输入线路名称,自动生成英文名称和线路简称 */ |
| 57 | 57 | $('#nameInput').on('keyup', setPinYin); |
| 58 | 58 | /** 开辟日期 日期控件 <format:日期控件时间格式;locale:语言> */ |
| ... | ... | @@ -196,7 +196,7 @@ $(function(){ |
| 196 | 196 | // 如果大于零,则已存在录入的线路编码;否则不存在 |
| 197 | 197 | if(len > 0) { |
| 198 | 198 | |
| 199 | - // 定义已有的线路编码 | |
| 199 | + /*// 定义已有的线路编码 | |
| 200 | 200 | var oldCode = params.lineCode; |
| 201 | 201 | |
| 202 | 202 | // 自动获取线路编码 |
| ... | ... | @@ -210,8 +210,11 @@ $(function(){ |
| 210 | 210 | btn : [ '确认提示并提交', '取消' ] |
| 211 | 211 | }, submit); |
| 212 | 212 | |
| 213 | - }); | |
| 214 | - | |
| 213 | + });*/ | |
| 214 | + layer.open({ | |
| 215 | + title: '消息提示' | |
| 216 | + ,content: '线路编码【'+params.lineCode+'】已存在,请重新输入编码!' | |
| 217 | + }); | |
| 215 | 218 | } else { |
| 216 | 219 | |
| 217 | 220 | // 提交 | ... | ... |
src/main/resources/static/pages/base/line/js/line-edit-form.js
| ... | ... | @@ -100,10 +100,13 @@ |
| 100 | 100 | selectTemp(function(){ |
| 101 | 101 | /** 根据ID查询详细信息 */ |
| 102 | 102 | $get('/line/' + lineId ,null, function(result){ |
| 103 | + debugger; | |
| 103 | 104 | // 如果不为空 |
| 104 | 105 | if(result) { |
| 105 | 106 | // 定义日期格式 |
| 106 | - var fs = 'YYYY-MM-DD' | |
| 107 | + var fs = 'YYYY-MM-DD'; | |
| 108 | + // 设置inUse | |
| 109 | + $('#inUseInput').val(result.inUse); | |
| 107 | 110 | // 设置日期 |
| 108 | 111 | result.openDate = moment(result.openDate).format(fs); |
| 109 | 112 | /** 填充修改线路表单元素值 @param:<result:数据结果集;line_edit_form:表单元素> */ |
| ... | ... | @@ -242,7 +245,7 @@ |
| 242 | 245 | // 提交 |
| 243 | 246 | submit(); |
| 244 | 247 | } else { |
| 245 | - // 定义已有的线路编码 | |
| 248 | + /*// 定义已有的线路编码 | |
| 246 | 249 | var oldCode = params.lineCode; |
| 247 | 250 | // 重新设置提交参数线路编码值 |
| 248 | 251 | params.lineCode = lineId; |
| ... | ... | @@ -250,7 +253,11 @@ |
| 250 | 253 | layer.confirm('线路编码【'+oldCode+'】已存在!自动顺延为如下:<br>线路编码:'+lineId, { |
| 251 | 254 | btn : [ '确认提示并提交', '取消' ] |
| 252 | 255 | }, submit); |
| 253 | - | |
| 256 | + */ | |
| 257 | + layer.open({ | |
| 258 | + title: '消息提示' | |
| 259 | + ,content: '线路编码【'+params.lineCode+'】已存在,请重新输入编码!' | |
| 260 | + }); | |
| 254 | 261 | } |
| 255 | 262 | } else { |
| 256 | 263 | // 提交 | ... | ... |
src/main/resources/static/pages/base/line/js/line-list-table.js
| ... | ... | @@ -336,7 +336,7 @@ |
| 336 | 336 | var arrChk = $("input[type='checkbox']:checked"); |
| 337 | 337 | var len = arrChk.length; |
| 338 | 338 | // 选中行ID与线路名称 |
| 339 | - var id = '', lineName = ''; | |
| 339 | + var id = ''; | |
| 340 | 340 | if(len>1) { |
| 341 | 341 | // 弹出添加成功提示消息 |
| 342 | 342 | layer.msg('存在多选,请只选中一行!'); |
| ... | ... | @@ -370,4 +370,37 @@ |
| 370 | 370 | window.location.href = "/pages/base/line/map.html?no="+id; |
| 371 | 371 | } |
| 372 | 372 | }); |
| 373 | + | |
| 374 | + // 导出线路站点 | |
| 375 | + $('#datatable_ajax_tools #exportStation').on('click', function() { | |
| 376 | + // 获取选中行. | |
| 377 | + var arrChk = $("input[type='checkbox']:checked"); | |
| 378 | + var len = arrChk.length; | |
| 379 | + // 选中行ID与线路名称 | |
| 380 | + var id = ''; | |
| 381 | + if(len>1) { | |
| 382 | + // 弹出添加成功提示消息 | |
| 383 | + layer.msg('存在多选,请只选中一行!'); | |
| 384 | + return ; | |
| 385 | + }else if(len==0) { | |
| 386 | + // 弹出添加成功提示消息 | |
| 387 | + layer.msg('请选中一条线路!'); | |
| 388 | + return ; | |
| 389 | + }else { | |
| 390 | + id = arrChk.data('id'); | |
| 391 | + var param = {}; | |
| 392 | + param.id = id; | |
| 393 | + window.open('/stationroute/export?id='+id); | |
| 394 | + | |
| 395 | + /*$.get("/stationroute/export",param,function(result) { | |
| 396 | + if(result.status == "ERROR") { | |
| 397 | + layer.msg("导出文件失败!"); | |
| 398 | + } else if(result.status == "ERROR") { | |
| 399 | + layer.msg("导出文件成功!"); | |
| 400 | + } else { | |
| 401 | + layer.msg("未知异常!"); | |
| 402 | + } | |
| 403 | + });*/ | |
| 404 | + } | |
| 405 | + }); | |
| 373 | 406 | })(); |
| 374 | 407 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/line/list.html
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | <div class="page-title"> |
| 6 | 6 | <h1>线路信息</h1> |
| 7 | 7 | </div> |
| 8 | -</div> | |
| 8 | + | |
| 9 | 9 | <!-- 片段标题 END --> |
| 10 | 10 | |
| 11 | 11 | <!-- 线路信息导航栏组件 START --> |
| ... | ... | @@ -40,6 +40,9 @@ |
| 40 | 40 | <li> |
| 41 | 41 | <a href="javascript:;" data-action="1" id="editRoute" class="tool-action"> <i class="fa fa-level-up"></i>上传GPS生成路线</a> |
| 42 | 42 | </li> |
| 43 | + <li> | |
| 44 | + <a href="javascript:;" data-action="2" id="exportStation" class="tool-action"> <i class="fa fa-level-up"></i>导出线路站点Excel</a> | |
| 45 | + </li> | |
| 43 | 46 | <!-- <li><a href="javascript:;" data-action="0" class="tool-action"> <i class="fa fa-print"></i> 打印 |
| 44 | 47 | </a></li> |
| 45 | 48 | <li><a href="javascript:;" data-action="1" class="tool-action"> <i class="fa fa-copy"></i> 复制 |
| ... | ... | @@ -151,6 +154,7 @@ |
| 151 | 154 | </div> |
| 152 | 155 | </div> |
| 153 | 156 | </div> |
| 157 | +</div> | |
| 154 | 158 | <!-- |
| 155 | 159 | |
| 156 | 160 | <td style="vertical-align: middle;"> | ... | ... |
src/main/resources/static/pages/base/stationroute/addstationstemplate.html
| ... | ... | @@ -212,17 +212,25 @@ $('#add_station_template_mobal').on('AddStationTempMobal.show', function(e,map,a |
| 212 | 212 | // 定义路段信息字符串 |
| 213 | 213 | var sectionJSON = JSON.stringify(jsonArray); |
| 214 | 214 | // 路段信息JSON字符串 |
| 215 | - params.sectionJSON = sectionJSON; | |
| 216 | - addSave(params,addLine.id,directionData); | |
| 215 | + // if(sectionJSON != null && sectionJSON != "") { | |
| 216 | + params.sectionJSON = sectionJSON; | |
| 217 | + addSave(params,addLine.id,directionData); | |
| 218 | + /* } else { | |
| 219 | + layer.msg('百度地图上没有此线路的相应路段,请更换方式规划!!!'); | |
| 220 | + } */ | |
| 217 | 221 | }else { |
| 218 | 222 | // 根据坐标点获取两点之间的折线路段 |
| 219 | 223 | map.getSectionListPlonly(stationdataList,function(sectiondata) { |
| 220 | 224 | // 定义路段信息字符串 |
| 221 | 225 | var sectionJSON = JSON.stringify(sectiondata); |
| 222 | 226 | // 路段信息JSON字符串 |
| 223 | - params.sectionJSON = sectionJSON; | |
| 224 | - addSave(params,addLine.id,directionData); | |
| 225 | - | |
| 227 | + //if(sectionJSON != null && sectionJSON != "") { | |
| 228 | + params.sectionJSON = sectionJSON; | |
| 229 | + addSave(params,addLine.id,directionData); | |
| 230 | + /* } else { | |
| 231 | + layer.msg('无法生成路段,请重试!'); | |
| 232 | + return; | |
| 233 | + } */ | |
| 226 | 234 | }); |
| 227 | 235 | } |
| 228 | 236 | }); | ... | ... |
src/main/resources/static/pages/base/stationroute/deletesection.html
| ... | ... | @@ -193,10 +193,24 @@ $('#delete_section_mobal').on('deleteSectionMobal.show',function(e, ajaxd, line, |
| 193 | 193 | page = 0; |
| 194 | 194 | loadTableDate(params, true); |
| 195 | 195 | } |
| 196 | + function getLineCode(id) { | |
| 197 | + var lineCode; | |
| 198 | + $.ajax({ | |
| 199 | + url: "/line/findById", //请求地址 | |
| 200 | + type: "Get", | |
| 201 | + async:false, | |
| 202 | + //请求方式 | |
| 203 | + data: { id : id}, //请求参数 | |
| 204 | + success: function (result) { | |
| 205 | + lineCode = result.lineCode; | |
| 206 | + } | |
| 207 | + }); | |
| 208 | + return lineCode; | |
| 209 | + } | |
| 196 | 210 | function getParams() { |
| 197 | 211 | // 搜索参数集合 |
| 198 | 212 | params = {}; |
| 199 | - params.lineCode_eq = line.id; | |
| 213 | + params.lineCode_eq = getLineCode(line.id); | |
| 200 | 214 | params.directions_eq = delBatch.dir; |
| 201 | 215 | params.destroy_eq = "0"; //默认查没有撤销的路段 |
| 202 | 216 | return params; | ... | ... |
src/main/resources/static/pages/base/stationroute/deletestation.html
| ... | ... | @@ -194,10 +194,24 @@ $('#delete_station_mobal').on('deleteStationMobal.show',function(e, ajaxd, line, |
| 194 | 194 | page = 0; |
| 195 | 195 | loadTableDate(params, true); |
| 196 | 196 | } |
| 197 | + function getLineCode(id) { | |
| 198 | + var lineCode; | |
| 199 | + $.ajax({ | |
| 200 | + url: "/line/findById", //请求地址 | |
| 201 | + type: "Get", | |
| 202 | + async:false, | |
| 203 | + //请求方式 | |
| 204 | + data: { id : id}, //请求参数 | |
| 205 | + success: function (result) { | |
| 206 | + lineCode = result.lineCode; | |
| 207 | + } | |
| 208 | + }); | |
| 209 | + return lineCode; | |
| 210 | + } | |
| 197 | 211 | function getParams() { |
| 198 | 212 | // 搜索参数集合 |
| 199 | 213 | params = {}; |
| 200 | - params.lineCode_eq = line.id; | |
| 214 | + params.lineCode_eq = getLineCode(line.id); | |
| 201 | 215 | params.directions_eq = delBatch.dir; |
| 202 | 216 | params.destroy_eq = "0"; //默认查没有撤销的站点 |
| 203 | 217 | return params; | ... | ... |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-reload.js
| ... | ... | @@ -58,13 +58,16 @@ $(function(){ |
| 58 | 58 | /** 初始化下行树 @param:<Line.id:线路Id;1:下行> */ |
| 59 | 59 | PublicFunctions.TreeUpOrDown(Line.id,'1'); |
| 60 | 60 | |
| 61 | + var start =new Date(); | |
| 62 | + console.log(start); | |
| 61 | 63 | /** 查询路段信息 @param:<Line.id:线路Id;dir:方向> @return:data:路段数据 */ |
| 62 | 64 | GetAjaxData.getSectionRouteInfo(Line.id,dir,function(data) { |
| 63 | 65 | /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */ |
| 64 | 66 | PublicFunctions.linePanlThree(Line.id,data,dir); |
| 65 | 67 | |
| 66 | 68 | }); |
| 67 | - | |
| 69 | + var finish =new Date(); | |
| 70 | + console.log(finish); | |
| 68 | 71 | },500); |
| 69 | 72 | |
| 70 | 73 | }else { | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/add-form-wizard.js
| ... | ... | @@ -505,6 +505,14 @@ var SKBFormWizard = function() { |
| 505 | 505 | 'bxrc' : {required : true},// 班型人次,必填项 |
| 506 | 506 | 'linePlayType' : {required : true},// 线路规划类型,必填项 |
| 507 | 507 | 'zdzcrl' : {number : true,digits : true}, |
| 508 | + | |
| 509 | + | |
| 510 | + 'gfupStopTime' : {required : true,number : true}, // 高峰上行停站时间,必填项、必须为整数. | |
| 511 | + 'gfdownStopTime' : {required : true,number : true}, // 高峰下行停站时间,必填项、必须为整数. | |
| 512 | + 'dgupStopTime' : {required : true,number : true}, // 低谷上行停站时间,必填项、必须为整数. | |
| 513 | + 'dgdownStopTime' : {required : true,number : true}, // 低谷下行停站时间,必填项、必须为整数. | |
| 514 | + 'dgmaxfcjx' : {required : true,number : true}, // 低谷最大发车间隙,必填项、必须为整数. | |
| 515 | + 'dgmaxtzsj' : {required : true,number : true}, // 低谷最大停站时间,必填项、必须为整数. | |
| 508 | 516 | }, |
| 509 | 517 | |
| 510 | 518 | /** | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/base-fun.js
| ... | ... | @@ -794,31 +794,36 @@ var BaseFun = function() { |
| 794 | 794 | |
| 795 | 795 | // 第一步 根据表单中的参数得到所有路牌下的班次数[从各路牌下的第一个班次发车时间 到 营运结束时间点并且是连续的班次数]. |
| 796 | 796 | var allLMapBc = baseF.GetByArgusInitAllLpDownedBcCollections(saa , cara , map , seMap , dataMap); |
| 797 | - | |
| 798 | - // 第二步 纵向调整 | |
| 797 | + //return {'json':allLMapBc,'bxrcgs':null}; | |
| 798 | + | |
| 799 | + // 第二步 纵向调整 | |
| 799 | 800 | baseF.evenStartDepartSpace(allLMapBc , dataMap); |
| 800 | - | |
| 801 | + //return {'json':allLMapBc,'bxrcgs':null}; | |
| 802 | + | |
| 801 | 803 | // 第三步 剔除首末班车以外的班次,并确认首末班车. |
| 802 | 804 | var markArray = baseF.markFirstAndLastBusAlsoDietNotInRangeBc(allLMapBc , dataMap); |
| 803 | - // return {'json':markArray,'bxrcgs':null}; | |
| 804 | - // 第四步 横向调整 | |
| 805 | + //return {'json':markArray,'bxrcgs':null}; | |
| 806 | + // 第四步 横向调整 | |
| 805 | 807 | baseF.resizeByPitStopTime(cara , markArray , dataMap); |
| 806 | - // return {'json':markArray,'bxrcgs':null}; | |
| 808 | + //return {'json':markArray,'bxrcgs':null}; | |
| 807 | 809 | /** |
| 808 | 810 | * 第五步 把班型合理的分配到各个路牌上. |
| 809 | - * | |
| 811 | + * | |
| 810 | 812 | * 切割班型/人次/配车数 字符串 为 数组对象. |
| 811 | - * | |
| 813 | + * | |
| 812 | 814 | * 把班型分配到对应的具体路牌上. |
| 813 | 815 | */ |
| 814 | 816 | // 切割班型/人次/配车数 字符串 为 数组对象. |
| 815 | 817 | var list = baseF.getBxRcListCollection(map.bxrc); |
| 816 | 818 | // 把班型分配到对应的具体路牌上. |
| 817 | 819 | baseF.bxAlloTotLp(list,cara); |
| 820 | + //return {'json':markArray,'bxrcgs':null}; | |
| 821 | + | |
| 822 | + | |
| 818 | 823 | // 第六步 抽车来满足工时. |
| 819 | 824 | var tempA = baseF.abstractCar(list , markArray , cara , saa , dataMap , map); |
| 820 | 825 | // return {'json':tempA,'bxrcgs':null}; |
| 821 | - // 第七步 确定吃饭时间. | |
| 826 | + // 第七步 确定吃饭时间. | |
| 822 | 827 | baseF.markeEatTime(list , tempA , cara , saa , dataMap ,map); |
| 823 | 828 | baseF.resizeByPitStopTime(cara , tempA , dataMap); |
| 824 | 829 | baseF.updfcno01(tempA,0); | ... | ... |
src/main/resources/static/pages/base/timesmodel/tepms/bctype_temp.html
| ... | ... | @@ -635,7 +635,9 @@ |
| 635 | 635 | <!-- 线路规划类型 (* 必填项) END --> |
| 636 | 636 | <!-- 起始站首班时间 (* 必填项) START --> |
| 637 | 637 | <div class="col-md-6"> |
| 638 | - <label class="control-label col-md-5"> 起始站首班时间 : </label> | |
| 638 | + <label class="control-label col-md-5"> | |
| 639 | + <span class="required"> * </span> 起始站首班时间 : | |
| 640 | + </label> | |
| 639 | 641 | <div class="col-md-4"> |
| 640 | 642 | <p class="form-control-static" data-display="startStationFirstTime"> </p> |
| 641 | 643 | </div> |
| ... | ... | @@ -643,7 +645,9 @@ |
| 643 | 645 | <!-- 起始站首班时间 (* 必填项) END --> |
| 644 | 646 | <!-- 起始站末班时间 (* 必填项) START --> |
| 645 | 647 | <div class="col-md-6"> |
| 646 | - <label class="control-label col-md-5"> 起始站末班时间 : </label> | |
| 648 | + <label class="control-label col-md-5"> | |
| 649 | + <span class="required"> * </span> 起始站末班时间 : | |
| 650 | + </label> | |
| 647 | 651 | <div class="col-md-4"> |
| 648 | 652 | <p class="form-control-static" data-display="startStationEndTime"> </p> |
| 649 | 653 | </div> |
| ... | ... | @@ -656,7 +660,9 @@ |
| 656 | 660 | <div class="form-group"> |
| 657 | 661 | <!-- 终点站首班时间 (* 必填项) START --> |
| 658 | 662 | <div class="col-md-6"> |
| 659 | - <label class="control-label col-md-5"> 终点站首班时间 : </label> | |
| 663 | + <label class="control-label col-md-5"> | |
| 664 | + <span class="required"> * </span> 终点站首班时间 : | |
| 665 | + </label> | |
| 660 | 666 | <div class="col-md-4"> |
| 661 | 667 | <p class="form-control-static" data-display="endStationFirstTime"> </p> |
| 662 | 668 | </div> |
| ... | ... | @@ -664,7 +670,9 @@ |
| 664 | 670 | <!-- 终点站首班时间 (* 必填项) END --> |
| 665 | 671 | <!-- 终点站末班时间 (* 必填项) START --> |
| 666 | 672 | <div class="col-md-6"> |
| 667 | - <label class="control-label col-md-5"> 终点站末班时间 : </label> | |
| 673 | + <label class="control-label col-md-5"> | |
| 674 | + <span class="required"> * </span> 终点站末班时间 : | |
| 675 | + </label> | |
| 668 | 676 | <div class="col-md-4"> |
| 669 | 677 | <p class="form-control-static" data-display="endStationEndTime"> </p> |
| 670 | 678 | </div> |
| ... | ... | @@ -677,7 +685,9 @@ |
| 677 | 685 | <div class="form-group"> |
| 678 | 686 | <!-- 早高峰开始时间(* 必填项) START --> |
| 679 | 687 | <div class="col-md-6"> |
| 680 | - <label class="control-label col-md-5"> 早高峰开始时间 : </label> | |
| 688 | + <label class="control-label col-md-5"> | |
| 689 | + <span class="required"> * </span> 早高峰开始时间 : | |
| 690 | + </label> | |
| 681 | 691 | <div class="col-md-4"> |
| 682 | 692 | <p class="form-control-static" data-display="earlyStartTime"> </p> |
| 683 | 693 | </div> |
| ... | ... | @@ -685,7 +695,9 @@ |
| 685 | 695 | <!-- 早高峰开始时间 (* 必填项) END --> |
| 686 | 696 | <!-- 早高峰结束时间 (* 必填项) START --> |
| 687 | 697 | <div class="col-md-6"> |
| 688 | - <label class="control-label col-md-5"> 早高峰结束时间 : </label> | |
| 698 | + <label class="control-label col-md-5"> | |
| 699 | + <span class="required"> * </span> 早高峰结束时间 : | |
| 700 | + </label> | |
| 689 | 701 | <div class="col-md-4"> |
| 690 | 702 | <p class="form-control-static" data-display="earlyEndTime"> </p> |
| 691 | 703 | </div> |
| ... | ... | @@ -698,7 +710,9 @@ |
| 698 | 710 | <div class="form-group"> |
| 699 | 711 | <!-- 晚高峰开始时间(* 必填项) START --> |
| 700 | 712 | <div class="col-md-6"> |
| 701 | - <label class="control-label col-md-5"> 晚高峰开始时间 : </label> | |
| 713 | + <label class="control-label col-md-5"> | |
| 714 | + <span class="required"> * </span> 晚高峰开始时间 : | |
| 715 | + </label> | |
| 702 | 716 | <div class="col-md-4"> |
| 703 | 717 | <p class="form-control-static" data-display="lateStartTime"> </p> |
| 704 | 718 | </div> |
| ... | ... | @@ -706,7 +720,9 @@ |
| 706 | 720 | <!-- 晚高峰开始时间(* 必填项) END --> |
| 707 | 721 | <!-- 晚高峰结束时间(* 必填项) START --> |
| 708 | 722 | <div class="col-md-6"> |
| 709 | - <label class="control-label col-md-5"> 晚高峰结束时间 : </label> | |
| 723 | + <label class="control-label col-md-5"> | |
| 724 | + <span class="required"> * </span> 晚高峰结束时间 : | |
| 725 | + </label> | |
| 710 | 726 | <div class="col-md-4"> |
| 711 | 727 | <p class="form-control-static" data-display="lateEndTime"> </p> |
| 712 | 728 | </div> |
| ... | ... | @@ -719,7 +735,9 @@ |
| 719 | 735 | <div class="form-group"> |
| 720 | 736 | <!-- 上行行驶时间(* 必填项) START --> |
| 721 | 737 | <div class="col-md-6"> |
| 722 | - <label class="control-label col-md-5"> 上行行驶时间 : </label> | |
| 738 | + <label class="control-label col-md-5"> | |
| 739 | + <span class="required"> * </span> 上行行驶时间 : | |
| 740 | + </label> | |
| 723 | 741 | <div class="col-md-4"> |
| 724 | 742 | <p class="form-control-static" data-display="upTravelTime"> </p> |
| 725 | 743 | </div> |
| ... | ... | @@ -727,7 +745,9 @@ |
| 727 | 745 | <!-- 上行行驶时间(* 必填项) END --> |
| 728 | 746 | <!-- 下行行驶时间(* 必填项) START --> |
| 729 | 747 | <div class="col-md-6"> |
| 730 | - <label class="control-label col-md-5"> 下行行驶时间 : </label> | |
| 748 | + <label class="control-label col-md-5"> | |
| 749 | + <span class="required"> * </span> 下行行驶时间 : | |
| 750 | + </label> | |
| 731 | 751 | <div class="col-md-4"> |
| 732 | 752 | <p class="form-control-static" data-display="downTravelTime"> </p> |
| 733 | 753 | </div> |
| ... | ... | @@ -740,7 +760,9 @@ |
| 740 | 760 | <div class="form-group"> |
| 741 | 761 | <!-- 上行行驶里程(* 必填项) START --> |
| 742 | 762 | <div class="col-md-6"> |
| 743 | - <label class="control-label col-md-5"> 上行行驶里程 : </label> | |
| 763 | + <label class="control-label col-md-5"> | |
| 764 | + <span class="required"> * </span> 上行行驶里程 : | |
| 765 | + </label> | |
| 744 | 766 | <div class="col-md-4"> |
| 745 | 767 | <p class="form-control-static" data-display="upMileage"> </p> |
| 746 | 768 | </div> |
| ... | ... | @@ -748,7 +770,9 @@ |
| 748 | 770 | <!-- 上行行驶里程(* 必填项) END--> |
| 749 | 771 | <!-- 下行行驶里程(* 必填项) START --> |
| 750 | 772 | <div class="col-md-6"> |
| 751 | - <label class="control-label col-md-5"> 下行行驶里程 : </label> | |
| 773 | + <label class="control-label col-md-5"> | |
| 774 | + <span class="required"> * </span> 下行行驶里程 : | |
| 775 | + </label> | |
| 752 | 776 | <div class="col-md-4"> |
| 753 | 777 | <p class="form-control-static" data-display="downMileage"> </p> |
| 754 | 778 | </div> |
| ... | ... | @@ -761,7 +785,9 @@ |
| 761 | 785 | <div class="form-group"> |
| 762 | 786 | <!-- 高峰上行停站时间(* 必填项) START --> |
| 763 | 787 | <div class="col-md-6"> |
| 764 | - <label class="control-label col-md-5"> 高峰上行停站时间: </label> | |
| 788 | + <label class="control-label col-md-5"> | |
| 789 | + <span class="required"> * </span> 高峰上行停站时间: | |
| 790 | + </label> | |
| 765 | 791 | <div class="col-md-4"> |
| 766 | 792 | <p class="form-control-static" data-display="gfupStopTime"> </p> |
| 767 | 793 | </div> |
| ... | ... | @@ -769,7 +795,9 @@ |
| 769 | 795 | <!-- 高峰上行停站时间(* 必填项) END --> |
| 770 | 796 | <!-- 高峰下行停站时间(* 必填项) START --> |
| 771 | 797 | <div class="col-md-6"> |
| 772 | - <label class="control-label col-md-5"> 高峰下行停站时间: </label> | |
| 798 | + <label class="control-label col-md-5"> | |
| 799 | + <span class="required"> * </span> 高峰下行停站时间: | |
| 800 | + </label> | |
| 773 | 801 | <div class="col-md-4"> |
| 774 | 802 | <p class="form-control-static" data-display="gfdownStopTime"> </p> |
| 775 | 803 | </div> |
| ... | ... | @@ -782,7 +810,9 @@ |
| 782 | 810 | <div class="form-group"> |
| 783 | 811 | <!-- 低谷上行停站时间(* 必填项) START --> |
| 784 | 812 | <div class="col-md-6"> |
| 785 | - <label class="control-label col-md-5"> 低谷上行停站时间: </label> | |
| 813 | + <label class="control-label col-md-5"> | |
| 814 | + <span class="required"> * </span> 低谷上行停站时间: | |
| 815 | + </label> | |
| 786 | 816 | <div class="col-md-4"> |
| 787 | 817 | <p class="form-control-static" data-display="dgupStopTime"> </p> |
| 788 | 818 | </div> |
| ... | ... | @@ -790,7 +820,9 @@ |
| 790 | 820 | <!-- 低谷上行停站时间(* 必填项) END --> |
| 791 | 821 | <!-- 低谷下行停站时间(* 必填项) START --> |
| 792 | 822 | <div class="col-md-6"> |
| 793 | - <label class="control-label col-md-5"> 低谷下行停站时间: </label> | |
| 823 | + <label class="control-label col-md-5"> | |
| 824 | + <span class="required"> * </span> 低谷下行停站时间: | |
| 825 | + </label> | |
| 794 | 826 | <div class="col-md-4"> |
| 795 | 827 | <p class="form-control-static" data-display="dgdownStopTime"> </p> |
| 796 | 828 | </div> |
| ... | ... | @@ -803,7 +835,9 @@ |
| 803 | 835 | <div class="form-group"> |
| 804 | 836 | <!-- 低谷最大发车间隙(* 必填项) START --> |
| 805 | 837 | <div class="col-md-6"> |
| 806 | - <label class="control-label col-md-5"> 低谷最大发车间隙: </label> | |
| 838 | + <label class="control-label col-md-5"> | |
| 839 | + <span class="required"> * </span> 低谷最大发车间隙: | |
| 840 | + </label> | |
| 807 | 841 | <div class="col-md-4"> |
| 808 | 842 | <p class="form-control-static" data-display="dgmaxfcjx"> </p> |
| 809 | 843 | </div> |
| ... | ... | @@ -812,7 +846,9 @@ |
| 812 | 846 | |
| 813 | 847 | <!-- 低谷最大停站时间(* 必填项) START --> |
| 814 | 848 | <div class="col-md-6"> |
| 815 | - <label class="control-label col-md-5"> 低谷最大停站时间: </label> | |
| 849 | + <label class="control-label col-md-5"> | |
| 850 | + <span class="required"> * </span> 低谷最大停站时间: | |
| 851 | + </label> | |
| 816 | 852 | <div class="col-md-4"> |
| 817 | 853 | <p class="form-control-static" data-display="dgmaxtzsj"> </p> |
| 818 | 854 | </div> |
| ... | ... | @@ -825,7 +861,9 @@ |
| 825 | 861 | <div class="form-group"> |
| 826 | 862 | <!-- 线路规划类型 (* 必填项) START --> |
| 827 | 863 | <div class="col-md-6"> |
| 828 | - <label class="control-label col-md-5"> 线路规划类型 : </label> | |
| 864 | + <label class="control-label col-md-5"> | |
| 865 | + <span class="required"> * </span> 线路规划类型 : | |
| 866 | + </label> | |
| 829 | 867 | <div class="col-md-4"> |
| 830 | 868 | <p class="form-control-static" data-display="linePlayType"> </p> |
| 831 | 869 | </div> |
| ... | ... | @@ -1076,7 +1114,9 @@ |
| 1076 | 1114 | <div class="form-group"> |
| 1077 | 1115 | <!-- 班型与人次 START --> |
| 1078 | 1116 | <div class="col-md-6"> |
| 1079 | - <label class="control-label col-md-5">班型/人次/车辆 :</label> | |
| 1117 | + <label class="control-label col-md-5"> | |
| 1118 | + <span class="required"> * </span> 班型/人次/车辆 : | |
| 1119 | + </label> | |
| 1080 | 1120 | <div class="col-md-4"> |
| 1081 | 1121 | <p class="form-control-static" data-display="bxrc"> </p> |
| 1082 | 1122 | </div> |
| ... | ... | @@ -1084,7 +1124,9 @@ |
| 1084 | 1124 | <!-- 班型与人次 END --> |
| 1085 | 1125 | <!-- 车辆总数 START --> |
| 1086 | 1126 | <div class="col-md-6"> |
| 1087 | - <label class="control-label col-md-5"> 车辆总数 :</label> | |
| 1127 | + <label class="control-label col-md-5"> | |
| 1128 | + <span class="required"> * </span> 车辆总数 : | |
| 1129 | + </label> | |
| 1088 | 1130 | <div class="col-md-4"> |
| 1089 | 1131 | <p class="form-control-static" data-display="clzs"> </p> |
| 1090 | 1132 | </div> | ... | ... |
src/main/resources/static/pages/excep/mhspeedingList.html
| ... | ... | @@ -263,7 +263,7 @@ $(function(){ |
| 263 | 263 | return; |
| 264 | 264 | } |
| 265 | 265 | var result = listResult[index]; |
| 266 | - new BMap.Geocoder().getLocation(new BMap.Point(result.lon,result.lat), function(rs){ | |
| 266 | + new BMap.Geocoder().getLocation(new BMap.Point(result.lon,result.lat), function(rs){ //根据坐标点查询文字位置。 | |
| 267 | 267 | var addComp = rs.addressComponents; |
| 268 | 268 | result.address = addComp.district+addComp.street+addComp.streetNumber; |
| 269 | 269 | f(); | ... | ... |
src/main/resources/static/pages/excep/speedingCount.html
src/main/resources/static/pages/excep/speedingList.html
src/main/resources/static/pages/excep/speedingMap.html
| ... | ... | @@ -26,15 +26,15 @@ |
| 26 | 26 | $(function(){ |
| 27 | 27 | var dataArr = window.localStorage.zbhAndDate.split(",");//获取页面传递过来的车辆自编号以及超速起始时间和超速结束时间 |
| 28 | 28 | localStorage.clear();//清楚前端缓存 |
| 29 | - var vehicle = dataArr[0]; | |
| 30 | - var startdate = dataArr[1]; | |
| 31 | - var enddate = dataArr[2]; | |
| 29 | + var vehicle = dataArr[0];//内部编码 | |
| 30 | + var startdate = dataArr[1];//开始时间 | |
| 31 | + var enddate = dataArr[2];//结束时间 | |
| 32 | 32 | var lon = dataArr[3];//起点经度 |
| 33 | 33 | var lat = dataArr[4];//起点纬度 |
| 34 | 34 | var endLon = dataArr[5];//终点经度 |
| 35 | 35 | var endLat = dataArr[6];//终点纬度 |
| 36 | - var lineid = dataArr[7]; | |
| 37 | - var directionData = dataArr[8]; | |
| 36 | + var lineid = dataArr[7];//线路ID | |
| 37 | + var directionData = dataArr[8];//线路方向 | |
| 38 | 38 | var pointObj;//坐标和速度组成的对象 |
| 39 | 39 | var Points = [];//坐标和速度对象的集合 |
| 40 | 40 | var coordinateArr = [];//坐标点数组 |
| ... | ... | @@ -57,7 +57,6 @@ $(function(){ |
| 57 | 57 | }); |
| 58 | 58 | setTimeout(function(){ |
| 59 | 59 | var map = BasicMap.init();//创建地图 |
| 60 | - debugger; | |
| 61 | 60 | $get('/sectionroute/findSection',{'line.id_eq' : lineid , 'directions_eq' :directionData},function(data) { |
| 62 | 61 | // 在地图上画出线路走向 |
| 63 | 62 | PublicFunctions.linePanlThree(lineid,data,directionData); | ... | ... |
src/main/resources/static/pages/permission/authorize_all/user_auth.html
| ... | ... | @@ -136,13 +136,13 @@ |
| 136 | 136 | <script> |
| 137 | 137 | (function () { |
| 138 | 138 | var wrap = '#user_authorize_wrap', user, xd_auth, all_lines,companyData; |
| 139 | - //分公司名称映射(只用于分组展示,就写死浦东的,其他区域不用分公司) | |
| 139 | + //分公司名称映射(只用于分组展示,就写死) | |
| 140 | 140 | var fgs_name_mapp={ |
| 141 | 141 | '55_3': '上南公司(六分公司)', '55_1': '上南公司(二分公司)', '55_2': '上南公司(三分公司)', '55_4': '上南公司(一分公司)', '55_5': '上南公司(培训部)', |
| 142 | 142 | '22_2': '金高公司(二分公司)', '22_1': '金高公司(四分公司)', '22_3': '金高公司(三分公司)', '22_5': '金高公司(一分公司)', |
| 143 | 143 | '26_3': '南汇公司(三分公司)', '26_2': '南汇公司(南汇二分)', '26_1': '南汇公司(南汇一分)', '26_4': '南汇公司(南汇维修公司)', '26_6': '南汇公司(航头枢纽站)', |
| 144 | 144 | '05_5': '杨高公司(杨高分公司)', '05_6': '杨高公司(周浦分公司)', '05_3': '杨高公司(芦潮港分公司)', '05_1': '杨高公司(川沙分公司)', '05_2': '杨高公司(金桥分公司)', |
| 145 | - '77_78': '闵行公司', '99_100': '青浦公交' | |
| 145 | + '77_78': '闵行公司', '99_100': '青浦公交','24_1': '一车队', '24_2': '二车队', '24_3': '三车队' | |
| 146 | 146 | }; |
| 147 | 147 | |
| 148 | 148 | var defauleConfig; | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/edit.html
| ... | ... | @@ -68,15 +68,16 @@ |
| 68 | 68 | <div class="col-md-3"> |
| 69 | 69 | <sa-Select5 name="gs" |
| 70 | 70 | model="ctrl.busInfoForSave" |
| 71 | - cmaps="{'businessCode': 'code', 'company': 'name'}" | |
| 71 | + cmaps="{'businessCode': 'businessCode', 'company': 'businessName'}" | |
| 72 | 72 | dcname="businessCode" |
| 73 | - icname="code" | |
| 74 | - dsparams="{{ {type: 'dic', param: 'gsType' } | json }}" | |
| 73 | + icname="businessCode" | |
| 74 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': '88' }, atype:'gs' } | json }}" | |
| 75 | 75 | iterobjname="item" |
| 76 | - iterobjexp="item.name" | |
| 77 | - searchph="请选择所属公司..." | |
| 78 | - searchexp="this.name" | |
| 79 | - required > | |
| 76 | + iterobjexp="item.businessName" | |
| 77 | + searchph="请选择所属分公司..." | |
| 78 | + searchexp="this.businessName" | |
| 79 | + required | |
| 80 | + > | |
| 80 | 81 | </sa-Select5> |
| 81 | 82 | |
| 82 | 83 | </div> |
| ... | ... | @@ -86,8 +87,8 @@ |
| 86 | 87 | </div> |
| 87 | 88 | </div> |
| 88 | 89 | |
| 89 | - <div class="form-group"> | |
| 90 | - <label class="col-md-2 control-label">分公司:</label> | |
| 90 | + <div class="form-group has-success has-feedback"> | |
| 91 | + <label class="col-md-2 control-label">分公司*:</label> | |
| 91 | 92 | <div class="col-md-3"> |
| 92 | 93 | <sa-Select5 name="fgs" |
| 93 | 94 | model="ctrl.busInfoForSave" |
| ... | ... | @@ -99,9 +100,14 @@ |
| 99 | 100 | iterobjexp="item.businessName" |
| 100 | 101 | searchph="请选择所属分公司..." |
| 101 | 102 | searchexp="this.businessName" |
| 103 | + required | |
| 102 | 104 | > |
| 103 | 105 | </sa-Select5> |
| 104 | 106 | </div> |
| 107 | + <!-- 隐藏块,显示验证信息 --> | |
| 108 | + <div class="alert alert-danger well-sm" ng-show="myForm.fgs.$error.required"> | |
| 109 | + 分公司也必须选择 | |
| 110 | + </div> | |
| 105 | 111 | </div> |
| 106 | 112 | |
| 107 | 113 | <div class="form-group has-success has-feedback"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/form.html
| ... | ... | @@ -68,15 +68,16 @@ |
| 68 | 68 | <div class="col-md-3"> |
| 69 | 69 | <sa-Select5 name="gs" |
| 70 | 70 | model="ctrl.busInfoForSave" |
| 71 | - cmaps="{'businessCode': 'code', 'company': 'name'}" | |
| 71 | + cmaps="{'businessCode': 'businessCode', 'company': 'businessName'}" | |
| 72 | 72 | dcname="businessCode" |
| 73 | - icname="code" | |
| 74 | - dsparams="{{ {type: 'dic', param: 'gsType' } | json }}" | |
| 73 | + icname="businessCode" | |
| 74 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': '88' }, atype:'gs' } | json }}" | |
| 75 | 75 | iterobjname="item" |
| 76 | - iterobjexp="item.name" | |
| 77 | - searchph="请选择所属公司..." | |
| 78 | - searchexp="this.name" | |
| 79 | - required > | |
| 76 | + iterobjexp="item.businessName" | |
| 77 | + searchph="请选择所属分公司..." | |
| 78 | + searchexp="this.businessName" | |
| 79 | + required | |
| 80 | + > | |
| 80 | 81 | </sa-Select5> |
| 81 | 82 | |
| 82 | 83 | </div> |
| ... | ... | @@ -86,8 +87,8 @@ |
| 86 | 87 | </div> |
| 87 | 88 | </div> |
| 88 | 89 | |
| 89 | - <div class="form-group"> | |
| 90 | - <label class="col-md-2 control-label">分公司:</label> | |
| 90 | + <div class="form-group has-success has-feedback"> | |
| 91 | + <label class="col-md-2 control-label">分公司*:</label> | |
| 91 | 92 | <div class="col-md-3"> |
| 92 | 93 | <sa-Select5 name="fgs" |
| 93 | 94 | model="ctrl.busInfoForSave" |
| ... | ... | @@ -99,10 +100,15 @@ |
| 99 | 100 | iterobjexp="item.businessName" |
| 100 | 101 | searchph="请选择所属分公司..." |
| 101 | 102 | searchexp="this.businessName" |
| 103 | + required | |
| 102 | 104 | > |
| 103 | 105 | </sa-Select5> |
| 104 | 106 | |
| 105 | 107 | </div> |
| 108 | + <!-- 隐藏块,显示验证信息 --> | |
| 109 | + <div class="alert alert-danger well-sm" ng-show="myForm.fgs.$error.required"> | |
| 110 | + 分公司也必须选择 | |
| 111 | + </div> | |
| 106 | 112 | </div> |
| 107 | 113 | |
| 108 | 114 | <div class="form-group has-success has-feedback"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/list.html
| 1 | 1 | <!-- ui-route busInfoManage.list --> |
| 2 | 2 | <div ng-controller="BusInfoManageListCtrl as ctrl"> |
| 3 | 3 | <div class="fixDiv"> |
| 4 | - <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> | |
| 4 | + <table class="table fixTable table-striped table-bordered table-hover table-checkable order-column"> | |
| 5 | 5 | <thead> |
| 6 | 6 | <tr role="row" class="heading"> |
| 7 | - <th style="width: 50px;">序号</th> | |
| 8 | - <th style="width: 130px;">车辆编号</th> | |
| 9 | - <th style="width: 130px;">内部编号</th> | |
| 10 | - <th style="width: 130px;">设备编号</th> | |
| 11 | - <th style="width: 130px;">车牌号</th> | |
| 7 | + <th style="width:70px;">序号</th> | |
| 8 | + <th style="width: 120px;">车辆编号</th> | |
| 9 | + <th style="width: 120px;">内部编号</th> | |
| 10 | + <th style="width: 120px;">设备编号</th> | |
| 11 | + <th style="width: 120px;">车牌号</th> | |
| 12 | 12 | <th style="width: 150px;">所在公司</th> |
| 13 | - <th style="width: 100px;">所在分公司</th> | |
| 14 | - <th style="width: 80px">是否电车</th> | |
| 13 | + <th style="width: 160px;">所在分公司</th> | |
| 14 | + <th style="width: 60px">电车</th> | |
| 15 | 15 | <th style="width: 100%">操作</th> |
| 16 | 16 | </tr> |
| 17 | 17 | <tr role="row" class="filter"> |
| ... | ... | @@ -29,23 +29,34 @@ |
| 29 | 29 | <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition().carPlate_like" placeholder="输入车牌号..."/> |
| 30 | 30 | </td> |
| 31 | 31 | <td> |
| 32 | - <div> | |
| 33 | - <sa-Select5 name="gs" | |
| 34 | - model="ctrl.searchCondition()" | |
| 35 | - cmaps="{'businessCode_eq': 'code'}" | |
| 36 | - dcname="businessCode_eq" | |
| 37 | - icname="code" | |
| 38 | - dsparams="{{ {type: 'dic', param: 'gsType' } | json }}" | |
| 39 | - iterobjname="item" | |
| 40 | - iterobjexp="item.name" | |
| 41 | - searchph="选择公司..." | |
| 42 | - searchexp="this.name" | |
| 43 | - > | |
| 44 | - </sa-Select5> | |
| 45 | - </div> | |
| 46 | - </td> | |
| 47 | - <td> | |
| 48 | - | |
| 32 | + <sa-Select5 name="gs" | |
| 33 | + model="ctrl.searchCondition()" | |
| 34 | + cmaps="{'businessCode_eq': 'businessCode'}" | |
| 35 | + dcname="businessCode_eq" | |
| 36 | + icname="businessCode" | |
| 37 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': '88' }, atype:'gs' } | json }}" | |
| 38 | + iterobjname="item" | |
| 39 | + iterobjexp="item.businessName" | |
| 40 | + searchph="请输拼音..." | |
| 41 | + searchexp="this.businessName" | |
| 42 | + required | |
| 43 | + > | |
| 44 | + </sa-Select5> | |
| 45 | + </td> | |
| 46 | + <td> | |
| 47 | + <sa-Select5 name="fgs" | |
| 48 | + model="ctrl.searchCondition()" | |
| 49 | + cmaps="{'brancheCompanyCode_eq': 'businessCode'}" | |
| 50 | + dcname="brancheCompanyCode_eq" | |
| 51 | + icname="businessCode" | |
| 52 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': ctrl.searchCondition().businessCode_eq }, atype:'gs' } | json }}" | |
| 53 | + iterobjname="item" | |
| 54 | + iterobjexp="item.businessName" | |
| 55 | + searchph="请输拼音..." | |
| 56 | + searchexp="this.businessName" | |
| 57 | + required | |
| 58 | + > | |
| 59 | + </sa-Select5> | |
| 49 | 60 | </td> |
| 50 | 61 | <td> |
| 51 | 62 | |
| ... | ... | @@ -65,7 +76,17 @@ |
| 65 | 76 | <tbody> |
| 66 | 77 | <tr ng-repeat="info in ctrl.page()['content']" class="odd gradeX"> |
| 67 | 78 | <td> |
| 68 | - <span ng-bind="$index + 1"></span> | |
| 79 | + <div> | |
| 80 | + <a href="#" | |
| 81 | + tooltip-animation="false" | |
| 82 | + tooltip-placement="top" | |
| 83 | + uib-tooltip="{{'公司/编号:' + info.company + '/' + info.insideCode}}" | |
| 84 | + tooltip-class="headClass"> | |
| 85 | + | |
| 86 | + <i class="fa fa-list-ol" aria-hidden="true"></i> | |
| 87 | + {{$index + ctrl.page().number * 10 + 1}} | |
| 88 | + </a> | |
| 89 | + </div> | |
| 69 | 90 | </td> |
| 70 | 91 | <td> |
| 71 | 92 | <span ng-bind="info.carCode"></span> |
| ... | ... | @@ -93,24 +114,34 @@ |
| 93 | 114 | <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>--> |
| 94 | 115 | <a ui-sref="busInfoManage_detail({id: info.id})" class="btn btn-info btn-sm"> 详细 </a> |
| 95 | 116 | <a ui-sref="busInfoManage_edit({id: info.id})" class="btn btn-info btn-sm"> 修改 </a> |
| 117 | + <a sweetalert | |
| 118 | + sweet-options="{title: '是否删除车辆信息?',text: '内部编码:' + info.insideCode + '</br>如果有车辆配置信息关联,会报错,建议不要随便删除!', html: true,type: 'warning',showCancelButton: true,confirmButtonColor: '#DD6B55',confirmButtonText: '是',cancelButtonText: '取消'}" | |
| 119 | + sweet-on-confirm="ctrl.deleteCar(info.id)" | |
| 120 | + class="btn btn-danger btn-sm">删除</a> | |
| 96 | 121 | </td> |
| 97 | 122 | </tr> |
| 98 | 123 | </tbody> |
| 99 | - | |
| 100 | 124 | </table> |
| 101 | 125 | </div> |
| 102 | 126 | |
| 103 | - <div style="text-align: right;"> | |
| 104 | - <uib-pagination total-items="ctrl.page()['totalElements']" | |
| 105 | - ng-model="ctrl.page()['uiNumber']" | |
| 106 | - ng-change="ctrl.doPage()" | |
| 107 | - rotate="false" | |
| 108 | - max-size="10" | |
| 109 | - boundary-links="true" | |
| 110 | - first-text="首页" | |
| 111 | - previous-text="上一页" | |
| 112 | - next-text="下一页" | |
| 113 | - last-text="尾页"> | |
| 114 | - </uib-pagination> | |
| 127 | + <div class="pageBar"> | |
| 128 | + <div class="pageBarLeft"> | |
| 129 | + {{'显示从' + ctrl.page()['uiFromRecord'] + '到' + ctrl.page()['uiToRecord'] + ' 共' + ctrl.page()['totalElements'] + '条' + ' 每页显示10条'}} | |
| 130 | + </div> | |
| 131 | + | |
| 132 | + <div class="pageBarRight"> | |
| 133 | + <uib-pagination total-items="ctrl.page()['totalElements']" | |
| 134 | + ng-model="ctrl.page()['uiNumber']" | |
| 135 | + ng-change="ctrl.doPage()" | |
| 136 | + rotate="false" | |
| 137 | + max-size="10" | |
| 138 | + boundary-links="true" | |
| 139 | + first-text="首页" | |
| 140 | + previous-text="上一页" | |
| 141 | + next-text="下一页" | |
| 142 | + last-text="尾页"> | |
| 143 | + </uib-pagination> | |
| 144 | + </div> | |
| 115 | 145 | </div> |
| 146 | + | |
| 116 | 147 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/module.js
| ... | ... | @@ -21,7 +21,9 @@ angular.module('ScheduleApp').factory( |
| 21 | 21 | number: 0, // 后台返回的页码,spring返回从0开始 |
| 22 | 22 | content: [], |
| 23 | 23 | |
| 24 | - uiNumber: 1 // 页面绑定的页码 | |
| 24 | + uiNumber: 1, // 页面绑定的页码 | |
| 25 | + uiFromRecord: 0, // 页面绑定,当前页第几条记录 | |
| 26 | + uiToRecord: 0 // 页面绑定,当前页到第几条记录 | |
| 25 | 27 | }; |
| 26 | 28 | |
| 27 | 29 | // 查询对象 |
| ... | ... | @@ -54,6 +56,12 @@ angular.module('ScheduleApp').factory( |
| 54 | 56 | currentPage.totalElements = page.totalElements; |
| 55 | 57 | currentPage.number = page.number; |
| 56 | 58 | currentPage.content = page.content; |
| 59 | + | |
| 60 | + // 计算当前页开始记录,结束记录 | |
| 61 | + if (page.numberOfElements && page.numberOfElements > 0) { | |
| 62 | + currentPage.uiFromRecord = page.number * 10 + 1; | |
| 63 | + currentPage.uiToRecord = page.number * 10 + page.numberOfElements; | |
| 64 | + } | |
| 57 | 65 | } |
| 58 | 66 | return currentPage; |
| 59 | 67 | }, |
| ... | ... | @@ -63,7 +71,9 @@ angular.module('ScheduleApp').factory( |
| 63 | 71 | totalElements: 0, |
| 64 | 72 | number: 0, |
| 65 | 73 | content: [], |
| 66 | - uiNumber: 1 | |
| 74 | + uiNumber: 1, | |
| 75 | + uiFromRecord: 0, | |
| 76 | + uiToRecord: 0 | |
| 67 | 77 | }; |
| 68 | 78 | }, |
| 69 | 79 | |
| ... | ... | @@ -72,7 +82,13 @@ angular.module('ScheduleApp').factory( |
| 72 | 82 | * @returns {*|Function|promise|n} |
| 73 | 83 | */ |
| 74 | 84 | dataExport: function() { |
| 75 | - return service.dataTools.dataExport().$promise; | |
| 85 | + if (UserPrincipal.getGsStrsQuery().length > 0) { | |
| 86 | + return service.dataTools.dataExport( | |
| 87 | + {'cgsbm_in': UserPrincipal.getGsStrsQuery().join(",")} | |
| 88 | + ).$promise; | |
| 89 | + } else { | |
| 90 | + return null; | |
| 91 | + } | |
| 76 | 92 | } |
| 77 | 93 | }; |
| 78 | 94 | |
| ... | ... | @@ -125,14 +141,18 @@ angular.module('ScheduleApp').controller( |
| 125 | 141 | |
| 126 | 142 | // 导出excel |
| 127 | 143 | self.exportData = function() { |
| 128 | - busInfoManageService.dataExport().then( | |
| 129 | - function(result) { | |
| 130 | - fileDownload.downloadFile(result.data, "application/octet-stream", "车辆基础信息.xls"); | |
| 131 | - }, | |
| 132 | - function(result) { | |
| 133 | - console.log("exportData failed:" + result); | |
| 134 | - } | |
| 135 | - ); | |
| 144 | + var p = busInfoManageService.dataExport(); | |
| 145 | + if (p) { | |
| 146 | + p.then( | |
| 147 | + function(result) { | |
| 148 | + fileDownload.downloadFile(result.data, "application/octet-stream", "车辆基础信息.xls"); | |
| 149 | + }, | |
| 150 | + function(result) { | |
| 151 | + console.log("exportData failed:" + result); | |
| 152 | + } | |
| 153 | + ); | |
| 154 | + } | |
| 155 | + | |
| 136 | 156 | }; |
| 137 | 157 | } |
| 138 | 158 | ] |
| ... | ... | @@ -217,6 +237,16 @@ angular.module('ScheduleApp').controller( |
| 217 | 237 | }); |
| 218 | 238 | }; |
| 219 | 239 | |
| 240 | + self.deleteCar = function(id) { | |
| 241 | + Cars.delete({id: id}, function(result) { | |
| 242 | + if (result.msg) { // 暂时这样做,之后全局拦截 | |
| 243 | + alert("失败:" + result.msg); | |
| 244 | + } else { | |
| 245 | + self.doPage(); | |
| 246 | + } | |
| 247 | + }); | |
| 248 | + }; | |
| 249 | + | |
| 220 | 250 | self.doPage(); |
| 221 | 251 | } |
| 222 | 252 | ] | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> |
| 5 | 5 | <thead> |
| 6 | 6 | <tr role="row" class="heading"> |
| 7 | - <th style="width: 40pt;">序号</th> | |
| 7 | + <th style="width: 70px;">序号</th> | |
| 8 | 8 | <th style="width: 15%;">线路名称</th> |
| 9 | 9 | <th style="width: 10%;">内部编号</th> |
| 10 | 10 | <th style="width: 100px;">启用日期</th> |
| ... | ... | @@ -57,7 +57,12 @@ |
| 57 | 57 | <tbody> |
| 58 | 58 | <tr ng-repeat="info in ctrl.page()['content']" ng-class="{odd: true, gradeX: true, danger: info.isCancel}"> |
| 59 | 59 | <td> |
| 60 | - <span ng-bind="$index + 1"></span> | |
| 60 | + <div> | |
| 61 | + <a href="#"> | |
| 62 | + <i class="fa fa-list-ol" aria-hidden="true"></i> | |
| 63 | + {{$index + ctrl.page().number * 10 + 1}} | |
| 64 | + </a> | |
| 65 | + </div> | |
| 61 | 66 | </td> |
| 62 | 67 | <td> |
| 63 | 68 | <span ng-bind="info.xlName"></span> |
| ... | ... | @@ -110,17 +115,23 @@ |
| 110 | 115 | </table> |
| 111 | 116 | </div> |
| 112 | 117 | |
| 113 | - <div style="text-align: right;"> | |
| 114 | - <uib-pagination total-items="ctrl.page()['totalElements']" | |
| 115 | - ng-model="ctrl.page()['uiNumber']" | |
| 116 | - ng-change="ctrl.doPage()" | |
| 117 | - rotate="false" | |
| 118 | - max-size="10" | |
| 119 | - boundary-links="true" | |
| 120 | - first-text="首页" | |
| 121 | - previous-text="上一页" | |
| 122 | - next-text="下一页" | |
| 123 | - last-text="尾页"> | |
| 124 | - </uib-pagination> | |
| 118 | + <div class="pageBar"> | |
| 119 | + <div class="pageBarLeft"> | |
| 120 | + {{'显示从' + ctrl.page()['uiFromRecord'] + '到' + ctrl.page()['uiToRecord'] + ' 共' + ctrl.page()['totalElements'] + '条' + ' 每页显示10条'}} | |
| 121 | + </div> | |
| 122 | + | |
| 123 | + <div class="pageBarRight"> | |
| 124 | + <uib-pagination total-items="ctrl.page()['totalElements']" | |
| 125 | + ng-model="ctrl.page()['uiNumber']" | |
| 126 | + ng-change="ctrl.doPage()" | |
| 127 | + rotate="false" | |
| 128 | + max-size="10" | |
| 129 | + boundary-links="true" | |
| 130 | + first-text="首页" | |
| 131 | + previous-text="上一页" | |
| 132 | + next-text="下一页" | |
| 133 | + last-text="尾页"> | |
| 134 | + </uib-pagination> | |
| 135 | + </div> | |
| 125 | 136 | </div> |
| 126 | 137 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/module.js
| ... | ... | @@ -15,7 +15,9 @@ angular.module('ScheduleApp').factory( |
| 15 | 15 | number: 0, // 后台返回的页码,spring返回从0开始 |
| 16 | 16 | content: [], |
| 17 | 17 | |
| 18 | - uiNumber: 1 // 页面绑定的页码 | |
| 18 | + uiNumber: 1, // 页面绑定的页码 | |
| 19 | + uiFromRecord: 0, // 页面绑定,当前页第几条记录 | |
| 20 | + uiToRecord: 0 // 页面绑定,当前页到第几条记录 | |
| 19 | 21 | }; |
| 20 | 22 | |
| 21 | 23 | // 查询对象 |
| ... | ... | @@ -39,6 +41,12 @@ angular.module('ScheduleApp').factory( |
| 39 | 41 | currentPage.totalElements = page.totalElements; |
| 40 | 42 | currentPage.number = page.number; |
| 41 | 43 | currentPage.content = page.content; |
| 44 | + | |
| 45 | + // 计算当前页开始记录,结束记录 | |
| 46 | + if (page.numberOfElements && page.numberOfElements > 0) { | |
| 47 | + currentPage.uiFromRecord = page.number * 10 + 1; | |
| 48 | + currentPage.uiToRecord = page.number * 10 + page.numberOfElements; | |
| 49 | + } | |
| 42 | 50 | } |
| 43 | 51 | return currentPage; |
| 44 | 52 | }, |
| ... | ... | @@ -48,7 +56,9 @@ angular.module('ScheduleApp').factory( |
| 48 | 56 | totalElements: 0, |
| 49 | 57 | number: 0, |
| 50 | 58 | content: [], |
| 51 | - uiNumber: 1 | |
| 59 | + uiNumber: 1, | |
| 60 | + uiFromRecord: 0, | |
| 61 | + uiToRecord: 0 | |
| 52 | 62 | }; |
| 53 | 63 | } |
| 54 | 64 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html
| ... | ... | @@ -38,15 +38,16 @@ |
| 38 | 38 | <div class="col-md-3"> |
| 39 | 39 | <sa-Select5 name="gs" |
| 40 | 40 | model="ctrl.employeeInfoForSave" |
| 41 | - cmaps="{'companyCode': 'code', 'company': 'name'}" | |
| 41 | + cmaps="{'companyCode': 'businessCode', 'brancheCompany': 'businessName'}" | |
| 42 | 42 | dcname="companyCode" |
| 43 | - icname="code" | |
| 44 | - dsparams="{{ {type: 'dic', param: 'gsType' } | json }}" | |
| 43 | + icname="businessCode" | |
| 44 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': '88' }, atype:'gs' } | json }}" | |
| 45 | 45 | iterobjname="item" |
| 46 | - iterobjexp="item.name" | |
| 47 | - searchph="请输拼音..." | |
| 48 | - searchexp="this.name" | |
| 49 | - required > | |
| 46 | + iterobjexp="item.businessName" | |
| 47 | + searchph="请选择所属分公司..." | |
| 48 | + searchexp="this.businessName" | |
| 49 | + required | |
| 50 | + > | |
| 50 | 51 | </sa-Select5> |
| 51 | 52 | </div> |
| 52 | 53 | <!-- 隐藏块,显示验证信息 --> |
| ... | ... | @@ -55,8 +56,8 @@ |
| 55 | 56 | </div> |
| 56 | 57 | </div> |
| 57 | 58 | |
| 58 | - <div class="form-group"> | |
| 59 | - <label class="col-md-2 control-label">分公司:</label> | |
| 59 | + <div class="form-group has-success has-feedback"> | |
| 60 | + <label class="col-md-2 control-label">分公司*:</label> | |
| 60 | 61 | <div class="col-md-3"> |
| 61 | 62 | <sa-Select5 name="fgs" |
| 62 | 63 | model="ctrl.employeeInfoForSave" |
| ... | ... | @@ -68,17 +69,23 @@ |
| 68 | 69 | iterobjexp="item.businessName" |
| 69 | 70 | searchph="请选择所属分公司..." |
| 70 | 71 | searchexp="this.businessName" |
| 72 | + required | |
| 71 | 73 | > |
| 72 | 74 | </sa-Select5> |
| 73 | 75 | |
| 74 | 76 | </div> |
| 77 | + | |
| 78 | + <!-- 隐藏块,显示验证信息 --> | |
| 79 | + <div class="alert alert-danger well-sm" ng-show="myForm.fgs.$error.required"> | |
| 80 | + 分公司也必须选择 | |
| 81 | + </div> | |
| 75 | 82 | </div> |
| 76 | 83 | |
| 77 | 84 | <div class="form-group has-success has-feedback"> |
| 78 | 85 | <label class="col-md-2 control-label">工号*:</label> |
| 79 | 86 | <div class="col-md-3"> |
| 80 | 87 | <input type="text" class="form-control" |
| 81 | - name="jobCode" ng-model="ctrl.employeeInfoForSave.jobCode" | |
| 88 | + name="jobCode" ng-model="ctrl.employeeInfoForSave.jobCodeori" | |
| 82 | 89 | required placeholder="请输入工号" |
| 83 | 90 | remote-Validation |
| 84 | 91 | remotevtype="ee_gh" |
| ... | ... | @@ -147,6 +154,17 @@ |
| 147 | 154 | </div> |
| 148 | 155 | </div> |
| 149 | 156 | |
| 157 | + <div class="form-group"> | |
| 158 | + <label class="col-md-2 control-label">备注:</label> | |
| 159 | + <div class="col-md-3"> | |
| 160 | + <textarea class="form-control" | |
| 161 | + ng-model="ctrl.employeeInfoForSave.remark" | |
| 162 | + > | |
| 163 | + </textarea> | |
| 164 | + </div> | |
| 165 | + | |
| 166 | + </div> | |
| 167 | + | |
| 150 | 168 | <!-- 其他form-group --> |
| 151 | 169 | |
| 152 | 170 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html
| ... | ... | @@ -38,15 +38,16 @@ |
| 38 | 38 | <div class="col-md-3"> |
| 39 | 39 | <sa-Select5 name="gs" |
| 40 | 40 | model="ctrl.employeeInfoForSave" |
| 41 | - cmaps="{'companyCode': 'code', 'company': 'name'}" | |
| 41 | + cmaps="{'companyCode': 'businessCode', 'brancheCompany': 'businessName'}" | |
| 42 | 42 | dcname="companyCode" |
| 43 | - icname="code" | |
| 44 | - dsparams="{{ {type: 'dic', param: 'gsType' } | json }}" | |
| 43 | + icname="businessCode" | |
| 44 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': '88' }, atype:'gs' } | json }}" | |
| 45 | 45 | iterobjname="item" |
| 46 | - iterobjexp="item.name" | |
| 47 | - searchph="请输拼音..." | |
| 48 | - searchexp="this.name" | |
| 49 | - required > | |
| 46 | + iterobjexp="item.businessName" | |
| 47 | + searchph="请选择所属分公司..." | |
| 48 | + searchexp="this.businessName" | |
| 49 | + required | |
| 50 | + > | |
| 50 | 51 | </sa-Select5> |
| 51 | 52 | </div> |
| 52 | 53 | <!-- 隐藏块,显示验证信息 --> |
| ... | ... | @@ -55,8 +56,8 @@ |
| 55 | 56 | </div> |
| 56 | 57 | </div> |
| 57 | 58 | |
| 58 | - <div class="form-group"> | |
| 59 | - <label class="col-md-2 control-label">分公司:</label> | |
| 59 | + <div class="form-group has-success has-feedback"> | |
| 60 | + <label class="col-md-2 control-label">分公司*:</label> | |
| 60 | 61 | <div class="col-md-3"> |
| 61 | 62 | <sa-Select5 name="fgs" |
| 62 | 63 | model="ctrl.employeeInfoForSave" |
| ... | ... | @@ -68,17 +69,22 @@ |
| 68 | 69 | iterobjexp="item.businessName" |
| 69 | 70 | searchph="请选择所属分公司..." |
| 70 | 71 | searchexp="this.businessName" |
| 72 | + required | |
| 71 | 73 | > |
| 72 | 74 | </sa-Select5> |
| 73 | 75 | |
| 74 | 76 | </div> |
| 77 | + <!-- 隐藏块,显示验证信息 --> | |
| 78 | + <div class="alert alert-danger well-sm" ng-show="myForm.fgs.$error.required"> | |
| 79 | + 分公司也必须选择 | |
| 80 | + </div> | |
| 75 | 81 | </div> |
| 76 | 82 | |
| 77 | 83 | <div class="form-group has-success has-feedback"> |
| 78 | 84 | <label class="col-md-2 control-label">工号*:</label> |
| 79 | 85 | <div class="col-md-3"> |
| 80 | 86 | <input type="text" class="form-control" |
| 81 | - name="jobCode" ng-model="ctrl.employeeInfoForSave.jobCode" | |
| 87 | + name="jobCode" ng-model="ctrl.employeeInfoForSave.jobCodeori" | |
| 82 | 88 | required placeholder="请输入工号" |
| 83 | 89 | remote-Validation |
| 84 | 90 | remotevtype="ee_gh" |
| ... | ... | @@ -147,6 +153,17 @@ |
| 147 | 153 | </div> |
| 148 | 154 | </div> |
| 149 | 155 | |
| 156 | + <div class="form-group"> | |
| 157 | + <label class="col-md-2 control-label">备注:</label> | |
| 158 | + <div class="col-md-3"> | |
| 159 | + <textarea class="form-control" | |
| 160 | + ng-model="ctrl.employeeInfoForSave.remark" | |
| 161 | + > | |
| 162 | + </textarea> | |
| 163 | + </div> | |
| 164 | + | |
| 165 | + </div> | |
| 166 | + | |
| 150 | 167 | <!-- 其他form-group --> |
| 151 | 168 | |
| 152 | 169 | </div> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
| ... | ... | @@ -4,9 +4,9 @@ |
| 4 | 4 | <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column"> |
| 5 | 5 | <thead> |
| 6 | 6 | <tr role="row" class="heading"> |
| 7 | - <th style="width: 50px;">序号</th> | |
| 7 | + <th style="width:70px;">序号</th> | |
| 8 | 8 | <th style="width: 130px;">姓名</th> |
| 9 | - <th style="width: 130px;">工号</th> | |
| 9 | + <th style="width: 130px;">员工编号</th> | |
| 10 | 10 | <th style="width: 5%;">性别</th> |
| 11 | 11 | <th style="width: 15%;">所在公司</th> |
| 12 | 12 | <th >分公司</th> |
| ... | ... | @@ -25,22 +25,34 @@ |
| 25 | 25 | <td> |
| 26 | 26 | </td> |
| 27 | 27 | <td> |
| 28 | - <div> | |
| 29 | - <sa-Select5 name="gs" | |
| 30 | - model="ctrl.searchCondition()" | |
| 31 | - cmaps="{'companyCode_eq': 'code'}" | |
| 32 | - dcname="companyCode_eq" | |
| 33 | - icname="code" | |
| 34 | - dsparams="{{ {type: 'dic', param: 'gsType' } | json }}" | |
| 35 | - iterobjname="item" | |
| 36 | - iterobjexp="item.name" | |
| 37 | - searchph="请输拼音..." | |
| 38 | - searchexp="this.name" | |
| 39 | - > | |
| 40 | - </sa-Select5> | |
| 41 | - </div> | |
| 28 | + <sa-Select5 name="gs" | |
| 29 | + model="ctrl.searchCondition()" | |
| 30 | + cmaps="{'companyCode_eq': 'businessCode'}" | |
| 31 | + dcname="companyCode_eq" | |
| 32 | + icname="businessCode" | |
| 33 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': '88' }, atype:'gs' } | json }}" | |
| 34 | + iterobjname="item" | |
| 35 | + iterobjexp="item.businessName" | |
| 36 | + searchph="请输拼音..." | |
| 37 | + searchexp="this.businessName" | |
| 38 | + required | |
| 39 | + > | |
| 40 | + </sa-Select5> | |
| 42 | 41 | </td> |
| 43 | 42 | <td> |
| 43 | + <sa-Select5 name="fgs" | |
| 44 | + model="ctrl.searchCondition()" | |
| 45 | + cmaps="{'brancheCompanyCode_eq': 'businessCode'}" | |
| 46 | + dcname="brancheCompanyCode_eq" | |
| 47 | + icname="businessCode" | |
| 48 | + dsparams="{{ {type: 'ajax', param:{'upCode_eq': ctrl.searchCondition().companyCode_eq }, atype:'gs' } | json }}" | |
| 49 | + iterobjname="item" | |
| 50 | + iterobjexp="item.businessName" | |
| 51 | + searchph="请输拼音..." | |
| 52 | + searchexp="this.businessName" | |
| 53 | + required | |
| 54 | + > | |
| 55 | + </sa-Select5> | |
| 44 | 56 | </td> |
| 45 | 57 | <td> |
| 46 | 58 | <div> |
| ... | ... | @@ -76,7 +88,18 @@ |
| 76 | 88 | <tbody> |
| 77 | 89 | <tr ng-repeat="info in ctrl.page()['content']" class="odd gradeX"> |
| 78 | 90 | <td> |
| 79 | - <span ng-bind="$index + 1"></span> | |
| 91 | + <div> | |
| 92 | + <a href="#" | |
| 93 | + tooltip-animation="false" | |
| 94 | + tooltip-placement="top" | |
| 95 | + uib-tooltip="{{'姓名/工号:' + info.personnelName + '/' + info.jobCodeori}}" | |
| 96 | + tooltip-class="headClass"> | |
| 97 | + | |
| 98 | + <i class="fa fa-list-ol" aria-hidden="true"></i> | |
| 99 | + {{$index + ctrl.page().number * 10 + 1}} | |
| 100 | + </a> | |
| 101 | + </div> | |
| 102 | + | |
| 80 | 103 | </td> |
| 81 | 104 | <td> |
| 82 | 105 | <span ng-bind="info.personnelName"></span> |
| ... | ... | @@ -123,18 +146,23 @@ |
| 123 | 146 | </table> |
| 124 | 147 | </div> |
| 125 | 148 | |
| 149 | + <div class="pageBar"> | |
| 150 | + <div class="pageBarLeft"> | |
| 151 | + {{'显示从' + ctrl.page()['uiFromRecord'] + '到' + ctrl.page()['uiToRecord'] + ' 共' + ctrl.page()['totalElements'] + '条' + ' 每页显示10条'}} | |
| 152 | + </div> | |
| 126 | 153 | |
| 127 | - <div style="text-align: right;"> | |
| 128 | - <uib-pagination total-items="ctrl.page()['totalElements']" | |
| 129 | - ng-model="ctrl.page()['uiNumber']" | |
| 130 | - ng-change="ctrl.doPage()" | |
| 131 | - rotate="false" | |
| 132 | - max-size="10" | |
| 133 | - boundary-links="true" | |
| 134 | - first-text="首页" | |
| 135 | - previous-text="上一页" | |
| 136 | - next-text="下一页" | |
| 137 | - last-text="尾页"> | |
| 138 | - </uib-pagination> | |
| 154 | + <div class="pageBarRight"> | |
| 155 | + <uib-pagination total-items="ctrl.page()['totalElements']" | |
| 156 | + ng-model="ctrl.page()['uiNumber']" | |
| 157 | + ng-change="ctrl.doPage()" | |
| 158 | + rotate="false" | |
| 159 | + max-size="10" | |
| 160 | + boundary-links="true" | |
| 161 | + first-text="首页" | |
| 162 | + previous-text="上一页" | |
| 163 | + next-text="下一页" | |
| 164 | + last-text="尾页"> | |
| 165 | + </uib-pagination> | |
| 166 | + </div> | |
| 139 | 167 | </div> |
| 140 | 168 | </div> |
| 141 | 169 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/module.js
| ... | ... | @@ -21,7 +21,9 @@ angular.module('ScheduleApp').factory( |
| 21 | 21 | number: 0, // 后台返回的页码,spring返回从0开始 |
| 22 | 22 | content: [], |
| 23 | 23 | |
| 24 | - uiNumber: 1 // 页面绑定的页码 | |
| 24 | + uiNumber: 1, // 页面绑定的页码 | |
| 25 | + uiFromRecord: 0, // 页面绑定,当前页第几条记录 | |
| 26 | + uiToRecord: 0 // 页面绑定,当前页到第几条记录 | |
| 25 | 27 | }; |
| 26 | 28 | |
| 27 | 29 | // 查询对象 |
| ... | ... | @@ -54,7 +56,14 @@ angular.module('ScheduleApp').factory( |
| 54 | 56 | currentPage.totalElements = page.totalElements; |
| 55 | 57 | currentPage.number = page.number; |
| 56 | 58 | currentPage.content = page.content; |
| 59 | + | |
| 60 | + // 计算当前页开始记录,结束记录 | |
| 61 | + if (page.numberOfElements && page.numberOfElements > 0) { | |
| 62 | + currentPage.uiFromRecord = page.number * 10 + 1; | |
| 63 | + currentPage.uiToRecord = page.number * 10 + page.numberOfElements; | |
| 64 | + } | |
| 57 | 65 | } |
| 66 | + | |
| 58 | 67 | return currentPage; |
| 59 | 68 | }, |
| 60 | 69 | resetStatus: function() { |
| ... | ... | @@ -63,7 +72,9 @@ angular.module('ScheduleApp').factory( |
| 63 | 72 | totalElements: 0, |
| 64 | 73 | number: 0, |
| 65 | 74 | content: [], |
| 66 | - uiNumber: 1 | |
| 75 | + uiNumber: 1, | |
| 76 | + uiFromRecord: 0, | |
| 77 | + uiToRecord: 0 | |
| 67 | 78 | }; |
| 68 | 79 | }, |
| 69 | 80 | |
| ... | ... | @@ -72,7 +83,13 @@ angular.module('ScheduleApp').factory( |
| 72 | 83 | * @returns {*|Function|promise|n} |
| 73 | 84 | */ |
| 74 | 85 | dataExport: function() { |
| 75 | - return service.dataTools.dataExport().$promise; | |
| 86 | + if (UserPrincipal.getGsStrsQuery().length > 0) { | |
| 87 | + return service.dataTools.dataExport( | |
| 88 | + {'cgsbm_in': UserPrincipal.getGsStrsQuery().join(",")} | |
| 89 | + ).$promise; | |
| 90 | + } else { | |
| 91 | + return null; | |
| 92 | + } | |
| 76 | 93 | } |
| 77 | 94 | } |
| 78 | 95 | } |
| ... | ... | @@ -124,14 +141,17 @@ angular.module('ScheduleApp').controller( |
| 124 | 141 | |
| 125 | 142 | // 导出excel |
| 126 | 143 | self.exportData = function() { |
| 127 | - employeeInfoManageService.dataExport().then( | |
| 128 | - function(result) { | |
| 129 | - fileDownload.downloadFile(result.data, "application/octet-stream", "人员基础信息.xls"); | |
| 130 | - }, | |
| 131 | - function(result) { | |
| 132 | - console.log("exportData failed:" + result); | |
| 133 | - } | |
| 134 | - ); | |
| 144 | + var p = employeeInfoManageService.dataExport(); | |
| 145 | + if (p) { | |
| 146 | + p.then( | |
| 147 | + function(result) { | |
| 148 | + fileDownload.downloadFile(result.data, "application/octet-stream", "人员基础信息.xls"); | |
| 149 | + }, | |
| 150 | + function(result) { | |
| 151 | + console.log("exportData failed:" + result); | |
| 152 | + } | |
| 153 | + ); | |
| 154 | + } | |
| 135 | 155 | }; |
| 136 | 156 | |
| 137 | 157 | } |
| ... | ... | @@ -256,17 +276,20 @@ angular.module('ScheduleApp').controller( |
| 256 | 276 | // 获取传过来的id,有的话就是修改,获取一遍数据 |
| 257 | 277 | var id = $stateParams.id; |
| 258 | 278 | if (id) { |
| 259 | - self.employeeInfoForSave = Employee.get({id: id}, function() {}); | |
| 279 | + self.employeeInfoForSave = Employee.get({id: id}, function() { | |
| 280 | + // 员工编号=公司编码_工号 | |
| 281 | + if (!self.employeeInfoForSave.jobCodeori) { | |
| 282 | + self.employeeInfoForSave.jobCodeori = self.employeeInfoForSave.jobCode.split("-")[1]; | |
| 283 | + } | |
| 284 | + }); | |
| 285 | + | |
| 260 | 286 | } |
| 261 | 287 | |
| 262 | 288 | // 提交方法 |
| 263 | 289 | self.submit = function() { |
| 264 | - // 在工号前添加公司编码 | |
| 265 | - var gh = self.employeeInfoForSave.jobCode; | |
| 266 | - if (gh.indexOf("-") < 0) { | |
| 267 | - gh = self.employeeInfoForSave.companyCode + "-" + gh; | |
| 268 | - self.employeeInfoForSave.jobCode = gh; | |
| 269 | - } | |
| 290 | + // 员工编号=公司编码_工号 | |
| 291 | + var gh = self.employeeInfoForSave.jobCodeori; | |
| 292 | + self.employeeInfoForSave.jobCode = self.employeeInfoForSave.companyCode + "-" + gh; | |
| 270 | 293 | |
| 271 | 294 | console.log(self.employeeInfoForSave); |
| 272 | 295 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/main.css
| ... | ... | @@ -40,6 +40,7 @@ form input.ng-valid.ng-dirty.ng-valid-required { |
| 40 | 40 | /* 固定表格,防止内容撑出表格 */ |
| 41 | 41 | .fixTable { |
| 42 | 42 | table-layout: fixed; |
| 43 | + margin-bottom: 10px; | |
| 43 | 44 | } |
| 44 | 45 | |
| 45 | 46 | /** 内容不换行,多余的用...表示 */ |
| ... | ... | @@ -83,4 +84,22 @@ form input.ng-valid.ng-dirty.ng-valid-required { |
| 83 | 84 | /* 结束时的样式 */ |
| 84 | 85 | .uv.ng-enter.ng-enter-active { |
| 85 | 86 | opacity: 1; |
| 87 | +} | |
| 88 | + | |
| 89 | +/* 分页条样式 */ | |
| 90 | +.pageBar { | |
| 91 | + height: 55px; | |
| 92 | + border: solid 1px #ddd; | |
| 93 | + background-color: #fafafa; | |
| 94 | + | |
| 95 | +} | |
| 96 | +.pageBar > .pageBarLeft { | |
| 97 | + float: left; | |
| 98 | + margin-top: 15px; | |
| 99 | + margin-left: 5px; | |
| 100 | + color: #337ab7; | |
| 101 | +} | |
| 102 | +.pageBar > .pageBarRight { | |
| 103 | + float: right; | |
| 104 | + margin-right: 5px; | |
| 86 | 105 | } |
| 87 | 106 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/scheduleApp/module/common/main.js
| ... | ... | @@ -19,6 +19,7 @@ ScheduleApp.factory('UserPrincipal', [ |
| 19 | 19 | var gsinfos = []; // 原始返回的对象数据 |
| 20 | 20 | var gsinfo_strs = []; // 拼装以后的(公司代码_分公司代码) |
| 21 | 21 | var gsinfo_strs_u = []; // 拼装以后的(分公司代码_公司代码) |
| 22 | + var gsinfo_strs_query = []; // 拼装以后的(公司代码_分公司代码),带单引号 | |
| 22 | 23 | |
| 23 | 24 | $http({ |
| 24 | 25 | method: 'GET', |
| ... | ... | @@ -32,6 +33,7 @@ ScheduleApp.factory('UserPrincipal', [ |
| 32 | 33 | var fgsbm = obj2.code; |
| 33 | 34 | gsinfo_strs.push(gsbm + "_" + fgsbm); |
| 34 | 35 | gsinfo_strs_u.push(fgsbm + "_" + gsbm); |
| 36 | + gsinfo_strs_query.push("'" + gsbm + "_" + fgsbm + "'"); | |
| 35 | 37 | }); |
| 36 | 38 | }); |
| 37 | 39 | |
| ... | ... | @@ -46,6 +48,9 @@ ScheduleApp.factory('UserPrincipal', [ |
| 46 | 48 | }, |
| 47 | 49 | getGsStrsU: function() { |
| 48 | 50 | return gsinfo_strs_u; |
| 51 | + }, | |
| 52 | + getGsStrsQuery: function() { | |
| 53 | + return gsinfo_strs_query; | |
| 49 | 54 | } |
| 50 | 55 | }; |
| 51 | 56 | } | ... | ... |