Commit a156cf929554951e3528ef0e9638d54851535584

Authored by 徐烜
1 parent 2dc63700

Update

src/main/java/com/bsth/entity/schedule/rule/RerunRule.java
@@ -53,7 +53,7 @@ public class RerunRule extends BEntity { @@ -53,7 +53,7 @@ public class RerunRule extends BEntity {
53 private GuideboardInfo rerunLp; 53 private GuideboardInfo rerunLp;
54 /** 套跑班次(时刻表明细ids,使用逗号连接) */ 54 /** 套跑班次(时刻表明细ids,使用逗号连接) */
55 private String rerunTtinfodetailIds; 55 private String rerunTtinfodetailIds;
56 - /** 套跑班次(对应具体班次的发车时间,使用逗号连接,重复的时间会去除) */ 56 + /** 套跑班次(对应具体班次的发车时间,使用逗号连接) */
57 private String rerunTtinfodetailFcsjs; 57 private String rerunTtinfodetailFcsjs;
58 58
59 59
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
1 package com.bsth.service.schedule.impl; 1 package com.bsth.service.schedule.impl;
2 2
  3 +import com.bsth.entity.Line;
3 import com.bsth.entity.schedule.SchedulePlan; 4 import com.bsth.entity.schedule.SchedulePlan;
4 import com.bsth.entity.schedule.TTInfo; 5 import com.bsth.entity.schedule.TTInfo;
5 import com.bsth.entity.schedule.rule.ScheduleRule1Flat; 6 import com.bsth.entity.schedule.rule.ScheduleRule1Flat;
6 import com.bsth.repository.BusinessRepository; 7 import com.bsth.repository.BusinessRepository;
7 import com.bsth.repository.LineRepository; 8 import com.bsth.repository.LineRepository;
8 import com.bsth.repository.schedule.*; 9 import com.bsth.repository.schedule.*;
9 -import com.bsth.service.schedule.SchedulePlanRuleResultService;  
10 import com.bsth.service.schedule.SchedulePlanService; 10 import com.bsth.service.schedule.SchedulePlanService;
11 import com.bsth.service.schedule.exception.ScheduleException; 11 import com.bsth.service.schedule.exception.ScheduleException;
12 import com.bsth.service.schedule.rules.ScheduleRuleService; 12 import com.bsth.service.schedule.rules.ScheduleRuleService;
@@ -36,8 +36,6 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im @@ -36,8 +36,6 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im
36 @Autowired 36 @Autowired
37 private KieBase kieBase; 37 private KieBase kieBase;
38 @Autowired 38 @Autowired
39 - private SchedulePlanInfoRepository schedulePlanInfoRepository;  
40 - @Autowired  
41 private ScheduleRule1FlatRepository scheduleRule1FlatRepository; 39 private ScheduleRule1FlatRepository scheduleRule1FlatRepository;
42 @Autowired 40 @Autowired
43 private TTInfoRepository ttInfoRepository; 41 private TTInfoRepository ttInfoRepository;
@@ -52,8 +50,6 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im @@ -52,8 +50,6 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im
52 @Autowired 50 @Autowired
53 private BusinessRepository businessRepository; 51 private BusinessRepository businessRepository;
54 @Autowired 52 @Autowired
55 - private SchedulePlanRuleResultService schedulePlanRuleResultService;  
56 - @Autowired  
57 private ScheduleRuleService scheduleRuleService; 53 private ScheduleRuleService scheduleRuleService;
58 54
59 /** 日志记录器 */ 55 /** 日志记录器 */
@@ -64,7 +60,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im @@ -64,7 +60,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im
64 * @param schedulePlan 排班计划对象 60 * @param schedulePlan 排班计划对象
65 * @param lpInfoResults_output 时刻表每日路牌的情况 61 * @param lpInfoResults_output 时刻表每日路牌的情况
66 */ 62 */
67 - public ScheduleResults_output loopRuleOutput( 63 + private ScheduleResults_output loopRuleOutput(
68 SchedulePlan schedulePlan, 64 SchedulePlan schedulePlan,
69 LpInfoResults_output lpInfoResults_output) { 65 LpInfoResults_output lpInfoResults_output) {
70 // 1-1、构造drools规则输入数据,输出数据 66 // 1-1、构造drools规则输入数据,输出数据
@@ -115,7 +111,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im @@ -115,7 +111,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im
115 * @param schedulePlan 排班计划对象 111 * @param schedulePlan 排班计划对象
116 * @return TTInfoResults_output, LpInfoResults_output 112 * @return TTInfoResults_output, LpInfoResults_output
117 */ 113 */
118 - public Object[] ttInfoOutput(SchedulePlan schedulePlan) { 114 + private Object[] ttInfoOutput(SchedulePlan schedulePlan) {
119 // 获取线路的所有未作废的时刻表 115 // 获取线路的所有未作废的时刻表
120 List<TTInfo> ttInfos = ttInfoRepository.findInCanceledByXl(schedulePlan.getXl()); 116 List<TTInfo> ttInfos = ttInfoRepository.findInCanceledByXl(schedulePlan.getXl());
121 117
@@ -173,7 +169,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im @@ -173,7 +169,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im
173 * @param ttInfoResults_output ttInfoOutput方法规则输出 169 * @param ttInfoResults_output ttInfoOutput方法规则输出
174 * @return PlanResult 170 * @return PlanResult
175 */ 171 */
176 - public PlanResult planResultOutput( 172 + private PlanResult planResultOutput(
177 SchedulePlan schedulePlan, 173 SchedulePlan schedulePlan,
178 ScheduleResults_output scheduleResults_output, 174 ScheduleResults_output scheduleResults_output,
179 TTInfoResults_output ttInfoResults_output) { 175 TTInfoResults_output ttInfoResults_output) {
@@ -186,6 +182,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im @@ -186,6 +182,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im
186 ); 182 );
187 // 规则输出数据 183 // 规则输出数据
188 PlanResult planResult = new PlanResult(); 184 PlanResult planResult = new PlanResult();
  185 + planResult.setXlId(schedulePlan.getXl().getId().toString());
189 186
190 // 1-2、构造drools session->载入数据->启动规则->计算->销毁session 187 // 1-2、构造drools session->载入数据->启动规则->计算->销毁session
191 // 创建session,内部配置的是stateful 188 // 创建session,内部配置的是stateful
@@ -214,7 +211,12 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im @@ -214,7 +211,12 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im
214 211
215 } 212 }
216 213
217 - public SchedulePlan save(SchedulePlan schedulePlan) { 214 + /**
  215 + * 生成线路排班(不含套跑规则)。
  216 + * @param schedulePlan
  217 + * @return
  218 + */
  219 + private PlanResult SchedulePlanWithOutRerun(SchedulePlan schedulePlan) {
218 // pre、如果排班的数据之前已经有了,删除之前的数据 220 // pre、如果排班的数据之前已经有了,删除之前的数据
219 Date startpre = new Date(); 221 Date startpre = new Date();
220 scheduleRuleService.deelteSchedulePlanInfo( 222 scheduleRuleService.deelteSchedulePlanInfo(
@@ -238,21 +240,34 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im @@ -238,21 +240,34 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im
238 PlanResult planResult = planResultOutput(schedulePlan, scheduleResults_output, ttInfoResults_output); 240 PlanResult planResult = planResultOutput(schedulePlan, scheduleResults_output, ttInfoResults_output);
239 Date end3 = new Date(); 241 Date end3 = new Date();
240 242
  243 + logger.info("删除数据 {} ms,drool时刻表每日路牌计算 {} ms,drool循环规则计算 {} ms,drool计划数据 {} ms",
  244 + endpre.getTime() - startpre.getTime(),
  245 + end1.getTime() - start1.getTime(),
  246 + end2.getTime() - start2.getTime(),
  247 + end3.getTime() - start3.getTime());
  248 +
  249 + return planResult;
  250 + }
  251 +
  252 + public SchedulePlan save(SchedulePlan schedulePlan) {
  253 + // 1、查找线路,这是主线路
  254 + Line xl = lineRepository.findOne(schedulePlan.getXl().getId());
  255 + logger.info("<--- 排班master线路 id={}, name={}, 开始排班", xl.getId(), xl.getName());
  256 +
  257 + // 2、确定主线路排班(无套跑规则)
  258 + PlanResult planResult = SchedulePlanWithOutRerun(schedulePlan);
  259 +
  260 + // TODO 3、确定套跑规则
  261 +
241 // 4、保存数据(jdbcTemplate 批量插入) 262 // 4、保存数据(jdbcTemplate 批量插入)
242 Date start4 = new Date(); 263 Date start4 = new Date();
243 scheduleRuleService.generateSchedulePlan(schedulePlan, planResult.getSchedulePlanInfos()); 264 scheduleRuleService.generateSchedulePlan(schedulePlan, planResult.getSchedulePlanInfos());
244 Date end4 = new Date(); 265 Date end4 = new Date();
245 266
246 -  
247 - logger.info("删除数据 {} ms,drool时刻表每日路牌计算 {} ms,drool循环规则计算 {} ms,drool计划数据 {} ms,插入数据 {} 条 耗时 {} ms",  
248 - endpre.getTime() - startpre.getTime(),  
249 - end1.getTime() - start1.getTime(),  
250 - end2.getTime() - start2.getTime(),  
251 - end3.getTime() - start3.getTime(), 267 + logger.info("保存主线路数据 {} 条 耗时 {} ms --->",
252 planResult.getSchedulePlanInfos().size(), 268 planResult.getSchedulePlanInfos().size(),
253 end4.getTime() - start4.getTime()); 269 end4.getTime() - start4.getTime());
254 270
255 -  
256 return new SchedulePlan(); 271 return new SchedulePlan();
257 } 272 }
258 273
src/main/java/com/bsth/service/schedule/rules/plan/PlanResult.java
@@ -9,6 +9,7 @@ import java.util.List; @@ -9,6 +9,7 @@ import java.util.List;
9 * 计划输出。 9 * 计划输出。
10 */ 10 */
11 public class PlanResult { 11 public class PlanResult {
  12 + private String xlId;
12 private List<SchedulePlanInfo> schedulePlanInfos = new ArrayList<>(); 13 private List<SchedulePlanInfo> schedulePlanInfos = new ArrayList<>();
13 14
14 public PlanResult() { 15 public PlanResult() {
@@ -25,4 +26,12 @@ public class PlanResult { @@ -25,4 +26,12 @@ public class PlanResult {
25 public void setSchedulePlanInfos(List<SchedulePlanInfo> schedulePlanInfos) { 26 public void setSchedulePlanInfos(List<SchedulePlanInfo> schedulePlanInfos) {
26 this.schedulePlanInfos = schedulePlanInfos; 27 this.schedulePlanInfos = schedulePlanInfos;
27 } 28 }
  29 +
  30 + public String getXlId() {
  31 + return xlId;
  32 + }
  33 +
  34 + public void setXlId(String xlId) {
  35 + this.xlId = xlId;
  36 + }
28 } 37 }
src/main/resources/datatools/ktrs/ttinfodetailDataInput.ktr
@@ -1677,7 +1677,7 @@ @@ -1677,7 +1677,7 @@
1677 </step> 1677 </step>
1678 1678
1679 <step> 1679 <step>
1680 - <name>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x6240;&#x6709;&#x4e0a;&#x4e0b;&#x884c;&#x91cc;&#x7a0b;&#x65f6;&#x95f4;</name> 1680 + <name>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x5173;&#x8054;</name>
1681 <type>DBLookup</type> 1681 <type>DBLookup</type>
1682 <description/> 1682 <description/>
1683 <distribute>Y</distribute> 1683 <distribute>Y</distribute>
@@ -1693,99 +1693,39 @@ @@ -1693,99 +1693,39 @@
1693 <cache_size>0</cache_size> 1693 <cache_size>0</cache_size>
1694 <lookup> 1694 <lookup>
1695 <schema/> 1695 <schema/>
1696 - <table>bsth_c_line_information</table> 1696 + <table>bsth_c_line</table>
1697 <orderby/> 1697 <orderby/>
1698 <fail_on_multiple>N</fail_on_multiple> 1698 <fail_on_multiple>N</fail_on_multiple>
1699 <eat_row_on_failure>N</eat_row_on_failure> 1699 <eat_row_on_failure>N</eat_row_on_failure>
1700 <key> 1700 <key>
1701 - <name>xlid</name>  
1702 - <field>line</field> 1701 + <name>xlname_</name>
  1702 + <field>name</field>
  1703 + <condition>&#x3d;</condition>
  1704 + <name2/>
  1705 + </key>
  1706 + <key>
  1707 + <name>iscanceled</name>
  1708 + <field>destroy</field>
1703 <condition>&#x3d;</condition> 1709 <condition>&#x3d;</condition>
1704 <name2/> 1710 <name2/>
1705 </key> 1711 </key>
1706 <value> 1712 <value>
1707 - <name>up_mileage</name>  
1708 - <rename>up_mileage</rename>  
1709 - <default/>  
1710 - <type>Number</type>  
1711 - </value>  
1712 - <value>  
1713 - <name>down_mileage</name>  
1714 - <rename>down_mileage</rename>  
1715 - <default/>  
1716 - <type>Number</type>  
1717 - </value>  
1718 - <value>  
1719 - <name>up_travel_time</name>  
1720 - <rename>up_travel_time</rename>  
1721 - <default/>  
1722 - <type>Number</type>  
1723 - </value>  
1724 - <value>  
1725 - <name>down_travel_time</name>  
1726 - <rename>down_travel_time</rename>  
1727 - <default/>  
1728 - <type>Number</type>  
1729 - </value>  
1730 - <value>  
1731 - <name>early_start_time</name>  
1732 - <rename>early_start_time</rename>  
1733 - <default/>  
1734 - <type>String</type>  
1735 - </value>  
1736 - <value>  
1737 - <name>early_end_time</name>  
1738 - <rename>early_end_time</rename>  
1739 - <default/>  
1740 - <type>String</type>  
1741 - </value>  
1742 - <value>  
1743 - <name>early_up_time</name>  
1744 - <rename>early_up_time</rename>  
1745 - <default/>  
1746 - <type>Number</type>  
1747 - </value>  
1748 - <value>  
1749 - <name>early_down_time</name>  
1750 - <rename>early_down_time</rename>  
1751 - <default/>  
1752 - <type>Number</type>  
1753 - </value>  
1754 - <value>  
1755 - <name>late_start_time</name>  
1756 - <rename>late_start_time</rename>  
1757 - <default/>  
1758 - <type>String</type>  
1759 - </value>  
1760 - <value>  
1761 - <name>late_end_time</name>  
1762 - <rename>late_end_time</rename>  
1763 - <default/>  
1764 - <type>String</type>  
1765 - </value>  
1766 - <value>  
1767 - <name>late_up_time</name>  
1768 - <rename>late_up_time</rename>  
1769 - <default/>  
1770 - <type>Number</type>  
1771 - </value>  
1772 - <value>  
1773 - <name>late_down_time</name>  
1774 - <rename>late_down_time</rename> 1713 + <name>id</name>
  1714 + <rename>xlid</rename>
1775 <default/> 1715 <default/>
1776 - <type>Number</type> 1716 + <type>Integer</type>
1777 </value> 1717 </value>
1778 </lookup> 1718 </lookup>
1779 <cluster_schema/> 1719 <cluster_schema/>
1780 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> 1720 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
1781 - <xloc>149</xloc>  
1782 - <yloc>581</yloc> 1721 + <xloc>1007</xloc>
  1722 + <yloc>43</yloc>
1783 <draw>Y</draw> 1723 <draw>Y</draw>
1784 </GUI> 1724 </GUI>
1785 </step> 1725 </step>
1786 1726
1787 <step> 1727 <step>
1788 - <name>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x5173;&#x8054;</name> 1728 + <name>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x51fa;&#x573a;&#x91cc;&#x7a0b;&#x65f6;&#x95f4;</name>
1789 <type>DBLookup</type> 1729 <type>DBLookup</type>
1790 <description/> 1730 <description/>
1791 <distribute>Y</distribute> 1731 <distribute>Y</distribute>
@@ -1801,33 +1741,51 @@ @@ -1801,33 +1741,51 @@
1801 <cache_size>0</cache_size> 1741 <cache_size>0</cache_size>
1802 <lookup> 1742 <lookup>
1803 <schema/> 1743 <schema/>
1804 - <table>bsth_c_line</table> 1744 + <table>bsth_c_line_information</table>
1805 <orderby/> 1745 <orderby/>
1806 <fail_on_multiple>N</fail_on_multiple> 1746 <fail_on_multiple>N</fail_on_multiple>
1807 <eat_row_on_failure>N</eat_row_on_failure> 1747 <eat_row_on_failure>N</eat_row_on_failure>
1808 <key> 1748 <key>
1809 - <name>xlname_</name>  
1810 - <field>name</field> 1749 + <name>xlid</name>
  1750 + <field>line</field>
1811 <condition>&#x3d;</condition> 1751 <condition>&#x3d;</condition>
1812 <name2/> 1752 <name2/>
1813 </key> 1753 </key>
1814 <value> 1754 <value>
1815 - <name>id</name>  
1816 - <rename>xlid</rename> 1755 + <name>up_out_timer</name>
  1756 + <rename>up_out_timer</rename>
1817 <default/> 1757 <default/>
1818 - <type>Integer</type> 1758 + <type>Number</type>
  1759 + </value>
  1760 + <value>
  1761 + <name>up_out_mileage</name>
  1762 + <rename>up_out_mileage</rename>
  1763 + <default/>
  1764 + <type>Number</type>
  1765 + </value>
  1766 + <value>
  1767 + <name>down_out_timer</name>
  1768 + <rename>down_out_timer</rename>
  1769 + <default/>
  1770 + <type>Number</type>
  1771 + </value>
  1772 + <value>
  1773 + <name>down_out_mileage</name>
  1774 + <rename>down_out_mileage</rename>
  1775 + <default/>
  1776 + <type>Number</type>
1819 </value> 1777 </value>
1820 </lookup> 1778 </lookup>
1821 <cluster_schema/> 1779 <cluster_schema/>
1822 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> 1780 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
1823 - <xloc>1007</xloc>  
1824 - <yloc>43</yloc> 1781 + <xloc>335</xloc>
  1782 + <yloc>763</yloc>
1825 <draw>Y</draw> 1783 <draw>Y</draw>
1826 </GUI> 1784 </GUI>
1827 </step> 1785 </step>
1828 1786
1829 <step> 1787 <step>
1830 - <name>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x51fa;&#x573a;&#x91cc;&#x7a0b;&#x65f6;&#x95f4;</name> 1788 + <name>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x6240;&#x6709;&#x4e0a;&#x4e0b;&#x884c;&#x91cc;&#x7a0b;&#x65f6;&#x95f4;</name>
1831 <type>DBLookup</type> 1789 <type>DBLookup</type>
1832 <description/> 1790 <description/>
1833 <distribute>Y</distribute> 1791 <distribute>Y</distribute>
@@ -1854,34 +1812,82 @@ @@ -1854,34 +1812,82 @@
1854 <name2/> 1812 <name2/>
1855 </key> 1813 </key>
1856 <value> 1814 <value>
1857 - <name>up_out_timer</name>  
1858 - <rename>up_out_timer</rename> 1815 + <name>up_mileage</name>
  1816 + <rename>up_mileage</rename>
1859 <default/> 1817 <default/>
1860 <type>Number</type> 1818 <type>Number</type>
1861 </value> 1819 </value>
1862 <value> 1820 <value>
1863 - <name>up_out_mileage</name>  
1864 - <rename>up_out_mileage</rename> 1821 + <name>down_mileage</name>
  1822 + <rename>down_mileage</rename>
1865 <default/> 1823 <default/>
1866 <type>Number</type> 1824 <type>Number</type>
1867 </value> 1825 </value>
1868 <value> 1826 <value>
1869 - <name>down_out_timer</name>  
1870 - <rename>down_out_timer</rename> 1827 + <name>up_travel_time</name>
  1828 + <rename>up_travel_time</rename>
1871 <default/> 1829 <default/>
1872 <type>Number</type> 1830 <type>Number</type>
1873 </value> 1831 </value>
1874 <value> 1832 <value>
1875 - <name>down_out_mileage</name>  
1876 - <rename>down_out_mileage</rename> 1833 + <name>down_travel_time</name>
  1834 + <rename>down_travel_time</rename>
  1835 + <default/>
  1836 + <type>Number</type>
  1837 + </value>
  1838 + <value>
  1839 + <name>early_start_time</name>
  1840 + <rename>early_start_time</rename>
  1841 + <default/>
  1842 + <type>String</type>
  1843 + </value>
  1844 + <value>
  1845 + <name>early_end_time</name>
  1846 + <rename>early_end_time</rename>
  1847 + <default/>
  1848 + <type>String</type>
  1849 + </value>
  1850 + <value>
  1851 + <name>early_up_time</name>
  1852 + <rename>early_up_time</rename>
  1853 + <default/>
  1854 + <type>Number</type>
  1855 + </value>
  1856 + <value>
  1857 + <name>early_down_time</name>
  1858 + <rename>early_down_time</rename>
  1859 + <default/>
  1860 + <type>Number</type>
  1861 + </value>
  1862 + <value>
  1863 + <name>late_start_time</name>
  1864 + <rename>late_start_time</rename>
  1865 + <default/>
  1866 + <type>String</type>
  1867 + </value>
  1868 + <value>
  1869 + <name>late_end_time</name>
  1870 + <rename>late_end_time</rename>
  1871 + <default/>
  1872 + <type>String</type>
  1873 + </value>
  1874 + <value>
  1875 + <name>late_up_time</name>
  1876 + <rename>late_up_time</rename>
  1877 + <default/>
  1878 + <type>Number</type>
  1879 + </value>
  1880 + <value>
  1881 + <name>late_down_time</name>
  1882 + <rename>late_down_time</rename>
1877 <default/> 1883 <default/>
1878 <type>Number</type> 1884 <type>Number</type>
1879 </value> 1885 </value>
1880 </lookup> 1886 </lookup>
1881 <cluster_schema/> 1887 <cluster_schema/>
1882 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> 1888 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
1883 - <xloc>335</xloc>  
1884 - <yloc>763</yloc> 1889 + <xloc>149</xloc>
  1890 + <yloc>581</yloc>
1885 <draw>Y</draw> 1891 <draw>Y</draw>
1886 </GUI> 1892 </GUI>
1887 </step> 1893 </step>
src/main/resources/datatools/ktrs/ttinfodetailDataInput2.ktr
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <transformation> 2 <transformation>
3 <info> 3 <info>
4 - <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5bfc;&#x51fa;2</name> 4 + <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5bfc;&#x5165;2</name>
5 <description>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</description> 5 <description>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</description>
6 <extended_description>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x4fe1;&#x606f;</extended_description> 6 <extended_description>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x4fe1;&#x606f;</extended_description>
7 <trans_version/> 7 <trans_version/>
@@ -1623,60 +1623,6 @@ @@ -1623,60 +1623,6 @@
1623 </step> 1623 </step>
1624 1624
1625 <step> 1625 <step>
1626 - <name>&#x67e5;&#x627e;&#x65f6;&#x523b;&#x8868;&#x57fa;&#x7840;&#x4fe1;&#x606f;&#x5173;&#x8054;</name>  
1627 - <type>DBLookup</type>  
1628 - <description/>  
1629 - <distribute>Y</distribute>  
1630 - <custom_distribution/>  
1631 - <copies>1</copies>  
1632 - <partitioning>  
1633 - <method>none</method>  
1634 - <schema_name/>  
1635 - </partitioning>  
1636 - <connection>bus_control_variable</connection>  
1637 - <cache>N</cache>  
1638 - <cache_load_all>N</cache_load_all>  
1639 - <cache_size>0</cache_size>  
1640 - <lookup>  
1641 - <schema/>  
1642 - <table>bsth_c_s_ttinfo</table>  
1643 - <orderby/>  
1644 - <fail_on_multiple>N</fail_on_multiple>  
1645 - <eat_row_on_failure>N</eat_row_on_failure>  
1646 - <key>  
1647 - <name>xlid</name>  
1648 - <field>xl</field>  
1649 - <condition>&#x3d;</condition>  
1650 - <name2/>  
1651 - </key>  
1652 - <key>  
1653 - <name>ttinfoname_</name>  
1654 - <field>name</field>  
1655 - <condition>&#x3d;</condition>  
1656 - <name2/>  
1657 - </key>  
1658 - <key>  
1659 - <name>iscanceled</name>  
1660 - <field>is_cancel</field>  
1661 - <condition>&#x3d;</condition>  
1662 - <name2/>  
1663 - </key>  
1664 - <value>  
1665 - <name>id</name>  
1666 - <rename>ttid</rename>  
1667 - <default/>  
1668 - <type>Integer</type>  
1669 - </value>  
1670 - </lookup>  
1671 - <cluster_schema/>  
1672 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
1673 - <xloc>1011</xloc>  
1674 - <yloc>134</yloc>  
1675 - <draw>Y</draw>  
1676 - </GUI>  
1677 - </step>  
1678 -  
1679 - <step>  
1680 <name>&#x67e5;&#x627e;&#x6240;&#x6709;&#x7ebf;&#x8def;&#x4e0a;&#x4e0b;&#x884c;&#x91cc;&#x7a0b;&#x65f6;&#x95f4;</name> 1626 <name>&#x67e5;&#x627e;&#x6240;&#x6709;&#x7ebf;&#x8def;&#x4e0a;&#x4e0b;&#x884c;&#x91cc;&#x7a0b;&#x65f6;&#x95f4;</name>
1681 <type>DBLookup</type> 1627 <type>DBLookup</type>
1682 <description/> 1628 <description/>
@@ -1785,6 +1731,60 @@ @@ -1785,6 +1731,60 @@
1785 </step> 1731 </step>
1786 1732
1787 <step> 1733 <step>
  1734 + <name>&#x67e5;&#x627e;&#x65f6;&#x523b;&#x8868;&#x57fa;&#x7840;&#x4fe1;&#x606f;&#x5173;&#x8054;</name>
  1735 + <type>DBLookup</type>
  1736 + <description/>
  1737 + <distribute>Y</distribute>
  1738 + <custom_distribution/>
  1739 + <copies>1</copies>
  1740 + <partitioning>
  1741 + <method>none</method>
  1742 + <schema_name/>
  1743 + </partitioning>
  1744 + <connection>bus_control_variable</connection>
  1745 + <cache>N</cache>
  1746 + <cache_load_all>N</cache_load_all>
  1747 + <cache_size>0</cache_size>
  1748 + <lookup>
  1749 + <schema/>
  1750 + <table>bsth_c_s_ttinfo</table>
  1751 + <orderby/>
  1752 + <fail_on_multiple>N</fail_on_multiple>
  1753 + <eat_row_on_failure>N</eat_row_on_failure>
  1754 + <key>
  1755 + <name>xlid</name>
  1756 + <field>xl</field>
  1757 + <condition>&#x3d;</condition>
  1758 + <name2/>
  1759 + </key>
  1760 + <key>
  1761 + <name>ttinfoname_</name>
  1762 + <field>name</field>
  1763 + <condition>&#x3d;</condition>
  1764 + <name2/>
  1765 + </key>
  1766 + <key>
  1767 + <name>iscanceled</name>
  1768 + <field>is_cancel</field>
  1769 + <condition>&#x3d;</condition>
  1770 + <name2/>
  1771 + </key>
  1772 + <value>
  1773 + <name>id</name>
  1774 + <rename>ttid</rename>
  1775 + <default/>
  1776 + <type>Integer</type>
  1777 + </value>
  1778 + </lookup>
  1779 + <cluster_schema/>
  1780 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1781 + <xloc>1011</xloc>
  1782 + <yloc>134</yloc>
  1783 + <draw>Y</draw>
  1784 + </GUI>
  1785 + </step>
  1786 +
  1787 + <step>
1788 <name>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x5173;&#x8054;</name> 1788 <name>&#x67e5;&#x627e;&#x7ebf;&#x8def;&#x5173;&#x8054;</name>
1789 <type>DBLookup</type> 1789 <type>DBLookup</type>
1790 <description/> 1790 <description/>
@@ -1811,6 +1811,12 @@ @@ -1811,6 +1811,12 @@
1811 <condition>&#x3d;</condition> 1811 <condition>&#x3d;</condition>
1812 <name2/> 1812 <name2/>
1813 </key> 1813 </key>
  1814 + <key>
  1815 + <name>iscanceled</name>
  1816 + <field>destroy</field>
  1817 + <condition>&#x3d;</condition>
  1818 + <name2/>
  1819 + </key>
1814 <value> 1820 <value>
1815 <name>id</name> 1821 <name>id</name>
1816 <rename>xlid</rename> 1822 <rename>xlid</rename>
src/main/resources/static/pages/scheduleApp/module/common/dts2/bcGroup/saBcgroup.js
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave 5 * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave
6 * bcttinfoidsvalue(必须):绑定的model班次ids字段值,如:bcttinfoidsvalue={{ctrl.employeeInfoForSave.lprange}} 6 * bcttinfoidsvalue(必须):绑定的model班次ids字段值,如:bcttinfoidsvalue={{ctrl.employeeInfoForSave.lprange}}
7 * bcttinfoidsname(必须):bind的model班次ids字段名,如:bcttinfoidsname=lprange 7 * bcttinfoidsname(必须):bind的model班次ids字段名,如:bcttinfoidsname=lprange
  8 + * bcttinfofcsjs(必须):bind的model班次发车时间s字段名
8 * dataparams (必须):内部数据关联的查询参数,如:{{ {'ttid': ctrl.rerunManageForSave.rerunTtinfo.id} | json }} 9 * dataparams (必须):内部数据关联的查询参数,如:{{ {'ttid': ctrl.rerunManageForSave.rerunTtinfo.id} | json }}
9 * required(可选):是否要用required验证 10 * required(可选):是否要用required验证
10 * 11 *
@@ -61,6 +62,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [ @@ -61,6 +62,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [
61 var $name_attr = tAttrs["name"]; // 控件的名字 62 var $name_attr = tAttrs["name"]; // 控件的名字
62 var $required_attr = tAttrs["required"]; // 是否需要required验证 63 var $required_attr = tAttrs["required"]; // 是否需要required验证
63 var $bcttinfoidsname_attr = tAttrs["bcttinfoidsname"]; // bind的model班次ids字段名 64 var $bcttinfoidsname_attr = tAttrs["bcttinfoidsname"]; // bind的model班次ids字段名
  65 + var $bcttinfofcsjs_attr = tAttrs["bcttinfofcsjs"]; // bind的model班次发车时间s字段名
64 66
65 // controlAs名字 67 // controlAs名字
66 var ctrlAs = '$saBcgroupCtrl'; 68 var ctrlAs = '$saBcgroupCtrl';
@@ -135,6 +137,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [ @@ -135,6 +137,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [
135 scope[ctrlAs].$$internal_validate_model = function() { 137 scope[ctrlAs].$$internal_validate_model = function() {
136 var data_temp = scope[ctrlAs].$$dataSelected; 138 var data_temp = scope[ctrlAs].$$dataSelected;
137 var bcttinfoIds = []; 139 var bcttinfoIds = [];
  140 + var bcttinfofscjs = [];
138 var i = 0; 141 var i = 0;
139 142
140 if (data_temp && 143 if (data_temp &&
@@ -142,6 +145,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [ @@ -142,6 +145,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [
142 145
143 for (i = 0; i < data_temp.length; i++) { 146 for (i = 0; i < data_temp.length; i++) {
144 bcttinfoIds.push(data_temp[i].bcttinfoid); 147 bcttinfoIds.push(data_temp[i].bcttinfoid);
  148 + bcttinfofscjs.push(data_temp[i].bcfcsj);
145 } 149 }
146 150
147 // 更新外部model字段 151 // 更新外部model字段
@@ -149,6 +153,9 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [ @@ -149,6 +153,9 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [
149 console.log("bcttinfoidsname=" + bcttinfoIds.join(',')); 153 console.log("bcttinfoidsname=" + bcttinfoIds.join(','));
150 eval("scope[ctrlAs].model" + "." + $bcttinfoidsname_attr + " = bcttinfoIds.join(',');"); 154 eval("scope[ctrlAs].model" + "." + $bcttinfoidsname_attr + " = bcttinfoIds.join(',');");
151 } 155 }
  156 + if ($bcttinfofcsjs_attr) {
  157 + eval("scope[ctrlAs].model" + "." + $bcttinfofcsjs_attr + " = bcttinfofscjs.join(',');");
  158 + }
152 159
153 // 更新内部model,用于外部验证 160 // 更新内部model,用于外部验证
154 // 内部model的值暂时随意,以后再改 161 // 内部model的值暂时随意,以后再改
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
@@ -3417,6 +3417,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saEmployeegroup&#39;, [ @@ -3417,6 +3417,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saEmployeegroup&#39;, [
3417 * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave 3417 * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave
3418 * bcttinfoidsvalue(必须):绑定的model班次ids字段值,如:bcttinfoidsvalue={{ctrl.employeeInfoForSave.lprange}} 3418 * bcttinfoidsvalue(必须):绑定的model班次ids字段值,如:bcttinfoidsvalue={{ctrl.employeeInfoForSave.lprange}}
3419 * bcttinfoidsname(必须):bind的model班次ids字段名,如:bcttinfoidsname=lprange 3419 * bcttinfoidsname(必须):bind的model班次ids字段名,如:bcttinfoidsname=lprange
  3420 + * bcttinfofcsjs(必须):bind的model班次发车时间s字段名
3420 * dataparams (必须):内部数据关联的查询参数,如:{{ {'ttid': ctrl.rerunManageForSave.rerunTtinfo.id} | json }} 3421 * dataparams (必须):内部数据关联的查询参数,如:{{ {'ttid': ctrl.rerunManageForSave.rerunTtinfo.id} | json }}
3421 * required(可选):是否要用required验证 3422 * required(可选):是否要用required验证
3422 * 3423 *
@@ -3473,6 +3474,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [ @@ -3473,6 +3474,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [
3473 var $name_attr = tAttrs["name"]; // 控件的名字 3474 var $name_attr = tAttrs["name"]; // 控件的名字
3474 var $required_attr = tAttrs["required"]; // 是否需要required验证 3475 var $required_attr = tAttrs["required"]; // 是否需要required验证
3475 var $bcttinfoidsname_attr = tAttrs["bcttinfoidsname"]; // bind的model班次ids字段名 3476 var $bcttinfoidsname_attr = tAttrs["bcttinfoidsname"]; // bind的model班次ids字段名
  3477 + var $bcttinfofcsjs_attr = tAttrs["bcttinfofcsjs"]; // bind的model班次发车时间s字段名
3476 3478
3477 // controlAs名字 3479 // controlAs名字
3478 var ctrlAs = '$saBcgroupCtrl'; 3480 var ctrlAs = '$saBcgroupCtrl';
@@ -3547,6 +3549,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [ @@ -3547,6 +3549,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [
3547 scope[ctrlAs].$$internal_validate_model = function() { 3549 scope[ctrlAs].$$internal_validate_model = function() {
3548 var data_temp = scope[ctrlAs].$$dataSelected; 3550 var data_temp = scope[ctrlAs].$$dataSelected;
3549 var bcttinfoIds = []; 3551 var bcttinfoIds = [];
  3552 + var bcttinfofscjs = [];
3550 var i = 0; 3553 var i = 0;
3551 3554
3552 if (data_temp && 3555 if (data_temp &&
@@ -3554,6 +3557,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [ @@ -3554,6 +3557,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [
3554 3557
3555 for (i = 0; i < data_temp.length; i++) { 3558 for (i = 0; i < data_temp.length; i++) {
3556 bcttinfoIds.push(data_temp[i].bcttinfoid); 3559 bcttinfoIds.push(data_temp[i].bcttinfoid);
  3560 + bcttinfofscjs.push(data_temp[i].bcfcsj);
3557 } 3561 }
3558 3562
3559 // 更新外部model字段 3563 // 更新外部model字段
@@ -3561,6 +3565,9 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [ @@ -3561,6 +3565,9 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saBcgroup&#39;, [
3561 console.log("bcttinfoidsname=" + bcttinfoIds.join(',')); 3565 console.log("bcttinfoidsname=" + bcttinfoIds.join(','));
3562 eval("scope[ctrlAs].model" + "." + $bcttinfoidsname_attr + " = bcttinfoIds.join(',');"); 3566 eval("scope[ctrlAs].model" + "." + $bcttinfoidsname_attr + " = bcttinfoIds.join(',');");
3563 } 3567 }
  3568 + if ($bcttinfofcsjs_attr) {
  3569 + eval("scope[ctrlAs].model" + "." + $bcttinfofcsjs_attr + " = bcttinfofscjs.join(',');");
  3570 + }
3564 3571
3565 // 更新内部model,用于外部验证 3572 // 更新内部model,用于外部验证
3566 // 内部model的值暂时随意,以后再改 3573 // 内部model的值暂时随意,以后再改
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/edit.html
@@ -113,6 +113,7 @@ @@ -113,6 +113,7 @@
113 dataparams="{{ {'xlId': ctrl.rerunManageForSave.rerunXl.id, 'ttinfoId' : ctrl.rerunManageForSave.rerunTtinfo.id, 'lpId' : ctrl.rerunManageForSave.rerunLp.id} | json }}" 113 dataparams="{{ {'xlId': ctrl.rerunManageForSave.rerunXl.id, 'ttinfoId' : ctrl.rerunManageForSave.rerunTtinfo.id, 'lpId' : ctrl.rerunManageForSave.rerunLp.id} | json }}"
114 bcttinfoidsvalue="{{ctrl.rerunManageForSave.rerunTtinfodetailIds}}" 114 bcttinfoidsvalue="{{ctrl.rerunManageForSave.rerunTtinfodetailIds}}"
115 bcttinfoidsname="rerunTtinfodetailIds" 115 bcttinfoidsname="rerunTtinfodetailIds"
  116 + bcttinfofcsjs="rerunTtinfodetailFcsjs"
116 required > 117 required >
117 </sa-Bcgroup> 118 </sa-Bcgroup>
118 </div> 119 </div>
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/form.html
@@ -113,6 +113,7 @@ @@ -113,6 +113,7 @@
113 dataparams="{{ {'xlId': ctrl.rerunManageForSave.rerunXl.id, 'ttinfoId' : ctrl.rerunManageForSave.rerunTtinfo.id, 'lpId' : ctrl.rerunManageForSave.rerunLp.id} | json }}" 113 dataparams="{{ {'xlId': ctrl.rerunManageForSave.rerunXl.id, 'ttinfoId' : ctrl.rerunManageForSave.rerunTtinfo.id, 'lpId' : ctrl.rerunManageForSave.rerunLp.id} | json }}"
114 bcttinfoidsvalue="{{ctrl.rerunManageForSave.rerunTtinfodetailIds}}" 114 bcttinfoidsvalue="{{ctrl.rerunManageForSave.rerunTtinfodetailIds}}"
115 bcttinfoidsname="rerunTtinfodetailIds" 115 bcttinfoidsname="rerunTtinfodetailIds"
  116 + bcttinfofcsjs="rerunTtinfodetailFcsjs"
116 required > 117 required >
117 </sa-Bcgroup> 118 </sa-Bcgroup>
118 </div> 119 </div>