dengyj 3 년 전
부모
커밋
89e4c573eb

+ 2 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseoperationlog/mapper/MeterBaseOperationLogMapper.xml

@@ -1154,8 +1154,10 @@
 
   <select id="operationPageInfo" parameterType="java.util.HashMap" resultType="String">
     select distinct A.operation_page from meter_base_operation_log A
+    order by A.operation_page
   </select>
   <select id="operationFunctionInfo" parameterType="java.util.HashMap" resultType="String">
     select distinct A.operation_function from meter_base_operation_log A
+    order by A.operation_function
   </select>
 </mapper>

+ 44 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/service/impl/MeterBaseUserSpotConfigServiceImpl.java

@@ -1,6 +1,8 @@
 package com.steerinfo.baseinfo.meterbaseuserspotconfig.service.impl;
 
 import cn.hutool.core.lang.Assert;
+import com.steerinfo.baseinfo.meterbaseoperationlog.mapper.MeterBaseOperationLogMapper;
+import com.steerinfo.baseinfo.meterbaseoperationlog.model.MeterBaseOperationLog;
 import com.steerinfo.baseinfo.meterbaseuserspotconfig.mapper.MeterBaseUserSpotConfigMapper;
 import com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig;
 import com.steerinfo.baseinfo.meterbaseuserspotconfig.service.IMeterBaseUserSpotConfigService;
@@ -39,6 +41,9 @@ public class MeterBaseUserSpotConfigServiceImpl extends BaseServiceImpl<MeterBas
     @Autowired(required = false)
     private MeterBaseUserSpotConfigMapper meterBaseUserSpotConfigMapper;
 
+    @Autowired(required = false)
+    private MeterBaseOperationLogMapper meterBaseOperationLogMapper;
+
     @Override
     protected IBaseMapper<MeterBaseUserSpotConfig, String> getMapper() {
         return meterBaseUserSpotConfigMapper;
@@ -84,6 +89,19 @@ public class MeterBaseUserSpotConfigServiceImpl extends BaseServiceImpl<MeterBas
                     model.setCreateTime(new Date());
                     meterBaseUserSpotConfigMapper.insertSelective(model);
                 }
+                MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+                logModel.setId(PublicMethod.IdCreate(2));
+                logModel.setCreateManNo(userId);
+                logModel.setCreateManName(userName);
+                logModel.setCreateTime(new Date());
+                logModel.setOperationPage("web端-日工作量用户秤点信息配置表");
+                logModel.setOperationFunction("秤点分配");
+                logModel.setOperationId("");
+                logModel.setOperationPredictionNo("");
+                logModel.setOperationCarnNo("");
+                logModel.setOperationAfterFix("用户账号:" + model.getUserCode() + ", 用户名称:" + model.getUserName() + ", 秤点编号:" + model.getBaseSpotNo() + ", 秤点名称:"
+                + model.getBaseSpotName());
+                meterBaseOperationLogMapper.insertSelective(logModel);
                 count ++;
             }
             rm.setSucceed(true);
