Browse Source

工作台查询接口修改

tags/24080901
WendyYang 8 months ago
parent
commit
e98a977be3
4 changed files with 20 additions and 24 deletions
  1. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java
  2. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Purchase.java
  3. +3
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml
  4. +13
    -19
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/model/vo/WorkbenchVO.java

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java View File

@@ -230,9 +230,9 @@ public class PurchaseManage {
.throwMessage("提交失败,该项目不是待采购备案状态或者已立项阶段");
Purchase purchase = new Purchase();
purchase.setPurchaseMethod(req.getPurchaseMethod());
purchase.setBizAddress(req.getBidAddress());
purchase.setBidAddress(req.getBidAddress());
purchase.setBidName(req.getBidName());
purchase.setBizBudget(req.getBidBudget());
purchase.setBidBudget(req.getBidBudget());
purchase.setBidDoc(req.getBidDoc());
purchase.setBidStartTime(req.getBidStartTime());
purchase.setBidEndTime(req.getBidEndTime());


+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Purchase.java View File

@@ -87,10 +87,10 @@ public class Purchase {
private String budgetExecConfirmNo;

@ApiModelProperty("投标地址")
private String bizAddress;
private String bidAddress;

@ApiModelProperty("标项预算")
private BigDecimal bizBudget;
private BigDecimal bidBudget;

@ApiModelProperty("开标时间")
private LocalDateTime bidStartTime;


+ 3
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/ProjectMapper.xml View File

@@ -30,7 +30,8 @@
id,
project_name,
project_year,
build_org_code,
NULL annual_plan_amount,
build_org_code,
build_org_name,
project_code,
project_type,
@@ -307,6 +308,7 @@
id,
project_name,
project_year,
NULL annual_plan_amount,
build_org_code,
build_org_name,
project_code,


+ 13
- 19
hz-pm-api/src/main/java/com/hz/pm/api/workbench/model/vo/WorkbenchVO.java View File

@@ -1,5 +1,6 @@
package com.hz.pm.api.workbench.model.vo;

import cn.hutool.core.util.ObjectUtil;
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO;
import com.hz.pm.api.sys.model.vo.NoticeListItemVO;
import com.hz.pm.api.sys.model.vo.ProjectEarlyWarningVO;
@@ -23,7 +24,7 @@ import java.util.Objects;
* @Author PoffyZhang
*/
@Data
public class WorkbenchVO implements Serializable {
public class WorkbenchVO {

@ApiModelProperty("待办中心统计数据 以及代办处理")
public TodoCenterStatisticsVO todoCerter;
@@ -38,7 +39,7 @@ public class WorkbenchVO implements Serializable {
public List<ProjectLibListItemVO> projects;

@ApiModelProperty("公告列表")
public Map<String,List<NoticeListItemVO>> noticeList;
public Map<String, List<NoticeListItemVO>> noticeList;

@ApiModelProperty("预警记录")
public List<EarlyWarning> earlyWarning;
@@ -126,36 +127,29 @@ public class WorkbenchVO implements Serializable {
@ApiModelProperty("立项总金额-较去年 增长")
private BigDecimal approvalAmountGrowthRate = BigDecimal.ZERO;

public BigDecimal getDeclaredAmountGrowthRate(){
if(Objects.isNull(declaredAmount)){
public BigDecimal getDeclaredAmountGrowthRate() {
if (Objects.isNull(declaredAmount)) {
this.declaredAmount = BigDecimal.ZERO;
}

// if((Objects.nonNull(declaredAmount)&&declaredAmount.compareTo(BigDecimal.ZERO) > 0) && (Objects.isNull(declaredAmountLastYear) ||
// declaredAmountLastYear.compareTo(BigDecimal.ZERO) == 0)){
// return BigDecimal.valueOf(100);
// }

if(Objects.nonNull(declaredAmountLastYear) && declaredAmountLastYear.compareTo(BigDecimal.ZERO) > 0){
if (!ObjectUtil.hasNull(declaredAmountLastYear, declaredAmountLastYear)
&& declaredAmountLastYear.compareTo(BigDecimal.ZERO) > 0) {
return declaredAmount.subtract(declaredAmountLastYear).multiply(BigDecimal.valueOf(100))
.divide(declaredAmountLastYear,BigDecimal.ROUND_CEILING)
.divide(declaredAmountLastYear, RoundingMode.CEILING)
.setScale(BigDecimal.ROUND_CEILING, RoundingMode.CEILING);
}
return BigDecimal.ZERO;
}

public BigDecimal getApprovalAmountGrowthRate(){
if(Objects.isNull(approvalAmount)){
public BigDecimal getApprovalAmountGrowthRate() {
if (Objects.isNull(approvalAmount)) {
this.approvalAmount = BigDecimal.ZERO;
}
// if((Objects.nonNull(approvalAmount)&&approvalAmount.compareTo(BigDecimal.ZERO) > 0) && (Objects.isNull(approvalAmountLastYear) ||
// approvalAmountLastYear.compareTo(BigDecimal.ZERO) == 0)){
// return BigDecimal.valueOf(100);
// }

if(Objects.nonNull(declaredAmountLastYear) && approvalAmountLastYear.compareTo(BigDecimal.ZERO) > 0){
if (!ObjectUtil.hasNull(declaredAmountLastYear, approvalAmountLastYear)
&& approvalAmountLastYear.compareTo(BigDecimal.ZERO) > 0) {
return approvalAmount.subtract(approvalAmountLastYear).multiply(BigDecimal.valueOf(100))
.divide(approvalAmountLastYear,BigDecimal.ROUND_CEILING)
.divide(approvalAmountLastYear, RoundingMode.CEILING)
.setScale(BigDecimal.ROUND_CEILING, RoundingMode.CEILING);
}
return BigDecimal.ZERO;


Loading…
Cancel
Save