Commit fad0f81e1bfb3e76610442321d1319ffe0bb3595
1 parent
6a67fd6b
BUG修复
Showing
4 changed files
with
40 additions
and
11 deletions
src/main/java/com/bsth/repository/schedule/SchedulePlanInfoRepository.java
| @@ -163,7 +163,7 @@ public interface SchedulePlanInfoRepository extends BaseRepository<SchedulePlanI | @@ -163,7 +163,7 @@ public interface SchedulePlanInfoRepository extends BaseRepository<SchedulePlanI | ||
| 163 | 163 | ||
| 164 | @Query(value="select s from SchedulePlanInfo s where s.xlBm = ?1 and s.ttInfo = ?2 " | 164 | @Query(value="select s from SchedulePlanInfo s where s.xlBm = ?1 and s.ttInfo = ?2 " |
| 165 | + "and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?3 order by s.lpName,bcs") | 165 | + "and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?3 order by s.lpName,bcs") |
| 166 | - List<SchedulePlanInfo> findPlanByTTinfo(String xlBm, String ttInfo, String scheduleDate); | 166 | + List<SchedulePlanInfo> findPlanByTTinfo(String xlBm, Long ttInfo, String scheduleDate); |
| 167 | 167 | ||
| 168 | @Query(value="select s from SchedulePlanInfo s where s.xlBm = ?1 " | 168 | @Query(value="select s from SchedulePlanInfo s where s.xlBm = ?1 " |
| 169 | + "and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.lpName,bcs") | 169 | + "and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.lpName,bcs") |
src/main/java/com/bsth/service/forms/impl/BudgetServiceImpl.java
| @@ -39,6 +39,7 @@ import com.bsth.entity.forms.Budget; | @@ -39,6 +39,7 @@ import com.bsth.entity.forms.Budget; | ||
| 39 | import com.bsth.entity.forms.Revenue; | 39 | import com.bsth.entity.forms.Revenue; |
| 40 | import com.bsth.entity.schedule.SchedulePlanInfo; | 40 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 41 | import com.bsth.entity.schedule.TTInfoBxDetail; | 41 | import com.bsth.entity.schedule.TTInfoBxDetail; |
| 42 | +import com.bsth.entity.sys.Dictionary; | ||
| 42 | import com.bsth.repository.calc.CalcStatisticsRepository; | 43 | import com.bsth.repository.calc.CalcStatisticsRepository; |
| 43 | import com.bsth.repository.form.BudgetRepository; | 44 | import com.bsth.repository.form.BudgetRepository; |
| 44 | import com.bsth.repository.form.RevenueRepository; | 45 | import com.bsth.repository.form.RevenueRepository; |
| @@ -50,6 +51,7 @@ import com.bsth.repository.schedule.TTInfoBxDetailRepository; | @@ -50,6 +51,7 @@ import com.bsth.repository.schedule.TTInfoBxDetailRepository; | ||
| 50 | import com.bsth.service.LineService; | 51 | import com.bsth.service.LineService; |
| 51 | import com.bsth.service.forms.BudgetService; | 52 | import com.bsth.service.forms.BudgetService; |
| 52 | import com.bsth.service.impl.BaseServiceImpl; | 53 | import com.bsth.service.impl.BaseServiceImpl; |
| 54 | +import com.bsth.service.sys.DictionaryService; | ||
| 53 | import com.bsth.util.ReportUtils; | 55 | import com.bsth.util.ReportUtils; |
| 54 | 56 | ||
| 55 | @Service | 57 | @Service |
| @@ -83,6 +85,9 @@ public class BudgetServiceImpl extends BaseServiceImpl<Budget, Integer> implemen | @@ -83,6 +85,9 @@ public class BudgetServiceImpl extends BaseServiceImpl<Budget, Integer> implemen | ||
| 83 | private TTInfoBxDetailRepository ttInfoBxDetailRepository; | 85 | private TTInfoBxDetailRepository ttInfoBxDetailRepository; |
| 84 | 86 | ||
| 85 | @Autowired | 87 | @Autowired |
| 88 | + private DictionaryService dictionaryService; | ||
| 89 | + | ||
| 90 | + @Autowired | ||
| 86 | JdbcTemplate jdbcTemplate; | 91 | JdbcTemplate jdbcTemplate; |
| 87 | 92 | ||
| 88 | Logger logger = LoggerFactory.getLogger(this.getClass()); | 93 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| @@ -2897,11 +2902,19 @@ public class BudgetServiceImpl extends BaseServiceImpl<Budget, Integer> implemen | @@ -2897,11 +2902,19 @@ public class BudgetServiceImpl extends BaseServiceImpl<Budget, Integer> implemen | ||
| 2897 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); | 2902 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| 2898 | 2903 | ||
| 2899 | if(model.trim().length() > 0){ | 2904 | if(model.trim().length() > 0){ |
| 2900 | - planList = schedulePlanRepository.findPlanByTTinfo(line, date, model); | 2905 | + planList = schedulePlanRepository.findPlanByTTinfo(line, Long.valueOf(model), date); |
| 2901 | } else { | 2906 | } else { |
| 2902 | planList = schedulePlanRepository.findPlanByXlAndDate(line, date); | 2907 | planList = schedulePlanRepository.findPlanByXlAndDate(line, date); |
| 2903 | } | 2908 | } |
| 2904 | 2909 | ||
| 2910 | + Map<String, Object> dMap=new HashMap<>(); | ||
| 2911 | + dMap.put("dGroup_eq", "ScheduleBxType"); | ||
| 2912 | + Iterator<Dictionary> it= dictionaryService.list(dMap).iterator(); | ||
| 2913 | + while (it.hasNext()) { | ||
| 2914 | + Dictionary d=it.next(); | ||
| 2915 | + dMap.put(d.getdCode(), d.getdName()); | ||
| 2916 | + } | ||
| 2917 | + | ||
| 2905 | for(SchedulePlanInfo plan : planList){ | 2918 | for(SchedulePlanInfo plan : planList){ |
| 2906 | String gsBm = plan.getGsBm(); | 2919 | String gsBm = plan.getGsBm(); |
| 2907 | String fgsBm = plan.getFgsBm(); | 2920 | String fgsBm = plan.getFgsBm(); |
| @@ -3095,18 +3108,28 @@ public class BudgetServiceImpl extends BaseServiceImpl<Budget, Integer> implemen | @@ -3095,18 +3108,28 @@ public class BudgetServiceImpl extends BaseServiceImpl<Budget, Integer> implemen | ||
| 3095 | m.put("yybc", yybc); | 3108 | m.put("yybc", yybc); |
| 3096 | m.put("yylc", yylc); | 3109 | m.put("yylc", yylc); |
| 3097 | m.put("yy", yybc + "/" + yylc); | 3110 | m.put("yy", yybc + "/" + yylc); |
| 3098 | - m.put("yygs", yssj_all/60 + "." + yssj_all%60); | ||
| 3099 | - m.put("zgs", zgs/60 + "." + zgs%60); | 3111 | + m.put("yygs", yssj_all/60 + "." + (yssj_all%60>9?"":"0") + yssj_all%60); |
| 3112 | + m.put("zgs", zgs/60 + "." + (zgs%60>9?"":"0") + zgs%60); | ||
| 3100 | 3113 | ||
| 3101 | String bx = ""; | 3114 | String bx = ""; |
| 3102 | List<TTInfoBxDetail> findBxDetail = ttInfoBxDetailRepository.findBxDetail(ttInfo, xl, lp); | 3115 | List<TTInfoBxDetail> findBxDetail = ttInfoBxDetailRepository.findBxDetail(ttInfo, xl, lp); |
| 3103 | if(findBxDetail.size() > 0){ | 3116 | if(findBxDetail.size() > 0){ |
| 3104 | for(TTInfoBxDetail b : findBxDetail){ | 3117 | for(TTInfoBxDetail b : findBxDetail){ |
| 3105 | - if(b.getBxType1() != null && b.getBxType1().getDicDesc() != null){ | ||
| 3106 | - bx += bx.length() > 0 ? "/" + b.getBxType1().getDicDesc() : b.getBxType1().getDicDesc(); | 3118 | + if(b.getBxType1() != null && b.getBxType1().getDicDesc() != null |
| 3119 | + && !("null".equals(b.getBxType1().getDicDesc()))){ | ||
| 3120 | + String dic = b.getBxType1().getDicDesc(); | ||
| 3121 | + if(dMap.containsKey(dic)){ | ||
| 3122 | + dic = dMap.get(dic).toString(); | ||
| 3123 | + } | ||
| 3124 | + bx += bx.length() > 0 ? "/" + dic : dic; | ||
| 3107 | } | 3125 | } |
| 3108 | - if(b.getBxType2() != null && b.getBxType2().getDicDesc() != null){ | ||
| 3109 | - bx += bx.length() > 0 ? "/" + b.getBxType2().getDicDesc() : b.getBxType2().getDicDesc(); | 3126 | + if(b.getBxType2() != null && b.getBxType2().getDicDesc() != null |
| 3127 | + && !("null".equals(b.getBxType2().getDicDesc()))){ | ||
| 3128 | + String dic = b.getBxType2().getDicDesc(); | ||
| 3129 | + if(dMap.containsKey(dic)){ | ||
| 3130 | + dic = dMap.get(dic).toString(); | ||
| 3131 | + } | ||
| 3132 | + bx += bx.length() > 0 ? "/" + dic : dic; | ||
| 3110 | } | 3133 | } |
| 3111 | } | 3134 | } |
| 3112 | } | 3135 | } |
src/main/resources/static/pages/forms/budget/timeAnaly.html
| @@ -96,8 +96,12 @@ | @@ -96,8 +96,12 @@ | ||
| 96 | <th>平均停站时间</th> | 96 | <th>平均停站时间</th> |
| 97 | <th>空驶班次/空驶里程</th> | 97 | <th>空驶班次/空驶里程</th> |
| 98 | <th>运营班次/运营里程</th> | 98 | <th>运营班次/运营里程</th> |
| 99 | - <th>营运工时<br/>(小时.分钟)</th> | ||
| 100 | - <th>总工时<br/>(小时.分钟)</th> | 99 | + <th title="营运工时:营运班次运送时间总和,不包括停站时间"> |
| 100 | + 营运工时<br/>(小时.分钟) | ||
| 101 | + </th> | ||
| 102 | + <th title="总工时:报道例保时间15分钟+出场到回场总时长,期间有再出场的加10分钟复驶时间"> | ||
| 103 | + 总工时<br/>(小时.分钟) | ||
| 104 | + </th> | ||
| 101 | </tr> | 105 | </tr> |
| 102 | </thead> | 106 | </thead> |
| 103 | <tbody> | 107 | <tbody> |
src/main/resources/static/pages/forms/budget/timeSum.html
| @@ -69,7 +69,9 @@ | @@ -69,7 +69,9 @@ | ||
| 69 | <td style="min-width: 90px">司最高配档数</td> | 69 | <td style="min-width: 90px">司最高配档数</td> |
| 70 | <td style="min-width: 90px">售最高配档数</td> | 70 | <td style="min-width: 90px">售最高配档数</td> |
| 71 | <td style="min-width: 90px">病缺勤比例%</td> | 71 | <td style="min-width: 90px">病缺勤比例%</td> |
| 72 | - <td style="min-width: 90px">人均营运工时(小时)</td> | 72 | + <td style="min-width: 90px" title="营运工时:营运班次运送时间总和,不包括停站时间"> |
| 73 | + 人均营运工时(小时) | ||
| 74 | + </td> | ||
| 73 | </tr> | 75 | </tr> |
| 74 | 76 | ||
| 75 | </thead> | 77 | </thead> |