From ca46aed30739be09fbbdb413ff7d2f843934efda Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 14 十一月 2024 09:26:27 +0800
Subject: [PATCH] 最新版本541200007

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java |  400 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 376 insertions(+), 24 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
index b88eca5..0be4d8b 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -8,21 +8,21 @@
 import com.doumee.core.haikang.model.param.BaseListPageResponse;
 import com.doumee.core.haikang.model.param.BaseResponse;
 import com.doumee.core.haikang.model.param.BaseListPageRequest;
+import com.doumee.core.haikang.model.param.request.RuleEventFiledOptionsRequest;
+import com.doumee.core.haikang.model.param.request.RuleEventSearchRequest;
+import com.doumee.core.haikang.model.param.request.SecureDevStatusTotalRequest;
 import com.doumee.core.haikang.model.param.request.SensorStatusListRequest;
-import com.doumee.core.haikang.model.param.respose.PageCameraInfoResponse;
-import com.doumee.core.haikang.model.param.respose.PageFireChannelInfoResponse;
-import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse;
-import com.doumee.core.haikang.model.param.respose.PageSensorStatusResponse;
+import com.doumee.core.haikang.model.param.respose.*;
 import com.doumee.core.haikang.service.HKService;
+import com.doumee.core.model.ApiResponse;
 import com.doumee.core.utils.Constants;
-import com.doumee.dao.business.PlatformJobMapper;
-import com.doumee.dao.business.PlatformLogMapper;
-import com.doumee.dao.business.PlatformMapper;
-import com.doumee.dao.business.model.Platform;
-import com.doumee.dao.business.model.PlatformJob;
-import com.doumee.dao.web.response.platformReport.CarmeraListVO;
-import com.doumee.dao.web.response.platformReport.OnSitDispatchBoardVO;
-import com.doumee.dao.web.response.platformReport.RegionTreeVO;
+import com.doumee.core.utils.DateUtil;
+import com.doumee.core.utils.Utils;
+import com.doumee.dao.business.*;
+import com.doumee.dao.business.model.*;
+import com.doumee.dao.web.reqeust.SavePlatformWarnEventDTO;
+import com.doumee.dao.web.response.platformReport.*;
+import com.doumee.service.business.impl.PlatformJobServiceImpl;
 import com.doumee.service.business.third.BoardService;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import lombok.extern.slf4j.Slf4j;
@@ -30,8 +30,8 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.math.BigDecimal;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -45,9 +45,15 @@
     @Autowired
     private PlatformLogMapper platformLogMapper;
     @Autowired
+    private PlatformWarnEventMapper platformWarnEventMapper;
+    @Autowired
     private PlatformJobMapper platformJobMapper;
     @Autowired
+    private PlatformWmsDetailMapper platformWmsDetailMapper;
+    @Autowired
     private PlatformMapper platformMapper;
