Commit b5db7075c8ffbdeecd2d1ffc221da71eb0fc3eaa

Authored by 李强
1 parent 919ec200

bsthlq <2519941818@qq.com>

src/main/resources/static/pages/base/timesmodel/bctz.html
... ... @@ -100,15 +100,16 @@ $(&#39;#tzbc_mobal&#39;).on(&#39;tzbcMobal.show&#39;, function(e,obj,cardata,bf){
100 100 submitHandler : function(f) {
101 101 // 1、 获取表单内容,并序列化
102 102 var params = form.serializeJSON();
  103 + var dataMap = obj.configuration.dataMap;
103 104 // 2、 调整路牌对应的班次总数
104 105 updFormParams(params);
105 106 // 3、调整班次.并重新给定班次序号和发车序号.再确定首末班车时间.最后渲染数据
106   - obj.data(bf.tzsmbcsj(bf.setbcsAndfcno(tzbcDate()),
  107 + obj.data(bf.tzsmbcsj01(bf.setbcsAndfcno(tzbcDate()),
107 108 obj.configuration.dataMap.smbcsjArr,
108 109 obj.configuration.dataMap.ccsjArr,
109 110 obj.configuration.dataMap.cclcArr,
110 111 obj.configuration.dataMap.qdzArr,
111   - obj.configuration.dataMap.lbsj));
  112 + obj.configuration.dataMap.lbsj,dataMap));
112 113 // 3、记录早操.并保存历史班次数据
113 114 obj.addHistory();
114 115 // 5、隐藏错误提示
... ... @@ -232,7 +233,6 @@ $(&#39;#tzbc_mobal&#39;).on(&#39;tzbcMobal.show&#39;, function(e,obj,cardata,bf){
232 233 * @return
233 234 */
234 235 function jsjclc(st,ar,pa,sjstr,fcno_,tempS,fxdm) {
235   - console.log('{' + tempS + '......}')
236 236 // 1、修改进出场班次.
237 237 for(var p = 0;p<pa.length;p++) {
238 238 // A)、如果当前班次的发车时间等于 在没有调整班次总数之前的最后一个班次的到达时间,则这个班次是在没有调整班次之前的那个进场班次
... ...
src/main/resources/static/pages/base/timesmodel/js/base-fun.js
... ... @@ -408,8 +408,11 @@ var BaseFun = function() {
408 408 baseF.setbcsAndfcno(baseF.tzsmbcsj01(baseF.setbcsAndfcno(baseF.tzsztest(cara,jar3,dataMap)),dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj,dataMap)),
409 409 dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj,dataMap);*/
410 410 var rsjar = baseF.tzsztest(cara,jar3,dataMap);
411   - // return {'json':rsjar,'bxrcgs':bxrcgs};
412   - var resultJA = new Array();
  411 + return {'json':baseF.addjcclcbc01(cara,rsjar,dataMap,saa,map),'bxrcgs':bxrcgs};
  412 + },
  413 +
  414 + addjcclcbc01 : function(cara,rsjar,dataMap,saa,map) {
  415 + var resultJA = new Array(),bcs = 0;
413 416 for(var m = 0 ; m < cara.length; m++) {
414 417 // 获取路牌编号.
415 418 var lpNo_ = cara[m].lpNo;
... ... @@ -423,11 +426,63 @@ var BaseFun = function() {
423 426 lpbc_.push(rsjar[x]);
424 427 }
425 428 }
  429 + baseF.addcfbc01(lpbc_,dataMap,map);
426 430 // 按照发车序号顺序排序.
427 431 lpbc_.sort(function(a,b){return a.fcno-b.fcno});
428   - resultJA = resultJA.concat(baseF.addjclbbc01(lpbc_,dataMap,saa[0].lbsj,map));
  432 + var tt = baseF.addjclbbc01(lpbc_,dataMap,saa[0].lbsj,map);
  433 + bcs = baseF.updfcno01(tt,bcs);
  434 + // debugger;
  435 + resultJA = resultJA.concat(tt);
  436 + }
  437 + return resultJA;
  438 + },
  439 +
  440 + updfcno01 : function(bcArr,bcs) {
  441 + for(var i =0; i < bcArr.length;i++) {
  442 + bcArr[i].fcint = baseF.getDateTime(bcArr[i].fcsj).getTime();
  443 + }
  444 + bcArr.sort(function(a,b){return a.fcint-b.fcint});
  445 + for(var t = 0 ; t <bcArr.length;t++) {
  446 + bcs++;
  447 + bcArr[t].bcs = bcs;
  448 + bcArr[t].fcno = t+1;
  449 + delete bcArr[t].fcint;
429 450 }
430   - return {'json':resultJA,'bxrcgs':bxrcgs};
  451 + return bcs;
  452 + },
  453 +
  454 + addcfbc01 : function(lpbcar,dataMap,map) {
  455 + var gs = 0 ,sicftag = true;
  456 + for(var g = 0 ; g <lpbcar.length;g++ ) {
  457 + gs = gs + lpbcar[g].bcsj + lpbcar[g].STOPTIME;
  458 + if(lpbcar[g].STOPTIME==0 && g!=0 && g!=(lpbcar.length-1)) {
  459 + lpbcar[g].isfb = 1;
  460 + sicftag = false;
  461 + }
  462 + }
  463 + /*if(sicftag) {
  464 + for(var j = 0 ; j <lpbcar.length;j ++ ) {
  465 + var kssj = baseF.getDateTime(lpbcar[j].fcsj);
  466 + var tzsj = lpbcar[j].STOPTIME;
  467 + var cctag = baseF.dirDmToIndex(lpbcar[j].xlDir);
  468 + var cfdd = baseF.getcfdd(map.cfdd,cctag);
  469 + if(kssj> new Date (baseF.getCFDate(10,30)) &&
  470 + kssj<new Date (baseF.getCFDate(11,30)) && cfdd == cctag) {
  471 + console.log(tzsj,lpbcar[j].fcsj);
  472 + rs.push(baseF.getbcObj(
  473 + kssj,dataMap.zwcArr[0],cara[c],dataMap.bcTypeArr.cf,
  474 + dataMap.dira[cctag],xhNo++,0,map,0,null,null,null,0,0));
  475 +
  476 + }else if(kssj > new Date (baseF.getCFDate(18,30)) &&
  477 + kssj < new Date (baseF.getCFDate(19,30)) && cfdd == cctag ) {
  478 + console.log(tzsj,lpbcar[j].fcsj);
  479 + rs.push(baseF.getbcObj(
  480 + kssj,dataMap.zwcArr[1],cara[c],dataMap.bcTypeArr.cf,
  481 + dataMap.dira[cctag],xhNo++,0,map,0,null,null,null,0,0));
  482 +
  483 + }
  484 + }
  485 + }*/
431 486 },
432 487  
433 488 dqbcsAndgs : function(bxrcgs,jar,dataMap,cla) {
... ... @@ -806,7 +861,25 @@ var BaseFun = function() {
806 861 dqbcfcsj,dataMap.ccsjArr[fxdm],car,dataMap.bcTypeArr.out,
807 862 dataMap.dira[fxdm],2,dataMap.cclcArr[fxdm],gatps,0,dataMap.qdzArr[fxdm],null,null,0,0));// 出场班次
808 863 fcno ++;
809   - }else if(b==bc.length-1){
  864 + }/*else if(b > 0 && b < bc.length-1){
  865 + var jcbckssj = baseF.getDateTime(bc[b].ARRIVALTIME)
  866 + var ccbckssj = baseF.getDateTime(bc[b+1].fcsj)
  867 + var dx = parseInt((ccbckssj - jcbckssj)/60000);
  868 + if(bc[b].STOPTIME==0) {
  869 + // bc[b].STOPTIME = 0;
  870 + //console.log(bc[b].fcno);
  871 + var fcno_ = bc[b].fcno + 2;
  872 + stas = true;
  873 + // console.log(bc[b],bc[b+1],b);
  874 + result.push(baseF.getbcObj(
  875 + jcbckssj,dataMap.jcsjArr[fxdm],car,dataMap.bcTypeArr.in_,
  876 + dataMap.dira[fxdm],fcno_++,dataMap.jclcArr[fxdm],gatps,0,dataMap.qdzArr[fxdm],null,null,0,0));// 进场班次
  877 + var ccfx = baseF.dirDmToIndex(bc[b+1].xlDir);
  878 + result.push(baseF.getbcObj(
  879 + ccbckssj,dataMap.ccsjArr[ccfx],car,dataMap.bcTypeArr.out,
  880 + dataMap.dira[ccfx],fcno_++,dataMap.cclcArr[ccfx],gatps,0,dataMap.qdzArr[ccfx],null,null,0,0));// 出场班次
  881 + }
  882 + }*/else if(b==bc.length-1){
810 883 var fcno_ = dxfno + 2;
811 884 var qdbcddsj = baseF.getDateTime(bc[b].ARRIVALTIME);
812 885 result.push(baseF.getbcObj(
... ... @@ -1596,32 +1669,7 @@ var BaseFun = function() {
1596 1669 {'type':'无工休', 'hoursV':5.43, 'minueV':'5:43'}];
1597 1670 },
1598 1671 setbcsAndfcno : function(listA) {
1599   - /*var array = new Array();
1600   - var len = listA.length;
1601   - for(var i =0;i<len;i++) {
1602   - if(array.indexOf(listA[i].lpNo)<0)
1603   - array.push(listA[i].lpNo);
1604   - }
1605   - array.sort(baseF.compare);
1606   - console.log(array);
1607   - var sortGattArray = new Array();
1608   - for(var k =0;k<array.length;k++) {
1609   - var index = array[k];
1610   - var temp = new Array();
1611   - for(var x=0;x<listA.length;x++) {
1612   - if(index==listA[x].lpNo)
1613   - temp.push(listA[x]);
1614   - }
1615   - var lpbc = baseF.sortDirArray(temp);
1616   - for(var p = 0 ;p<lpbc.length;p++) {
1617   - lpbc[p].fcno = (p+1);
1618   - }
1619   - sortGattArray = sortGattArray.concat(lpbc);
1620   - }
1621   - for(var b = 0 ; b <sortGattArray.length;b++) {
1622   - sortGattArray[b].bcs = (b+1);
1623   - }
1624   - return sortGattArray;*/
  1672 +
1625 1673 var array = new Array();
1626 1674 var len = listA.length;
1627 1675 for(var i =0;i<len;i++) {
... ...
src/main/resources/static/pages/base/timesmodel/js/d3.relationshipgraph.js
... ... @@ -732,7 +732,7 @@ var RelationshipGraph = function () {
732 732 yAxisYArray.splice(0,yAxisYArray.length);
733 733 for(var t = 0;t<this.configuration.taskTypes.length;t++) {
734 734 yAxisYArray.push({
735   - y:y(this.configuration.taskTypes[t].lpNo)+this.configuration.offsetY,
  735 + y:y(this.configuration.taskTypes[t].lpName)+this.configuration.offsetY,
736 736 carname:this.configuration.taskTypes[t].lpName,
737 737 lpA : this.configuration.taskTypes[t]});
738 738 }
... ... @@ -2475,9 +2475,11 @@ var RelationshipGraph = function () {
2475 2475 for(var s = 0 ; s < len ; s++) {
2476 2476 var rectNodesAttr = RelationshipGraph.getContextNodeAndData(d3.select(shiftRectA[s]).attr('id'));
2477 2477 if(rectNodesAttr.dqbcData.STOPTIME<0) {
2478   - var nextTzsjDx = $_GlobalGraph.configuration.dataMap.minztjx - rectNodesAttr.dqbcData.STOPTIME;
  2478 + // var nextTzsjDx = $_GlobalGraph.configuration.dataMap.minztjx - rectNodesAttr.dqbcData.STOPTIME;
  2479 + var nextTzsjDx = 0 - rectNodesAttr.dqbcData.STOPTIME;
2479 2480 // 修改遍历的当前元素数据的停站时间为最小停站时间.
2480   - rectNodesAttr.dqbcData.STOPTIME = $_GlobalGraph.configuration.dataMap.minztjx;
  2481 + // rectNodesAttr.dqbcData.STOPTIME = $_GlobalGraph.configuration.dataMap.minztjx;
  2482 + rectNodesAttr.dqbcData.STOPTIME = 0;
2481 2483 // 修改遍历的当前元素数据的文本展示停站时间
2482 2484 for(var t = 0 ; t < rectNodesAttr.dqbctextNodes.length ; t++) {
2483 2485 if(d3.select(rectNodesAttr.dqbctextNodes[t]).attr('text-type')=='gap')
... ... @@ -2500,6 +2502,7 @@ var RelationshipGraph = function () {
2500 2502 * 修改下个班次的元素坐标属性值
2501 2503 *
2502 2504 * */
  2505 +
2503 2506 rectNodesAttr.nextbcNode.attr('x',$_x);
2504 2507 var rectCover = d3.select(d3.selectAll('rect[parent-node='+ rectNodesAttr.nextbcNodeId + '-cover' +']')[0][0]);
2505 2508 rectCover.attr('x',$_x);
... ... @@ -2995,7 +2998,7 @@ var RelationshipGraph = function () {
2995 2998 nowDate.setMinutes(parseInt(tm.min)+d.bcsj);// 10.3.1、设置分钟.
2996 2999 // 9.1.4、修改当前班次的到达时间.
2997 3000 d.ARRIVALTIME = BaseFun.getTimeStr(nowDate);
2998   - d.STOPTIME = parseInt((BaseFun.getDateTime(nodeContext.nextData.fcsj) - BaseFun.getDateTime(d.ARRIVALTIME))/ 60000);
  3001 + d.STOPTIME = d.isfb ==1 ? 0 : parseInt((BaseFun.getDateTime(nodeContext.nextData.fcsj) - BaseFun.getDateTime(d.ARRIVALTIME))/ 60000);
2999 3002 /**
3000 3003 * 9.2、修改元素沿X轴方向的X坐标属性值.
3001 3004 *
... ... @@ -3016,6 +3019,8 @@ var RelationshipGraph = function () {
3016 3019 }
3017 3020 /****************************************** update 当前的班次数据以及相关元素对象属性值. END ************************************/
3018 3021  
  3022 + //console.log(nodeContext);
  3023 + //debugger;
3019 3024 // 10、计算与上个班次的停站时间.
3020 3025 var dxMinues = parseInt((BaseFun.getDateTime(d.fcsj) - BaseFun.getDateTime(nodeContext.lastData.ARRIVALTIME)) / 60000);
3021 3026  
... ... @@ -3162,7 +3167,8 @@ var RelationshipGraph = function () {
3162 3167 **/
3163 3168 var _obj = RelationshipGraph.getContextNodeAndData(d3.select(this).attr('parent-node').replace('-cover',''));
3164 3169 // 1.3、定义最小停站间隙.
3165   - var minSoptTime = $_GlobalGraph.configuration.dataMap.minztjx;
  3170 + // var minSoptTime = $_GlobalGraph.configuration.dataMap.minztjx;
  3171 + var minSoptTime = 0;
3166 3172 // 1.4、创建当前时间对象.
3167 3173 var $_date = new Date();
3168 3174 // 1.5、判断 如果当前班次的停站时间小于零,则修改成最小停站时间.
... ...
src/main/resources/static/pages/base/timesmodel/js/gantt.js
... ... @@ -421,7 +421,7 @@
421 421 var hours=Math.floor(leave1/(3600*1000));
422 422 DXHOURS = days*24+hours;
423 423 WIDTH = DXHOURS*MINUTE*MULTIPLE;
424   - debugger;
  424 + // debugger;
425 425 var lpsplitA = getylp(p.yAxisCarArray);
426 426 var args = {
427 427 'valueKeyName': VALUEKEYNAME,
... ...