Commit 38f08dea authored by suhuiguang's avatar suhuiguang

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

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