Commit 567fa193 authored by suhuiguang's avatar suhuiguang

1.检验检测8大类技术参数整理

2.消息生成使用单位人bug修复
parent 22102dc7
...@@ -30,4 +30,11 @@ public interface JyjcBaseMapper { ...@@ -30,4 +30,11 @@ public interface JyjcBaseMapper {
void updateBusinessData(String tableName, String assignee, String transferToUserIds, String instanceId, String nextTaskId,String key); void updateBusinessData(String tableName, String assignee, String transferToUserIds, String instanceId, String nextTaskId,String key);
List<TzsUserInfoDto> selectParentOrgUsers(@Param("parentOrgCodeList") Set<String> parentOrgCodeList); List<TzsUserInfoDto> selectParentOrgUsers(@Param("parentOrgCodeList") Set<String> parentOrgCodeList);
/**
* 按照公司编码查询公司下的人
* @param companyCodes
* @return List<TzsUserInfoDto>
*/
List<TzsUserInfoDto> selectUserByCompanyCodes(@Param("companyCodes") List<String> companyCodes);
} }
...@@ -52,6 +52,22 @@ ...@@ -52,6 +52,22 @@
</foreach> </foreach>
GROUP BY c.org_code GROUP BY c.org_code
</select> </select>
<select id="selectUserByCompanyCodes" resultType="com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto">
SELECT
group_concat(u.user_id) as amos_user_id,
c.company_code as unitCode
FROM
"privilege_user_org_role" u,
"privilege_company" c
WHERE
u.company_seq = c.sequence_nbr
and
c.company_code in
<foreach collection="companyCodes" item="companyCode" open="(" close=")" separator=",">
#{companyCode}
</foreach>
GROUP BY c.company_code
</select>
</mapper> </mapper>
...@@ -208,36 +208,36 @@ public class InspectionApplicationPushEventListener implements ApplicationListen ...@@ -208,36 +208,36 @@ public class InspectionApplicationPushEventListener implements ApplicationListen
EquipCategoryEnum productType = EquipCategoryEnum.of(Integer.parseInt(equList)); EquipCategoryEnum productType = EquipCategoryEnum.of(Integer.parseInt(equList));
Map<String, Object> echParamMap = new HashMap<>(); Map<String, Object> echParamMap = new HashMap<>();
switch (Objects.requireNonNull(productType)) { switch (Objects.requireNonNull(productType)) {
// 锅炉 - 监管未调整
case IDX_BIZ_JG_TECH_PARAMS_BOILER: case IDX_BIZ_JG_TECH_PARAMS_BOILER:
// 压力容器 - 监管未调整 // 锅炉-已确认
echParamMap = BeanUtil.beanToMap(equipTechParamBoilerMapper.queryTechParamInUse(record)); echParamMap = BeanUtil.beanToMap(equipTechParamBoilerMapper.queryTechParamInUse(record));
break; break;
case IDX_BIZ_JG_TECH_PARAMS_VESSEL: case IDX_BIZ_JG_TECH_PARAMS_VESSEL:
// 电梯 // 压力容器-待核对
echParamMap = BeanUtil.beanToMap(equipTechParamVesselMapper.queryTechParamInUse(record)); echParamMap = BeanUtil.beanToMap(equipTechParamVesselMapper.queryTechParamInUse(record));
break; break;
case IDX_BIZ_JG_TECH_PARAMS_ELEVATOR: case IDX_BIZ_JG_TECH_PARAMS_ELEVATOR:
// 起重机械 // 电梯-已确认
echParamMap = BeanUtil.beanToMap(equipTechParamElevatorMapper.queryTechParamInUse(record)); echParamMap = BeanUtil.beanToMap(equipTechParamElevatorMapper.queryTechParamInUse(record));
break; break;
case IDX_BIZ_JG_TECH_PARAMS_LIFTING: case IDX_BIZ_JG_TECH_PARAMS_LIFTING:
// 场(厂)内专用机动车辆 // 起重机械-已确认
echParamMap = BeanUtil.beanToMap(equipTechParamLiftingMapper.queryTechParamInUse(record)); echParamMap = BeanUtil.beanToMap(equipTechParamLiftingMapper.queryTechParamInUse(record));
break; break;
case IDX_BIZ_JG_TECH_PARAMS_VEHICLE: case IDX_BIZ_JG_TECH_PARAMS_VEHICLE:
// 大型游乐设施 // 场(厂)内专用机动车辆-已确认
echParamMap = BeanUtil.beanToMap(equipTechParamVehicleMapper.queryTechParamInUse(record)); echParamMap = BeanUtil.beanToMap(equipTechParamVehicleMapper.queryTechParamInUse(record));
break; break;
case IDX_BIZ_JG_TECH_PARAMS_RIDES: case IDX_BIZ_JG_TECH_PARAMS_RIDES:
// 压力管道 - 监管未调整 // 大型游乐设施-已确认
echParamMap = BeanUtil.beanToMap(equipTechParamRidesMapper.queryTechParamInUse(record)); echParamMap = BeanUtil.beanToMap(equipTechParamRidesMapper.queryTechParamInUse(record));
break; break;
case IDX_BIZ_JG_TECH_PARAMS_PIPELINE: case IDX_BIZ_JG_TECH_PARAMS_PIPELINE:
// 客运索道 // 压力管道-已确认
echParamMap = BeanUtil.beanToMap(equipTechParamPipelineMapper.queryTechParamInUse(record)); echParamMap = BeanUtil.beanToMap(equipTechParamPipelineMapper.queryTechParamInUse(record));
break; break;
case IDX_BIZ_JG_TECH_PARAMS_ROPEWAY: case IDX_BIZ_JG_TECH_PARAMS_ROPEWAY:
// 客运索道-已确认
echParamMap = BeanUtil.beanToMap(equipTechParamRopewayMapper.queryTechParamInUse(record)); echParamMap = BeanUtil.beanToMap(equipTechParamRopewayMapper.queryTechParamInUse(record));
break; break;
default: default:
......
...@@ -2,13 +2,10 @@ package com.yeejoin.amos.boot.module.jyjc.biz.job; ...@@ -2,13 +2,10 @@ package com.yeejoin.amos.boot.module.jyjc.biz.job;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper; import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper;
import com.yeejoin.amos.boot.module.jyjc.api.model.NeedTipEquipInfo; import com.yeejoin.amos.boot.module.jyjc.api.model.NeedTipEquipInfo;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto; import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.UseInfoModel; import com.yeejoin.amos.boot.module.ymt.api.dto.UseInfoModel;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper;
...@@ -20,7 +17,6 @@ import net.javacrumbs.shedlock.spring.annotation.SchedulerLock; ...@@ -20,7 +17,6 @@ import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.*; import java.util.*;
...@@ -96,12 +92,14 @@ public class InspectionExpireRemindJob { ...@@ -96,12 +92,14 @@ public class InspectionExpireRemindJob {
// 使用单位 // 使用单位
List<String> allUnitCodes = needTipEquipList.stream().map(NeedTipEquipInfo::getUseUnitCreditCode).distinct().collect(Collectors.toList()); List<String> allUnitCodes = needTipEquipList.stream().map(NeedTipEquipInfo::getUseUnitCreditCode).distinct().collect(Collectors.toList());
// 查询使用单位下的人-数据库-批量查询 // 查询使用单位下的人-数据库-批量查询
List<TzsUserInfo> useUnitUserList = this.getUseUnitUserList(allUnitCodes); List<TzsUserInfoDto> useUnitUserList = this.getUseUnitUserList(allUnitCodes);
// 查询管辖单位下的人-数据库-批量查询 // 查询管辖单位下的人-数据库-批量查询
List<TzsUserInfoDto> superviseUnitUserList = this.getSuperviseUnitUserList(needTipEquipList); List<TzsUserInfoDto> superviseUnitUserList = this.getSuperviseUnitUserList(needTipEquipList);
// 以设备为维度,把 需要发送消息的人进行合并 // 以设备为维度,把 需要发送消息的人进行合并
needTipEquipList.forEach(e -> { needTipEquipList.forEach(e -> {
e.setReceiveUsers(useUnitUserList.stream().filter(u -> e.getUseUnitCreditCode().equals(u.getUnitCode())).map(TzsUserInfo::getAmosUserId).collect(Collectors.toSet())); // 本使用单位下的人
e.setReceiveUsers(useUnitUserList.stream().filter(u -> e.getUseUnitCreditCode().equals(u.getUnitCode())).map(TzsUserInfoDto::getAmosUserId).collect(Collectors.toSet()));
// 父级的人(所、区县、地市、省)
e.getReceiveUsers().addAll(superviseUnitUserList.stream().filter(u -> e.getParentOrgBranchCode().contains(u.getOrgCode())).map(TzsUserInfoDto::getAmosUserId).collect(Collectors.toSet())); e.getReceiveUsers().addAll(superviseUnitUserList.stream().filter(u -> e.getParentOrgBranchCode().contains(u.getOrgCode())).map(TzsUserInfoDto::getAmosUserId).collect(Collectors.toSet()));
}); });
// 人员去重,字符串可能为:元素1:8551496,8551496,8551496,元素2:8551496,8551497,需要转为8551496、8551497 // 人员去重,字符串可能为:元素1:8551496,8551496,8551496,元素2:8551496,8551497,需要转为8551496、8551497
...@@ -120,13 +118,8 @@ public class InspectionExpireRemindJob { ...@@ -120,13 +118,8 @@ public class InspectionExpireRemindJob {
return jyjcBaseMapper.selectParentOrgUsers(allParentOrgCodes); return jyjcBaseMapper.selectParentOrgUsers(allParentOrgCodes);
} }
private List<TzsUserInfo> getUseUnitUserList(List<String> allUnitCodes) { private List<TzsUserInfoDto> getUseUnitUserList(List<String> allUnitCodes) {
LambdaQueryWrapper<TzsUserInfo> queryWrapper = new LambdaQueryWrapper<>(); return jyjcBaseMapper.selectUserByCompanyCodes(allUnitCodes);
queryWrapper.select(TzsUserInfo::getAmosUserId, TzsUserInfo::getUnitCode);
queryWrapper.in(TzsUserInfo::getUnitCode, allUnitCodes);
queryWrapper.eq(BaseEntity::getIsDelete, false);
queryWrapper.isNotNull(TzsUserInfo::getAmosUserId);
return tzsUserInfoMapper.selectList(queryWrapper);
} }
private List<NeedTipEquipInfo> buildTipEquipInfoList(List<UseInfoModel> needTipEquipList) { private List<NeedTipEquipInfo> buildTipEquipInfoList(List<UseInfoModel> needTipEquipList) {
......
package com.yeejoin.amos.boot.module.jyjc.biz.util; package com.yeejoin.amos.boot.module.jyjc.biz.util;
import java.util.Arrays;
import java.util.List;
/** /**
* @author Administrator * @author Administrator
*/ */
...@@ -8,5 +11,5 @@ public class JyjcConstant { ...@@ -8,5 +11,5 @@ public class JyjcConstant {
/** /**
* 技术参数json类型字段 * 技术参数json类型字段
*/ */
public static final String TECH_PARAM_JSON_FIELDS = "safetyAccessoriesAndRelatedDevices,gasCylinderAccessories,pipeInfo"; public static final List<String> TECH_PARAM_JSON_FIELDS = Arrays.asList("safetyAccessoriesAndRelatedDevices", "gasCylinderAccessories", "pipeInfo");
} }
...@@ -1044,5 +1044,17 @@ public class EquipTechParamLifting extends AbstractEquipBaseEntity { ...@@ -1044,5 +1044,17 @@ public class EquipTechParamLifting extends AbstractEquipBaseEntity {
@TableField(value = "\"MAIN_PART\"") @TableField(value = "\"MAIN_PART\"")
private String mainPart; private String mainPart;
/**
* 整机防爆标志
*/
@TableField("\"EXPLOSIONPROOF_SIGN_COMPLETE\"")
private String explosionproofSignComplete;
/**
* 燃爆物质
*/
@TableField("\"EXPLOSIVE_SUBSTANCE\"")
private String explosiveSubstance;
} }
...@@ -418,7 +418,7 @@ public class EquipTechParamVessel extends AbstractEquipBaseEntity { ...@@ -418,7 +418,7 @@ public class EquipTechParamVessel extends AbstractEquipBaseEntity {
@TableField(value = "\"CONTAINER\"") @TableField(value = "\"CONTAINER\"")
private String container; private String container;
/** /**
* * 罐车编号 * * 罐车编号/车牌号
*/ */
@TableField(value = "\"CAR_NUM\"") @TableField(value = "\"CAR_NUM\"")
......
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamLifting; import com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamLifting;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsLifting;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface EquipTechParamLiftingMapper extends BaseMapper<EquipTechParamLifting> { public interface EquipTechParamLiftingMapper extends BaseMapper<EquipTechParamLifting> {
...@@ -9,8 +10,9 @@ public interface EquipTechParamLiftingMapper extends BaseMapper<EquipTechParamLi ...@@ -9,8 +10,9 @@ public interface EquipTechParamLiftingMapper extends BaseMapper<EquipTechParamLi
/** /**
* 在用的最新需求整理的技术参数 * 在用的最新需求整理的技术参数
*
* @param record 设备唯一标识 * @param record 设备唯一标识
* @return EquipTechParamLifting * @return EquipTechParamLifting
*/ */
EquipTechParamLifting queryTechParamInUse(@Param("record") String record); IdxBizJgTechParamsLifting queryTechParamInUse(@Param("record") String record);
} }
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamLiftingMapper"> <mapper namespace="com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamLiftingMapper">
<select id="queryTechParamInUse" <select id="queryTechParamInUse"
resultType="com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamLifting"> resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgTechParamsLifting">
SELECT SELECT
"EXPLOSIONPROOF_GRADE", "EXPLOSIONPROOF_GRADE",
"EXPLOSIVE_SUBSTANCE", "EXPLOSIVE_SUBSTANCE",
"EXPLOSIONPROOF_SIGN_COMPLETE", "EXPLOSIONPROOF_SIGN_COMPLETE",
"CHECK_FINISHED_HEIGHT", "CHECK_FINISHED_HEIGHT",
"HEIGHT_FREE_END",
"RATED_LIFTING_SPEED", "RATED_LIFTING_SPEED",
"RATED_LOAD_CAPACITY", "RATED_LOAD_CAPACITY",
"WORK_STROKE_CAGE", "WORK_STROKE_CAGE",
...@@ -28,7 +27,6 @@ ...@@ -28,7 +27,6 @@
"RATED_LIFT_SPEED", "RATED_LIFT_SPEED",
"RATED_TRAVERSE_SPEED", "RATED_TRAVERSE_SPEED",
"BICYCLE_MAX_EXIT_TIME", "BICYCLE_MAX_EXIT_TIME",
"STORAGE_CAPACITY",
"CANTILEVER_LENGTH", "CANTILEVER_LENGTH",
"DERRICKING_SPEED", "DERRICKING_SPEED",
"BICYCLE_MAX_COME_TIME", "BICYCLE_MAX_COME_TIME",
......
...@@ -6,19 +6,20 @@ ...@@ -6,19 +6,20 @@
SELECT SELECT
"DEVICE_NAME", "DEVICE_NAME",
"PIPELINE_CLASS", "PIPELINE_CLASS",
"PIPE_NAME", "STARTE_POSITION",
"PIPELINE_NUMBER", "END_POSITION",
"DEVICE_LEVEL",
"DESIGN_STANDARD",
"PIPE_DRAW_NUMBER",
"NOMINAL_DIAMETER", "NOMINAL_DIAMETER",
"WALL_THICKNESS", "WALL_THICKNESS",
"PIPE_LENGTH", "PIPE_LENGTH",
"STARTE_POSITION",
"PRESSURE", "PRESSURE",
"TEMPERATURE", "TEMPERATURE",
"MEDIUM", "MEDIUM",
"REMARKS" "REMARKS",
"WORK_PRESSURE",
"WORK_TEMPERATURE",
"WORK_MEDIUM",
"WORK_REMARKS",
"PIPE_INFO"
FROM FROM
idx_biz_jg_tech_params_pipeline idx_biz_jg_tech_params_pipeline
WHERE WHERE
......
...@@ -10,16 +10,13 @@ ...@@ -10,16 +10,13 @@
"MAIN_MOTOR_MODEL", "MAIN_MOTOR_MODEL",
"MAIN_MOTOR_POWER", "MAIN_MOTOR_POWER",
"ALTITUDE_DIFFERENCE", "ALTITUDE_DIFFERENCE",
"OIL_PRESSURE_HEAVY_HAMMER",
"OIL_PRESSURE_OIL_PRESSURE",
"FREIGHT_VOLUME", "FREIGHT_VOLUME",
"CARRIER_LINE", "CARRIER_LINE",
"SPEED", "SPEED",
"BEARING_CABLE", "BEARING_CABLE",
"CABLE_PITCH", "CABLE_PITCH",
"NUMBER_AND_TYPE_OF_VEHICLES", "OIL_PRESSURE_HEAVY_HAMMER",
"TRACTION_ROPE", "NUMBER_AND_TYPE_OF_VEHICLES"
"BALANCE_CABLE"
FROM FROM
idx_biz_jg_tech_params_ropeway idx_biz_jg_tech_params_ropeway
WHERE WHERE
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<select id="queryTechParamInUse" <select id="queryTechParamInUse"
resultType="com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamVessel"> resultType="com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamVessel">
SELECT SELECT
vin,
rated_quality, rated_quality,
ambient_temperature, ambient_temperature,
model_number, model_number,
...@@ -84,7 +85,9 @@ ...@@ -84,7 +85,9 @@
chamber_pressure, chamber_pressure,
temperature, temperature,
pressure_medium, pressure_medium,
per_capita_cabin_capacity per_capita_cabin_capacity,
gas_cylinder_accessories,
gas_cylinder
FROM idx_biz_jg_tech_params_vessel FROM idx_biz_jg_tech_params_vessel
where record = #{record} where record = #{record}
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment