Commit c7fc748f authored by 韩桐桐's avatar 韩桐桐

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

parents 137237ab 26697355
...@@ -17,7 +17,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService; ...@@ -17,7 +17,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.*; import com.yeejoin.amos.boot.module.jg.biz.service.impl.*;
import com.yeejoin.amos.boot.module.ymt.api.entity.*; import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -27,7 +27,6 @@ import org.apache.commons.lang3.StringUtils; ...@@ -27,7 +27,6 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
...@@ -36,7 +35,6 @@ import java.util.concurrent.ExecutorService; ...@@ -36,7 +35,6 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import static com.alibaba.fastjson.JSON.toJSONString; import static com.alibaba.fastjson.JSON.toJSONString;
import static com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum.SPECIAL_CYLINDER; import static com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum.SPECIAL_CYLINDER;
...@@ -69,7 +67,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin ...@@ -69,7 +67,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
private IdxBizJgTechParamsVesselServiceImpl idxBizJgTechParamsVesselService; private IdxBizJgTechParamsVesselServiceImpl idxBizJgTechParamsVesselService;
private IdxBizJgInspectionDetectionInfoServiceImpl idxBizJgInspectionDetectionInfoService; private IdxBizJgInspectionDetectionInfoServiceImpl idxBizJgInspectionDetectionInfoService;
private ICommonService commonService; private ICommonService commonService;
private RegistrationInfoMapper tzsJgRegistrationInfoMapper; private IdxBizJgRegisterInfoMapper idxBizJgRegisterInfoMapper;
private ESEquipmentCategory esEquipmentCategory; private ESEquipmentCategory esEquipmentCategory;
private CategoryOtherInfoMapper categoryOtherInfoMapper; private CategoryOtherInfoMapper categoryOtherInfoMapper;
private SuperviseInfoMapper superviseInfoMapper; private SuperviseInfoMapper superviseInfoMapper;
...@@ -161,9 +159,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin ...@@ -161,9 +159,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
private void checkEquCodeUniqueness(String equCode) { private void checkEquCodeUniqueness(String equCode) {
// 根据设备代码检查唯一性 // 根据设备代码检查唯一性
LambdaQueryWrapper<RegistrationInfo> wrapper = new LambdaQueryWrapper<>(); Integer count = idxBizJgRegisterInfoMapper.selectByEquCodeAndClaimStatus(equCode,"");
wrapper.eq(RegistrationInfo::getEquCode, equCode);
Integer count = tzsJgRegistrationInfoMapper.selectCount(wrapper);
if (count > 0) { if (count > 0) {
result.append("设备代码系统中已存在"); result.append("设备代码系统中已存在");
} }
......
...@@ -173,7 +173,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -173,7 +173,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
@Autowired @Autowired
RestHighLevelClient restHighLevelClient; RestHighLevelClient restHighLevelClient;
@Autowired @Autowired
RegistrationInfoMapper tzsJgRegistrationInfoMapper; IdxBizJgRegisterInfoMapper idxBizJgRegisterInfoMapper;
@Autowired @Autowired
OtherInfoMapper otherInfoMapper; OtherInfoMapper otherInfoMapper;
@Autowired @Autowired
...@@ -351,10 +351,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -351,10 +351,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private void checkEquCodeUniqueness(LinkedHashMap equipmentInfoForm) { private void checkEquCodeUniqueness(LinkedHashMap equipmentInfoForm) {
// 根据设备代码检查唯一性 // 根据设备代码检查唯一性
LambdaQueryWrapper<RegistrationInfo> wrapper = new LambdaQueryWrapper<>(); Integer count = idxBizJgRegisterInfoMapper.selectByEquCodeAndClaimStatus((String) equipmentInfoForm.get(EQU_CODE), (String) equipmentInfoForm.get(SEQUENCE_NBR));
wrapper.eq(RegistrationInfo::getEquCode, equipmentInfoForm.get(EQU_CODE));
wrapper.ne(!ObjectUtils.isEmpty(equipmentInfoForm.get(SEQUENCE_NBR)), RegistrationInfo::getSequenceNbr, equipmentInfoForm.get(SEQUENCE_NBR));
Integer count = tzsJgRegistrationInfoMapper.selectCount(wrapper);
if (count > 0) { if (count > 0) {
throw new BadRequest("设备代码已存在,请重新输入!"); throw new BadRequest("设备代码已存在,请重新输入!");
} }
...@@ -3121,9 +3118,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3121,9 +3118,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private void checkEquCodeUniqueness(String equCode, StringBuilder result) { private void checkEquCodeUniqueness(String equCode, StringBuilder result) {
// 根据设备代码检查唯一性 // 根据设备代码检查唯一性
LambdaQueryWrapper<RegistrationInfo> wrapper = new LambdaQueryWrapper<>(); Integer count = idxBizJgRegisterInfoMapper.selectByEquCodeAndClaimStatus(equCode,"");
wrapper.eq(RegistrationInfo::getEquCode, equCode);
Integer count = tzsJgRegistrationInfoMapper.selectCount(wrapper);
if (count > 0) { if (count > 0) {
result.append("设备代码系统中已存在;"); result.append("设备代码系统中已存在;");
} }
...@@ -3203,8 +3198,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3203,8 +3198,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
listener.setIdxBizJgTechParamsVesselService(idxBizJgTechParamsVesselService); listener.setIdxBizJgTechParamsVesselService(idxBizJgTechParamsVesselService);
listener.setIdxBizJgInspectionDetectionInfoService(idxBizJgInspectionDetectionInfoService); listener.setIdxBizJgInspectionDetectionInfoService(idxBizJgInspectionDetectionInfoService);
listener.setCommonService(commonService); listener.setCommonService(commonService);
listener.setTzsJgRegistrationInfoMapper(tzsJgRegistrationInfoMapper); listener.setIdxBizJgRegisterInfoMapper(idxBizJgRegisterInfoMapper);
listener.setTzsJgRegistrationInfoMapper(tzsJgRegistrationInfoMapper);
listener.setEsEquipmentCategory(esEquipmentCategory); listener.setEsEquipmentCategory(esEquipmentCategory);
listener.setCategoryOtherInfoMapper(categoryOtherInfoMapper); listener.setCategoryOtherInfoMapper(categoryOtherInfoMapper);
listener.setSuperviseInfoMapper(superviseInfoMapper); listener.setSuperviseInfoMapper(superviseInfoMapper);
......
...@@ -56,4 +56,6 @@ public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterI ...@@ -56,4 +56,6 @@ public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterI
* @return 更新成功返回 true,失败返回 false * @return 更新成功返回 true,失败返回 false
*/ */
Boolean updateCylinderCategoryByEquCodeBatch(@Param("cylinderCategory") String cylinderCategory, @Param("equCodeList") List<String> equCodeList); Boolean updateCylinderCategoryByEquCodeBatch(@Param("cylinderCategory") String cylinderCategory, @Param("equCodeList") List<String> equCodeList);
Integer selectByEquCodeAndClaimStatus(@Param("equCode") String equCode, @Param("sequenceNbr") String sequenceNbr);
} }
...@@ -18,6 +18,17 @@ ...@@ -18,6 +18,17 @@
GROUP BY jui.PROJECT_CONTRAPTION GROUP BY jui.PROJECT_CONTRAPTION
</select> </select>
<select id="selectByEquCodeAndClaimStatus" parameterType="map" resultType="java.lang.Integer">
SELECT COUNT(*)
FROM idx_biz_jg_register_info jri
JOIN idx_biz_jg_other_info joi ON jri.record = joi.record
WHERE jri.equ_code = #{equCode}
<if test="sequenceNbr != null and sequenceNbr != ''">
AND jri.sequence_nbr != #{sequenceNbr}
</if>
AND joi.claim_status = '已认领'
</select>
<update id="updateCylinderCategoryByRecordBatch"> <update id="updateCylinderCategoryByRecordBatch">
UPDATE idx_biz_jg_register_info UPDATE idx_biz_jg_register_info
SET "CYLINDER_CATEGORY" = #{cylinderCategory} SET "CYLINDER_CATEGORY" = #{cylinderCategory}
......
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