Commit aa134516b478677f15e7af7364fc6b0b6ff5ac6a
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
19 changed files
with
212 additions
and
81 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
| @@ -303,12 +303,10 @@ public class ExportController { | @@ -303,12 +303,10 @@ public class ExportController { | ||
| 303 | m.put("fssj", l.getFssj()); | 303 | m.put("fssj", l.getFssj()); |
| 304 | m.put("xgsj", l.getXgsj()); | 304 | m.put("xgsj", l.getXgsj()); |
| 305 | m.put("pcch", l.getPcch()); | 305 | m.put("pcch", l.getPcch()); |
| 306 | - m.put("pcry", l.getPcry()); | ||
| 307 | - m.put("jhch", l.getJhch()); | ||
| 308 | - m.put("jhgh", l.getJhgh()); | ||
| 309 | m.put("sjch", l.getSjch()); | 306 | m.put("sjch", l.getSjch()); |
| 307 | + m.put("fcgh", l.getPcry()); | ||
| 310 | m.put("sjgh", l.getSjgh()); | 308 | m.put("sjgh", l.getSjgh()); |
| 311 | - m.put("yy", l.getYy()); | 309 | + m.put("yy", l.getYy()==null?"":l.getYy()); |
| 312 | m.put("xgr", l.getXgr()); | 310 | m.put("xgr", l.getXgr()); |
| 313 | resList.add(m); | 311 | resList.add(m); |
| 314 | } | 312 | } |
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
| @@ -66,7 +66,7 @@ public class MCY_FormsController { | @@ -66,7 +66,7 @@ public class MCY_FormsController { | ||
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | // 换人换车情况统计表 | 68 | // 换人换车情况统计表 |
| 69 | - @RequestMapping(value = "/changetochange", method = RequestMethod.POST) | 69 | + @RequestMapping(value = "/changetochange", method = RequestMethod.GET) |
| 70 | public List<Changetochange> changetochange(@RequestParam Map<String, Object> map) { | 70 | public List<Changetochange> changetochange(@RequestParam Map<String, Object> map) { |
| 71 | 71 | ||
| 72 | return formsService.changetochange(map); | 72 | return formsService.changetochange(map); |
src/main/java/com/bsth/controller/schedule/core/SchedulePlanInfoController.java
| @@ -39,6 +39,23 @@ public class SchedulePlanInfoController extends BController<SchedulePlanInfo, Lo | @@ -39,6 +39,23 @@ public class SchedulePlanInfoController extends BController<SchedulePlanInfo, Lo | ||
| 39 | return resultMap; | 39 | return resultMap; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | + @RequestMapping(value = "/lastestsd/{xlid}", method = RequestMethod.GET) | ||
| 43 | + public Map<String, Object> findLastestPlanDate( | ||
| 44 | + @PathVariable(value = "xlid") Integer xlid) { | ||
| 45 | + Map<String, Object> resultMap = new HashMap<>(); | ||
| 46 | + try { | ||
| 47 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 48 | + resultMap.put("data", schedulePlanInfoService.findLastestPlanDate(xlid)); | ||
| 49 | + | ||
| 50 | + } catch (Exception exp) { | ||
| 51 | + exp.printStackTrace(); | ||
| 52 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 53 | + resultMap.put("msg", exp.getLocalizedMessage()); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + return resultMap; | ||
| 57 | + } | ||
| 58 | + | ||
| 42 | 59 | ||
| 43 | // ------------------------ 老版本 ----------------------// | 60 | // ------------------------ 老版本 ----------------------// |
| 44 | @RequestMapping(value = "/groupinfos/{xlid}/{date}", method = RequestMethod.GET) | 61 | @RequestMapping(value = "/groupinfos/{xlid}/{date}", method = RequestMethod.GET) |
src/main/java/com/bsth/data/gpsdata/thread/ThreadPollMonitor.java
| 1 | -package com.bsth.data.gpsdata.thread; | ||
| 2 | - | ||
| 3 | -import com.bsth.data.gpsdata.arrival.GpsRealAnalyse; | ||
| 4 | -import org.springframework.stereotype.Component; | ||
| 5 | - | ||
| 6 | -/** | ||
| 7 | - * 线程池监听 | ||
| 8 | - * Created by panzhao on 2017/5/10. | ||
| 9 | - */ | ||
| 10 | -@Component | ||
| 11 | -public class ThreadPollMonitor extends Thread{ | ||
| 12 | - | ||
| 13 | - @Override | ||
| 14 | - public void run() { | ||
| 15 | - long t = System.currentTimeMillis(); | ||
| 16 | - | ||
| 17 | - if(t - GpsRealAnalyse.st > 3000 * 10){ | ||
| 18 | - GpsRealAnalyse.shutdown(); | ||
| 19 | - } | ||
| 20 | - } | ||
| 21 | -} | 1 | +package com.bsth.data.gpsdata.thread; |
| 2 | + | ||
| 3 | +import com.bsth.data.gpsdata.arrival.GpsRealAnalyse; | ||
| 4 | +import org.springframework.stereotype.Component; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 线程池监听 | ||
| 8 | + * Created by panzhao on 2017/5/10. | ||
| 9 | + */ | ||
| 10 | +@Component | ||
| 11 | +public class ThreadPollMonitor extends Thread{ | ||
| 12 | + | ||
| 13 | + @Override | ||
| 14 | + public void run() { | ||
| 15 | + long t = System.currentTimeMillis(); | ||
| 16 | + | ||
| 17 | + if(t - GpsRealAnalyse.st > 3000 * 10){ | ||
| 18 | + GpsRealAnalyse.shutdown(); | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | +} |
src/main/java/com/bsth/entity/schedule/temp/SchedulePlanRuleResult.java
| @@ -81,8 +81,8 @@ public class SchedulePlanRuleResult { | @@ -81,8 +81,8 @@ public class SchedulePlanRuleResult { | ||
| 81 | "(xl_id,xl_name,rule_id,cc_id,cc_zbh," + | 81 | "(xl_id,xl_name,rule_id,cc_id,cc_zbh," + |
| 82 | "gids,gnames,gidindex,ecids,ecdbbms,ecindex," + | 82 | "gids,gnames,gidindex,ecids,ecdbbms,ecindex," + |
| 83 | "ttinfo_id,ttinfo_name,schedule_date," + | 83 | "ttinfo_id,ttinfo_name,schedule_date," + |
| 84 | - "sysuser_id,sysuser_name,create_date) " + | ||
| 85 | - "values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | 84 | + "sysuser_id,sysuser_name,create_date, qyrq) " + |
| 85 | + "values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; | ||
| 86 | 86 | ||
| 87 | return sql; | 87 | return sql; |
| 88 | } | 88 | } |
| @@ -105,6 +105,8 @@ public class SchedulePlanRuleResult { | @@ -105,6 +105,8 @@ public class SchedulePlanRuleResult { | ||
| 105 | ps.setString(15, this.getSysuserId()); | 105 | ps.setString(15, this.getSysuserId()); |
| 106 | ps.setString(16, this.getSysuserName()); | 106 | ps.setString(16, this.getSysuserName()); |
| 107 | ps.setTimestamp(17, new java.sql.Timestamp(this.getCreateDate().getTime())); | 107 | ps.setTimestamp(17, new java.sql.Timestamp(this.getCreateDate().getTime())); |
| 108 | + ps.setDate(18, new java.sql.Date(this.getQyrq().getTime())); | ||
| 109 | + | ||
| 108 | 110 | ||
| 109 | } | 111 | } |
| 110 | 112 |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -407,7 +407,19 @@ public class FormsServiceImpl implements FormsService { | @@ -407,7 +407,19 @@ public class FormsServiceImpl implements FormsService { | ||
| 407 | 407 | ||
| 408 | rq = rq2 + "-" + rq3; | 408 | rq = rq2 + "-" + rq3; |
| 409 | 409 | ||
| 410 | - String sql = " select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 "; | 410 | + String line=""; |
| 411 | + if(map.get("line")!=null){ | ||
| 412 | + line=map.get("line").toString().trim(); | ||
| 413 | + } | ||
| 414 | + String gs=""; | ||
| 415 | + if(map.get("gsdm")!=null){ | ||
| 416 | + gs=map.get("gsdm").toString(); | ||
| 417 | + } | ||
| 418 | + String fgs=""; | ||
| 419 | + if(map.get("fgsdm")!=null){ | ||
| 420 | + fgs =map.get("fgsdm").toString(); | ||
| 421 | + } | ||
| 422 | + /*String sql = " select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 "; | ||
| 411 | if (!map.get("startDate").toString().equals(" ") && !map.get("endDate").toString().equals(" ")) { | 423 | if (!map.get("startDate").toString().equals(" ") && !map.get("endDate").toString().equals(" ")) { |
| 412 | sql += "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | 424 | sql += "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" |
| 413 | + map.get("endDate").toString() + "'"; | 425 | + map.get("endDate").toString() + "'"; |
| @@ -419,18 +431,28 @@ public class FormsServiceImpl implements FormsService { | @@ -419,18 +431,28 @@ public class FormsServiceImpl implements FormsService { | ||
| 419 | sql += " and c.pcch!=c.pcry"; | 431 | sql += " and c.pcch!=c.pcry"; |
| 420 | } else if (map.get("sel").equals("1")) { | 432 | } else if (map.get("sel").equals("1")) { |
| 421 | sql += " and c.jhgh!=c.sjgh"; | 433 | sql += " and c.jhgh!=c.sjgh"; |
| 422 | - } | 434 | + }*/ |
| 423 | 435 | ||
| 436 | + String sql="select * from bsth_c_chtoch where rq BETWEEN '"+ map.get("startDate").toString()+"' " | ||
| 437 | + + " and '"+map.get("endDate").toString() +"'"; | ||
| 438 | + | ||
| 439 | + if(!line.equals("")){ | ||
| 440 | + sql +=" and xl= '"+line+"'"; | ||
| 441 | + }else{ | ||
| 442 | + sql += " and gs= '"+gs+"' and fgs= '"+fgs+"'"; | ||
| 443 | + } | ||
| 444 | + | ||
| 445 | + sql +=" order by rq"; | ||
| 424 | List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { | 446 | List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { |
| 425 | 447 | ||
| 426 | 448 | ||
| 427 | @Override | 449 | @Override |
| 428 | public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { | 450 | public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 429 | Changetochange chan = new Changetochange(); | 451 | Changetochange chan = new Changetochange(); |
| 430 | - chan.setRq(rq); | ||
| 431 | - chan.setGs(arg0.getString("gs")); | ||
| 432 | - chan.setFgs(arg0.getString("fgs")); | ||
| 433 | - chan.setXl(arg0.getString("xl")); | 452 | + chan.setRq(arg0.getString("rq")); |
| 453 | + chan.setGs(BasicData.businessCodeNameMap.get(arg0.getString("gs"))); | ||
| 454 | + chan.setFgs(BasicData.businessFgsCodeNameMap.get(arg0.getString("fgs")+"_"+arg0.getString("gs"))); | ||
| 455 | + chan.setXl(BasicData.lineCode2NameMap.get(arg0.getString("xl"))); | ||
| 434 | chan.setLp(arg0.getString("lp")); | 456 | chan.setLp(arg0.getString("lp")); |
| 435 | chan.setFssj(arg0.getString("fssj")); | 457 | chan.setFssj(arg0.getString("fssj")); |
| 436 | chan.setXgsj(arg0.getString("xgsj")); | 458 | chan.setXgsj(arg0.getString("xgsj")); |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| @@ -558,7 +558,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -558,7 +558,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 558 | //有子任务 | 558 | //有子任务 |
| 559 | if (cts != null && cts.size() > 0) { | 559 | if (cts != null && cts.size() > 0) { |
| 560 | for(ChildTaskPlan c : cts){ | 560 | for(ChildTaskPlan c : cts){ |
| 561 | - if(c.isDestroy() && c.getDestroyReason().equals(item)) | 561 | + if(c.isDestroy() && (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item)) |
| 562 | sum = Arith.add(sum, c.getMileage()); | 562 | sum = Arith.add(sum, c.getMileage()); |
| 563 | } | 563 | } |
| 564 | } | 564 | } |
src/main/java/com/bsth/service/schedule/SchedulePlanInfoService.java
| @@ -17,6 +17,13 @@ import java.util.List; | @@ -17,6 +17,13 @@ import java.util.List; | ||
| 17 | public interface SchedulePlanInfoService extends BService<SchedulePlanInfo, Long> { | 17 | public interface SchedulePlanInfoService extends BService<SchedulePlanInfo, Long> { |
| 18 | 18 | ||
| 19 | /** | 19 | /** |
| 20 | + * 查找最近的排班的日期。 | ||
| 21 | + * @param xlId 线路Id | ||
| 22 | + * @return | ||
| 23 | + */ | ||
| 24 | + List<Date> findLastestPlanDate(Integer xlId); | ||
| 25 | + | ||
| 26 | + /** | ||
| 20 | * 查找排班计划汇总数据。 | 27 | * 查找排班计划汇总数据。 |
| 21 | * @param xlId 线路Id | 28 | * @param xlId 线路Id |
| 22 | * @param scheduleDate 排班时间 | 29 | * @param scheduleDate 排班时间 |
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| 1 | package com.bsth.service.schedule.impl; | 1 | package com.bsth.service.schedule.impl; |
| 2 | 2 | ||
| 3 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 4 | +import com.bsth.entity.schedule.SchedulePlanInfo; | ||
| 5 | +import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | ||
| 6 | +import com.bsth.util.ReportUtils; | ||
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 9 | +import org.springframework.jdbc.core.RowMapper; | ||
| 10 | +import org.springframework.stereotype.Service; | ||
| 11 | + | ||
| 3 | import java.math.BigDecimal; | 12 | import java.math.BigDecimal; |
| 4 | -import java.net.URLEncoder; | ||
| 5 | import java.sql.ResultSet; | 13 | import java.sql.ResultSet; |
| 6 | import java.sql.SQLException; | 14 | import java.sql.SQLException; |
| 7 | import java.text.DecimalFormat; | 15 | import java.text.DecimalFormat; |
| 8 | import java.text.NumberFormat; | 16 | import java.text.NumberFormat; |
| 9 | import java.text.ParseException; | 17 | import java.text.ParseException; |
| 10 | import java.text.SimpleDateFormat; | 18 | import java.text.SimpleDateFormat; |
| 11 | -import java.util.ArrayList; | ||
| 12 | -import java.util.Collections; | ||
| 13 | -import java.util.Date; | ||
| 14 | -import java.util.HashMap; | ||
| 15 | -import java.util.HashSet; | ||
| 16 | -import java.util.Iterator; | ||
| 17 | -import java.util.List; | ||
| 18 | -import java.util.Map; | ||
| 19 | -import java.util.Set; | 19 | +import java.util.*; |
| 20 | + | ||
| 20 | 21 | ||
| 21 | import org.springframework.beans.factory.annotation.Autowired; | 22 | import org.springframework.beans.factory.annotation.Autowired; |
| 22 | import org.springframework.jdbc.core.JdbcTemplate; | 23 | import org.springframework.jdbc.core.JdbcTemplate; |
| @@ -761,7 +762,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -761,7 +762,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 761 | return modelMap; | 762 | return modelMap; |
| 762 | } | 763 | } |
| 763 | 764 | ||
| 764 | - @Override | 765 | +// @Override |
| 765 | public Map<String, Object> scheduleAnaly_sum(Map<String, Object> map) { | 766 | public Map<String, Object> scheduleAnaly_sum(Map<String, Object> map) { |
| 766 | DecimalFormat df = new DecimalFormat("00"); | 767 | DecimalFormat df = new DecimalFormat("00"); |
| 767 | NumberFormat nf = NumberFormat.getNumberInstance(); | 768 | NumberFormat nf = NumberFormat.getNumberInstance(); |
| @@ -1296,7 +1297,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1296,7 +1297,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1296 | return resList; | 1297 | return resList; |
| 1297 | } | 1298 | } |
| 1298 | 1299 | ||
| 1299 | - @Override | 1300 | +// @Override |
| 1300 | public List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map) { | 1301 | public List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map) { |
| 1301 | NumberFormat nf = NumberFormat.getNumberInstance(); | 1302 | NumberFormat nf = NumberFormat.getNumberInstance(); |
| 1302 | nf.setMinimumFractionDigits(2); | 1303 | nf.setMinimumFractionDigits(2); |
src/main/java/com/bsth/service/schedule/impl/SchedulePlanInfoServiceImpl.java
| @@ -5,6 +5,7 @@ import com.bsth.repository.schedule.SchedulePlanInfoRepository; | @@ -5,6 +5,7 @@ import com.bsth.repository.schedule.SchedulePlanInfoRepository; | ||
| 5 | import com.bsth.service.schedule.SchedulePlanInfoService; | 5 | import com.bsth.service.schedule.SchedulePlanInfoService; |
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.jdbc.core.JdbcTemplate; | 7 | import org.springframework.jdbc.core.JdbcTemplate; |
| 8 | +import org.springframework.jdbc.core.RowCallbackHandler; | ||
| 8 | import org.springframework.jdbc.core.RowMapper; | 9 | import org.springframework.jdbc.core.RowMapper; |
| 9 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
| 10 | import org.springframework.transaction.annotation.Transactional; | 11 | import org.springframework.transaction.annotation.Transactional; |
| @@ -25,6 +26,26 @@ public class SchedulePlanInfoServiceImpl extends BServiceImpl<SchedulePlanInfo, | @@ -25,6 +26,26 @@ public class SchedulePlanInfoServiceImpl extends BServiceImpl<SchedulePlanInfo, | ||
| 25 | private JdbcTemplate jdbcTemplate; | 26 | private JdbcTemplate jdbcTemplate; |
| 26 | 27 | ||
| 27 | @Override | 28 | @Override |
| 29 | + public List<Date> findLastestPlanDate(Integer xlId) { | ||
| 30 | + String sql = "select max(schedule_date) as sd from bsth_c_s_sp_info " + | ||
| 31 | + "where xl = ?"; | ||
| 32 | + | ||
| 33 | + final List<Date> ld = new ArrayList<>(); | ||
| 34 | + | ||
| 35 | + jdbcTemplate.query(sql, new Object[]{xlId}, new RowCallbackHandler() { | ||
| 36 | + @Override | ||
| 37 | + public void processRow(ResultSet rs) throws SQLException { | ||
| 38 | + if (rs != null && rs.getDate("sd") != null) { | ||
| 39 | + ld.add(new Date(rs.getDate("sd").getTime())); | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + }); | ||
| 43 | + | ||
| 44 | + return ld; | ||
| 45 | + | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + @Override | ||
| 28 | public List<SchedulePlanGroupInfo> findSchedulePlanGroupInfo(Integer xlId, Date scheduleDate) { | 49 | public List<SchedulePlanGroupInfo> findSchedulePlanGroupInfo(Integer xlId, Date scheduleDate) { |
| 29 | String sql = SchedulePlanGroupInfo.generateSelectSql(); | 50 | String sql = SchedulePlanGroupInfo.generateSelectSql(); |
| 30 | List<SchedulePlanGroupInfo> schedulePlanGroupInfos = jdbcTemplate.query(sql, new Object[]{xlId, scheduleDate}, new RowMapper<SchedulePlanGroupInfo>() { | 51 | List<SchedulePlanGroupInfo> schedulePlanGroupInfos = jdbcTemplate.query(sql, new Object[]{xlId, scheduleDate}, new RowMapper<SchedulePlanGroupInfo>() { |
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
| @@ -28,6 +28,9 @@ import org.slf4j.Logger; | @@ -28,6 +28,9 @@ import org.slf4j.Logger; | ||
| 28 | import org.slf4j.LoggerFactory; | 28 | import org.slf4j.LoggerFactory; |
| 29 | import org.springframework.beans.factory.annotation.Autowired; | 29 | import org.springframework.beans.factory.annotation.Autowired; |
| 30 | import org.springframework.stereotype.Service; | 30 | import org.springframework.stereotype.Service; |
| 31 | +import org.springframework.transaction.annotation.Isolation; | ||
| 32 | +import org.springframework.transaction.annotation.Propagation; | ||
| 33 | +import org.springframework.transaction.annotation.Transactional; | ||
| 31 | 34 | ||
| 32 | import java.util.*; | 35 | import java.util.*; |
| 33 | 36 | ||
| @@ -318,6 +321,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -318,6 +321,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 318 | 321 | ||
| 319 | } | 322 | } |
| 320 | 323 | ||
| 324 | + @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED) | ||
| 321 | public SchedulePlan save(SchedulePlan schedulePlan) { | 325 | public SchedulePlan save(SchedulePlan schedulePlan) { |
| 322 | // pre、如果排班的数据之前已经有了,删除之前的数据 | 326 | // pre、如果排班的数据之前已经有了,删除之前的数据 |
| 323 | Date startpre = new Date(); | 327 | Date startpre = new Date(); |
src/main/resources/rules/validplan.drl
0 → 100644
src/main/resources/static/pages/forms/mould/changetochange.xls
No preview for this file type
src/main/resources/static/pages/mforms/changetochanges/changetochange.html
| @@ -70,14 +70,14 @@ | @@ -70,14 +70,14 @@ | ||
| 70 | class="form-control" type="text" id="endDate" | 70 | class="form-control" type="text" id="endDate" |
| 71 | style="width: 140px;" /> | 71 | style="width: 140px;" /> |
| 72 | </div> | 72 | </div> |
| 73 | - <div style="display: inline-block; margin-left: 10px;"> | ||
| 74 | - <span class="item-label" style="width: 120px;">类型: </span> <select | ||
| 75 | - class="form-control" id="sel"> | ||
| 76 | - <option value="">请选择</option> | ||
| 77 | - <option value="1">换人</option> | ||
| 78 | - <option value="2">换车</option> | ||
| 79 | - </select> | ||
| 80 | - </div> | 73 | +<!-- <div style="display: inline-block; margin-left: 10px;"> --> |
| 74 | +<!-- <span class="item-label" style="width: 120px;">类型: </span> <select --> | ||
| 75 | +<!-- class="form-control" id="sel"> --> | ||
| 76 | +<!-- <option value="">请选择</option> --> | ||
| 77 | +<!-- <option value="1">换人</option> --> | ||
| 78 | +<!-- <option value="2">换车</option> --> | ||
| 79 | +<!-- </select> --> | ||
| 80 | +<!-- </div> --> | ||
| 81 | <div class="form-group"> | 81 | <div class="form-group"> |
| 82 | <input class="btn btn-default" type="button" id="query" value="筛选" /> | 82 | <input class="btn btn-default" type="button" id="query" value="筛选" /> |
| 83 | <input class="btn btn-default" type="button" id="export" | 83 | <input class="btn btn-default" type="button" id="export" |
| @@ -117,10 +117,8 @@ | @@ -117,10 +117,8 @@ | ||
| 117 | <tr> | 117 | <tr> |
| 118 | <td>车号</td> | 118 | <td>车号</td> |
| 119 | <td>车号</td> | 119 | <td>车号</td> |
| 120 | - <td>工号</td> | ||
| 121 | - <td>人员</td> | ||
| 122 | - <td>工号</td> | ||
| 123 | - <td>人员</td> | 120 | + <td colspan="2">工号/人员</td> |
| 121 | + <td colspan="2">工号/人员</td> | ||
| 124 | </tr> | 122 | </tr> |
| 125 | </thead> | 123 | </thead> |
| 126 | <tbody> | 124 | <tbody> |
| @@ -188,6 +186,7 @@ | @@ -188,6 +186,7 @@ | ||
| 188 | $("#fgsdmChange").on("change",initXl); | 186 | $("#fgsdmChange").on("change",initXl); |
| 189 | function initXl(){ | 187 | function initXl(){ |
| 190 | var data=[]; | 188 | var data=[]; |
| 189 | + data.push({id: " ", text: "请选择"}); | ||
| 191 | if(fage){ | 190 | if(fage){ |
| 192 | $("#line").select2("destroy").html(''); | 191 | $("#line").select2("destroy").html(''); |
| 193 | } | 192 | } |
| @@ -223,29 +222,15 @@ | @@ -223,29 +222,15 @@ | ||
| 223 | var gsdmChange= $("#gsdmChange").val(); | 222 | var gsdmChange= $("#gsdmChange").val(); |
| 224 | var fgsdmChange= $("#fgsdmChange").val(); | 223 | var fgsdmChange= $("#fgsdmChange").val(); |
| 225 | if (startDate1 != '' && endDate1 != '') { | 224 | if (startDate1 != '' && endDate1 != '') { |
| 226 | - $post('/mcy_forms/changetochange', { | 225 | + $get('/mcy_forms/changetochange', { |
| 227 | sel : sel, | 226 | sel : sel, |
| 228 | line : line, | 227 | line : line, |
| 229 | startDate : $("#startDate").val(), | 228 | startDate : $("#startDate").val(), |
| 230 | endDate : $("#endDate").val(), | 229 | endDate : $("#endDate").val(), |
| 230 | + gsdm:gsdmChange, | ||
| 231 | + fgsdm:fgsdmChange, | ||
| 231 | type : 'query' | 232 | type : 'query' |
| 232 | }, function(result) { | 233 | }, function(result) { |
| 233 | - startDate = $("#startDate").val(); | ||
| 234 | - endDate = $("#endDate").val(); | ||
| 235 | - $("#sDate").text(startDate); | ||
| 236 | - $("#eDate").text(endDate); | ||
| 237 | - var temp = {}; | ||
| 238 | - var today_account = 0; | ||
| 239 | - temp["line"] = $("#line").text(); | ||
| 240 | - $.each(result, function(i, obj) { | ||
| 241 | - if (moment(obj.schedule_date_str).format( | ||
| 242 | - "YYYY-MM-DD") == moment(obj.startDate) | ||
| 243 | - .format("YYYY-MM-DD")) { | ||
| 244 | - today_account++; | ||
| 245 | - } | ||
| 246 | - obj.updateDate = moment(obj.startDate).format( | ||
| 247 | - "YYYY-MM-DD HH:mm:ss"); | ||
| 248 | - }); | ||
| 249 | // 把数据填充到模版中 | 234 | // 把数据填充到模版中 |
| 250 | var tbodyHtml = template('changetochange', { | 235 | var tbodyHtml = template('changetochange', { |
| 251 | list : result | 236 | list : result |
| @@ -294,11 +279,9 @@ | @@ -294,11 +279,9 @@ | ||
| 294 | <td>{{obj.fssj}}</td> | 279 | <td>{{obj.fssj}}</td> |
| 295 | <td>{{obj.xgsj}}</td> | 280 | <td>{{obj.xgsj}}</td> |
| 296 | <td>{{obj.pcch}}</td> | 281 | <td>{{obj.pcch}}</td> |
| 297 | - <td>{{obj.pcry}}</td> | ||
| 298 | - <td>{{obj.jhgh}}</td> | ||
| 299 | - <td>{{obj.jhch}}</td> | ||
| 300 | - <td>{{obj.sjgh}}</td> | ||
| 301 | <td>{{obj.sjch}}</td> | 282 | <td>{{obj.sjch}}</td> |
| 283 | + <td colspan="2">{{obj.pcry}}</td> | ||
| 284 | + <td colspan="2">{{obj.sjgh}}</td> | ||
| 302 | <td>{{obj.yy}}</td> | 285 | <td>{{obj.yy}}</td> |
| 303 | <td>{{obj.xgr}}</td> | 286 | <td>{{obj.xgr}}</td> |
| 304 | </tr> | 287 | </tr> |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
| @@ -548,6 +548,24 @@ angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$reso | @@ -548,6 +548,24 @@ angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$reso | ||
| 548 | } | 548 | } |
| 549 | } | 549 | } |
| 550 | } | 550 | } |
| 551 | + ), | ||
| 552 | + latestsd: $resource( | ||
| 553 | + '/spic/lastestsd/:xlid', | ||
| 554 | + {}, | ||
| 555 | + { | ||
| 556 | + list: { | ||
| 557 | + method: 'GET', | ||
| 558 | + isArray: true, | ||
| 559 | + transformResponse: function(rs) { | ||
| 560 | + var dst = angular.fromJson(rs); | ||
| 561 | + if (dst.status == 'SUCCESS') { | ||
| 562 | + return dst.data; | ||
| 563 | + } else { | ||
| 564 | + return dst; // 业务错误留给控制器处理 | ||
| 565 | + } | ||
| 566 | + } | ||
| 567 | + } | ||
| 568 | + } | ||
| 551 | ) | 569 | ) |
| 552 | 570 | ||
| 553 | 571 |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/ext/list.html
| 1 | <!-- ui-route employeeInfoManage.list --> | 1 | <!-- ui-route employeeInfoManage.list --> |
| 2 | <div ng-controller="SchedulePlanReportExtManageListCtrl as ctrl"> | 2 | <div ng-controller="SchedulePlanReportExtManageListCtrl as ctrl"> |
| 3 | + | ||
| 4 | + <div class="portlet"> | ||
| 5 | + <div class="portlet-title"> | ||
| 6 | + <div class="caption caption-subject font-red-sunglo bold uppercase"> | ||
| 7 | + 最近排班至 | ||
| 8 | + <span ng-bind="ctrl.lsd | date: 'yyyy年MM月dd日'"> | ||
| 9 | + </span> | ||
| 10 | + </div> | ||
| 11 | + </div> | ||
| 12 | + </div> | ||
| 13 | + | ||
| 3 | <div class="fixDiv"> | 14 | <div class="fixDiv"> |
| 4 | <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column" | 15 | <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column" |
| 5 | style="width: 1800px; min-height: 500px;"> | 16 | style="width: 1800px; min-height: 500px;"> |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/ext/module.js
| @@ -46,6 +46,15 @@ angular.module('ScheduleApp').factory( | @@ -46,6 +46,15 @@ angular.module('ScheduleApp').factory( | ||
| 46 | }, | 46 | }, |
| 47 | 47 | ||
| 48 | /** | 48 | /** |
| 49 | + * 查询线路最近排班日期。 | ||
| 50 | + * @param xlid | ||
| 51 | + */ | ||
| 52 | + getLastestsd: function() { | ||
| 53 | + var params = currentSearchCondition; // 查询条件 | ||
| 54 | + return service.latestsd.list(params).$promise; | ||
| 55 | + }, | ||
| 56 | + | ||
| 57 | + /** | ||
| 49 | * 批量保存排班明细。 | 58 | * 批量保存排班明细。 |
| 50 | * @param rs | 59 | * @param rs |
| 51 | */ | 60 | */ |
| @@ -168,6 +177,8 @@ angular.module('ScheduleApp').controller( | @@ -168,6 +177,8 @@ angular.module('ScheduleApp').controller( | ||
| 168 | return service.resetSearchCondition(); | 177 | return service.resetSearchCondition(); |
| 169 | }; | 178 | }; |
| 170 | 179 | ||
| 180 | + self.lsd; | ||
| 181 | + | ||
| 171 | // 监控条件变化,触发查询 | 182 | // 监控条件变化,触发查询 |
| 172 | $scope.$watch( | 183 | $scope.$watch( |
| 173 | function() { | 184 | function() { |
| @@ -175,6 +186,22 @@ angular.module('ScheduleApp').controller( | @@ -175,6 +186,22 @@ angular.module('ScheduleApp').controller( | ||
| 175 | }, | 186 | }, |
| 176 | function(newValue, oldValue) { | 187 | function(newValue, oldValue) { |
| 177 | if (newValue) { | 188 | if (newValue) { |
| 189 | + if (newValue.xlid) { | ||
| 190 | + service.getLastestsd().then( | ||
| 191 | + function(result) { | ||
| 192 | + if (result.length > 0) { | ||
| 193 | + self.lsd = new Date(); | ||
| 194 | + self.lsd.setTime(result[0]); | ||
| 195 | + } else { | ||
| 196 | + self.lsd = "暂无排班"; | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + }, | ||
| 200 | + function() { | ||
| 201 | + } | ||
| 202 | + ); | ||
| 203 | + } | ||
| 204 | + | ||
| 178 | if (newValue.xlid && newValue.sdate) { | 205 | if (newValue.xlid && newValue.sdate) { |
| 179 | self.pageChanaged(); | 206 | self.pageChanaged(); |
| 180 | } | 207 | } |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/service.js
| @@ -126,6 +126,24 @@ angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$reso | @@ -126,6 +126,24 @@ angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$reso | ||
| 126 | } | 126 | } |
| 127 | } | 127 | } |
| 128 | } | 128 | } |
| 129 | + ), | ||
| 130 | + latestsd: $resource( | ||
| 131 | + '/spic/lastestsd/:xlid', | ||
| 132 | + {}, | ||
| 133 | + { | ||
| 134 | + list: { | ||
| 135 | + method: 'GET', | ||
| 136 | + isArray: true, | ||
| 137 | + transformResponse: function(rs) { | ||
| 138 | + var dst = angular.fromJson(rs); | ||
| 139 | + if (dst.status == 'SUCCESS') { | ||
| 140 | + return dst.data; | ||
| 141 | + } else { | ||
| 142 | + return dst; // 业务错误留给控制器处理 | ||
| 143 | + } | ||
| 144 | + } | ||
| 145 | + } | ||
| 146 | + } | ||
| 129 | ) | 147 | ) |
| 130 | 148 | ||
| 131 | 149 |
src/test/resources/testdata/problem.properties
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | 14=路牌编号自动生成 | 14 | 14=路牌编号自动生成 |
| 15 | 15=时刻表导入的时候表头后面不需要加数字 | 15 | 15=时刻表导入的时候表头后面不需要加数字 |
| 16 | ##16=时间框中文 | 16 | ##16=时间框中文 |
| 17 | -17=人员工号前公司编码自动加 | 17 | +##17=人员工号前公司编码自动加 |
| 18 | 18=排班计划明细可以修改(修改到每个班次) | 18 | 18=排班计划明细可以修改(修改到每个班次) |
| 19 | 19=线路运营概览 | 19 | 19=线路运营概览 |
| 20 | 20=排班规则备注 | 20 | 20=排班规则备注 |
| @@ -31,3 +31,4 @@ | @@ -31,3 +31,4 @@ | ||
| 31 | ##30=时刻表公里数 三位数 | 31 | ##30=时刻表公里数 三位数 |
| 32 | 32 | ||
| 33 | 31=规则修改,路牌范围,人员范围可以拖动 | 33 | 31=规则修改,路牌范围,人员范围可以拖动 |
| 34 | +32=人员配置不存在的情况下,导入规则ktr,找不到的人员不添加,人员范围不存在的,规则不导入 |