+    @Autowired
+    private PlatformGroupMapper platformGroupMapper;
     /**
      * 鑾峰彇鍖哄煙鏍戝舰缁撴瀯鏁版嵁
      * @return
@@ -91,7 +97,7 @@
         if(carmeraListVOList!=null && carmeraListVOList.size()>0){
             for(PageRegionInfoResponse p : allList){
                 for(CarmeraListVO c : carmeraListVOList){
-                    if(StringUtils.equals(p.getRegionIndexCode(),c.getReginCode())
+                    if(StringUtils.equals(p.getIndexCode(),c.getReginCode())
                             && (StringUtils.contains(c.getName(),name) ||StringUtils.isBlank(name))){
                         if(p.getCarmeraList()==null){
                             p.setCarmeraList(new ArrayList<>());
@@ -242,6 +248,297 @@
         return  allList;
     }
     @Override
+    public  List<PlatformGroupFinishVO> platformGroupFinish(){
+        List<PlatformGroupFinishVO> data = new ArrayList<>();
+        List<PlatformGroup> groups = platformGroupMapper.selectJoinList(PlatformGroup.class, new MPJLambdaWrapper<PlatformGroup>()
+                .select("(select sum(a.TOTAL_NUM) from platform_job a where a.PLATFORM_GROUP_ID=t.id and a.isdeleted=0   and a.status in(6,9,10) and to_days(a.done_date) = to_days(now()))",PlatformGroup::getOrtherTotalNum)
+                .selectAll(PlatformGroup.class)
+                .eq(PlatformGroup::getIsdeleted,Constants.ZERO)
+        );
+        if(groups!=null && groups.size()>0){
+            List<PlatformWmsDetail> jobList = platformWmsDetailMapper.selectJoinList(PlatformWmsDetail.class, new MPJLambdaWrapper<PlatformWmsDetail>()
+                    .selectSum( PlatformWmsDetail::getIoQty)
+                    .selectAs(PlatformGroup::getId, PlatformWmsDetail::getGroupId)
+                    .leftJoin(PlatformJob.class,PlatformJob::getId,PlatformWmsDetail::getJobId)
+                    .eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO)
+                    .eq(PlatformJob::getIsdeleted, Constants.ZERO)
+                    .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
+                            , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
+                            , Constants.PlatformJobStatus.LEAVED.getKey())
+                    .apply("to_days(t1.create_date) = to_days(now())")
+                    .groupBy(PlatformJob::getPlatformGroupId)
+            );
+            for(PlatformGroup d : groups){
+                PlatformGroupFinishVO t = new PlatformGroupFinishVO();
+                if(jobList!=null){
+                    for(PlatformWmsDetail dd : jobList){
+                      if(Constants.equalsInteger(dd.getGroupId(),d.getId())){
+                          d.setTotalNum(dd.getIoQty());
+                      }
+                    }
+                }
+                t.setFinishData(Constants.formatBigdecimal(d.getTotalNum()).intValue()+Constants.formatBigdecimal(d.getOrtherTotalNum()).intValue());
+                t.setPlatformGroupName(d.getName());
+                data.add(t);
+            }
+        }
+
+        return data;
+    }
+
+    @Override
+    public  CarWorkSituationVO carWorkSituation(int limit){
+        CarWorkSituationVO carWorkSituationVO = new CarWorkSituationVO();
+        List<PlatformLog> platformLogList = platformLogMapper.selectList(new QueryWrapper<PlatformLog>().lambda()
+                .orderByDesc(PlatformLog::getCreateDate)
+                .last(" limit "+limit)
+        );
+        carWorkSituationVO.setPlatformLogList(platformLogList);
+        return carWorkSituationVO;
+    }
+    @Override
+    public  List<SecurityDeviceDataVO> securityDeviceData(){
+        List<SecurityDeviceDataVO> list = new ArrayList<>();
+        BaseResponse<List<SecureDevStatusListResponse>> result = HKService.getSecureDevStatusList(new SecureDevStatusTotalRequest()) ;
+        if(result!=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE) && result.getData()!=null){
+            List<SecureDevStatusListResponse> rlist = result.getData();
+            for(SecureDevStatusListResponse r :rlist){
+                SecurityDeviceDataVO data = new SecurityDeviceDataVO();
+                data.setDeviceType(r.getDevTypeName());
+                data.setOnlineNum(r.getOnlineCount());
+                data.setOfflineDeviceNum(r.getOfflineCount());
+                data.setTotalNum(data.getOnlineNum() + data.getOfflineDeviceNum() );
+                list.add(data);
+            }
+        }
+        /*
+        Random random = new Random();
+        for (int i = 1; i <= 3; i++) {
+            SecurityDeviceDataVO data = new SecurityDeviceDataVO();
+            data.setDeviceType("璁惧绫诲瀷_"+i);
+            data.setOnlineNum(random.nextInt(10));
+            data.setOfflineDeviceNum(random.nextInt(10));
+            data.setTotalNum(data.getOnlineNum() + data.getOfflineDeviceNum() );
+            list.add(data);
+        }*/
+        return list;
+    }
+    @Override
+    public  List<WaningEventDataVO> warningEventData(Integer type){
+        List<WaningEventDataVO> list = new ArrayList<>();
+        RuleEventSearchRequest request = new RuleEventSearchRequest();
+        request.setFiledOptions(new ArrayList<>());
+        RuleEventFiledOptionsRequest file = new RuleEventFiledOptionsRequest();
+        file.setFieldName("event_type");
+        file.setFieldValue("131588");//瀹夐槻鍛婅
+        file.setType("eq");
+        request.getFiledOptions().add(file);
+        BaseResponse< RuleEventSearchResponse> result = HKService.ruleEventSearch(request);
+        if(result!=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE) && result.getData()!=null){
+            List<RuleEventSearchDataResponse> rlist = result.getData().getList();
+            if(rlist!=null){
+                for(RuleEventSearchDataResponse r :rlist){
+                    WaningEventDataVO data = new WaningEventDataVO();
+                    data.setAddr(r.getSrc_name());
+                    data.setImg(r.getImage_url());
+                    data.setTitle(r.getEvent_type_name());
+                    data.setCreateDate(r.getCreate_time());
+//                data.setContent(r.get);
+                    list.add(data);
+                }
+            }
+
+        }
+        return list;
+    }
+
+    @Override
+    public  List<PlatformWorkDataVO> platformWorkData(){
+
+        List<PlatformWorkDataVO> platformWorkDataVOList = new ArrayList<>();
+        List<Platform> platformList = platformMapper.selectJoinList(Platform.class, new MPJLambdaWrapper<Platform>()
+                .selectAll( Platform.class)
+                .eq(Platform::getIsdeleted, Constants.ZERO)
+                .orderByAsc(Platform::getSortnum)
+        );
+        /**
+         *    WAIT_CONFIRM(0, "寰呯‘璁�","寰呯‘璁�" ),
+     *         WART_SIGN_IN(1, "寰呯鍒�","寰呯鍒�" ),
+     *         WAIT_CALL(2, "宸茬鍒�","宸茬鍒�"),
+     *         IN_WAIT(3, "鍏ュ洯绛夊緟","鍏ュ洯绛夊緟" ),
+     *         CALLED(4, "宸插彨鍙�","宸插彨鍙�" ),
+     *         WORKING(5, "浣滀笟涓�","浣滀笟涓�" ),
+     *         DONE(6, "浣滀笟瀹屾垚 ","浣滀笟瀹屾垚" ),
+     *         TRANSFERING(7, "杞Щ涓�","杞Щ涓�" ),
+     *         EXCEPTION(8, "寮傚父鎸傝捣","寮傚父鎸傝捣" ),
+     *         AUTHED_LEAVE(9, "宸叉巿鏉冪鍥�","宸叉巿鏉冪鍥�" ),
+     *         LEAVED(10, "宸茬鍥� ","宸茬鍥� " ),
+     *         OVER_NUMBER(11, "宸茶繃鍙�","宸茶繃鍙�" ),
+     *         CANCEL(12, "宸插彇娑�","宸插彇娑�" ),
+         */
+
+        if(platformList!=null && platformList.size()>0){
+            List<PlatformJob> jobList = platformJobMapper.selectJoinList(PlatformJob.class, new MPJLambdaWrapper<PlatformJob>()
+                    .selectAll( PlatformJob.class)
+                    .select("( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.WORKING.getKey()+"  order by pl.CREATE_DATE desc  limit 1  ) as newStartDate")
+                    .select(" (select sum(ifnull(pl.IO_QTY , 0 ))   from platform_wms_detail pl  where   pl.job_id = t.id and pl.isdeleted=0 )",PlatformJob::getWorkNum)
+                    .apply("to_days(t.create_date) = to_days(now())")
+                    .eq(Platform::getIsdeleted, Constants.ZERO)
+                    .in(PlatformJob ::getStatus,new Integer[]{Constants.PlatformJobStatus.WORKING.getKey(),Constants.PlatformJobStatus.CALLED.getKey() })
+                    .orderByDesc(PlatformJob::getStatus ));
+            //鏈堝彴鐘舵�侊細0=浣滀笟涓紱1=绌洪棽涓紱2=浣滀笟瓒呮椂;3=鍙彿
+            for(Platform model : platformList){
+                PlatformWorkDataVO platformDurationVO = new PlatformWorkDataVO();
+                platformDurationVO.setPlatformName(model.getName());
+                platformDurationVO.setPlatformId(model.getId());
+                platformDurationVO.setPlatformSort(model.getSortnum());
+                PlatformJob job = getJobFromListById(model.getId(),jobList);
+                if(job != null){
+                    if(Constants.equalsInteger(job.getType(),Constants.ONE) || Constants.equalsInteger(job.getType(),Constants.THREE)){
+                        platformDurationVO.setWorkType(Constants.ONE);//濡傛灉鏄璐�
+                    }else{
+                        platformDurationVO.setWorkType(Constants.ZERO);//濡傛灉鏄嵏璐�
+                    }
+                    Integer workMinute = Constants.formatBigdecimal(job.getWorkNum()).multiply(new BigDecimal(60)).divide(model.getWorkRate(),0,BigDecimal.ROUND_HALF_UP).intValue();
+                    Date overDate = DateUtil.getXMinuteAfterDate(job.getNewStartDate(),workMinute + model.getWorkTimeoutAlarmTime());//棰勮瀹屾垚鏃堕棿
+                    platformDurationVO.setFinishTimeStr(DateUtil.DateToStr(overDate,"HH:mm"));
+
+                    platformDurationVO.setWorkNum(Constants.formatBigdecimal(job.getWorkNum()).intValue());
+                    platformDurationVO.setCarNo(job.getCarCodeFront());//杞︾墝鍙�
+                    if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.CALLED.getKey() )){
+                        platformDurationVO.setStatus(Constants.THREE); //鍙彿涓�
+                    }else{
+                        platformDurationVO.setStatus(Constants.ZERO); //浣滀笟涓�
+                        platformDurationVO.setWorkTime(PlatformJobServiceImpl.getWorkTime(job,platformLogMapper));//宸插伐浣滄椂闂�
+                        if(overDate.getTime() < System.currentTimeMillis() ){
+                            model.setStatus(Constants.TWO); //浣滀笟宸茶秴鏃�
+                        }
+                    }
+                }else{
+                    platformDurationVO.setStatus(Constants.ONE);//绌洪棽涓�
+                }
+                platformWorkDataVOList.add(platformDurationVO);
+            }
+        }
+        return  platformWorkDataVOList;
+    }
+
+    private PlatformJob getJobFromListById(Integer id, List<PlatformJob> jobList) {
+        if(jobList!=null){
+            for(PlatformJob job :jobList){
+                if(Constants.equalsInteger(job.getPlatformId(),id)){
+                    return  job;
+                }
+            }
+
+        }
+
+        return null;
+    }
+
+    /**
+     *
+     * @param type 鏌ヨ绫诲瀷锛�0=鍏ュ簱锛�1=鍑哄簱
+     * @return
+     */
+    @Override
+    public   List<WorkEfficiencyVO> workEfficiency(Integer type){
+        //浣滀笟绫诲瀷 0鑷湁杞﹀嵏璐� 1鑷湁杞﹁璐� 2澶栧崗杞﹀嵏璐� 3澶栧崗杞﹁璐� 4甯傚叕鍙稿鍗忚溅鍗歌揣
+        List<WorkEfficiencyVO> workEfficiencyVOList = new ArrayList<>();
+        List<PlatformJob> jobList = platformJobMapper.selectJoinList(PlatformJob.class, new MPJLambdaWrapper<PlatformJob>()
+                .selectAll( PlatformJob.class)
+                .select("(select sum(ifnull(a.io_qty,0)) from platform_wms_detail a where a.isdeleted=0 and a.job_id =t.id )", PlatformJob::getIoQty)
+                .apply("to_days(t.create_date) = to_days(now())")
+                .eq(Platform::getIsdeleted, Constants.ZERO)
+                .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
+                        , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
+                        , Constants.PlatformJobStatus.LEAVED.getKey())
+                .in(Constants.equalsInteger(type,Constants.ZERO),PlatformJob::getType,new Integer[]{0,2,4})
+                .in(Constants.equalsInteger(type,Constants.ONE),PlatformJob::getType,new Integer[]{1,3})
+
+        );
+        if(jobList==null || jobList.size()==0){
+            return workEfficiencyVOList;
+        }
+  /*      List<PlatformWmsDetail> jobList = platformWmsDetailMapper.selectJoinList(PlatformWmsDetail.class, new MPJLambdaWrapper<PlatformWmsDetail>()
+                .selectAll( PlatformWmsDetail.class)
+                .selectAs( PlatformJob::getDoneDate,PlatformWmsDetail::getDoneDate)
+                .leftJoin(PlatformJob.class,PlatformJob::getId,PlatformWmsDetail::getJobId)
+                .eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO)
+                .eq(PlatformJob::getIsdeleted, Constants.ZERO)
+                .in(Constants.equalsInteger(type,Constants.ZERO),PlatformJob::getType,new Integer[]{0,2,4})
+                .in(Constants.equalsInteger(type,Constants.ONE),PlatformJob::getType,new Integer[]{1,3})
+                .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
+                        , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
+                        , Constants.PlatformJobStatus.LEAVED.getKey())
+                .apply("to_days(t1.create_date) = to_days(now())")
+        );*/
+        int curtotalNum = 0;
+        Date today =  Utils.Date.getStart(new Date());
+        long curTime=0, lastTime=0;
+        for (int i = 0; i < 8; i++) {
+            lastTime = curTime;//涓婃鐨勬椂闂�
+            int curHour = 8+(i*2);
+            curTime = curHour*60*60*1000 + today.getTime();
+            WorkEfficiencyVO workEfficiencyVO = new WorkEfficiencyVO();
+            workEfficiencyVO.setWorkTime(curHour+":00");
+            workEfficiencyVO.setTotalWorkNum(0);
+            workEfficiencyVO.setWorkNum(0);
+            if(jobList!=null && jobList.size()>0){
+                for(PlatformJob detail : jobList){
+                    if(detail.getDoneDate()!=null && detail.getDoneDate().getTime()<= curTime){
+                        //褰撳墠閲�
+                        if(detail.getDoneDate()!=null && detail.getDoneDate().getTime() > lastTime){
+                            //鍖洪棿鍊� 鍙栧疄杩�2灏忔椂鍐呯殑绱鍊�
+                            workEfficiencyVO.setWorkNum(Constants.formatIntegerNum(workEfficiencyVO.getWorkNum())+Constants.formatBigdecimal(detail.getIoQty()).intValue() +Constants.formatBigdecimal(detail.getTotalNum()).intValue());
+                            //绱Н閲�
+                        }
+                    }
+                }
+                curtotalNum += Constants.formatIntegerNum(workEfficiencyVO.getWorkNum()) ;
+            }
+            workEfficiencyVO.setTotalWorkNum(curtotalNum);//绱鍊�
+            workEfficiencyVOList.add(workEfficiencyVO);
+        }
+        return workEfficiencyVOList;
+    }
+    @Override
+    public List<PlatformDurationVO> platformDuration(){
+        List<PlatformDurationVO> platformDurationList = new ArrayList<>();
+        List<Platform> jobList = platformMapper.selectJoinList(Platform.class, new MPJLambdaWrapper<Platform>()
+                .selectAll( Platform.class)
+                .select(" (select ROUND( SUM(ifnull(pl.PARAM3,0)/60 ) , 2 )   from platform_log pl  where   pl.remark = t.id and to_days(pl.CREATE_DATE) =to_days(now()))",Platform::getWorkCountTime)
+                .eq(Platform::getIsdeleted, Constants.ZERO)
+        );
+        if(jobList!=null){
+            //鎸夊伐浣滄椂闀跨疮璁″�掑簭鎺掑簭
+            Collections.sort(jobList, new Comparator<Platform>() {
+                @Override
+                public int compare(Platform o1, Platform o2) {
+                    return Constants.formatBigdecimal(o2.getWorkCountTime()).intValue() - Constants.formatBigdecimal(o1.getWorkCountTime()).intValue();
+                }
+            });
+            for(Platform model : jobList){
+                PlatformDurationVO data = new PlatformDurationVO();
+                data.setPlatformId(model.getId());
+                data.setPlatformName(model.getName());
+                data.setWorkTotalTime(Constants.formatBigdecimal(model.getWorkCountTime()).intValue());
+                platformDurationList.add(data);
+            }
+        }
+
+        return platformDurationList;
+    }
+    @Override
+    public      List<PlatformWarnEvent> warningList(int limit){
+        List<PlatformWarnEvent> platformLogList = platformWarnEventMapper.selectList(new QueryWrapper<PlatformWarnEvent>().lambda()
+                .eq(PlatformWarnEvent::getIsdeleted,Constants.ZERO)
+                .orderByDesc(PlatformWarnEvent::getCreateDate)
+                .last(" limit "+limit)
+        );
+        return platformLogList;
+    }
+    @Override
     public OnSitDispatchBoardVO getCnddCenterData(){
         OnSitDispatchBoardVO data = new OnSitDispatchBoardVO();
         //鏈堝彴鎬绘暟
@@ -260,7 +557,7 @@
                 .selectAll(PlatformJob.class)
                 .select("count(id)" ,PlatformJob::getCountum)
                 .eq(PlatformJob::getIsdeleted,Constants.ZERO)
-                .apply("to_days(create_data) = to_days(now())" )
+                .apply("to_days(create_date) = to_days(now())" )
                 .groupBy(PlatformJob::getStatus )
         );
         if(jobList!=null){
@@ -268,20 +565,75 @@
             //-------------TODO----------銆愮湅鏉裤�戠埍纭闇�姹�--------------
             //     * 0寰呯‘璁� 1寰呯鍒� 2绛夊緟鍙彿 3鍏ュ洯绛夊緟 4宸插彨鍙� 5浣滀笟涓� 6浣滀笟瀹屾垚 7杞Щ涓� 8寮傚父鎸傝捣 9宸叉巿鏉冪鍥� 10宸茬鍥� 11 宸茶繃鍙� 12宸插彇娑�
             for(PlatformJob model : jobList){
-                //棰勭害杞﹁締
-                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey())
-                ||Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){
+                //寰呯‘璁� 锛堥绾﹁溅锛�
+                if( Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey())){
                     data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
                 }
