重新修改盈亏逻辑
This commit is contained in:
@@ -235,15 +235,16 @@ public class SysOaProjectController extends BaseController {
|
||||
public TableDataInfo<ProjectProfitLossVO> projectProfit(
|
||||
@RequestParam(required = false) String projectName,
|
||||
@RequestParam(required = false) String projectNum,
|
||||
@RequestParam(required = false) String projectCode,
|
||||
@RequestParam(required = false) Integer tradeType,
|
||||
@RequestParam(required = false) String projectStatus,
|
||||
@RequestParam(required = false) String isDomestic,
|
||||
@RequestParam(required = false) BigDecimal minContractAmount,
|
||||
@RequestParam(required = false) BigDecimal maxContractAmount,
|
||||
@RequestParam(required = false) BigDecimal minProfitLoss,
|
||||
@RequestParam(required = false) BigDecimal maxProfitLoss,
|
||||
@RequestParam(required = false) String beginTimeStart,
|
||||
@RequestParam(required = false) String beginTimeEnd,
|
||||
@RequestParam(required = false) String profitType, // "profit" 只看盈利, "loss" 只看亏损, null看全部
|
||||
@RequestParam(required = false) String profitType,
|
||||
@RequestParam(required = false, defaultValue = "profit_loss") String sortField,
|
||||
@RequestParam(required = false, defaultValue = "desc") String sortOrder,
|
||||
PageQuery pageQuery
|
||||
@@ -252,7 +253,7 @@ public class SysOaProjectController extends BaseController {
|
||||
pageQuery.setIsAsc(sortOrder);
|
||||
System.out.println("收到");
|
||||
return iSysOaProjectService.getProjectProfitLossList(
|
||||
projectName, projectNum, projectStatus,isDomestic,
|
||||
projectName, projectNum, projectCode, tradeType, projectStatus,
|
||||
minContractAmount, maxContractAmount,
|
||||
minProfitLoss, maxProfitLoss,
|
||||
beginTimeStart, beginTimeEnd, profitType, pageQuery);
|
||||
|
||||
@@ -11,6 +11,8 @@ public class ProjectProfitLossVO {
|
||||
private Long projectId;
|
||||
private String projectName;
|
||||
private String projectNum;
|
||||
private String projectCode;
|
||||
private Integer tradeType;
|
||||
private Date beginTime;
|
||||
private String projectStatus;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
|
||||
@@ -24,7 +24,7 @@ public interface ISysOaProjectService {
|
||||
/**
|
||||
* 项目盈亏排序
|
||||
*/
|
||||
TableDataInfo<ProjectProfitLossVO> getProjectProfitLossList(String projectName,String projectNum,String projectStatus,String isisDomestic,
|
||||
TableDataInfo<ProjectProfitLossVO> getProjectProfitLossList(String projectName,String projectNum,String projectCode,Integer tradeType,String projectStatus,
|
||||
BigDecimal minContractAmount,BigDecimal maxContractAmount,BigDecimal minProfitLoss,
|
||||
BigDecimal maxProfitLoss,String beginTimeStart,String beginTimeEnd,String profitType,
|
||||
PageQuery pageQuery);
|
||||
|
||||
@@ -70,10 +70,9 @@ public class SysOaProjectServiceImpl implements ISysOaProjectService {
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ProjectProfitLossVO> getProjectProfitLossList(
|
||||
String projectName, String projectNum, String projectStatus, String isDomestic,
|
||||
BigDecimal minContractAmount, BigDecimal maxContractAmount,
|
||||
BigDecimal minProfitLoss, BigDecimal maxProfitLoss,
|
||||
String beginTimeStart, String beginTimeEnd, String profitType,
|
||||
String projectName,String projectNum,String projectCode,Integer tradeType,String projectStatus,
|
||||
BigDecimal minContractAmount,BigDecimal maxContractAmount,BigDecimal minProfitLoss,
|
||||
BigDecimal maxProfitLoss,String beginTimeStart,String beginTimeEnd,String profitType,
|
||||
PageQuery pageQuery
|
||||
) {
|
||||
// 1. 获取实时汇率
|
||||
@@ -83,6 +82,8 @@ public class SysOaProjectServiceImpl implements ISysOaProjectService {
|
||||
QueryWrapper<SysOaProject> wrapper = new QueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(projectName), "p.project_name", projectName);
|
||||
wrapper.like(StringUtils.isNotBlank(projectNum), "p.project_num", projectNum);
|
||||
wrapper.like(StringUtils.isNotBlank(projectCode), "p.project_code", projectCode);
|
||||
wrapper.eq(tradeType != null, "p.trade_type", tradeType);
|
||||
wrapper.eq(StringUtils.isNotBlank(projectStatus), "p.project_status", projectStatus);
|
||||
wrapper.ge(minContractAmount != null, "p.funds", minContractAmount);
|
||||
wrapper.le(maxContractAmount != null, "p.funds", maxContractAmount);
|
||||
|
||||
@@ -821,6 +821,8 @@
|
||||
p.project_id,
|
||||
p.project_name,
|
||||
p.project_num,
|
||||
p.project_code,
|
||||
p.trade_type,
|
||||
p.begin_time,
|
||||
p.project_status,
|
||||
p.funds AS original_funds,
|
||||
|
||||
Reference in New Issue
Block a user