Commit 74f3336c authored by lisong's avatar lisong

修改sequenceCode重复报错bug

parent c576d50d
...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.*; ...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.*;
import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderInfo; import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderInfo;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 气瓶基本信息 Mapper 接口 * 气瓶基本信息 Mapper 接口
...@@ -20,13 +21,13 @@ public interface TzCylinderMapper extends BaseMapper<CylinderInfo> { ...@@ -20,13 +21,13 @@ public interface TzCylinderMapper extends BaseMapper<CylinderInfo> {
TzCylinderInfoDto getTzCylinderInfoDto(String sequenceNbr); TzCylinderInfoDto getTzCylinderInfoDto(String sequenceNbr);
String getSequencCode(String sequenceNbr); Map<String, Object> getSequencCode(String sequenceNbr);
TzCylinderProduceDto getTzCylinderProduceDto(String SequenceCode); TzCylinderProduceDto getTzCylinderProduceDto(String sequenceCode, String appId);
TzCylinderTagsDto getTzCylinderTagsDto(String sequenceCode); TzCylinderTagsDto getTzCylinderTagsDto(String sequenceCode, String appId);
List<TzCylinderInspectionDto> getTzCylinderInspectionDto(String sequenceCode); List<TzCylinderInspectionDto> getTzCylinderInspectionDto(String sequenceCode, String appId);
List<TzCylinderFillingDto> getTzCylinderFillingDto(String sequenceCode); List<TzCylinderFillingDto> getTzCylinderFillingDto(String sequenceCode);
......
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
WHERE CI.sequence_nbr = #{sequenceNbr} WHERE CI.sequence_nbr = #{sequenceNbr}
</select> </select>
<select id="getSequencCode" resultType="java.lang.String"> <select id="getSequencCode" resultType="java.util.Map">
SELECT sequence_code FROM tz_cylinder_info WHERE sequence_nbr=#{sequenceNbr} SELECT sequence_code, app_id FROM tz_cylinder_info WHERE sequence_nbr=#{sequenceNbr}
</select> </select>
<select id="getTzCylinderProduceDto" resultType="com.yeejoin.amos.boot.module.cylinder.flc.api.dto.TzCylinderProduceDto"> <select id="getTzCylinderProduceDto" resultType="com.yeejoin.amos.boot.module.cylinder.flc.api.dto.TzCylinderProduceDto">
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
CI.type_experiments CI.type_experiments
FROM FROM
tz_cylinder_info CI tz_cylinder_info CI
WHERE CI.sequence_code =#{SequenceCode} WHERE CI.sequence_code =#{sequenceCode} and CI.app_id = #{appId}
</select> </select>
<select id="getTzCylinderTagsDto" resultType="com.yeejoin.amos.boot.module.cylinder.flc.api.dto.TzCylinderTagsDto"> <select id="getTzCylinderTagsDto" resultType="com.yeejoin.amos.boot.module.cylinder.flc.api.dto.TzCylinderTagsDto">
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
CT.electronic_label_code, CT.electronic_label_code,
CT.gas_cylinder_stamp CT.gas_cylinder_stamp
FROM tz_cylinder_tags CT FROM tz_cylinder_tags CT
WHERE CT.sequence_code = #{SequenceCode} WHERE CT.sequence_code = #{sequenceCode} and CT.app_id = #{appId}
</select> </select>
<select id="getTzCylinderInspectionDto" resultType="com.yeejoin.amos.boot.module.cylinder.flc.api.dto.TzCylinderInspectionDto"> <select id="getTzCylinderInspectionDto" resultType="com.yeejoin.amos.boot.module.cylinder.flc.api.dto.TzCylinderInspectionDto">
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
CI.scrap_quantity, CI.scrap_quantity,
CI.next_inspection_date CI.next_inspection_date
FROM tz_cylinder_inspection CI FROM tz_cylinder_inspection CI
WHERE CI.sequence_code = #{SequenceCode} WHERE CI.sequence_code = #{sequenceCode} and CI.app_id = #{appId}
ORDER BY CI.inspection_date DESC ORDER BY CI.inspection_date DESC
</select> </select>
......
...@@ -59,8 +59,10 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind ...@@ -59,8 +59,10 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
@Override @Override
public TzCylinderTraceDto getCylinderTraceDto(String sequenceNbr) { public TzCylinderTraceDto getCylinderTraceDto(String sequenceNbr) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String orgCode = tzCylinderMapper.getSequencCode(sequenceNbr); Map<String, Object> cylinder = tzCylinderMapper.getSequencCode(sequenceNbr);
TzCylinderProduceDto tzCylinderProduceDto = tzCylinderMapper.getTzCylinderProduceDto(orgCode); String appId = String.valueOf(cylinder.get("app_id"));
String sequenceCode = String.valueOf(cylinder.get("sequence_code"));
TzCylinderProduceDto tzCylinderProduceDto = tzCylinderMapper.getTzCylinderProduceDto(sequenceCode, appId);
if(!ValidationUtil.isEmpty(tzCylinderProduceDto.getManufacturingDate())) { if(!ValidationUtil.isEmpty(tzCylinderProduceDto.getManufacturingDate())) {
if(tzCylinderProduceDto.getManufacturingDate().length()>10) { if(tzCylinderProduceDto.getManufacturingDate().length()>10) {
tzCylinderProduceDto.setManufacturingDate(tzCylinderProduceDto.getManufacturingDate().substring(0,10)); tzCylinderProduceDto.setManufacturingDate(tzCylinderProduceDto.getManufacturingDate().substring(0,10));
...@@ -95,15 +97,15 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind ...@@ -95,15 +97,15 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
DataDictionary data3 = iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>() DataDictionary data3 = iDataDictionaryService.getOne(new LambdaQueryWrapper<DataDictionary>()
.eq(DataDictionary::getSequenceNbr, tzCylinderInfoDto.getCylinderStatus())); .eq(DataDictionary::getSequenceNbr, tzCylinderInfoDto.getCylinderStatus()));
tzCylinderInfoDto.setCylinderStatus(data3 != null ? data3.getName() : null); tzCylinderInfoDto.setCylinderStatus(data3 != null ? data3.getName() : null);
TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(orgCode); TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(sequenceCode, appId);
if ( !ValidationUtil.isEmpty(tzCylinderTagsDto) && !ValidationUtil.isEmpty(tzCylinderTagsDto.getGasCylinderStamp())) { if ( !ValidationUtil.isEmpty(tzCylinderTagsDto) && !ValidationUtil.isEmpty(tzCylinderTagsDto.getGasCylinderStamp())) {
tzCylinderTagsDto.setGasCylinderStamp(tzCylinderTagsDto.getGasCylinderStamp()); tzCylinderTagsDto.setGasCylinderStamp(tzCylinderTagsDto.getGasCylinderStamp());
} }
List<TzCylinderInspectionDto> tzCylinderInspectionDtoList = tzCylinderMapper List<TzCylinderInspectionDto> tzCylinderInspectionDtoList = tzCylinderMapper
.getTzCylinderInspectionDto(orgCode); .getTzCylinderInspectionDto(sequenceCode, appId);
List<TzCylinderFillingDto> tzCylinderFillingDtoList = tzCylinderMapper.getTzCylinderFillingDto(orgCode); List<TzCylinderFillingDto> tzCylinderFillingDtoList = tzCylinderMapper.getTzCylinderFillingDto(sequenceCode);
/** /**
* 取气瓶追溯详情 充装前检查项 名称和结果列表 * 取气瓶追溯详情 充装前检查项 名称和结果列表
...@@ -183,9 +185,12 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind ...@@ -183,9 +185,12 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
public CylinderFileUrlDto getFileUrlAndName(String sequenceNbr){ public CylinderFileUrlDto getFileUrlAndName(String sequenceNbr){
String orgCode = tzCylinderMapper.getSequencCode(sequenceNbr);
TzCylinderProduceDto tzCylinderProduceDto = tzCylinderMapper.getTzCylinderProduceDto(orgCode); Map<String, Object> cylinder = tzCylinderMapper.getSequencCode(sequenceNbr);
TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(orgCode); String appId = String.valueOf(cylinder.get("app_id"));
String sequenceCode = String.valueOf(cylinder.get("sequence_code"));
TzCylinderProduceDto tzCylinderProduceDto = tzCylinderMapper.getTzCylinderProduceDto(sequenceCode, appId);
TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(sequenceCode, appId);
CylinderFileUrlDto dto =new CylinderFileUrlDto(); CylinderFileUrlDto dto =new CylinderFileUrlDto();
if (!ValidationUtil.isEmpty(tzCylinderProduceDto)) { if (!ValidationUtil.isEmpty(tzCylinderProduceDto)) {
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getProductQualified())) { if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getProductQualified())) {
......
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