| | |
| | | import com.zy.asrs.wms.asrs.entity.enums.LocStsType; |
| | | import com.zy.asrs.wms.asrs.entity.param.FieldParam; |
| | | import com.zy.asrs.wms.asrs.entity.param.FieldSortParam; |
| | | import com.zy.asrs.wms.asrs.entity.param.LocDetlFreezeParam; |
| | | import com.zy.asrs.wms.asrs.mapper.LocDetlMapper; |
| | | import com.zy.asrs.wms.asrs.mapper.ViewLocDetlMapper; |
| | | import com.zy.asrs.wms.asrs.service.LanewayRuleService; |
| | |
| | | import com.zy.asrs.wms.common.domain.PageParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<LocDetl> queryStock(String matnr, String batch, List<FieldParam> param, List<FieldSortParam> sortParam) { |
| | | List<Map<String, Object>> list = viewLocDetlMapper.getList(matnr, batch, param, sortParam); |
| | | List<Map<String, Object>> list = viewLocDetlMapper.queryStock(matnr, batch, param, sortParam); |
| | | List<LocDetl> locDetlsSort = resortDetls(list); |
| | | return locDetlsSort; |
| | | } |
| | |
| | | return sortDirctDetls; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void locDetlFreeze(LocDetlFreezeParam param) { |
| | | if (param == null) { |
| | | throw new CoolException("参数不能为空"); |
| | | } |
| | | |
| | | if (param.getDetlIds() == null) { |
| | | throw new CoolException("库存明细参数不能为空"); |
| | | } |
| | | |
| | | if (param.getFreeze() == null) { |
| | | throw new CoolException("冻结参数不能为空"); |
| | | } |
| | | |
| | | List<LocDetl> locDetls = this.listByIds(param.getDetlIds()); |
| | | if(locDetls.isEmpty()){ |
| | | throw new CoolException("库存不存在"); |
| | | } |
| | | |
| | | for (LocDetl locDetl : locDetls) { |
| | | locDetl.setFreeze(param.getFreeze()); |
| | | locDetl.setUpdateTime(new Date()); |
| | | if (!this.updateById(locDetl)) { |
| | | throw new CoolException("更新失败"); |
| | | } |
| | | } |
| | | } |
| | | } |