提交 247f3413 authored 作者: liuhaiquan's avatar liuhaiquan

新增货主结算单列表

上级 b2b7d57a
......@@ -49,15 +49,15 @@ public enum SettlementOwnerEnum {
@Getter
@AllArgsConstructor
public enum Status {
TO_BE_LOCKED(1, "待锁定"),
TO_BE_ACCOUNT(2, "待对账"),
OWNER_TO_BE_CONFIRMED(3, "待货主确认"),
SHIPPER_TO_PAYMENT (4, "待货主付款"),
PLATFORM_CONFIRMED_OWNER_PAYMENT(5, "平台确认货主付款"),
PLATFORM_TO_PAYMENT(6, "待平台付款"),
OWNER_CONFIRMED_PLATFORM_PAYMENT(7, "货主确认平台付款"),
INVOICE_TO_BE_MAILED(8, "待邮寄发票"),
COMPLETED(9, "已完结"),
TO_BE_LOCKED(10, "待锁定"),
TO_BE_ACCOUNT(20, "待对账"),
OWNER_TO_BE_CONFIRMED(30, "待货主确认"),
SHIPPER_TO_PAYMENT (40, "待货主付款"),
PLATFORM_CONFIRMED_OWNER_PAYMENT(50, "平台确认货主付款"),
PLATFORM_TO_PAYMENT(60, "待平台付款"),
OWNER_CONFIRMED_PLATFORM_PAYMENT(70, "货主确认平台付款"),
INVOICE_TO_BE_MAILED(80, "待邮寄发票"),
COMPLETED(90, "已完结"),
;
......
......@@ -9,8 +9,6 @@ import lombok.ToString;
@Getter
@Setter
@NoArgsConstructor
@ToString
public class PageCarrierSettlementDriverDetailParam extends PageParam {
@ApiModelProperty(value = "运单编号", example = "JS415")
......
package com.clx.performance.param.pc.owner;
import com.msl.common.base.PageParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* @ClassName PageCarrierSettlementOwnerParam
* @Description
* @Author kavin
* @Date 2023/10/17 13:25
* @Version 1.0
*/
@Getter
@Setter
public class PageCarrierSettlementOwnerParam extends PageParam {
@ApiModelProperty(value = "结算编号", example = "JS415")
private String settlementNo;
@ApiModelProperty(value="货主编码",example = "201457878")
private Long ownerUserNo;
@ApiModelProperty(value="状态 10:待锁定 20:待对账 30:待货主确认 40:待货主付款 50:平台确认货主付款 60:待平台付款 70:货主确认平台付款 80:待邮寄发票 90:已完结",example = "10")
private String status;
}
package com.clx.performance.vo.pc.carrier.settle;
import com.msl.common.convertor.type.MoneyOutConvert;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import java.math.BigDecimal;
/**
* @ClassName CarrierPageSettlementOwnerDetailVO
* @Description
* @Author kavin
* @Date 2023/10/16 15:01
* @Version 1.0
*/
@Getter
@Setter
public class CarrierPageSettlementOwnerVO {
@ApiModelProperty(value = "结算单号")
private String settlementNo;
@ApiModelProperty(value = "开票标识:1网运单 2普通单")
private Integer invoiceType;
@ApiModelProperty(value = "货主编码")
private Long ownerUserNo;
@ApiModelProperty(value = "货主姓名")
private String ownerName;
@ApiModelProperty(value = "订单编号")
private String orderNo;
@ApiModelProperty(value = "实际净重(吨)")
private BigDecimal weight;
@MoneyOutConvert
@ApiModelProperty(value = "实际运费金额")
private BigDecimal freight;
@MoneyOutConvert
@ApiModelProperty(value = "预付运费金额")
private BigDecimal prepayFreight;
@ApiModelProperty(value = "货损吨数(吨)")
private BigDecimal lossWeight;
@MoneyOutConvert
@ApiModelProperty(value = "货损金额")
private BigDecimal lossFreight;
@MoneyOutConvert
@ApiModelProperty(value = "结算金额")
private BigDecimal settlementFreight;
@MoneyOutConvert
@ApiModelProperty(value = "开票金额")
private BigDecimal invoiceFreight;
@ApiModelProperty(value = "创建时间")
private String createTime;
@ApiModelProperty(value = "状态 10:待锁定 20:待对账 30:待货主确认 40:待货主付款 50:平台确认货主付款 60:待平台付款 70:货主确认平台付款 80:待邮寄发票 90:已完结")
private Integer status;
}
......@@ -27,7 +27,7 @@ public class CarrierSettlementDriverController {
private final SettlementDriverService settlementDriverService;
@ApiOperation(value = "车主结算单列表",notes = "<br>By:刘海泉")
@ApiOperation(value = "结算单列表(车主)",notes = "<br>By:刘海泉")
@GetMapping("/pageCarrierSettlementDriver")
@UnitCovert(param = false)
public Result<PageData<CarrierPageSettlementDriverVO>> pageCarrierSettlementDriver(PageCarrierSettlementDriverParam param) {
......
package com.clx.performance.controller.pc.carrier;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.param.pc.owner.PageCarrierSettlementOwnerParam;
import com.clx.performance.service.settle.SettlementOwnerService;
import com.clx.performance.vo.pc.carrier.settle.CarrierPageSettlementOwnerVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierSettlementOwnerDetailVO;
import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert;
import com.msl.common.result.Result;
import io.swagger.annotations.Api;
......@@ -10,6 +14,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -36,7 +41,13 @@ public class CarrierSettlementOwnerController {
@ApiOperation(value = "结算单列表(货主)",notes = "<br>By:刘海泉")
@GetMapping("/pageCarrierSettlementOwner")
@UnitCovert(param = false)
public Result<PageData<CarrierPageSettlementOwnerVO>> pageCarrierSettlementOwner(@RequestBody @Validated PageCarrierSettlementOwnerParam param) {
IPage<CarrierPageSettlementOwnerVO> page = settlementOwnerService.pageCarrierSettlementOwner(param);
return Result.page(page.getRecords(),page.getTotal(),page.getPages());
}
}
......@@ -6,9 +6,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.performance.dao.settle.SettlementOwnerDao;
import com.clx.performance.enums.settle.SettlementOwnerEnum;
import com.clx.performance.mapper.settle.SettlementOwnerMapper;
import com.clx.performance.model.settle.SettlementDriver;
import com.clx.performance.model.settle.SettlementOwner;
import com.clx.performance.param.pc.driver.PageCarrierSettlementDriverParam;
import com.clx.performance.param.pc.owner.PageCarrierSettlementOwnerParam;
import com.msl.common.dao.impl.BaseDaoImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
......@@ -54,5 +53,20 @@ public class SettlementOwnerDaoImpl extends BaseDaoImpl<SettlementOwnerMapper, S
);
}
@Override
public IPage<SettlementOwner> pageCarrierSettlementOwner(PageCarrierSettlementOwnerParam param) {
LambdaQueryWrapper<SettlementOwner> query = new LambdaQueryWrapper<>();
if(Objects.nonNull(param.getOwnerUserNo())){
query.eq(SettlementOwner :: getOwnerUserNo,param.getOwnerUserNo());
}
if(StringUtils.isNotBlank(param.getSettlementNo())){
query.eq(SettlementOwner :: getSettlementNo,param.getSettlementNo());
}
if(Objects.nonNull(param.getStatus())){
query.eq(SettlementOwner :: getStatus,param.getStatus());
}
query.orderByDesc(SettlementOwner :: getCreateTime);
return baseMapper.selectPage(Page.of(param.getPage(),param.getPageSize()),query);
}
}
package com.clx.performance.dao.settle;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.mapper.settle.SettlementOwnerMapper;
import com.clx.performance.model.settle.SettlementOwner;
import com.clx.performance.param.pc.owner.PageCarrierSettlementOwnerParam;
import com.msl.common.dao.BaseDao;
import org.apache.ibatis.annotations.Param;
......@@ -16,4 +18,5 @@ public interface SettlementOwnerDao extends BaseDao<SettlementOwnerMapper, Settl
boolean updatePayment(SettlementOwner settlementOwner);
IPage<SettlementOwner> pageCarrierSettlementOwner(PageCarrierSettlementOwnerParam param);
}
package com.clx.performance.service.impl.settle;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.performance.dao.OwnerBindCardRecordDao;
import com.clx.performance.dao.settle.SettlementLogDao;
import com.clx.performance.dao.settle.SettlementOwnerDao;
......@@ -8,16 +9,15 @@ import com.clx.performance.dao.settle.SettlementPlatformAccountDao;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.settle.SettlementOwnerEnum;
import com.clx.performance.model.OwnerBindCardRecord;
import com.clx.performance.model.settle.SettlementDriver;
import com.clx.performance.model.settle.SettlementLog;
import com.clx.performance.model.settle.SettlementOwner;
import com.clx.performance.model.settle.SettlementPlatformAccount;
import com.clx.performance.param.pc.driver.PageCarrierSettlementDriverParam;
import com.clx.performance.param.pc.owner.OwnerPaymentSettlementParam;
import com.clx.performance.param.pc.owner.PageCarrierSettlementOwnerParam;
import com.clx.performance.service.settle.SettlementOwnerService;
import com.clx.performance.struct.settle.SettlementLogStruct;
import com.clx.performance.struct.settle.SettlementOwnerStruct;
import com.clx.performance.vo.pc.carrier.settle.CarrierPageSettlementDriverVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPageSettlementOwnerVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.carrier.settle.SettlementLogVO;
import com.clx.performance.vo.pc.owner.settle.SettlementPlatformAccountVO;
......@@ -142,5 +142,13 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
}
@Override
public IPage<CarrierPageSettlementOwnerVO> pageCarrierSettlementOwner(PageCarrierSettlementOwnerParam param) {
IPage<SettlementOwner> page = settlementOwnerDao.pageCarrierSettlementOwner(param);
List<CarrierPageSettlementOwnerVO> list = settlementOwnerStruct.convertList(
page.getRecords());
IPage<CarrierPageSettlementOwnerVO> result = new Page().setRecords(list).setTotal(page.getTotal()).setPages(
page.getPages());
return result;
}
}
package com.clx.performance.service.settle;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.param.pc.owner.OwnerPaymentSettlementParam;
import com.clx.performance.param.pc.owner.PageCarrierSettlementOwnerParam;
import com.clx.performance.vo.pc.carrier.settle.CarrierPageSettlementOwnerVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.owner.settle.SettlementPlatformAccountVO;
......@@ -22,4 +24,5 @@ public interface SettlementOwnerService {
void updatePaymentConfirmSettlement(Integer id);
IPage<CarrierPageSettlementOwnerVO> pageCarrierSettlementOwner(PageCarrierSettlementOwnerParam param);
}
......@@ -2,6 +2,7 @@ package com.clx.performance.struct.settle;
import com.clx.performance.enums.settle.SettlementOwnerEnum;
import com.clx.performance.model.settle.SettlementOwner;
import com.clx.performance.vo.pc.carrier.settle.CarrierPageSettlementOwnerVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.carrier.settle.SettlementMergeVO;
import com.msl.common.utils.DateStructUtil;
......@@ -25,4 +26,8 @@ public interface SettlementOwnerStruct {
List<SettlementMergeVO> convertToMergeList(List<SettlementOwner> settlementOwners);
List<CarrierPageSettlementOwnerVO> convertList(List<SettlementOwner> settlementOwners);
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论