修改金额保留两位小数
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;
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
|
||||
+1
@@ -137,6 +137,7 @@ public class PayCommonProjectController extends JeroController<PayCommonProject,
|
||||
List<PayCommonProjectOutput> listNew = new ArrayList<>();
|
||||
List<PayCommonProjectOutput> listPayCommonProjectOutputNew = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
// todo 缺少更具合同打包状态筛选打包年份数据
|
||||
List<String> listProjectId = list.stream().map(PayCommonProject::getId).collect(Collectors.toList());
|
||||
// 获取已经关联合同的普通项目
|
||||
LambdaQueryWrapper<PayIncomeContractAssociated> queryPayIncomeContractAssociated = new LambdaQueryWrapper<>();
|
||||
|
||||
+5
-4
@@ -1,5 +1,6 @@
|
||||
package com.jero.project.controller;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -164,13 +165,13 @@ public class PayWorkingGroupController extends JeroController<PayWorkingGroup, I
|
||||
payWorkingGroupPayment.setAllPayment(listAllPayment.size());
|
||||
// 部分付款
|
||||
List<PayWorkingGroupSubItem> listPartPayment = listPayWorkingGroupSubItem.stream()
|
||||
.filter(p1->(Objects.isNull(p1.getPaidAmount()) ? 0 : p1.getPaidAmount())
|
||||
< (Objects.isNull(p1.getReceivableAmount()) ? 0 : p1.getReceivableAmount())).collect(Collectors.toList());
|
||||
.filter(p1->(Objects.isNull(p1.getPaidAmount()) ? new BigDecimal("0.00") : p1.getPaidAmount()).
|
||||
compareTo(Objects.isNull(p1.getReceivableAmount()) ? new BigDecimal("0.00") : p1.getReceivableAmount()) == -1).collect(Collectors.toList());
|
||||
payWorkingGroupPayment.setPartPayment(listPartPayment.size());
|
||||
// 未付款
|
||||
List<PayWorkingGroupSubItem> listNotPayment = listPayWorkingGroupSubItem.stream()
|
||||
.filter(p1->(Objects.isNull(p1.getPaidAmount()) ? 0 : p1.getPaidAmount()) == 0
|
||||
&& (Objects.isNull(p1.getReceivableAmount()) ? 0 : p1.getReceivableAmount()) != 0 )
|
||||
.filter(p1->(Objects.isNull(p1.getPaidAmount()) ? new BigDecimal("0.00") : p1.getPaidAmount()).compareTo(BigDecimal.ZERO) == 0
|
||||
&& (Objects.isNull(p1.getReceivableAmount()) ? new BigDecimal("0.00") : p1.getReceivableAmount()).compareTo(BigDecimal.ZERO) != 0 )
|
||||
.collect(Collectors.toList());
|
||||
payWorkingGroupPayment.setNotPayment(listNotPayment.size());
|
||||
p.setObj(payWorkingGroupPayment);
|
||||
|
||||
+5
-2
@@ -1,6 +1,7 @@
|
||||
package com.jero.project.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
@@ -99,12 +100,14 @@ public class PayCommonProject implements Serializable {
|
||||
@ApiModelProperty(value = "应收金额(元)")
|
||||
@NotNull(message = "应收金额(元)不能为空!")
|
||||
@Max(value = 999999999,message = "应收金额(元)格式错误")
|
||||
private Integer receivableAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal receivableAmount;
|
||||
/**实收金额(元)*/
|
||||
@Excel(name = "实收金额(元)", width = 15)
|
||||
@ApiModelProperty(value = "实收金额(元)")
|
||||
@Max(value = 999999999,message = "实收金额(元)格式错误")
|
||||
private Integer paidAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal paidAmount;
|
||||
/**邮寄联系人id*/
|
||||
@Excel(name = "邮寄联系人id", width = 15)
|
||||
@ApiModelProperty(value = "邮寄联系人id")
|
||||
|
||||
+5
-2
@@ -1,6 +1,7 @@
|
||||
package com.jero.project.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
@@ -83,7 +84,8 @@ public class PayWorkingGroup implements Serializable {
|
||||
@Excel(name = "本年应收款A(元)", width = 15)
|
||||
@ApiModelProperty(value = "本年应收款A(元)")
|
||||
@Max(value = 999999999,message = "本年应收款A(元)格式错误")
|
||||
private Integer yearChargeA;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal yearChargeA;
|
||||
/**收费通知号A*/
|
||||
@Excel(name = "收费通知号A", width = 15)
|
||||
@ApiModelProperty(value = "收费通知号A")
|
||||
@@ -98,7 +100,8 @@ public class PayWorkingGroup implements Serializable {
|
||||
@Excel(name = "本年应收款B(元)", width = 15)
|
||||
@ApiModelProperty(value = "本年应收款B(元)")
|
||||
@Max(value = 999999999,message = "本年应收款B(元)格式错误")
|
||||
private Integer yearChargeB;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal yearChargeB;
|
||||
/**收费通知号B*/
|
||||
@Excel(name = "收费通知号B", width = 15)
|
||||
@ApiModelProperty(value = "收费通知号B")
|
||||
|
||||
+6
-2
@@ -1,6 +1,8 @@
|
||||
package com.jero.project.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;
|
||||
@@ -94,11 +96,13 @@ public class PayWorkingGroupSubItem implements Serializable {
|
||||
@Excel(name = "应收金额(元)", width = 15)
|
||||
@ApiModelProperty(value = "应收金额(元)")
|
||||
@Max(value = 999999999,message = "应收金额(元)格式错误")
|
||||
private java.lang.Integer receivableAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal receivableAmount;
|
||||
/**实收金额(元)*/
|
||||
@ApiModelProperty(value = "实收金额(元)")
|
||||
@Max(value = 999999999,message = "实收金额(元)格式错误")
|
||||
private java.lang.Integer paidAmount;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal paidAmount;
|
||||
/**来款用途(字典表)*/
|
||||
@Excel(name = "来款用途(字典表)", width = 15)
|
||||
@ApiModelProperty(value = "来款用途(字典表)")
|
||||
|
||||
Reference in New Issue
Block a user