Commit 4edb5f24028f506df7570c5c412a6067181193d3

Authored by 廖磊
2 parents 0c002a47 336b258c

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing 26 changed files with 614 additions and 74 deletions
@@ -299,6 +299,11 @@ @@ -299,6 +299,11 @@
299 <version>3.3.0</version> 299 <version>3.3.0</version>
300 </dependency> 300 </dependency>
301 301
  302 + <dependency>
  303 + <groupId>com.github.stuxuhai</groupId>
  304 + <artifactId>jpinyin</artifactId>
  305 + <version>1.1.8</version>
  306 + </dependency>
302 </dependencies> 307 </dependencies>
303 308
304 <dependencyManagement> 309 <dependencyManagement>
src/main/java/com/bsth/controller/PersonnelController.java
1 package com.bsth.controller; 1 package com.bsth.controller;
2 2
  3 +import com.bsth.common.Constants;
  4 +import com.bsth.data.pinyin.PersionPinYin;
  5 +import com.bsth.data.pinyin.PersionPinYinBuffer;
3 import com.bsth.entity.Personnel; 6 import com.bsth.entity.Personnel;
  7 +import com.bsth.entity.sys.CompanyAuthority;
4 import com.bsth.service.PersonnelService; 8 import com.bsth.service.PersonnelService;
5 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.web.bind.annotation.RequestMapping; 10 import org.springframework.web.bind.annotation.RequestMapping;
@@ -8,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMethod; @@ -8,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
8 import org.springframework.web.bind.annotation.RequestParam; 12 import org.springframework.web.bind.annotation.RequestParam;
9 import org.springframework.web.bind.annotation.RestController; 13 import org.springframework.web.bind.annotation.RestController;
10 14
  15 +import javax.servlet.http.HttpServletRequest;
11 import java.util.List; 16 import java.util.List;
12 import java.util.Map; 17 import java.util.Map;
13 18
@@ -21,8 +26,22 @@ public class PersonnelController extends BaseController&lt;Personnel, Integer&gt; { @@ -21,8 +26,22 @@ public class PersonnelController extends BaseController&lt;Personnel, Integer&gt; {
21 @Autowired 26 @Autowired
22 private PersonnelService service; 27 private PersonnelService service;
23 28
  29 + @Autowired
  30 + PersionPinYinBuffer persionPinYinBuffer;
  31 +
24 @RequestMapping(value = "/sreachPersonnel", method = RequestMethod.GET) 32 @RequestMapping(value = "/sreachPersonnel", method = RequestMethod.GET)
25 public List<Map<String, String>> sreachPersonnel(@RequestParam String jobCode) { 33 public List<Map<String, String>> sreachPersonnel(@RequestParam String jobCode) {
26 return service.sreachPersonnel(jobCode); 34 return service.sreachPersonnel(jobCode);
27 } 35 }
  36 +
  37 + @RequestMapping(value = "/all_py", method = RequestMethod.GET)
  38 + public List<PersionPinYin> findAll_PY(){
  39 + return persionPinYinBuffer.getAll();
  40 + }
  41 +
  42 + @RequestMapping(value = "/list_py", method = RequestMethod.GET)
  43 + public List<PersionPinYin> findByCurrUser_PY(HttpServletRequest request){
  44 + List<CompanyAuthority> auths = (List<CompanyAuthority>) request.getSession().getAttribute(Constants.COMPANY_AUTHORITYS);
  45 + return persionPinYinBuffer.getAll(auths);
  46 + }
28 } 47 }
src/main/java/com/bsth/controller/realcontrol/BasicDataController.java
1 package com.bsth.controller.realcontrol; 1 package com.bsth.controller.realcontrol;
2 2
3 -import com.alibaba.fastjson.JSON;  
4 import com.alibaba.fastjson.serializer.PropertyFilter; 3 import com.alibaba.fastjson.serializer.PropertyFilter;
5 import com.bsth.common.ResponseCode; 4 import com.bsth.common.ResponseCode;
6 import com.bsth.data.BasicData; 5 import com.bsth.data.BasicData;
@@ -60,16 +59,16 @@ public class BasicDataController { @@ -60,16 +59,16 @@ public class BasicDataController {
60 return rs; 59 return rs;
61 } 60 }
62 61
63 - @RequestMapping("/personnel") 62 + /*@RequestMapping("/personnel")
64 public Map<String, Object> findPersonnelInfo(){ 63 public Map<String, Object> findPersonnelInfo(){
65 Map<String, Object> rs = new HashMap<>(); 64 Map<String, Object> rs = new HashMap<>();
66 PersonnelFieldFilter filter=new PersonnelFieldFilter(); 65 PersonnelFieldFilter filter=new PersonnelFieldFilter();
67 //驾驶员 66 //驾驶员
68 rs.put("jsy", JSON.parse(JSON.toJSONString(BasicData.jsyMap.values(), filter))); 67 rs.put("jsy", JSON.parse(JSON.toJSONString(BasicData.jsyMap.values(), filter)));
69 //售票员 68 //售票员
70 - rs.put("spy", JSON.parse(JSON.toJSONString(BasicData.spyMap.values(), filter))); 69 + rs.put("spy", JSON.parse(JSON.toJSONString(BasicData.spyMap.values(), filter)));*//*
71 return rs; 70 return rs;
72 - } 71 + }*/
73 72
74 @RequestMapping("/all_personnel") 73 @RequestMapping("/all_personnel")
75 public Map<String, String> all_personnel(){ 74 public Map<String, String> all_personnel(){
@@ -179,15 +178,12 @@ public class BasicDataController { @@ -179,15 +178,12 @@ public class BasicDataController {
179 map.put("lineCode", line.getLineCode()); 178 map.put("lineCode", line.getLineCode());
180 rs.add(map); 179 rs.add(map);
181 } 180 }
182 - //listMultimap.put(line.getName(), nbbm);  
183 } 181 }
184 - //return listMultimap.asMap();  
185 -  
186 return rs; 182 return rs;
187 } 183 }
188 184
189 /** 185 /**
190 - * 获取站点和停车场对照表 186 + * 获取站点和停车场历时公里对照表
191 * @param idx 187 * @param idx
192 * @return 188 * @return
193 */ 189 */
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -335,8 +335,9 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo, @@ -335,8 +335,9 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
335 @RequestMapping(value = "/correctForm") 335 @RequestMapping(value = "/correctForm")
336 public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date, 336 public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date,
337 @RequestParam String endDate, 337 @RequestParam String endDate,
338 - @RequestParam String lpName, @RequestParam String code, @RequestParam String type) {  
339 - return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type); 338 + @RequestParam String lpName, @RequestParam String code,
  339 + @RequestParam String type,@RequestParam String changType) {
  340 + return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type,changType);
