自动化立体仓库 - WMS系统
zyx
2024-02-18 16daa2a44e5fa705e671f5ff18631eb26ad70d40
src/main/java/com/zy/asrs/service/impl/PlaServiceImpl.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.Cools;
import com.core.exception.CoolException;
import com.zy.asrs.entity.OrderDetl;
import com.zy.asrs.entity.Pla;
import com.zy.asrs.entity.PlaQty;
@@ -117,8 +118,9 @@
            //直接更新pla的库存
            Pla pla = this.selectByBatchAndPackageNo(plaQty.getBatch(), plaQty.getPackageNo());
            //pla.setStatus(GlobleParameter.PLA_STATUS_0);
            pla.setModifyTime(new Date());
            pla.setWeightAnfme(plaQty.getOrderWeight());
            pla.setWeightAnfme(pla.getWeightAnfme() + plaQty.getOrderWeight());
            pla.setStatus(GlobleParameter.PLA_STATUS_1);
            this.updateById(pla);
@@ -126,4 +128,23 @@
        });
    }
    @Override
    @Transactional
    public void viladate(List<Pla> plas, User user) {
        plas.forEach(pla -> {
            if(!pla.getStatus().equals(GlobleParameter.PLA_STATUS_00)){
               throw new CoolException("选中的数据不是暂入库状态,请核对状态");
            }
            pla = this.selectById(pla.getId());
            pla.setModifyTime(new Date());
            pla.setStatus(GlobleParameter.PLA_STATUS_0);
            this.updateById(pla);
        });
    }
    @Override
    public List<Pla> selectToHistory() {
        return this.selectList(new EntityWrapper<Pla>().eq("status",GlobleParameter.PLA_STATUS_4));
    }
}