| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.LocDetlAdjustParam; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ManLocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos) { |
| | | return this.baseMapper.queryStock(matnr, batch, orderNo, locNos); |
| | | public List<LocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos,String supp,String temp1,String temp2) { |
| | | return this.baseMapper.queryStock(matnr, batch, orderNo, locNos,supp,temp1,temp2); |
| | | } |
| | | |
| | | @Override |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer sum() { |
| | | public Double sum() { |
| | | |
| | | return this.baseMapper.sum(); |
| | | } |
| | |
| | | manLocDetl.setUnit(mat.getUnit()); |
| | | manLocDetl.setBarcode(mat.getBarcode()); |
| | | manLocDetl.setPrice(mat.getPrice()); |
| | | manLocDetl.setDanger(locDetlAdjust.getDanger()); |
| | | SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme()); |
| | | this.baseMapper.insert(manLocDetl); |
| | | } |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public void adjustLocDetl2(LocDetlAdjustParam param, Long userId) { |
| | | Date now = new Date(); |
| | | this.baseMapper.delete(new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", param.getLocNo())); |
| | | for (LocDetlAdjustParam.LocDetlAdjust locDetlAdjust : param.getList()) { |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>() |
| | | .eq("matnr", locDetlAdjust.getMatnr())); |
| | | if (mat == null) { |
| | | throw new CoolException("无法找到需要调整的物料,请联系管理员"); |
| | | } |
| | | Node node = nodeService.selectOne(new EntityWrapper<Node>() |
| | | .eq("uuid", param.getLocNo())); |
| | | if (node == null) { |
| | | throw new CoolException("无法找到需要调整的库位,请联系管理员"); |
| | | |
| | | } |
| | | ManLocDetl manLocDetl = new ManLocDetl(); |
| | | manLocDetl.setLocNo(param.getLocNo()); |
| | | manLocDetl.setNodeId(node.getId()); |
| | | manLocDetl.setZpallet(mat.getBarcode()); |
| | | manLocDetl.setAnfme(locDetlAdjust.getCount()); |
| | | manLocDetl.setMatnr(mat.getMatnr()); |
| | | manLocDetl.setMaktx(mat.getMaktx()); |
| | | manLocDetl.setName(mat.getName()); |
| | | manLocDetl.setSpecs(mat.getSpecs()); |
| | | manLocDetl.setModel(mat.getModel()); |
| | | manLocDetl.setBatch(locDetlAdjust.getBatch()); |
| | | manLocDetl.setUnit(mat.getUnit()); |
| | | manLocDetl.setBarcode(mat.getBarcode()); |
| | | manLocDetl.setPrice(mat.getPrice()); |
| | | manLocDetl.setDanger(locDetlAdjust.getDanger()); |
| | | SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme()); |
| | | this.baseMapper.insert(manLocDetl); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Page<ManLocDetl> selectAllPage(Page<ManLocDetl> param) { |
| | | Map<String, Object> condition = param.getCondition(); |
| | | List<ManLocDetl> manLocDetls = baseMapper.selectAllPage(condition); |
| | | param.setRecords(manLocDetls); |
| | | param.setTotal(baseMapper.selectAllPageSize(condition)); |
| | | return param; |
| | | } |
| | | |
| | | @Override |
| | | public List<ManLocDetl> getStockStatisExcel() { |
| | | return this.baseMapper.getStockStatisExcel(); |
| | | } |
| | | } |