修复bug

This commit is contained in:
2025-08-11 13:58:12 +08:00
parent 9581a11ade
commit 7c3279e71a
3 changed files with 8 additions and 2 deletions

View File

@@ -71,6 +71,7 @@ public interface IndustryMaterialMapper
* @return 结果
*/
public int deleteIndustryMaterialByIds(String[] ids);
public int deleteMaterialById(String id);
List<IndustryMaterialVo> selectIndustryMaterialByBatchId(Long batchId);

View File

@@ -227,10 +227,9 @@ public class IndustryMaterialServiceImpl implements IIndustryMaterialService {
}
if (id.equals(redisCache.getCacheObject("rightId"))) {
redisCache.deleteObject("rightId");
s7PLC.writeString("DB44.30","\u0000\u0000\u0000\u0000");
}
industryMaterialMapper.deleteIndustryMaterialById(id);
industryMaterialMapper.deleteMaterialById(id);
List<IndustryMaterialVo> industryMaterialVos = industryMaterialMapper.selectIndustryMaterialByBatchId(batchId);
// 进行重新排列
for (int i = 1; i <= industryMaterialVos.size(); i++) {

View File

@@ -381,6 +381,12 @@
#{id}
</foreach>
</delete>
<delete id="deleteMaterialById" parameterType="String">
delete from industry_material where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteIndustryMaterialByState" parameterType="Long">
delete from industry_material where state = #{state}