修改金额保留两位小数
This commit is contained in:
+11
-7
@@ -1,6 +1,7 @@
|
||||
package com.jero.contract.controller;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -406,11 +407,14 @@ public class PaySpendingContractController extends JeroController<PaySpendingCon
|
||||
PaySpendingContractInstallment paySpendingContractInstallment = new PaySpendingContractInstallment();
|
||||
paySpendingContractInstallment.setContractId(paySpendingContract.getId());
|
||||
paySpendingContractInstallment.setPhaseName(sub.get(20 + (i * 5) + 0));
|
||||
paySpendingContractInstallment.setAccountsReceivableAmount(Integer.parseInt(sub.get(20 + (i * 5) + 1)));
|
||||
paySpendingContractInstallment.setAccountsReceivableAmount(new BigDecimal(sub.get(20 + (i * 5) + 1)));
|
||||
paySpendingContractInstallment.setAccountsReceivableTime(DateUtils.str2Date(sub.get(20 + (i * 5) + 2),new SimpleDateFormat("yyyy-MM-dd")));
|
||||
paySpendingContractInstallment.setPaidAmount(Integer.parseInt(sub.get(20 + (i * 5) + 3)));
|
||||
paySpendingContractInstallment.setPaidAmount(new BigDecimal(sub.get(20 + (i * 5) + 3)));
|
||||
paySpendingContractInstallment.setPaidTime(DateUtils.str2Date(sub.get(20 + (i * 5) + 4),new SimpleDateFormat("yyyy-MM-dd")));
|
||||
listPaySpendingContractInstallment.add(paySpendingContractInstallment);
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(listPaySpendingContractInstallment)){
|
||||
|
||||
}
|
||||
paySpendingContractInstallmentService.saveBatch(listPaySpendingContractInstallment);
|
||||
}
|
||||
@@ -442,14 +446,14 @@ public class PaySpendingContractController extends JeroController<PaySpendingCon
|
||||
paySpendingContract.setPrincipalName(map.get(5));
|
||||
paySpendingContract.setDepartmentName(map.get(6));
|
||||
paySpendingContract.setContractAmount(map.get(7));
|
||||
paySpendingContract.setRate(map.get(8));
|
||||
paySpendingContract.setNoTaxAmount(map.get(9));
|
||||
paySpendingContract.setRate(new BigDecimal(map.get(8)));
|
||||
paySpendingContract.setNoTaxAmount(new BigDecimal(map.get(9)));
|
||||
paySpendingContract.setContractDate(DateUtils.str2Date(map.get(10),new SimpleDateFormat("yyyy-MM-dd")));
|
||||
paySpendingContract.setTerminationDate(DateUtils.str2Date(map.get(10),new SimpleDateFormat("yyyy-MM-dd")));
|
||||
paySpendingContract.setContractTimePoints(map.get(12));
|
||||
paySpendingContract.setAccountsReceivableAmount(map.get(13));
|
||||
paySpendingContract.setAmountReceived(map.get(14));
|
||||
paySpendingContract.setOutstandingAmount(map.get(15));
|
||||
paySpendingContract.setAccountsReceivableAmount(new BigDecimal(map.get(13)));
|
||||
paySpendingContract.setAmountReceived(new BigDecimal(map.get(14)));
|
||||
paySpendingContract.setOutstandingAmount(new BigDecimal(map.get(15)));
|
||||
AtomicBoolean accountStatus = new AtomicBoolean(false);
|
||||
mapAccountStatus.forEach((k,v)->{
|
||||
if(Objects.equals(map.get(16),v)){
|
||||
|
||||
+14
-6
@@ -1,6 +1,8 @@
|
||||
package com.jero.contract.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -107,19 +109,22 @@ public class PayIncomeContract implements Serializable {
|
||||
@ApiModelProperty(value = "签订合同金额")
|
||||
@NotNull(message = "签订合同金额不能为空!")
|
||||
@Max(value = 999999999,message = "签订合同金额格式错误")
|
||||
private java.lang.Integer contractAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal contractAmount;
|
||||
/**税率*/
|
||||
@Excel(name = "税率", width = 15)
|
||||
@ApiModelProperty(value = "税率")
|
||||
@NotNull(message = "税率不能为空!")
|
||||
@Max(value = 100,message = "税率格式错误")
|
||||
private java.lang.String rate;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal rate;
|
||||
/**未税金额*/
|
||||
@Excel(name = "未税金额", width = 15)
|
||||
@ApiModelProperty(value = "未税金额")
|
||||
@NotNull(message = "未税金额不能为空!")
|
||||
@Max(value = 999999999,message = "未税金额格式错误")
|
||||
private java.lang.Integer noTaxAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal noTaxAmount;
|
||||
/**合同签订日期*/
|
||||
@Excel(name = "合同签订日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@@ -142,18 +147,21 @@ public class PayIncomeContract implements Serializable {
|
||||
@ApiModelProperty(value = "应收金额")
|
||||
@NotNull(message = "应收金额不能为空!")
|
||||
@Max(value = 999999999,message = "应收金额格式错误")
|
||||
private java.lang.Integer accountsReceivableAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal accountsReceivableAmount;
|
||||
/**已收金额*/
|
||||
@Excel(name = "已收金额", width = 15)
|
||||
@ApiModelProperty(value = "已收金额")
|
||||
@NotNull(message = "已收金额不能为空!")
|
||||
@Max(value = 999999999,message = "已收金额格式错误")
|
||||
private java.lang.Integer amountReceived;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal amountReceived;
|
||||
/**未收金额*/
|
||||
@Excel(name = "未收金额", width = 15)
|
||||
@ApiModelProperty(value = "未收金额")
|
||||
@Max(value = 999999999,message = "未收金额格式错误")
|
||||
private java.lang.String outstandingAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal outstandingAmount;
|
||||
/**账款状态(1:未支付,2:部分支付,3:已付全款)*/
|
||||
@Excel(name = "账款状态(1:未支付,2:部分支付,3:已付全款)", width = 15)
|
||||
@ApiModelProperty(value = "账款状态(1:未支付,2:部分支付,3:已付全款)")
|
||||
|
||||
+6
-2
@@ -1,6 +1,8 @@
|
||||
package com.jero.contract.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -51,7 +53,8 @@ public class PayIncomeContractInstallment implements Serializable {
|
||||
@ApiModelProperty(value = "应收金额")
|
||||
@NotEmpty(message = "应收金额不能为空")
|
||||
@Max(value = 999999999,message = "应收金额格式错误")
|
||||
private java.lang.Integer accountsReceivableAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal accountsReceivableAmount;
|
||||
/**应收时间*/
|
||||
@Excel(name = "应收时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@@ -62,7 +65,8 @@ public class PayIncomeContractInstallment implements Serializable {
|
||||
@Excel(name = "实收金额", width = 15)
|
||||
@ApiModelProperty(value = "实收金额")
|
||||
@Max(value = 999999999,message = "实收金额格式错误")
|
||||
private java.lang.Integer paidAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal paidAmount;
|
||||
/**实收时间*/
|
||||
@Excel(name = "实收时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
|
||||
+11
-5
@@ -1,6 +1,7 @@
|
||||
package com.jero.contract.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -87,11 +88,13 @@ public class PaySpendingContract implements Serializable {
|
||||
/**税率*/
|
||||
@Excel(name = "税率", width = 15)
|
||||
@ApiModelProperty(value = "税率")
|
||||
private String rate;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal rate;
|
||||
/**未税金额*/
|
||||
@Excel(name = "未税金额", width = 15)
|
||||
@ApiModelProperty(value = "未税金额")
|
||||
private String noTaxAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal noTaxAmount;
|
||||
/**合同签订日期*/
|
||||
@Excel(name = "合同签订日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@@ -111,15 +114,18 @@ public class PaySpendingContract implements Serializable {
|
||||
/**应收金额*/
|
||||
@Excel(name = "应收金额", width = 15)
|
||||
@ApiModelProperty(value = "应收金额")
|
||||
private String accountsReceivableAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal accountsReceivableAmount;
|
||||
/**已收金额*/
|
||||
@Excel(name = "已收金额", width = 15)
|
||||
@ApiModelProperty(value = "已收金额")
|
||||
private String amountReceived;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal amountReceived;
|
||||
/**未收金额*/
|
||||
@Excel(name = "未收金额", width = 15)
|
||||
@ApiModelProperty(value = "未收金额")
|
||||
private String outstandingAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal outstandingAmount;
|
||||
/**账款状态(1:未支付,2:部分支付,3:已付全款)*/
|
||||
@Excel(name = "账款状态(1:未支付,2:部分支付,3:已付全款)", width = 15)
|
||||
@ApiModelProperty(value = "账款状态(1:未支付,2:部分支付,3:已付全款)")
|
||||
|
||||
+5
-2
@@ -1,6 +1,7 @@
|
||||
package com.jero.contract.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -49,7 +50,8 @@ public class PaySpendingContractInstallment implements Serializable {
|
||||
@Excel(name = "应收金额", width = 15)
|
||||
@ApiModelProperty(value = "应收金额")
|
||||
@Max(value = 999999999,message = "应收金额格式错误")
|
||||
private Integer accountsReceivableAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal accountsReceivableAmount;
|
||||
/**应收时间*/
|
||||
@Excel(name = "应收时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@@ -60,7 +62,8 @@ public class PaySpendingContractInstallment implements Serializable {
|
||||
@Excel(name = "实收金额", width = 15)
|
||||
@ApiModelProperty(value = "实收金额")
|
||||
@Max(value = 999999999,message = "应收金额格式错误")
|
||||
private Integer paidAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal paidAmount;
|
||||
/**实收时间*/
|
||||
@Excel(name = "实收时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
|
||||
+1
@@ -43,6 +43,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.jero.contract.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@@ -54,12 +56,14 @@ public class ProjectOutput implements Serializable {
|
||||
* 应收金额
|
||||
*/
|
||||
@ApiModelProperty(value = "应收金额")
|
||||
private Integer receivableAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal receivableAmount;
|
||||
/**
|
||||
* 实收金额
|
||||
*/
|
||||
@ApiModelProperty(value = "实收金额")
|
||||
private Integer paidAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal paidAmount;
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user