@@ -108,7 +126,33 @@ public class MeterBaseUserSpotConfigServiceImpl extends BaseServiceImpl<MeterBas
     public void deleteUserSpot(List<String> ids) {
         try {
             for (String id : ids) {
+
+                String userId = "";
+                String userName = "";
+                try{
+                    UserPayload userPayload = UserPayload.getCurrUser();
+                    userId = userPayload.getUserCode();
+                    userName = userPayload.getUserName();
+                }catch(Exception e) {
+                    userId = "admin";
+                    userName = "admins";
+                }
+                MeterBaseUserSpotConfig model = meterBaseUserSpotConfigMapper.selectByPrimaryKey(id);
                 meterBaseUserSpotConfigMapper.deleteByPrimaryKey(id);
+
+                MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+                logModel.setId(PublicMethod.IdCreate(2));
+                logModel.setCreateManNo(userId);
+                logModel.setCreateManName(userName);
+                logModel.setCreateTime(new Date());
+                logModel.setOperationPage("web端-日工作量用户秤点信息配置表");
+                logModel.setOperationFunction("取消分配");
+                logModel.setOperationId("");
+                logModel.setOperationPredictionNo("");
+                logModel.setOperationCarnNo("");
+                logModel.setOperationAfterFix("用户账号:" + model.getUserCode() + ", 用户名称:" + model.getUserName() + ", 秤点编号:" + model.getBaseSpotNo() + ", 秤点名称:"
+                        + model.getBaseSpotName());
+                meterBaseOperationLogMapper.insertSelective(logModel);
             }
         }catch (Exception e){
             throw e;

+ 9 - 4
src/main/java/com/steerinfo/meterwork/meterworkcarmetertime/controller/MeterWorkCarMeterTimeController.java

@@ -21,10 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
+import java.util.*;
 import java.math.BigDecimal;
 
 /**
@@ -98,6 +95,14 @@ public class MeterWorkCarMeterTimeController extends BaseRESTfulController {
         return success(list);
     }
 
+    @ApiOperation(value="获取计量及时性分析班组统计", notes="分页查询")
+    //@RequiresPermissions("meterworkcarmetertime:view")
+    @PostMapping(value = "/getCarMeterTimeAndCarFirstCount")
+    public RESTfulResult getCarMeterTimeAndCarFirstCount(@RequestBody(required = false) HashMap parmas){
+        List<Map<String, Object>> list = meterWorkCarMeterTimeService.getCarMeterTimeAndCarFirstCount(parmas);
+        return success(list);
+    }
+
     @ApiOperation(value="新增汽车衡计量时间")
     @ApiImplicitParam(name = "meterWorkCarMeterTime", value = "详细实体meterWorkCarMeterTime", required = true, dataType = "MeterWorkCarMeterTime")
     @PostMapping(value = "/insert")

+ 4 - 0
src/main/java/com/steerinfo/meterwork/meterworkcarmetertime/mapper/MeterWorkCarMeterTimeMapper.java

@@ -17,4 +17,8 @@ public interface MeterWorkCarMeterTimeMapper extends IBaseMapper<MeterWorkCarMet
 
     List<PointDetailsVo> selectPointDetails(PointDetailsBo pointDetailsBo);
     List<CarMeterTimeAndCarFirst> carMeterTimeAndCarFirstBySpot(HashMap<String, Object> obj);
+
+    List<CarMeterTimeAndCarFirst> getSpotGroupBy(HashMap parmas);
+
+    List<CarMeterTimeAndCarFirst> getCarMeterTimeAndCarFirstCount(HashMap parmas);
 }

+ 65 - 0
src/main/java/com/steerinfo/meterwork/meterworkcarmetertime/mapper/MeterWorkCarMeterTimeMapper.xml

@@ -538,6 +538,71 @@
           #{item}
         </foreach>
       </if>
+      <if test="createManNo != null and createManNo != ''">
+        and t1.create_man_no in
+        <foreach collection="createManNo" item="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
+    </where>
+    order by t1.CREATE_TIME desc
+  </select>
+  <select id="getSpotGroupBy"
+          resultType="com.steerinfo.meterwork.meterworkcarmetertime.model.CarMeterTimeAndCarFirst">
+        select
+        t1.base_spot_no baseSpotNo,
+        t1.base_spot_name baseSpotName
+        from METER_WORK_CAR_METER_TIME t
+        left join meter_work_car_actual_first t1
+        on t.actual_first_no = t1.actual_first_no
+        <where>
+          and t1.base_spot_no is not null
+          <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+            and t.create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and t.create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+          </if>
+        </where>
+        group by t1.base_spot_no,t1.base_spot_name
+        order by t1.base_spot_name asc
+  </select>
+  <select id="getCarMeterTimeAndCarFirstCount"
+          resultType="com.steerinfo.meterwork.meterworkcarmetertime.model.CarMeterTimeAndCarFirst">
+    select t1.BASE_SPOT_NO    baseSpotNo,
+    t1.BASE_SPOT_NAME  baseSpotName,
+    t.TOTAL_NUM totalNum,
+    t1.create_man_no createManNo,
+    t1.create_man_name createManName
+    from METER_WORK_CAR_METER_TIME t
+    left join meter_work_car_actual_first t1
+    on t.actual_first_no = t1.actual_first_no
+    <where>
+      and t1.base_spot_no is not null
+      <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+        and t.create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and t.create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and t1.BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and t1.BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotNoStr != null and baseSpotNoStr != ''">
+        and t1.base_spot_no in
+        <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
+      <if test="createManNoStr != null and createManNoStr != ''">
+        and t1.create_man_no in
+        <foreach collection="manNoStr" item="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and t1.create_man_no in
+        <foreach collection="createManNo" item="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
     </where>
     order by t1.CREATE_TIME desc
   </select>

+ 3 - 0
src/main/java/com/steerinfo/meterwork/meterworkcarmetertime/service/IMeterWorkCarMeterTimeService.java

@@ -9,6 +9,7 @@ import java.util.Date;
 import java.math.BigDecimal;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * MeterWorkCarMeterTime服务接口:
@@ -31,4 +32,6 @@ public interface IMeterWorkCarMeterTimeService extends IBaseService<MeterWorkCar
     List<PointDetailsVo> getPointDetails(PointDetailsBo pointDetailsBo);
 
     PageList<CarMeterTimeAndCarFirst> carMeterTimeAndCarFirstBySpot(HashMap<String, Object> params, Integer pageNum, Integer pageSize);
+
+    List<Map<String, Object>> getCarMeterTimeAndCarFirstCount(HashMap parmas);
 }

+ 304 - 4
src/main/java/com/steerinfo/meterwork/meterworkcarmetertime/service/impl/MeterWorkCarMeterTimeServiceImpl.java

@@ -1,5 +1,7 @@
 package com.steerinfo.meterwork.meterworkcarmetertime.service.impl;
 
+import com.rabbitmq.client.Return;
+import com.steerinfo.baseinfo.combaseinfo.mapper.ComBaseInfoMapper;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
@@ -8,12 +10,14 @@ import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualF
 import com.steerinfo.meterwork.meterworkcarmetertime.model.*;
 import com.steerinfo.meterwork.meterworkcarmetertime.mapper.MeterWorkCarMeterTimeMapper;
 import com.steerinfo.meterwork.meterworkcarmetertime.service.IMeterWorkCarMeterTimeService;
+import com.steerinfo.util.StringUtils;
+import org.apache.shiro.crypto.hash.Hash;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import java.util.Date;
+
+import javax.annotation.Resource;
+import java.util.*;
 import java.math.BigDecimal;
-import java.util.HashMap;
-import java.util.List;
 
 /**
  * MeterWorkCarMeterTime服务实现:
@@ -31,9 +35,12 @@ import java.util.List;
 @Service(value = "meterWorkCarMeterTimeService")
 public class MeterWorkCarMeterTimeServiceImpl extends BaseServiceImpl<MeterWorkCarMeterTime, String> implements IMeterWorkCarMeterTimeService {
 
-    @Autowired
+    @Resource
     private MeterWorkCarMeterTimeMapper meterWorkCarMeterTimeMapper;
 
+    @Resource
+    private ComBaseInfoMapper comBaseInfoMapper;
+
     @Override
     protected IBaseMapper<MeterWorkCarMeterTime, String> getMapper() {
         return meterWorkCarMeterTimeMapper;
@@ -66,4 +73,297 @@ public class MeterWorkCarMeterTimeServiceImpl extends BaseServiceImpl<MeterWorkC
         return pageInfo;
     }
 
+    @Override
+    public List<Map<String, Object>> getCarMeterTimeAndCarFirstCount(HashMap parmas) {
+        //汇总站点
+        List<CarMeterTimeAndCarFirst> spotGroupBy = meterWorkCarMeterTimeMapper.getSpotGroupBy(parmas);
+        //查询班组
+        //计量一班
+        HashMap<String, Object> hashMap1=new HashMap<>();
+        hashMap1.put("pBaseCode","001060001");
+        List<String> list1 = comBaseInfoMapper.matterNoByBaseCode(hashMap1);
+        //计量二班
+        HashMap<String, Object> hashMap2=new HashMap<>();
+        hashMap2.put("pBaseCode","001060002");
+        List<String> list2 = comBaseInfoMapper.matterNoByBaseCode(hashMap2);
+        //计量三班
+        HashMap<String, Object> hashMap3=new HashMap<>();
+        hashMap3.put("pBaseCode","001060003");
+        List<String> list3 = comBaseInfoMapper.matterNoByBaseCode(hashMap3);
+        //计量四班
+        HashMap<String, Object> hashMap4=new HashMap<>();
+        hashMap4.put("pBaseCode","001060004");
+        List<String> list4 = comBaseInfoMapper.matterNoByBaseCode(hashMap4);
+
+        List<CarMeterTimeAndCarFirst> lists = meterWorkCarMeterTimeMapper.getCarMeterTimeAndCarFirstCount(parmas);
+
+        lists.stream().filter(item->list1.contains(item.getCreateManNo()));
+
+        List<Map<String, Object>> listMessage=new ArrayList<>();
+
+        if (lists==null||list1.size()==0) {
+            return listMessage;
+        }
+
+        for (CarMeterTimeAndCarFirst carMeterTimeAndCarFirst : spotGroupBy) {
+            //总车数
+            long count = lists.stream().filter(item -> StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())).count();
+
+
+            //计量一班总车数
+            long sumCount1 = (list1==null||list1.size()==0)?0: lists.stream().filter(item -> list1.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                            &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                            && StringUtils.isNotEmpty(item.getBaseSpotName())
+                            && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                            && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                            && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                            && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())).count();
+            //计量二班总车数
+            long sumCount2 = (list1==null||list1.size()==0)?0: lists.stream().filter(item -> list2.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())).count();
+            //计量三班总车数
+            long sumCount3 = (list1==null||list1.size()==0)?0: lists.stream().filter(item -> list3.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())).count();
+            //计量四班总车数
+            long sumCount4 = (list1==null||list1.size()==0)?0: lists.stream().filter(item -> list4.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())).count();
+
+
+            //查询每个站点包含计量一班车数总时间小于60秒
+            //查询计量一班的明细
+            //parmas.put("createManNo",list1);
+            //List<CarMeterTimeAndCarFirst> lists1 = meterWorkCarMeterTimeMapper.carMeterTimeAndCarFirstBySpot(parmas);
+            long count1 = (list1==null||list1.size()==0)?0: lists.stream().filter(item -> list1.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())<60).count();
+            //查询计量二班的明细
+            //parmas.put("createManNo",list2);
+            //List<CarMeterTimeAndCarFirst> lists2 = meterWorkCarMeterTimeMapper.carMeterTimeAndCarFirstBySpot(parmas);
+            long count2 = (list2==null||list2.size()==0)?0: lists.stream().filter(item -> list2.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())<60).count();
+            //查询计量三班的明细
+            //parmas.put("createManNo",list3);
+            //List<CarMeterTimeAndCarFirst> lists3 = meterWorkCarMeterTimeMapper.carMeterTimeAndCarFirstBySpot(parmas);
+            long count3 = (list3==null||list3.size()==0)?0: lists.stream().filter(item -> list3.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())<60).count();
+            //查询计量四班的明细
+            //parmas.put("createManNo",list4);
+            //List<CarMeterTimeAndCarFirst> lists4 = meterWorkCarMeterTimeMapper.carMeterTimeAndCarFirstBySpot(parmas);
+            long count4 = (list4==null||list4.size()==0)?0: lists.stream().filter(item -> list4.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())<60).count();
+
+            //总车数
+            long sumCount = count1+count2+count3+count4;
+            //60s及时率
+            String v =  String.format("%.2f",(sumCount* 1.0) / (count * 1.0)*100) ;
+
+
+            //查询每个站点包含计量一班车数总时间大于=60秒小于120
+            //查询计量一班的明细
+            long count21 = (list1==null||list1.size()==0)?0: lists.stream().filter(item ->list1.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())>=60&&Integer.parseInt(item.getTotalNum())<120).count();
+            //查询计量二班的明细
+            long count22 = (list2==null||list2.size()==0)?0: lists.stream().filter(item ->list2.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())>=60&&Integer.parseInt(item.getTotalNum())<120).count();
+            //查询计量三班的明细
+            long count23 = (list3==null||list3.size()==0)?0: lists.stream().filter(item ->list3.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())>=60&&Integer.parseInt(item.getTotalNum())<120).count();
+            //查询计量四班的明细
+            long count24 = (list4==null||list4.size()==0)?0: lists.stream().filter(item ->list4.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())>=60&&Integer.parseInt(item.getTotalNum())<120).count();
+            //总车数
+            long sum2Count = count21+count22+count23+count24;
+            String v2 =  String.format("%.2f",(sum2Count* 1.0) / (count * 1.0)*100);
+
+            //查询每个站点包含计量一班车数总时间大于=60秒小于120
+            //查询计量一班的明细
+            long count31 = (list1==null||list1.size()==0)?0: lists.stream().filter(item -> list1.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())>120).count();
+            //查询计量二班的明细
+            long count32 = (list2==null||list2.size()==0)?0: lists.stream().filter(item -> list2.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())>120).count();
+            //查询计量三班的明细
+            long count33 = (list3==null||list3.size()==0)?0: lists.stream().filter(item -> list3.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())>120).count();
+            //查询计量四班的明细
+            long count34 = (list4==null||list4.size()==0)?0: lists.stream().filter(item -> list4.contains(item.getCreateManNo())//判断班组中的人是否存在于班组中
+                    &&StringUtils.isNotEmpty(item.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(item.getBaseSpotName())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && StringUtils.isNotEmpty(carMeterTimeAndCarFirst.getBaseSpotName())
+                    && item.getBaseSpotNo().equals(carMeterTimeAndCarFirst.getBaseSpotNo())
+                    && item.getBaseSpotName().equals(carMeterTimeAndCarFirst.getBaseSpotName())
+                    &&Integer.parseInt(item.getTotalNum())>120).count();
+            //总车数
+            long sum3Count = count31+count32+count33+count34;
+            String v3 = String.format("%.2f",count==0?0:(sum3Count* 1.0) / (count * 1.0)*100) ;
+
+            //一班<60及时率
+            String V11 = String.format("%.2f",sumCount1==0?0:(count1* 1.0) / (sumCount1 * 1.0)*100) ;
+            //二班<60及时率
+            String V12 = String.format("%.2f",sumCount2==0?0:(count2* 1.0) / (sumCount2 * 1.0)*100) ;
+            //三班<60及时率
+            String V13 = String.format("%.2f",sumCount3==0?0:(count3* 1.0) / (sumCount3 * 1.0)*100) ;
+            //四班<60及时率
+            String V14 = String.format("%.2f",sumCount4==0?0:(count4* 1.0) / (sumCount4 * 1.0)*100) ;
+
+
+            //一班120-60及时率
+            String V21 = String.format("%.2f",sumCount1==0?0:(count21* 1.0) / (sumCount1 * 1.0)*100) ;
+            //二班120-60及时率
+            String V22 = String.format("%.2f",sumCount2==0?0:(count22* 1.0) / (sumCount2 * 1.0)*100) ;
+            //三班120-60及时率
+            String V23 = String.format("%.2f",sumCount3==0?0:(count23* 1.0) / (sumCount3 * 1.0)*100) ;
+            //四班120-60及时率
+            String V24 = String.format("%.2f",sumCount4==0?0:(count24* 1.0) / (sumCount4 * 1.0)*100) ;
+
+
+            //一班>120及时率
+            String V31 = String.format("%.2f",sumCount1==0?0:(count31* 1.0) / (sumCount1 * 1.0)*100) ;
+            //二班>120及时率
+            String V32 = String.format("%.2f",sumCount2==0?0:(count32* 1.0) / (sumCount2 * 1.0)*100) ;
+            //三班>120及时率
+            String V33 = String.format("%.2f",sumCount3==0?0:(count33* 1.0) / (sumCount3 * 1.0)*100) ;
+            //四班>120及时率
+            String V34 = String.format("%.2f",sumCount4==0?0:(count34* 1.0) / (sumCount4 * 1.0)*100) ;
+
+
+
+
+
+            HashMap<String,Object> map =new HashMap<>();
+            map.put("baseSpotNo",carMeterTimeAndCarFirst.getBaseSpotNo());
+            map.put("baseSpotName",carMeterTimeAndCarFirst.getBaseSpotName());
+            map.put("count",count);
+            map.put("count1",count1);
+            map.put("count2",count2);
+            map.put("count3",count3);
+            map.put("count4",count4);
+            map.put("count21",count21);
+            map.put("count22",count22);
+            map.put("count23",count23);
+            map.put("count24",count24);
+            map.put("count31",count31);
+            map.put("count32",count32);
+            map.put("count33",count33);
+            map.put("count34",count34);
+
+            map.put("sumCount1",sumCount1);
+            map.put("sumCount2",sumCount2);
+            map.put("sumCount3",sumCount3);
+            map.put("sumCount4",sumCount4);
+            map.put("sumCountSum",sumCount1+sumCount2+sumCount3+sumCount4);
+
+            map.put("sumCount",sumCount);
+            map.put("sum2Count",sum2Count);
+            map.put("sum3Count",sum3Count);
+
+            map.put("V11",V11);
+            map.put("V12",V12);
+            map.put("V13",V13);
+            map.put("V14",V14);
+            map.put("V21",V21);
+            map.put("V22",V22);
+            map.put("V23",V23);
+            map.put("V24",V24);
+            map.put("V31",V31);
+            map.put("V32",V32);
+            map.put("V33",V33);
+            map.put("V34",V34);
+
+            map.put("v",v);
+            map.put("v2",v2);
+            map.put("v3",v3);
+            listMessage.add(map);
+        }
+
+        //查询班组
+        return listMessage;
+    }
+
 }

+ 8 - 0
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/mapper/MeterWorkCheckFirstActualMapper.xml

@@ -497,6 +497,7 @@
     select *
     from meter_work_car_actual_first
     where 1 = 1
+    and value_flag != '0'
     <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
       and  create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
       and  create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
@@ -522,6 +523,7 @@
               <if test="typeName != null and typeName != ''">
                 and C.type_Name = #{typeName}
               </if>)
+    and A.value_flag != '0'
     <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
       and  A.create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
       and A.create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
@@ -650,6 +652,7 @@
     select *
     from meter_work_car_actual
     where 1 = 1
+    and value_flag != '0'
     <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
       and  net_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
       and  net_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
@@ -675,6 +678,7 @@
               <if test="typeName != null and typeName != ''">
                 and C.type_Name = #{typeName}
               </if>)
+    and A.value_flag != '0'
     <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
       and  A.net_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
       and A.net_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
@@ -746,6 +750,7 @@
                   <if test="typeName != null and typeName != ''">
                     and C.type_Name = #{typeName}
                   </if>)
+    and A.value_flag != '0'
     <if test="actualNo != null and actualNo != ''">
         and A.actual_no = #{actualNo}
     </if>
@@ -842,6 +847,7 @@
               <if test="typeName != null and typeName != ''">
                 and C.type_Name = #{typeName}
               </if>)
+    and A.value_flag != '0'
     <if test="actualFirstNo != null and actualFirstNo != ''">
       and A.actual_first_no = #{actualFirstNo}
     </if>
@@ -994,6 +1000,7 @@
               where 1 = 1
                   and C.value_flag = '0'
                   and C.type_no = '001002001')
+      and A.value_flag != '0'
       <if test="actualFirstNo != null and actualFirstNo != ''">
         and A.actual_first_no = #{actualFirstNo}
       </if>
@@ -1068,6 +1075,7 @@
             where 1 = 1
               and B.value_flag = '1'
               and B.type_no = '001002001')
+    and A.value_flag != '0'
     <if test="actualNo != null and actualNo != ''">
       and A.actual_no = #{actualNo}
     </if>

+ 3 - 0
src/main/java/com/steerinfo/meterwork/meterworkdatacount/mapper/MeterWorkDataCountMapper.xml

@@ -742,6 +742,7 @@
             and  A.create_Time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
             and A.create_Time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
         </if>
+        order by a.operation_function
     </select>
 
     <select id="hookTareWeightAndTheoryAmount" parameterType="java.util.HashMap"
@@ -1398,6 +1399,7 @@
             and  A.create_Time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
             and A.create_Time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
         </if>
+        order by A.operation_page
     </select>
     <select id="measurementAccuracyCreateManName" resultType="java.lang.String">
         select distinct A.create_man_name createManName
@@ -1408,5 +1410,6 @@
             and  A.create_Time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
             and A.create_Time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
         </if>
+        order by A.create_man_name
     </select>
 </mapper>

+ 8 - 2
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java

@@ -4036,7 +4036,13 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                 logModel.setCreateManName(userName);
                 logModel.setCreateTime(new Date());
                 logModel.setOperationPage("C#端-动轨净重数据维护");
-                logModel.setOperationFunction("净重信息修改");
+                if(!modelTemp.getRailwayNo().equals(model.getRailwayNo())) {
+                    logModel.setOperationFunction("车号修改");
+                }else{
+                    if(!(modelTemp.getTareWeight().compareTo(model.getTareWeight()) == 0)) {
+                        logModel.setOperationFunction("Ai标识皮修改");
+                    }
+                }
                 logModel.setOperationId(model.getActualNo());
                 logModel.setOperationPredictionNo(model.getPredictionNo());
                 logModel.setOperationCarnNo(model.getRailwayNo());
@@ -4048,7 +4054,7 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                 model.setUpdateManNo(userId);
                 model.setUpdateManName(userName);
                 model.setUpdateTime(new Date());
-                model.setNote("净重信息修改");
+                model.setNote(logModel.getOperationFunction());
                 meterWorkRailwayActualMapper.updateByPrimaryKeySelective(model);
                 count++;
             }

+ 11 - 1
src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/service/impl/MeterWorkRailwayReceivedServiceImpl.java

@@ -124,11 +124,19 @@ public class MeterWorkRailwayReceivedServiceImpl extends BaseServiceImpl<MeterWo
                     MeterBaseOperationLog note = new MeterBaseOperationLog();
                     String no = PublicMethod.IdCreate(3);
                     note.setId(no);
+                    note.setOperationId(model.getActualFirstNo());
                     note.setCreateManNo(model.getUpdateManNo());
                     note.setCreateManName(model.getUpdateManName());
                     note.setCreateTime(new Date());
                     note.setOperationPage("终端-轨道衡从表数据维护");
-                    note.setOperationFunction("修改");
+                    if(!received.getRailwayNo().equals(model.getRailwayWorkNo())) {
+                        note.setOperationFunction("车号修改");
+                    }else {
+                        if(!(received.getMeterWeight().compareTo(model.getMeterWeight()) == 0)) {
+                            note.setOperationFunction("Ai标识皮修改");
+                        }
+                    }
+
                     note.setOperationBeforeFix(received.toString());
                     note.setOperationAfterFix(model.toString());
                     note.setOperationCarnNo(model.getRailwayNo());
@@ -357,6 +365,7 @@ public class MeterWorkRailwayReceivedServiceImpl extends BaseServiceImpl<MeterWo
                             note.setCreateTime(new Date());
                             note.setOperationPage("终端-轨道衡从表数据维护");
                             note.setOperationFunction("新增");
+                            note.setOperationId(receivedTemp.getActualFirstNo());
                             note.setOperationCarnNo(receivedTemp.getRailwayNo());
                             meterBaseOperationLogMapper.insertSelective(note);
 //                        }
@@ -384,6 +393,7 @@ public class MeterWorkRailwayReceivedServiceImpl extends BaseServiceImpl<MeterWo
                             note.setCreateTime(new Date());
                             note.setOperationPage("终端-轨道衡从表数据维护");
                             note.setOperationFunction("新增");
+                            note.setOperationId(receivedTemp.getActualFirstNo());
                             note.setOperationCarnNo(receivedTemp.getRailwayNo());
                             meterBaseOperationLogMapper.insertSelective(note);
                             receivedTemp.setActualFirstNo(PublicMethod.IdCreate(3));