Commit 8f1d5037 authored by 刘凡's avatar 刘凡

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents 15e78e4a a5f77a0f
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisable;
......@@ -29,4 +30,6 @@ public interface JgEnableDisableMapper extends BaseMapper<JgEnableDisable> {
Map<String, Object> getDetail(@Param("sequenceNbr") Long sequenceNbr);
List<EquipBizCountDto> queryStoppedDeviceStaticListData(DPFilterParamDto dpFilterParamDto);
List<CompanyEquipCountDto> queryForFlowingEquipList();
}
......@@ -151,4 +151,14 @@
c.equ_category,
c.equ_define
</select>
<select id="queryForFlowingEquipList" resultType="com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto">
select a.use_unit_credit_code as companyCode,
group_concat(b.certificate_seq) as records
from tzs_jg_change_registration_name a,
tzs_jg_change_registration_name_eq b
where a.sequence_nbr = b.name_change_registration_id
and a.audit_status in ('三级待受理', '二级待受理', '一级待受理')
GROUP BY a.use_unit_credit_code
</select>
</mapper>
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper;
import lombok.extern.slf4j.Slf4j;
import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* @author Administrator
*/
@Component
@Slf4j
public class JgEnableDisableEquipUsedCheckImpl extends BaseEquipUsedCheckService {
private RedissonClient redissonClient;
private String bizType = "deactivateEnable";
private JgEnableDisableMapper mapper;
public JgEnableDisableEquipUsedCheckImpl(RedissonClient redissonClient, JgEnableDisableMapper mapper) {
this.redissonClient = redissonClient;
this.mapper = mapper;
}
@Override
public RedissonClient getRedisClient() {
return redissonClient;
}
@Override
public String getApplyBizType() {
return bizType;
}
@Override
public void init() {
// 初始化已经完成或者在流程中安装告知的设备数据
List<CompanyEquipCountDto> companyEquipCountDtos = mapper.queryForFlowingEquipList();
companyEquipCountDtos.forEach(c -> {
RBucket<Set<String>> rBucket = redissonClient.getBucket(getFlowingEquipRedisKey(c.getCompanyCode(), bizType));
rBucket.set(Arrays.stream(c.getRecords().split(",")).collect(Collectors.toSet()));
});
}
}
......@@ -1346,8 +1346,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
param.put("STATUS", "已认领");
param.put("EQU_STATE", 1);
param.put("IS_INTO_MANAGEMENT", true);
param.put("USE_SITE_CODE", jsonObject.get("province") + "#" + jsonObject.get("city") + "#" + jsonObject.get("county") + "#" + jsonObject.get("factoryUseSiteStreet"));
param.put("USE_PLACE_CODE", String.valueOf(jsonObject.get("usePlace")));
param.put("USE_PLACE_CODE", jsonObject.get("province") + "#" + jsonObject.get("city") + "#" + jsonObject.get("county") + "#" + jsonObject.get("factoryUseSiteStreet"));
param.put("USE_SITE_CODE", String.valueOf(jsonObject.get("usePlace")));
param.put("ORG_BRANCH_CODE", split[0]);
param.put("ORG_BRANCH_NAME", split[1]);
param.put("EQU_CODE", dataMap.get("equCode"));
......
......@@ -880,7 +880,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
param.put("STATUS", "已认领");
param.put("EQU_STATE", 1);
param.put("IS_INTO_MANAGEMENT", true);
param.put("USE_SITE_CODE", "610000#" + jgVehicleInformation.getVehicleApanage());
param.put("USE_PLACE_CODE", "610000#" + jgVehicleInformation.getVehicleApanage());
param.put("ORG_BRANCH_CODE", jgVehicleInformation.getOrgBranchCode());
param.put("ORG_BRANCH_NAME", jgVehicleInformation.getOrgBranchName());
param.put("EQU_CODE", dataMap.get("equCode"));
......
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