340 } 341 }
341 /** 342 /**
342 * @Title queryListWaybill 343 * @Title queryListWaybill
src/main/java/com/bsth/data/BasicData.java
@@ -2,6 +2,7 @@ package com.bsth.data; @@ -2,6 +2,7 @@ package com.bsth.data;
2 2
3 import com.bsth.Application; 3 import com.bsth.Application;
4 import com.bsth.data.gpsdata.arrival.GeoCacheData; 4 import com.bsth.data.gpsdata.arrival.GeoCacheData;
  5 +import com.bsth.data.pinyin.PersionPinYinBuffer;
5 import com.bsth.entity.*; 6 import com.bsth.entity.*;
6 import com.bsth.entity.schedule.CarConfigInfo; 7 import com.bsth.entity.schedule.CarConfigInfo;
7 import com.bsth.repository.*; 8 import com.bsth.repository.*;
@@ -64,10 +65,10 @@ public class BasicData implements CommandLineRunner { @@ -64,10 +65,10 @@ public class BasicData implements CommandLineRunner {
64 //线路Code和shangHaiLinecode 对照 65 //线路Code和shangHaiLinecode 对照
65 public static Map<String, String> lineCode2ShangHaiCodeMap; 66 public static Map<String, String> lineCode2ShangHaiCodeMap;
66 67
67 - //驾驶员工号 和 personnel 对象映射 68 + /*//驾驶员工号 和 personnel 对象映射
68 public static Map<String, Personnel> jsyMap; 69 public static Map<String, Personnel> jsyMap;
69 //售票员工号 和 personnel 对象映射 70 //售票员工号 和 personnel 对象映射
70 - public static Map<String, Personnel> spyMap; 71 + public static Map<String, Personnel> spyMap;*/
71 //所以员工和personnerl 对象映射 72 //所以员工和personnerl 对象映射
72 public static Map<String, Personnel> perMap; 73 public static Map<String, Personnel> perMap;
73 //全量员工 工号和姓名对照 74 //全量员工 工号和姓名对照
@@ -137,6 +138,9 @@ public class BasicData implements CommandLineRunner { @@ -137,6 +138,9 @@ public class BasicData implements CommandLineRunner {
137 @Autowired 138 @Autowired
138 Station2ParkBuffer station2ParkBuffer; 139 Station2ParkBuffer station2ParkBuffer;
139 140
  141 + @Autowired
  142 + PersionPinYinBuffer persionPinYinBuffer;
  143 +
140 144
141 @Override 145 @Override
142 public void run() { 146 public void run() {
@@ -165,6 +169,8 @@ public class BasicData implements CommandLineRunner { @@ -165,6 +169,8 @@ public class BasicData implements CommandLineRunner {
165 geoCacheData.loadData(); 169 geoCacheData.loadData();
166 station2ParkBuffer.saveAll(); 170 station2ParkBuffer.saveAll();
167 logger.info("加载基础数据成功!,"); 171 logger.info("加载基础数据成功!,");
  172 + //人员拼音转换
  173 + persionPinYinBuffer.refresh();
168 } catch (Exception e) { 174 } catch (Exception e) {
169 logger.error("加载基础数据时出现异常,", e); 175 logger.error("加载基础数据时出现异常,", e);
170 } 176 }
@@ -321,7 +327,7 @@ public class BasicData implements CommandLineRunner { @@ -321,7 +327,7 @@ public class BasicData implements CommandLineRunner {
321 public void loadPersonnelInfo() { 327 public void loadPersonnelInfo() {
322 Iterator<Personnel> iterator = personnelRepository.findAll().iterator(); 328 Iterator<Personnel> iterator = personnelRepository.findAll().iterator();
323 329
324 - Map<String, Personnel> jsyTempMap = new HashMap<>(), spyTempMap = new HashMap<>(),perTempMap=new HashMap<>(); 330 + Map<String, Personnel> /*jsyTempMap = new HashMap<>(), spyTempMap = new HashMap<>(),*/perTempMap=new HashMap<>();
325 Map<String, String> allPersonMap = new HashMap<>(); 331 Map<String, String> allPersonMap = new HashMap<>();
326 332
327 Personnel p; 333 Personnel p;
@@ -333,20 +339,20 @@ public class BasicData implements CommandLineRunner { @@ -333,20 +339,20 @@ public class BasicData implements CommandLineRunner {
333 if (StringUtils.isEmpty(jobCode)) 339 if (StringUtils.isEmpty(jobCode))
334 continue; 340 continue;
335 341
336 - if (p.getPosts() != null) { 342 + /*if (p.getPosts() != null) {
337 if (p.getPosts().equals("1")) 343 if (p.getPosts().equals("1"))
338 jsyTempMap.put(jobCode, p); 344 jsyTempMap.put(jobCode, p);
339 else if (p.getPosts().equals("2")) 345 else if (p.getPosts().equals("2"))
340 spyTempMap.put(jobCode, p); 346 spyTempMap.put(jobCode, p);
341 - } 347 + }*/
342 348
343 perTempMap.put(jobCode, p); 349 perTempMap.put(jobCode, p);
344 350
345 allPersonMap.put(jobCode, p.getPersonnelName()); 351 allPersonMap.put(jobCode, p.getPersonnelName());
346 } 352 }
347 353
348 - jsyMap = jsyTempMap;  
349 - spyMap = spyTempMap; 354 + //jsyMap = jsyTempMap;
  355 + //spyMap = spyTempMap;
350 allPerson = allPersonMap; 356 allPerson = allPersonMap;
351 perMap = perTempMap; 357 perMap = perTempMap;
352 } 358 }
src/main/java/com/bsth/data/pinyin/PersionPinYin.java 0 → 100644
  1 +package com.bsth.data.pinyin;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonIgnore;
  4 +
  5 +/**
  6 + * 人员拼音映射
  7 + * Created by panzhao on 2017/7/19.
  8 + */
  9 +public class PersionPinYin {
  10 +
  11 + /**
  12 + * Id
  13 + */
  14 + private Integer id;
  15 +
  16 + /**
  17 + * 工号
  18 + */
  19 + private String workId;
  20 +
  21 + /**
  22 + * 姓名
  23 + */
  24 + private String name;
  25 +
  26 + /**
  27 + * 全拼
  28 + */
  29 + private String fullChars;
  30 +
  31 + /**
  32 + * 简便
  33 + */
  34 + private String camelChars;
  35 +
  36 + /**
  37 + * 所属公司编码
  38 + */
  39 + @JsonIgnore
  40 + private String companyId;
  41 +
  42 + /**
  43 + * 所属分公司编码
  44 + */
  45 + @JsonIgnore
  46 + private String fgsCompanyId;
  47 +
  48 + public String getWorkId() {
  49 + return workId;
  50 + }
  51 +
  52 + public void setWorkId(String workId) {
  53 + this.workId = workId;
  54 + }
  55 +
  56 + public String getName() {
  57 + return name;
  58 + }
  59 +
  60 + public void setName(String name) {
  61 + this.name = name;
  62 + }
  63 +
  64 + public String getFullChars() {
  65 + return fullChars;
  66 + }
  67 +
  68 + public void setFullChars(String fullChars) {
  69 + this.fullChars = fullChars;
  70 + }
  71 +
  72 + public String getCamelChars() {
  73 + return camelChars;
  74 + }
  75 +
  76 + public void setCamelChars(String camelChars) {
  77 + this.camelChars = camelChars;
  78 + }
  79 +
  80 + public String getCompanyId() {
  81 + return companyId;
  82 + }
  83 +
  84 + public void setCompanyId(String companyId) {
  85 + this.companyId = companyId;
  86 + }
  87 +
  88 + public String getFgsCompanyId() {
  89 + return fgsCompanyId;
  90 + }
  91 +
  92 + public void setFgsCompanyId(String fgsCompanyId) {
  93 + this.fgsCompanyId = fgsCompanyId;
  94 + }
  95 +
  96 + public Integer getId() {
  97 + return id;
  98 + }
  99 +
  100 + public void setId(Integer id) {
  101 + this.id = id;
  102 + }
  103 +}
src/main/java/com/bsth/data/pinyin/PersionPinYinBuffer.java 0 → 100644
  1 +package com.bsth.data.pinyin;
  2 +
  3 +import com.bsth.data.BasicData;
  4 +import com.bsth.entity.Personnel;
  5 +import com.bsth.entity.sys.CompanyAuthority;
  6 +import com.github.stuxuhai.jpinyin.PinyinException;
  7 +import com.github.stuxuhai.jpinyin.PinyinFormat;
  8 +import com.github.stuxuhai.jpinyin.PinyinHelper;
  9 +import com.google.common.collect.ArrayListMultimap;
  10 +import org.slf4j.Logger;
  11 +import org.slf4j.LoggerFactory;
  12 +import org.springframework.stereotype.Component;
  13 +
  14 +import java.util.ArrayList;
  15 +import java.util.Collection;
  16 +import java.util.List;
  17 +
  18 +/**
  19 + * 人员拼音数据映射缓存
  20 + * Created by panzhao on 2017/7/19.
  21 + */
  22 +@Component
  23 +public class PersionPinYinBuffer {
  24 +
  25 + static ArrayListMultimap<String, PersionPinYin> listMultimap = ArrayListMultimap.create();
  26 + static List<PersionPinYin> all = new ArrayList<>();
  27 +
  28 + Logger log = LoggerFactory.getLogger(this.getClass());
  29 +
  30 +
  31 + public void refresh(){
  32 + ArrayListMultimap<String, PersionPinYin> listMultimapCopy = ArrayListMultimap.create();
  33 + List<PersionPinYin> allCopy = new ArrayList<>();
  34 + PersionPinYin ppy;
  35 +
  36 + Collection<Personnel> list = BasicData.perMap.values();
  37 + for(Personnel p : list){
  38 + ppy = new PersionPinYin();
  39 + ppy.setId(p.getId());
  40 + ppy.setCompanyId(p.getCompanyCode());
  41 + ppy.setFgsCompanyId(p.getBrancheCompanyCode());
  42 + ppy.setName(p.getPersonnelName());
  43 + ppy.setWorkId(p.getJobCode());
  44 + try {
  45 + ppy.setFullChars(PinyinHelper.convertToPinyinString(ppy.getName(), "" , PinyinFormat.WITHOUT_TONE));
  46 + ppy.setCamelChars(PinyinHelper.getShortPinyin(ppy.getName()));
  47 + }catch (PinyinException pye){
  48 + log.error("拼音转换出现异常," + ppy.getName(), pye);
  49 + continue;
  50 + }
  51 +
  52 + listMultimapCopy.put(ppy.getCompanyId() + "_" + ppy.getFgsCompanyId(), ppy);
  53 + allCopy.add(ppy);
  54 + }
  55 +
  56 + if(allCopy.size() > 0){
  57 + all = allCopy;
  58 + listMultimap = listMultimapCopy;
  59 + }
  60 + }
  61 +
  62 + public List<PersionPinYin> getAll(){
  63 + return all;
  64 + }
  65 +
  66 + public List<PersionPinYin> getAll(List<CompanyAuthority> auths){
  67 + List<PersionPinYin> rs = new ArrayList<>();
  68 + for(CompanyAuthority ca : auths){
  69 + rs.addAll(listMultimap.get(ca.getCompanyCode() + "_" + ca.getSubCompanyCode()));
  70 + }
  71 + return rs;
  72 + }
  73 +}
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -7,6 +7,7 @@ import com.bsth.common.ResponseCode; @@ -7,6 +7,7 @@ import com.bsth.common.ResponseCode;
7 import com.bsth.data.LineConfigData; 7 import com.bsth.data.LineConfigData;
8 import com.bsth.data.gpsdata.GpsRealData; 8 import com.bsth.data.gpsdata.GpsRealData;
9 import com.bsth.data.gpsdata.recovery.GpsDataRecovery; 9 import com.bsth.data.gpsdata.recovery.GpsDataRecovery;
  10 +import com.bsth.data.schedule.f_a_l.FirstAndLastHandler;
10 import com.bsth.entity.realcontrol.LineConfig; 11 import com.bsth.entity.realcontrol.LineConfig;
11 import com.bsth.entity.realcontrol.ScheduleRealInfo; 12 import com.bsth.entity.realcontrol.ScheduleRealInfo;
12 import com.bsth.entity.schedule.SchedulePlanInfo; 13 import com.bsth.entity.schedule.SchedulePlanInfo;
@@ -176,6 +177,8 @@ public class DayOfSchedule { @@ -176,6 +177,8 @@ public class DayOfSchedule {
176 //添加到缓存 177 //添加到缓存
177 putAll(list); 178 putAll(list);
178 179
  180 + //标记首末班
  181 + FirstAndLastHandler.marks(list);
179 182
180 Set<String> lps = searchAllLP(list); 183 Set<String> lps = searchAllLP(list);
181 for (String lp : lps) { 184 for (String lp : lps) {
src/main/java/com/bsth/data/schedule/f_a_l/FirstAndLastHandler.java 0 → 100644
  1 +package com.bsth.data.schedule.f_a_l;
  2 +
  3 +import com.bsth.data.BasicData;
  4 +import com.bsth.data.schedule.DayOfSchedule;
  5 +import com.bsth.data.schedule.ScheduleComparator;
  6 +import com.bsth.data.schedule.f_a_l.entity.ToGateway;
  7 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  8 +import com.bsth.util.db.DBUtils_MS;
  9 +import org.slf4j.Logger;
  10 +import org.slf4j.LoggerFactory;
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.jdbc.core.BatchPreparedStatementSetter;
  13 +import org.springframework.jdbc.core.JdbcTemplate;
  14 +import org.springframework.jdbc.datasource.DataSourceTransactionManager;
  15 +import org.springframework.stereotype.Component;
  16 +import org.springframework.transaction.TransactionDefinition;
  17 +import org.springframework.transaction.TransactionStatus;
  18 +import org.springframework.transaction.support.DefaultTransactionDefinition;
  19 +
  20 +import java.sql.PreparedStatement;
  21 +import java.sql.SQLException;
  22 +import java.util.ArrayList;
  23 +import java.util.Collections;
  24 +import java.util.List;
  25 +import java.util.concurrent.ConcurrentHashMap;
  26 +
  27 +/**
  28 + * 首末班处理程序
  29 + * Created by panzhao on 2017/7/19.
  30 + */
  31 +@Component
  32 +public class FirstAndLastHandler {
  33 +
  34 + static ConcurrentHashMap<String, ToGateway> maps = new ConcurrentHashMap<>();
  35 +
  36 + static Logger log = LoggerFactory.getLogger(FirstAndLastHandler.class);
  37 +
  38 + static boolean flag;
  39 +
  40 + @Autowired
  41 + DayOfSchedule dayOfSchedule;
  42 +
  43 + public void marks(String lineCode){
  44 + marks(dayOfSchedule.findByLineCode(lineCode));
  45 + }
  46 +
  47 + /**
  48 + * 标记首末班
  49 + * @param list
  50 + */
  51 + public static void marks(List<ScheduleRealInfo> list){
  52 + try{
  53 + Collections.sort(list, new ScheduleComparator.FCSJ());
  54 + //按上下行分组
  55 + List<ScheduleRealInfo> ups = new ArrayList<>(),
  56 + downs = new ArrayList<>();
  57 +
  58 + for(ScheduleRealInfo sch : list){
  59 + if(sch.getXlDir().equals("0"))
  60 + ups.add(sch);
  61 + else
  62 + downs.add(sch);
  63 + }
  64 +
  65 + markOneWay(ups);
  66 + markOneWay(downs);
  67 + }catch (Exception e){
  68 + log.error("", e);
  69 + }
  70 + }
  71 +
  72 + /**
  73 + * 标记单程,上行或下行
  74 + * @param list
  75 + */
  76 + private static void markOneWay(List<ScheduleRealInfo> list){
  77 + ScheduleRealInfo first = null, last = null;
  78 +
  79 + for(ScheduleRealInfo sch: list){
  80 + if(sch._isInout() || sch.getBcType().equals("region")
  81 + || sch.getBcType().equals("venting"))
  82 + continue;
  83 +
  84 + if(first == null)
  85 + first = sch;
  86 +
  87 + last = sch;
  88 + }
  89 +
  90 + put(first, last);
  91 + }
  92 +
  93 + private static void put(ScheduleRealInfo first, ScheduleRealInfo last){
  94 + if(first == null || last == null)
  95 + return;
  96 +
  97 + ToGateway tg = new ToGateway();
  98 + tg.setLineCode(first.getXlBm());
  99 + tg.setUpDown(Integer.parseInt(first.getXlDir()));
  100 + tg.setsDeviceId(BasicData.deviceId2NbbmMap.inverse().get(first.getClZbh()));
  101 + tg.setSt(first.getDfsjT());
  102 +
  103 + tg.setRq(first.getScheduleDateStr());
  104 +
  105 + tg.seteDeviceId(BasicData.deviceId2NbbmMap.inverse().get(last.getClZbh()));
  106 + tg.setEt(last.getDfsjT());
  107 +
  108 + maps.put(tg.getLineCode() + "_" + tg.getUpDown(), tg);
  109 + flag = true;
  110 + }
  111 +
  112 + public static void saveAll(){
  113 + if(!flag)
  114 + return;
  115 +
  116 + final List<ToGateway> pstList = new ArrayList<>(maps.values());
  117 + if(pstList == null || pstList.size() == 0)
  118 + return;
  119 +
  120 + flag = false;
  121 + JdbcTemplate jdbcTemp = new JdbcTemplate(DBUtils_MS.getDataSource());
  122 + //编程式事务
  123 + DataSourceTransactionManager tran = new DataSourceTransactionManager(jdbcTemp.getDataSource());
  124 + DefaultTransactionDefinition def = new DefaultTransactionDefinition();
  125 + def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
  126 + TransactionStatus status = tran.getTransaction(def);
  127 +
  128 + try{
  129 + //删除
  130 + jdbcTemp.update("delete from bsth_t_first_last");
  131 + //重新写入
  132 + jdbcTemp.batchUpdate("insert into bsth_t_first_last(line_code, s_device_id, st, e_device_id, et, up_down, rq) VALUES(?, ?, ?, ?, ?, ?, ?)", new BatchPreparedStatementSetter() {
  133 + @Override
  134 + public void setValues(PreparedStatement ps, int i) throws SQLException {
  135 + ToGateway tg = pstList.get(i);
  136 + ps.setString(1, tg.getLineCode());
  137 + ps.setString(2, tg.getsDeviceId());
  138 + ps.setLong(3, tg.getSt());
  139 + ps.setString(4, tg.geteDeviceId());
  140 + ps.setLong(5, tg.getEt());
  141 + ps.setInt(6, tg.getUpDown());
  142 + ps.setString(7, tg.getRq());
  143 + }
  144 +
  145 + @Override
  146 + public int getBatchSize() {
  147 + return pstList.size();
  148 + }
  149 + });
  150 +
  151 + log.info("首末班数据入库," + pstList.size());
  152 + tran.commit(status);
  153 + }catch (Exception e){
  154 + log.error("", e);
  155 + tran.rollback(status);
  156 + }
  157 + }
  158 +}
src/main/java/com/bsth/data/schedule/f_a_l/entity/ToGateway.java 0 → 100644
  1 +package com.bsth.data.schedule.f_a_l.entity;
  2 +
  3 +/**
  4 + * 发送给网关的首末班数据格式
  5 + * Created by panzhao on 2017/7/19.
  6 + */
  7 +public class ToGateway {
  8 +
  9 + /** 线路 */
  10 + private String lineCode;
  11 +
  12 + /** 上下行 */
  13 + private int upDown;
  14 +
  15 + /** 首班设备号 */
  16 + private String sDeviceId;
  17 +
  18 + /** 首班时间 */
  19 + private Long st;
  20 +
  21 + /** 末班设备号 */
  22 + private String eDeviceId;
  23 +
  24 + /** 末班时间 */
  25 + private Long et;
  26 +
  27 + /** 班次日期 */
  28 + private String rq;
  29 +
  30 +
  31 + public String getLineCode() {
  32 + return lineCode;
  33 + }
  34 +
  35 + public void setLineCode(String lineCode) {
  36 + this.lineCode = lineCode;
  37 + }
  38 +
  39 + public Long getSt() {
  40 + return st;
  41 + }
  42 +
  43 + public void setSt(Long st) {
  44 + this.st = st;
  45 + }
  46 +
  47 + public Long getEt() {
  48 + return et;
  49 + }
  50 +
  51 + public void setEt(Long et) {
  52 + this.et = et;
  53 + }
  54 +
  55 + public String getRq() {
  56 + return rq;
  57 + }
  58 +
  59 + public void setRq(String rq) {
  60 + this.rq = rq;
  61 + }
  62 +
  63 + public int getUpDown() {
  64 + return upDown;
  65 + }
  66 +
  67 + public void setUpDown(int upDown) {
  68 + this.upDown = upDown;
  69 + }
  70 +
  71 + public String getsDeviceId() {
  72 + return sDeviceId;
  73 + }
  74 +
  75 + public void setsDeviceId(String sDeviceId) {
  76 + this.sDeviceId = sDeviceId;
  77 + }
  78 +
  79 + public String geteDeviceId() {
  80 + return eDeviceId;
  81 + }
  82 +
  83 + public void seteDeviceId(String eDeviceId) {
  84 + this.eDeviceId = eDeviceId;
  85 + }
  86 +}
src/main/java/com/bsth/data/schedule/thread/ScheduleRefreshThread.java
@@ -5,6 +5,7 @@ import com.bsth.data.LineConfigData; @@ -5,6 +5,7 @@ import com.bsth.data.LineConfigData;
5 import com.bsth.data.directive.DayOfDirectives; 5 import com.bsth.data.directive.DayOfDirectives;
6 import com.bsth.data.pilot80.PilotReport; 6 import com.bsth.data.pilot80.PilotReport;
7 import com.bsth.data.schedule.DayOfSchedule; 7 import com.bsth.data.schedule.DayOfSchedule;
  8 +import com.bsth.data.schedule.f_a_l.FirstAndLastHandler;
8 import com.bsth.entity.realcontrol.LineConfig; 9 import com.bsth.entity.realcontrol.LineConfig;
9 import org.slf4j.Logger; 10 import org.slf4j.Logger;
10 import org.slf4j.LoggerFactory; 11 import org.slf4j.LoggerFactory;
@@ -69,7 +70,9 @@ public class ScheduleRefreshThread extends Thread{ @@ -69,7 +70,9 @@ public class ScheduleRefreshThread extends Thread{
69 logger.info(lineCode + "翻班完成, " + currSchDate + " -班次数量:" + dayOfSchedule.findByLineCode(lineCode).size()); 70 logger.info(lineCode + "翻班完成, " + currSchDate + " -班次数量:" + dayOfSchedule.findByLineCode(lineCode).size());
70 } 71 }
71 } 72 }
72 - 73 +
  74 + //首末班入库(给网关用的数据)
  75 + FirstAndLastHandler.saveAll();
73 } catch (Exception e) { 76 } catch (Exception e) {
74 logger.error("", e); 77 logger.error("", e);
75 } 78 }
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -105,7 +105,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -105,7 +105,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
105 List<Map<String,Object>> accountPx(String line,String date,String code,String xlName, String px); 105 List<Map<String,Object>> accountPx(String line,String date,String code,String xlName, String px);
106 106
107 107
108 - List<SchEditInfoDto> correctForm(String line,String date,String endDate,String lpName,String code, String type); 108 + List<SchEditInfoDto> correctForm(String line,String date,String endDate,String lpName,String code, String type,String changType);
109 109
110 List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line); 110 List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line);
111 111
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -1810,7 +1810,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1810,7 +1810,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1810 1810
1811 @Override 1811 @Override
1812 public List<SchEditInfoDto> correctForm(String line,String date,String endDate, 1812 public List<SchEditInfoDto> correctForm(String line,String date,String endDate,
1813 - String lpName,String code, String type) { 1813 + String lpName,String code, String type,String changType) {
1814 1814
1815 // var types = {'DFTZ': '待发调整', 'FCXXWT':'发车信息微调', 'JHLB': '计划烂班', 'CXLB': '撤销烂班', 1815 // var types = {'DFTZ': '待发调整', 'FCXXWT':'发车信息微调', 'JHLB': '计划烂班', 'CXLB': '撤销烂班',
1816 // 'CXZX': '撤销执行', 'CXSF': '撤销实发', 'SFTZ': '实发调整', 'TZRC': '调整人车'}; 1816 // 'CXZX': '撤销执行', 'CXSF': '撤销实发', 'SFTZ': '实发调整', 'TZRC': '调整人车'};
@@ -1824,6 +1824,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1824,6 +1824,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1824 map.put("SFTZ", "实发调整"); 1824 map.put("SFTZ", "实发调整");
1825 map.put("TZRC", "调整人车"); 1825 map.put("TZRC", "调整人车");
1826 1826
  1827 + SimpleDateFormat sdf1=new SimpleDateFormat("HH:mm");
  1828 + SimpleDateFormat sdf2=new SimpleDateFormat("yyyy-MM-dd HH:mm");
1827 String cont = ""; 1829 String cont = "";
1828 cont = " and xl_bm ='"+line +"'"; 1830 cont = " and xl_bm ='"+line +"'";
1829 if(!lpName.equals("")){ 1831 if(!lpName.equals("")){
@@ -1832,7 +1834,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1832,7 +1834,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1832 if(!code.equals("")){ 1834 if(!code.equals("")){
1833 cont +=" and cl_zbh ='"+code+"'"; 1835 cont +=" and cl_zbh ='"+code+"'";
1834 } 1836 }
1835 - String sql = "select t1.*, " 1837 + String sql = "select t1.*, t2.real_exec_date,"
1836 + "t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name," 1838 + "t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name,"
1837 + "t2.xl_dir,t2.real_exec_date from (select * from " 1839 + "t2.xl_dir,t2.real_exec_date from (select * from "
1838 + "logger_sch_modify where rq BETWEEN ? and ? and line_code=? )" 1840 + "logger_sch_modify where rq BETWEEN ? and ? and line_code=? )"
@@ -1843,9 +1845,39 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1843,9 +1845,39 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1843 new BeanPropertyRowMapper(SchEditInfoDto.class),date,endDate, line); 1845 new BeanPropertyRowMapper(SchEditInfoDto.class),date,endDate, line);
1844 List<SchEditInfoDto> lists=new ArrayList<SchEditInfoDto>(); 1846 List<SchEditInfoDto> lists=new ArrayList<SchEditInfoDto>();
1845 for (int i = 0; i < list.size(); i++) { 1847 for (int i = 0; i < list.size(); i++) {
  1848 + Long fcsjs=0l;
  1849 + Long updsj=0l;
1846 SchEditInfoDto t=list.get(i); 1850 SchEditInfoDto t=list.get(i);
1847 if(map.get(t.getType())!=null){ 1851 if(map.get(t.getType())!=null){
1848 - t.setType2(t.getUser()+"于"+t.getTimeStr()+"进行"+map.get(t.getType()).toString()+";"); 1852 +
  1853 + if(changType.equals("")){
  1854 + t.setType2(t.getUser()+"于"+t.getTimeStr()+"进行"+map.get(t.getType()).toString()+";");
  1855 + }else{
  1856 + String fcsj="";
  1857 + String updtime="";
  1858 + try {
  1859 + fcsj= sdf1.format(sdf1.parse(t.getFcsj()));
  1860 + updtime=sdf1.format(sdf1.parse(t.getTimeStr()));
  1861 + fcsjs=sdf2.parse(t.getRealExecDate()+" "+fcsj).getTime();
  1862 + updsj=sdf2.parse(t.getRq()+" "+updtime).getTime();
  1863 + } catch (ParseException e) {
  1864 + // TODO Auto-generated catch block
  1865 + e.printStackTrace();
  1866 + }
  1867 + if(changType.equals("1")){
  1868 + if(fcsjs>updsj){
  1869 + t.setType2(t.getUser()+"于"+t.getTimeStr()+"进行"+map.get(t.getType()).toString()+";");
  1870 + }else{
  1871 + t.setType2("");
  1872 + }
  1873 + }else if(changType.equals("2")){
  1874 + if(fcsjs<updsj){
  1875 + t.setType2(t.getUser()+"于"+t.getTimeStr()+"进行"+map.get(t.getType()).toString()+";");
  1876 + }else{
  1877 + t.setType2("");
  1878 + }
  1879 + }
  1880 + }
1849 }else{ 1881 }else{
1850 t.setType2(""); 1882 t.setType2("");
1851 } 1883 }
@@ -1859,7 +1891,19 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1859,7 +1891,19 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1859 } 1891 }
1860 1892
1861 if(fage){ 1893 if(fage){
1862 - lists.add(t); 1894 + if(changType.equals("")){
  1895 + lists.add(t);
  1896 + } else {
  1897 + if (changType.equals("1")) {
  1898 + if (fcsjs > updsj) {
  1899 + lists.add(t);
  1900 + }
  1901 + } else if (changType.equals("2")) {
  1902 + if (fcsjs < updsj) {
  1903 + lists.add(t);
  1904 + }
  1905 + }
  1906 + }
1863 } 1907 }
1864 } 1908 }
1865 1909
src/main/java/com/bsth/service/schedule/impl/CarDeviceServiceImpl.java
@@ -7,6 +7,8 @@ import com.bsth.service.schedule.CarDeviceService; @@ -7,6 +7,8 @@ import com.bsth.service.schedule.CarDeviceService;
7 import com.bsth.service.schedule.exception.ScheduleException; 7 import com.bsth.service.schedule.exception.ScheduleException;
8 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
9 import org.springframework.stereotype.Service; 9 import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Isolation;
  11 +import org.springframework.transaction.annotation.Propagation;
10 import org.springframework.transaction.annotation.Transactional; 12 import org.springframework.transaction.annotation.Transactional;
11 import org.springframework.util.CollectionUtils; 13 import org.springframework.util.CollectionUtils;
12 14
@@ -21,7 +23,7 @@ public class CarDeviceServiceImpl extends BServiceImpl&lt;CarDevice, Long&gt; implemen @@ -21,7 +23,7 @@ public class CarDeviceServiceImpl extends BServiceImpl&lt;CarDevice, Long&gt; implemen
21 @Autowired 23 @Autowired
22 private CarsService carsService; 24 private CarsService carsService;
23 25
24 - @Transactional 26 + @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)
25 @Override 27 @Override
26 public CarDevice save(CarDevice carDevice) { 28 public CarDevice save(CarDevice carDevice) {
27 // 查找对应的车辆基础信息,更新设备编号数据 29 // 查找对应的车辆基础信息,更新设备编号数据
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
@@ -144,6 +144,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -144,6 +144,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
144 return ttInfoDetailForEdit.getEditInfo(xlid, ttid, maxfcno); 144 return ttInfoDetailForEdit.getEditInfo(xlid, ttid, maxfcno);
145 } 145 }
146 146
  147 + public static void main(String[] args) {
  148 + String test = "中1中111";
  149 + System.out.println(test.replaceAll("(\\d+)$", ""));
  150 + }
  151 +
147 @Override 152 @Override
148 public void validateExcelSheet(String filename, String sheetname, Integer lineid, String linename) throws ScheduleException { 153 public void validateExcelSheet(String filename, String sheetname, Integer lineid, String linename) throws ScheduleException {
149 try { 154 try {
@@ -162,8 +167,9 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -162,8 +167,9 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
162 if (StringUtils.isEmpty(cell_con)) { 167 if (StringUtils.isEmpty(cell_con)) {
163 throw new Exception(String.format("第1行,第%d列数据不能为空", i + 1)); 168 throw new Exception(String.format("第1行,第%d列数据不能为空", i + 1));
164 } else { 169 } else {
165 - // 正则表达式去除数字  
166 - cell_con = cell_con.replaceAll("[\\d+]", ""); 170 + // 正则表达式去除右侧数字
  171 +// cell_con = cell_con.replaceAll("[\\d+]", "");
  172 + cell_con = cell_con.replaceAll("(\\d+)$", "");
167 173
168 if (i == 0) { // 第一列必须是路牌2个字 174 if (i == 0) { // 第一列必须是路牌2个字
169 if (!"路牌".equals(cell_con.trim())) { 175 if (!"路牌".equals(cell_con.trim())) {
src/main/resources/datatools/ktrs/ttinfodetailDataInput.ktr
@@ -828,7 +828,7 @@ @@ -828,7 +828,7 @@
828 <optimizationLevel>9</optimizationLevel> 828 <optimizationLevel>9</optimizationLevel>
829 <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> 829 <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
830 <jsScript_name>Script 1</jsScript_name> 830 <jsScript_name>Script 1</jsScript_name>
831 - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;&#x2f;&#x2f; &#x4f7f;&#x7528;&#x6b63;&#x5219;&#x8868;&#x8fbe;&#x5f0f;&#x53bb;&#x9664;&#x7ad9;&#x70b9;&#x540d;&#x79f0;&#x4e2d;&#x7684;&#x6570;&#x5b57;&#xa;qdzname &#x3d; qdzname.replace&#x28;&#x2f;&#x5c;d&#x2b;&#x2f;g,&#x27;&#x27;&#x29;&#x3b;&#xa;&#xa;&#x2f;&#x2f; sendtime&#x5904;&#x7406;&#xff0c;hhmm&#xff0c;hh&#x3a;mm&#xff0c;hh,mm&#xa;var sendtime_calcu&#x3b;&#xa;if &#x28;sendtime.length &#x3d;&#x3d; 5&#x29; &#x7b; &#x2f;&#x2f; &#x6700;&#x957f;&#x683c;&#x5f0f;&#xff0c;&#x5305;&#x62ec;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x7edf;&#x4e00;&#x628a;&#x5206;&#x9694;&#x7b26;&#x66ff;&#x6362;&#x6210;&#x5192;&#x53f7;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 2&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;3, 2&#x29;&#x3b;&#xa;&#x7d; else if &#x28;sendtime.length &#x3d;&#x3d; 4&#x29; &#x7b;&#xa; if &#x28;sendtime.indexOf&#x28;&#x22;&#x3a;&#x22;&#x29; &#x3e; 0&#x29; &#x7b; &#x2f;&#x2f; &#x5192;&#x53f7;&#x5206;&#x9694;&#xff0c;&#x65e0;&#x9700;&#x4fee;&#x6539;&#xa; sendtime_calcu &#x3d; sendtime&#x3b;&#xa; &#x7d; else if &#x28;sendtime.indexOf&#x28;&#x22;,&#x22;&#x29; &#x3e; 0&#x29; &#x7b; &#x2f;&#x2f; &#x9017;&#x53f7;&#x5206;&#x9694;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 1&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;2, 2&#x29;&#x3b;&#xa; &#x7d; else &#x7b; &#x2f;&#x2f; &#x65e0;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 2&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;2, 2&#x29;&#x3b;&#xa; &#x7d;&#xa;&#x7d; else if &#x28;sendtime.length &#x3d;&#x3d; 3&#x29; &#x7b; &#x2f;&#x2f; &#x65e0;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 1&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;1, 2&#x29;&#x3b;&#xa;&#x7d;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;&#x5206;&#x73ed;&#xa;var isfb &#x3d; 0&#x3b;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;&#x505c;&#x9a76;&#xa;var ists &#x3d; 0&#x3b;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;isCanceled&#xa;var iscanceled &#x3d; 0&#x3b;</jsScript_script> 831 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;&#x2f;&#x2f; &#x4f7f;&#x7528;&#x6b63;&#x5219;&#x8868;&#x8fbe;&#x5f0f;&#x53bb;&#x9664;&#x7ad9;&#x70b9;&#x540d;&#x79f0;&#x53f3;&#x4fa7;&#x591a;&#x4f59;&#x7684;&#x6570;&#x5b57;&#xa;qdzname &#x3d; qdzname.replace&#x28;&#x2f;&#x28;&#x5c;d&#x2b;&#x24;&#x29;&#x2f;g,&#x27;&#x27;&#x29;&#x3b;&#xa;&#xa;&#x2f;&#x2f; sendtime&#x5904;&#x7406;&#xff0c;hhmm&#xff0c;hh&#x3a;mm&#xff0c;hh,mm&#xa;var sendtime_calcu&#x3b;&#xa;if &#x28;sendtime.length &#x3d;&#x3d; 5&#x29; &#x7b; &#x2f;&#x2f; &#x6700;&#x957f;&#x683c;&#x5f0f;&#xff0c;&#x5305;&#x62ec;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x7edf;&#x4e00;&#x628a;&#x5206;&#x9694;&#x7b26;&#x66ff;&#x6362;&#x6210;&#x5192;&#x53f7;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 2&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;3, 2&#x29;&#x3b;&#xa;&#x7d; else if &#x28;sendtime.length &#x3d;&#x3d; 4&#x29; &#x7b;&#xa; if &#x28;sendtime.indexOf&#x28;&#x22;&#x3a;&#x22;&#x29; &#x3e; 0&#x29; &#x7b; &#x2f;&#x2f; &#x5192;&#x53f7;&#x5206;&#x9694;&#xff0c;&#x65e0;&#x9700;&#x4fee;&#x6539;&#xa; sendtime_calcu &#x3d; sendtime&#x3b;&#xa; &#x7d; else if &#x28;sendtime.indexOf&#x28;&#x22;,&#x22;&#x29; &#x3e; 0&#x29; &#x7b; &#x2f;&#x2f; &#x9017;&#x53f7;&#x5206;&#x9694;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 1&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;2, 2&#x29;&#x3b;&#xa; &#x7d; else &#x7b; &#x2f;&#x2f; &#x65e0;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 2&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;2, 2&#x29;&#x3b;&#xa; &#x7d;&#xa;&#x7d; else if &#x28;sendtime.length &#x3d;&#x3d; 3&#x29; &#x7b; &#x2f;&#x2f; &#x65e0;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 1&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;1, 2&#x29;&#x3b;&#xa;&#x7d;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;&#x5206;&#x73ed;&#xa;var isfb &#x3d; 0&#x3b;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;&#x505c;&#x9a76;&#xa;var ists &#x3d; 0&#x3b;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;isCanceled&#xa;var iscanceled &#x3d; 0&#x3b;</jsScript_script>
832 </jsScript> </jsScripts> <fields> <field> <name>qdzname</name> 832 </jsScript> </jsScripts> <fields> <field> <name>qdzname</name>
833 <rename>qdzname</rename> 833 <rename>qdzname</rename>
834 <type>String</type> 834 <type>String</type>
src/main/resources/datatools/ktrs/ttinfodetailDataInput2.ktr
@@ -828,7 +828,7 @@ @@ -828,7 +828,7 @@
828 <optimizationLevel>9</optimizationLevel> 828 <optimizationLevel>9</optimizationLevel>
829 <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> 829 <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
830 <jsScript_name>Script 1</jsScript_name> 830 <jsScript_name>Script 1</jsScript_name>
831 - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;&#x2f;&#x2f; &#x4f7f;&#x7528;&#x6b63;&#x5219;&#x8868;&#x8fbe;&#x5f0f;&#x53bb;&#x9664;&#x7ad9;&#x70b9;&#x540d;&#x79f0;&#x4e2d;&#x7684;&#x6570;&#x5b57;&#xa;qdzname &#x3d; qdzname.replace&#x28;&#x2f;&#x5c;d&#x2b;&#x2f;g,&#x27;&#x27;&#x29;&#x3b;&#xa;&#xa;&#x2f;&#x2f; sendtime&#x5904;&#x7406;&#xff0c;hhmm&#xff0c;hh&#x3a;mm&#xff0c;hh,mm&#xa;var sendtime_calcu&#x3b;&#xa;if &#x28;sendtime.length &#x3d;&#x3d; 5&#x29; &#x7b; &#x2f;&#x2f; &#x6700;&#x957f;&#x683c;&#x5f0f;&#xff0c;&#x5305;&#x62ec;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x7edf;&#x4e00;&#x628a;&#x5206;&#x9694;&#x7b26;&#x66ff;&#x6362;&#x6210;&#x5192;&#x53f7;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 2&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;3, 2&#x29;&#x3b;&#xa;&#x7d; else if &#x28;sendtime.length &#x3d;&#x3d; 4&#x29; &#x7b;&#xa; if &#x28;sendtime.indexOf&#x28;&#x22;&#x3a;&#x22;&#x29; &#x3e; 0&#x29; &#x7b; &#x2f;&#x2f; &#x5192;&#x53f7;&#x5206;&#x9694;&#xff0c;&#x65e0;&#x9700;&#x4fee;&#x6539;&#xa; sendtime_calcu &#x3d; sendtime&#x3b;&#xa; &#x7d; else if &#x28;sendtime.indexOf&#x28;&#x22;,&#x22;&#x29; &#x3e; 0&#x29; &#x7b; &#x2f;&#x2f; &#x9017;&#x53f7;&#x5206;&#x9694;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 1&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;2, 2&#x29;&#x3b;&#xa; &#x7d; else &#x7b; &#x2f;&#x2f; &#x65e0;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 2&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;2, 2&#x29;&#x3b;&#xa; &#x7d;&#xa;&#x7d; else if &#x28;sendtime.length &#x3d;&#x3d; 3&#x29; &#x7b; &#x2f;&#x2f; &#x65e0;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 1&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;1, 2&#x29;&#x3b;&#xa;&#x7d;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;&#x5206;&#x73ed;&#xa;var isfb &#x3d; 0&#x3b;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;&#x505c;&#x9a76;&#xa;var ists &#x3d; 0&#x3b;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;isCanceled&#xa;var iscanceled &#x3d; 0&#x3b;</jsScript_script> 831 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;&#x2f;&#x2f; &#x4f7f;&#x7528;&#x6b63;&#x5219;&#x8868;&#x8fbe;&#x5f0f;&#x53bb;&#x9664;&#x7ad9;&#x70b9;&#x540d;&#x79f0;&#x53f3;&#x4fa7;&#x591a;&#x4f59;&#x7684;&#x6570;&#x5b57;&#xa;qdzname &#x3d; qdzname.replace&#x28;&#x2f;&#x28;&#x5c;d&#x2b;&#x24;&#x29;&#x2f;g,&#x27;&#x27;&#x29;&#x3b;&#xa;&#xa;&#x2f;&#x2f; sendtime&#x5904;&#x7406;&#xff0c;hhmm&#xff0c;hh&#x3a;mm&#xff0c;hh,mm&#xa;var sendtime_calcu&#x3b;&#xa;if &#x28;sendtime.length &#x3d;&#x3d; 5&#x29; &#x7b; &#x2f;&#x2f; &#x6700;&#x957f;&#x683c;&#x5f0f;&#xff0c;&#x5305;&#x62ec;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x7edf;&#x4e00;&#x628a;&#x5206;&#x9694;&#x7b26;&#x66ff;&#x6362;&#x6210;&#x5192;&#x53f7;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 2&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;3, 2&#x29;&#x3b;&#xa;&#x7d; else if &#x28;sendtime.length &#x3d;&#x3d; 4&#x29; &#x7b;&#xa; if &#x28;sendtime.indexOf&#x28;&#x22;&#x3a;&#x22;&#x29; &#x3e; 0&#x29; &#x7b; &#x2f;&#x2f; &#x5192;&#x53f7;&#x5206;&#x9694;&#xff0c;&#x65e0;&#x9700;&#x4fee;&#x6539;&#xa; sendtime_calcu &#x3d; sendtime&#x3b;&#xa; &#x7d; else if &#x28;sendtime.indexOf&#x28;&#x22;,&#x22;&#x29; &#x3e; 0&#x29; &#x7b; &#x2f;&#x2f; &#x9017;&#x53f7;&#x5206;&#x9694;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 1&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;2, 2&#x29;&#x3b;&#xa; &#x7d; else &#x7b; &#x2f;&#x2f; &#x65e0;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 2&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;2, 2&#x29;&#x3b;&#xa; &#x7d;&#xa;&#x7d; else if &#x28;sendtime.length &#x3d;&#x3d; 3&#x29; &#x7b; &#x2f;&#x2f; &#x65e0;&#x5206;&#x9694;&#x7b26;&#xff0c;&#x6539;&#x6210;&#x5192;&#x53f7;&#x5206;&#x9694;&#xa; sendtime_calcu &#x3d; sendtime.substr&#x28;0, 1&#x29; &#x2b; &#x22;&#x3a;&#x22; &#x2b; sendtime.substr&#x28;1, 2&#x29;&#x3b;&#xa;&#x7d;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;&#x5206;&#x73ed;&#xa;var isfb &#x3d; 0&#x3b;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;&#x505c;&#x9a76;&#xa;var ists &#x3d; 0&#x3b;&#xa;&#xa;&#x2f;&#x2f; &#x8bbe;&#x7f6e;isCanceled&#xa;var iscanceled &#x3d; 0&#x3b;</jsScript_script>
832 </jsScript> </jsScripts> <fields> <field> <name>qdzname</name> 832 </jsScript> </jsScripts> <fields> <field> <name>qdzname</name>
833 <rename>qdzname</rename> 833 <rename>qdzname</rename>
834 <type>String</type> 834 <type>String</type>
src/main/resources/static/pages/forms/statement/correctForm.html
@@ -28,26 +28,35 @@ @@ -28,26 +28,35 @@
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 <form class="form-inline" action=""> 29 <form class="form-inline" action="">
30 <div style="display: inline-block;"> 30 <div style="display: inline-block;">
31 - <span class="item-label" style="width: 80px;">线路: </span> 31 + <span class="item-label" style="width: 140px;">线路: </span>
32 <select class="form-control" name="line" id="line" style="width: 136px;"></select> 32 <select class="form-control" name="line" id="line" style="width: 136px;"></select>
33 </div> 33 </div>
34 <div style="display: inline-block;margin-left: 15px;"> 34 <div style="display: inline-block;margin-left: 15px;">
35 <span class="item-label" style="width: 80px;">开始时间: </span> 35 <span class="item-label" style="width: 80px;">开始时间: </span>
36 - <input class="form-control" type="text" id="date" style="width: 120px;"/> 36 + <input class="form-control" type="text" id="date" style="width: 160px;"/>
37 </div> 37 </div>
38 <div style="display: inline-block;margin-left: 15px;"> 38 <div style="display: inline-block;margin-left: 15px;">
39 <span class="item-label" style="width: 80px;">结束时间: </span> 39 <span class="item-label" style="width: 80px;">结束时间: </span>
40 - <input class="form-control" type="text" id="endDate" style="width: 120px;"/> 40 + <input class="form-control" type="text" id="endDate" style="width: 160px;"/>
41 </div> 41 </div>
42 - <div style="display: inline-block;margin-left: 15px">  
43 - <span class="item-label" style="width: 140px;">路牌: </span> 42 + <div style="margin-top: 10px"></div>
  43 + <div style="display: inline-block;">
  44 + <span class="item-label" style="width: 140px;">路牌: </span>
44 <select class="form-control" name="lpName" id="lpName" style="width: 136px;"></select> 45 <select class="form-control" name="lpName" id="lpName" style="width: 136px;"></select>
45 </div> 46 </div>
46 <div style="display: inline-block;margin-left: 15px"> 47 <div style="display: inline-block;margin-left: 15px">
47 - <span class="item-label" style="width: 140px;">内部编码: </span>  
48 - <select class="form-control" name="code" id="code" style="width: 145px;"></select> 48 + <span class="item-label" style="width: 80px;">内部编码: </span>
  49 + <select class="form-control" name="code" id="code" style="width: 120px;"></select>
49 <input class="btn btn-default" type="button" id="czcl" value="X"/> 50 <input class="btn btn-default" type="button" id="czcl" value="X"/>
50 </div> 51 </div>
  52 + <div style="display: inline-block;margin-left: 15px">
  53 + <span class="item-label" style="width: 140px;">修改类型: </span>
  54 + <select class="form-control" name="code" id="changType" style="width: 160px;">
  55 + <option value="">全部</option>
  56 + <option value="1">前修改</option>
  57 + <option value="2">后修改</option>
  58 + </select>
  59 + </div>
51 <div class="form-group"> 60 <div class="form-group">
52 <input class="btn btn-default" type="button" id="query" value="筛选"/> 61 <input class="btn btn-default" type="button" id="query" value="筛选"/>
53 <input class="btn btn-default" type="button" id="export" value="导出"/> 62 <input class="btn btn-default" type="button" id="export" value="导出"/>
@@ -220,14 +229,16 @@ @@ -220,14 +229,16 @@
220 var lpName = $("#lpName").val(); 229 var lpName = $("#lpName").val();
221 var endDate = $("#endDate").val(); 230 var endDate = $("#endDate").val();
222 var code = $("#code").val(); 231 var code = $("#code").val();
  232 + var changType=$("#changType").val();
223 $("#query").on("click",function(){ 233 $("#query").on("click",function(){
224 line = $("#line").val(); 234 line = $("#line").val();
225 date = $("#date").val(); 235 date = $("#date").val();
226 lpName = $("#lpName").val(); 236 lpName = $("#lpName").val();
227 code = $("#code").val(); 237 code = $("#code").val();
228 endDate = $("#endDate").val(); 238 endDate = $("#endDate").val();
  239 + changType=$("#changType").val();
229 var type = "query"; 240 var type = "query";
230 - $get("/realSchedule/correctForm",{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type},function(result){ 241 + $get("/realSchedule/correctForm",{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type,changType:changType},function(result){
231 var list_correctForm = template('list_correctForm',{list:result}); 242 var list_correctForm = template('list_correctForm',{list:result});
232 // 把渲染好的模版html文本追加到表格中 243 // 把渲染好的模版html文本追加到表格中
233 $('#forms .list_correctForm').html(list_correctForm); 244 $('#forms .list_correctForm').html(list_correctForm);
@@ -245,7 +256,7 @@ @@ -245,7 +256,7 @@
245 256
246 $("#export").on("click",function(){ 257 $("#export").on("click",function(){
247 var type = "export"; 258 var type = "export";
248 - $get('/realSchedule/correctForm',{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type},function(result){ 259 + $get('/realSchedule/correctForm',{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type,changType:changType},function(result){
249 window.open("/downloadFile/download?fileName=修正报表"+date); 260 window.open("/downloadFile/download?fileName=修正报表"+date);
250 }); 261 });
251 }); 262 });
src/main/resources/static/pages/permission/authorize_all/authorize.html 0 → 100644
  1 +我在iframe 里面
0 \ No newline at end of file 2 \ No newline at end of file
src/main/resources/static/pages/permission/authorize_all/main.html 0 → 100644
  1 +<iframe src="/pages/permission/authorize_all/authorize.html"></iframe>
0 \ No newline at end of file 2 \ No newline at end of file
src/main/resources/static/pages/permission/role/settings.html
@@ -160,10 +160,13 @@ $(function(){ @@ -160,10 +160,13 @@ $(function(){
160 160
161 //模块下拉框 161 //模块下拉框
162 getModuleTreeData(function(treeData){ 162 getModuleTreeData(function(treeData){
  163 +
163 var options = ''; 164 var options = '';
164 $.each(treeData, function(i, g){ 165 $.each(treeData, function(i, g){
165 var dArray = g.children; 166 var dArray = g.children;
166 - 167 +
  168 + if(!dArray)
  169 + return true;
167 for(var i = 0,d; d = dArray[i++];){ 170 for(var i = 0,d; d = dArray[i++];){
168 options += '<optgroup label="'+d.name+'">'; 171 options += '<optgroup label="'+d.name+'">';
169 if(!d.children) 172 if(!d.children)
src/main/resources/static/pages/scheduleApp/module/common/main.js
@@ -67,28 +67,48 @@ ScheduleApp.factory(&#39;DataStore&#39;, [ @@ -67,28 +67,48 @@ ScheduleApp.factory(&#39;DataStore&#39;, [
67 // 简拼数据 67 // 简拼数据
68 dataMap.cl = result.data.data; 68 dataMap.cl = result.data.data;
69 angular.forEach(result.data.data, function(obj) { 69 angular.forEach(result.data.data, function(obj) {
  70 + //// 全拼
  71 + //obj["$fullChars"] = pinyin.getFullChars(obj.insideCode ? obj.insideCode: "");
  72 + //// 简拼
  73 + //obj["$camelChars"] = pinyin.getCamelChars(obj.insideCode ? obj.insideCode: "");
70 // 全拼 74 // 全拼
71 - obj["$fullChars"] = pinyin.getFullChars(obj.insideCode ? obj.insideCode: ""); 75 + obj["$fullChars"] = obj.insideCode? obj.insideCode: "";
72 // 简拼 76 // 简拼
73 - obj["$camelChars"] = pinyin.getCamelChars(obj.insideCode ? obj.insideCode: ""); 77 + obj["$camelChars"] = obj.insideCode? obj.insideCode: "";
74 // 原值 78 // 原值
75 obj["$calcu_str"] = obj.insideCode? obj.insideCode: ""; 79 obj["$calcu_str"] = obj.insideCode? obj.insideCode: "";
76 }); 80 });
77 }); 81 });
78 82
  83 + //$http({
  84 + // method: 'GET',
  85 + // url: '/ee/all'
  86 + //}).then(function(result) {
  87 + // // 简拼数据
  88 + // dataMap.ry = result.data.data;
  89 + // angular.forEach(result.data.data, function(obj) {
  90 + // // 全拼
  91 + // obj["$fullChars"] = pinyin.getFullChars(obj.personnelName + "-" + obj.jobCode);
  92 + // // 简拼
  93 + // obj["$camelChars"] = pinyin.getCamelChars(obj.personnelName + "-" + obj.jobCode);
  94 + // // 原值
  95 + // obj["$calcu_str"] = obj.personnelName + "-" + obj.jobCode;
  96 + // });
  97 + //});
  98 +
79 $http({ 99 $http({
80 method: 'GET', 100 method: 'GET',
81 - url: '/ee/all' 101 + url: '/personnel/all_py'
82 }).then(function(result) { 102 }).then(function(result) {
83 // 简拼数据 103 // 简拼数据
84 - dataMap.ry = result.data.data;  
85 - angular.forEach(result.data.data, function(obj) { 104 + dataMap.ry = result.data;
  105 + angular.forEach(result.data, function(obj) {
86 // 全拼 106 // 全拼
87 - obj["$fullChars"] = pinyin.getFullChars(obj.personnelName + "-" + obj.jobCode); 107 + obj["$fullChars"] = obj.fullChars;
88 // 简拼 108 // 简拼
89 - obj["$camelChars"] = pinyin.getCamelChars(obj.personnelName + "-" + obj.jobCode); 109 + obj["$camelChars"] = obj.camelChars;
90 // 原值 110 // 原值
91 - obj["$calcu_str"] = obj.personnelName + "-" + obj.jobCode; 111 + obj["$calcu_str"] = obj.name + "-" + obj.workId;
92 }); 112 });
93 }); 113 });
94 114
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/edit.html
@@ -84,9 +84,9 @@ @@ -84,9 +84,9 @@
84 icname="id" 84 icname="id"
85 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 85 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
86 iterobjname="item" 86 iterobjname="item"
87 - iterobjexp="item.personnelName + '<' + item.jobCode + '>'" 87 + iterobjexp="item.name + '<' + item.workId + '>'"
88 searchph="请输拼音..." 88 searchph="请输拼音..."
89 - searchexp="this.personnelName + '<' + this.jobCode + '>'" 89 + searchexp="this.name + '<' + this.workId + '>'"
90 required > 90 required >
91 </sa-Select5> 91 </sa-Select5>
92 <input type="hidden" name="jsy_h" ng-model="ctrl.employeeConfigForSave.jsy.id" 92 <input type="hidden" name="jsy_h" ng-model="ctrl.employeeConfigForSave.jsy.id"
@@ -116,9 +116,9 @@ @@ -116,9 +116,9 @@
116 icname="id" 116 icname="id"
117 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 117 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
118 iterobjname="item" 118 iterobjname="item"
119 - iterobjexp="item.personnelName + '<' + item.jobCode + '>'" 119 + iterobjexp="item.name + '<' + item.workId + '>'"
120 searchph="请输拼音..." 120 searchph="请输拼音..."
121 - searchexp="this.personnelName + '<' + this.jobCode + '>'" 121 + searchexp="this.name + '<' + this.workId + '>'"
122 > 122 >
123 </sa-Select5> 123 </sa-Select5>
124 <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id" 124 <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id"
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/form.html
@@ -84,9 +84,9 @@ @@ -84,9 +84,9 @@
84 icname="id" 84 icname="id"
85 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 85 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
86 iterobjname="item" 86 iterobjname="item"
87 - iterobjexp="item.personnelName + '<' + item.jobCode + '>'" 87 + iterobjexp="item.name + '<' + item.workId + '>'"
88 searchph="请输拼音..." 88 searchph="请输拼音..."
89 - searchexp="this.personnelName + '<' + this.jobCode + '>'" 89 + searchexp="this.name + '<' + this.workId + '>'"
90 required > 90 required >
91 </sa-Select5> 91 </sa-Select5>
92 <input type="hidden" name="jsy_h" ng-model="ctrl.employeeConfigForSave.jsy.id" 92 <input type="hidden" name="jsy_h" ng-model="ctrl.employeeConfigForSave.jsy.id"
@@ -116,9 +116,9 @@ @@ -116,9 +116,9 @@
116 icname="id" 116 icname="id"
117 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 117 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
118 iterobjname="item" 118 iterobjname="item"
119 - iterobjexp="item.personnelName + '<' + item.jobCode + '>'" 119 + iterobjexp="item.name + '<' + item.workId + '>'"
120 searchph="请输拼音..." 120 searchph="请输拼音..."
121 - searchexp="this.personnelName + '<' + this.jobCode + '>'" 121 + searchexp="this.name + '<' + this.workId + '>'"
122 > 122 >
123 </sa-Select5> 123 </sa-Select5>
124 <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id" 124 <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id"
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/ext/edit.html
@@ -96,9 +96,9 @@ @@ -96,9 +96,9 @@
96 icname="id" 96 icname="id"
97 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 97 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
98 iterobjname="item" 98 iterobjname="item"
99 - iterobjexp="item.personnelName + '(' + item.jobCode + ')'" 99 + iterobjexp="item.name + '(' + item.workId + ')'"
100 searchph="请输拼音..." 100 searchph="请输拼音..."
101 - searchexp="this.personnelName" 101 + searchexp="this.name"
102 required 102 required
103 > 103 >
104 </sa-Select5> 104 </sa-Select5>
@@ -119,9 +119,9 @@ @@ -119,9 +119,9 @@
119 icname="id" 119 icname="id"
120 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 120 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
121 iterobjname="item" 121 iterobjname="item"
122 - iterobjexp="item.personnelName + '(' + item.jobCode + ')'" 122 + iterobjexp="item.name + '(' + item.workId + ')'"
123 searchph="请输拼音..." 123 searchph="请输拼音..."
124 - searchexp="this.personnelName" 124 + searchexp="this.name"
125 > 125 >
126 </sa-Select5> 126 </sa-Select5>
127 </div> 127 </div>
@@ -137,9 +137,9 @@ @@ -137,9 +137,9 @@
137 icname="id" 137 icname="id"
138 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 138 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
139 iterobjname="item" 139 iterobjname="item"
140 - iterobjexp="item.personnelName + '(' + item.jobCode + ')'" 140 + iterobjexp="item.name + '(' + item.workId + ')'"
141 searchph="请输拼音..." 141 searchph="请输拼音..."
142 - searchexp="this.personnelName" 142 + searchexp="this.name"
143 > 143 >
144 </sa-Select5> 144 </sa-Select5>
145 </div> 145 </div>
@@ -155,9 +155,9 @@ @@ -155,9 +155,9 @@
155 icname="id" 155 icname="id"
156 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 156 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
157 iterobjname="item" 157 iterobjname="item"
158 - iterobjexp="item.personnelName + '(' + item.jobCode + ')'" 158 + iterobjexp="item.name + '(' + item.workId + ')'"
159 searchph="请输拼音..." 159 searchph="请输拼音..."
160 - searchexp="this.personnelName" 160 + searchexp="this.name"
161 > 161 >
162 </sa-Select5> 162 </sa-Select5>
163 </div> 163 </div>
@@ -173,9 +173,9 @@ @@ -173,9 +173,9 @@
173 icname="id" 173 icname="id"
174 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 174 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
175 iterobjname="item" 175 iterobjname="item"
176 - iterobjexp="item.personnelName + '(' + item.jobCode + ')'" 176 + iterobjexp="item.name + '(' + item.workId + ')'"
177 searchph="请输拼音..." 177 searchph="请输拼音..."
178 - searchexp="this.personnelName" 178 + searchexp="this.name"
179 > 179 >
180 </sa-Select5> 180 </sa-Select5>
181 </div> 181 </div>
@@ -191,9 +191,9 @@ @@ -191,9 +191,9 @@
191 icname="id" 191 icname="id"
192 dsparams="{{ {type: 'local', param: 'ry' } | json }}" 192 dsparams="{{ {type: 'local', param: 'ry' } | json }}"
193 iterobjname="item" 193 iterobjname="item"
194 - iterobjexp="item.personnelName + '(' + item.jobCode + ')'" 194 + iterobjexp="item.name + '(' + item.workId + ')'"
195 searchph="请输拼音..." 195 searchph="请输拼音..."
196 - searchexp="this.personnelName" 196 + searchexp="this.name"
197 > 197 >
198 </sa-Select5> 198 </sa-Select5>
199 </div> 199 </div>
src/main/resources/static/real_control_v2/js/data/data_basic.js
@@ -56,16 +56,15 @@ var gb_data_basic = (function () { @@ -56,16 +56,15 @@ var gb_data_basic = (function () {
56 ep.emit('all_personnel', data); 56 ep.emit('all_personnel', data);
57 }); 57 });
58 function loadAllPersonnel(cb) { 58 function loadAllPersonnel(cb) {
59 - $.get('/basic/all_personnel', function (rs) { 59 + $.get('/personnel/all_py', function (rs) {
60 //转换成自动补全组件需要的数据 60 //转换成自动补全组件需要的数据
61 - var data = [], name, code;  
62 - for (var jobCode in rs) {  
63 - name = rs[jobCode];  
64 - code = jobCode.indexOf('-')!=-1?jobCode.split('-')[1]:jobCode; 61 + var data = [], code;
  62 + for(var i =0, p; p = rs[i++];){
  63 + code = p['workId'].indexOf('-')!=-1?p['workId'].split('-')[1]:p['workId'];
65 data.push({ 64 data.push({
66 - value: code + '/' + name,  
67 - fullChars: pinyin.getFullChars(name).toUpperCase(),  
68 - camelChars: pinyin.getCamelChars(name) 65 + value: code + '/' + p.name,
  66 + fullChars: p.fullChars,
  67 + camelChars: p.camelChars
69 }); 68 });
70 } 69 }
71 cb && cb(data); 70 cb && cb(data);