| | |
| | | import com.zy.asrs.mapper.PlaMapper; |
| | | import com.zy.asrs.service.PlaQtyService; |
| | | import com.zy.asrs.service.PlaService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.system.entity.User; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | //退回 |
| | | public void returned(List<PlaQty> plaQties, User user) { |
| | | plaQties.forEach(plaQty -> { |
| | | PlaQty plaQtyOut = plaQtyService.selectById(plaQty.getId()); |
| | | plaQtyOut.setReturned(1); |
| | | plaQtyService.updateById(plaQtyOut); |
| | | |
| | | PlaQty plaQtyReturned = new PlaQty(); |
| | | plaQtyReturned.setBatch(plaQtyOut.getBatch()); |
| | | plaQtyReturned.setPackageNo(plaQtyOut.getPackageNo()); |
| | | plaQtyReturned.setCreateTime(new Date()); |
| | | plaQtyReturned.setLocNo(plaQtyOut.getLocNo()); |
| | | plaQtyReturned.setOrderNo(plaQtyOut.getOrderNo()); |
| | | plaQtyReturned.setPakoutTime(Utils.getDateStr(new Date())); |
| | | plaQtyReturned.setOrderWeight(0 - plaQtyOut.getOrderWeight()); |
| | | plaQtyReturned.setHandlerBy(user.getUsername()); |
| | | plaQtyReturned.setCustomer(plaQtyOut.getCustomer()); |
| | | plaQtyReturned.setMemo(plaQty.getMemo()); |
| | | plaQtyService.insert(plaQtyReturned); |
| | | |
| | | Pla pla = this.selectByBatchAndPackageNo(plaQty.getBatch(), plaQty.getPackageNo()); |
| | | pla.setStatus("待入库"); |
| | | |
| | | this.updateById(pla); |
| | | |
| | | }); |
| | | } |
| | | } |