-                // 浣滀笟杞﹁締
+                //寰呯鍒帮紙棰勭害杞︼級
+                if( Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                }
+                //绛夊緟鍙彿锛堥绾﹁溅銆佺鍒版暟銆佹帓闃熻溅锛�
+                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){
+                    data.setSignedNum(data.getSignedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setLineUpCar(data.getLineUpCar()+Constants.formatIntegerNum(model.getCountum()));
+                }
+                //鍏ュ洯绛夊緟锛堥绾﹁溅銆佺鍒版暟锛�
+                if( Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey())){
+                    data.setSignedNum(data.getSignedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                }
+                //宸插彨鍙凤紙棰勭害杞︺�佺鍒版暟銆佸凡鍙彿锛�
+                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.CALLED.getKey()) ){
+                    data.setSignedNum(data.getSignedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setCalledNum(data.getCalledNum()+Constants.formatIntegerNum(model.getCountum()));
+                }
+                // 浣滀笟杞﹁締锛堥绾﹁溅銆佺鍒版暟銆佸凡鍙彿銆佷綔涓氳溅锛�
                 if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){
+                    data.setSignedNum(data.getSignedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setCalledNum(data.getCalledNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setWorkedNum(data.getWorkedNum()+Constants.formatIntegerNum(model.getCountum()));
+                }
+                // 浣滀笟瀹屾垚锛堥绾﹁溅銆佺鍒版暟銆佸凡鍙彿銆佷綔涓氳溅銆佸凡瀹屾垚锛�
+                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){
+                    data.setSignedNum(data.getSignedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setCalledNum(data.getCalledNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setWorkedNum(data.getWorkedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setDoneNum(data.getDoneNum()+Constants.formatIntegerNum(model.getCountum()));
+                }
+                // 杞Щ涓紙棰勭害杞︺�佺鍒版暟銆佹帓闃熻溅锛�
+                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.TRANSFERING.getKey())){
+                    data.setSignedNum(data.getSignedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setLineUpCar(data.getLineUpCar()+Constants.formatIntegerNum(model.getCountum()));
+                }
+                // 宸叉巿鏉冪鍥紙棰勭害杞︺�佺鍒版暟銆佸凡鍙彿銆佷綔涓氳溅銆佸凡瀹屾垚锛�
+                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())){
+                    data.setSignedNum(data.getSignedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setCalledNum(data.getCalledNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setWorkedNum(data.getWorkedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setDoneNum(data.getDoneNum()+Constants.formatIntegerNum(model.getCountum()));
+                }
+                // 宸茬鍥�
+                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.LEAVED.getKey())){
                     data.setWorkingCar(data.getWorkingCar()+Constants.formatIntegerNum(model.getCountum()));
                 }
-                //鎺掗槦杞﹁締
-                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())
-                        ||Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey())){
-                     data.setLineUpCar(data.getLineUpCar()+Constants.formatIntegerNum(model.getCountum()));
+                // 宸茶繃鍙凤紙棰勭害杞︺�佺鍒版暟銆佹帓闃熻溅锛�
+                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.OVER_NUMBER.getKey())){
+                    data.setSignedNum(data.getSignedNum()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                    data.setLineUpCar(data.getLineUpCar()+Constants.formatIntegerNum(model.getCountum()));
                 }
+                // 宸插彇娑�(棰勭害杞︼級
+                if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.CANCEL.getKey())){
+                    data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum()));
+                }
+
             }
         }
 

--
Gitblit v1.9.3