Commit 4aa3c3f7 authored by 麻笑宇's avatar 麻笑宇

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

parents 3307fcc1 0fafb10e
......@@ -3,8 +3,7 @@ server.servlet.context-path=/accessapi
server.port=11005
# jdbc_config
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_data_accessapi&allowMultiQueries=true
#spring.datasource.url=jdbc:vastbase://36.46.151.113:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz
spring.datasource.url=jdbc:postgresql://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_data_accessapi&allowMultiQueries=true
spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
......@@ -19,7 +18,7 @@ spring.datasource.hikari.connection-test-query=SELECT 1
# REDIS (RedisProperties)
spring.redis.database=1
spring.redis.host=172.16.10.230
spring.redis.host=172.16.10.243
spring.redis.port=6379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
......@@ -28,21 +27,21 @@ spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
#注册中心地址
eureka.client.service-url.defaultZone =http://172.16.10.230: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://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.health-check-url=http://172.16.3.89:${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://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
eureka.instance.ip-address=localhost
eureka.instance.status-page-url=http://172.16.3.89:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.89:${server.port}${server.servlet.context-path}/swagger-ui.html
eureka.instance.ip-address=172.16.3.89
eureka.instance.instance-id=${eureka.instance.ip-address}:${server.port}
##emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.230:2883
emqx.broker=tcp://172.16.10.243:2883
emqx.client-user-name=super
emqx.client-password=123456
......@@ -68,3 +67,8 @@ spring.redis.cluster.failed-attempts=3
spring.redis.cluster.slave-connection-pool-size=64
spring.redis.cluster.master-connection-pool-size=64
spring.redis.cluster.retry-interval=1500
amos.system.user.user-name=robot_admin
amos.system.user.password=a1234567
amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=AMOS_STUDIO_WEB
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.DataDockServiceImpl;
import com.yeejoin.amos.component.robot.BadRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.io.FilenameUtils;
......@@ -8,6 +9,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -52,9 +54,7 @@ public class DataDockController {
String contentType = file.getContentType();
String fileExtension = FilenameUtils.getExtension(file.getOriginalFilename());
// 校验 Excel 文件的 MIME type 和扩展名
if (!("application/vnd.ms-excel".equals(contentType) ||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) ||
!("xls".equalsIgnoreCase(fileExtension) || "xlsx".equalsIgnoreCase(fileExtension))) {
if (!("application/vnd.ms-excel".equals(contentType) || "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) || !("xls".equalsIgnoreCase(fileExtension) || "xlsx".equalsIgnoreCase(fileExtension))) {
return ResponseHelper.buildResponse("文件类型必须是 Excel 文件");
}
return ResponseHelper.buildResponse(dataDockService.dataCheckAndImportEquipmentData(remark, file));
......@@ -68,14 +68,24 @@ public class DataDockController {
// return ResponseHelper.buildResponse("ok");
// }
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/yanChang/ORG_BRANCH_CODE")
// @ApiOperation(httpMethod = "get", value = "延炼-延长-刷入属地监管部门", notes = "延炼-延长-刷入属地监管部门")
// public Object writeOrgBranchCode2YanChang(@NotNull @RequestParam String remark) {
// if (ValidationUtil.isEmpty(remark)) {
// throw new BadRequest("remark必填!");
// }
// return ResponseHelper.buildResponse("更新成功,共" + dataDockService.writeOrgBranchCode2YanChang(remark) + "条数据");
// }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/yanChang/ORG_BRANCH_CODE")
@ApiOperation(httpMethod = "get", value = "延炼-延长-刷入属地监管部门", notes = "延炼-延长-刷入属地监管部门")
public Object writeOrgBranchCode2YanChang(@RequestParam String remark) {
if (ValidationUtil.isEmpty(remark)) {
throw new BadRequest("remark必填!");
}
return ResponseHelper.buildResponse("更新成功,共" + dataDockService.writeOrgBranchCode2YanChang(remark) + "条数据");
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/yanChang/USE_PLACE")
@ApiOperation(httpMethod = "get", value = "延炼-延长-刷入所属区域", notes = "延炼-延长-刷入所属区域")
public Object writeUsePlace2YanChang(@RequestParam String remark) {
if (ValidationUtil.isEmpty(remark)) {
throw new BadRequest("remark必填!");
}
return ResponseHelper.buildResponse("更新成功,共" + dataDockService.writeUsePlace2YanChang(remark) + "条数据");
}
}
......@@ -86,4 +86,12 @@ public class DataHandlerController extends BaseController {
return ResponseHelper.buildResponse(true);
}
@ApiOperation(httpMethod = "PUT", value = "由于前期设备纳管状态不对,导致的1220上线时 创建的装置纳管状态不对,刷库", notes = "历史数据处理")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/v2/projectContraption/info")
public ResponseModel<Boolean> projectContraptionInfoUpdateV2(){
dataHandlerService.projectContraptionInfoUpdateV2();
return ResponseHelper.buildResponse(true);
}
}
......@@ -12,6 +12,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
......@@ -21,10 +22,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionInfoService;
import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectConstructionMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectInspectionMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -116,6 +114,8 @@ public class DataHandlerServiceImpl {
@Resource
IIdxBizJgInspectionDetectionInfoService iIdxBizJgInspectionDetectionInfoService;
@Autowired
private IdxBizJgProjectContraptionMapper idxBizJgProjectContraptionMapper;
/**
......@@ -829,4 +829,26 @@ public class DataHandlerServiceImpl {
.isNull(JgUseRegistration::getProjectContraptionId)
.select(BaseEntity::getSequenceNbr, JgUseRegistration::getProjectContraption, JgUseRegistration::getUseRegistrationCode, JgUseRegistration::getStatus, JgUseRegistration::getAuditPassDate));
}
/**
* 处理管道-安装告知审批完成但是装置是否纳管状态不正确的数据
*/
@Transactional(rollbackFor = Exception.class)
public void projectContraptionInfoUpdateV2() {
List<IdxBizJgProjectContraption> projectConstructions = idxBizJgProjectContraptionMapper.selectErrorManagementProject();
log.info("处理前:安装告知审批完成但是装置是否纳管状态不正确的数据量:{}", projectConstructions.size());
projectConstructions.parallelStream().forEach(p->{
LambdaUpdateWrapper<IdxBizJgProjectContraption> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(BaseEntity::getSequenceNbr, p.getSequenceNbr());
updateWrapper.set(IdxBizJgProjectContraption::getUscUnitName, p.getUscUnitName());
updateWrapper.set(IdxBizJgProjectContraption::getUscUnitCreditCode, p.getUscUnitCreditCode());
updateWrapper.set(IdxBizJgProjectContraption::getUseUnitName, p.getUseUnitName());
updateWrapper.set(IdxBizJgProjectContraption::getUseUnitCreditCode, p.getUseUnitCreditCode());
updateWrapper.set(BaseEntity::getRecDate, p.getRecDate());
updateWrapper.set(IdxBizJgProjectContraption::getIsIntoManagement, true);
projectContraptionService.update(null, updateWrapper);
});
List<IdxBizJgProjectContraption> projectConstructionsAfter = idxBizJgProjectContraptionMapper.selectErrorManagementProject();
log.info("处理后:安装告知审批完成但是装置是否纳管状态不正确的数据量:{}", projectConstructionsAfter.size());
}
}
......@@ -51,9 +51,9 @@ public class DPSubController {
if (ValidationUtil.isEmpty(param.get("equList"))){
param.put("equList", param.get("EQU_LIST_CODE"));
}
// if (ValidationUtil.isEmpty(param.get("PRODUCT_NAME"))){
// param.put("PRODUCT_NAME", param.get("EQU_LIST"));
// }
if (ValidationUtil.isEmpty(param.get("PRODUCT_NAME"))){
param.put("PRODUCT_NAME", param.get("EQU_LIST"));
}
if (!ValidationUtil.isEmpty(param.get("equListCode"))){ // 问题列表关联设备
param.put("equList", param.get("equListCode"));
param.put("EQU_LIST_CODE", param.get("equListCode"));
......
......@@ -84,6 +84,11 @@ public class DPSubServiceImpl {
long s = System.currentTimeMillis();
tab.put("template", template);
this.buildContent(content, tab, param);
// 企业且详情页签时 去掉 二维码
if(tab.getString("key").equals("basic") && template.equals("company")){
JSONObject map = content.getJSONObject(tab.getString("key"));
map.put("qrcode", null);
}
long e = System.currentTimeMillis();
log.info("{}tab页处理结束,共耗时:{} 毫秒", tab.get("displayName"), (e - s));
});
......
......@@ -2136,12 +2136,24 @@ public class JGDPStatisticsServiceImpl {
pBuilder.must(QueryBuilders.matchQuery(IS_INTO_MANAGEMENT, param));
boolMust.must(pBuilder);
} else{
//已赋码
boolMust.must(QueryBuilders.existsQuery("SUPERVISORY_CODE"));
boolMust.mustNot(QueryBuilders.termQuery("SUPERVISORY_CODE","null"));
//状态为已认领
String[] status = {"草稿","已拒领","待认领"};
boolMust.mustNot(QueryBuilders.termsQuery("STATUS",Arrays.asList(status)));
if("1".equals(map.getString("IS_SUPERVISORY"))){
//已赋码
boolMust.must(QueryBuilders.existsQuery("SUPERVISORY_CODE"));
boolMust.mustNot(QueryBuilders.termQuery("SUPERVISORY_CODE","null"));
//状态为已认领
String[] status = {"草稿","已拒领","待认领"};
boolMust.mustNot(QueryBuilders.termsQuery("STATUS",Arrays.asList(status)));
}else if("2".equals(map.getString("IS_SUPERVISORY"))){
//未赋码
boolMust.mustNot(QueryBuilders.existsQuery("SUPERVISORY_CODE"));
//状态为已认领
String[] status = {"草稿","已拒领","待认领"};
boolMust.mustNot(QueryBuilders.termsQuery("STATUS",Arrays.asList(status)));
}else{
//状态为已认领
String[] status = {"草稿","已拒领","待认领"};
boolMust.mustNot(QueryBuilders.termsQuery("STATUS",Arrays.asList(status)));
}
}
if (!ObjectUtils.isEmpty(map.getString(EQU_CATEGORY))) {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
......
package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectConstruction;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import org.apache.ibatis.annotations.Param;
......@@ -33,4 +34,6 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
* @return 被引用次数 > 0 则设备不可删除
*/
Integer countContraptionInUseTimesForDelete(@Param("projectContraptionId") Long projectContraptionId);
List<IdxBizJgProjectContraption> selectErrorManagementProject();
}
......@@ -123,4 +123,21 @@
AND (a.notice_status <![CDATA[ <> ]]> '6617')
)
</select>
<select id="selectErrorManagementProject"
resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption">
select
p.sequence_nbr,
n.install_unit_name as usc_unit_name,
n.install_unit_credit_code as usc_unit_credit_code,
n.use_unit_credit_code,
n.use_unit_name
from
tzs_jg_installation_notice n,
idx_biz_jg_project_contraption p
where
n.project_contraption_id = p.sequence_nbr
and n.notice_status='6616'
and p.is_into_management = false
and n.is_delete = false
</select>
</mapper>
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