#上架时判断小数给price字段插入1,不是小数插入2,订单出库优先出小数
| | |
| | | if (orderDetl.getAnfme() - (jsonOrderDetl.getAnfme() + orderDetl.getWorkQty()) < 0) { |
| | | return R.error("入库数量大于可入数量"); |
| | | } |
| | | |
| | | |
| | | //查询平库中是否有一样的物料号,有的话直接增加数量 |
| | | ManLocDetl checkManLocDetl = manLocDetlService.selectInventory(jsonLocNo,orderDetl.getMatnr(),jsonOrderDetl.getBatch()); |
| | | if (checkManLocDetl == null) { |
| | | |
| | | ManLocDetl manLocDetl = new ManLocDetl(); |
| | | Synchro.Copy(orderDetl, manLocDetl); |
| | | |
| | | BigDecimal decimal = BigDecimal.valueOf(jsonOrderDetl.getAnfme()).subtract(BigDecimal.valueOf(jsonOrderDetl.getAnfme()).setScale(0,BigDecimal.ROUND_DOWN)); |
| | | if (decimal.doubleValue() > 0){ |
| | | manLocDetl.setPrice(1.0); |
| | | }else { |
| | | manLocDetl.setPrice(2.0); |
| | | } |
| | | |
| | | |
| | | |
| | | manLocDetl.setLocNo(node.getName()); |
| | | manLocDetl.setNodeId(node.getId()); |
| | | manLocDetl.setMatnr(orderDetl.getMatnr()); |
| | |
| | | </choose> |
| | | |
| | | order by |
| | | a.manu,DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme |
| | | a.price,a.manu,DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme |
| | | desc, |
| | | NEWID(), |
| | | case |