Commit be9d34b1137a0a9f5f5aad1abc98fccaeb068130

Authored by 潘钊
1 parent 49040a0a

merge pudong

src/main/java/com/bsth/controller/realcontrol/calc/ReCalcDataController.java 0 → 100644
  1 +package com.bsth.controller.realcontrol.calc;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.util.HttpClientUtils;
  5 +import org.slf4j.Logger;
  6 +import org.slf4j.LoggerFactory;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestMethod;
  9 +import org.springframework.web.bind.annotation.RequestParam;
  10 +import org.springframework.web.bind.annotation.RestController;
  11 +
  12 +import java.util.HashMap;
  13 +import java.util.Map;
  14 +
  15 +/**
  16 + * 重新统计(数据汇总)
  17 + * Created by panzhao on 2018/1/25.
  18 + */
  19 +@RestController
  20 +@RequestMapping("/sch/reCalc")
  21 +public class ReCalcDataController {
  22 +
  23 + private static String reCalcUrl = "http://10.10.150.24:30571/reCalc/scheduleDetail";
  24 +
  25 + Logger logger = LoggerFactory.getLogger(this.getClass());
  26 +
  27 + /**
  28 + * 重新统计班次明细
  29 + * @param date
  30 + * @param line
  31 + * @return
  32 + */
  33 + @RequestMapping(value = "/scheduleDetail", method = RequestMethod.POST)
  34 + public Map<String, Object> reCalcScheduleDetail(@RequestParam String date, @RequestParam String line){
  35 + Map<String, Object> rs = new HashMap();
  36 + try{
  37 + HttpClientUtils.post(reCalcUrl + "?rq=" + date + "&lineCode=" + line, "");
  38 + }catch (Exception e){
  39 + logger.error("", e);
  40 + rs.put("status", ResponseCode.ERROR);
  41 + rs.put("msg", e.getMessage());
  42 + }
  43 + return rs;
  44 + }
  45 +}
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -1234,7 +1234,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1234,7 +1234,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1234 ScheduleModifyLogger.sftz(sch, fcsjActual, remarks); 1234 ScheduleModifyLogger.sftz(sch, fcsjActual, remarks);
1235 1235
1236 sch.setFcsjActualAll(fcsjActual); 1236 sch.setFcsjActualAll(fcsjActual);
1237 - sch.setRemark(remarks); 1237 + sch.setRemarks(remarks);
1238 sch.calcStatus(); 1238 sch.calcStatus();
1239 //if(sch.isLate2()){ 1239 //if(sch.isLate2()){
1240 //取消应发未到标记 1240 //取消应发未到标记
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch_maintain.html
@@ -431,7 +431,7 @@ @@ -431,7 +431,7 @@
431 $(that).prepend('<i class="uk-icon-spinner uk-icon-spin"></i>'); 431 $(that).prepend('<i class="uk-icon-spinner uk-icon-spin"></i>');
432 432
433 433
434 - var reCountEp = EventProxy.create('ylbUpdate', function () { 434 + var reCountEp = EventProxy.create('ylbUpdate', 'calcWaybill', 'scheduleDetail', function () {
435 $('i.uk-icon-spin', that).remove(); 435 $('i.uk-icon-spin', that).remove();
436 $(that).removeAttr('disabled'); 436 $(that).removeAttr('disabled');
437 notify_succ('重新统计成功!'); 437 notify_succ('重新统计成功!');
@@ -447,6 +447,11 @@ @@ -447,6 +447,11 @@
447 reCountEp.emitLater('ylbUpdate'); 447 reCountEp.emitLater('ylbUpdate');
448 }); 448 });
449 449
  450 + //重新统计班次明细
  451 + gb_common.$post('/sch/reCalc/scheduleDetail', {date:rq, line: lineCode}, function () {
  452 + reCountEp.emitLater('scheduleDetail');
  453 + });
  454 +
450 }, '我确定'); 455 }, '我确定');
451 }); 456 });
452 })(); 457 })();