| | |
| | | |
| | | |
| | | // 获取上一条最新的数据 |
| | | TErpProcurement tErpProcurement1 = this.baseMapper.selectOne(new QueryWrapper<TErpProcurement>().orderByDesc("create_time").last("limit 1")); |
| | | TErpProcurement tErpProcurement1 = this.baseMapper.selectOne(new QueryWrapper<TErpProcurement>().orderByDesc("create_time").orderByDesc("procurement_code").last("limit 1")); |
| | | if(tErpProcurement1==null){ |
| | | tErpProcurement.setProcurementCode("C" + DateUtils.dateTimeNow()+"00001"); |
| | | }else { |
| | |
| | | //TODO 确定这个是采购价还是销售价格 |
| | | tErpSupplierOutbound.setTotalMoney(tErpProcurementGoods.getPurchasePrice().multiply(new BigDecimal(purchaseCount))); |
| | | |
| | | TErpSupplierOutbound last = erpSupplierOutboundMapper.selectOne(new LambdaQueryWrapper<TErpSupplierOutbound>().orderByDesc(BaseModel::getCreateTime).last("limit 1")); |
| | | TErpSupplierOutbound last = erpSupplierOutboundMapper.selectOne(new LambdaQueryWrapper<TErpSupplierOutbound>().orderByDesc(BaseModel::getCreateTime).orderByDesc(TErpSupplierOutbound::getOutboundNumber).last("limit 1")); |
| | | if(last==null){ |
| | | tErpSupplierOutbound.setOutboundNumber("G" + DateUtils.dateTimeNow()+"00001"); |
| | | }else { |
| | |
| | | tErpSupplierOutbound.setOutboundType(7); |
| | | //TODO 确定这个是采购价还是销售价格 |
| | | tErpSupplierOutbound.setTotalMoney(tErpProcurementGoods.getPurchasePrice().multiply(new BigDecimal(purchaseCount))); |
| | | TErpSupplierOutbound last = erpSupplierOutboundMapper.selectOne(new LambdaQueryWrapper<TErpSupplierOutbound>().orderByDesc(BaseModel::getCreateTime).last("limit 1")); |
| | | TErpSupplierOutbound last = erpSupplierOutboundMapper.selectOne(new LambdaQueryWrapper<TErpSupplierOutbound>().orderByDesc(BaseModel::getCreateTime).orderByDesc(TErpSupplierOutbound::getOutboundNumber).last("limit 1")); |
| | | if(last==null){ |
| | | tErpSupplierOutbound.setOutboundNumber("G" + DateUtils.dateTimeNow()+"00001"); |
| | | }else { |