Commit 38f08dea authored by suhuiguang's avatar suhuiguang

1.使用登记、安装告知已经完成的设备不再清楚缓存数据

2.缓存数据存放的为流程的设备record及已经完成流程的设备record
parent 2bd5a004
...@@ -41,4 +41,5 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat ...@@ -41,4 +41,5 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat
List<Map<String, Object>> queryEquipInformation(@Param("sequenceNbr") long sequenceNbr); List<Map<String, Object>> queryEquipInformation(@Param("sequenceNbr") long sequenceNbr);
List<CompanyEquipCountDto> queryForFlowingEquipList(); List<CompanyEquipCountDto> queryForFlowingEquipList();
} }
package com.yeejoin.amos.boot.module.jg.api.mapper; package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto; import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration; import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo; import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
* Mapper 接口 * Mapper 接口
* *
* @author system_generator * @author system_generator
* @date 2023-12-12 * @date 2023-12-12
*/ */
public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> { public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Page<Map<String, Object>> getListPage(@Param("page")Page<Map<String, Object>> page, Page<Map<String, Object>> getListPage(@Param("page") Page<Map<String, Object>> page,
@Param("sort") SortVo sortMap, @Param("sort") SortVo sortMap,
@Param("dto") JgUseRegistrationDto dto , @Param("dto") JgUseRegistrationDto dto,
@Param("roleIds") List<String> roleIds); @Param("roleIds") List<String> roleIds);
Map<String, Object> getDetail(@Param("id")String id); Map<String, Object> getDetail(@Param("id") String id);
Map<String, Object> getSupervisionInfoDetail(@Param("id")String id); Map<String, Object> getSupervisionInfoDetail(@Param("id") String id);
Map<String, Object> getInspectDetail(@Param("id") String id, @Param("permissionInspectTypes") List<String> permissionInspectTypes); Map<String, Object> getInspectDetail(@Param("id") String id, @Param("permissionInspectTypes") List<String> permissionInspectTypes);
Map<String, Object> getUseDetail(@Param("id")String id); Map<String, Object> getUseDetail(@Param("id") String id);
Map<String, Object> getDesDetail(@Param("id")String id); Map<String, Object> getDesDetail(@Param("id") String id);
Page<Map<String, Object>> getEquipListPage(@Param("page")Page<Map<String, Object>> page,@Param("factoryNum") String factoryNum,@Param("equList")String equList,@Param("equCategory")String equCategory); Page<Map<String, Object>> getEquipListPage(@Param("page") Page<Map<String, Object>> page, @Param("factoryNum") String factoryNum, @Param("equList") String equList, @Param("equCategory") String equCategory);
void updatePromoter(@Param("id")Long id); void updatePromoter(@Param("id") Long id);
List<Map<String, Object>> getDetailById(@Param("id") Long id); List<Map<String, Object>> getDetailById(@Param("id") Long id);
String getEquType(@Param("record") String record); String getEquType(@Param("record") String record);
Map<String, Object> getMaintenanceDetail(@Param("id")String id); Map<String, Object> getMaintenanceDetail(@Param("id") String id);
Map<String, Object> getiInstallDetail(@Param("id")String id); Map<String, Object> getiInstallDetail(@Param("id") String id);
Map<String, Object> getUseRegistrationDetail(@Param("id")String id); Map<String, Object> getUseRegistrationDetail(@Param("id") String id);
Page<JSONObject> queryForUnitVesselEquipmentPage(@Param("page") Page<JSONObject> page, @Param("jsonObject") JSONObject jsonObject, @Param("records") Set<String> records); Page<JSONObject> queryForUnitVesselEquipmentPage(@Param("page") Page<JSONObject> page, @Param("jsonObject") JSONObject jsonObject, @Param("records") Set<String> records);
Page<JSONObject> queryForEquipUsedByVehiclePage(@Param("page") Page<JSONObject> page, @Param("jsonObject")JSONObject jsonObject); Page<JSONObject> queryForEquipUsedByVehiclePage(@Param("page") Page<JSONObject> page, @Param("jsonObject") JSONObject jsonObject);
@MapKey("records") @MapKey("records")
List<Map<String, Object>> queryForUnitVesselEquipment(@Param("records")List<String> records); List<Map<String, Object>> queryForUnitVesselEquipment(@Param("records") List<String> records);
Page<JSONObject> queryForUnitPipelineEquipmentPage(@Param("page") Page<JSONObject> page, @Param("jsonObject") JSONObject jsonObject,@Param("records") Set<String> records); Page<JSONObject> queryForUnitPipelineEquipmentPage(@Param("page") Page<JSONObject> page, @Param("jsonObject") JSONObject jsonObject, @Param("records") Set<String> records);
@MapKey("records") @MapKey("records")
List<Map<String, Object>> queryForUnitPipelineEquipment(@Param("records")List<String> records); List<Map<String, Object>> queryForUnitPipelineEquipment(@Param("records") List<String> records);
@MapKey("id") @MapKey("id")
List<Map<String, Object>> selectEquipList(@Param("id")Long id); List<Map<String, Object>> selectEquipList(@Param("id") Long id);
List<CompanyEquipCountDto> queryForFlowingEquipList(); List<CompanyEquipCountDto> queryForFlowingEquipList();
} }
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
tzs_jg_installation_notice_eq b tzs_jg_installation_notice_eq b
where where
a.sequence_nbr = b.equip_transfer_id a.sequence_nbr = b.equip_transfer_id
and (a.notice_status <![CDATA[ <> ]]> '6614' and a.notice_status <![CDATA[ <> ]]> '6615' and a.notice_status <![CDATA[ <> ]]>'6610' ) and (a.notice_status <![CDATA[ <> ]]> '6614' and a.notice_status <![CDATA[ <> ]]> '6615' and a.notice_status <![CDATA[ <> ]]>'6610')
GROUP BY a.install_unit_credit_code GROUP BY a.install_unit_credit_code
</select> </select>
</mapper> </mapper>
...@@ -44,6 +44,7 @@ public class InstallNoticeEquipUsedCheckImpl extends BaseEquipUsedCheckService { ...@@ -44,6 +44,7 @@ public class InstallNoticeEquipUsedCheckImpl extends BaseEquipUsedCheckService {
@Override @Override
public void init() { public void init() {
// 初始化已经完成或者在流程中安装告知的设备数据
List<CompanyEquipCountDto> companyEquipCountDtos = installationNoticeMapper.queryForFlowingEquipList(); List<CompanyEquipCountDto> companyEquipCountDtos = installationNoticeMapper.queryForFlowingEquipList();
companyEquipCountDtos.forEach(c -> { companyEquipCountDtos.forEach(c -> {
RBucket<Set<String>> rBucket = redissonClient.getBucket(getFlowingEquipRedisKey(c.getCompanyCode(), bizType)); RBucket<Set<String>> rBucket = redissonClient.getBucket(getFlowingEquipRedisKey(c.getCompanyCode(), bizType));
......
...@@ -361,6 +361,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -361,6 +361,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private void checkRepeatUsed(String submitType, JgInstallationNotice jgInstallationNotice) { private void checkRepeatUsed(String submitType, JgInstallationNotice jgInstallationNotice) {
if (SUBMIT_TYPE_FLOW.equals(submitType)) { if (SUBMIT_TYPE_FLOW.equals(submitType)) {
// 流程中校验
LambdaQueryWrapper<JgInstallationNoticeEq> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JgInstallationNoticeEq> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgInstallationNoticeEq::getEquipTransferId, jgInstallationNotice.getSequenceNbr()); queryWrapper.eq(JgInstallationNoticeEq::getEquipTransferId, jgInstallationNotice.getSequenceNbr());
JgInstallationNoticeEq jgRelationEquip = jgInstallationNoticeEqMapper.selectOne(queryWrapper); JgInstallationNoticeEq jgRelationEquip = jgInstallationNoticeEqMapper.selectOne(queryWrapper);
...@@ -1007,7 +1008,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -1007,7 +1008,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
BeanUtils.copyProperties(jgInstallationNotice, taskMessageDto); BeanUtils.copyProperties(jgInstallationNotice, taskMessageDto);
taskMap.put("model", taskMessageDto); taskMap.put("model", taskMessageDto);
taskV2Model = commonService.updateTaskModel(taskMap); taskV2Model = commonService.updateTaskModel(taskMap);
this.delRepeatUseEquipData(jgInstallationNotice);
} else { } else {
jgInstallationNotice.setNextExecuteIds(workflowResultDto.getNextExecutorRoleIds()); jgInstallationNotice.setNextExecuteIds(workflowResultDto.getNextExecutorRoleIds());
jgInstallationNotice.setNextExecuteUserIds(workflowResultDto.getNextExecutorUserIds()); jgInstallationNotice.setNextExecuteUserIds(workflowResultDto.getNextExecutorUserIds());
......
...@@ -144,7 +144,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -144,7 +144,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
@Autowired @Autowired
private JgUseRegistrationMapper jgUseRegistrationMapper; private JgUseRegistrationMapper jgUseRegistrationMapper;
private final List<String> NOT_FLOWING_STATE = Arrays.asList("使用单位待提交", "一级受理已驳回", "使用单位已撤回", "已完成"); private final List<String> NOT_FLOWING_STATE = Arrays.asList("使用单位待提交", "一级受理已驳回", "使用单位已撤回");
/** /**
* @param auditPassDate 通过时间 * @param auditPassDate 通过时间
...@@ -521,6 +521,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -521,6 +521,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private void checkForRepeatUsedEquip(JSONObject map, ReginParams reginParams) { private void checkForRepeatUsedEquip(JSONObject map, ReginParams reginParams) {
if (!ObjectUtils.isEmpty(map.get("submit"))) { if (!ObjectUtils.isEmpty(map.get("submit"))) {
// 流程中或已完成
EquipUsedCheckStrategyContext.getUsedStrategy("useRegister").equipRepeatUsedCheck(map.get("equipId").toString(), reginParams.getCompany().getCompanyCode()); EquipUsedCheckStrategyContext.getUsedStrategy("useRegister").equipRepeatUsedCheck(map.get("equipId").toString(), reginParams.getCompany().getCompanyCode());
} }
} }
...@@ -528,6 +529,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -528,6 +529,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private void checkForRepeatUsedEquip(JSONObject map, List<Map<String, Object>> equList, ReginParams reginParams) { private void checkForRepeatUsedEquip(JSONObject map, List<Map<String, Object>> equList, ReginParams reginParams) {
if (!ObjectUtils.isEmpty(map.get("submit"))) { if (!ObjectUtils.isEmpty(map.get("submit"))) {
equList.forEach(equip -> { equList.forEach(equip -> {
// 流程中或已完成
EquipUsedCheckStrategyContext.getUsedStrategy("useRegister").equipRepeatUsedCheck(equip.get("record").toString(), reginParams.getCompany().getCompanyCode()); EquipUsedCheckStrategyContext.getUsedStrategy("useRegister").equipRepeatUsedCheck(equip.get("record").toString(), reginParams.getCompany().getCompanyCode());
}); });
} }
......
...@@ -44,6 +44,7 @@ public class UseRegisterEquipUsedCheckImpl extends BaseEquipUsedCheckService { ...@@ -44,6 +44,7 @@ public class UseRegisterEquipUsedCheckImpl extends BaseEquipUsedCheckService {
@Override @Override
public void init() { public void init() {
// 初始化已经完成或者在流程中使用登记的设备数据
List<CompanyEquipCountDto> companyEquipCountDtos = useRegistrationMapper.queryForFlowingEquipList(); List<CompanyEquipCountDto> companyEquipCountDtos = useRegistrationMapper.queryForFlowingEquipList();
companyEquipCountDtos.forEach(c -> { companyEquipCountDtos.forEach(c -> {
RBucket<Set<String>> rBucket = redissonClient.getBucket(this.getFlowingEquipRedisKey(c.getCompanyCode(), bizType)); RBucket<Set<String>> rBucket = redissonClient.getBucket(this.getFlowingEquipRedisKey(c.getCompanyCode(), bizType));
......
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