订单列表
parent
62efe0bb0f
commit
baf33cec58
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.njzscloud.common.core.jackson.serializer;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||||
|
import com.njzscloud.common.core.ienum.Dict;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Long 序列化
|
||||||
|
*/
|
||||||
|
public class DictModule extends SimpleModule {
|
||||||
|
{
|
||||||
|
this.addSerializer(Dict.class, new DictSerializer())
|
||||||
|
.addDeserializer(Dict.class, new DictDeserializer());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.njzscloud.common.mvc.config;
|
package com.njzscloud.common.mvc.config;
|
||||||
|
|
||||||
import com.njzscloud.common.core.jackson.serializer.BigDecimalModule;
|
import com.njzscloud.common.core.jackson.serializer.BigDecimalModule;
|
||||||
|
import com.njzscloud.common.core.jackson.serializer.DictModule;
|
||||||
import com.njzscloud.common.core.jackson.serializer.LongModule;
|
import com.njzscloud.common.core.jackson.serializer.LongModule;
|
||||||
import com.njzscloud.common.core.jackson.serializer.TimeModule;
|
import com.njzscloud.common.core.jackson.serializer.TimeModule;
|
||||||
import com.njzscloud.common.mvc.support.DictHandlerMethodArgumentResolver;
|
import com.njzscloud.common.mvc.support.DictHandlerMethodArgumentResolver;
|
||||||
|
|
@ -22,7 +23,7 @@ public class MvcAutoConfiguration {
|
||||||
@Bean
|
@Bean
|
||||||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
||||||
return build -> build
|
return build -> build
|
||||||
.modules(new TimeModule(), new LongModule(), new BigDecimalModule());
|
.modules(new TimeModule(), new LongModule(), new BigDecimalModule(), new DictModule());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderEntity;
|
import com.njzscloud.dispose.cst.order.pojo.entity.OrderEntity;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.param.*;
|
import com.njzscloud.dispose.cst.order.pojo.param.*;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.result.SearchOrderResult;
|
||||||
import com.njzscloud.dispose.cst.order.service.OrderService;
|
import com.njzscloud.dispose.cst.order.service.OrderService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -64,8 +65,8 @@ public class OrderController {
|
||||||
* 分页查询
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
@GetMapping("/paging")
|
@GetMapping("/paging")
|
||||||
public R<PageResult<OrderEntity>> paging(PageParam pageParam, OrderEntity orderEntity) {
|
public R<PageResult<SearchOrderResult>> paging(PageParam pageParam, SearchOrderParam searchOrderParam) {
|
||||||
return R.success(orderService.paging(pageParam, orderEntity));
|
return R.success(orderService.paging(pageParam, searchOrderParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
package com.njzscloud.dispose.cst.order.mapper;
|
package com.njzscloud.dispose.cst.order.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderEntity;
|
import com.njzscloud.dispose.cst.order.pojo.entity.OrderEntity;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.result.SearchOrderResult;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收/销订单
|
* 收/销订单
|
||||||
|
|
@ -10,6 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface OrderMapper extends BaseMapper<OrderEntity> {
|
public interface OrderMapper extends BaseMapper<OrderEntity> {
|
||||||
|
IPage<SearchOrderResult> paging(IPage<SearchOrderResult> page, @Param("ew") QueryWrapper<Object> ew);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
package com.njzscloud.dispose.cst.order.mapper;
|
package com.njzscloud.dispose.cst.order.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.result.SearchOrderPaymentRecordResult;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付费记录
|
* 付费记录
|
||||||
|
|
@ -11,4 +16,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface OrderPaymentRecordMapper extends BaseMapper<OrderPaymentRecordEntity> {
|
public interface OrderPaymentRecordMapper extends BaseMapper<OrderPaymentRecordEntity> {
|
||||||
|
List<SearchOrderPaymentRecordResult> listPaymentRecord(@Param("ew") QueryWrapper<Object> ew);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.pojo.param;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收/销订单
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SearchOrderParam {
|
||||||
|
/**
|
||||||
|
* 订单类型;YuYue、ShiShi、LiShi、QuXiao
|
||||||
|
*/
|
||||||
|
private String orderType;
|
||||||
|
/**
|
||||||
|
* 业务类型; XiaoShou、HuiShou、DuanBo
|
||||||
|
*/
|
||||||
|
private String bizType;
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
/**
|
||||||
|
* 站点名称;cst_station.station.name
|
||||||
|
*/
|
||||||
|
private String stationName;
|
||||||
|
/**
|
||||||
|
* 下单人姓名
|
||||||
|
*/
|
||||||
|
private String contacts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人联系方式
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
private String transOrgName;
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime orderTimeStart;
|
||||||
|
private LocalDateTime orderTimeEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名称
|
||||||
|
*/
|
||||||
|
private String goodsName;
|
||||||
|
private String keywords;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,123 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.pojo.result;
|
||||||
|
|
||||||
|
import com.njzscloud.dispose.cst.customer.constant.SettlementWay;
|
||||||
|
import com.njzscloud.dispose.cst.order.constant.PaymentStatus;
|
||||||
|
import com.njzscloud.dispose.finance.constant.ExpenseItemCategory;
|
||||||
|
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
||||||
|
import com.njzscloud.dispose.finance.constant.Payer;
|
||||||
|
import com.njzscloud.dispose.finance.constant.Unit;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付费记录
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SearchOrderPaymentRecordResult {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单 Id
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单收费项 Id,QiTa-->其他、ChanPin-->产品、YunFei-->运费
|
||||||
|
*/
|
||||||
|
private Long expenseItemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输记录 Id
|
||||||
|
*/
|
||||||
|
private Long transId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付费方;字典代码:payer,PingTai-->平台、ChanFei-->产废方、YunShu-->运输方、XiaoNa-->消纳方、CaiGou-->采购方
|
||||||
|
*/
|
||||||
|
private Payer payer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 量
|
||||||
|
*/
|
||||||
|
private BigDecimal quantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付状态,MianFei-->免费、WeiZhiFu-->未支付、YiZhiFu-->已支付、YiTuiKuan-->已退款
|
||||||
|
*/
|
||||||
|
private PaymentStatus paymentStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime payTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime refundTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总金额;单位:元
|
||||||
|
*/
|
||||||
|
private BigDecimal totalMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优惠金额;单位:元,有正负
|
||||||
|
*/
|
||||||
|
private BigDecimal discountMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手动修正金额;单位:元,有正负
|
||||||
|
*/
|
||||||
|
private BigDecimal reviseMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算金额;单位:元
|
||||||
|
*/
|
||||||
|
private BigDecimal settleMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算方式,YueJie-->月结、YuE-->余额、XianFu-->现付
|
||||||
|
*/
|
||||||
|
private SettlementWay settlementWay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款人 Id;sys_user.id
|
||||||
|
*/
|
||||||
|
private Long payerUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款人客户 Id;cst_customer.id
|
||||||
|
*/
|
||||||
|
private Long payerCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款方资金账户 Id
|
||||||
|
*/
|
||||||
|
private Long payerMoneyAccountId;
|
||||||
|
|
||||||
|
private ExpenseItemCategory expenseItemCategory;
|
||||||
|
private String goodsId;
|
||||||
|
private String expenseItemName;
|
||||||
|
private ExpenseStrategy expenseStrategy;
|
||||||
|
private Unit unit;
|
||||||
|
private BigDecimal taxRate;
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
private BigDecimal initialPrice;
|
||||||
|
private Integer initialQuantity;
|
||||||
|
private Integer everyQuantity;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,526 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.pojo.result;
|
||||||
|
|
||||||
|
import com.njzscloud.dispose.cst.customer.constant.SettlementWay;
|
||||||
|
import com.njzscloud.dispose.cst.order.constant.*;
|
||||||
|
import com.njzscloud.dispose.finance.constant.ExpenseItemCategory;
|
||||||
|
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
||||||
|
import com.njzscloud.dispose.finance.constant.Unit;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收/销订单
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SearchOrderResult {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目 Id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人 Id;sys_user.id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人客户 Id;cst_customer.id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人姓名
|
||||||
|
*/
|
||||||
|
private String contacts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人联系方式
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime orderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单类型;字典代码:order_category,HuiShouYuYue-->回收预约单、XiaoShouYuYue-->销售预约单、DuanBoRu-->短驳入、DuanBoChu-->短驳出
|
||||||
|
*/
|
||||||
|
private OrderCategory orderCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单状态;字典代码:order_status,YiYuYue-->已预约、JinXingZhong-->进行中、YiWanCheng-->已完成、YiQuXiao-->已取消
|
||||||
|
*/
|
||||||
|
private OrderStatus orderStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完结时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime finishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输组织 Id;cst_org.id
|
||||||
|
*/
|
||||||
|
private Long transOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输方客户 Id
|
||||||
|
*/
|
||||||
|
private Long transCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派清运公司时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime assignmentTransTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点 Id;cst_station.id
|
||||||
|
*/
|
||||||
|
private Long stationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点名称;cst_station.station.name
|
||||||
|
*/
|
||||||
|
private String stationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运距;单位:米
|
||||||
|
*/
|
||||||
|
private Integer transDistance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预估量
|
||||||
|
*/
|
||||||
|
private Integer estimatedQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预估车数
|
||||||
|
*/
|
||||||
|
private Integer estimatedTrainNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品 Id
|
||||||
|
*/
|
||||||
|
private Long goodsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名称
|
||||||
|
*/
|
||||||
|
private String goodsName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位;字典代码:unit
|
||||||
|
*/
|
||||||
|
private Unit unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户备注
|
||||||
|
*/
|
||||||
|
private String customerMemo;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
private List<TransRecode> transRecodes;
|
||||||
|
private CargoPlace cargoPlace;
|
||||||
|
private ProjectInfo projectInfo;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class PaymentRecord {
|
||||||
|
private Long id;
|
||||||
|
private Long orderId;
|
||||||
|
private Long expenseItemId;
|
||||||
|
private Long transId;
|
||||||
|
private BigDecimal quantity;
|
||||||
|
private PaymentStatus paymentStatus;
|
||||||
|
private LocalDateTime payTime;
|
||||||
|
private LocalDateTime refundTime;
|
||||||
|
private BigDecimal totalMoney;
|
||||||
|
private BigDecimal discountMoney;
|
||||||
|
private BigDecimal reviseMoney;
|
||||||
|
private BigDecimal settleMoney;
|
||||||
|
private SettlementWay settlementWay;
|
||||||
|
private Long payerUserId;
|
||||||
|
private Long payerCustomerId;
|
||||||
|
private Long payerMoneyAccountId;
|
||||||
|
private ExpenseItemCategory expenseItemCategory;
|
||||||
|
private String goodsId;
|
||||||
|
private String expenseItemName;
|
||||||
|
private ExpenseStrategy expenseStrategy;
|
||||||
|
private Unit unit;
|
||||||
|
private BigDecimal taxRate;
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
private BigDecimal initialPrice;
|
||||||
|
private Integer initialQuantity;
|
||||||
|
private Integer everyQuantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class TransRecode {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车次
|
||||||
|
*/
|
||||||
|
private Integer trainNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单 Id
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输状态;字典代码:trans_status,DaiPaiDan-->待派单、DaiJieDan-->待接单、YiJieDan-->已接单、YunShuZhong-->运输中、YiJinChang-->已进场、YiChuChang-->已出场、YiWanCheng-->已完成、YiQuXiao-->已取消
|
||||||
|
*/
|
||||||
|
private TransStatus transStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车道名称
|
||||||
|
*/
|
||||||
|
private String lane;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派司机时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime assignmentDriverTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机确认接单时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime driverConfirmTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始运输时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime transTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完结时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime finishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 看料员 Id;sys_user.id
|
||||||
|
*/
|
||||||
|
private Long checkerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 勘料状态;字典代码:check_status,Wu-->无需勘料、YiKanLiao-->已勘料、WeiKanLiao-->未勘料
|
||||||
|
*/
|
||||||
|
private CheckStatus checkStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 勘料时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime checkTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 勘料照片
|
||||||
|
*/
|
||||||
|
private List<String> checkPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 勘料员备注
|
||||||
|
*/
|
||||||
|
private String checkerMemo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机 Id
|
||||||
|
*/
|
||||||
|
private Long driverId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机所属客户 Id;cst_customer.id
|
||||||
|
*/
|
||||||
|
private Long driverCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机所属用户 Id
|
||||||
|
*/
|
||||||
|
private Long driverUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归属客户 Id;cst_customer.id
|
||||||
|
*/
|
||||||
|
private Long truckCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归属组织
|
||||||
|
*/
|
||||||
|
private Long truckOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆 Id
|
||||||
|
*/
|
||||||
|
private Long truckId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String truckLicensePlate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 历史皮重
|
||||||
|
*/
|
||||||
|
private Integer historyTareWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 毛重;单位:千克
|
||||||
|
*/
|
||||||
|
private Integer roughWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 皮重;单位:千克
|
||||||
|
*/
|
||||||
|
private Integer tareWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 净重;单位:千克
|
||||||
|
*/
|
||||||
|
private Integer settleWeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运距;单位:米
|
||||||
|
*/
|
||||||
|
private Integer transDistance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进场车头照片
|
||||||
|
*/
|
||||||
|
private String inFrontPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进场车斗照片
|
||||||
|
*/
|
||||||
|
private String inBodyPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出场车头照片
|
||||||
|
*/
|
||||||
|
private String outFrontPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出场车斗照片
|
||||||
|
*/
|
||||||
|
private String outBodyPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进场时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime inTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出场时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime outTime;
|
||||||
|
private List<PaymentRecord> paymentRecord;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class CargoPlace {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单 Id
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装/卸货,ZhuangHuo-->装货地址、XieHuo-->卸货地址
|
||||||
|
*/
|
||||||
|
private String zx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省;代码
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市;代码
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区县;代码
|
||||||
|
*/
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乡镇街道;代码
|
||||||
|
*/
|
||||||
|
private String town;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省;名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市;名称
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区县;名称
|
||||||
|
*/
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乡镇街道;名称
|
||||||
|
*/
|
||||||
|
private String townName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private Double lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private Double lat;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public static class ProjectInfo {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同图片
|
||||||
|
*/
|
||||||
|
private String contractPicture;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输方客户 Id
|
||||||
|
*/
|
||||||
|
private Long transCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输方组织 Id
|
||||||
|
*/
|
||||||
|
private Long transOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产废方/购买方客户 Id
|
||||||
|
*/
|
||||||
|
private Long fringeCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产废方/购买方组织 Id
|
||||||
|
*/
|
||||||
|
private Long fringeOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省;代码
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市;代码
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区县;代码
|
||||||
|
*/
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乡镇街道;代码
|
||||||
|
*/
|
||||||
|
private String town;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省;名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市;名称
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区县;名称
|
||||||
|
*/
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乡镇街道;名称
|
||||||
|
*/
|
||||||
|
private String townName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private Double lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private Double lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同有效期
|
||||||
|
*/
|
||||||
|
private LocalDate contractStartDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同有效期
|
||||||
|
*/
|
||||||
|
private LocalDate contractEndDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.njzscloud.dispose.cst.order.service;
|
package com.njzscloud.dispose.cst.order.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
|
|
@ -7,6 +8,7 @@ import com.njzscloud.common.mp.support.PageResult;
|
||||||
import com.njzscloud.dispose.cst.order.mapper.OrderPaymentRecordMapper;
|
import com.njzscloud.dispose.cst.order.mapper.OrderPaymentRecordMapper;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.param.SearchOrderPaymentRecordParam;
|
import com.njzscloud.dispose.cst.order.pojo.param.SearchOrderPaymentRecordParam;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.result.SearchOrderPaymentRecordResult;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -66,4 +68,8 @@ public class OrderPaymentRecordService extends ServiceImpl<OrderPaymentRecordMap
|
||||||
.eq(param.getPayer() != null, OrderPaymentRecordEntity::getPayer, param.getPayer())
|
.eq(param.getPayer() != null, OrderPaymentRecordEntity::getPayer, param.getPayer())
|
||||||
.eq(param.getPaymentStatus() != null, OrderPaymentRecordEntity::getPaymentStatus, param.getPaymentStatus())));
|
.eq(param.getPaymentStatus() != null, OrderPaymentRecordEntity::getPaymentStatus, param.getPaymentStatus())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SearchOrderPaymentRecordResult> listPaymentRecord(QueryWrapper<Object> ew) {
|
||||||
|
return baseMapper.listPaymentRecord(ew);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,21 @@ package com.njzscloud.dispose.cst.order.service;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njzscloud.common.core.ex.Exceptions;
|
import com.njzscloud.common.core.ex.Exceptions;
|
||||||
|
import com.njzscloud.common.core.utils.GroupUtil;
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
import com.njzscloud.common.security.util.SecurityUtil;
|
import com.njzscloud.common.security.util.SecurityUtil;
|
||||||
import com.njzscloud.common.sn.support.SnUtil;
|
import com.njzscloud.common.sn.support.SnUtil;
|
||||||
|
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||||
import com.njzscloud.dispose.cst.customer.constant.IdentityCategory;
|
import com.njzscloud.dispose.cst.customer.constant.IdentityCategory;
|
||||||
import com.njzscloud.dispose.cst.customer.constant.SettlementWay;
|
import com.njzscloud.dispose.cst.customer.constant.SettlementWay;
|
||||||
import com.njzscloud.dispose.cst.customer.mapper.CustomerMapper;
|
import com.njzscloud.dispose.cst.customer.mapper.CustomerMapper;
|
||||||
|
|
@ -22,6 +30,9 @@ import com.njzscloud.dispose.cst.order.mapper.OrderTransMapper;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.entity.*;
|
import com.njzscloud.dispose.cst.order.pojo.entity.*;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.param.*;
|
import com.njzscloud.dispose.cst.order.pojo.param.*;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.result.SearchOrderResult;
|
||||||
|
import com.njzscloud.dispose.cst.project.pojo.entity.ProjectEntity;
|
||||||
|
import com.njzscloud.dispose.cst.project.service.ProjectService;
|
||||||
import com.njzscloud.dispose.cst.station.mapper.StationMapper;
|
import com.njzscloud.dispose.cst.station.mapper.StationMapper;
|
||||||
import com.njzscloud.dispose.cst.station.pojo.entity.StationEntity;
|
import com.njzscloud.dispose.cst.station.pojo.entity.StationEntity;
|
||||||
import com.njzscloud.dispose.cst.truck.mapper.TruckMapper;
|
import com.njzscloud.dispose.cst.truck.mapper.TruckMapper;
|
||||||
|
|
@ -42,6 +53,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static com.njzscloud.dispose.event.SysMittEvent.PURCHASE_ORDER;
|
import static com.njzscloud.dispose.event.SysMittEvent.PURCHASE_ORDER;
|
||||||
|
|
@ -68,6 +80,7 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
private final MoneyAccountMapper moneyAccountMapper;
|
private final MoneyAccountMapper moneyAccountMapper;
|
||||||
private final StationMapper stationMapper;
|
private final StationMapper stationMapper;
|
||||||
private final PaymentRecordHelper paymentRecordHelper;
|
private final PaymentRecordHelper paymentRecordHelper;
|
||||||
|
private final ProjectService projectService;
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void add(CreateOrderParam param) {
|
public void add(CreateOrderParam param) {
|
||||||
|
|
@ -128,8 +141,102 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
return this.getById(id);
|
return this.getById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PageResult<OrderEntity> paging(PageParam pageParam, OrderEntity orderEntity) {
|
public PageResult<SearchOrderResult> paging(PageParam pageParam, SearchOrderParam searchOrderParam) {
|
||||||
return PageResult.of(this.page(pageParam.toPage(), Wrappers.query(orderEntity)));
|
String orderType = searchOrderParam.getOrderType();
|
||||||
|
String bizType = searchOrderParam.getBizType();
|
||||||
|
String sn = searchOrderParam.getSn();
|
||||||
|
String stationName = searchOrderParam.getStationName();
|
||||||
|
String contacts = searchOrderParam.getContacts();
|
||||||
|
String phone = searchOrderParam.getPhone();
|
||||||
|
String transOrgName = searchOrderParam.getTransOrgName();
|
||||||
|
String projectName = searchOrderParam.getProjectName();
|
||||||
|
String goodsName = searchOrderParam.getGoodsName();
|
||||||
|
String keywords = searchOrderParam.getKeywords();
|
||||||
|
LocalDateTime orderTimeStart = searchOrderParam.getOrderTimeStart();
|
||||||
|
LocalDateTime orderTimeEnd = searchOrderParam.getOrderTimeEnd();
|
||||||
|
|
||||||
|
QueryWrapper<Object> ew = Wrappers.query()
|
||||||
|
.exists("YuYue".equals(orderType), "SELECT 1 FROM cst_order_trans b WHERE b.order_id = a.id AND b.trans_status = 'DaiPaiDan'")
|
||||||
|
.exists("ShiShi".equals(orderType), "SELECT 1 FROM cst_order_trans b WHERE b.order_id = a.id AND b.trans_status IN ('YiJieDan','YunShuZhong','YiJinChang','YiChuChang')")
|
||||||
|
.exists("LiShi".equals(orderType), "SELECT 1 FROM cst_order_trans b WHERE b.order_id = a.id AND b.trans_status = 'YiWanCheng'")
|
||||||
|
.exists("QuXiao".equals(orderType), "SELECT 1 FROM cst_order_trans b WHERE b.order_id = a.id AND b.trans_status = 'YiQuXiao'")
|
||||||
|
.in("DuanBo".equals(bizType), "a.order_category", OrderCategory.DuanBoChu, OrderCategory.DuanBoRu)
|
||||||
|
.eq("HuiShou".equals(bizType), "a.order_category", OrderCategory.HuiShouYuYue)
|
||||||
|
.eq("XiaoShou".equals(bizType), "a.order_category", OrderCategory.XiaoShouYuYue)
|
||||||
|
.like(StrUtil.isNotBlank(sn), "a.sn", sn)
|
||||||
|
.like(StrUtil.isNotBlank(stationName), "a.station_name", stationName)
|
||||||
|
.like(StrUtil.isNotBlank(contacts), "a.contacts", contacts)
|
||||||
|
.like(StrUtil.isNotBlank(phone), "a.phone", phone)
|
||||||
|
.like(StrUtil.isNotBlank(transOrgName), "j.org_name", transOrgName)
|
||||||
|
.like(StrUtil.isNotBlank(projectName), "f.project_name", projectName)
|
||||||
|
.like(StrUtil.isNotBlank(goodsName), "a.goods_name", goodsName)
|
||||||
|
.ge(orderTimeStart != null, "a.order_time", orderTimeStart)
|
||||||
|
.le(orderTimeEnd != null, "a.order_time", orderTimeEnd)
|
||||||
|
.and(StrUtil.isNotBlank(keywords), it -> it
|
||||||
|
.like("a.goods_name", keywords)
|
||||||
|
.or().like("a.sn", keywords)
|
||||||
|
.or().like("a.contacts", keywords)
|
||||||
|
.or().like("a.phone", keywords)
|
||||||
|
.or().like("j.org_name", keywords)
|
||||||
|
.or().like("f.project_name", keywords)
|
||||||
|
);
|
||||||
|
Page<SearchOrderResult> page = pageParam.toPage();
|
||||||
|
page.addOrder(OrderItem.desc("a.create_time"));
|
||||||
|
IPage<SearchOrderResult> resultPage = baseMapper.paging(page, ew);
|
||||||
|
List<SearchOrderResult> results = resultPage.getRecords();
|
||||||
|
if (results.isEmpty()) return PageResult.of(resultPage);
|
||||||
|
List<Long> orderIdList = results.stream().map(SearchOrderResult::getId).toList();
|
||||||
|
List<Long> projectIdList = results.stream().map(SearchOrderResult::getProjectId).toList();
|
||||||
|
List<SearchOrderResult.TransRecode> transRecodes = orderTransMapper.selectList(Wrappers.lambdaQuery(OrderTransEntity.class)
|
||||||
|
.in(OrderTransEntity::getOrderId, orderIdList)
|
||||||
|
.eq("YuYue".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.DaiPaiDan)
|
||||||
|
.in("ShiShi".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.YiJieDan, TransStatus.YunShuZhong, TransStatus.YiJinChang, TransStatus.YiChuChang)
|
||||||
|
.eq("LiShi".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.YiWanCheng)
|
||||||
|
.eq("QuXiao".equals(orderType), OrderTransEntity::getTransStatus, TransStatus.YiQuXiao)
|
||||||
|
)
|
||||||
|
.stream()
|
||||||
|
.map(it -> BeanUtil.copyProperties(it, SearchOrderResult.TransRecode.class))
|
||||||
|
.toList();
|
||||||
|
Map<Long, List<SearchOrderResult.TransRecode>> orderId_transRecode_map = GroupUtil.k_a(transRecodes, SearchOrderResult.TransRecode::getOrderId);
|
||||||
|
|
||||||
|
List<SearchOrderResult.CargoPlace> cargoPlaceList = orderCargoPlaceService.list(Wrappers.lambdaQuery(OrderCargoPlaceEntity.class).in(OrderCargoPlaceEntity::getOrderId, orderIdList))
|
||||||
|
.stream()
|
||||||
|
.map(it -> BeanUtil.copyProperties(it, SearchOrderResult.CargoPlace.class))
|
||||||
|
.toList();
|
||||||
|
Map<Long, SearchOrderResult.CargoPlace> orderId_cargoPlace_map = GroupUtil.k_o(cargoPlaceList, SearchOrderResult.CargoPlace::getOrderId);
|
||||||
|
|
||||||
|
Map<Long, SearchOrderResult.ProjectInfo> projectId_project_map;
|
||||||
|
if (!projectIdList.isEmpty()) {
|
||||||
|
List<SearchOrderResult.ProjectInfo> projectInfoList = projectService.list(Wrappers.lambdaQuery(ProjectEntity.class).in(BaseEntity::getId, projectIdList))
|
||||||
|
.stream()
|
||||||
|
.map(it -> BeanUtil.copyProperties(it, SearchOrderResult.ProjectInfo.class))
|
||||||
|
.toList();
|
||||||
|
projectId_project_map = GroupUtil.k_o(projectInfoList, SearchOrderResult.ProjectInfo::getId);
|
||||||
|
} else {
|
||||||
|
projectId_project_map = MapUtil.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<SearchOrderResult.PaymentRecord> paymentRecordResultList = orderPaymentRecordService.listPaymentRecord(Wrappers.query().in("a.order_id", orderIdList))
|
||||||
|
.stream()
|
||||||
|
.map(it -> BeanUtil.copyProperties(it, SearchOrderResult.PaymentRecord.class))
|
||||||
|
.toList();
|
||||||
|
Map<Long, List<SearchOrderResult.PaymentRecord>> transId_paymentRecord_map = GroupUtil.k_a(paymentRecordResultList, SearchOrderResult.PaymentRecord::getTransId);
|
||||||
|
|
||||||
|
|
||||||
|
for (SearchOrderResult result : results) {
|
||||||
|
Long orderId = result.getId();
|
||||||
|
Long projectId = result.getProjectId();
|
||||||
|
List<SearchOrderResult.TransRecode> transRecodeList = orderId_transRecode_map.get(orderId);
|
||||||
|
for (SearchOrderResult.TransRecode transRecode : transRecodeList) {
|
||||||
|
Long transRecodeId = transRecode.getId();
|
||||||
|
transRecode.setPaymentRecord(transId_paymentRecord_map.get(transRecodeId));
|
||||||
|
}
|
||||||
|
result.setTransRecodes(transRecodeList);
|
||||||
|
result.setCargoPlace(orderId_cargoPlace_map.get(orderId));
|
||||||
|
result.setProjectInfo(projectId_project_map.get(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
|
return PageResult.of(resultPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
package com.njzscloud.dispose.goods.contant;
|
|
||||||
|
|
||||||
import com.njzscloud.common.core.ienum.DictStr;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字典代码:unit
|
|
||||||
* 字典名称:吨
|
|
||||||
*
|
|
||||||
* @author ljw
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public enum Unit implements DictStr {
|
|
||||||
|
|
||||||
CHE("che", "车"),
|
|
||||||
|
|
||||||
DUN("dun", "吨");
|
|
||||||
|
|
||||||
private final String val;
|
|
||||||
|
|
||||||
private final String txt;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package com.njzscloud.dispose.goods.pojo.entity;
|
package com.njzscloud.dispose.goods.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.njzscloud.common.core.ienum.DictItem;
|
import com.njzscloud.dispose.finance.constant.Unit;
|
||||||
import com.njzscloud.common.core.ienum.DictKey;
|
|
||||||
import com.njzscloud.common.mp.support.handler.j.DictItemTypeHandler;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -57,9 +55,7 @@ public class GoodsEntity {
|
||||||
/**
|
/**
|
||||||
* 计量单位;字典代码:unit
|
* 计量单位;字典代码:unit
|
||||||
*/
|
*/
|
||||||
@DictKey("unit")
|
private Unit unit;
|
||||||
@TableField(typeHandler = DictItemTypeHandler.class)
|
|
||||||
private DictItem unit;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,8 @@
|
||||||
package com.njzscloud.dispose.goods.pojo.param;
|
package com.njzscloud.dispose.goods.pojo.param;
|
||||||
|
|
||||||
import com.njzscloud.common.core.ienum.DictItem;
|
|
||||||
import com.njzscloud.common.core.ienum.DictKey;
|
|
||||||
import com.njzscloud.dispose.finance.constant.ExpenseItemCategory;
|
import com.njzscloud.dispose.finance.constant.ExpenseItemCategory;
|
||||||
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
||||||
import com.njzscloud.dispose.finance.constant.Payer;
|
|
||||||
import com.njzscloud.dispose.finance.constant.Unit;
|
import com.njzscloud.dispose.finance.constant.Unit;
|
||||||
import com.njzscloud.dispose.finance.pojo.entity.ScopeStrategyConfig;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -30,11 +26,6 @@ public class AddGoodsParam {
|
||||||
*/
|
*/
|
||||||
private Long goodsCategoryId;
|
private Long goodsCategoryId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品编码
|
|
||||||
*/
|
|
||||||
private String sn;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品名称
|
* 产品名称
|
||||||
*/
|
*/
|
||||||
|
|
@ -53,8 +44,7 @@ public class AddGoodsParam {
|
||||||
/**
|
/**
|
||||||
* 计量单位;字典代码:unit
|
* 计量单位;字典代码:unit
|
||||||
*/
|
*/
|
||||||
@DictKey("unit")
|
private Unit unit;
|
||||||
private DictItem unit;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
|
|
@ -102,11 +92,6 @@ public class AddGoodsParam {
|
||||||
*/
|
*/
|
||||||
private BigDecimal taxRate;
|
private BigDecimal taxRate;
|
||||||
|
|
||||||
/**
|
|
||||||
* 付费方;字典代码:payer
|
|
||||||
*/
|
|
||||||
private Payer payer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单价;单位:元,弹性模式-->每档价格
|
* 单价;单位:元,弹性模式-->每档价格
|
||||||
*/
|
*/
|
||||||
|
|
@ -127,29 +112,10 @@ public class AddGoodsParam {
|
||||||
*/
|
*/
|
||||||
private Integer everyQuantity;
|
private Integer everyQuantity;
|
||||||
|
|
||||||
/**
|
|
||||||
* 适用用户;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
|
||||||
*/
|
|
||||||
private ScopeStrategyConfig userScope;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 适用站点;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
|
||||||
*/
|
|
||||||
private ScopeStrategyConfig stationScope;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 适用产品;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
|
||||||
*/
|
|
||||||
private ScopeStrategyConfig goodsScope;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String memo;
|
private String memo;
|
||||||
/**
|
|
||||||
* 产品 Id
|
|
||||||
*/
|
|
||||||
private Long goodsId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@ package com.njzscloud.dispose.goods.pojo.param;
|
||||||
|
|
||||||
import com.njzscloud.dispose.finance.constant.ExpenseItemCategory;
|
import com.njzscloud.dispose.finance.constant.ExpenseItemCategory;
|
||||||
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
||||||
import com.njzscloud.dispose.finance.constant.Payer;
|
|
||||||
import com.njzscloud.dispose.finance.constant.Unit;
|
import com.njzscloud.dispose.finance.constant.Unit;
|
||||||
import com.njzscloud.dispose.finance.pojo.entity.ScopeStrategyConfig;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -108,11 +106,6 @@ public class ModifyGoodsParam {
|
||||||
*/
|
*/
|
||||||
private BigDecimal taxRate;
|
private BigDecimal taxRate;
|
||||||
|
|
||||||
/**
|
|
||||||
* 付费方;字典代码:payer
|
|
||||||
*/
|
|
||||||
private Payer payer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单价;单位:元,弹性模式-->每档价格
|
* 单价;单位:元,弹性模式-->每档价格
|
||||||
*/
|
*/
|
||||||
|
|
@ -132,22 +125,6 @@ public class ModifyGoodsParam {
|
||||||
* 每档的量
|
* 每档的量
|
||||||
*/
|
*/
|
||||||
private Integer everyQuantity;
|
private Integer everyQuantity;
|
||||||
|
|
||||||
/**
|
|
||||||
* 适用用户;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
|
||||||
*/
|
|
||||||
private ScopeStrategyConfig userScope;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 适用站点;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
|
||||||
*/
|
|
||||||
private ScopeStrategyConfig stationScope;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 适用产品;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
|
||||||
*/
|
|
||||||
private ScopeStrategyConfig goodsScope;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ public class SearchGoodsCategoryParam {
|
||||||
* 业务类型;字典代码:biz_type
|
* 业务类型;字典代码:biz_type
|
||||||
*/
|
*/
|
||||||
private BizType bizType;
|
private BizType bizType;
|
||||||
|
private String keywords;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分类名称
|
* 分类名称
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.njzscloud.dispose.goods.pojo.param;
|
package com.njzscloud.dispose.goods.pojo.param;
|
||||||
|
|
||||||
|
import com.njzscloud.dispose.goods.contant.BizType;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -20,6 +21,7 @@ public class SearchGoodsParam {
|
||||||
* 产品类型 Id
|
* 产品类型 Id
|
||||||
*/
|
*/
|
||||||
private Long goodsCategoryId;
|
private Long goodsCategoryId;
|
||||||
|
private BizType bizType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品编码
|
* 商品编码
|
||||||
|
|
@ -30,6 +32,7 @@ public class SearchGoodsParam {
|
||||||
* 产品名称
|
* 产品名称
|
||||||
*/
|
*/
|
||||||
private String goodsName;
|
private String goodsName;
|
||||||
|
private String keywords;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格
|
* 规格
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
package com.njzscloud.dispose.goods.service;
|
package com.njzscloud.dispose.goods.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.common.base.Strings;
|
|
||||||
import com.njzscloud.common.core.ex.Exceptions;
|
import com.njzscloud.common.core.ex.Exceptions;
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
|
@ -35,13 +35,13 @@ public class GoodsCategoryService extends ServiceImpl<GoodsCategoryMapper, Goods
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
public void add(GoodsCategoryEntity goodsCategoryEntity) {
|
public void add(GoodsCategoryEntity goodsCategoryEntity) {
|
||||||
if (goodsCategoryEntity.getBizType() == null) {
|
BizType bizType = goodsCategoryEntity.getBizType();
|
||||||
throw Exceptions.clierr("业务类型不可为空");
|
Assert.notNull(bizType, () -> Exceptions.clierr("业务类型不能为空"));
|
||||||
}
|
if (bizType == BizType.HuiShouPin) {
|
||||||
if (BizType.HuiShouPin.equals(goodsCategoryEntity.getBizType()) && Strings.isNullOrEmpty(goodsCategoryEntity.getSn())) {
|
String sn = goodsCategoryEntity.getSn();
|
||||||
throw Exceptions.clierr("回收品分类码不可为空");
|
Assert.notBlank(sn, () -> Exceptions.clierr("国标码不能为空"));
|
||||||
} else {
|
} else {
|
||||||
goodsCategoryEntity.setSn(this.generateSn());
|
goodsCategoryEntity.setSn(SnUtil.next("GC-SN"));
|
||||||
}
|
}
|
||||||
this.save(goodsCategoryEntity);
|
this.save(goodsCategoryEntity);
|
||||||
}
|
}
|
||||||
|
|
@ -76,29 +76,19 @@ public class GoodsCategoryService extends ServiceImpl<GoodsCategoryMapper, Goods
|
||||||
BizType bizType = searchGoodsCategoryParam.getBizType();
|
BizType bizType = searchGoodsCategoryParam.getBizType();
|
||||||
LocalDateTime createTimeStart = searchGoodsCategoryParam.getCreateTimeStart();
|
LocalDateTime createTimeStart = searchGoodsCategoryParam.getCreateTimeStart();
|
||||||
LocalDateTime createTimeEnd = searchGoodsCategoryParam.getCreateTimeEnd();
|
LocalDateTime createTimeEnd = searchGoodsCategoryParam.getCreateTimeEnd();
|
||||||
|
String keywords = searchGoodsCategoryParam.getKeywords();
|
||||||
|
|
||||||
Page<GoodsCategoryEntity> page = this.page(pageParam.toPage(), Wrappers.lambdaQuery(GoodsCategoryEntity.class)
|
Page<GoodsCategoryEntity> page = this.page(pageParam.toPage(), Wrappers.lambdaQuery(GoodsCategoryEntity.class)
|
||||||
.like(StrUtil.isNotBlank(categoryName), GoodsCategoryEntity::getCategoryName, categoryName)
|
.like(StrUtil.isNotBlank(categoryName), GoodsCategoryEntity::getCategoryName, categoryName)
|
||||||
.eq(bizType != null, GoodsCategoryEntity::getBizType, bizType)
|
.eq(bizType != null, GoodsCategoryEntity::getBizType, bizType)
|
||||||
.ge(createTimeStart != null, GoodsCategoryEntity::getCreateTime, createTimeStart)
|
.ge(createTimeStart != null, GoodsCategoryEntity::getCreateTime, createTimeStart)
|
||||||
.le(createTimeEnd != null, GoodsCategoryEntity::getCreateTime, createTimeEnd)
|
.le(createTimeEnd != null, GoodsCategoryEntity::getCreateTime, createTimeEnd)
|
||||||
|
.and(StrUtil.isNotBlank(keywords), it -> it.like(GoodsCategoryEntity::getCategoryName, keywords)
|
||||||
|
.or().like(GoodsCategoryEntity::getSn, keywords)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
return PageResult.of(page);
|
return PageResult.of(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成分类码
|
|
||||||
*
|
|
||||||
* @return sn 分类码
|
|
||||||
*/
|
|
||||||
public String generateSn() {
|
|
||||||
String sn = SnUtil.next("GC-SN");
|
|
||||||
if (this.exists(Wrappers.<GoodsCategoryEntity>lambdaQuery().eq(GoodsCategoryEntity::getSn, sn)
|
|
||||||
.eq(GoodsCategoryEntity::getDeleted, Boolean.FALSE))) {
|
|
||||||
this.generateSn();
|
|
||||||
}
|
|
||||||
return sn;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import com.njzscloud.dispose.finance.pojo.entity.ExpenseItemEntity;
|
||||||
import com.njzscloud.dispose.finance.pojo.param.AddExpenseItemParam;
|
import com.njzscloud.dispose.finance.pojo.param.AddExpenseItemParam;
|
||||||
import com.njzscloud.dispose.finance.pojo.param.ModifyExpenseItemParam;
|
import com.njzscloud.dispose.finance.pojo.param.ModifyExpenseItemParam;
|
||||||
import com.njzscloud.dispose.finance.service.ExpenseItemService;
|
import com.njzscloud.dispose.finance.service.ExpenseItemService;
|
||||||
|
import com.njzscloud.dispose.goods.contant.BizType;
|
||||||
import com.njzscloud.dispose.goods.mapper.GoodsMapper;
|
import com.njzscloud.dispose.goods.mapper.GoodsMapper;
|
||||||
import com.njzscloud.dispose.goods.pojo.entity.GoodsEntity;
|
import com.njzscloud.dispose.goods.pojo.entity.GoodsEntity;
|
||||||
import com.njzscloud.dispose.goods.pojo.param.AddGoodsParam;
|
import com.njzscloud.dispose.goods.pojo.param.AddGoodsParam;
|
||||||
|
|
@ -42,9 +43,8 @@ public class GoodsService extends ServiceImpl<GoodsMapper, GoodsEntity> {
|
||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void add(AddGoodsParam addGoodsParam) {
|
public void add(AddGoodsParam addGoodsParam) {
|
||||||
String sn = SnUtil.next("Goods-SN");
|
GoodsEntity goodsEntity = BeanUtil.copyProperties(addGoodsParam, GoodsEntity.class)
|
||||||
addGoodsParam.setSn(sn);
|
.setSn(SnUtil.next("Goods-SN"));
|
||||||
GoodsEntity goodsEntity = BeanUtil.copyProperties(addGoodsParam, GoodsEntity.class);
|
|
||||||
this.save(goodsEntity);
|
this.save(goodsEntity);
|
||||||
// 付费项
|
// 付费项
|
||||||
AddGoodsParam.ExpenseItem expenseItem = addGoodsParam.getExpenseItem();
|
AddGoodsParam.ExpenseItem expenseItem = addGoodsParam.getExpenseItem();
|
||||||
|
|
@ -100,13 +100,24 @@ public class GoodsService extends ServiceImpl<GoodsMapper, GoodsEntity> {
|
||||||
* 分页查询
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
public PageResult<SearchGoodsResult> paging(PageParam pageParam, SearchGoodsParam goodsParam) {
|
public PageResult<SearchGoodsResult> paging(PageParam pageParam, SearchGoodsParam goodsParam) {
|
||||||
|
String keywords = goodsParam.getKeywords();
|
||||||
|
BizType bizType = goodsParam.getBizType();
|
||||||
|
Long goodsCategoryId = goodsParam.getGoodsCategoryId();
|
||||||
|
String sn = goodsParam.getSn();
|
||||||
|
String goodsName = goodsParam.getGoodsName();
|
||||||
|
String specParams = goodsParam.getSpecParams();
|
||||||
|
Boolean canuse = goodsParam.getCanuse();
|
||||||
return PageResult.of(baseMapper.paging(pageParam.toPage(), Wrappers.query()
|
return PageResult.of(baseMapper.paging(pageParam.toPage(), Wrappers.query()
|
||||||
.eq("a.deleted", Boolean.FALSE)
|
.eq("a.deleted", Boolean.FALSE)
|
||||||
.eq(goodsParam.getGoodsCategoryId() != null, "a.goods_category_id", goodsParam.getGoodsCategoryId())
|
.eq(bizType != null, "b.biz_type", bizType)
|
||||||
.like(StrUtil.isNotBlank(goodsParam.getSn()), "a.sn", goodsParam.getSn())
|
.eq(goodsCategoryId != null, "a.goods_category_id", goodsCategoryId)
|
||||||
.like(StrUtil.isNotBlank(goodsParam.getGoodsName()), "a.goods_name", goodsParam.getGoodsName())
|
.like(StrUtil.isNotBlank(sn), "a.sn", sn)
|
||||||
.like(StrUtil.isNotBlank(goodsParam.getSpecParams()), "a.spec_params", goodsParam.getSpecParams())
|
.like(StrUtil.isNotBlank(goodsName), "a.goods_name", goodsName)
|
||||||
.eq(goodsParam.getCanuse() != null, "a.canuse", goodsParam.getCanuse())
|
.like(StrUtil.isNotBlank(specParams), "a.spec_params", specParams)
|
||||||
|
.eq(canuse != null, "a.canuse", canuse)
|
||||||
|
.and(StrUtil.isNotBlank(keywords), it -> it.like("a.sn", keywords)
|
||||||
|
.or().like("a.goods_name", keywords)
|
||||||
|
)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njzscloud.dispose.cst.order.mapper.OrderMapper">
|
||||||
|
|
||||||
|
<select id="paging" resultType="com.njzscloud.dispose.cst.order.pojo.result.SearchOrderResult">
|
||||||
|
SELECT a.id,
|
||||||
|
a.sn,
|
||||||
|
a.project_id,
|
||||||
|
a.user_id,
|
||||||
|
a.customer_id,
|
||||||
|
a.contacts,
|
||||||
|
a.phone,
|
||||||
|
a.order_time,
|
||||||
|
a.order_category,
|
||||||
|
a.order_status,
|
||||||
|
a.finish_time,
|
||||||
|
a.trans_org_id,
|
||||||
|
a.trans_customer_id,
|
||||||
|
a.assignment_trans_time,
|
||||||
|
a.station_id,
|
||||||
|
a.station_name,
|
||||||
|
a.trans_distance,
|
||||||
|
a.estimated_quantity,
|
||||||
|
a.estimated_train_num,
|
||||||
|
a.goods_id,
|
||||||
|
a.goods_name,
|
||||||
|
a.unit,
|
||||||
|
a.customer_memo,
|
||||||
|
a.create_time
|
||||||
|
FROM (SELECT a.id
|
||||||
|
FROM cst_order a
|
||||||
|
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</if>
|
||||||
|
) temp
|
||||||
|
INNER JOIN cst_order a ON a.id = temp.id
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njzscloud.dispose.cst.order.mapper.OrderPaymentRecordMapper">
|
||||||
|
|
||||||
|
<select id="listPaymentRecord"
|
||||||
|
resultType="com.njzscloud.dispose.cst.order.pojo.result.SearchOrderPaymentRecordResult">
|
||||||
|
SELECT a.id,
|
||||||
|
a.order_id,
|
||||||
|
a.expense_item_id,
|
||||||
|
a.trans_id,
|
||||||
|
a.quantity,
|
||||||
|
a.payment_status,
|
||||||
|
a.pay_time,
|
||||||
|
a.refund_time,
|
||||||
|
a.total_money,
|
||||||
|
a.discount_money,
|
||||||
|
a.revise_money,
|
||||||
|
a.settle_money,
|
||||||
|
a.settlement_way,
|
||||||
|
a.payer_user_id,
|
||||||
|
a.payer_customer_id,
|
||||||
|
a.payer_money_account_id,
|
||||||
|
b.expense_item_category,
|
||||||
|
b.goods_id,
|
||||||
|
b.expense_item_name,
|
||||||
|
b.expense_strategy,
|
||||||
|
b.unit,
|
||||||
|
b.tax_rate,
|
||||||
|
b.unit_price,
|
||||||
|
b.initial_price,
|
||||||
|
b.initial_quantity,
|
||||||
|
b.every_quantity
|
||||||
|
FROM cst_order_payment_record a
|
||||||
|
INNER JOIN cst_order_expense_items b ON b.id = a.expense_item_id
|
||||||
|
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue