Commit 18e1c8438cc4e449acca00632233b601ff3f9fba

Authored by 潘钊
1 parent b8003da3

update...

src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -431,7 +431,7 @@ public class DayOfSchedule { @@ -431,7 +431,7 @@ public class DayOfSchedule {
431 ps.setInt(3, sch.getBcs()==null?0:sch.getBcs()); 431 ps.setInt(3, sch.getBcs()==null?0:sch.getBcs());
432 ps.setInt(4, sch.getBcsj()==null?0:sch.getBcsj()); 432 ps.setInt(4, sch.getBcsj()==null?0:sch.getBcsj());
433 ps.setString(5, sch.getClZbh()); 433 ps.setString(5, sch.getClZbh());
434 - ps.setDate(6, new java.sql.Date(sch.getCreateDate().getTime())); 434 + ps.setTimestamp(6, new java.sql.Timestamp(sch.getCreateDate().getTime()));
435 ps.setString(7, sch.getDfsj()); 435 ps.setString(7, sch.getDfsj());
436 ps.setInt(8, sch.getDirectiveState()); 436 ps.setInt(8, sch.getDirectiveState());
437 ps.setInt(9, sch.getFcno()==null?0:sch.getFcno()); 437 ps.setInt(9, sch.getFcno()==null?0:sch.getFcno());
@@ -447,12 +447,12 @@ public class DayOfSchedule { @@ -447,12 +447,12 @@ public class DayOfSchedule {
447 ps.setString(19, sch.getRemarks()); 447 ps.setString(19, sch.getRemarks());
448 ps.setString(20, sch.getsGh()); 448 ps.setString(20, sch.getsGh());
449 ps.setString(21, sch.getsName()); 449 ps.setString(21, sch.getsName());
450 - ps.setDate(22, new java.sql.Date(sch.getScheduleDate().getTime())); 450 + ps.setTimestamp(22, new java.sql.Timestamp(sch.getScheduleDate().getTime()));
451 ps.setString(23, sch.getScheduleDateStr()); 451 ps.setString(23, sch.getScheduleDateStr());
452 ps.setBoolean(24, sch.isSflj()); 452 ps.setBoolean(24, sch.isSflj());
453 ps.setLong(25, sch.getSpId()); 453 ps.setLong(25, sch.getSpId());
454 ps.setInt(26, sch.getStatus()); 454 ps.setInt(26, sch.getStatus());
455 - ps.setDate(27, new java.sql.Date(sch.getUpdateDate().getTime())); 455 + ps.setTimestamp(27, new java.sql.Timestamp(sch.getUpdateDate().getTime()));
456 ps.setString(28, sch.getXlBm()); 456 ps.setString(28, sch.getXlBm());
457 ps.setString(29, sch.getXlDir()); 457 ps.setString(29, sch.getXlDir());
458 ps.setString(30, sch.getXlName()); 458 ps.setString(30, sch.getXlName());
src/main/java/com/bsth/data/schedule/SchAttrCalculator.java
@@ -206,6 +206,8 @@ public class SchAttrCalculator { @@ -206,6 +206,8 @@ public class SchAttrCalculator {
206 * @return 206 * @return
207 */ 207 */
208 public ScheduleRealInfo calcCurrentExecSch(List<ScheduleRealInfo> list) { 208 public ScheduleRealInfo calcCurrentExecSch(List<ScheduleRealInfo> list) {
  209 + if(list.size()==0)
  210 + return null;
209 String lineCode = list.get(0).getXlBm(); 211 String lineCode = list.get(0).getXlBm();
210 LineConfig conf = lineConfigData.get(lineCode); 212 LineConfig conf = lineConfigData.get(lineCode);
211 213
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch_maintain.html
@@ -37,6 +37,8 @@ @@ -37,6 +37,8 @@
37 </div> 37 </div>
38 <button class="uk-button">检索</button> 38 <button class="uk-button">检索</button>
39 <a class="add_lp_link" ><i class="uk-icon-plus"></i> 临加路牌</a> 39 <a class="add_lp_link" ><i class="uk-icon-plus"></i> 临加路牌</a>
  40 + <button id="reCountBtn" class="uk-button uk-button-danger uk-button-mini" style="position: absolute;right: 12px;bottom: 14px;">
  41 + 重新统计</button>
40 </fieldset> 42 </fieldset>
41 </form> 43 </form>
42 </div> 44 </div>
@@ -414,6 +416,39 @@ @@ -414,6 +416,39 @@
414 416
415 return true; 417 return true;
416 } 418 }
  419 +
  420 + /**
  421 + * 重新统计
  422 + */
  423 + $('#reCountBtn', modal).on('click', function () {
  424 + $(this).attr('disabled', 'disabled');
  425 + $(this).prepend('<i class="uk-icon-spinner uk-icon-spin"></i>');
  426 +
  427 + var rq = $('.h-s-time li.uk-active', modal).text(),
  428 + lineName = $('.h-s-line li.uk-active', modal).text(),
  429 + lineCode = $('.h-s-line li.uk-active', modal).data('id');
  430 +
  431 + var that = this;
  432 + alt_confirm('确定要重新统计 ' + lineName + '('+rq+')的数据吗?',function () {
  433 +
  434 + var reCountEp = EventProxy.create('calcWaybill', 'ylbUpdate', function () {
  435 + $('i.uk-icon-spin', that).remove();
  436 + $(this).removeAttr('disabled');
  437 + notify_succ('重新统计成功!');
  438 + });
  439 +
  440 + //统计路单 -娄高峰
  441 + gb_common.$get('/calcWaybill/generateNew', {date:rq, line: lineCode}, function () {
  442 + reCountEp.emitLater('calcWaybill');
  443 + });
  444 +
  445 + //统计油 -廖磊
  446 + gb_common.$post('/ylb/updateHistory', {date:rq, line: lineCode}, function () {
  447 + reCountEp.emitLater('ylbUpdate');
  448 + });
  449 +
  450 + }, '我确定');
  451 + });
417 })(); 452 })();
418 </script> 453 </script>
419 </div> 454 </div>
420 \ No newline at end of file 455 \ No newline at end of file
src/main/resources/static/real_control_v2/js/forms/wrap.html
@@ -100,9 +100,13 @@ @@ -100,9 +100,13 @@
100 //ed=d.format(f), 100 //ed=d.format(f),
101 //sd=d.subtract(3, 'days').format(f); 101 //sd=d.subtract(3, 'days').format(f);
102 102
103 - $('#date', '.form-page-content').data('DateTimePicker')  
104 - .defaultDate(d.format(f));  
105 - //.maxDate(ed).minDate(sd); 103 + try{
  104 + $('#date', '.form-page-content').data('DateTimePicker')
  105 + .defaultDate(d.format(f));
  106 + //.maxDate(ed).minDate(sd);
  107 + }catch (e){
  108 + console.log(e);
  109 + }
106 110
107 if($("#ddrbBody").length > 0){ 111 if($("#ddrbBody").length > 0){
108 $("#ddrbBody").height("620px"); 112 $("#ddrbBody").height("620px");