选择性导出
This commit is contained in:
parent
8286416fd4
commit
24b0cd66c5
@ -27,21 +27,9 @@ public class SaleOutSheetExportModel extends BaseBo<SaleOutSheet> implements Exc
|
|||||||
/**
|
/**
|
||||||
* 单号
|
* 单号
|
||||||
*/
|
*/
|
||||||
@ExcelProperty("业务单据号")
|
@ExcelProperty("单据号")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
/**
|
|
||||||
* 仓库编号
|
|
||||||
*/
|
|
||||||
@ExcelProperty("仓库编号")
|
|
||||||
private String scCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 仓库名称
|
|
||||||
*/
|
|
||||||
@ExcelProperty("仓库名称")
|
|
||||||
private String scName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户编号
|
* 客户编号
|
||||||
*/
|
*/
|
||||||
@ -54,18 +42,18 @@ public class SaleOutSheetExportModel extends BaseBo<SaleOutSheet> implements Exc
|
|||||||
@ExcelProperty("客户名称")
|
@ExcelProperty("客户名称")
|
||||||
private String customerName;
|
private String customerName;
|
||||||
|
|
||||||
/**
|
|
||||||
* 销售员姓名
|
|
||||||
*/
|
|
||||||
@ExcelProperty("销售员")
|
|
||||||
private String salerName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单据总金额
|
* 单据总金额
|
||||||
*/
|
*/
|
||||||
@ExcelProperty("单据总金额")
|
@ExcelProperty("单据总金额")
|
||||||
private BigDecimal totalAmount;
|
private BigDecimal totalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售员姓名
|
||||||
|
*/
|
||||||
|
@ExcelProperty("销售员")
|
||||||
|
private String salerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品数量
|
* 商品数量
|
||||||
*/
|
*/
|
||||||
@ -145,10 +133,6 @@ public class SaleOutSheetExportModel extends BaseBo<SaleOutSheet> implements Exc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void afterInit(SaleOutSheet dto) {
|
protected void afterInit(SaleOutSheet dto) {
|
||||||
|
|
||||||
StoreCenterService storeCenterService = ApplicationUtil.getBean(StoreCenterService.class);
|
|
||||||
StoreCenter sc = storeCenterService.findById(dto.getScId());
|
|
||||||
|
|
||||||
CustomerService customerService = ApplicationUtil.getBean(CustomerService.class);
|
CustomerService customerService = ApplicationUtil.getBean(CustomerService.class);
|
||||||
Customer customer = customerService.findById(dto.getCustomerId());
|
Customer customer = customerService.findById(dto.getCustomerId());
|
||||||
|
|
||||||
@ -163,8 +147,6 @@ public class SaleOutSheetExportModel extends BaseBo<SaleOutSheet> implements Exc
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setCode(dto.getCode());
|
this.setCode(dto.getCode());
|
||||||
this.setScCode(sc.getCode());
|
|
||||||
this.setScName(sc.getName());
|
|
||||||
this.setCustomerCode(customer.getCode());
|
this.setCustomerCode(customer.getCode());
|
||||||
this.setCustomerName(customer.getName());
|
this.setCustomerName(customer.getName());
|
||||||
this.setSalerName(saler == null ? null : saler.getName());
|
this.setSalerName(saler == null ? null : saler.getName());
|
||||||
|
@ -27,20 +27,9 @@ public class SaleReturnExportModel extends BaseBo<SaleReturn> implements ExcelMo
|
|||||||
/**
|
/**
|
||||||
* 单号
|
* 单号
|
||||||
*/
|
*/
|
||||||
@ExcelProperty("业务单据号")
|
@ExcelProperty("单据号")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
/**
|
|
||||||
* 仓库编号
|
|
||||||
*/
|
|
||||||
@ExcelProperty("仓库编号")
|
|
||||||
private String scCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 仓库名称
|
|
||||||
*/
|
|
||||||
@ExcelProperty("仓库名称")
|
|
||||||
private String scName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户编号
|
* 客户编号
|
||||||
@ -94,7 +83,7 @@ public class SaleReturnExportModel extends BaseBo<SaleReturn> implements ExcelMo
|
|||||||
/**
|
/**
|
||||||
* 审核状态
|
* 审核状态
|
||||||
*/
|
*/
|
||||||
@ExcelProperty("审核状态")
|
@ExcelProperty("状态")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -145,10 +134,6 @@ public class SaleReturnExportModel extends BaseBo<SaleReturn> implements ExcelMo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void afterInit(SaleReturn dto) {
|
protected void afterInit(SaleReturn dto) {
|
||||||
|
|
||||||
StoreCenterService storeCenterService = ApplicationUtil.getBean(StoreCenterService.class);
|
|
||||||
StoreCenter sc = storeCenterService.findById(dto.getScId());
|
|
||||||
|
|
||||||
CustomerService customerService = ApplicationUtil.getBean(CustomerService.class);
|
CustomerService customerService = ApplicationUtil.getBean(CustomerService.class);
|
||||||
Customer customer = customerService.findById(dto.getCustomerId());
|
Customer customer = customerService.findById(dto.getCustomerId());
|
||||||
|
|
||||||
@ -163,8 +148,6 @@ public class SaleReturnExportModel extends BaseBo<SaleReturn> implements ExcelMo
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setCode(dto.getCode());
|
this.setCode(dto.getCode());
|
||||||
this.setScCode(sc.getCode());
|
|
||||||
this.setScName(sc.getName());
|
|
||||||
this.setCustomerCode(customer.getCode());
|
this.setCustomerCode(customer.getCode());
|
||||||
this.setCustomerName(customer.getName());
|
this.setCustomerName(customer.getName());
|
||||||
this.setSalerName(saler == null ? null : saler.getName());
|
this.setSalerName(saler == null ? null : saler.getName());
|
||||||
|
@ -6,6 +6,8 @@ import com.lframework.xingyun.sc.enums.SaleOutSheetStatus;
|
|||||||
import com.lframework.xingyun.sc.enums.SettleStatus;
|
import com.lframework.xingyun.sc.enums.SettleStatus;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -13,6 +15,9 @@ public class QuerySaleOutSheetVo extends SortPageVo {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("订单Id列表")
|
||||||
|
private List<String> orderIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单号
|
* 单号
|
||||||
*/
|
*/
|
||||||
|
@ -6,6 +6,8 @@ import com.lframework.xingyun.sc.enums.SaleReturnStatus;
|
|||||||
import com.lframework.xingyun.sc.enums.SettleStatus;
|
import com.lframework.xingyun.sc.enums.SettleStatus;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -13,6 +15,9 @@ public class QuerySaleReturnVo extends SortPageVo {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("订单Id列表")
|
||||||
|
private List<String> orderIds;
|
||||||
/**
|
/**
|
||||||
* 单号
|
* 单号
|
||||||
*/
|
*/
|
||||||
|
@ -191,6 +191,13 @@
|
|||||||
<if test="vo.settleStatus != null">
|
<if test="vo.settleStatus != null">
|
||||||
AND s.settle_status = #{vo.settleStatus}
|
AND s.settle_status = #{vo.settleStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="vo.orderIds != null">
|
||||||
|
AND s.id IN
|
||||||
|
<foreach item="id" collection="vo.orderIds" index="index"
|
||||||
|
open="(" close=")" separator=",">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY s.create_time DESC
|
ORDER BY s.create_time DESC
|
||||||
|
@ -141,6 +141,13 @@
|
|||||||
<if test="vo.settleStatus != null">
|
<if test="vo.settleStatus != null">
|
||||||
AND r.settle_status = #{vo.settleStatus}
|
AND r.settle_status = #{vo.settleStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="vo.orderIds != null">
|
||||||
|
AND s.id IN
|
||||||
|
<foreach item="id" collection="vo.orderIds" index="index"
|
||||||
|
open="(" close=")" separator=",">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY r.create_time DESC
|
ORDER BY r.create_time DESC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user