|
@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.book.service.inout.InoutService; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
@ -23,6 +24,8 @@ import javax.annotation.security.PermitAll; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import javax.validation.Valid; |
|
|
import javax.validation.Valid; |
|
|
import java.io.IOException; |
|
|
import java.io.IOException; |
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
|
|
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
|
@ -89,6 +92,16 @@ public class AppInoutController { |
|
|
return success(pageResult); |
|
|
return success(pageResult); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/allList") |
|
|
|
|
|
@Operation(summary = "获得个人记账分页") |
|
|
|
|
|
@PermitAll |
|
|
|
|
|
public CommonResult<List<InoutRespVO>> allList(@Valid InoutPageReqVO pageReqVO) { |
|
|
|
|
|
Long loginUserId = getLoginUserId(); |
|
|
|
|
|
pageReqVO.setUserId(loginUserId); |
|
|
|
|
|
List<InoutRespVO> allList = inoutService.allList(pageReqVO); |
|
|
|
|
|
return success(allList); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/export-excel") |
|
|
@GetMapping("/export-excel") |
|
|
@Operation(summary = "导出个人记账 Excel") |
|
|
@Operation(summary = "导出个人记账 Excel") |
|
|
@PreAuthorize("@ss.hasPermission('book:inout:export')") |
|
|
@PreAuthorize("@ss.hasPermission('book:inout:export')") |
|
@ -109,6 +122,13 @@ public class AppInoutController { |
|
|
public CommonResult<Double> myListTol(@Valid InoutPageReqVO pageReqVO) { |
|
|
public CommonResult<Double> myListTol(@Valid InoutPageReqVO pageReqVO) { |
|
|
Long loginUserId = getLoginUserId(); |
|
|
Long loginUserId = getLoginUserId(); |
|
|
pageReqVO.setUserId(loginUserId); |
|
|
pageReqVO.setUserId(loginUserId); |
|
|
|
|
|
if(StringUtils.isEmpty(pageReqVO.getUseDateStart())){ |
|
|
|
|
|
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM"); |
|
|
|
|
|
String format1 = format.format(new Date()); |
|
|
|
|
|
System.out.println(format1); |
|
|
|
|
|
pageReqVO.setUseDateStart(format1); |
|
|
|
|
|
pageReqVO.setUseDateEnd(format1); |
|
|
|
|
|
} |
|
|
Double tol= inoutService.myListTol(pageReqVO); |
|
|
Double tol= inoutService.myListTol(pageReqVO); |
|
|
return success(tol); |
|
|
return success(tol); |
|
|
} |
|
|
} |
|
|