bug尝试修复

This commit is contained in:
2025-07-15 15:20:26 +08:00
parent 68c4320a58
commit 0aadd61d5b
4 changed files with 9 additions and 18 deletions

View File

@@ -557,11 +557,8 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
IndustryMaterial industryMaterial = new IndustryMaterial();
industryMaterial.setBatchId(industryMaterialDto.getBatchId());
int pos = -1;
Long state = industryMaterialDto.getState();
// 3代表的是该批次中存在道次异常下面的查询时直接跳过这个批次
state = state == 3 ? 5 : state;
// 查询下一个应该将operation改为 1 的批次 并且为同一状态
industryMaterial.setState(state);
industryMaterial.setState(5L);
industryMaterial.setDelFlag(1L);
// 查出连同正在运行的道次以及左边料物信息
List<IndustryMaterialVo> industryMaterialVos = industryMaterialMapper.selectIndustryMaterialAndStepList(industryMaterial);
@@ -574,7 +571,8 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
// 判断列表是否只有一个对象 如果是的话则不需要更新字段operation
if (industryMaterialVos.size() == 1) {
redisCache.setCacheObject("nextStepFlagError", 1L, 100, TimeUnit.HOURS);
return 1;
// 如果只有一个对象且此对象存在了道次异常则将其opration置为0
return 0;
}
// 记录当前正在运行的是第几个

View File

@@ -141,14 +141,7 @@ public class IndustryStepServiceImpl implements IIndustryStepService {
@Override
public List<IndustryStepVo> selectIndustryStepListByProcess(IndustryStep industryStep) {
List<IndustryStepVo> industryStepVos = industryStepMapper.selectIndustryStepList(industryStep);
if (industryStepVos.isEmpty()) {
// 表示该批次没有出现道次 直接return
industryStep = new IndustryStep();
industryStep.setMaterialId(industryStep.getMaterialId());
industryStep.setBatchId(industryStep.getBatchId());
return industryStepMapper.selectIndustryStepList(industryStep);
}
List<IndustryStepVo> industryStepVos = industryStepMapper.selectErrorIndustryStepList(industryStep);
int pos = 0;
for (IndustryStepVo resultStepVo : industryStepVos) {
if (resultStepVo.getOperation() == 1L) {

View File

@@ -55,8 +55,8 @@
<select id="selectIndustryMaterialList" parameterType="IndustryMaterial" resultMap="IndustryMaterialResult">
<include refid="selectIndustryMaterialVo"/>
<where>
<if test="specification != null and specification != ''">and specification = #{specification}</if>
<if test="technology != null and technology != ''">and technology = #{technology}</if>
<if test="specification != null">and specification = #{specification}</if>
<if test="technology != null">and technology = #{technology}</if>
<if test="operation != null ">and operation = #{operation}</if>
<if test="diameter != null ">and diameter = #{diameter}</if>
<if test="batchId != null ">and batch_id = #{batchId}</if>
@@ -67,7 +67,7 @@
<if test="finalDiameter != null and finalDiameter != ''">and final_diameter = #{finalDiameter}</if>
<if test="weight != null and weight != ''">and weight = #{weight}</if>
<if test="width != null and width != ''">and width = #{width}</if>
<if test="delFlag != null and delFlag != ''">and del_flag = #{delFlag}</if>
<if test="delFlag != null">and del_flag = #{delFlag}</if>
</where>
order by sort
</select>

View File

@@ -54,8 +54,8 @@
<if test="angle != null ">and angle = #{angle}</if>
<if test="operation != null ">and operation = #{operation}</if>
<if test="state != null ">and state = #{state}</if>
<if test="materialId != null and materialId != ''">and material_id = #{materialId}</if>
<if test="batchId != null and batchId != ''">and batch_id = #{batchId}</if>
<if test="materialId != null">and material_id = #{materialId}</if>
<if test="batchId != null">and batch_id = #{batchId}</if>
</where>
order by step
</select>