Compare commits
2 Commits
5927eb6ae4
...
9e0dd924e5
| Author | SHA1 | Date |
|---|---|---|
|
|
9e0dd924e5 | |
|
|
4c4b93599d |
|
|
@ -5,3 +5,4 @@
|
|||
/**/.DS_Store
|
||||
/**/.njzscloud-dispose
|
||||
/接口文档
|
||||
/.vscode
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
package com.njzscloud.dispose.cst.order.constant;
|
||||
|
||||
import com.njzscloud.common.core.ienum.DictStr;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 字典代码:settlement_way
|
||||
* 字典名称:结算方式
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum SettlementWay implements DictStr {
|
||||
YueJie("YueJie", "月结"),
|
||||
|
||||
YuE("YuE", "余额"),
|
||||
|
||||
XianFu("XianFu", "现付"),
|
||||
|
||||
;
|
||||
private final String val;
|
||||
|
||||
private final String txt;
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.njzscloud.dispose.cst.order.controller;
|
||||
|
||||
import com.njzscloud.common.core.utils.R;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.param.SearchOrderPaymentRecordParam;
|
||||
import com.njzscloud.dispose.cst.order.service.OrderPaymentRecordService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 付费记录
|
||||
*
|
||||
* @author ljw
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/orderPaymentRecord")
|
||||
@RequiredArgsConstructor
|
||||
public class OrderPaymentRecordController {
|
||||
|
||||
private final OrderPaymentRecordService orderPaymentRecordService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public R<?> add(@RequestBody OrderPaymentRecordEntity orderPaymentRecordEntity) {
|
||||
orderPaymentRecordService.add(orderPaymentRecordEntity);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PostMapping("/modify")
|
||||
public R<?> modify(@RequestBody OrderPaymentRecordEntity orderPaymentRecordEntity) {
|
||||
orderPaymentRecordService.modify(orderPaymentRecordEntity);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public R<?> del(@RequestBody List<Long> ids) {
|
||||
orderPaymentRecordService.del(ids);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<OrderPaymentRecordEntity> detail(@RequestParam("id") Long id) {
|
||||
return R.success(orderPaymentRecordService.detail(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
@GetMapping("/paging")
|
||||
public R<PageResult<OrderPaymentRecordEntity>> paging(PageParam pageParam, SearchOrderPaymentRecordParam param) {
|
||||
return R.success(orderPaymentRecordService.paging(pageParam, param));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.njzscloud.dispose.cst.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 付费记录
|
||||
*
|
||||
* @author ljw
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderPaymentRecordMapper extends BaseMapper<OrderPaymentRecordEntity> {
|
||||
}
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
package com.njzscloud.dispose.cst.order.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
|
@ -9,6 +10,7 @@ import lombok.experimental.Accessors;
|
|||
|
||||
/**
|
||||
* 装/卸货地信息
|
||||
*
|
||||
* @author ljw
|
||||
*/
|
||||
@Getter
|
||||
|
|
@ -16,7 +18,13 @@ import lombok.experimental.Accessors;
|
|||
@ToString
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "cst_order_cargo_place", autoResultMap = true)
|
||||
public class OrderCargoPlaceEntity extends BaseEntity {
|
||||
public class OrderCargoPlaceEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单 Id
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.njzscloud.dispose.cst.order.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.njzscloud.dispose.cst.order.constant.OrderCategory;
|
||||
import com.njzscloud.dispose.cst.order.constant.OrderStatus;
|
||||
import lombok.Getter;
|
||||
|
|
@ -21,7 +20,13 @@ import java.time.LocalDateTime;
|
|||
@ToString
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "cst_order", autoResultMap = true)
|
||||
public class OrderEntity extends BaseEntity {
|
||||
public class OrderEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
|
|
@ -132,6 +137,36 @@ public class OrderEntity extends BaseEntity {
|
|||
* 客户备注
|
||||
*/
|
||||
private String customerMemo;
|
||||
|
||||
/**
|
||||
* 创建人 Id;sys_user.id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 修改人 Id; sys_user.id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long modifierId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
/**
|
||||
* 是否删除; 0-->未删除、1-->已删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Boolean deleted;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
package com.njzscloud.dispose.cst.order.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||
import com.njzscloud.dispose.finance.constant.ExpenseItemCategory;
|
||||
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
|
@ -19,7 +23,18 @@ import java.math.BigDecimal;
|
|||
@ToString
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "cst_order_expense_items", autoResultMap = true)
|
||||
public class OrderExpenseItemsEntity extends BaseEntity {
|
||||
public class OrderExpenseItemsEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 源付费项 Id;fin_expense_item.id
|
||||
*/
|
||||
private Long originExpenseItemsId;
|
||||
|
||||
/**
|
||||
* 订单 Id
|
||||
|
|
@ -29,7 +44,12 @@ public class OrderExpenseItemsEntity extends BaseEntity {
|
|||
/**
|
||||
* 收费项目类型,QiTa-->其他、ChanPin-->产品、YunFei-->运费
|
||||
*/
|
||||
private String expenseItemCategory;
|
||||
private ExpenseItemCategory expenseItemCategory;
|
||||
|
||||
/**
|
||||
* 产品 Id;仅当项目类型为"产品"时有值
|
||||
*/
|
||||
private Long goodsId;
|
||||
|
||||
/**
|
||||
* 付费项名称
|
||||
|
|
@ -39,18 +59,13 @@ public class OrderExpenseItemsEntity extends BaseEntity {
|
|||
/**
|
||||
* 计费策略;字典代码:expense_strategy,MianFei-->免费、TanXing-->弹性、GuDing-->固定、Che-->车、Fang-->方、JuLi-->距离
|
||||
*/
|
||||
private String expenseStrategy;
|
||||
private ExpenseStrategy expenseStrategy;
|
||||
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
private BigDecimal taxRate;
|
||||
|
||||
/**
|
||||
* 付费方;字典代码:payer,PingTai-->平台、ChanFei-->产废方、QingYun-->清运方、XiaoNa-->消纳方、CaiGou-->采购方
|
||||
*/
|
||||
private String payer;
|
||||
|
||||
/**
|
||||
* 计量单位;字典代码:unit
|
||||
*/
|
||||
|
|
@ -77,83 +92,19 @@ public class OrderExpenseItemsEntity extends BaseEntity {
|
|||
private Integer everyQuantity;
|
||||
|
||||
/**
|
||||
* 适用用户;结构类型:{
|
||||
* strategy: None | All | Specify,
|
||||
* objs: long[]
|
||||
* },Wu-->无、ZhiDing-->指定、SuoYou-->所有
|
||||
* 归属用户Id
|
||||
*/
|
||||
private String userScope;
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 适用站点;结构类型:{
|
||||
* strategy: None | All | Specify,
|
||||
* objs: long[]
|
||||
* },Wu-->无、ZhiDing-->指定、SuoYou-->所有
|
||||
* 归属客户Id
|
||||
*/
|
||||
private String stationScope;
|
||||
private Long customerId;
|
||||
|
||||
/**
|
||||
* 适用产品;结构类型:{
|
||||
* strategy: None | All | Specify,
|
||||
* objs: long[]
|
||||
* },Wu-->无、ZhiDing-->指定、SuoYou-->所有
|
||||
* 归属组织Id
|
||||
*/
|
||||
private String goodsScope;
|
||||
|
||||
/**
|
||||
* 支付状态,MianFei-->免费、WeiZhiFu-->未支付、YiZhiFu-->已支付、YiTuiKuan-->已退款
|
||||
*/
|
||||
private String paymentStatus;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private BigDecimal payTime;
|
||||
|
||||
/**
|
||||
* 退款时间
|
||||
*/
|
||||
private BigDecimal refundTime;
|
||||
|
||||
/**
|
||||
* 总金额;单位:元
|
||||
*/
|
||||
private BigDecimal totalMoney;
|
||||
|
||||
/**
|
||||
* 优惠金额;单位:元,有正负
|
||||
*/
|
||||
private BigDecimal discountMoney;
|
||||
|
||||
/**
|
||||
* 手动修正金额;单位:元,有正负
|
||||
*/
|
||||
private BigDecimal reviseMoney;
|
||||
|
||||
/**
|
||||
* 结算金额;单位:元
|
||||
*/
|
||||
private BigDecimal settleMoney;
|
||||
|
||||
/**
|
||||
* 结算方式,YueJie-->月结、YuE-->余额、XianFu-->现付
|
||||
*/
|
||||
private String settlementWay;
|
||||
|
||||
/**
|
||||
* 付款人 Id;sys_user.id
|
||||
*/
|
||||
private Long payerUserId;
|
||||
|
||||
/**
|
||||
* 付款人客户 Id;cst_customer.id
|
||||
*/
|
||||
private Long payerCustomerId;
|
||||
|
||||
/**
|
||||
* 付款方资金账户 Id
|
||||
*/
|
||||
private Long payerMoneyAccount;
|
||||
private Long orgId;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,115 @@
|
|||
package com.njzscloud.dispose.cst.order.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njzscloud.dispose.cst.customer.constant.SettlementWay;
|
||||
import com.njzscloud.dispose.cst.order.constant.PaymentStatus;
|
||||
import com.njzscloud.dispose.finance.constant.Payer;
|
||||
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)
|
||||
@TableName(value = "cst_order_payment_record", autoResultMap = true)
|
||||
public class OrderPaymentRecordEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
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 Integer 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;
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +1,17 @@
|
|||
package com.njzscloud.dispose.cst.order.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler;
|
||||
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||
import com.njzscloud.dispose.cst.order.constant.CheckStatus;
|
||||
import com.njzscloud.dispose.cst.order.constant.PaymentStatus;
|
||||
import com.njzscloud.dispose.cst.order.constant.TransStatus;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -26,7 +25,13 @@ import java.util.List;
|
|||
@ToString
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "cst_order_trans", autoResultMap = true)
|
||||
public class OrderTransEntity extends BaseEntity {
|
||||
public class OrderTransEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 车次
|
||||
|
|
@ -184,61 +189,6 @@ public class OrderTransEntity extends BaseEntity {
|
|||
*/
|
||||
private LocalDateTime outTime;
|
||||
|
||||
/**
|
||||
* 支付状态,MianFei-->免费、WeiZhiFu-->未支付、YiZhiFu-->已支付、YiTuiKuan-->已退款
|
||||
*/
|
||||
private PaymentStatus paymentStatus;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private BigDecimal payTime;
|
||||
|
||||
/**
|
||||
* 退款时间
|
||||
*/
|
||||
private BigDecimal refundTime;
|
||||
|
||||
/**
|
||||
* 总金额;单位:元
|
||||
*/
|
||||
private BigDecimal totalMoney;
|
||||
|
||||
/**
|
||||
* 优惠金额;单位:元,有正负
|
||||
*/
|
||||
private BigDecimal discountMoney;
|
||||
|
||||
/**
|
||||
* 手动修正金额;单位:元,有正负
|
||||
*/
|
||||
private BigDecimal reviseMoney;
|
||||
|
||||
/**
|
||||
* 结算金额;单位:元
|
||||
*/
|
||||
private BigDecimal settleMoney;
|
||||
|
||||
/**
|
||||
* 结算方式,YueJie-->月结、YuE-->余额、XianFu-->现付
|
||||
*/
|
||||
private String settlementWay;
|
||||
|
||||
/**
|
||||
* 付款人 Id;sys_user.id
|
||||
*/
|
||||
private Long payerUserId;
|
||||
|
||||
/**
|
||||
* 付款人客户 Id;cst_customer.id
|
||||
*/
|
||||
private Long payerCustomerId;
|
||||
|
||||
/**
|
||||
* 付款方资金账户 Id
|
||||
*/
|
||||
private Long payerMoneyAccount;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ import lombok.experimental.Accessors;
|
|||
public class AssignmentOrgParam {
|
||||
|
||||
/**
|
||||
* 订单运输ID
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderTransId;
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 清运公司Id
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package com.njzscloud.dispose.cst.order.pojo.param;
|
||||
|
||||
import com.njzscloud.dispose.cst.order.constant.PaymentStatus;
|
||||
import com.njzscloud.dispose.finance.constant.Payer;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 查询付费记录参数
|
||||
*
|
||||
* @author ljw
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class SearchOrderPaymentRecordParam {
|
||||
|
||||
/**
|
||||
* 订单 Id
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 订单收费项 Id
|
||||
*/
|
||||
private Long expenseItemId;
|
||||
|
||||
/**
|
||||
* 运输记录 Id
|
||||
*/
|
||||
private Long transId;
|
||||
|
||||
/**
|
||||
* 付费方
|
||||
*/
|
||||
private Payer payer;
|
||||
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
private PaymentStatus paymentStatus;
|
||||
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ import com.njzscloud.dispose.cst.order.constant.OrderStatus;
|
|||
import com.njzscloud.dispose.cst.order.constant.TransStatus;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -178,86 +177,6 @@ public class OrderTransResult {
|
|||
*/
|
||||
private LocalDateTime outTime;
|
||||
|
||||
/**
|
||||
* 支付状态,MianFei-->免费、WeiZhiFu-->未支付、YiZhiFu-->已支付、YiTuiKuan-->已退款
|
||||
*/
|
||||
private String paymentStatus;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private BigDecimal payTime;
|
||||
|
||||
/**
|
||||
* 退款时间
|
||||
*/
|
||||
private BigDecimal refundTime;
|
||||
|
||||
/**
|
||||
* 总金额;单位:元
|
||||
*/
|
||||
private BigDecimal totalMoney;
|
||||
|
||||
/**
|
||||
* 优惠金额;单位:元,有正负
|
||||
*/
|
||||
private BigDecimal discountMoney;
|
||||
|
||||
/**
|
||||
* 手动修正金额;单位:元,有正负
|
||||
*/
|
||||
private BigDecimal reviseMoney;
|
||||
|
||||
/**
|
||||
* 结算金额;单位:元
|
||||
*/
|
||||
private BigDecimal settleMoney;
|
||||
|
||||
/**
|
||||
* 结算方式,YueJie-->月结、YuE-->余额、XianFu-->现付
|
||||
*/
|
||||
private String settlementWay;
|
||||
|
||||
/**
|
||||
* 付款人 Id;sys_user.id
|
||||
*/
|
||||
private Long payerUserId;
|
||||
|
||||
/**
|
||||
* 付款人客户 Id;cst_customer.id
|
||||
*/
|
||||
private Long payerCustomerId;
|
||||
|
||||
/**
|
||||
* 付款方资金账户 Id
|
||||
*/
|
||||
private Long payerMoneyAccount;
|
||||
|
||||
/**
|
||||
* 创建人 Id;sys_user.id
|
||||
*/
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 修改人 Id; sys_user.id
|
||||
*/
|
||||
private Long modifierId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
/**
|
||||
* 是否删除; 0-->未删除、1-->已删除
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* 运输组织 Id;cst_org.id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
package com.njzscloud.dispose.cst.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.dispose.cst.order.mapper.OrderPaymentRecordMapper;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.param.SearchOrderPaymentRecordParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 付费记录
|
||||
*
|
||||
* @author ljw
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class OrderPaymentRecordService extends ServiceImpl<OrderPaymentRecordMapper, OrderPaymentRecordEntity> {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void add(OrderPaymentRecordEntity orderPaymentRecordEntity) {
|
||||
this.save(orderPaymentRecordEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void modify(OrderPaymentRecordEntity orderPaymentRecordEntity) {
|
||||
this.updateById(orderPaymentRecordEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void del(List<Long> ids) {
|
||||
this.removeBatchByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
public OrderPaymentRecordEntity detail(Long id) {
|
||||
return this.getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
public PageResult<OrderPaymentRecordEntity> paging(PageParam pageParam, SearchOrderPaymentRecordParam param) {
|
||||
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<OrderPaymentRecordEntity>lambdaQuery()
|
||||
.eq(param.getOrderId() != null, OrderPaymentRecordEntity::getOrderId, param.getOrderId())
|
||||
.eq(param.getExpenseItemId() != null, OrderPaymentRecordEntity::getExpenseItemId, param.getExpenseItemId())
|
||||
.eq(param.getTransId() != null, OrderPaymentRecordEntity::getTransId, param.getTransId())
|
||||
.eq(param.getPayer() != null, OrderPaymentRecordEntity::getPayer, param.getPayer())
|
||||
.eq(param.getPaymentStatus() != null, OrderPaymentRecordEntity::getPaymentStatus, param.getPaymentStatus())));
|
||||
}
|
||||
}
|
||||
|
|
@ -16,21 +16,20 @@ import com.njzscloud.dispose.cst.driver.pojo.entity.DriverEntity;
|
|||
import com.njzscloud.dispose.cst.order.constant.*;
|
||||
import com.njzscloud.dispose.cst.order.mapper.OrderMapper;
|
||||
import com.njzscloud.dispose.cst.order.mapper.OrderTransMapper;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderCargoPlaceEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderExpenseItemsEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderTransEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.*;
|
||||
import com.njzscloud.dispose.cst.order.pojo.param.*;
|
||||
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
||||
import com.njzscloud.dispose.cst.truck.mapper.TruckMapper;
|
||||
import com.njzscloud.dispose.cst.truck.pojo.entity.TruckEntity;
|
||||
import com.njzscloud.dispose.finance.constant.ScopeStrategy;
|
||||
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
||||
import com.njzscloud.dispose.finance.mapper.MoneyAccountMapper;
|
||||
import com.njzscloud.dispose.finance.pojo.entity.ExpenseItemEntity;
|
||||
import com.njzscloud.dispose.finance.pojo.entity.ScopeStrategyConfig;
|
||||
import com.njzscloud.dispose.finance.pojo.entity.MoneyAccountEntity;
|
||||
import com.njzscloud.dispose.finance.service.ExpenseItemService;
|
||||
import com.njzscloud.dispose.sys.auth.pojo.result.MyResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -56,6 +55,8 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
|||
private final TruckMapper truckMapper;
|
||||
private final CustomerMapper customerMapper;
|
||||
private final OrderExpenseItemsService orderExpenseItemsService;
|
||||
private final OrderPaymentRecordService orderPaymentRecordService;
|
||||
private final MoneyAccountMapper moneyAccountMapper;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void add(CreateOrderParam param) {
|
||||
|
|
@ -93,7 +94,6 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
|||
transEntity.setTransStatus(transOrgId == null ? null : TransStatus.DaiPaiDan);
|
||||
transEntity.setTransTime(transOrgId == null ? null : LocalDateTime.now());
|
||||
transEntity.setCheckStatus(CheckStatus.WeiKanLiao);
|
||||
transEntity.setPaymentStatus(PaymentStatus.WeiZhiFu);
|
||||
transEntity.setTransDistance(param.getTransDistance());
|
||||
orderTransMapper.insert(transEntity);
|
||||
}
|
||||
|
|
@ -124,10 +124,10 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public void assignmentOrg(AssignmentOrgParam orgParam) {
|
||||
Assert.notNull(orgParam, () -> Exceptions.clierr("请填写参数"));
|
||||
Assert.notNull(orgParam.getOrderTransId(), () -> Exceptions.clierr("订单运输ID不可为空"));
|
||||
Assert.notNull(orgParam.getOrderId(), () -> Exceptions.clierr("订单ID不可为空"));
|
||||
Assert.notNull(orgParam.getTransOrgId(), () -> Exceptions.clierr("清运公司ID不可为空"));
|
||||
|
||||
OrderTransResult result = orderTransMapper.getById(orgParam.getOrderTransId());
|
||||
OrderEntity result = this.getById(orgParam.getOrderId());
|
||||
Assert.notNull(result, () -> Exceptions.clierr("订单不存在"));
|
||||
Assert.isNull(result.getTransOrgId(), () -> Exceptions.clierr("当前订单已分配清运公司,无需重复分配"));
|
||||
Assert.isTrue(OrderStatus.YiYuYue.equals(result.getOrderStatus()), () -> Exceptions.clierr("当前订单状态,无法分配清运公司"));
|
||||
|
|
@ -143,14 +143,17 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
|||
.setTransCustomerId(customer.getId())
|
||||
.setAssignmentTransTime(LocalDateTime.now())
|
||||
.setOrderStatus(OrderStatus.JinXingZhong)
|
||||
.setId(result.getOrderId());
|
||||
.setId(result.getId());
|
||||
this.updateById(orderEntity);
|
||||
|
||||
// 更新运输信息表 cst_trans_order 的运输状态信息
|
||||
OrderTransEntity transEntity = new OrderTransEntity();
|
||||
transEntity.setId(orgParam.getOrderTransId());
|
||||
transEntity.setTransStatus(TransStatus.DaiPaiDan);
|
||||
orderTransMapper.updateById(transEntity);
|
||||
orderTransMapper.update(Wrappers.<OrderTransEntity>lambdaUpdate()
|
||||
.set(OrderTransEntity::getTransStatus, TransStatus.DaiPaiDan)
|
||||
.eq(OrderTransEntity::getOrderId, result.getId()));
|
||||
|
||||
// 创建订单付费项
|
||||
OrderEntity newOrderInfo = this.getById(orgParam.getOrderId());
|
||||
this.createOrderExpenseItems(newOrderInfo);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
@ -335,6 +338,38 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
|||
transEntity.setOutBodyPhoto(leavingParam.getBodyPhoto());
|
||||
transEntity.setOutTime(LocalDateTime.now());
|
||||
orderTransMapper.updateById(transEntity);
|
||||
|
||||
// 更新付费记录的量
|
||||
this.updatePaymentRecordQuantity(transEntity.getId(), transEntity.getSettleWeight());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新付费记录的量
|
||||
*
|
||||
* @param transId 运输记录ID
|
||||
*/
|
||||
private void updatePaymentRecordQuantity(Long transId, Integer settleWeight) {
|
||||
// 1. 通过运输信息ID查询付费记录
|
||||
List<OrderPaymentRecordEntity> paymentRecords = orderPaymentRecordService.list(Wrappers.<OrderPaymentRecordEntity>lambdaQuery()
|
||||
.eq(OrderPaymentRecordEntity::getTransId, transId));
|
||||
|
||||
if (paymentRecords.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 遍历更新每条付费记录的量
|
||||
for (OrderPaymentRecordEntity record : paymentRecords) {
|
||||
// 通过付费记录的订单收费项 Id 查询付费项
|
||||
OrderExpenseItemsEntity expenseItem = orderExpenseItemsService.getById(record.getExpenseItemId());
|
||||
|
||||
// 3. 如果计费策略为Che,则量为1,否则为净重
|
||||
Integer quantity = ExpenseStrategy.Che.equals(expenseItem.getExpenseStrategy()) ? 1 : settleWeight;
|
||||
|
||||
OrderPaymentRecordEntity updateRecord = new OrderPaymentRecordEntity();
|
||||
updateRecord.setId(record.getId());
|
||||
updateRecord.setQuantity(quantity);
|
||||
orderPaymentRecordService.updateById(updateRecord);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateTruckHisTareWeight(Long truckId, Integer weight) {
|
||||
|
|
@ -380,50 +415,32 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
|||
if (!goodsItems.isEmpty()) {
|
||||
goodsOrderItem = BeanUtil.copyProperties(goodsItems.getFirst(), OrderExpenseItemsEntity.class)
|
||||
.setOrderId(orderEntity.getId())
|
||||
.setPaymentStatus(PaymentStatus.WeiZhiFu.getVal());
|
||||
.setOriginExpenseItemsId(goodsItems.getFirst().getId());
|
||||
}
|
||||
|
||||
List<OrderExpenseItemsEntity> extraItems = itemEntityList.stream()
|
||||
.filter(cfg -> {
|
||||
ScopeStrategyConfig userScope = cfg.getUserScope();
|
||||
ScopeStrategyConfig goodsScope = cfg.getGoodsScope();
|
||||
ScopeStrategyConfig stationsScope = cfg.getStationScope();
|
||||
List<Long> companyIds = userScope != null ? userScope.getIds() : null;
|
||||
List<Long> goodsIds = goodsScope != null ? goodsScope.getIds() : null;
|
||||
List<Long> stationsIds = stationsScope != null ? stationsScope.getIds() : null;
|
||||
Long userId = cfg.getUserId();
|
||||
Long customerId = cfg.getCustomerId();
|
||||
Long orgId = cfg.getOrgId();
|
||||
|
||||
// 判断客户范围
|
||||
boolean isComTrue;
|
||||
if (userScope != null && ScopeStrategy.SuoYou.getVal().equals(userScope.getStrategy())) {
|
||||
isComTrue = true; // 所有客户都匹配
|
||||
} else {
|
||||
isComTrue = companyIds != null && transOrgId != null && companyIds.contains(transOrgId);
|
||||
}
|
||||
// 判断用户归属范围
|
||||
boolean isUserTrue = userId == null || userId.equals(orderEntity.getUserId());
|
||||
|
||||
// 判断产品范围
|
||||
boolean isGoodsTrue;
|
||||
if (goodsScope != null && ScopeStrategy.SuoYou.getVal().equals(goodsScope.getStrategy())) {
|
||||
isGoodsTrue = true; // 所有产品都匹配
|
||||
} else {
|
||||
isGoodsTrue = goodsIds != null && goodsId != null && goodsIds.contains(goodsId);
|
||||
}
|
||||
// 判断客户归属范围
|
||||
boolean isCustomerTrue = customerId == null || customerId.equals(orderEntity.getCustomerId());
|
||||
|
||||
// 判断站点范围
|
||||
boolean isStationsTrue;
|
||||
if (stationsScope != null && ScopeStrategy.SuoYou.getVal().equals(stationsScope.getStrategy())) {
|
||||
isStationsTrue = true; // 所有站点都匹配
|
||||
} else {
|
||||
isStationsTrue = stationsIds != null && stationId != null && stationsIds.contains(stationId);
|
||||
}
|
||||
// 判断组织归属范围
|
||||
boolean isOrgTrue = orgId == null || orgId.equals(orderEntity.getTransOrgId());
|
||||
|
||||
// 只有当三个条件都为true时,才返回true
|
||||
return isComTrue && isGoodsTrue && isStationsTrue;
|
||||
return isUserTrue && isCustomerTrue && isOrgTrue;
|
||||
})
|
||||
// 复制配置为订单付费项(数量口径与产品一致:按车=1,否则=settleWeight)
|
||||
.map(cfg -> {
|
||||
OrderExpenseItemsEntity entity = BeanUtil.copyProperties(cfg, OrderExpenseItemsEntity.class);
|
||||
entity.setOrderId(orderEntity.getId());
|
||||
entity.setPaymentStatus(PaymentStatus.WeiZhiFu.getVal());
|
||||
entity.setOriginExpenseItemsId(cfg.getId());
|
||||
return entity;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
|
@ -439,5 +456,55 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
|||
|
||||
// 批量保存付费项
|
||||
orderExpenseItemsService.saveBatch(extraItems);
|
||||
|
||||
// 获取订单的所有运输记录
|
||||
List<OrderTransEntity> transList = orderTransMapper.selectList(Wrappers.<OrderTransEntity>lambdaQuery()
|
||||
.eq(OrderTransEntity::getOrderId, orderEntity.getId()));
|
||||
|
||||
List<OrderPaymentRecordEntity> recordList = Lists.newArrayList();
|
||||
for (OrderTransEntity transEntity : transList) {
|
||||
List<OrderPaymentRecordEntity> paymentRecords = extraItems.stream()
|
||||
.map(item -> {
|
||||
OrderPaymentRecordEntity record = new OrderPaymentRecordEntity()
|
||||
.setOrderId(orderEntity.getId())
|
||||
.setExpenseItemId(item.getId())
|
||||
.setTransId(transEntity.getId())
|
||||
.setPaymentStatus(PaymentStatus.WeiZhiFu);
|
||||
|
||||
// 根据归属字段获取结算方式和账户信息
|
||||
Long customerId = item.getCustomerId();
|
||||
if (customerId == null) {
|
||||
// 如果没有归属客户,尝试从订单获取
|
||||
customerId = orderEntity.getCustomerId();
|
||||
}
|
||||
|
||||
CustomerEntity customer = customerMapper.selectOne(Wrappers.<CustomerEntity>lambdaQuery()
|
||||
.eq(CustomerEntity::getId, customerId));
|
||||
if (customer != null && customer.getSettlementWay() != null) {
|
||||
record.setSettlementWay(customer.getSettlementWay());
|
||||
record.setPayerCustomerId(customer.getId());
|
||||
record.setPayerUserId(customer.getUserId());
|
||||
} else {
|
||||
throw Exceptions.clierr("付款人客户信息不存在或未配置付费方式");
|
||||
}
|
||||
|
||||
// 查询资金账户
|
||||
MoneyAccountEntity moneyAccount = moneyAccountMapper.selectOne(Wrappers.<MoneyAccountEntity>lambdaQuery()
|
||||
.eq(MoneyAccountEntity::getCustomerId, customerId)
|
||||
.eq(MoneyAccountEntity::getDeleted, Boolean.FALSE));
|
||||
if (moneyAccount != null) {
|
||||
record.setPayerMoneyAccountId(moneyAccount.getId());
|
||||
} else {
|
||||
throw Exceptions.clierr("付款人资金账户不存在");
|
||||
}
|
||||
|
||||
return record;
|
||||
})
|
||||
.toList();
|
||||
recordList.addAll(paymentRecords);
|
||||
}
|
||||
|
||||
// 批量新增付费记录
|
||||
orderPaymentRecordService.saveBatch(recordList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,14 @@ import com.njzscloud.common.oss.util.AliOSS;
|
|||
import com.njzscloud.dispose.cst.order.constant.*;
|
||||
import com.njzscloud.dispose.cst.order.mapper.OrderTransMapper;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderExpenseItemsEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderTransEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
||||
import com.njzscloud.dispose.dev.DiscoverTruckMsg;
|
||||
import com.njzscloud.dispose.dev.ObtainTruckDataResultMsg;
|
||||
import com.njzscloud.dispose.dev.WbsHandle;
|
||||
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -35,6 +38,8 @@ public class TruckWeighingBusinessService {
|
|||
|
||||
private final OrderService orderService;
|
||||
private final OrderTransMapper orderTransMapper;
|
||||
private final OrderPaymentRecordService orderPaymentRecordService;
|
||||
private final OrderExpenseItemsService orderExpenseItemsService;
|
||||
|
||||
/**
|
||||
* 请求数据 - 处理车辆识别
|
||||
|
|
@ -226,6 +231,43 @@ public class TruckWeighingBusinessService {
|
|||
Integer settleWeight = transEntity.getSettleWeight();
|
||||
log.info("车辆出场称重完成,订单ID: {}, 重量: {}kg, 净重: {}kg",
|
||||
orderTrans.getId(), weight, settleWeight);
|
||||
|
||||
// 更新付费记录的量
|
||||
this.updatePaymentRecordQuantity(orderTrans.getId(), settleWeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新付费记录的量
|
||||
*
|
||||
* @param transId 运输记录ID
|
||||
* @param settleWeight 净重
|
||||
*/
|
||||
private void updatePaymentRecordQuantity(Long transId, Integer settleWeight) {
|
||||
// 1. 通过运输信息ID查询付费记录
|
||||
List<OrderPaymentRecordEntity> paymentRecords = orderPaymentRecordService.list(Wrappers.<OrderPaymentRecordEntity>lambdaQuery()
|
||||
.eq(OrderPaymentRecordEntity::getTransId, transId));
|
||||
|
||||
if (paymentRecords.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 遍历更新每条付费记录的量
|
||||
for (OrderPaymentRecordEntity record : paymentRecords) {
|
||||
// 通过付费记录的订单收费项 Id 查询付费项
|
||||
OrderExpenseItemsEntity expenseItem = orderExpenseItemsService.getById(record.getExpenseItemId());
|
||||
if (expenseItem == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 3. 如果计费策略为Che,则量为1,否则为净重
|
||||
Integer quantity = ExpenseStrategy.Che.equals(expenseItem.getExpenseStrategy()) ? 1 : settleWeight;
|
||||
|
||||
OrderPaymentRecordEntity updateRecord = new OrderPaymentRecordEntity();
|
||||
updateRecord.setId(record.getId());
|
||||
updateRecord.setQuantity(quantity);
|
||||
orderPaymentRecordService.updateById(updateRecord);
|
||||
}
|
||||
log.info("运输记录 {} 的付费记录量更新完成", transId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -361,7 +403,6 @@ public class TruckWeighingBusinessService {
|
|||
List<OrderTransEntity> transList = orderTransMapper.selectList(
|
||||
Wrappers.<OrderTransEntity>lambdaQuery()
|
||||
.eq(OrderTransEntity::getOrderId, orderId)
|
||||
.eq(OrderTransEntity::getDeleted, Boolean.FALSE)
|
||||
);
|
||||
|
||||
if (transList.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import lombok.RequiredArgsConstructor;
|
|||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum OrgCategory implements DictStr {
|
||||
GeTiHu("GeTiHu", "个体户"),
|
||||
GeTi("GeTi", "个体"),
|
||||
|
||||
QiYe("QiYe", "企业"),
|
||||
|
||||
|
|
|
|||
|
|
@ -33,10 +33,7 @@ public class TruckServiceImpl extends ServiceImpl<TruckMapper, TruckEntity> impl
|
|||
MyResult userDetail = SecurityUtil.loginUser();
|
||||
Long customerId = userDetail.getCurrentCustomerId();
|
||||
truckEntity.setCustomerId(customerId);
|
||||
IdentityInfo identityInfo = userDetail.currentIdentity();
|
||||
if (identityInfo.getManager()) {
|
||||
truckEntity.setOrgId(identityInfo.getOrgId());
|
||||
}
|
||||
truckEntity.setOrgId(userDetail.getCurrentOrgId());
|
||||
truckEntity.setTareWeight(0);
|
||||
this.save(truckEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
package com.njzscloud.dispose.finance.constant;
|
||||
|
||||
import com.njzscloud.common.core.ienum.DictStr;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import com.njzscloud.common.core.ienum.DictStr;
|
||||
/**
|
||||
* 字典代码:payer
|
||||
* 字典名称:付费方
|
||||
*
|
||||
* @author ljw
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
|
|
@ -17,7 +14,7 @@ public enum Payer implements DictStr {
|
|||
|
||||
ChanFei("ChanFei", "产废方"),
|
||||
|
||||
QingYun("YunShuFang", "运输方"),
|
||||
YunShu("YunShu", "运输方"),
|
||||
|
||||
XiaoNa("XiaoNa", "消纳方"),
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler;
|
|||
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||
import com.njzscloud.dispose.finance.constant.ExpenseItemCategory;
|
||||
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
||||
import com.njzscloud.dispose.finance.constant.Payer;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
|
@ -59,11 +58,6 @@ public class ExpenseItemEntity extends BaseEntity {
|
|||
*/
|
||||
private BigDecimal taxRate;
|
||||
|
||||
/**
|
||||
* 付费方;字典代码:payer
|
||||
*/
|
||||
private Payer payer;
|
||||
|
||||
/**
|
||||
* 单价;单位:元,弹性模式-->每档价格
|
||||
*/
|
||||
|
|
@ -85,22 +79,19 @@ public class ExpenseItemEntity extends BaseEntity {
|
|||
private Integer everyQuantity;
|
||||
|
||||
/**
|
||||
* 适用用户;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||
* 归属用户Id
|
||||
*/
|
||||
@TableField(typeHandler = JsonTypeHandler.class)
|
||||
private ScopeStrategyConfig userScope;
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 适用站点;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||
* 归属客户Id
|
||||
*/
|
||||
@TableField(typeHandler = JsonTypeHandler.class)
|
||||
private ScopeStrategyConfig stationScope;
|
||||
private Long customerId;
|
||||
|
||||
/**
|
||||
* 适用产品;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||
* 归属组织Id
|
||||
*/
|
||||
@TableField(typeHandler = JsonTypeHandler.class)
|
||||
private ScopeStrategyConfig goodsScope;
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 是否可用;0-->否、1-->是
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package com.njzscloud.dispose.finance.pojo.param;
|
|||
|
||||
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.pojo.entity.ScopeStrategyConfig;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
|
@ -42,11 +40,6 @@ public class AddExpenseItemParam {
|
|||
*/
|
||||
private BigDecimal taxRate;
|
||||
|
||||
/**
|
||||
* 付费方;字典代码:payer
|
||||
*/
|
||||
private Payer payer;
|
||||
|
||||
/**
|
||||
* 单价;单位:元,弹性模式-->每档价格
|
||||
*/
|
||||
|
|
@ -67,20 +60,6 @@ public class AddExpenseItemParam {
|
|||
*/
|
||||
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;
|
||||
/**
|
||||
* 产品 Id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package com.njzscloud.dispose.finance.pojo.param;
|
|||
|
||||
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.pojo.entity.ScopeStrategyConfig;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
|
@ -46,11 +44,6 @@ public class ModifyExpenseItemParam {
|
|||
*/
|
||||
private BigDecimal taxRate;
|
||||
|
||||
/**
|
||||
* 付费方;字典代码:payer
|
||||
*/
|
||||
private Payer payer;
|
||||
|
||||
/**
|
||||
* 单价;单位:元,弹性模式-->每档价格
|
||||
*/
|
||||
|
|
@ -72,19 +65,20 @@ public class ModifyExpenseItemParam {
|
|||
private Integer everyQuantity;
|
||||
|
||||
/**
|
||||
* 适用用户;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||
* 归属用户Id
|
||||
*/
|
||||
private ScopeStrategyConfig userScope;
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 适用站点;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||
* 归属客户Id
|
||||
*/
|
||||
private ScopeStrategyConfig stationScope;
|
||||
private Long customerId;
|
||||
|
||||
/**
|
||||
* 适用产品;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||
* 归属组织Id
|
||||
*/
|
||||
private ScopeStrategyConfig goodsScope;
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 产品 Id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package com.njzscloud.dispose.finance.pojo.result;
|
|||
|
||||
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.pojo.entity.ScopeStrategyConfig;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
|
@ -42,7 +40,6 @@ public class SearchExpenseItemResult {
|
|||
*/
|
||||
private ExpenseStrategy expenseStrategy;
|
||||
|
||||
|
||||
/**
|
||||
* 计量单位;字典代码:unit
|
||||
*/
|
||||
|
|
@ -53,12 +50,6 @@ public class SearchExpenseItemResult {
|
|||
*/
|
||||
private BigDecimal taxRate;
|
||||
|
||||
/**
|
||||
* 付费方;字典代码:payer
|
||||
*/
|
||||
private Payer payer;
|
||||
|
||||
|
||||
/**
|
||||
* 单价;单位:元,弹性模式-->每档价格
|
||||
*/
|
||||
|
|
@ -80,19 +71,19 @@ public class SearchExpenseItemResult {
|
|||
private Integer everyQuantity;
|
||||
|
||||
/**
|
||||
* 适用用户;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||
* 归属用户Id
|
||||
*/
|
||||
private ScopeStrategyConfig userScope;
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 适用站点;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||
* 归属客户Id
|
||||
*/
|
||||
private ScopeStrategyConfig stationScope;
|
||||
private Long customerId;
|
||||
|
||||
/**
|
||||
* 适用产品;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||
* 归属组织Id
|
||||
*/
|
||||
private ScopeStrategyConfig goodsScope;
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 是否可用;0-->否、1-->是
|
||||
|
|
|
|||
|
|
@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.common.security.util.SecurityUtil;
|
||||
import com.njzscloud.dispose.finance.mapper.ExpenseItemMapper;
|
||||
import com.njzscloud.dispose.finance.pojo.entity.ExpenseItemEntity;
|
||||
import com.njzscloud.dispose.finance.pojo.param.AddExpenseItemParam;
|
||||
import com.njzscloud.dispose.finance.pojo.param.ModifyExpenseItemParam;
|
||||
import com.njzscloud.dispose.sys.auth.pojo.result.MyResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -30,7 +32,11 @@ public class ExpenseItemService extends ServiceImpl<ExpenseItemMapper, ExpenseIt
|
|||
* 新增
|
||||
*/
|
||||
public void add(AddExpenseItemParam addExpenseItemParam) {
|
||||
this.save(BeanUtil.copyProperties(addExpenseItemParam, ExpenseItemEntity.class));
|
||||
MyResult userDetail = SecurityUtil.loginUser();
|
||||
this.save(BeanUtil.copyProperties(addExpenseItemParam, ExpenseItemEntity.class)
|
||||
.setUserId(userDetail.getUserId())
|
||||
.setCustomerId(userDetail.getCurrentCustomerId())
|
||||
.setOrgId(userDetail.getCurrentOrgId()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -36,6 +36,11 @@ public class GoodsCategoryEntity {
|
|||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 分类码
|
||||
*/
|
||||
private String sn;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
|
|
@ -46,6 +51,11 @@ public class GoodsCategoryEntity {
|
|||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
/**
|
||||
* 创建人 Id;sys_user.id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,8 +4,11 @@ import cn.hutool.core.util.StrUtil;
|
|||
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.google.common.base.Strings;
|
||||
import com.njzscloud.common.core.ex.Exceptions;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.common.sn.support.SnUtil;
|
||||
import com.njzscloud.dispose.goods.contant.BizType;
|
||||
import com.njzscloud.dispose.goods.mapper.GoodsCategoryMapper;
|
||||
import com.njzscloud.dispose.goods.pojo.entity.GoodsCategoryEntity;
|
||||
|
|
@ -32,6 +35,14 @@ public class GoodsCategoryService extends ServiceImpl<GoodsCategoryMapper, Goods
|
|||
* 新增
|
||||
*/
|
||||
public void add(GoodsCategoryEntity goodsCategoryEntity) {
|
||||
if (goodsCategoryEntity.getBizType() == null) {
|
||||
throw Exceptions.clierr("业务类型不可为空");
|
||||
}
|
||||
if (BizType.HuiShouPin.equals(goodsCategoryEntity.getBizType()) && Strings.isNullOrEmpty(goodsCategoryEntity.getSn())) {
|
||||
throw Exceptions.clierr("回收品分类码不可为空");
|
||||
} else {
|
||||
goodsCategoryEntity.setSn(this.generateSn());
|
||||
}
|
||||
this.save(goodsCategoryEntity);
|
||||
}
|
||||
|
||||
|
|
@ -74,6 +85,20 @@ public class GoodsCategoryService extends ServiceImpl<GoodsCategoryMapper, Goods
|
|||
);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ public class MyResult extends UserDetail {
|
|||
*/
|
||||
private Long currentCustomerId;
|
||||
|
||||
/**
|
||||
* 当前组织 Id
|
||||
*
|
||||
*/
|
||||
private Long currentOrgId;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ import com.njzscloud.common.mp.support.PageParam;
|
|||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.common.sn.support.SnUtil;
|
||||
import com.njzscloud.dispose.cst.order.mapper.OrderTransMapper;
|
||||
import com.njzscloud.dispose.cst.order.mapper.OrderPaymentRecordMapper;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
||||
import com.njzscloud.dispose.wh.constant.PurchaseOrderStatus;
|
||||
import com.njzscloud.dispose.wh.mapper.PurchaseOrderMapper;
|
||||
|
|
@ -17,8 +19,10 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 采购单
|
||||
|
|
@ -31,6 +35,7 @@ import java.util.List;
|
|||
public class PurchaseOrderService extends ServiceImpl<PurchaseOrderMapper, PurchaseOrderEntity> {
|
||||
|
||||
private final OrderTransMapper orderTransMapper;
|
||||
private final OrderPaymentRecordMapper orderPaymentRecordMapper;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
|
@ -45,6 +50,14 @@ public class PurchaseOrderService extends ServiceImpl<PurchaseOrderMapper, Purch
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public void add(Long transOrderId) {
|
||||
OrderTransResult orderTrans = orderTransMapper.getById(transOrderId);
|
||||
// 通过transOrderId查询付费记录表,计算settle_money的总和
|
||||
BigDecimal totalMoney = orderPaymentRecordMapper.selectList(
|
||||
Wrappers.<OrderPaymentRecordEntity>lambdaQuery()
|
||||
.eq(OrderPaymentRecordEntity::getTransId, transOrderId)
|
||||
).stream()
|
||||
.map(OrderPaymentRecordEntity::getSettleMoney)
|
||||
.filter(Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
this.add(BeanUtil.copyProperties(orderTrans, PurchaseOrderEntity.class)
|
||||
.setOrderTransId(transOrderId)
|
||||
.setSn(this.generateSn())
|
||||
|
|
@ -52,7 +65,7 @@ public class PurchaseOrderService extends ServiceImpl<PurchaseOrderMapper, Purch
|
|||
.setPurchaseDate(orderTrans.getOrderTime().toLocalDate())
|
||||
.setArrivalDate(LocalDate.now())
|
||||
.setQuantity(orderTrans.getEstimatedQuantity())
|
||||
.setTotalMoney(orderTrans.getSettleMoney())
|
||||
.setTotalMoney(totalMoney)
|
||||
.setMemo(""));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.common.sn.support.SnUtil;
|
||||
import com.njzscloud.dispose.cst.order.mapper.OrderPaymentRecordMapper;
|
||||
import com.njzscloud.dispose.cst.order.mapper.OrderTransMapper;
|
||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
||||
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
||||
import com.njzscloud.dispose.wh.constant.SalesOrderStatus;
|
||||
import com.njzscloud.dispose.wh.mapper.SalesOrderMapper;
|
||||
|
|
@ -18,8 +20,10 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 销售单
|
||||
|
|
@ -32,6 +36,7 @@ import java.util.List;
|
|||
public class SalesOrderService extends ServiceImpl<SalesOrderMapper, SalesOrderEntity> {
|
||||
|
||||
private final OrderTransMapper orderTransMapper;
|
||||
private final OrderPaymentRecordMapper orderPaymentRecordMapper;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
|
@ -47,6 +52,14 @@ public class SalesOrderService extends ServiceImpl<SalesOrderMapper, SalesOrderE
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public void add(Long transOrderId) {
|
||||
OrderTransResult orderTrans = orderTransMapper.getById(transOrderId);
|
||||
// 通过transOrderId查询付费记录表,计算settle_money的总和
|
||||
BigDecimal totalMoney = orderPaymentRecordMapper.selectList(
|
||||
Wrappers.<OrderPaymentRecordEntity>lambdaQuery()
|
||||
.eq(OrderPaymentRecordEntity::getTransId, transOrderId)
|
||||
).stream()
|
||||
.map(OrderPaymentRecordEntity::getSettleMoney)
|
||||
.filter(Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
this.add(BeanUtil.copyProperties(orderTrans, AddSalesOrderParam.class)
|
||||
.setOrderTransId(transOrderId)
|
||||
.setSn(this.generateSn())
|
||||
|
|
@ -54,7 +67,7 @@ public class SalesOrderService extends ServiceImpl<SalesOrderMapper, SalesOrderE
|
|||
.setOrderDate(orderTrans.getOrderTime().toLocalDate())
|
||||
.setShipmentDate(LocalDate.now())
|
||||
.setQuantity(orderTrans.getEstimatedQuantity())
|
||||
.setTotalMoney(orderTrans.getSettleMoney())
|
||||
.setTotalMoney(totalMoney)
|
||||
.setMemo(""));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,17 +17,11 @@
|
|||
<result column="address" property="address"/>
|
||||
<result column="lng" property="lng"/>
|
||||
<result column="lat" property="lat"/>
|
||||
<result column="creator_id" property="creatorId"/>
|
||||
<result column="modifier_id" property="modifierId"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="modify_time" property="modifyTime"/>
|
||||
<result column="deleted" property="deleted"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, order_id, zx, province, city, area, town,
|
||||
province_name, city_name, area_name, town_name, address, lng, lat,
|
||||
creator_id, modifier_id, create_time, modify_time, deleted
|
||||
province_name, city_name, area_name, town_name, address, lng, lat
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -9,27 +9,20 @@
|
|||
<result column="expense_item_name" property="expenseItemName"/>
|
||||
<result column="expense_strategy" property="expenseStrategy"/>
|
||||
<result column="tax_rate" property="taxRate"/>
|
||||
<result column="payer" property="payer"/>
|
||||
<result column="unit" property="unit"/>
|
||||
<result column="unit_price" property="unitPrice"/>
|
||||
<result column="initial_price" property="initialPrice"/>
|
||||
<result column="initial_quantity" property="initialQuantity"/>
|
||||
<result column="every_quantity" property="everyQuantity"/>
|
||||
<result column="user_scope" property="userScope"/>
|
||||
<result column="station_scope" property="stationScope"/>
|
||||
<result column="goods_scope" property="goodsScope"/>
|
||||
<result column="creator_id" property="creatorId"/>
|
||||
<result column="modifier_id" property="modifierId"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="modify_time" property="modifyTime"/>
|
||||
<result column="deleted" property="deleted"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="customer_id" property="customerId"/>
|
||||
<result column="org_id" property="orgId"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, order_id, expense_item_category, expense_item_name, expense_strategy,
|
||||
tax_rate, payer, unit, unit_price, initial_price, initial_quantity,
|
||||
every_quantity, user_scope, station_scope, goods_scope,
|
||||
creator_id, modifier_id, create_time, modify_time, deleted
|
||||
tax_rate, unit, unit_price, initial_price, initial_quantity,
|
||||
every_quantity, user_id, customer_id, org_id
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -34,17 +34,6 @@
|
|||
<result column="out_body_photo" property="outBodyPhoto"/>
|
||||
<result column="in_time" property="inTime"/>
|
||||
<result column="out_time" property="outTime"/>
|
||||
<result column="payment_status" property="paymentStatus"/>
|
||||
<result column="pay_time" property="payTime"/>
|
||||
<result column="refund_time" property="refundTime"/>
|
||||
<result column="total_money" property="totalMoney"/>
|
||||
<result column="discount_money" property="discountMoney"/>
|
||||
<result column="revise_money" property="reviseMoney"/>
|
||||
<result column="settle_money" property="settleMoney"/>
|
||||
<result column="settlement_way" property="settlementWay"/>
|
||||
<result column="payerUserId" property="payerUserId"/>
|
||||
<result column="payerCustomerId" property="payerCustomerId"/>
|
||||
<result column="payerMoneyAccount" property="payerMoneyAccount"/>
|
||||
<result column="trans_org_id" property="transOrgId"/>
|
||||
<result column="trans_customer_id" property="transCustomerId"/>
|
||||
<result column="assignment_trans_time" property="assignmentTransTime"/>
|
||||
|
|
@ -58,11 +47,6 @@
|
|||
<result column="goods_sn" property="goodsSn"/>
|
||||
<result column="estimated_quantity" property="estimatedQuantity"/>
|
||||
<result column="unit" property="unit"/>
|
||||
<result column="creator_id" property="creatorId"/>
|
||||
<result column="modifier_id" property="modifierId"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="modify_time" property="modifyTime"/>
|
||||
<result column="deleted" property="deleted"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
|
|
@ -98,11 +82,6 @@
|
|||
cot.out_body_photo AS out_body_photo,
|
||||
cot.in_time AS in_time,
|
||||
cot.out_time AS out_time,
|
||||
cot.creator_id AS creator_id,
|
||||
cot.modifier_id AS modifier_id,
|
||||
cot.create_time AS create_time,
|
||||
cot.modify_time AS modify_time,
|
||||
cot.deleted AS deleted,
|
||||
co.trans_org_id AS trans_org_id,
|
||||
co.trans_customer_id AS trans_customer_id,
|
||||
co.assignment_trans_time AS assignment_trans_time,
|
||||
|
|
|
|||
Loading…
Reference in New Issue