智慧保安后台管理项目备份
Administrator
2021-09-11 05254cc0cf10fb2f692b2620e7edfdd039060b29
指令查询修改,成绩查询修改,个人位置查询修改
11 files modified
170 ■■■■■ changed files
src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.xml 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/directive/service/impl/DirectiveServiceImpl.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/location/controller/LiveLocationController.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/location/mapper/LiveLocationMapper.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/location/mapper/LiveLocationMapper.xml 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/location/service/LiveLocationService.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/location/vo/LiveLocationVo.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/mapper/PerformanceMapper.java 3 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/mapper/PerformanceMapper.xml 3 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/directive/mapper/DirectiveMapper.xml
@@ -24,6 +24,12 @@
        <if test="directive.endTime!=null and directive.endTime!=''">
            and sd.send_time &lt;= #{directive.endTime}
        </if>
        <if test="directive.content!=null and directive.content!=''">
            and sd.content like concat('%', #{directive.content},'%')
        </if>
        <if test="directive.sendName!=null and directive.sendName!=''">
            and bu.real_name like concat('%', #{directive.sendName},'%')
        </if>
        <if test="directive.sendDirectiveId!=null and directive.sendDirectiveId!=''">
            and sd.send_directive_id like concat('%', #{directive.sendDirectiveId},'%')
        </if>
src/main/java/org/springblade/modules/directive/service/impl/DirectiveServiceImpl.java
@@ -59,6 +59,13 @@
                }
                if (!"".equals(builder.toString())) {
                    record.setReceiveName(builder.toString().substring(0, builder.toString().length() - 1));
                    //如果查询接收人
                    if (null!=directive.getReceiveName() && directive.getReceiveName()!=""){
                        //不匹配就删除
                        if (!record.getReceiveName().contains(directive.getReceiveName())){
                            records.remove(record);
                        }
                    }
                }
            }
        }
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -1168,7 +1168,7 @@
            and A.jurisdiction =#{jurisdiction}
        </if>
        <if test="deptid!=null and deptid!=''">
            and d.dept_name like concat(concat('%', #{deptid}),'%')
            and d.enterpriseName like concat(concat('%', #{deptid}),'%')
        </if>
        <if test="stats!=null and stats!=''">
            and d.stats =#{stats}
src/main/java/org/springblade/modules/location/controller/LiveLocationController.java
@@ -151,6 +151,17 @@
        return R.data(liveLocationService.getLocusInfoList(liveLocationVo));
    }
    /**
     * 获取指令接收人的轨迹数据
     * @param liveLocationVo 实时对象信息
     * @return
     */
    @GetMapping("/getDirectiveLocusInfoList")
    public R<List<List<LocusVo>>> getDirectiveLocusInfoList(LiveLocationVo liveLocationVo){
        return R.data(liveLocationService.getDirectiveLocusInfoList(liveLocationVo));
    }
    /**
     * 首页实时定位
     * @return
@@ -160,4 +171,15 @@
        return R.data(liveLocationService.getLiveLocationVoList(liveLocationVo));
    }
    /**
     * 获取指令接收人的定位信息
     * @param liveLocationVo 定位数据信息
     * @return
     */
    @GetMapping("/getDirectiveLiveLocationVoList")
    public R<List<LiveLocationVo>> getDirectiveLiveLocationVoList(LiveLocationVo liveLocationVo){
        return R.data(liveLocationService.getDirectiveLiveLocationVoList(liveLocationVo));
    }
}
src/main/java/org/springblade/modules/location/mapper/LiveLocationMapper.java
@@ -72,4 +72,18 @@
     * @return
     */
    List<LiveLocationVo> selectSecurityAndCarAndGunLiveLocationPage(LiveLocationVo liveLocationVo);
    /**
     * 获取指令接收人的定位信息
     * @param liveLocationVo 定位数据信息
     * @return
     */
    LiveLocationVo getDirectiveLiveLocationVo(@Param("liveLocation") LiveLocationVo liveLocationVo);
    /**
     * 获取指令接收人的轨迹数据
     * @param liveLocationVo 实时对象信息
     * @return
     */
    List<LocusVo> getDirectiveLocusInfoList(@Param("liveLocation") LiveLocationVo liveLocationVo);
}
src/main/java/org/springblade/modules/location/mapper/LiveLocationMapper.xml
@@ -214,8 +214,43 @@
    <!--查询指令接收人的定位信息-->
    <select id="getDirectiveLiveLocationVo" resultType="org.springblade.modules.location.vo.LiveLocationVo">
        select
        *
        from
        sys_live_location
        where
        1=1
        <if test="liveLocation.type!=null and liveLocation.type!=''">
            and type = #{liveLocation.type}
        </if>
        <if test="liveLocation.workerId!=null and liveLocation.workerId!=''">
            and worker_id = #{liveLocation.workerId}
        </if>
    </select>
    <!--查询指令接收人的定位信息-->
    <select id="getDirectiveLocusInfoList" resultType="org.springblade.modules.location.vo.LocusVo">
        select
        sl.*
        from
        sys_locus sl
        left join
        sys_live_location sll
        on
        sll.id = sl.live_location_id
        where
        1=1
        <if test="liveLocation.type!=null and liveLocation.type!=''">
            and sll.type = #{liveLocation.type}
        </if>
        <if test="liveLocation.workerId!=null and liveLocation.workerId!=''">
            and sll.worker_id = #{liveLocation.workerId}
        </if>
    </select>
src/main/java/org/springblade/modules/location/service/LiveLocationService.java
@@ -48,4 +48,18 @@
     * @return
     */
    LiveLocation getLiveLocationInfo(LiveLocation liveLocation);
    /**
     * 获取指令接收人的定位信息
     * @param liveLocationVo 定位数据信息
     * @return
     */
    List<LiveLocationVo> getDirectiveLiveLocationVoList(LiveLocationVo liveLocationVo);
    /**
     * 获取指令接收人的轨迹数据
     * @param liveLocationVo 实时对象信息
     * @return
     */
    List<List<LocusVo>> getDirectiveLocusInfoList(LiveLocationVo liveLocationVo);
}
src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java
@@ -9,6 +9,8 @@
import org.springblade.modules.location.vo.LocusVo;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@@ -81,4 +83,61 @@
    public LiveLocation getLiveLocationInfo(LiveLocation liveLocation) {
        return baseMapper.getLiveLocationInfo(liveLocation);
    }
    /**
     * 获取指令接收人的定位信息
     * @param liveLocationVo 定位数据信息
     * @return
     */
    @Override
    public List<LiveLocationVo> getDirectiveLiveLocationVoList(LiveLocationVo liveLocationVo) {
        ArrayList<LiveLocationVo> arrayList = new ArrayList<>();
        //人员
        if (liveLocationVo.getType()==1){
            String userIds = liveLocationVo.getUserIds();
            if (null!=userIds && userIds!=""){
                List<String> list = Arrays.asList(userIds.split(","));
                if (list.size()>0){
                    list.forEach(userId->{
                        liveLocationVo.setWorkerId(Long.parseLong(userId));
                        LiveLocationVo directiveLiveLocationVo = baseMapper.getDirectiveLiveLocationVo(liveLocationVo);
                        //如果存在定位数据
                        if (null!=directiveLiveLocationVo){
                            arrayList.add(directiveLiveLocationVo);
                        }
                    });
                }
            }
        }
        return arrayList;
    }
    /**
     * 获取指令接收人的轨迹数据
     * @param liveLocationVo 实时对象信息
     * @return
     */
    @Override
    public List<List<LocusVo>> getDirectiveLocusInfoList(LiveLocationVo liveLocationVo) {
        List<List<LocusVo>> arrayList = new ArrayList<>();
        //人员
        if (liveLocationVo.getType()==1){
            String userIds = liveLocationVo.getUserIds();
            if (null!=userIds && userIds!=""){
                List<String> list = Arrays.asList(userIds.split(","));
                if (list.size()>0){
                    list.forEach(userId->{
                        liveLocationVo.setWorkerId(Long.parseLong(userId));
                        List<LocusVo> directiveLocusInfoList = baseMapper.getDirectiveLocusInfoList(liveLocationVo);
                        //如果存在轨迹数据
                        if (directiveLocusInfoList.size()>0){
                            arrayList.add(directiveLocusInfoList);
                        }
                    });
                }
            }
        }
        return arrayList;
    }
}
src/main/java/org/springblade/modules/location/vo/LiveLocationVo.java
@@ -54,4 +54,9 @@
     */
    private String carNum;
    /**
     * 指令接收人id
     */
    private String userIds;
}
src/main/java/org/springblade/modules/performance/mapper/PerformanceMapper.java
@@ -16,6 +16,7 @@
 */
package org.springblade.modules.performance.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.performance.entity.Performance;
import org.springblade.modules.performance.vo.PerformanceVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -38,6 +39,6 @@
     * @param performance
     * @return
     */
    List<PerformanceVO> selectPerformancePage(IPage page, PerformanceVO performance);
    List<PerformanceVO> selectPerformancePage(IPage page,@Param("performance") PerformanceVO performance);
    Map<String, String> queryYearPer(String year);
}
src/main/java/org/springblade/modules/performance/mapper/PerformanceMapper.xml
@@ -19,9 +19,8 @@
    <select id="selectPerformancePage" resultMap="performanceResultMap">
        select * from sys_performance
        select * from sys_performance where securityId = #{performance.securityid}
    </select>
    <!--查询本年所有月份的表现差的数量-->
    <select id="queryYearPer" resultType="java.util.HashMap">