| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 移动端服务核心类 |
| | |
| | | // if (jsonOrderDetl.getAnfme() > manPakOut.getAnfme()) { //判断工作数量是否大于拣货单的数量 |
| | | // return R.error("出库数量大于拣货单总数量"); |
| | | // } |
| | | if (jsonOrderDetl.getAnfme() > (manPakOut.getAnfme()-manPakOut.getCount())) { //判断工作数量是否大于拣货单剩余可出的数量 |
| | | BigDecimal a1 = new BigDecimal(manPakOut.getAnfme()); |
| | | BigDecimal b1 = new BigDecimal(manPakOut.getCount()); |
| | | Double c1 = a1.subtract(b1).doubleValue(); |
| | | if (jsonOrderDetl.getAnfme() > c1) { //判断工作数量是否大于拣货单剩余可出的数量 |
| | | return R.error("出库数量大于拣货单剩余可出数量"); |
| | | } |
| | | if (orderDetl.getWorkQty() - orderDetl.getQty() <jsonOrderDetl.getAnfme() ){ |
| | | |
| | | BigDecimal e1 = new BigDecimal(orderDetl.getWorkQty()); |
| | | BigDecimal f1 = new BigDecimal(orderDetl.getQty()); |
| | | Double g1 = e1.subtract(f1).doubleValue(); |
| | | if ( g1 <jsonOrderDetl.getAnfme() ){ |
| | | return R.error("出库数量大于单据剩余可出数量"); |
| | | } |
| | | //查询平库中是否有一样的物料号 |
| | |
| | | if(jsonOrderDetl.getWeight() == null){ |
| | | jsonOrderDetl.setWeight(0.0); |
| | | } |
| | | Double finalQty = checkManLocDetl.getAnfme() - jsonOrderDetl.getAnfme(); |
| | | Double weight = checkManLocDetl.getWeight() - jsonOrderDetl.getWeight(); |
| | | Double finalQty = new BigDecimal(checkManLocDetl.getAnfme()).subtract(new BigDecimal(jsonOrderDetl.getAnfme())).doubleValue() ; |
| | | Double weight = new BigDecimal(checkManLocDetl.getWeight()).subtract(new BigDecimal(jsonOrderDetl.getWeight())).doubleValue() ; |
| | | checkManLocDetl.setAnfme(finalQty); |
| | | checkManLocDetl.setWeight(weight); |
| | | if (weight < 0){ |
| | |
| | | List<WaitPakin> waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", jsonBarNo)); //获取对应组托信息 |
| | | if (Cools.isEmpty(waitPakins)){ |
| | | return R.error("未查询到组托"); |
| | | } else if (waitPakins.get(0).getIoStatus() == "Y") { |
| | | } else if (waitPakins.get(0).getIoStatus().equals("Y")) { |
| | | return R.error("组托已经生成工作档"); |
| | | } |
| | | |