| | |
| | | public ApiResult<TOrderAccountVO> detail(Integer id) { |
| | | TOrderAccountVO res = new TOrderAccountVO(); |
| | | TOrder byId = orderService.getById(id); |
| | | TOrderAccounting one = orderAccountingService.lambdaQuery().eq(TOrderAccounting::getOrderId, id).one(); |
| | | if (byId.getUserId()!=null){ |
| | | TAppUser byId1 = appUserService.getById(byId.getUserId()); |
| | | if(byId1!=null){ |
| | |
| | | BigDecimal goodsMoney = new BigDecimal("0"); |
| | | BigDecimal costMoney = new BigDecimal("0"); |
| | | BigDecimal constConfirm = new BigDecimal("0"); |
| | | if (one!=null){ |
| | | |
| | | } |
| | | for (TOrderGoods orderGood : orderGoods) { |
| | | goodsMoney =goodsMoney.add(orderGood.getGoodsMoney()); |
| | | costMoney=costMoney.add(orderGood.getCost()==null?new BigDecimal("0"):orderGood.getCost()); |
| | |
| | | return ApiResult.success(res); |
| | | } |
| | | @ApiOperation(value = "确认核算操作") |
| | | @PostMapping(value = "/confirm") |
| | | public ApiResult confirm(@RequestBody TOrderAccountingQuery query) { |
| | | if (StringUtils.hasLength(query.getStartTime())){ |
| | | query.setStartTime(query.getStartTime()+" 00:00:00"); |
| | | query.setEndTime(query.getEndTime()+" 23:59:59"); |
| | | } |
| | | PageInfo<TOrderVO> res = orderAccountingService.pageList(query); |
| | | return ApiResult.success(res); |
| | | @GetMapping(value = "/confirm") |
| | | public ApiResult confirm() { |
| | | return ApiResult.success(); |
| | | } |
| | | } |
| | | |