| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | @ApiOperation("统计") |
| | | @PostMapping("statistics") |
| | | public R<BillStatisticsDto> statistics(@RequestBody TBillQuery query){ |
| | | query.setBusinessDeptId(SecurityUtils.getBusinessDeptId()); |
| | | BillStatisticsDto dto = tBillService.statistics(query); |
| | | return R.ok(dto); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取合同分页列表") |
| | | @PostMapping(value = "/contractList") |
| | |
| | | } |
| | | bill.setBusinessDeptId(businessDeptId); |
| | | tBillService.saveBill(bill); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("@ss.hasPermi('bill:list:editAmount')") |
| | | @PostMapping("editAmount") |
| | | @ApiOperation("修改账单金额") |
| | | public R editAmount(@Validated @RequestBody TbillSaveDto bill){ |
| | | if (StringUtils.isEmpty(bill.getId())){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | if (bill.getEditAmount().compareTo(BigDecimal.ZERO)==0){ |
| | | return R.fail("调整金额不能为0"); |
| | | } |
| | | |
| | | tBillService.editAmount(bill); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation("统计") |
| | | @GetMapping("statistics") |
| | | public R<BillStatisticsDto> statistics(){ |
| | | BillStatisticsDto dto = tBillService.statistics(SecurityUtils.getBusinessDeptId()); |
| | | return R.ok(dto); |
| | | } |
| | | |
| | | |
| | | |
| | | |