Commit 8c0029d67e2f966ef377a0a38e7c0d4aacea9356

Authored by 廖磊
2 parents 98ab237b 7caf7607

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
src/main/java/com/bsth/controller/forms/ExportController.java
@@ -82,7 +82,7 @@ public class ExportController { @@ -82,7 +82,7 @@ public class ExportController {
82 } 82 }
83 83
84 // 班次车辆人员日统计 84 // 班次车辆人员日统计
85 - @RequestMapping(value = "/shifdayExport", method = RequestMethod.POST) 85 + @RequestMapping(value = "/shifdayExport", method = RequestMethod.GET)
86 public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) { 86 public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) {
87 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 87 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
88 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 88 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -122,7 +122,7 @@ public class ExportController { @@ -122,7 +122,7 @@ public class ExportController {
122 } 122 }
123 123
124 // 班次车辆人员月统计 124 // 班次车辆人员月统计
125 - @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.POST) 125 + @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.GET)
126 public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map) { 126 public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map) {
127 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 127 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
128 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 128 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -147,12 +147,18 @@ public class ExportController { @@ -147,12 +147,18 @@ public class ExportController {
147 } 147 }
148 148
149 try { 149 try {
  150 + String mouldurl = null;
  151 + if(map.get("empnames").equals("驾驶员")){
  152 + mouldurl="mould/shiftuehiclemanth.xls";
  153 + }else if(map.get("empnames").equals("售票员")){
  154 + mouldurl="mould/shiftuehiclemanthspy.xls";
  155 + }else if(map.get("empnames").equals("车辆自编号")){
  156 + mouldurl="mould/shiftuehiclemanthclzbh.xls";
  157 + }
150 listI.add(resList.iterator()); 158 listI.add(resList.iterator());
151 -  
152 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 159 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
153 - ee.excelReplace(listI, new Object[] { map }, path + "mould/shiftuehiclemanth.xls", path  
154 - + "export/班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");  
155 - 160 + ee.excelReplace(listI, new Object[] { map }, path +mouldurl,
  161 + path + "export/班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
156 } catch (Exception e) { 162 } catch (Exception e) {
157 e.printStackTrace(); 163 e.printStackTrace();
158 } 164 }
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
@@ -52,14 +52,14 @@ public class MCY_FormsController { @@ -52,14 +52,14 @@ public class MCY_FormsController {
52 } 52 }
53 53
54 // 班次车辆人员月报表 54 // 班次车辆人员月报表
55 - @RequestMapping(value = "/shiftuehiclemanth", method = RequestMethod.POST) 55 + @RequestMapping(value = "/shiftuehiclemanth", method = RequestMethod.GET)
56 public List<Shiftuehiclemanth> shiftuehiclemanth(@RequestParam Map<String, Object> map) { 56 public List<Shiftuehiclemanth> shiftuehiclemanth(@RequestParam Map<String, Object> map) {
57 57
58 return formsService.shiftuehiclemanth(map); 58 return formsService.shiftuehiclemanth(map);
59 } 59 }
60 60
61 // 班次车辆人员日统计 61 // 班次车辆人员日统计
62 - @RequestMapping(value = "/shifday", method = RequestMethod.POST) 62 + @RequestMapping(value = "/shifday", method = RequestMethod.GET)
63 public List<Shifday> shifday(@RequestParam Map<String, Object> map) { 63 public List<Shifday> shifday(@RequestParam Map<String, Object> map) {
64 64
65 return formsService.shifday(map); 65 return formsService.shifday(map);
src/main/java/com/bsth/entity/schedule/rule/ScheduleRule1Flat.java
@@ -57,6 +57,7 @@ public class ScheduleRule1Flat extends BEntity { @@ -57,6 +57,7 @@ public class ScheduleRule1Flat extends BEntity {
57 private String lpNames; 57 private String lpNames;
58 /** 对应的路牌ids(用逗号隔开) */ 58 /** 对应的路牌ids(用逗号隔开) */
59 @NotNull 59 @NotNull
  60 + @Column(length = 1000)
60 private String lpIds; 61 private String lpIds;
61 /** 起始路牌(从0开始) */ 62 /** 起始路牌(从0开始) */
62 @NotNull 63 @NotNull
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -147,59 +147,94 @@ public class FormsServiceImpl implements FormsService { @@ -147,59 +147,94 @@ public class FormsServiceImpl implements FormsService {
147 147
148 @Override 148 @Override
149 public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { 149 public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) {
150 - String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type " 150 + final String empnames=map.get("empnames").toString();
  151 + String gsdmManth="";
  152 + String fgsdmManth="";
  153 + if(map.containsKey("gsdmManth")){
  154 + gsdmManth=map.get("gsdmManth").toString();
  155 + }
  156 + if(map.containsKey("fgsdmManth")){
  157 + fgsdmManth=map.get("fgsdmManth").toString();
  158 + }
  159 + String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type,r.s_name,r.lp_name "
151 + " from bsth_c_s_sp_info_real r " 160 + " from bsth_c_s_sp_info_real r "
152 + " where 1=1 "; 161 + " where 1=1 ";
153 - if(map.get("startDate").toString()!=""){ 162 + if(map.get("startDate")!=null&&!map.get("startDate").equals("")){
154 sql+=" and to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') "; 163 sql+=" and to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') ";
155 } 164 }
156 165
157 - if(map.get("endDate").toString()!=""){ 166 + if(map.get("endDate")!=null&&!map.get("endDate").equals("")){
158 sql+=" and to_days('" + map.get("endDate").toString() + "') "; 167 sql+=" and to_days('" + map.get("endDate").toString() + "') ";
159 } 168 }
160 - if( map.get("line").toString()!=""){ 169 + if(map.get("line")!=null&&!map.get("line").equals("")){
161 sql+=" and r.xl_bm='"+ map.get("line").toString() + "' "; 170 sql+=" and r.xl_bm='"+ map.get("line").toString() + "' ";
162 } 171 }
163 sql+= " AND r.gs_bm is not null and r.bc_type not in('in','out')"; 172 sql+= " AND r.gs_bm is not null and r.bc_type not in('in','out')";
164 - if(map.get("gsdmManth").toString()!=""){ 173 + if(map.get("gsdmManth")!=null&&!map.get("gsdmManth").equals("")){
165 sql+=" and r.gs_bm='"+map.get("gsdmManth").toString()+"' "; 174 sql+=" and r.gs_bm='"+map.get("gsdmManth").toString()+"' ";
166 } 175 }
167 - if(map.get("fgsdmManth").toString()!=""){ 176 + if(map.get("fgsdmManth")!=null&&!map.get("fgsdmManth").equals("")){
168 sql+=" and r.fgs_bm='"+map.get("fgsdmManth").toString()+"' "; 177 sql+=" and r.fgs_bm='"+map.get("fgsdmManth").toString()+"' ";
169 } 178 }
  179 + if(empnames.equals("售票员")){
  180 + sql+="and r.s_name is not null AND r.s_name !=''";
  181 + }
170 sql += " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type "; 182 sql += " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type ";
171 183
172 - startDate = map.get("startDate").toString();  
173 - endDate = map.get("endDate").toString(); 184 +
174 List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { 185 List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() {
175 - 186 +
176 @Override 187 @Override
177 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { 188 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException {
178 Shiftuehiclemanth shif = new Shiftuehiclemanth(); 189 Shiftuehiclemanth shif = new Shiftuehiclemanth();
179 - shif.setjName(arg0.getString("j_name")); 190 + if(empnames.equals("驾驶员")){
  191 + shif.setjName(arg0.getString("j_name"));
  192 + }else if(empnames.equals("售票员")){
  193 + shif.setjName(arg0.getString("s_name")==null ? "":arg0.getString("s_name"));
  194 + }else if(empnames.equals("车辆自编号")){
  195 + shif.setjName(arg0.getString("cl_zbh"));
  196 + }
  197 +
180 shif.setJgh(arg0.getString("j_gh")); 198 shif.setJgh(arg0.getString("j_gh"));
181 shif.setZbh(arg0.getString("cl_zbh")); 199 shif.setZbh(arg0.getString("cl_zbh"));
182 return shif; 200 return shif;
183 } 201 }
184 }); 202 });
185 203
  204 + List<ScheduleRealInfo> sList;
  205 + List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineYbb(map.get("line").toString(), map.get("startDate").toString(), map.get("endDate").toString());
186 for(int i=0;i<list.size();i++){ 206 for(int i=0;i<list.size();i++){
187 - Shiftuehiclemanth s=list.get(i);  
188 - Map<String, Object> maps = new HashMap<>();  
189 -  
190 - maps = commonService.findKMBC1(s.getjName(),s.getZbh(), startDate,  
191 - endDate);  
192 -  
193 - s.setJhlc(maps.get("jhlc").toString());  
194 - s.setEmptMileage(maps.get("ksgl").toString());  
195 - s.setRemMileage(maps.get("remMileage").toString());  
196 - s.setAddMileage(maps.get("addMileage").toString());  
197 - s.setTotalm(maps.get("realMileage").toString());  
198 - s.setCjbc(maps.get("cjbc").toString());  
199 - s.setLjbc(maps.get("ljbc").toString());  
200 - s.setSjbc(maps.get("sjbc").toString());  
201 - 207 + sList =new ArrayList<ScheduleRealInfo>();
  208 + Shiftuehiclemanth d=list.get(i);
  209 + for (int j = 0; j < lists.size(); j++) {
  210 + ScheduleRealInfo s=lists.get(j);
  211 + if(d.getJgh().equals(s.getjGh()) && d.getZbh().equals(s.getClZbh())){
  212 + sList.add(s);
  213 + }
  214 + }
  215 +
  216 + double ksgl=culateMileageService.culateKsgl(sList);
  217 + double jccgl=culateMileageService.culateJccgl(sList);
  218 + double zksgl=Arith.add(ksgl, jccgl);
  219 + double ljgl=culateMileageService.culateLjgl(sList);
  220 + double sjgl=culateMileageService.culateSjgl(sList);
  221 + double zyygl=Arith.add(ljgl, sjgl);
  222 + double cjbc=culateMileageService.culateLbbc(sList);
  223 + double Ljbc=culateMileageService.culateLjbc(sList,"");
  224 + double cjgl=culateMileageService.culateLbgl(sList);
  225 + double zjgl=culateMileageService.culateLjgl(sList);
  226 + d.setEmptMileage(String.valueOf(zksgl));//空驶公里
  227 + d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里
  228 + d.setSjbc(String.valueOf(culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, "")));
  229 + d.setJhlc(String.valueOf(zyygl));//运营里程
  230 + d.setCjbc(String.valueOf(cjbc));//抽检班次
  231 + d.setLjbc(String.valueOf(Ljbc));//增加班次
  232 + d.setRemMileage(String.valueOf(cjgl));//抽检里程
  233 + d.setAddMileage(String.valueOf(zjgl));//增加里程
  234 +
202 } 235 }
  236 +
  237 +
203 return list; 238 return list;
204 } 239 }
205 240
@@ -207,32 +242,30 @@ public class FormsServiceImpl implements FormsService { @@ -207,32 +242,30 @@ public class FormsServiceImpl implements FormsService {
207 @Override 242 @Override
208 public List<Shifday> shifday(Map<String, Object> map) { 243 public List<Shifday> shifday(Map<String, Object> map) {
209 244
210 - String sql ="select t.* from (select r.schedule_date,r.j_name,IFNULL(r.s_name,'')as s_name,"  
211 - + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm FROM bsth_c_s_sp_info_real r where 1=1 "  
212 - + " and to_days(r.schedule_date)=to_days('"+ map.get("date").toString() + "') "  
213 - + " and r.xl_bm like '%"+map.get("line").toString()+"%' "  
214 - + " and r.gs_bm='"+map.get("gsdmShif").toString()+"' "  
215 - + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"' ) t"  
216 - + " GROUP BY t.schedule_date,t.j_name,t.s_name, t.cl_zbh,t.xl_bm,t.j_gh,t.gs_bm,t.fgs_bm ";  
217 - /*String sql = " select r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,"  
218 - + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type "  
219 - + " FROM bsth_c_s_sp_info_real r "  
220 - + " where 1=1 ";  
221 - if(map.get("date").toString()!=""){  
222 - sql+=" and to_days(r.schedule_date)=to_days('"+ map.get("date").toString() + "') "; 245 + String line="";
  246 + String date="";
  247 + String gsdmShif="";
  248 + String fgsdmShif="";
  249 + if(map.get("line")!=null&&!map.get("line").equals("")){
  250 + line =map.get("line").toString();
223 } 251 }
224 - if( map.get("line").toString()!=""){  
225 - sql+=" and r.xl_bm=" + map.get("line").toString(); 252 + if(map.get("date")!=null&&!map.get("date").equals("")){
  253 + date =map.get("date").toString();
226 } 254 }
227 - sql+= " and r.bc_type not in('in','out')";  
228 - if(map.get("gsdmShif").toString()!=""){  
229 - sql+=" and r.gs_bm='"+map.get("gsdmShif").toString()+"'"; 255 + if(map.get("gsdmShif")!=null&&!map.get("gsdmShif").equals("")){
  256 + gsdmShif =map.get("gsdmShif").toString();
230 } 257 }
231 - if(map.get("fgsdmShif").toString()!=""){  
232 - sql+=" and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'";  
233 - }  
234 - sql += " GROUP BY r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "  
235 - + " ORDER BY r.lp_name asc";*/ 258 + if(map.get("fgsdmShif")!=null&&!map.get("fgsdmShif").equals("")){
  259 + fgsdmShif =map.get("fgsdmShif").toString();
  260 + }
  261 + String sql ="select t.* from (select r.schedule_date,r.j_name,IFNULL(r.s_name,'')as s_name,"
  262 + + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm,r.lp_name FROM bsth_c_s_sp_info_real r where 1=1 "
  263 + + " and to_days(r.schedule_date)=to_days('"+date + "') "
  264 + + " and r.xl_bm like '%"+line+"%' "
  265 + + " and r.gs_bm like '%"+gsdmShif+"%' "
  266 + + " and r.fgs_bm like '%"+fgsdmShif+"%' ) t"
  267 + + " GROUP BY t.schedule_date,t.j_name,t.s_name, t.cl_zbh,t.xl_bm,t.j_gh,t.gs_bm,t.fgs_bm ";
  268 +
236 269
237 List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { 270 List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() {
238 271
@@ -244,31 +277,48 @@ public class FormsServiceImpl implements FormsService { @@ -244,31 +277,48 @@ public class FormsServiceImpl implements FormsService {
244 shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); 277 shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString());
245 shifday.setCarPlate(arg0.getString("cl_zbh").toString()); 278 shifday.setCarPlate(arg0.getString("cl_zbh").toString());
246 shifday.setJgh(arg0.getString("j_gh")); 279 shifday.setJgh(arg0.getString("j_gh"));
  280 + shifday.setLpName(arg0.getString("lp_name")== null ? "" : arg0.getString("lp_name").toString());
247 return shifday; 281 return shifday;
248 } 282 }
249 283
250 }); 284 });
251 - 285 + List<ScheduleRealInfo> sList;
  286 + List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(map.get("line").toString(), map.get("date").toString());
252 for(int i=0;i<list.size();i++){ 287 for(int i=0;i<list.size();i++){
253 - Shifday shi=list.get(i);  
254 - Map<String, Object> maps = new HashMap<>();  
255 - maps = commonService.findKMBC2(shi.getJgh(), shi.getCarPlate(),  
256 - shi.getRq());  
257 - shi.setJhlc(maps.get("jhlc").toString());// 计划里程  
258 - //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程  
259 - shi.setYygl(maps.get("yygl").toString());// 营运里程  
260 - shi.setEmptMileage(maps.get("ksgl").toString());// 空驶里程  
261 - shi.setRemMileage(maps.get("remMileage").toString());// 抽减里程  
262 - shi.setAddMileage(maps.get("addMileage").toString());// 增加里程  
263 - shi.setTotalm(maps.get("realMileage").toString());// 总里程  
264 - shi.setJhbc(maps.get("jhbc").toString());// 计划班次  
265 - //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次  
266 - shi.setCjbc(maps.get("cjbc").toString());// 抽减班次  
267 - shi.setLjbc(maps.get("ljbc").toString());// 增加班次  
268 - shi.setSjbc(maps.get("sjbc").toString());// 实际班次  
269 -  
270 - }  
271 - 288 + sList =new ArrayList<ScheduleRealInfo>();
  289 + Shifday d=list.get(i);
  290 + for (int j = 0; j < lists.size(); j++) {
  291 + ScheduleRealInfo s=lists.get(j);
  292 + if(d.getJgh().equals(s.getjGh()) && d.getCarPlate().equals(s.getClZbh())){
  293 + sList.add(s);
  294 + }
  295 + }
  296 +
  297 + double ksgl=culateMileageService.culateKsgl(sList);
  298 + double jccgl=culateMileageService.culateJccgl(sList);
  299 + double zksgl=Arith.add(ksgl, jccgl);
  300 + double ljgl=culateMileageService.culateLjgl(sList);
  301 + double sjgl=culateMileageService.culateSjgl(sList);
  302 + double zyygl=Arith.add(ljgl, sjgl);
  303 + double jhgl=culateMileageService.culateJhgl(sList);
  304 + double cjgl=culateMileageService.culateLbgl(sList);
  305 + double jhbc =culateMileageService.culateJhbc(sList,"");
  306 + double cjbc=culateMileageService.culateLbbc(sList);
  307 + double Ljbc=culateMileageService.culateLjbc(sList,"");
  308 + double zjgl=culateMileageService.culateLjgl(sList);
  309 + d.setEmptMileage(String.valueOf(zksgl));//空驶公里
  310 + d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里
  311 + d.setSjbc(String.valueOf(culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, "")));
  312 + d.setJhlc(String.valueOf(jhgl));//计划里程
  313 + d.setYygl(String.valueOf(zyygl));//运营公里
  314 + d.setSjjhlc(String.valueOf(sjgl));//实际计划里程
  315 + d.setRemMileage(String.valueOf(cjgl));//抽减里程
  316 + d.setJhbc(String.valueOf(jhbc));//计划班次
  317 + d.setCjbc(String.valueOf(cjbc));//抽检班次
  318 + d.setLjbc(String.valueOf(Ljbc));//增加班次
  319 + d.setAddMileage(String.valueOf(zjgl));//增加公里
  320 + d.setSjjhbc(String.valueOf(culateMileageService.culateSjbc(sList, "")));//实际计划班次
  321 + }
272 return list; 322 return list;
273 } 323 }
274 324
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
@@ -360,7 +360,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -360,7 +360,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
360 } 360 }
361 editInfo.getHeader().addAll(Arrays.asList(headarrays)); 361 editInfo.getHeader().addAll(Arrays.asList(headarrays));
362 362
363 - editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.2f,营运里程=%.2f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy)); 363 + editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.2f,营运里程=%.2f,总里程=%.2f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy, all_lc_ks + all_lc_yy));
364 } 364 }
365 365
366 LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//"); 366 LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//");
src/main/resources/static/pages/forms/mould/shiftuehiclemanthclzbh.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/shiftuehiclemanthspy.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/mforms/shifdays/shifday.html
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <div class="col-md-12"> 27 <div class="col-md-12">
28 <div class="portlet light porttlet-fit bordered"> 28 <div class="portlet light porttlet-fit bordered">
29 <div class="portlet-title"> 29 <div class="portlet-title">
30 - <form class="form-inline" action="" method="post"> 30 + <form class="form-inline" action="" method="get">
31 <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_shif"> 31 <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_shif">
32 <span class="item-label" style="width: 80px;">公司: </span> 32 <span class="item-label" style="width: 80px;">公司: </span>
33 <select class="form-control" name="company" id="gsdmShif" style="width: 140px;"></select> 33 <select class="form-control" name="company" id="gsdmShif" style="width: 140px;"></select>
@@ -104,8 +104,12 @@ $(function(){ @@ -104,8 +104,12 @@ $(function(){
104 format : 'YYYY-MM-DD', 104 format : 'YYYY-MM-DD',
105 locale : 'zh-cn' 105 locale : 'zh-cn'
106 }); 106 });
107 - 107 + var fage=false;
108 var obj = []; 108 var obj = [];
  109 + var xlList;
  110 +
  111 + $.get('/report/lineList',function(result){
  112 + xlList=result;
109 $.get('/user/companyData', function(result){ 113 $.get('/user/companyData', function(result){
110 obj = result; 114 obj = result;
111 var options = ''; 115 var options = '';
@@ -124,7 +128,7 @@ $(function(){ @@ -124,7 +128,7 @@ $(function(){
124 $('#gsdmShif').html(options); 128 $('#gsdmShif').html(options);
125 updateCompany(); 129 updateCompany();
126 }); 130 });
127 - 131 + })
128 $("#gsdmShif").on("change",updateCompany); 132 $("#gsdmShif").on("change",updateCompany);
129 function updateCompany(){ 133 function updateCompany(){
130 var company = $('#gsdmShif').val(); 134 var company = $('#gsdmShif').val();
@@ -138,28 +142,60 @@ $(function(){ @@ -138,28 +142,60 @@ $(function(){
138 } 142 }
139 } 143 }
140 $('#fgsdmShif').html(options); 144 $('#fgsdmShif').html(options);
  145 + initXl();
141 } 146 }
142 147
143 148
144 - $.get('/basic/lineCode2Name',function(result){  
145 - var data=[]; 149 +// $.get('/basic/lineCode2Name',function(result){
  150 +// var data=[];
  151 +
  152 +// for(var code in result){
  153 +// data.push({id: code, text: result[code]});
  154 +// }
  155 +// initPinYinSelect2('#line',data,'');
146 156
147 - for(var code in result){  
148 - data.push({id: code, text: result[code]}); 157 +// })
  158 +
  159 + $("#fgsdmShif").on("change",initXl);
  160 + function initXl(){
  161 + var data=[];
  162 + if(fage){
  163 + $("#line").select2("destroy").html('');
  164 + }
  165 + var fgs=$('#fgsdmShif').val();
  166 + var gs=$('#gsdmShif').val();
  167 + for(var i=0;i<xlList.length;i++){
  168 + if(gs!=""){
  169 + if(fgs!=""){
  170 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  171 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  172 + }
  173 + }else{
  174 + if(xlList[i]["gsbm"]==gs){
  175 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  176 + }
  177 + }
  178 + }
149 } 179 }
150 initPinYinSelect2('#line',data,''); 180 initPinYinSelect2('#line',data,'');
151 -  
152 - }) 181 + fage=true;
  182 + }
  183 +
153 184
154 $("#query").on("click",function(){ 185 $("#query").on("click",function(){
155 var line = $("#line").val(); 186 var line = $("#line").val();
156 var date = $("#date").val(); 187 var date = $("#date").val();
157 var gsdmShif = $("#gsdmShif").val(); 188 var gsdmShif = $("#gsdmShif").val();
158 var fgsdmShif = $("#fgsdmShif").val(); 189 var fgsdmShif = $("#fgsdmShif").val();
  190 + var params = {};
  191 + params.fgsdmShif =fgsdmShif;
  192 + params.date =date;
  193 + params.gsdmShif =gsdmShif;
  194 + params.line =line;
159 if(date=="" || date ==null){ 195 if(date=="" || date ==null){
160 layer.msg('请选择日期.'); 196 layer.msg('请选择日期.');
161 }else{ 197 }else{
162 - $post('/mcy_forms/shifday',{gsdmShif:gsdmShif,fgsdmShif:fgsdmShif, line:line,date:date},function(result){ 198 + $get('/mcy_forms/shifday',params,function(result){
163 $.each(result, function(i, obj) { 199 $.each(result, function(i, obj) {
164 obj.requestType = reqCodeMap[obj.requestType]; 200 obj.requestType = reqCodeMap[obj.requestType];
165 }); 201 });
@@ -175,8 +211,14 @@ $(function(){ @@ -175,8 +211,14 @@ $(function(){
175 var line = $("#line").val(); 211 var line = $("#line").val();
176 var date = $("#date").val(); 212 var date = $("#date").val();
177 var gsdmShif = $("#gsdmShif").val(); 213 var gsdmShif = $("#gsdmShif").val();
178 - var fgsdmShif = $("#fgsdmShif").val();  
179 - $post('/mcy_export/shifdayExport',{gsdmShif:gsdmShif,fgsdmShif:fgsdmShif,line:line,date:date,type:'export'},function(result){ 214 + var fgsdmShif = $("#fgsdmShif").val();
  215 + var params = {};
  216 + params.fgsdmShif =fgsdmShif;
  217 + params.date =date;
  218 + params.gsdmShif =gsdmShif;
  219 + params.line =line;
  220 + params.type='export';
  221 + $get('/mcy_export/shifdayExport',params,function(result){
180 window.open("/downloadFile/download?fileName=班次车辆人员日报表"+moment(date).format("YYYYMMDD")); 222 window.open("/downloadFile/download?fileName=班次车辆人员日报表"+moment(date).format("YYYYMMDD"));
181 }); 223 });
182 }); 224 });
src/main/resources/static/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html
@@ -53,6 +53,11 @@ @@ -53,6 +53,11 @@
53 </div> 53 </div>
54 <div style="display: inline-block;margin-left: 15px"> 54 <div style="display: inline-block;margin-left: 15px">
55 <span class="item-label" style="width: 150px;">统计: </span> 55 <span class="item-label" style="width: 150px;">统计: </span>
  56 + <select class="form-control" style="width: 136px;" id='empnames'>
  57 + <option value="驾驶员">驾驶员</option>
  58 + <option value="售票员">售票员</option>
  59 + <option value="车辆自编号">车辆自编号</option>
  60 + </select>
56 </div> 61 </div>
57 <div class="form-group"> 62 <div class="form-group">
58 <input class="btn btn-default" type="button" id="query" value="筛选"/> 63 <input class="btn btn-default" type="button" id="query" value="筛选"/>
@@ -66,7 +71,7 @@ @@ -66,7 +71,7 @@
66 <thead> 71 <thead>
67 <tr> 72 <tr>
68 <th>序号</th> 73 <th>序号</th>
69 - <th>驾驶员</th> 74 + <th id='empname'>驾驶员</th>
70 <th>运营里程</th> 75 <th>运营里程</th>
71 <th>空驶里程</th> 76 <th>空驶里程</th>
72 <th>抽减里程</th> 77 <th>抽减里程</th>
@@ -97,8 +102,11 @@ @@ -97,8 +102,11 @@
97 format : 'YYYY-MM-DD', 102 format : 'YYYY-MM-DD',
98 locale : 'zh-cn' 103 locale : 'zh-cn'
99 }); 104 });
100 - 105 + var fage=false;
101 var obj = []; 106 var obj = [];
  107 + var xlList;
  108 + $.get('/report/lineList',function(result){
  109 + xlList=result;
102 $.get('/user/companyData', function(result){ 110 $.get('/user/companyData', function(result){
103 obj = result; 111 obj = result;
104 var options = ''; 112 var options = '';
@@ -117,7 +125,7 @@ @@ -117,7 +125,7 @@
117 $('#gsdmManth').html(options); 125 $('#gsdmManth').html(options);
118 updateCompany(); 126 updateCompany();
119 }); 127 });
120 - 128 + })
121 $("#gsdmManth").on("change",updateCompany); 129 $("#gsdmManth").on("change",updateCompany);
122 function updateCompany(){ 130 function updateCompany(){
123 var company = $('#gsdmManth').val(); 131 var company = $('#gsdmManth').val();
@@ -131,64 +139,43 @@ @@ -131,64 +139,43 @@
131 } 139 }
132 } 140 }
133 $('#fgsdmManth').html(options); 141 $('#fgsdmManth').html(options);
  142 + initXl();
134 } 143 }
135 -  
136 -  
137 - $.get('/basic/lineCode2Name',function(result){ 144 + $("#fgsdmManth").on("change",initXl);
  145 + function initXl(){
138 var data=[]; 146 var data=[];
139 -  
140 - for(var code in result){  
141 - data.push({id: code, text: result[code]}); 147 + if(fage){
  148 + $("#line").select2("destroy").html('');
  149 + }
  150 + var fgs=$('#fgsdmManth').val();
  151 + var gs=$('#gsdmManth').val();
  152 + for(var i=0;i<xlList.length;i++){
  153 + if(gs!=""){
  154 + if(fgs!=""){
  155 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  156 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  157 + }
  158 + }else{
  159 + if(xlList[i]["gsbm"]==gs){
  160 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  161 + }
  162 + }
  163 + }
142 } 164 }
143 initPinYinSelect2('#line',data,''); 165 initPinYinSelect2('#line',data,'');
144 -  
145 - })  
146 - $('#lpName').select2({  
147 - ajax: {  
148 - url: '/realSchedule/findLpName',  
149 - type: 'post',  
150 - dataType: 'json',  
151 - delay: 150,  
152 - data: function(params){  
153 - return{lpName: params.term};  
154 - },  
155 - processResults: function (data) {  
156 - return {  
157 - results: data  
158 - };  
159 - },  
160 - cache: true  
161 - },  
162 - templateResult: function(repo){  
163 - if (repo.loading) return repo.text;  
164 - var h = '<span>'+repo.text+'</span>';  
165 - return h;  
166 - },  
167 - escapeMarkup: function (markup) { return markup; },  
168 - minimumInputLength: 1,  
169 - templateSelection: function(repo){  
170 - return repo.text;  
171 - },  
172 - language: {  
173 - noResults: function(){  
174 - return '<span style="color:red;font-size: 12px;">没有搜索到路牌!</span>';  
175 - },  
176 - inputTooShort : function(e) {  
177 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入路牌搜索路牌</span>';  
178 - },  
179 - searching : function() {  
180 - return '<span style="color:gray;font-size: 12px;"> 正在搜索路牌...</span>';  
181 - }  
182 - }  
183 - }); 166 + fage=true;
  167 + }
184 $("#query").on("click",function(){ 168 $("#query").on("click",function(){
185 - var line = $("#line").val();  
186 - var startDate = $("#startDate").val();  
187 - var endDate = $("#endDate").val();  
188 - var lpName = $("#lpName").val();  
189 - var gsdmManth= $("#gsdmManth").val();  
190 - var fgsdmManth= $("#fgsdmManth").val();  
191 - $post("/mcy_forms/shiftuehiclemanth",{gsdmManth:gsdmManth,fgsdmManth:fgsdmManth, line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){ 169 + $("#empname").html($("#empnames").val())
  170 + var params={};
  171 + params.empnames=$("#empnames").val();
  172 + params.line = $("#line").val();
  173 + params.startDate = $("#startDate").val();
  174 + params.endDate = $("#endDate").val();
  175 + params.lpName = $("#lpName").val();
  176 + params.gsdmManth= $("#gsdmManth").val();
  177 + params.fgsdmManth= $("#fgsdmManth").val();
  178 + $get("/mcy_forms/shiftuehiclemanth",params,function(result){
192 $("#sDate").text(startDate); 179 $("#sDate").text(startDate);
193 $("#eDate").text(endDate); 180 $("#eDate").text(endDate);
194 var temp = {}; 181 var temp = {};
@@ -209,18 +196,28 @@ @@ -209,18 +196,28 @@
209 }); 196 });
210 197
211 $("#export").on("click",function(){ 198 $("#export").on("click",function(){
212 - var line = $("#line").val();  
213 - var startDate = $("#startDate").val();  
214 - var endDate = $("#endDate").val();  
215 - var lpName = $("#lpName").val();  
216 - var gsdmManth= $("#gsdmManth").val();  
217 - var fgsdmManth= $("#fgsdmManth").val();  
218 - $post('/mcy_export/shiftuehiclemanthExport',{gsdmManth:gsdmManth,fgsdmManth:fgsdmManth,line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){  
219 - window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment(startDate).format("YYYYMMDD")); 199 + var params={};
  200 + params.empnames=$("#empnames").val();
  201 + params.line = $("#line").val();
  202 + params.startDate = $("#startDate").val();
  203 + params.endDate = $("#endDate").val();
  204 + params.lpName = $("#lpName").val();
  205 + params.gsdmManth= $("#gsdmManth").val();
  206 + params.fgsdmManth= $("#fgsdmManth").val();
  207 + params.type='export';
  208 + $get('/mcy_export/shiftuehiclemanthExport',params,function(result){
  209 + window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment($("#startDate").val()).format("YYYYMMDD"));
220 }); 210 });
221 }); 211 });
222 212
223 - }); 213 + });
  214 +
  215 +// $("#empnames").change(function(){
  216 +// $("#empname").html($("#empnames").val())
  217 +// // $("#query").click();
  218 +
  219 +// });
  220 +
224 </script> 221 </script>
225 <script type="text/html" id="list_shiftuehiclemanth"> 222 <script type="text/html" id="list_shiftuehiclemanth">
226 {{each list as obj i}} 223 {{each list as obj i}}
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/edit.html
@@ -96,12 +96,18 @@ @@ -96,12 +96,18 @@
96 <div class="col-md-3"> 96 <div class="col-md-3">
97 <input type="text" class="form-control" 97 <input type="text" class="form-control"
98 name="newDeviceNo" ng-model="ctrl.deviceInfoForSave.newDeviceNo" 98 name="newDeviceNo" ng-model="ctrl.deviceInfoForSave.newDeviceNo"
  99 + remote-Validation
  100 + remotevtype="cars_sbbh"
  101 + remotevparam="{{ {'id_eq': null, 'equipmentCode_eq': ctrl.deviceInfoForSave.newDeviceNo} | json}}"
99 required placeholder="请输入新终端号"/> 102 required placeholder="请输入新终端号"/>
100 </div> 103 </div>
101 <!-- 隐藏块,显示验证信息 --> 104 <!-- 隐藏块,显示验证信息 -->
102 <div class="alert alert-danger well-sm" ng-show="myForm.newDeviceNo.$error.required"> 105 <div class="alert alert-danger well-sm" ng-show="myForm.newDeviceNo.$error.required">
103 新终端号必须填写 106 新终端号必须填写
104 </div> 107 </div>
  108 + <div class="alert alert-danger well-sm" ng-show="myForm.newDeviceNo.$error.remote">
  109 + {{$remote_msg}}
  110 + </div>
105 </div> 111 </div>
106 112
107 <div class="form-group"> 113 <div class="form-group">
src/main/resources/static/pages/scheduleApp/module/basicInfo/deviceInfoManage/form.html
@@ -96,12 +96,18 @@ @@ -96,12 +96,18 @@
96 <div class="col-md-3"> 96 <div class="col-md-3">
97 <input type="text" class="form-control" 97 <input type="text" class="form-control"
98 name="newDeviceNo" ng-model="ctrl.deviceInfoForSave.newDeviceNo" 98 name="newDeviceNo" ng-model="ctrl.deviceInfoForSave.newDeviceNo"
  99 + remote-Validation
  100 + remotevtype="cars_sbbh"
  101 + remotevparam="{{ {'id_eq': null, 'equipmentCode_eq': ctrl.deviceInfoForSave.newDeviceNo} | json}}"
99 required placeholder="请输入新终端号"/> 102 required placeholder="请输入新终端号"/>
100 </div> 103 </div>
101 <!-- 隐藏块,显示验证信息 --> 104 <!-- 隐藏块,显示验证信息 -->
102 <div class="alert alert-danger well-sm" ng-show="myForm.newDeviceNo.$error.required"> 105 <div class="alert alert-danger well-sm" ng-show="myForm.newDeviceNo.$error.required">
103 新终端号必须填写 106 新终端号必须填写
104 </div> 107 </div>
  108 + <div class="alert alert-danger well-sm" ng-show="myForm.newDeviceNo.$error.remote">
  109 + {{$remote_msg}}
  110 + </div>
105 </div> 111 </div>
106 112
107 <div class="form-group"> 113 <div class="form-group">
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/new/sa1.js 0 → 100644
  1 +/**
  2 + * saTimeTable指令工具集,创建内部单元格类,及其他操作
  3 + */
  4 +angular.module('ScheduleApp').factory(
  5 + 'SaTimeTableUtils',
  6 + [
  7 + function() {
  8 + /**
  9 + * 表格,单元格头类
  10 + * 如:路牌,出1,青2......进6
  11 + */
  12 + var Cell_Header = function(str) {
  13 + /** 表头数据 */
  14 + this.headStr = str;
  15 + };
  16 + Cell_Header.prototype.setHead = function(str) {
  17 + this.headStr = str || "";
  18 + };
  19 +
  20 + /**
  21 + * 表格,单元格内容类,在表格上只显示时间,但是内部还是保存其他值。
  22 + */
  23 + var Cell_Body_Bc = function() {
  24 + /** 表格单元格显示的信息 */
  25 + this.info = undefined;
  26 +
  27 + this.isSel = false; // 是否被选中
  28 + this.isCanSel = true; // 是否能被选择
  29 + this.isValidInfo = false; // 数据是否有效
  30 +
  31 + this.data = {}; // 内部信息
  32 +
  33 + this.data.ttdid = undefined; // 班次信息Id
  34 + this.data.fcsj = undefined; // 发车时间
  35 + this.data.bcType = undefined; // 班次类型
  36 + this.data.xldir = undefined; // 线路方向
  37 + this.data.isfb = undefined; // 是否分班
  38 + this.data.jhlc = undefined; // 计划里程
  39 + this.data.qdz = null; // 起点站id
  40 + this.data.zdz = null; // 终点站id
  41 + this.data.tcc = null; // 停车场id
  42 +
  43 + this.self.lpId = undefined; // 路牌Id
  44 + this.self.lpName = undefined; // 路牌名字
  45 +
  46 + this.self.fcno = undefined; // 发车序号
  47 + this.self.bcs = undefined; // 班次数
  48 + };
  49 + /**
  50 + * 路牌单元格类。
  51 + */
  52 + var Cell_Body_Lp = function() {
  53 + this.info = undefined;
  54 +
  55 + this.isSel = false; // 是否被选中
  56 + this.isCanSel = false; // 是否能被选择
  57 + this.isValidInfo = false; // 数据是否有效
  58 +
  59 + this.data = {}; // 内部信息
  60 +
  61 + this.data.lpId = undefined; // 路牌Id
  62 + this.data.lpName = undefined; // 路牌名字
  63 + };
  64 + /**
  65 + * 统计单元格类。
  66 + */
  67 + var Cell_Body_Stat = function() {
  68 + this.info = undefined;
  69 +
  70 + this.isSel = false; // 是否被选中
  71 + this.isCanSel = false; // 是否能被选择
  72 + this.isValidInfo = false; // 数据是否有效
  73 +
  74 + this.data = {}; // 内部信息
  75 + };
  76 +
  77 + Cell_Body_Bc.prototype.canSel = function() { // 是否能被选中
  78 + return this.isCanSel;
  79 + };
  80 + Cell_Body_Bc.prototype.canUpdate = function() { // 是否能更新
  81 + return this.isSel && this.data.ttdid;
  82 + };
  83 + Cell_Body_Bc.prototype.canDelete = function() { // 是否能删除
  84 + return this.isSel && this.data.ttdid;
  85 + };
  86 + Cell_Body_Bc.prototype.validInfo = function() { // 验证班次内数据是否正确
  87 + if (this.canSel() && this.data.ttdid) {
  88 + if (this.data.bcType == 'in') {
  89 + this.isValidInfo = this.data.qdz != null && this.data.tcc != null;
  90 + } else if (this.data.bcType == 'out') {
  91 + this.isValidInfo = this.data.tcc != null && this.data.zdz != null;
  92 + } else {
  93 + this.isValidInfo = this.data.qdz != null && this.data.zdz != null;
  94 + }
  95 + } else {
  96 + this.isValidInfo = true;
  97 + }
  98 + return this.isValidInfo;
  99 + };
  100 + Cell_Body_Bc.prototype.where = function(
  101 + xldir, startTime_h_m, endTime_h_m, isInOut
  102 + ) { // 判定班次是否在指定条件内
  103 +
  104 + var fcsj_m_h = [];
  105 + fcsj_m_h[0] = parseInt(this.data.fcsj.split(":")[0]);
  106 + fcsj_m_h[1] = parseInt(this.data.fcsj.split(":")[1]);
  107 +
  108 + var fcsj = new Date(2000,1,1);
  109 + fcsj.setHours(fcsj_m_h[0]);
  110 + fcsj.setMinutes(fcsj_m_h[1]);
  111 +
  112 + var s_temp_date = new Date(2000, 1, 1);
  113 + var e_temp_date = new Date(2000, 1, 1);
  114 +
  115 + if (xldir == 2) { // 上下行
  116 + // 判定是否要进出场班次
  117 + if (isInOut == false && (this.data.bcType == "in" || this.data.bcType == "out")) {
  118 + return false;
  119 + }
  120 +
  121 + if (startTime_h_m) {
  122 + if (endTime_h_m) {
  123 + s_temp_date.setHours(startTime_h_m[0]);
  124 + s_temp_date.setMinutes(startTime_h_m[1]);
  125 + e_temp_date.setHours(endTime_h_m[0]);
  126 + e_temp_date.setMinutes(endTime_h_m[1]);
  127 + return fcsj >= s_temp_date && fcsj <= e_temp_date;
  128 + } else {
  129 + s_temp_date.setHours(startTime_h_m[0]);
  130 + s_temp_date.setMinutes(startTime_h_m[1]);
  131 + return fcsj >= s_temp_date;
  132 + }
  133 + } else {
  134 + if (endTime_h_m) {
  135 + e_temp_date.setHours(endTime_h_m[0]);
  136 + e_temp_date.setMinutes(endTime_h_m[1]);
  137 + return fcsj <= e_temp_date;
  138 + } else {
  139 + return false;
  140 + }
  141 + }
  142 + } else {
  143 + // 判定是否要进出场班次
  144 + if (isInOut == false && (this.data.bcType == "in" || this.data.bcType == "out")) {
  145 + return false;
  146 + }
  147 +
  148 + if (xldir == this.xldir) {
  149 + if (startTime_h_m) {
  150 + if (endTime_h_m) {
  151 + s_temp_date.setHours(startTime_h_m[0]);
  152 + s_temp_date.setMinutes(startTime_h_m[1]);
  153 + e_temp_date.setHours(endTime_h_m[0]);
  154 + e_temp_date.setMinutes(endTime_h_m[1]);
  155 + return fcsj >= s_temp_date && fcsj <= e_temp_date;
  156 + } else {
  157 + s_temp_date.setHours(startTime_h_m[0]);
  158 + s_temp_date.setMinutes(startTime_h_m[1]);
  159 + return fcsj >= s_temp_date;
  160 + }
  161 + } else {
  162 + if (endTime_h_m) {
  163 + e_temp_date.setHours(endTime_h_m[0]);
  164 + e_temp_date.setMinutes(endTime_h_m[1]);
  165 + return fcsj <= e_temp_date;
  166 + } else {
  167 + return true;
  168 + }
  169 + }
  170 + } else {
  171 + return false;
  172 + }
  173 + }
  174 + };
  175 +
  176 + Cell_Body_Lp.prototype.canSel = function() { // 是否能被选中
  177 + return this.isCanSel;
  178 + };
  179 + Cell_Body_Lp.prototype.canUpdate = function() { // 是否能更新
  180 + return this.isSel && this.data.ttdid;
  181 + };
  182 + Cell_Body_Lp.prototype.canDelete = function() { // 是否能删除
  183 + return this.isSel && this.data.ttdid;
  184 + };
  185 +
  186 + Cell_Body_Stat.prototype.canSel = function() { // 是否能被选中
  187 + return this.isCanSel;
  188 + };
  189 + Cell_Body_Stat.prototype.canUpdate = function() { // 是否能更新
  190 + return this.isSel && this.data.ttdid;
  191 + };
  192 + Cell_Body_Stat.prototype.canDelete = function() { // 是否能删除
  193 + return this.isSel && this.data.ttdid;
  194 + };
  195 +
  196 + return {
  197 + // TODO:
  198 + };
  199 + }
  200 + ]
  201 +);
0 \ No newline at end of file 202 \ No newline at end of file