Commit 03ca3c14 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register_to_0715' of…

Merge branch 'develop_tzs_register_to_0715' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register_to_0715
parents 75ab2d71 afaccfa3
......@@ -25,10 +25,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.jg.api.dto.CodeGenerateDto;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipInfoCylinderExcelDto;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipmentInfoDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecord;
import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecordEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.jg.api.entity.SafetyProblemTracing;
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.JgUseRegistrationMapper;
......@@ -2517,6 +2514,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (jsonObject.get("projectContraption") == null) {
throw new BadRequest("请先选择工程装置后,再选择设备信息!");
}
if (!jgUseRegistrationMapper.selectList(new LambdaQueryWrapper<JgUseRegistration>()
.eq(JgUseRegistration::getIsDelete, false)
.eq(JgUseRegistration::getProjectContraption, jsonObject.get("projectContraption"))
.eq(JgUseRegistration::getUseUnitCreditCode, useUnitCreditCode)
.eq(JgUseRegistration::getIsAddEquip, "0")
.ne(JgUseRegistration::getStatus, "已作废")).isEmpty()) {
throw new BadRequest("该工程装置已做过使用登记,再选择增补功能进行登记!");
}
return jgUseRegistrationMapper.queryForUnitPipelineEquipmentPage(page, jsonObject, records);
} else if ("2300".equals(jsonObject.get(EQU_CATEGORY_CODE))) {// 气瓶
List<DictionarieValueModel> fillingMedium = Systemctl.dictionarieClient.dictValues("FILLING_MEDIUM").getResult();
......
......@@ -666,6 +666,20 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (CollectionUtils.isEmpty(equipmentLists)) {
throw new BadRequest( "请选择设备信息!");
}
if (CylinderTypeEnum.CYLINDER.getCode().equals(map.get("EQU_CATEGORY_CODE"))) {
// 检验企业是否已存在瓶30的证
boolean hasExistingCertificate = this.baseMapper.selectList(
new LambdaQueryWrapper<JgUseRegistration>()
.eq(JgUseRegistration::getUseUnitCreditCode, company.getCompanyCode())
.eq(JgUseRegistration::getIsDelete, false)
.ne(JgUseRegistration::getStatus, "已作废")
).stream().anyMatch(v -> v.getUseRegistrationCode().contains("瓶30"));
if (hasExistingCertificate) {
throw new BadRequest("该企业已存在气瓶证书,请选择增补功能进行登记!");
}
}
// 提交时进行校验设备是否在流程中使用(并发及同时打开多个相同的页面时才会出现此种情况)
checkForRepeatUsedEquip(map, equipmentLists, reginParams);
List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = idxBizJgInspectionDetectionInfoService.checkInspectionInfo(
......
......@@ -31,21 +31,16 @@ public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterI
@Select("SELECT SEQUENCE_NBR,REC_DATE,ORG_BRANCH_NAME,ORG_BRANCH_CODE,USE_UNIT_NAME,USE_UNIT_CREDIT_CODE,EQU_LIST_CODE,EQU_LIST,EQU_CATEGORY,EQU_CATEGORY_CODE,USE_ORG_CODE,CODE96333,EQU_CODE,SUPERVISORY_CODE,USE_PLACE,ADDRESS,EQU_STATE,STATUS,USE_INNER_CODE,FACTORY_NUM,PRODUCE_UNIT_NAME,INSPECT_REPORT,NEXT_INSPECT_DATE,CONSTRUCTION_TYPE,USC_UNIT_CREDIT_CODE,USC_UNIT_NAME,EQU_DEFINE,EQU_DEFINE_CODE,PRODUCT_NAME,BRAND_NAME,EQU_TYPE,DATA_SOURCE,IS_INTO_MANAGEMENT,WHETHER_VEHICLE_CYLINDER,WHETHER_SKID_MOUNTED_PRESSURE_VESSEL,DATE_FORMAT(PRODUCE_DATE,'%Y-%m-%d %H:%i:%s')as PRODUCE_DATE,PROJECT_CONTRAPTION from idx_biz_view_jg_all WHERE PROJECT_CONTRAPTION is not null")
List<Map<String, Object>> esSynchronousProjectContraption();
@Select("SELECT\n" +
"\tjui.PROJECT_CONTRAPTION AS value,\n" +
"\ttjur.use_registration_code\n" +
"FROM\n" +
"\tidx_biz_jg_use_info jui\n" +
"\tLEFT JOIN idx_biz_jg_register_info jri ON jri.\"RECORD\" = jui.\"RECORD\"\n" +
"\tLEFT JOIN tzs_jg_use_registration_eq tjure ON tjure.\"equ_id\" = jui.\"RECORD\"\n" +
"\tLEFT JOIN tzs_jg_use_registration tjur ON tjure.\"equip_transfer_id\" = tjur.\"sequence_nbr\"\n" +
"WHERE\n" +
"\tjui.USE_UNIT_CREDIT_CODE = #{useUnitCreditCode}\n" +
"\tAND jui.PROJECT_CONTRAPTION IS NOT NULL\n" +
"\tAND jri.\"USE_ORG_CODE\" IS NULL\n" +
"\tAND tjur.use_registration_code IS NULL\n" +
"\tAND tjur.status <> '已完成'\n" +
"GROUP BY\n" +
"\tjui.PROJECT_CONTRAPTION")
@Select("SELECT " +
"jui.PROJECT_CONTRAPTION AS value " +
"FROM " +
"idx_biz_jg_use_info jui " +
"LEFT JOIN idx_biz_jg_register_info jri ON jri.\"RECORD\" = jui.\"RECORD\" " +
"WHERE " +
"jui.USE_UNIT_CREDIT_CODE = #{useUnitCreditCode} " +
"AND jui.PROJECT_CONTRAPTION IS NOT NULL " +
"AND jri.\"USE_ORG_CODE\" IS NULL " +
"GROUP BY " +
"jui.PROJECT_CONTRAPTION")
List<Map<String, Object>> getProjectContraptionList(String useUnitCreditCode);
}
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