Merge branch 'master' of http://111.30.93.211:10101/r/supipe
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | 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; |
| | |
| | | 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) { |
对比新文件 |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | private String jobNum; |
| | | |
| | | private String id; |
| | | |
| | | private String photo; |
| | | } |
对比新文件 |
| | |
| | | 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; |
| | | } |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | 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(); |
| | | } |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.Serializable; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | Map<String,Object> groupUserWork(String token); |
| | | |
| | | void doorlisWithPic(DoorLisPic doorLisPic); |
| | | |
| | | List<HashMap<String,Object>> queryGroups(); |
| | | |
| | | List<HashMap<String,Object>> queryHelmetWarn(); |
| | | |
| | | List<AreaAdmin> areaAdminInfo(); |
| | | } |
| | |
| | | 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; |
| | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.CopyOnWriteArraySet; |
| | | |
| | |
| | | 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; |
| | |
| | | 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"; |
| | |
| | | |
| | | |
| | | <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 |
| | |
| | | </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} |
| | |
| | | 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"> |
| | |
| | | </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> |
| | |
| | | ml.setMixMaterialId(mixMaterial.getId()); |
| | | infoMapper.insert(ml); |
| | | }); |
| | | screenMqUtils.send(ProListenType.MATERIALWEEKANDMONTHS); |
| | | //screenMqUtils.send(ProListenType.MATERIALWEEKANDMONTHS); |
| | | } |
| | | |
| | | /** |