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);
}
}
......@@ -9,16 +9,19 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
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;
import com.yeejoin.amos.boot.module.jg.api.converter.EquCategoryConverter;
import com.yeejoin.amos.boot.module.jg.api.converter.EquDefineConverter;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipInfoExcelDto;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.service.*;
import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import io.seata.spring.annotation.GlobalTransactional;
......@@ -29,7 +32,6 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionTemplate;
import org.springframework.util.ObjectUtils;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
......@@ -67,7 +69,10 @@ public class DataDockServiceImpl {
private final IIdxBizJgTechParamsRopewayService iIdxBizJgTechParamsRopewayService;
private final IIdxBizJgTechParamsElevatorService iIdxBizJgTechParamsElevatorService;
private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
private final TransactionTemplate transactionTemplate;
private final TzBaseEnterpriseInfoMapper tzBaseEnterpriseInfoMapper;
private final RedisUtils redisUtils;
private final TzsServiceFeignClient tzsServiceFeignClient;
;
private final CommonServiceImpl commonService;
private final Map<String, Object> resultError = new HashMap<>();
......@@ -140,16 +145,98 @@ public class DataDockServiceImpl {
// records.forEach(record -> this.saveEquInfoToEs(record));
// }
// public Integer writeOrgBranchCode2YanChang(String remark) {
// List<String> records = idxBizJgUseInfoService.lambdaQuery().select(IdxBizJgUseInfo::getRecord).eq(IdxBizJgUseInfo::getRemark, remark).list().stream().map(IdxBizJgUseInfo::getRecord).collect(Collectors.toList());
//
// idxBizJgSupervisionInfoService.lambdaUpdate().set(IdxBizJgSupervisionInfo::getOrgBranchCode, "50*74*160*12478").set(IdxBizJgSupervisionInfo::getOrgBranchName, "交口河镇市场监管所").in(IdxBizJgSupervisionInfo::getRecord, records).update();
// records.forEach(record -> {
// esEquipmentCategory.deleteById(record);
// this.saveEquInfoToEs(record);
// });
// return records.size();
// }
public Integer writeOrgBranchCode2YanChang(String remark) {
List<String> records = idxBizJgUseInfoService.lambdaQuery().select(IdxBizJgUseInfo::getRecord).eq(IdxBizJgUseInfo::getRemark, remark).list().stream().map(IdxBizJgUseInfo::getRecord).collect(Collectors.toList());
idxBizJgSupervisionInfoService.lambdaUpdate().set(IdxBizJgSupervisionInfo::getOrgBranchCode, "50*74*160*12478").set(IdxBizJgSupervisionInfo::getOrgBranchName, "交口河镇市场监管所").in(IdxBizJgSupervisionInfo::getRecord, records).update();
records.forEach(record -> {
esEquipmentCategory.deleteById(record);
this.saveEquInfoToEs(record);
});
return records.size();
}
/**
* 根据name获取市区县Code
*
* @param name
* @return code
*/
private String getRegionCode(String name, String key) {
return Optional.ofNullable((List<LinkedHashMap>) redisUtils.get(key))
.flatMap(list -> list.stream()
.filter(item -> String.valueOf(item.get("regionName"))
.equals(name))
.map(item -> String.valueOf(item.get("regionCode")))
.findFirst())
.orElse("");
}
public Integer writeUsePlace2YanChang(String remark) {
List<String> records = idxBizJgUseInfoService.lambdaQuery()
.select(IdxBizJgUseInfo::getRecord)
.eq(IdxBizJgUseInfo::getRemark, remark)
.list()
.stream()
.map(IdxBizJgUseInfo::getRecord)
.collect(Collectors.toList());
if (records.isEmpty()) {
return 0;
}
Optional<String> useUnitCreditCode = idxBizJgUseInfoService.lambdaQuery()
.select(IdxBizJgUseInfo::getUseUnitCreditCode)
.eq(IdxBizJgUseInfo::getRecord, records.get(0))
.list().stream().findFirst().map(IdxBizJgUseInfo::getUseUnitCreditCode);
useUnitCreditCode.ifPresent(useCode -> {
TzBaseEnterpriseInfo enterpriseInfo = tzBaseEnterpriseInfoMapper.selectOne(new LambdaQueryWrapper<TzBaseEnterpriseInfo>()
.eq(TzBaseEnterpriseInfo::getUseUnitCode, useCode));
String provinceName = enterpriseInfo.getProvince();
String provinceCode = "610000";
String cityName = enterpriseInfo.getCity();
String cityCode = "";
if (!ValidationUtil.isEmpty(cityName)) {
cityCode = getRegionCode(cityName, "CITY");
}
String districtName = enterpriseInfo.getDistrict();
String districtCode = "";
if (!ValidationUtil.isEmpty(districtName)) {
districtCode = getRegionCode(districtName, "COUNTY");
}
String usePlace = provinceName + "/" + cityName + "/" + districtName;
String usePlaceCode = provinceCode + "#" + cityCode + "#" + districtCode;
idxBizJgUseInfoService.lambdaUpdate()
.set(IdxBizJgUseInfo::getProvince, provinceCode)
.set(IdxBizJgUseInfo::getProvinceName, provinceName)
.set(IdxBizJgUseInfo::getCity, cityCode)
.set(IdxBizJgUseInfo::getCityName, cityName)
.set(IdxBizJgUseInfo::getCounty, districtCode)
.set(IdxBizJgUseInfo::getCountyName, districtName)
.set(IdxBizJgUseInfo::getStreetName, enterpriseInfo.getStreet())
.set(IdxBizJgUseInfo::getAddress, enterpriseInfo.getAddress())
.set(!ValidationUtil.isEmpty(enterpriseInfo.getLatitude()) && !ValidationUtil.isEmpty(enterpriseInfo.getLongitude()),
IdxBizJgUseInfo::getLongitudeLatitude,
String.format("{\"latitude\":\"%s\",\"longitude\":\"%s\"}", enterpriseInfo.getLatitude(), enterpriseInfo.getLongitude()))
.in(IdxBizJgUseInfo::getRecord, records)
.update();
records.forEach(record -> {
log.error("向{}刷入使用地点信息", record);
HashMap<String, Map<String, Object>> objMap = new HashMap<>();
HashMap<String, Object> param = new HashMap<>();
param.put("USE_PLACE", usePlace);
param.put("USE_PLACE_CODE", usePlaceCode);
objMap.put(record, param);
tzsServiceFeignClient.commonUpdateEsDataByIds(objMap);
});
});
return records.size();
}
/**
* 保存工程装置表信息
......@@ -209,6 +296,32 @@ public class DataDockServiceImpl {
log.error("数据===>{}", JSONObject.toJSONString(equ));
IdxBizJgUseInfo useInfo = JSON.parseObject(JSON.toJSONString(equ), IdxBizJgUseInfo.class);
if (!ValidationUtil.isEmpty(useInfo)) {
TzBaseEnterpriseInfo enterpriseInfo = tzBaseEnterpriseInfoMapper.selectOne(new LambdaQueryWrapper<TzBaseEnterpriseInfo>()
.eq(TzBaseEnterpriseInfo::getUseUnitCode, String.valueOf(equ.get("useUnitCode")).trim()));
if (!ValidationUtil.isEmpty(enterpriseInfo)) {
String provinceName = enterpriseInfo.getProvince();
String provinceCode = "610000";
String cityName = enterpriseInfo.getCity();
String cityCode = "";
if (!ValidationUtil.isEmpty(cityName)) {
cityCode = getRegionCode(cityName, "CITY");
}
String districtName = enterpriseInfo.getDistrict();
String districtCode = "";
if (!ValidationUtil.isEmpty(districtName)) {
districtCode = getRegionCode(districtName, "COUNTY");
}
useInfo.setProvince(provinceCode);
useInfo.setProvinceName(provinceName);
useInfo.setCity(cityCode);
useInfo.setCityName(cityName);
useInfo.setCounty(districtCode);
useInfo.setCountyName(districtName);
useInfo.setStreetName(enterpriseInfo.getStreet());
if (ValidationUtil.isEmpty(enterpriseInfo.getLatitude()) && !ValidationUtil.isEmpty(enterpriseInfo.getLongitude())) {
useInfo.setLongitudeLatitude(String.format("{\"latitude\":\"%s\",\"longitude\":\"%s\"}", enterpriseInfo.getLatitude(), enterpriseInfo.getLongitude()));
}
}
useInfo.setRecDate(new Date());
useInfo.setRecord(record);
useInfo.setDataSource(dataSource);
......@@ -269,6 +382,7 @@ public class DataDockServiceImpl {
registerInfo.setRegisterState("6045");
if (EquipmentClassifityEnum.YLGD.getCode().equals(equList)) {
registerInfo.setEquCodeType("2");
registerInfo.setProductName((String) equ.get("pipeName"));
}
idxBizJgRegisterInfoServiceImpl.save(registerInfo);
}
......
......@@ -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