| | |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.api.domain.ShopBalanceStatement; |
| | | import com.ruoyi.other.api.domain.ShopBalanceStatementCopy; |
| | | import com.ruoyi.other.dto.ShopBalanceDto; |
| | | import com.ruoyi.other.mapper.ShopBalanceStatementCopyMapper; |
| | | import com.ruoyi.other.mapper.ShopBalanceStatementMapper; |
| | | import com.ruoyi.other.service.ShopBalanceStatementService; |
| | | import com.ruoyi.other.service.ShopService; |
| | |
| | | private ShopService shopService; |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | @Resource |
| | | private ShopBalanceStatementCopyMapper shopBalanceStatementCopyMapper; |
| | | |
| | | |
| | | |
| | |
| | | shopBalanceStatementService.save(shopBalanceStatement); |
| | | } |
| | | |
| | | @PostMapping("/saveShopBalanceStatementCopy") |
| | | public void saveShopBalanceStatementCopy(@RequestBody ShopBalanceStatementCopy shopBalanceStatementCopy){ |
| | | shopBalanceStatementCopyMapper.insert(shopBalanceStatementCopy); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteShopBalanceStatementCopy") |
| | | public R<Boolean> deleteShopBalanceStatementCopy(@RequestParam("orderId") Long orderId, @RequestParam("type") List<Integer> type){ |
| | | shopBalanceStatementCopyMapper.delete(new LambdaQueryWrapper<ShopBalanceStatementCopy>().in(ShopBalanceStatementCopy::getType, type) |
| | | .eq(ShopBalanceStatementCopy::getObjectId, orderId)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/getShopBalanceStatementCopy") |
| | | public R<List<ShopBalanceStatementCopy>> getShopBalanceStatementCopy(@RequestParam("orderId") Long orderId, @RequestParam("type") List<Integer> type){ |
| | | List<ShopBalanceStatementCopy> shopBalanceStatementCopies = shopBalanceStatementCopyMapper.selectList(new LambdaQueryWrapper<ShopBalanceStatementCopy>().in(ShopBalanceStatementCopy::getType, type) |
| | | .eq(ShopBalanceStatementCopy::getObjectId, orderId)); |
| | | return R.ok(shopBalanceStatementCopies); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取门店流水数据 |
| | |
| | | } |
| | | |
| | | @PostMapping("/getShopBalanceStatementList2") |
| | | public R<List<ShopBalanceStatement>> getShopBalanceStatementList2(@RequestParam("type") Integer type, |
| | | public R<List<ShopBalanceStatement>> getShopBalanceStatementList2(@RequestParam("type") Integer type, @RequestParam(value = "shopId") Integer shopId, |
| | | @RequestParam(value = "date") LocalDateTime date){ |
| | | List<ShopBalanceStatement> list = shopBalanceStatementService.list(new LambdaQueryWrapper<ShopBalanceStatement>() |
| | | LambdaQueryWrapper<ShopBalanceStatement> queryWrapper = new LambdaQueryWrapper<ShopBalanceStatement>() |
| | | .eq(ShopBalanceStatement::getType, type) |
| | | .between(ShopBalanceStatement::getCreateTime, date.with(LocalTime.MIN), date.with(LocalTime.MAX))); |
| | | .between(ShopBalanceStatement::getCreateTime, date.with(LocalTime.MIN), date.with(LocalTime.MAX)); |
| | | if(null != shopId && 0 != shopId){ |
| | | queryWrapper.eq(ShopBalanceStatement::getShopId, shopId); |
| | | } |
| | | List<ShopBalanceStatement> list = shopBalanceStatementService.list(queryWrapper); |
| | | return R.ok(list); |
| | | } |
| | | } |