修改bug#41520
This commit is contained in:
+2
-2
@@ -80,11 +80,11 @@ public class PayIncomeContractCommon {
|
||||
*/
|
||||
public final static List<String> LIST_SPENDING_CONTRACT = Arrays.asList("合同编号","合同名称","签订单位","签订联系人","是否开口","负责人",
|
||||
"部门名称","签订合同总金额","税率","未税金额","合同签订日期","合同终止日期","合同约定主要时点",
|
||||
"应付金额","已付金额","未付金额","账款状态","合同约定付款次数","是否打包","打包年份");
|
||||
"应收金额","已收金额","未收金额","账款状态","合同约定付款次数");
|
||||
/**
|
||||
* 支出合同分期信息excel 表头
|
||||
*/
|
||||
public final static List<String> LIST_SPENDING_CONTRACT_INSTALLMENT = Arrays.asList("阶段","阶段应付","阶段应付时间","阶段实付","阶段实付时间");
|
||||
public final static List<String> LIST_SPENDING_CONTRACT_INSTALLMENT = Arrays.asList("阶段","阶段应收","阶段应收时间","阶段实收","阶段实收时间");
|
||||
|
||||
/**
|
||||
* 来源(1:收入合同,2:打包管理)
|
||||
|
||||
-3
@@ -287,7 +287,6 @@ public class PaySpendingContractController extends JeroController<PaySpendingCon
|
||||
map.put("terminationDate",DateUtils.date2Str(p.getTerminationDate(),new SimpleDateFormat("yyyy-MM-dd")));
|
||||
map.put("opening",sysBaseAPI.translateDict("yn",String.valueOf(p.getOpening())));
|
||||
map.put("accountStatus",sysBaseAPI.translateDict("revenue_contract_account_status",String.valueOf(p.getAccountStatus())));
|
||||
map.put("pack",sysBaseAPI.translateDict("yn",String.valueOf(p.getPack())));
|
||||
List<PaySpendingContractInstallment> listSub = listPaySpendingContractInstallment.stream().filter(item->
|
||||
Objects.equals(p.getId(),item.getContractId())).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(listSub)){
|
||||
@@ -330,8 +329,6 @@ public class PaySpendingContractController extends JeroController<PaySpendingCon
|
||||
filedsList.add(new ExcelExportEntity("未收金额", "outstandingAmount"));
|
||||
filedsList.add(new ExcelExportEntity("账款状态", "accountStatus"));
|
||||
filedsList.add(new ExcelExportEntity("合同约定付款次数", "contractPaymentTimes"));
|
||||
filedsList.add(new ExcelExportEntity("是否打包", "pack"));
|
||||
filedsList.add(new ExcelExportEntity("打包年份", "packYear"));
|
||||
int count = mapCount.get("count");
|
||||
if(count > 0){
|
||||
for (int i = 1; i <= count; i++){
|
||||
|
||||
+14
-14
@@ -134,25 +134,25 @@ public class PaySpendingContract implements Serializable {
|
||||
@ApiModelProperty(value = "合同约定主要时点")
|
||||
@Size(max = 200, message = "合同约定主要时点不能大于200个字符")
|
||||
private String contractTimePoints;
|
||||
/**应付金额*/
|
||||
@Excel(name = "应付金额", width = 15)
|
||||
@ApiModelProperty(value = "应付金额")
|
||||
@NotNull(message = "应付金额不能为空")
|
||||
/**应收金额*/
|
||||
@Excel(name = "应收金额", width = 15)
|
||||
@ApiModelProperty(value = "应收金额")
|
||||
@NotNull(message = "应收金额不能为空")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@DecimalMax(value = "9999999999.99",message = "应付金额格式错误")
|
||||
@DecimalMax(value = "9999999999.99",message = "应收金额格式错误")
|
||||
private BigDecimal accountsReceivableAmount;
|
||||
/**已付金额*/
|
||||
@Excel(name = "已付金额", width = 15)
|
||||
@ApiModelProperty(value = "已付金额")
|
||||
@NotNull(message = "已付金额不能为空")
|
||||
/**已收金额*/
|
||||
@Excel(name = "已收金额", width = 15)
|
||||
@ApiModelProperty(value = "已收金额")
|
||||
@NotNull(message = "已收金额不能为空")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@DecimalMax(value = "9999999999.99",message = "已付金额格式错误")
|
||||
@DecimalMax(value = "9999999999.99",message = "已收金额格式错误")
|
||||
private BigDecimal amountReceived;
|
||||
/**未付金额*/
|
||||
@Excel(name = "未付金额", width = 15)
|
||||
@ApiModelProperty(value = "未付金额")
|
||||
/**未收金额*/
|
||||
@Excel(name = "未收金额", width = 15)
|
||||
@ApiModelProperty(value = "未收金额")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@DecimalMax(value = "9999999999.99",message = "未付金额格式错误")
|
||||
@DecimalMax(value = "9999999999.99",message = "未收金额格式错误")
|
||||
private BigDecimal outstandingAmount;
|
||||
/**账款状态(1:未支付,2:部分支付,3:已付全款)*/
|
||||
@Excel(name = "账款状态(1:未支付,2:部分支付,3:已付全款)", width = 15)
|
||||
|
||||
+15
-15
@@ -47,30 +47,30 @@ public class PaySpendingContractInstallment implements Serializable {
|
||||
@NotEmpty(message = "阶段不能为空")
|
||||
@Size(max = 50, message = "阶段长度不能大于50个字符")
|
||||
private String phaseName;
|
||||
/**应付金额*/
|
||||
@Excel(name = "阶段应付金额", width = 15)
|
||||
@ApiModelProperty(value = "应付金额")
|
||||
@NotNull(message = "阶段应付不能为空")
|
||||
@DecimalMax(value = "9999999999.99",message = "阶段应付格式错误")
|
||||
/**应收金额*/
|
||||
@Excel(name = "阶段应收金额", width = 15)
|
||||
@ApiModelProperty(value = "应收金额")
|
||||
@NotNull(message = "阶段应收不能为空")
|
||||
@DecimalMax(value = "9999999999.99",message = "阶段应收格式错误")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal accountsReceivableAmount;
|
||||
/**应付时间*/
|
||||
@Excel(name = "阶段应付时间", width = 15, format = "yyyy-MM-dd")
|
||||
/**应收时间*/
|
||||
@Excel(name = "阶段应收时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "应付时间")
|
||||
@ApiModelProperty(value = "应收时间")
|
||||
private Date accountsReceivableTime;
|
||||
/**实付金额*/
|
||||
@Excel(name = "阶段实付金额", width = 15)
|
||||
@ApiModelProperty(value = "阶段实付金额")
|
||||
@DecimalMax(value = "9999999999.99",message = "阶段实付格式错误")
|
||||
/**实收金额*/
|
||||
@Excel(name = "阶段实收金额", width = 15)
|
||||
@ApiModelProperty(value = "阶段实收金额")
|
||||
@DecimalMax(value = "9999999999.99",message = "阶段实收格式错误")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private BigDecimal paidAmount;
|
||||
/**实付时间*/
|
||||
@Excel(name = "实付时间", width = 15, format = "yyyy-MM-dd")
|
||||
/**实收时间*/
|
||||
@Excel(name = "实收时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "实付时间")
|
||||
@ApiModelProperty(value = "实收时间")
|
||||
private Date paidTime;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
|
||||
+1
-24
@@ -294,9 +294,7 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
|
||||
});
|
||||
int count1 = count - listSpendingContract.size();
|
||||
if(count1 != 0){
|
||||
Pattern p = Pattern.compile("[0-9]*");
|
||||
Matcher m = p.matcher(String.valueOf(count1 / 5));
|
||||
if (!m.matches()){
|
||||
if (count1 % 5 != 0){
|
||||
throw new JeroBootException("文件格式有误,请下载模板后上传!");
|
||||
}
|
||||
int count2 = count1 / listSpendingContractInstallment.size();
|
||||
@@ -610,27 +608,6 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
|
||||
}
|
||||
|
||||
paySpendingContract.setContractPaymentTimes(map.get(17));
|
||||
if(StringUtils.isEmpty(map.get(18))){
|
||||
sb.append("第").append(n).append("行:是否打包不能为空,请修改。<br/>");
|
||||
}else{
|
||||
mapPack.forEach((k,v)->{
|
||||
if(Objects.equals(map.get(18),k)){
|
||||
paySpendingContract.setPack(Integer.parseInt(v));
|
||||
}
|
||||
});
|
||||
if(Objects.isNull(paySpendingContract.getPack())){
|
||||
sb.append("第").append(n).append("行:是否打包格式错误,请修改。<br/>");
|
||||
paySpendingContract.setPack(2);
|
||||
}
|
||||
// 打包获取打包年份
|
||||
if(Objects.equals(paySpendingContract.getPack(),PayIncomeContractCommon.PACK1)){
|
||||
if(StringUtils.isEmpty(map.get(19))){
|
||||
sb.append("第").append(n).append("行:打包年份不能为空,请修改。<br/>");
|
||||
}else{
|
||||
paySpendingContract.setPackYear(map.get(19));
|
||||
}
|
||||
}
|
||||
}
|
||||
return paySpendingContract;
|
||||
}
|
||||
|
||||
|
||||
-6
@@ -62,12 +62,6 @@ public class PaySpendingContractExcelModel implements Serializable {
|
||||
/**合同约定付款次数*/
|
||||
@Excel(name = "合同约定付款次数", width = 15)
|
||||
private String contractPaymentTimes;
|
||||
/**是否打包(1:是,0:否)*/
|
||||
@Excel(name = "是否打包", width = 15)
|
||||
private Integer pack;
|
||||
/**打包年份*/
|
||||
@Excel(name = "打包年份", width = 15)
|
||||
private String packYear;
|
||||
/**阶段名称*/
|
||||
@Excel(name = "1阶段", width = 15)
|
||||
private String phaseName1;
|
||||
|
||||
Reference in New Issue
Block a user