叶松
2023-11-27 19eefcf5f39fd6ae3e161f978b74d92353585fc7
Merge branch 'master' of http://111.30.93.211:10101/r/supipe
已修改8个文件
已添加2个文件
182 ■■■■■ 文件已修改
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/ExecFaceListener.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/FaceServer.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/AreaAdmin.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorUserVo.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/NamePhoneDepart.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/mapper/PlatUserMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/PlatUserService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/impl/PlatUserServiceImpl.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/StaffManage/src/main/resources/mapping/PlatUserMapper.xml 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixmateria/service/impl/MixMaterialServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/ExecFaceListener.java
@@ -4,6 +4,7 @@
import com.thhy.general.common.BasicResult;
import com.thhy.general.config.GlobalConfig;
import com.thhy.general.utils.SpringContextUtils;
import com.thhy.staff.modules.biz.platuser.entity.AreaAdmin;
import com.thhy.staff.modules.biz.platuser.service.PlatUserService;
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;
@@ -19,6 +20,7 @@
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArraySet;
@@ -70,8 +72,28 @@
                    dataMapList.add(map);
                    Map<String,Object> map1 = userService.groupUserWork(userToken);
                    Map<String,Object> map2 = userService.faceRecord(userToken);
                    List<HashMap<String,Object>> AudioGroupList = userService.queryGroups();
                    Map<String, Object> map3 = new HashMap<>();
                    map3.put("mod","audioGroup");
                    map3.put("groupList",AudioGroupList);
                    List<HashMap<String,Object>> HelmetWarnList = userService.queryHelmetWarn();
                    Map<String, Object> map4 = new HashMap<>();
                    map4.put("mod","helmetWarn");
                    map4.put("helmetWarnList",HelmetWarnList);
                    List<AreaAdmin> areaAdminList = userService.areaAdminInfo();
                    Map<String, Object> map5 = new HashMap<>();
                    map5.put("mod","areaAdmin");
                    map5.put("areaAdminList",areaAdminList);
                    dataMapList.add(map1);
                    dataMapList.add(map2);
                    dataMapList.add(map3);
                    dataMapList.add(map4);
                    dataMapList.add(map5);
                    try {
                        session.getBasicRemote().sendText(JSON.toJSONString(dataMapList));
                    } catch (IOException e) {
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/controller/FaceServer.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSON;
import com.thhy.general.config.GlobalConfig;
import com.thhy.general.utils.SpringContextUtils;
import com.thhy.staff.modules.biz.platuser.entity.AreaAdmin;
import com.thhy.staff.modules.biz.platuser.service.PlatUserService;
import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;
@@ -68,8 +69,28 @@
        dataMapList.add(map);
        Map<String,Object> map1 = userService.groupUserWork(userToken);
        Map<String,Object> map2 = userService.faceRecord(userToken);
        List<HashMap<String,Object>> AudioGroupList = userService.queryGroups();
        Map<String, Object> map3 = new HashMap<>();
        map3.put("mod","audioGroup");
        map3.put("groupList",AudioGroupList);
        List<HashMap<String,Object>> HelmetWarnList = userService.queryHelmetWarn();
        Map<String, Object> map4 = new HashMap<>();
        map4.put("mod","helmetWarn");
        map4.put("helmetWarnList",HelmetWarnList);
        List<AreaAdmin> areaAdminList = userService.areaAdminInfo();
        Map<String, Object> map5 = new HashMap<>();
        map5.put("mod","areaAdmin");
        map5.put("areaAdminList",areaAdminList);
        dataMapList.add(map1);
        dataMapList.add(map2);
        dataMapList.add(map3);
        dataMapList.add(map4);
        dataMapList.add(map5);
        try {
            session.getBasicRemote().sendText(JSON.toJSONString(dataMapList));
        } catch (IOException e) {
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/AreaAdmin.java
对比新文件
@@ -0,0 +1,16 @@
package com.thhy.staff.modules.biz.platuser.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class AreaAdmin implements Serializable {
    private String areaId;
    private String areaName;
    private List<NamePhoneDepart> npdList;
}
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorUserVo.java
@@ -3,11 +3,12 @@
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class DoorUserVo implements Serializable {
    private String createTime;
    private Date createTime;
    private String realName;
@@ -18,4 +19,6 @@
    private String jobNum;
    private String id;
    private String photo;
}
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/NamePhoneDepart.java
对比新文件
@@ -0,0 +1,19 @@
package com.thhy.staff.modules.biz.platuser.entity;
import lombok.Data;
import java.io.Serializable;
@Data
public class NamePhoneDepart implements Serializable {
    private String userId;
    private String realName;
    private String phone;
    private String photo;
    private String departName;
}
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/mapper/PlatUserMapper.java
@@ -9,6 +9,7 @@
import org.springframework.stereotype.Component;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
/**
@@ -119,4 +120,14 @@
    int countByFaceId(String faceId);
    void insertSamplePlatUser(PlatUser platUser);
    List<HashMap<String,Object>> queryGroups();
    List<HashMap<String,Object>> queryHelmetWarn();
    List<AreaAdmin> queryAreaInfo();
    List<NamePhoneDepart> queryAdminByArea(String regionWarrantyId);
    List<String> faceArea();
}
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/PlatUserService.java
@@ -6,6 +6,7 @@
import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -55,4 +56,10 @@
    Map<String,Object> groupUserWork(String token);
    void doorlisWithPic(DoorLisPic doorLisPic);
    List<HashMap<String,Object>> queryGroups();
    List<HashMap<String,Object>> queryHelmetWarn();
    List<AreaAdmin> areaAdminInfo();
}
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/impl/PlatUserServiceImpl.java
@@ -25,6 +25,7 @@
import com.thhy.staff.utils.ProcessFlag;
import com.thhy.staff.utils.StaffNoUtils;
import io.netty.channel.ChannelHandlerContext;
import net.bytebuddy.build.Plugin;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,6 +35,7 @@
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.CopyOnWriteArraySet;
@@ -530,13 +532,18 @@
        int userCount = platUserMapper.queryPlatUser(userInfo.getCompanyId());
        Map<String, Object> map = new HashMap<>();
        map.put("mod","facerecord");
        map.put("totalUserCount",userCount);
        map.put("watchUserCount",0);
        map.put("dangerUserCount",0);
        //map.put("totalUserCount",userCount);
        //map.put("watchUserCount",0);
        //map.put("dangerUserCount",0);
        List<String> faceAreas = platUserMapper.faceArea();
        map.put("faceAreas",faceAreas);
        List<DoorUserVo> list = platUserMapper.queryDoorUser();
        map.put("doorUserList",list);
        PlatUserFace platUserFace = platUserMapper.queryFaceUserByJobNum(list.get(0).getJobNum());
        platUserFace.setPassTime(list.get(0).getCreateTime());
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        platUserFace.setPassTime(sdf.format(list.get(0).getCreateTime()));
        platUserFace.setRecordId(list.get(0).getId());
        map.put("firstUserInfo",platUserFace);
        return map;
@@ -593,6 +600,26 @@
        platUserMapper.insertDoorListener(doorLisPic);
    }
    @Override
    public List<HashMap<String, Object>> queryGroups() {
        return platUserMapper.queryGroups();
    }
    @Override
    public List<HashMap<String, Object>> queryHelmetWarn() {
        return platUserMapper.queryHelmetWarn();
    }
    @Override
    public List<AreaAdmin> areaAdminInfo() {
        List<AreaAdmin> areaAdminList = platUserMapper.queryAreaInfo();
        for(AreaAdmin areaAdmin : areaAdminList){
            List<NamePhoneDepart> namePhoneDepartList = platUserMapper.queryAdminByArea(areaAdmin.getAreaId());
            areaAdmin.setNpdList(namePhoneDepartList);
        }
        return areaAdminList;
    }
    public static void main(String[] args) {
        MqContent mqContent = new MqContent("sync_person", "notify");
        String uu = "02d32ee86bec2b11e4b23eb6";
hd/pipe/StaffManage/src/main/resources/mapping/PlatUserMapper.xml
@@ -858,7 +858,8 @@
    <select id="queryDoorUser" resultType="com.thhy.staff.modules.biz.platuser.entity.DoorUserVo">
        select fr.id,fr.create_time,fr.employee_no_string as userId,fd.through_type,spu.real_name as realName,spu.job_num as jobNum,sg.group_name as groupName,1 as staffStatus
        select fr.id,fr.create_time as createTime,fr.employee_no_string as userId,fd.through_type,spu.real_name as realName,spu.job_num as jobNum,
               sg.group_name as groupName,1 as staffStatus,spu.photo
        from t_face_record fr
                 left join t_face_device fd on fd.dev_sno = fr.mac_address
                 left join sys_plat_user spu on spu.user_id = fr.employee_no_string
@@ -874,16 +875,13 @@
    </select>
    <select id="countInDoorUserToday" resultType="int">
        select count(distinct fr.employee_no_string)
        from t_face_record fr
        left join sys_plat_user spu on spu.job_num = fr.employee_no_string
        where fr.notice_type = 5 and fr.verify = 1 and spu.user_id is not null and (fr.mac_address='e0:ca:3c:f0:d9:3a' or fr.mac_address = 'e0:ca:3c:f0:a7:34' or fr.mac_address = 'e0:ca:3c:f0:d9:3b')
        and DATE_FORMAT(sysdate(),'%Y-%m-%d') = DATE_FORMAT(fr.create_time,'%Y-%m-%d')
        select count(employee_no_string) from t_face_record fr
        where fr.verify = 1 and employee_no_string is not null and DATE_FORMAT(create_time,'%Y-%m-%d') = DATE_FORMAT(SYSDATE(),'%Y-%m-%d')
    </select>
    <select id="groupUserWorking" resultType="com.thhy.staff.modules.biz.platuser.entity.GroupWorking">
        select sg.group_id as groupId,sg.group_name as groupName,
               (select count(user_id) from sys_group_user where and is_use = 1 and group_id = sg.group_id) as groupUserCount
               (select count(user_id) from sys_group_user where is_use = 1 and group_id = sg.group_id) as groupUserCount
        from sys_group sg
                 left join sys_com_depart sd on sg.depart_id = sd.depart_id
        where sg.is_use = 1 and sd.company_id = #{companyId}
@@ -894,7 +892,7 @@
        from t_face_record fr
            left join sys_plat_user spu on spu.job_num = fr.employee_no_string
            left join sys_group_user sgu on sgu.user_id = spu.user_id and sgu.is_use = 1
        where sgu.group_id = #{groupId} and fr.notice_type = 5 and fr.verify = 1 and DATE_FORMAT(sysdate(),'%Y-%m-%d') = DATE_FORMAT(fr.create_time,'%Y-%m-%d') and (fr.mac_address='e0:ca:3c:f0:d9:3a' or fr.mac_address = 'e0:ca:3c:f0:a7:34' or fr.mac_address = 'e0:ca:3c:f0:d9:3b')
        where sgu.group_id = #{groupId} and fr.verify = 1 and DATE_FORMAT(sysdate(),'%Y-%m-%d') = DATE_FORMAT(fr.create_time,'%Y-%m-%d')
    </select>
    <select id="queryFaceUserByJobNum" resultType="com.thhy.staff.modules.biz.platuser.entity.PlatUserFace">
@@ -966,4 +964,34 @@
        </trim>
    </insert>
    <select id="queryGroups" resultType="hashmap">
        select id,group_id as groupId,group_name as groupName from t_audio_group
    </select>
    <select id="queryHelmetWarn" resultType="hashmap">
        select hr.device_id as deviceId,hr.sos_type,hr.user_name as userName,'' as position,hr.sm_time
        from t_helmet_report hr
        order by hr.sm_time
        limit 10
    </select>
    <select id="queryAreaInfo" resultType="com.thhy.staff.modules.biz.platuser.entity.AreaAdmin">
        select reg.id as areaId,reg.region as areaName
        from t_region_hazard_inform reg
    </select>
    <select id="queryAdminByArea" resultType="com.thhy.staff.modules.biz.platuser.entity.NamePhoneDepart">
        select rwu.user_id,spu.real_name as realName,spu.phone,spu.photo,sd.depart_name as departName
        from t_region_warranty_user rwu
                 left join sys_plat_user spu on spu.user_id = rwu.user_id
                 left join sys_depart_user sdu on sdu.user_id = spu.user_id
                 left join sys_depart sd on sd.depart_id = sdu.depart_id
        where rwu.region_warranty_id = #{regionWarrantyId}
        order by rwu.user_type
    </select>
    <select id="faceArea" resultType="string">
        select DISTINCT area_name as areaName from t_face_device where area_name is not null
    </select>
</mapper>
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/mixmateria/service/impl/MixMaterialServiceImpl.java
@@ -103,7 +103,7 @@
            ml.setMixMaterialId(mixMaterial.getId());
            infoMapper.insert(ml);
        });
        screenMqUtils.send(ProListenType.MATERIALWEEKANDMONTHS);
        //screenMqUtils.send(ProListenType.MATERIALWEEKANDMONTHS);
    }
    /**