Merge #109 into master from cc_20260420_export
feat:数量不一致 * cc_20260420_export: (7 commits squashed) - feat:提示修改 - feat:提示修改 - feat:导出调整 - feat:管理员查询所有 非管理员权限查询 - feat:管理员查询所有 非管理员权限查询 - feat:fix - feat:数量不一致 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/109
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package com.cool.store.converter;
|
||||
import com.alibaba.excel.converters.Converter;
|
||||
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||
import com.alibaba.excel.metadata.CellData;
|
||||
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
/**
|
||||
* @Auther zx_szh
|
||||
* @Date 2026/4/20 20:14
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class StringListConverter implements Converter<List<String>> {
|
||||
|
||||
@Override
|
||||
public Class<?> supportJavaTypeKey() {
|
||||
return List.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellDataTypeEnum supportExcelTypeKey() {
|
||||
return CellDataTypeEnum.STRING;
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取Excel时:将单元格字符串转换为 List<String>
|
||||
*/
|
||||
@Override
|
||||
public List<String> convertToJavaData(CellData cellData,
|
||||
ExcelContentProperty excelContentProperty,
|
||||
GlobalConfiguration globalConfiguration) throws Exception {
|
||||
// 获取单元格字符串值
|
||||
String cellValue = cellData.getStringValue();
|
||||
|
||||
// 空值判断
|
||||
if (StringUtils.isBlank(cellValue)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
// 按分隔符拆分(这里用逗号,可根据需要修改)
|
||||
return Arrays.stream(cellValue.split(","))
|
||||
.map(String::trim) // 去除前后空格
|
||||
.filter(StringUtils::isNotBlank) // 过滤空字符串
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 写入Excel时:将 List<String> 转换为字符串写入单元格
|
||||
*/
|
||||
@Override
|
||||
public CellData<String> convertToExcelData(List<String> strings,
|
||||
ExcelContentProperty excelContentProperty,
|
||||
GlobalConfiguration globalConfiguration) throws Exception {
|
||||
if (CollectionUtils.isEmpty(strings)) {
|
||||
return new CellData<>("");
|
||||
}
|
||||
|
||||
// 用逗号拼接(可根据需要修改分隔符)
|
||||
String result = String.join(",", strings);
|
||||
return new CellData<>(result);
|
||||
}
|
||||
}
|
||||
@@ -44,4 +44,6 @@ public class AdjustmentOrderPageRequest extends PageBasicInfo implements Seriali
|
||||
private Date claimEndTime;
|
||||
|
||||
private String storeId;
|
||||
|
||||
private List<String> regionIds;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.cool.store.annotation.DictField;
|
||||
import com.cool.store.converter.StringListConverter;
|
||||
import com.cool.store.enums.wallet.AdjustTypeEnum;
|
||||
import com.cool.store.enums.wallet.DocStatusEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -13,85 +20,154 @@ import java.util.List;
|
||||
public class AdjustmentOrderResponse implements Serializable {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("调整单号")
|
||||
@ExcelProperty(value = "调整单号", order = 1)
|
||||
@ColumnWidth(30)
|
||||
private String adjustmentNo;
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
@ExcelIgnore
|
||||
private String storeId;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
@ExcelProperty(value = "门店名称", order = 2)
|
||||
@ColumnWidth(30)
|
||||
private String storeName;
|
||||
|
||||
@ApiModelProperty("门店编码")
|
||||
@ExcelProperty(value = "门店编码", order = 3)
|
||||
@ColumnWidth(30)
|
||||
private String storeNum;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
@ExcelIgnore
|
||||
private String businessTypeCode;
|
||||
|
||||
@ApiModelProperty("业务类型名称")
|
||||
@DictField(sourceField="businessTypeCode")
|
||||
private String businessTypeName;
|
||||
|
||||
@ApiModelProperty("费用类型")
|
||||
@ExcelIgnore
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("费用类型名称")
|
||||
@DictField(sourceField= "expenseTypeCode")
|
||||
@ExcelProperty(value = "费用类型名称", order = 4)
|
||||
@ColumnWidth(30)
|
||||
private String expenseTypeName;
|
||||
|
||||
@ApiModelProperty("业务类型名称")
|
||||
@DictField(sourceField="businessTypeCode")
|
||||
@ExcelProperty(value = "业务类型名称", order = 5)
|
||||
@ColumnWidth(30)
|
||||
private String businessTypeName;
|
||||
|
||||
@ApiModelProperty("调整类型(1-调增 2-调减)")
|
||||
@ExcelIgnore
|
||||
private Integer adjustType;
|
||||
|
||||
@ApiModelProperty("调整类型(1-调增 2-调减)")
|
||||
@ExcelProperty(value = "调整类型名称", order = 6)
|
||||
@ColumnWidth(30)
|
||||
private String adjustTypeName;
|
||||
|
||||
|
||||
@ApiModelProperty("调整金额")
|
||||
@ExcelProperty(value = "调整金额", order = 7)
|
||||
@ColumnWidth(30)
|
||||
private BigDecimal adjustAmount;
|
||||
|
||||
@ApiModelProperty("调整原因")
|
||||
private String adjustReason;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
private String attachmentInfo;
|
||||
|
||||
@ApiModelProperty("单据状态(10-待充值/20-已充值待认款/30-认款完成/40-分部分账/50-分账完成)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("已分账金额")
|
||||
@ExcelProperty(value = "已分账金额", order = 8)
|
||||
@ColumnWidth(30)
|
||||
private BigDecimal settledAmount;
|
||||
|
||||
@ApiModelProperty("待分账金额")
|
||||
@ExcelProperty(value = "待分账金额", order = 9)
|
||||
@ColumnWidth(30)
|
||||
private BigDecimal pendingSettlementAmount;
|
||||
|
||||
@ApiModelProperty("调整原因")
|
||||
@ExcelProperty(value = "调整原因", order = 10)
|
||||
@ColumnWidth(30)
|
||||
private String adjustReason;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@ExcelProperty(value = "备注", order = 11)
|
||||
@ColumnWidth(30)
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("单据状态(10-待充值/20-已充值待认款/30-认款完成/40-分部分账/50-分账完成)")
|
||||
@ExcelIgnore
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("单据状态(10-待充值/20-已充值待认款/30-认款完成/40-分部分账/50-分账完成)")
|
||||
@ExcelProperty(value = "单据状态名称", order = 12)
|
||||
@ColumnWidth(30)
|
||||
private String statusName;
|
||||
|
||||
@ApiModelProperty("合同附件信息")
|
||||
@ExcelProperty(value = "合同附件信息", order = 13)
|
||||
@ColumnWidth(30)
|
||||
private String contractAttachmentInfo;
|
||||
|
||||
@ApiModelProperty("附件信息")
|
||||
@ExcelProperty(value = "附件信息", order = 14)
|
||||
@ColumnWidth(30)
|
||||
private String attachmentInfo;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
@ExcelIgnore
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
@ExcelProperty(value = "创建人姓名", order = 15)
|
||||
@ColumnWidth(30)
|
||||
private String createUserName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@ExcelProperty(value = "创建时间", order = 16)
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
@ColumnWidth(30)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("认领人ID")
|
||||
@ExcelIgnore
|
||||
private String claimUserId;
|
||||
|
||||
@ApiModelProperty("认领人姓名")
|
||||
@ExcelProperty(value = "认领人姓名", order = 17)
|
||||
@ColumnWidth(30)
|
||||
private String claimUserName;
|
||||
|
||||
@ApiModelProperty("认领时间")
|
||||
@ExcelProperty(value = "认领时间", order = 18)
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
@ColumnWidth(30)
|
||||
private Date claimTime;
|
||||
|
||||
@ApiModelProperty("费用单类型 1-费用单 2-调整单")
|
||||
private Integer expenseSheetType;
|
||||
|
||||
@ApiModelProperty("合同附件信息")
|
||||
private String contractAttachmentInfo;
|
||||
|
||||
@ApiModelProperty("关联银行流水号")
|
||||
@ExcelProperty(value = "关联银行流水号", order = 19,converter = StringListConverter.class)
|
||||
@ColumnWidth(30)
|
||||
private List<String> tradeNoList;
|
||||
|
||||
@ApiModelProperty("支付时间")
|
||||
@ExcelProperty(value = "支付时间", order = 20)
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
@ColumnWidth(30)
|
||||
private Date payTime;
|
||||
|
||||
@ApiModelProperty("费用单类型 1-费用单 2-调整单")
|
||||
@ExcelIgnore
|
||||
private Integer expenseSheetType;
|
||||
|
||||
public String getAdjustTypeName() {
|
||||
AdjustTypeEnum adjustTypeEnum = AdjustTypeEnum.fromCode(this.adjustType);
|
||||
return adjustTypeEnum!=null?adjustTypeEnum.getDesc():"";
|
||||
}
|
||||
|
||||
public String getStatusName() {
|
||||
DocStatusEnum docStatusEnum = DocStatusEnum.fromStatus(this.status);
|
||||
return docStatusEnum!=null?docStatusEnum.getDesc():"";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.cool.store.annotation.DictField;
|
||||
import com.cool.store.enums.wallet.SplitSourceEnum;
|
||||
import com.cool.store.enums.wallet.SplitTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@@ -12,74 +18,142 @@ import java.util.Date;
|
||||
public class SplitOrderResponse implements Serializable {
|
||||
|
||||
@ApiModelProperty("主键ID")
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("分账单号")
|
||||
@ExcelProperty(value = "分账单号", order = 10)
|
||||
@ColumnWidth(30)
|
||||
private String splitNo;
|
||||
|
||||
@ApiModelProperty("分账类型(1-门店付款/2-门店收款/3-公司间结算)")
|
||||
@ExcelIgnore
|
||||
private Integer splitType;
|
||||
|
||||
@ApiModelProperty("分账类型名称(1-门店付款/2-门店收款/3-公司间结算)")
|
||||
@ExcelProperty(value = "分账类型名称", order = 20)
|
||||
@ColumnWidth(30)
|
||||
private String splitTypeName;
|
||||
|
||||
@ApiModelProperty("关联门店")
|
||||
@ExcelIgnore
|
||||
private String relatedStoreId;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
@ExcelProperty(value = "门店名称", order = 30)
|
||||
@ColumnWidth(30)
|
||||
private String storeName;
|
||||
|
||||
@ApiModelProperty("门店编码")
|
||||
@ExcelProperty(value = "门店编码", order = 40)
|
||||
@ColumnWidth(30)
|
||||
private String storeNum;
|
||||
|
||||
@ApiModelProperty("付款账户名称")
|
||||
@ExcelProperty(value = "付款账户名称", order = 50)
|
||||
@ColumnWidth(30)
|
||||
private String payerAccountName;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
@ExcelProperty(value = "付款账户", order = 60)
|
||||
@ColumnWidth(30)
|
||||
private String payerAccountNo;
|
||||
|
||||
@ApiModelProperty("收款账户")
|
||||
private String payeeAccountNo;
|
||||
|
||||
@ApiModelProperty("分账失败原因")
|
||||
private String failReason;
|
||||
|
||||
@ApiModelProperty("收款账户名称")
|
||||
@ExcelProperty(value = "收款账户名称", order = 70)
|
||||
@ColumnWidth(30)
|
||||
private String payeeAccountName;
|
||||
|
||||
@ApiModelProperty("收款账户")
|
||||
@ExcelProperty(value = "收款账户", order = 80)
|
||||
@ColumnWidth(30)
|
||||
private String payeeAccountNo;
|
||||
|
||||
@ApiModelProperty("费用类型")
|
||||
@ExcelIgnore
|
||||
private String expenseTypeCode;
|
||||
|
||||
@ApiModelProperty("费用类型名称")
|
||||
@DictField(sourceField = "expenseTypeCode")
|
||||
@ExcelProperty(value = "费用类型名称", order = 100)
|
||||
@ColumnWidth(30)
|
||||
private String expenseTypeName;
|
||||
|
||||
@ApiModelProperty("分账金额")
|
||||
@ExcelProperty(value = "分账金额", order = 110)
|
||||
@ColumnWidth(30)
|
||||
private BigDecimal splitAmount;
|
||||
|
||||
@ApiModelProperty("关联单据号(如费用调整单号)")
|
||||
@ExcelProperty(value = "关联单据号", order = 120)
|
||||
@ColumnWidth(30)
|
||||
private String relatedDocNo;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@ExcelProperty(value = "备注", order = 130)
|
||||
@ColumnWidth(30)
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("状态(待分账/已完成)")
|
||||
@ExcelIgnore
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("状态名称(待分账/已完成)")
|
||||
@ExcelProperty(value = "状态", order = 140)
|
||||
@ColumnWidth(30)
|
||||
private Integer statusName;
|
||||
|
||||
@ApiModelProperty("分账失败原因")
|
||||
@ExcelProperty(value = "分账失败原因", order = 150)
|
||||
@ColumnWidth(30)
|
||||
private String failReason;
|
||||
|
||||
@ApiModelProperty("确认人")
|
||||
@ExcelIgnore
|
||||
private String confirmer;
|
||||
|
||||
@ApiModelProperty("确认人姓名")
|
||||
@ExcelProperty(value = "确认人姓名", order = 160)
|
||||
@ColumnWidth(30)
|
||||
private String confirmerName;
|
||||
|
||||
@ApiModelProperty("确认时间")
|
||||
@ExcelProperty(value = "确认时间", order = 170)
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
@ColumnWidth(30)
|
||||
private Date confirmTime;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
@ExcelIgnore
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("创建人姓名")
|
||||
@ExcelProperty(value = "创建人姓名", order = 180)
|
||||
@ColumnWidth(30)
|
||||
private String createUserName;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@ExcelProperty(value = "创建时间", order = 190)
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
@ColumnWidth(30)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("单据来源(1-手工新增/2-费用调整单/3-费用单)")
|
||||
@ExcelIgnore
|
||||
private Integer source;
|
||||
|
||||
@ApiModelProperty("单据来源名称(1-手工新增/2-费用调整单/3-费用单)")
|
||||
@ExcelProperty(value = "单据来源名称", order = 200)
|
||||
@ColumnWidth(30)
|
||||
private String sourceName;
|
||||
|
||||
public String getSplitTypeName() {
|
||||
SplitTypeEnum splitTypeEnum = SplitTypeEnum.fromStatus(this.splitType);
|
||||
return splitTypeEnum!=null?splitTypeEnum.getDesc():"-";
|
||||
}
|
||||
|
||||
public String getSourceName() {
|
||||
SplitSourceEnum splitSourceEnum = SplitSourceEnum.fromStatus(this.source);
|
||||
return splitSourceEnum!=null?splitSourceEnum.getDesc():"-";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user