| | |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.SaasLogService; |
| | | import lombok.Synchronized; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private PlaQtyService plaQtyService; |
| | | @Autowired |
| | | private SaasLogService saasLogService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | @Synchronized |
| | | public void plaPakout(String brand, String locNo, String batch, Integer packageNo, String orderNo, String plaQtyId, String wrkNo, Double anfme, boolean isReplace) { |
| | | Pla pla = plaService.selectByBatchAndPackageNo(batch, packageNo,brand); |
| | | |
| | |
| | | //还原旧物料状态 |
| | | Pla plaOld = plaService.selectByBatchAndPackageNo(manPakOut.getBatch(), Integer.parseInt(manPakOut.getBarcode()), manPakOut.getMaktx()); |
| | | |
| | | //更新新物料信息 |
| | | plaNew.setQtyAnfme(plaOld.getQtyAnfme()); |
| | | plaNew.setStatus(plaOld.getStatus()); |
| | | plaService.updateById(plaNew); |
| | | |
| | | plaOld.setStatus(GlobleParameter.PLA_STATUS_1); |
| | | plaOld.setQtyAnfme(0.0); |
| | | plaOld.setQtyAnfme(plaOld.getQtyAnfme() - manPakOut.getCount()); |
| | | |
| | | plaService.updateById(plaOld); |
| | | |
| | |
| | | manPakOutService.updateById(manPakOut); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<Pla> pdaSelectInfmt(String barcode) { |
| | | EntityWrapper<Pla> plaEntityWrapper = new EntityWrapper<>(); |
| | | String[] split = barcode.split(";"); |
| | | if (split.length == 4){ |
| | | plaEntityWrapper.eq("brand",split[0]); |
| | | plaEntityWrapper.eq("batch",split[1]); |
| | | plaEntityWrapper.eq("package_no",split[2]); |
| | | plaEntityWrapper.eq("line",split[3]); |
| | | }else if (split.length == 1){ |
| | | Node node = nodeService.selectOne(new EntityWrapper<Node>().eq("name", barcode)); |
| | | if (Cools.isEmpty(node)){ |
| | | throw new CoolException("请检查输入的库位码"); |
| | | } |
| | | plaEntityWrapper.eq("loc_no",barcode); |
| | | |
| | | }else { |
| | | throw new CoolException("条码信息有误!"); |
| | | } |
| | | |
| | | |
| | | List<Pla> plaList = plaService.selectList(plaEntityWrapper); |
| | | if (Cools.isEmpty(plaList)){ |
| | | throw new CoolException("未查询到库存物料信息"); |
| | | } |
| | | return plaList; |
| | | } |
| | | } |