Commit 5ed36c2a authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 58dc935f 449ccdfa
......@@ -118,4 +118,10 @@ public class JgUseRegistrationManageDto extends BaseDto {
@ApiModelProperty(value = "变更原因")
private String changeReason;
@ApiModelProperty("管辖机构")
private String superviseOrgCode;
@ApiModelProperty("管辖机构名称")
private String superviseOrgName;
}
......@@ -8,15 +8,15 @@ spring.datasource.dynamic.primary=openapi
#spring.datasource.username=admin
#spring.datasource.password=Yeejoin@2023
#spring.datasource.driver-class-name=cn.com.vastbase.Driver
#ds tzs
#ds cyl
spring.datasource.dynamic.datasource.openapi.url=jdbc:vastbase://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_openapi_cyl&allowMultiQueries=true
spring.datasource.dynamic.datasource.openapi.username=admin
spring.datasource.dynamic.datasource.openapi.password=Yeejoin@2023
spring.datasource.dynamic.datasource.openapi.driver-class-name=cn.com.vastbase.Driver
#ds cyl
spring.datasource.dynamic.datasource.tzs.url=jdbc:vastbase://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
#ds tzs
spring.datasource.dynamic.datasource.tzs.url=jdbc:vastbase://172.16.10.254:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.dynamic.datasource.tzs.username=admin
spring.datasource.dynamic.datasource.tzs.password=Yeejoin@2023
spring.datasource.dynamic.datasource.tzs.password=Yeejoin@2024
spring.datasource.dynamic.datasource.tzs.driver-class-name=cn.com.vastbase.Driver
......@@ -41,16 +41,18 @@ spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
localhost=${spring.cloud.client.ip-address}
#注册中心地址
eureka.client.service-url.defaultZone =http://admin:a1234560@172.16.10.243:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.7:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.health-check-url=http://${localhost}:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.7:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.7:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address = 172.16.3.7
eureka.instance.status-page-url=http://${localhost}:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://${localhost}:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address = ${localhost}
##emqx
emqx.clean-session=true
......
......@@ -14,17 +14,12 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.elevator.api.common.BizCommonConstant;
import com.yeejoin.amos.boot.module.elevator.api.common.CommonException;
import com.yeejoin.amos.boot.module.elevator.api.dto.BaseUnitLicenceDto;
import com.yeejoin.amos.boot.module.elevator.api.entity.BaseUnitLicence;
import com.yeejoin.amos.boot.module.elevator.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.elevator.api.enums.CompanyLevelEnum;
import com.yeejoin.amos.boot.module.elevator.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.BaseUnitLicenceServiceImpl;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.EquipmentCategoryServiceImpl;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.StartPlatformTokenService;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.TzBaseEnterpriseInfoServiceImpl;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.TzsAuthServiceImpl;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.*;
import com.yeejoin.amos.boot.module.elevator.biz.utils.RedisUtil;
import com.yeejoin.amos.boot.module.elevator.flc.api.dto.RegUnitIcDto;
import com.yeejoin.amos.boot.module.elevator.flc.api.dto.RegUnitInfoDto;
......@@ -489,7 +484,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
.flatMap(node -> Stream.concat(
node.get(conditionName).equals(condition) ? Stream.of(node) : Stream.empty(),
node.get(childName) != null ? findNodesByCondition((List<LinkedHashMap>) node.get(childName),
conditionName, condition, condition).stream() :
conditionName, condition, childName).stream() :
Stream.empty()
))
.collect(Collectors.toList());
......
......@@ -74,6 +74,8 @@ tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.wechat.url=https://api.weixin.qq.com
tzs.wechat.appid=wx79aca5bb1cb4af92
tzs.wechat.secret=f3a12323ba731d282c3d4698c27c3e97
#tzs.wechat.appid=wxc104d601596de9d5
#tzs.wechat.secret=313a2b6dadc451783f7b4779ac56560f
##wechatToken
tzs.wechat.token=yeejoin_2021
......
......@@ -488,7 +488,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
.flatMap(node -> Stream.concat(
node.get(conditionName).equals(condition) ? Stream.of(node) : Stream.empty(),
node.get(childName) != null ? findNodesByCondition((List<LinkedHashMap>) node.get(childName),
conditionName, condition, condition).stream() :
conditionName, condition, childName).stream() :
Stream.empty()
))
.collect(Collectors.toList());
......
......@@ -489,7 +489,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
.flatMap(node -> Stream.concat(
node.get(conditionName).equals(condition) ? Stream.of(node) : Stream.empty(),
node.get(childName) != null ? findNodesByCondition((List<LinkedHashMap>) node.get(childName),
conditionName, condition, condition).stream() :
conditionName, condition, childName).stream() :
Stream.empty()
))
.collect(Collectors.toList());
......
......@@ -14,17 +14,12 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.jczs.api.common.BizCommonConstant;
import com.yeejoin.amos.boot.module.jczs.api.common.CommonException;
import com.yeejoin.amos.boot.module.jczs.api.dto.BaseUnitLicenceDto;
import com.yeejoin.amos.boot.module.jczs.api.entity.BaseUnitLicence;
import com.yeejoin.amos.boot.module.jczs.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.jczs.api.enums.CompanyLevelEnum;
import com.yeejoin.amos.boot.module.jczs.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.jczs.biz.service.impl.BaseUnitLicenceServiceImpl;
import com.yeejoin.amos.boot.module.jczs.biz.service.impl.EquipmentCategoryServiceImpl;
import com.yeejoin.amos.boot.module.jczs.biz.service.impl.StartPlatformTokenService;
import com.yeejoin.amos.boot.module.jczs.biz.service.impl.TzBaseEnterpriseInfoServiceImpl;
import com.yeejoin.amos.boot.module.jczs.biz.service.impl.TzsAuthServiceImpl;
import com.yeejoin.amos.boot.module.jczs.biz.service.impl.*;
import com.yeejoin.amos.boot.module.jczs.biz.utils.RedisUtil;
import com.yeejoin.amos.boot.module.jczs.flc.api.dto.RegUnitIcDto;
import com.yeejoin.amos.boot.module.jczs.flc.api.dto.RegUnitInfoDto;
......@@ -489,7 +484,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
.flatMap(node -> Stream.concat(
node.get(conditionName).equals(condition) ? Stream.of(node) : Stream.empty(),
node.get(childName) != null ? findNodesByCondition((List<LinkedHashMap>) node.get(childName),
conditionName, condition, condition).stream() :
conditionName, condition, childName).stream() :
Stream.empty()
))
.collect(Collectors.toList());
......
localhost=${spring.cloud.client.ip-address}
#DB properties:
spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.url=jdbc:vastbase://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://172.16.10.210:10001/eureka/
eureka.client.service-url.defaultZone=http://172.16.10.243:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.health-check-url=http://${localhost}:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address=172.16.3.34
eureka.instance.status-page-url=http://${localhost}:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://${localhost}:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address=${localhost}
## ES properties:
elasticsearch.username=elastic
elasticsearch.password=a123456
spring.elasticsearch.rest.uris=http://172.16.10.210:9200
spring.elasticsearch.rest.uris=http://172.16.10.243:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.10.210
spring.redis.port=16379
spring.redis.host=172.16.10.243
spring.redis.port=6379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
......@@ -30,7 +31,7 @@ spring.redis.lettuce.pool.min-idle=0
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883
emqx.broker=tcp://172.16.10.243:1883
emqx.client-user-name=super
emqx.client-password=123456
emqx.keepAliveInterval=1000
......@@ -69,20 +70,20 @@ tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
tzs.wechat.test.userId=3413513
##new properties
org.filter.group.seq=1564150103147573249
fileserver.domain=http://172.16.10.210:19000/
fileserver.domain=http://172.16.10.243:19000/
log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties:
rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs
rule.definition.local-ip=172.16.10.210
rule.definition.local-ip=172.16.10.243
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ?
# ??????????
minio.url.path=http://172.16.10.210:9000/
minio.url.path=http://172.16.10.243:9000/
## ɼǰ׺
regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560
......
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -130,4 +131,10 @@ public class JgUseRegistrationManageDto extends BaseDto {
@ApiModelProperty("是否在流程中,值:true / false ")
private String certInBusinessFlag;
@ApiModelProperty("管辖机构")
private String superviseOrgCode;
@ApiModelProperty("管辖机构名称")
private String superviseOrgName;
}
......@@ -222,4 +222,16 @@ public class JgUseRegistrationManage extends BaseEntity {
@TableField("reissue_date")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date reissueDate;
/**
* 管辖机构
*/
@TableField
private String superviseOrgCode;
/**
* 管辖机构名称
*/
@TableField
private String superviseOrgName;
}
......@@ -45,6 +45,8 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
String getOrgCodeByCompanyCode(String companyCode);
String getCompanyNameByOrgCode(String orgCode);
String selectBusinessData(String tableName, String instanceId);
String selectPromoterData(String tableName, String instanceId);
......
......@@ -88,7 +88,11 @@
<select id="getOrgCodeByCompanyCode" resultType="java.lang.String">
select org_code from privilege_company where company_code = #{companyCode} limit 1
</select>
</select>
<select id="getCompanyNameByOrgCode" resultType="java.lang.String">
select company_name from privilege_company where org_code = #{orgCode} limit 1
</select>
<select id="selectBusinessData" resultType="java.lang.String">
select
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.map.MapBuilder;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -14,7 +15,6 @@ import com.yeejoin.amos.boot.module.jg.api.dto.EquipmentClassifyDto;
import com.yeejoin.amos.boot.module.jg.api.dto.UseFlagParamDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgCertificateReplenishService;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
......@@ -67,6 +67,11 @@ public class CommonController extends BaseController {
private final IJgCertificateReplenishService iJgCertificateReplenishService;
private final CodeUtil codeUtil;
/**
* 监管机构
*/
public static final String COMPANY_TYPE_SUPERVISION_NAME = "监管机构";
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/currentLoginInfo")
@ApiOperation(httpMethod = "GET", value = "当前登录人信息", notes = "当前登录人信息")
......@@ -143,6 +148,30 @@ public class CommonController extends BaseController {
return ResponseHelper.buildResponse(commonService.getUnitListByType(type, business));
}
/**
* 需求 【3197】
* 根据当前登录人获取使用单位列表(用作设备列表查询)
* 当前登录人:监管 -> 获取所有使用单位
* 其他 -> 当前登录人所在单位
* @return unitLists
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getUseUnitListByCurrentLoginUser")
@ApiOperation(httpMethod = "GET", value = "根据当前登录人获取使用单位列表(用作设备列表查询)", notes = "根据当前登录人获取使用单位列表(用作设备列表查询)")
public ResponseModel<List<Map<String, Object>>> getUseUnitListByCurrentLoginUser() {
String companyType = getSelectedOrgInfo().getCompany().getCompanyType();
List<Map<String, Object>> result = new ArrayList<>();
if (COMPANY_TYPE_SUPERVISION_NAME.equals(companyType)) {
result = commonService.getUnitListByType("use", null);
}else {
result.add(MapBuilder.<String, Object>create()
.put("useCode", getSelectedOrgInfo().getCompany().getCompanyCode())
.put("useUnit", getSelectedOrgInfo().getCompany().getCompanyName())
.build());
}
return ResponseHelper.buildResponse(result);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/getMessage")
......
......@@ -2038,6 +2038,8 @@ public class DataDockServiceImpl {
.manageType("unit")
.isScrap("0")
.version(1)
.superviseOrgCode(paramsDto.getOrgBranchCode())
.superviseOrgName(paramsDto.getOrgBranchName())
.build();
jgUseRegistrationManageService.save(registrationManage);
return registrationManage;
......
......@@ -41,6 +41,7 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
......@@ -81,6 +82,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
public static final String ORG_BRANCH_CODE = "orgBranchCode";
// 设备基本信息表单id
private static final String EQUIP_INFO_FORM_ID = "equipInfo";
public static final String USE_UNIT_CREDIT_CODE = "useUnitCreditCode";
@Resource
private IdxBizJgUseInfoServiceImpl useInfoService;
@Resource
......@@ -251,7 +253,7 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
street= street.split("_")[0];
}
//获取街道
String useUnitCreditCode = params.get("useUnitCreditCode");
String useUnitCreditCode = params.get(USE_UNIT_CREDIT_CODE);
if(!StringUtils.isEmpty(useUnitCreditCode) && useUnitCreditCode.contains("_")){
useUnitCreditCode= useUnitCreditCode.split("_")[0];
}
......
......@@ -2638,7 +2638,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if(companyLevel.equals(BaseController.COMPANY_TYPE_SUPERVISION)) { // 监管 右模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(map.getString("ORG_BRANCH_CODE")) + "*"));
} else { // 企业 等于查询
boolMust.must(QueryBuilders.termQuery("ORG_BRANCH_CODE.keyword", map.getString("ORG_BRANCH_CODE")));
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(map.getString("ORG_BRANCH_CODE")) + "*"));
}
}
builder.query(boolMust);
......@@ -4006,13 +4006,15 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
jgUseRegistrationManage.setUseUnitName(company.getCompanyName());
jgUseRegistrationManage.setReceiveOrgName(equipInfoDto.getReceiveOrgName());
jgUseRegistrationManage.setReceiveCompanyCode(equipInfoDto.getReceiveOrgCode());
jgUseRegistrationManage.setSuperviseOrgName(orgBranchName);
jgUseRegistrationManage.setSuperviseOrgCode(orgBranchCode);
jgUseRegistrationManageService.updateById(jgUseRegistrationManage);
} else {
throw new BadRequest("该使用登记证编号系统已存在,请核对使用登记证编号后,重新上传!");
}
} else {
jgUseRegistration.setIsAddEquip("0");
jgUseRegistrationManage = this.saveRegistrationManage(equipInfoDto, company);
jgUseRegistrationManage = this.saveRegistrationManage(equipInfoDto, company, orgBranchCode, orgBranchName);
}
// 生成一条tzs_jg_certificate_change_record记录
generateCertificateChangeRecord(jgUseRegistrationManage, changeRecordId);
......@@ -4179,7 +4181,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return dto;
}
private JgUseRegistrationManage saveRegistrationManage(EquipmentInfoDto equipInfoDto, CompanyBo company) {
private JgUseRegistrationManage saveRegistrationManage(EquipmentInfoDto equipInfoDto, CompanyBo company, String orgBranchCode, String orgBranchName) {
JgUseRegistrationManage jgUseRegistrationManage = new JgUseRegistrationManage();
jgUseRegistrationManage.setApplyNo(this.getApplicationNo());
jgUseRegistrationManage.setCertificateStatus(CertificateStatusEnum.YIDENGJI.getName());
......@@ -4197,6 +4199,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
jgUseRegistrationManage.setEquUseAddress("");
jgUseRegistrationManage.setManageType("unit");
jgUseRegistrationManage.setCreateDate(new Date());
jgUseRegistrationManage.setSuperviseOrgName(orgBranchName);
jgUseRegistrationManage.setSuperviseOrgCode(orgBranchCode);
jgUseRegistrationManage.setUseUnitAddress(!ValidationUtil.isEmpty(baseEnterpriseInfoMapper.selectByUseUnit(company.getCompanyName())) ? baseEnterpriseInfoMapper.selectByUseUnit(company.getCompanyName()).getAddress() : "");
jgUseRegistrationManage.setUseRegistrationCode(equipInfoDto.getUseOrgCode());
jgUseRegistrationManage.setUseUnitName(CompanyTypeEnum.INDIVIDUAL.getName().equals(company.getCompanyType()) ?
......
......@@ -18,10 +18,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum;
import com.yeejoin.amos.boot.module.jg.api.common.StringUtil;
import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.*;
import com.yeejoin.amos.boot.module.jg.api.mapper.*;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferEqService;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService;
......@@ -1002,6 +999,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
if (isUpdateRegistrationCode){
useRegistrationManageService.lambdaUpdate()
.set(JgUseRegistrationManage::getIsScrap, 1)
// TODO 区外移装,业务已限制需要先注销证,这主要目的是将韩城、杨凌的特殊《区内逻辑》但是需要新生成的证的把之前证改成已注销
.set(JgUseRegistrationManage::getCertificateStatus, CertificateStatusEnum.YIZHUXIAO.getName())
.in(JgUseRegistrationManage::getSequenceNbr,
registrationList.stream()
.map(JgUseRegistrationManage::getSequenceNbr)
......@@ -1011,6 +1010,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
}
List<JgUseRegistrationManage> newRegistrationList = new ArrayList<>();
// 新增-区外,或者区内是韩城和杨凌新生成证的新生成证(通过setSequenceNbr(null)),其他无需新生成证的进行证的更新
List<JSONObject> updatedRegistrationList = registrationList.stream()
.map(registrationManage -> {
Map<String, String> equType = new HashMap<>();
......@@ -1048,6 +1048,14 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
registrationManageNew.setChangeReason("");
registrationManageNew.setVersion(1);
}
// 所属监管单位
String orgBranchCodeName = historyJson.getString("orgBranchCode");
String orgBranchName = historyJson.getString("orgBranchName");
String[] orgBranchArray = orgBranchCodeName.split("_");
if(orgBranchArray.length > 1){
registrationManageNew.setSuperviseOrgCode(orgBranchArray[0]);
registrationManageNew.setSuperviseOrgName(StringUtil.isNotEmpty(orgBranchName) ? orgBranchName : orgBranchArray[1]);
}
// 添加到新列表中
newRegistrationList.add(registrationManageNew);
......
......@@ -512,7 +512,7 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
CompanyModel receiveParentResult = Privilege.companyClient.seleteOne(receiveCompanyResult.getParentId()).getResult();
receiveCompanyCode = receiveParentResult.getCompanyCode();
}
// 生成新的监管码
// 生成新的使用登记证编号
String code = this.generateVehicleUseRegistrationCode(receiveCompanyCode, manage.getEquDefineCode());
manage.setUseRegistrationCode(code);
// 更新设备使用登记证信息
......@@ -546,6 +546,8 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
manage.setCarNumber(jgChangeVehicleRegistrationUnit.getNewCarNumber() != null ? jgChangeVehicleRegistrationUnit.getNewCarNumber() : jgChangeVehicleRegistrationUnit.getCarNumber());
manage.setVersion(manage.getVersion() + 1);
manage.setChangeReason(BusinessTypeEnum.JG_VEHICLE_GAS_CYLINDER_CHANGE.getName());
manage.setSuperviseOrgCode(jgChangeVehicleRegistrationUnit.getOrgBranchCode());
manage.setSuperviseOrgName(jgChangeVehicleRegistrationUnit.getOrgBranchName());
jgUseRegistrationManageService.updateById(manage);
// 保存证流水信息
jgCertificateChangeRecord.setUseRegistrationCode(manage.getUseRegistrationCode());
......
......@@ -66,9 +66,6 @@ import java.util.stream.Collectors;
public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, JgEnableDisable, JgEnableDisableMapper> implements IJgEnableDisableService, ICompensateFlowDataOfRedis<JgEnableDisable> {
@Autowired
WorkFlowFeignService workFlowFeginService;
@Autowired
RedisUtils redisUtils;
@Autowired
......@@ -78,13 +75,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
JgEnableDisableEqMapper jgEnableDisableEqMapper;
@Autowired
JgMaintainNoticeMapper jgMaintainNoticeMapper;
@Autowired
TzsServiceFeignClient tzsServiceFeignClient;
@Autowired
IIdxBizJgRegisterInfoService idxBizJgRegisterInfoService;
private final List<String> NOT_FLOWING_STATE = Arrays.asList("待提交", "已驳回", "已撤回", "已作废", "已完成");
private final String PROCESS_DEFINITION_KEY = "deactivateEnable";
......
......@@ -30,6 +30,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.enums.*;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationManageMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
......@@ -238,6 +239,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private IdxBizJgProjectContraptionMapper idxBizJgProjectContraptionMapper;
@Autowired
private RegistrationInfoMapper registrationInfoMapper;
@Autowired
private CommonMapper commonMapper;
/**
......@@ -1393,6 +1396,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistrationManage.setUseUnitCreditCode(jgUseRegistration.getUseUnitCreditCode());
jgUseRegistrationManage.setReceiveCompanyCode(jgUseRegistration.getReceiveCompanyCode());
jgUseRegistrationManage.setManageType(jgUseRegistration.getManageType());
this.setSuperviseOrgInfo(jgUseRegistrationManage, jgUseRegistration);
jgUseRegistrationManageService.updateById(jgUseRegistrationManage);
}
}
......@@ -1412,6 +1416,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
JgUseRegistrationManage jgUseRegistrationManage = new JgUseRegistrationManage();
jgUseRegistrationManage.setAuditPassDate(jgUseRegistration.getAuditPassDate());
jgUseRegistrationManage.setSequenceNbr(useRegistrationManageSeq);
this.setSuperviseOrgInfo(jgUseRegistrationManage, jgUseRegistration);
jgUseRegistrationManageMapper.updateById(jgUseRegistrationManage);
return;
}
......@@ -1453,9 +1458,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistrationManage.setReceiveCompanyCode(jgUseRegistration.getReceiveCompanyCode());
jgUseRegistrationManage.setManageType(jgUseRegistration.getManageType());
jgUseRegistrationManage.setCertificateNo(commonServiceImpl.generateCertificateNo(equType, new Date(), jgUseRegistration.getReceiveCompanyCode()));
this.setSuperviseOrgInfo(jgUseRegistrationManage, jgUseRegistration);
jgUseRegistrationManageService.save(jgUseRegistrationManage);
}
private void setSuperviseOrgInfo(JgUseRegistrationManage jgUseRegistrationManage, JgUseRegistration jgUseRegistration) {
jgUseRegistrationManage.setSuperviseOrgCode(jgUseRegistration.getSupervisionOrgCode());
jgUseRegistrationManage.setSuperviseOrgName(commonMapper.getCompanyNameByOrgCode(jgUseRegistration.getSupervisionOrgCode()));
}
public JgUseRegistration updateData(Long sequenceNbr, String operate, WorkflowResultDto workflowResultDto, String carNumber, Boolean isFirst, JSONObject jsonObject) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
String role = workflowResultDto.getNextExecutorRoleIds();
......
......@@ -1704,6 +1704,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
jgUseRegistrationManage.setGasNum(jgVehicleInformation.getGasNum());
jgUseRegistrationManage.setCarNumber(jgVehicleInformation.getCarNumber());
jgUseRegistrationManage.setCertificateNo(commonService.generateCertificateNo(equType, new Date(), jgVehicleInformation.getReceiveCompanyCode()));
jgUseRegistrationManage.setSuperviseOrgName(jgVehicleInformation.getOrgBranchName());
jgUseRegistrationManage.setSuperviseOrgCode(jgVehicleInformation.getOrgBranchCode());
jgUseRegistrationManageService.save(jgUseRegistrationManage);
}
......@@ -2010,6 +2012,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.one();
if (useRegistrationManage != null) {
useRegistrationManage.setCarNumber(vehicleInformation.getCarNumber());
useRegistrationManage.setSuperviseOrgName(vehicleInformation.getOrgBranchName());
useRegistrationManage.setSuperviseOrgCode(vehicleInformation.getOrgBranchCode());
jgUseRegistrationManageService.updateById(useRegistrationManage);
}
}
......@@ -2229,13 +2233,15 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 登记证记录表主键
Long changeRecordId = sequence.nextId();
this.getBaseMapper().updateById(vehicleInformation);
JgUseRegistrationManage useRegistrationCode = jgUseRegistrationManageService.lambdaQuery()
JgUseRegistrationManage jgUseRegistrationManage = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseRegistrationCode, vehicleInformation.getUseRegistrationCode())
.eq(JgUseRegistrationManage::getIsDelete, 0)
.one();
if (useRegistrationCode != null) {
useRegistrationCode.setCarNumber(vehicleInformation.getCarNumber());
jgUseRegistrationManageService.updateById(useRegistrationCode);
if (jgUseRegistrationManage != null) {
jgUseRegistrationManage.setCarNumber(vehicleInformation.getCarNumber());
jgUseRegistrationManage.setSuperviseOrgName(vehicleInformation.getOrgBranchName());
jgUseRegistrationManage.setSuperviseOrgCode(vehicleInformation.getOrgBranchCode());
jgUseRegistrationManageService.updateById(jgUseRegistrationManage);
}
// 更新关联气瓶信息
......
......@@ -593,7 +593,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
.flatMap(node -> Stream.concat(
node.get(conditionName).equals(condition) ? Stream.of(node) : Stream.empty(),
node.get(childName) != null ? findNodesByCondition((List<LinkedHashMap>) node.get(childName),
conditionName, condition, condition).stream() :
conditionName, condition, childName).stream() :
Stream.empty()
))
.collect(Collectors.toList());
......
......@@ -40,7 +40,7 @@
<logger name="org.springframework" level="INFO"/>
<!-- 日志输出级别 -->
<root level="INFO">
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
......
......@@ -489,7 +489,7 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
.flatMap(node -> Stream.concat(
node.get(conditionName).equals(condition) ? Stream.of(node) : Stream.empty(),
node.get(childName) != null ? findNodesByCondition((List<LinkedHashMap>) node.get(childName),
conditionName, condition, condition).stream() :
conditionName, condition, childName).stream() :
Stream.empty()
))
.collect(Collectors.toList());
......
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