diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java index 316b038..ed45d70 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutTaskServiceImpl.java @@ -4,15 +4,20 @@ import com.ktg.common.utils.DateUtils; import com.ktg.mes.md.domain.*; import com.ktg.mes.md.mapper.*; import com.ktg.mes.md.service.IWmsOutTaskService; +import com.ktg.mes.wm.domain.UcmCtBase; +import com.ktg.mes.wm.domain.UcmCtMaterial; import com.ktg.mes.wm.domain.WmStorageArea; +import com.ktg.mes.wm.mapper.UcmCtBaseMapper; import com.ktg.mes.wm.mapper.WmStorageAreaMapper; -import com.ktg.mes.wm.service.IWmStorageAreaService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; /** @@ -44,6 +49,12 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService { @Autowired private WmStorageAreaMapper wmStorageAreaMapper; + @Autowired + private UcmCtBaseMapper ucmCtBaseMapper; + + @Autowired + private UcmCtMaterialMapper2 ucmCtMaterialMapper2; + /** * 查询出库任务 * @@ -211,6 +222,18 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService { 2, 1 ); + + // 获取料箱明细 + UcmCtMaterial ucmCtMaterialQuery = new UcmCtMaterial(); + ucmCtMaterialQuery.setBaseKnifeId(wmsOutPlanDetailEntity.getBaseKnifeId()); + List ucmCtMaterials = this.ucmCtMaterialMapper2.selectUcmCtMaterialList(ucmCtMaterialQuery); + ucmCtMaterials.forEach(ucmCtMaterial -> { + UcmCtBase ucmCtBase = this.ucmCtBaseMapper.selectUcmCtBaseByCtBaseId(ucmCtMaterial.getCtBaseId().toString()); + if (ucmCtBase != null) { + ucmCtBase.setAttr1(null); + this.ucmCtBaseMapper.updateUcmCtBase(ucmCtBase); + } + }); } // 更新出库任务状态