Compare commits
No commits in common. "9e0dd924e5c4e3a462b6de757f7a1f9aa970f88e" and "5927eb6ae4d6b21b754f8a547fb3a43d625262b5" have entirely different histories.
9e0dd924e5
...
5927eb6ae4
|
|
@ -5,4 +5,3 @@
|
||||||
/**/.DS_Store
|
/**/.DS_Store
|
||||||
/**/.njzscloud-dispose
|
/**/.njzscloud-dispose
|
||||||
/接口文档
|
/接口文档
|
||||||
/.vscode
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
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));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
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,8 +1,7 @@
|
||||||
package com.njzscloud.dispose.cst.order.pojo.entity;
|
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.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -10,7 +9,6 @@ import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装/卸货地信息
|
* 装/卸货地信息
|
||||||
*
|
|
||||||
* @author ljw
|
* @author ljw
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
|
|
@ -18,13 +16,7 @@ import lombok.experimental.Accessors;
|
||||||
@ToString
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName(value = "cst_order_cargo_place", autoResultMap = true)
|
@TableName(value = "cst_order_cargo_place", autoResultMap = true)
|
||||||
public class OrderCargoPlaceEntity {
|
public class OrderCargoPlaceEntity extends BaseEntity {
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单 Id
|
* 订单 Id
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.njzscloud.dispose.cst.order.pojo.entity;
|
package com.njzscloud.dispose.cst.order.pojo.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||||
import com.njzscloud.dispose.cst.order.constant.OrderCategory;
|
import com.njzscloud.dispose.cst.order.constant.OrderCategory;
|
||||||
import com.njzscloud.dispose.cst.order.constant.OrderStatus;
|
import com.njzscloud.dispose.cst.order.constant.OrderStatus;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
@ -20,13 +21,7 @@ import java.time.LocalDateTime;
|
||||||
@ToString
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName(value = "cst_order", autoResultMap = true)
|
@TableName(value = "cst_order", autoResultMap = true)
|
||||||
public class OrderEntity {
|
public class OrderEntity extends BaseEntity {
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单编号
|
* 订单编号
|
||||||
|
|
@ -137,36 +132,6 @@ public class OrderEntity {
|
||||||
* 客户备注
|
* 客户备注
|
||||||
*/
|
*/
|
||||||
private String customerMemo;
|
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,11 +1,7 @@
|
||||||
package com.njzscloud.dispose.cst.order.pojo.entity;
|
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.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.njzscloud.dispose.finance.constant.ExpenseItemCategory;
|
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||||
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -23,18 +19,7 @@ import java.math.BigDecimal;
|
||||||
@ToString
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName(value = "cst_order_expense_items", autoResultMap = true)
|
@TableName(value = "cst_order_expense_items", autoResultMap = true)
|
||||||
public class OrderExpenseItemsEntity {
|
public class OrderExpenseItemsEntity extends BaseEntity {
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 源付费项 Id;fin_expense_item.id
|
|
||||||
*/
|
|
||||||
private Long originExpenseItemsId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单 Id
|
* 订单 Id
|
||||||
|
|
@ -44,12 +29,7 @@ public class OrderExpenseItemsEntity {
|
||||||
/**
|
/**
|
||||||
* 收费项目类型,QiTa-->其他、ChanPin-->产品、YunFei-->运费
|
* 收费项目类型,QiTa-->其他、ChanPin-->产品、YunFei-->运费
|
||||||
*/
|
*/
|
||||||
private ExpenseItemCategory expenseItemCategory;
|
private String expenseItemCategory;
|
||||||
|
|
||||||
/**
|
|
||||||
* 产品 Id;仅当项目类型为"产品"时有值
|
|
||||||
*/
|
|
||||||
private Long goodsId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付费项名称
|
* 付费项名称
|
||||||
|
|
@ -59,13 +39,18 @@ public class OrderExpenseItemsEntity {
|
||||||
/**
|
/**
|
||||||
* 计费策略;字典代码:expense_strategy,MianFei-->免费、TanXing-->弹性、GuDing-->固定、Che-->车、Fang-->方、JuLi-->距离
|
* 计费策略;字典代码:expense_strategy,MianFei-->免费、TanXing-->弹性、GuDing-->固定、Che-->车、Fang-->方、JuLi-->距离
|
||||||
*/
|
*/
|
||||||
private ExpenseStrategy expenseStrategy;
|
private String expenseStrategy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 税率
|
* 税率
|
||||||
*/
|
*/
|
||||||
private BigDecimal taxRate;
|
private BigDecimal taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付费方;字典代码:payer,PingTai-->平台、ChanFei-->产废方、QingYun-->清运方、XiaoNa-->消纳方、CaiGou-->采购方
|
||||||
|
*/
|
||||||
|
private String payer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计量单位;字典代码:unit
|
* 计量单位;字典代码:unit
|
||||||
*/
|
*/
|
||||||
|
|
@ -92,19 +77,83 @@ public class OrderExpenseItemsEntity {
|
||||||
private Integer everyQuantity;
|
private Integer everyQuantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属用户Id
|
* 适用用户;结构类型:{
|
||||||
|
* strategy: None | All | Specify,
|
||||||
|
* objs: long[]
|
||||||
|
* },Wu-->无、ZhiDing-->指定、SuoYou-->所有
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属客户Id
|
* 适用站点;结构类型:{
|
||||||
|
* strategy: None | All | Specify,
|
||||||
|
* objs: long[]
|
||||||
|
* },Wu-->无、ZhiDing-->指定、SuoYou-->所有
|
||||||
*/
|
*/
|
||||||
private Long customerId;
|
private String stationScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属组织Id
|
* 适用产品;结构类型:{
|
||||||
|
* strategy: None | All | Specify,
|
||||||
|
* objs: long[]
|
||||||
|
* },Wu-->无、ZhiDing-->指定、SuoYou-->所有
|
||||||
*/
|
*/
|
||||||
private Long orgId;
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,115 +0,0 @@
|
||||||
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,17 +1,18 @@
|
||||||
package com.njzscloud.dispose.cst.order.pojo.entity;
|
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.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler;
|
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.CheckStatus;
|
||||||
|
import com.njzscloud.dispose.cst.order.constant.PaymentStatus;
|
||||||
import com.njzscloud.dispose.cst.order.constant.TransStatus;
|
import com.njzscloud.dispose.cst.order.constant.TransStatus;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -25,13 +26,7 @@ import java.util.List;
|
||||||
@ToString
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName(value = "cst_order_trans", autoResultMap = true)
|
@TableName(value = "cst_order_trans", autoResultMap = true)
|
||||||
public class OrderTransEntity {
|
public class OrderTransEntity extends BaseEntity {
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车次
|
* 车次
|
||||||
|
|
@ -189,6 +184,61 @@ public class OrderTransEntity {
|
||||||
*/
|
*/
|
||||||
private LocalDateTime outTime;
|
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 {
|
public class AssignmentOrgParam {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单ID
|
* 订单运输ID
|
||||||
*/
|
*/
|
||||||
private Long orderId;
|
private Long orderTransId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清运公司Id
|
* 清运公司Id
|
||||||
|
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
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,6 +8,7 @@ import com.njzscloud.dispose.cst.order.constant.OrderStatus;
|
||||||
import com.njzscloud.dispose.cst.order.constant.TransStatus;
|
import com.njzscloud.dispose.cst.order.constant.TransStatus;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -177,6 +178,86 @@ public class OrderTransResult {
|
||||||
*/
|
*/
|
||||||
private LocalDateTime outTime;
|
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
|
* 运输组织 Id;cst_org.id
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
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,20 +16,21 @@ import com.njzscloud.dispose.cst.driver.pojo.entity.DriverEntity;
|
||||||
import com.njzscloud.dispose.cst.order.constant.*;
|
import com.njzscloud.dispose.cst.order.constant.*;
|
||||||
import com.njzscloud.dispose.cst.order.mapper.OrderMapper;
|
import com.njzscloud.dispose.cst.order.mapper.OrderMapper;
|
||||||
import com.njzscloud.dispose.cst.order.mapper.OrderTransMapper;
|
import com.njzscloud.dispose.cst.order.mapper.OrderTransMapper;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.entity.*;
|
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.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.truck.mapper.TruckMapper;
|
import com.njzscloud.dispose.cst.truck.mapper.TruckMapper;
|
||||||
import com.njzscloud.dispose.cst.truck.pojo.entity.TruckEntity;
|
import com.njzscloud.dispose.cst.truck.pojo.entity.TruckEntity;
|
||||||
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
import com.njzscloud.dispose.finance.constant.ScopeStrategy;
|
||||||
import com.njzscloud.dispose.finance.mapper.MoneyAccountMapper;
|
|
||||||
import com.njzscloud.dispose.finance.pojo.entity.ExpenseItemEntity;
|
import com.njzscloud.dispose.finance.pojo.entity.ExpenseItemEntity;
|
||||||
import com.njzscloud.dispose.finance.pojo.entity.MoneyAccountEntity;
|
import com.njzscloud.dispose.finance.pojo.entity.ScopeStrategyConfig;
|
||||||
import com.njzscloud.dispose.finance.service.ExpenseItemService;
|
import com.njzscloud.dispose.finance.service.ExpenseItemService;
|
||||||
import com.njzscloud.dispose.sys.auth.pojo.result.MyResult;
|
import com.njzscloud.dispose.sys.auth.pojo.result.MyResult;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
@ -55,8 +56,6 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
private final TruckMapper truckMapper;
|
private final TruckMapper truckMapper;
|
||||||
private final CustomerMapper customerMapper;
|
private final CustomerMapper customerMapper;
|
||||||
private final OrderExpenseItemsService orderExpenseItemsService;
|
private final OrderExpenseItemsService orderExpenseItemsService;
|
||||||
private final OrderPaymentRecordService orderPaymentRecordService;
|
|
||||||
private final MoneyAccountMapper moneyAccountMapper;
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void add(CreateOrderParam param) {
|
public void add(CreateOrderParam param) {
|
||||||
|
|
@ -94,6 +93,7 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
transEntity.setTransStatus(transOrgId == null ? null : TransStatus.DaiPaiDan);
|
transEntity.setTransStatus(transOrgId == null ? null : TransStatus.DaiPaiDan);
|
||||||
transEntity.setTransTime(transOrgId == null ? null : LocalDateTime.now());
|
transEntity.setTransTime(transOrgId == null ? null : LocalDateTime.now());
|
||||||
transEntity.setCheckStatus(CheckStatus.WeiKanLiao);
|
transEntity.setCheckStatus(CheckStatus.WeiKanLiao);
|
||||||
|
transEntity.setPaymentStatus(PaymentStatus.WeiZhiFu);
|
||||||
transEntity.setTransDistance(param.getTransDistance());
|
transEntity.setTransDistance(param.getTransDistance());
|
||||||
orderTransMapper.insert(transEntity);
|
orderTransMapper.insert(transEntity);
|
||||||
}
|
}
|
||||||
|
|
@ -124,10 +124,10 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void assignmentOrg(AssignmentOrgParam orgParam) {
|
public void assignmentOrg(AssignmentOrgParam orgParam) {
|
||||||
Assert.notNull(orgParam, () -> Exceptions.clierr("请填写参数"));
|
Assert.notNull(orgParam, () -> Exceptions.clierr("请填写参数"));
|
||||||
Assert.notNull(orgParam.getOrderId(), () -> Exceptions.clierr("订单ID不可为空"));
|
Assert.notNull(orgParam.getOrderTransId(), () -> Exceptions.clierr("订单运输ID不可为空"));
|
||||||
Assert.notNull(orgParam.getTransOrgId(), () -> Exceptions.clierr("清运公司ID不可为空"));
|
Assert.notNull(orgParam.getTransOrgId(), () -> Exceptions.clierr("清运公司ID不可为空"));
|
||||||
|
|
||||||
OrderEntity result = this.getById(orgParam.getOrderId());
|
OrderTransResult result = orderTransMapper.getById(orgParam.getOrderTransId());
|
||||||
Assert.notNull(result, () -> Exceptions.clierr("订单不存在"));
|
Assert.notNull(result, () -> Exceptions.clierr("订单不存在"));
|
||||||
Assert.isNull(result.getTransOrgId(), () -> Exceptions.clierr("当前订单已分配清运公司,无需重复分配"));
|
Assert.isNull(result.getTransOrgId(), () -> Exceptions.clierr("当前订单已分配清运公司,无需重复分配"));
|
||||||
Assert.isTrue(OrderStatus.YiYuYue.equals(result.getOrderStatus()), () -> Exceptions.clierr("当前订单状态,无法分配清运公司"));
|
Assert.isTrue(OrderStatus.YiYuYue.equals(result.getOrderStatus()), () -> Exceptions.clierr("当前订单状态,无法分配清运公司"));
|
||||||
|
|
@ -143,17 +143,14 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
.setTransCustomerId(customer.getId())
|
.setTransCustomerId(customer.getId())
|
||||||
.setAssignmentTransTime(LocalDateTime.now())
|
.setAssignmentTransTime(LocalDateTime.now())
|
||||||
.setOrderStatus(OrderStatus.JinXingZhong)
|
.setOrderStatus(OrderStatus.JinXingZhong)
|
||||||
.setId(result.getId());
|
.setId(result.getOrderId());
|
||||||
this.updateById(orderEntity);
|
this.updateById(orderEntity);
|
||||||
|
|
||||||
// 更新运输信息表 cst_trans_order 的运输状态信息
|
// 更新运输信息表 cst_trans_order 的运输状态信息
|
||||||
orderTransMapper.update(Wrappers.<OrderTransEntity>lambdaUpdate()
|
OrderTransEntity transEntity = new OrderTransEntity();
|
||||||
.set(OrderTransEntity::getTransStatus, TransStatus.DaiPaiDan)
|
transEntity.setId(orgParam.getOrderTransId());
|
||||||
.eq(OrderTransEntity::getOrderId, result.getId()));
|
transEntity.setTransStatus(TransStatus.DaiPaiDan);
|
||||||
|
orderTransMapper.updateById(transEntity);
|
||||||
// 创建订单付费项
|
|
||||||
OrderEntity newOrderInfo = this.getById(orgParam.getOrderId());
|
|
||||||
this.createOrderExpenseItems(newOrderInfo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|
@ -290,7 +287,7 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
Assert.notNull(result, () -> Exceptions.clierr("订单不存在"));
|
Assert.notNull(result, () -> Exceptions.clierr("订单不存在"));
|
||||||
|
|
||||||
Assert.isTrue(OrderStatus.JinXingZhong.equals(result.getOrderStatus())
|
Assert.isTrue(OrderStatus.JinXingZhong.equals(result.getOrderStatus())
|
||||||
&& TransStatus.YiJinChang.equals(result.getTransStatus()) && CheckStatus.WeiKanLiao.equals(result.getCheckStatus()),
|
&& TransStatus.YiJinChang.equals(result.getTransStatus()) && CheckStatus.WeiKanLiao.equals(result.getCheckStatus()),
|
||||||
() -> Exceptions.clierr("当前订单状态,无法看料"));
|
() -> Exceptions.clierr("当前订单状态,无法看料"));
|
||||||
|
|
||||||
// 更新运输信息
|
// 更新运输信息
|
||||||
|
|
@ -338,38 +335,6 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
transEntity.setOutBodyPhoto(leavingParam.getBodyPhoto());
|
transEntity.setOutBodyPhoto(leavingParam.getBodyPhoto());
|
||||||
transEntity.setOutTime(LocalDateTime.now());
|
transEntity.setOutTime(LocalDateTime.now());
|
||||||
orderTransMapper.updateById(transEntity);
|
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) {
|
public void updateTruckHisTareWeight(Long truckId, Integer weight) {
|
||||||
|
|
@ -415,32 +380,50 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
if (!goodsItems.isEmpty()) {
|
if (!goodsItems.isEmpty()) {
|
||||||
goodsOrderItem = BeanUtil.copyProperties(goodsItems.getFirst(), OrderExpenseItemsEntity.class)
|
goodsOrderItem = BeanUtil.copyProperties(goodsItems.getFirst(), OrderExpenseItemsEntity.class)
|
||||||
.setOrderId(orderEntity.getId())
|
.setOrderId(orderEntity.getId())
|
||||||
.setOriginExpenseItemsId(goodsItems.getFirst().getId());
|
.setPaymentStatus(PaymentStatus.WeiZhiFu.getVal());
|
||||||
}
|
}
|
||||||
|
|
||||||
List<OrderExpenseItemsEntity> extraItems = itemEntityList.stream()
|
List<OrderExpenseItemsEntity> extraItems = itemEntityList.stream()
|
||||||
.filter(cfg -> {
|
.filter(cfg -> {
|
||||||
Long userId = cfg.getUserId();
|
ScopeStrategyConfig userScope = cfg.getUserScope();
|
||||||
Long customerId = cfg.getCustomerId();
|
ScopeStrategyConfig goodsScope = cfg.getGoodsScope();
|
||||||
Long orgId = cfg.getOrgId();
|
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;
|
||||||
|
|
||||||
// 判断用户归属范围
|
// 判断客户范围
|
||||||
boolean isUserTrue = userId == null || userId.equals(orderEntity.getUserId());
|
boolean isComTrue;
|
||||||
|
if (userScope != null && ScopeStrategy.SuoYou.getVal().equals(userScope.getStrategy())) {
|
||||||
|
isComTrue = true; // 所有客户都匹配
|
||||||
|
} else {
|
||||||
|
isComTrue = companyIds != null && transOrgId != null && companyIds.contains(transOrgId);
|
||||||
|
}
|
||||||
|
|
||||||
// 判断客户归属范围
|
// 判断产品范围
|
||||||
boolean isCustomerTrue = customerId == null || customerId.equals(orderEntity.getCustomerId());
|
boolean isGoodsTrue;
|
||||||
|
if (goodsScope != null && ScopeStrategy.SuoYou.getVal().equals(goodsScope.getStrategy())) {
|
||||||
|
isGoodsTrue = true; // 所有产品都匹配
|
||||||
|
} else {
|
||||||
|
isGoodsTrue = goodsIds != null && goodsId != null && goodsIds.contains(goodsId);
|
||||||
|
}
|
||||||
|
|
||||||
// 判断组织归属范围
|
// 判断站点范围
|
||||||
boolean isOrgTrue = orgId == null || orgId.equals(orderEntity.getTransOrgId());
|
boolean isStationsTrue;
|
||||||
|
if (stationsScope != null && ScopeStrategy.SuoYou.getVal().equals(stationsScope.getStrategy())) {
|
||||||
|
isStationsTrue = true; // 所有站点都匹配
|
||||||
|
} else {
|
||||||
|
isStationsTrue = stationsIds != null && stationId != null && stationsIds.contains(stationId);
|
||||||
|
}
|
||||||
|
|
||||||
// 只有当三个条件都为true时,才返回true
|
// 只有当三个条件都为true时,才返回true
|
||||||
return isUserTrue && isCustomerTrue && isOrgTrue;
|
return isComTrue && isGoodsTrue && isStationsTrue;
|
||||||
})
|
})
|
||||||
// 复制配置为订单付费项(数量口径与产品一致:按车=1,否则=settleWeight)
|
// 复制配置为订单付费项(数量口径与产品一致:按车=1,否则=settleWeight)
|
||||||
.map(cfg -> {
|
.map(cfg -> {
|
||||||
OrderExpenseItemsEntity entity = BeanUtil.copyProperties(cfg, OrderExpenseItemsEntity.class);
|
OrderExpenseItemsEntity entity = BeanUtil.copyProperties(cfg, OrderExpenseItemsEntity.class);
|
||||||
entity.setOrderId(orderEntity.getId());
|
entity.setOrderId(orderEntity.getId());
|
||||||
entity.setOriginExpenseItemsId(cfg.getId());
|
entity.setPaymentStatus(PaymentStatus.WeiZhiFu.getVal());
|
||||||
return entity;
|
return entity;
|
||||||
})
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
@ -456,55 +439,5 @@ public class OrderService extends ServiceImpl<OrderMapper, OrderEntity> {
|
||||||
|
|
||||||
// 批量保存付费项
|
// 批量保存付费项
|
||||||
orderExpenseItemsService.saveBatch(extraItems);
|
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,14 +6,11 @@ import com.njzscloud.common.oss.util.AliOSS;
|
||||||
import com.njzscloud.dispose.cst.order.constant.*;
|
import com.njzscloud.dispose.cst.order.constant.*;
|
||||||
import com.njzscloud.dispose.cst.order.mapper.OrderTransMapper;
|
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.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.entity.OrderTransEntity;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
||||||
import com.njzscloud.dispose.dev.DiscoverTruckMsg;
|
import com.njzscloud.dispose.dev.DiscoverTruckMsg;
|
||||||
import com.njzscloud.dispose.dev.ObtainTruckDataResultMsg;
|
import com.njzscloud.dispose.dev.ObtainTruckDataResultMsg;
|
||||||
import com.njzscloud.dispose.dev.WbsHandle;
|
import com.njzscloud.dispose.dev.WbsHandle;
|
||||||
import com.njzscloud.dispose.finance.constant.ExpenseStrategy;
|
|
||||||
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;
|
||||||
|
|
@ -38,8 +35,6 @@ public class TruckWeighingBusinessService {
|
||||||
|
|
||||||
private final OrderService orderService;
|
private final OrderService orderService;
|
||||||
private final OrderTransMapper orderTransMapper;
|
private final OrderTransMapper orderTransMapper;
|
||||||
private final OrderPaymentRecordService orderPaymentRecordService;
|
|
||||||
private final OrderExpenseItemsService orderExpenseItemsService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求数据 - 处理车辆识别
|
* 请求数据 - 处理车辆识别
|
||||||
|
|
@ -231,43 +226,6 @@ public class TruckWeighingBusinessService {
|
||||||
Integer settleWeight = transEntity.getSettleWeight();
|
Integer settleWeight = transEntity.getSettleWeight();
|
||||||
log.info("车辆出场称重完成,订单ID: {}, 重量: {}kg, 净重: {}kg",
|
log.info("车辆出场称重完成,订单ID: {}, 重量: {}kg, 净重: {}kg",
|
||||||
orderTrans.getId(), weight, settleWeight);
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -403,6 +361,7 @@ public class TruckWeighingBusinessService {
|
||||||
List<OrderTransEntity> transList = orderTransMapper.selectList(
|
List<OrderTransEntity> transList = orderTransMapper.selectList(
|
||||||
Wrappers.<OrderTransEntity>lambdaQuery()
|
Wrappers.<OrderTransEntity>lambdaQuery()
|
||||||
.eq(OrderTransEntity::getOrderId, orderId)
|
.eq(OrderTransEntity::getOrderId, orderId)
|
||||||
|
.eq(OrderTransEntity::getDeleted, Boolean.FALSE)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (transList.isEmpty()) {
|
if (transList.isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import lombok.RequiredArgsConstructor;
|
||||||
@Getter
|
@Getter
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public enum OrgCategory implements DictStr {
|
public enum OrgCategory implements DictStr {
|
||||||
GeTi("GeTi", "个体"),
|
GeTiHu("GeTiHu", "个体户"),
|
||||||
|
|
||||||
QiYe("QiYe", "企业"),
|
QiYe("QiYe", "企业"),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,10 @@ public class TruckServiceImpl extends ServiceImpl<TruckMapper, TruckEntity> impl
|
||||||
MyResult userDetail = SecurityUtil.loginUser();
|
MyResult userDetail = SecurityUtil.loginUser();
|
||||||
Long customerId = userDetail.getCurrentCustomerId();
|
Long customerId = userDetail.getCurrentCustomerId();
|
||||||
truckEntity.setCustomerId(customerId);
|
truckEntity.setCustomerId(customerId);
|
||||||
truckEntity.setOrgId(userDetail.getCurrentOrgId());
|
IdentityInfo identityInfo = userDetail.currentIdentity();
|
||||||
|
if (identityInfo.getManager()) {
|
||||||
|
truckEntity.setOrgId(identityInfo.getOrgId());
|
||||||
|
}
|
||||||
truckEntity.setTareWeight(0);
|
truckEntity.setTareWeight(0);
|
||||||
this.save(truckEntity);
|
this.save(truckEntity);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
package com.njzscloud.dispose.finance.constant;
|
package com.njzscloud.dispose.finance.constant;
|
||||||
|
|
||||||
|
import com.njzscloud.common.core.ienum.DictStr;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import com.njzscloud.common.core.ienum.DictStr;
|
|
||||||
/**
|
/**
|
||||||
* 字典代码:payer
|
* 字典代码:payer
|
||||||
* 字典名称:付费方
|
* 字典名称:付费方
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|
@ -14,7 +17,7 @@ public enum Payer implements DictStr {
|
||||||
|
|
||||||
ChanFei("ChanFei", "产废方"),
|
ChanFei("ChanFei", "产废方"),
|
||||||
|
|
||||||
YunShu("YunShu", "运输方"),
|
QingYun("YunShuFang", "运输方"),
|
||||||
|
|
||||||
XiaoNa("XiaoNa", "消纳方"),
|
XiaoNa("XiaoNa", "消纳方"),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler;
|
||||||
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
import com.njzscloud.dispose.common.pojo.entity.BaseEntity;
|
||||||
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 lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -58,6 +59,11 @@ public class ExpenseItemEntity extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private BigDecimal taxRate;
|
private BigDecimal taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付费方;字典代码:payer
|
||||||
|
*/
|
||||||
|
private Payer payer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单价;单位:元,弹性模式-->每档价格
|
* 单价;单位:元,弹性模式-->每档价格
|
||||||
*/
|
*/
|
||||||
|
|
@ -79,19 +85,22 @@ public class ExpenseItemEntity extends BaseEntity {
|
||||||
private Integer everyQuantity;
|
private Integer everyQuantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属用户Id
|
* 适用用户;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
@TableField(typeHandler = JsonTypeHandler.class)
|
||||||
|
private ScopeStrategyConfig userScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属客户Id
|
* 适用站点;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||||
*/
|
*/
|
||||||
private Long customerId;
|
@TableField(typeHandler = JsonTypeHandler.class)
|
||||||
|
private ScopeStrategyConfig stationScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属组织Id
|
* 适用产品;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||||
*/
|
*/
|
||||||
private Long orgId;
|
@TableField(typeHandler = JsonTypeHandler.class)
|
||||||
|
private ScopeStrategyConfig goodsScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否可用;0-->否、1-->是
|
* 是否可用;0-->否、1-->是
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.njzscloud.dispose.finance.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.pojo.entity.ScopeStrategyConfig;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -40,6 +42,11 @@ public class AddExpenseItemParam {
|
||||||
*/
|
*/
|
||||||
private BigDecimal taxRate;
|
private BigDecimal taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付费方;字典代码:payer
|
||||||
|
*/
|
||||||
|
private Payer payer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单价;单位:元,弹性模式-->每档价格
|
* 单价;单位:元,弹性模式-->每档价格
|
||||||
*/
|
*/
|
||||||
|
|
@ -60,6 +67,20 @@ public class AddExpenseItemParam {
|
||||||
*/
|
*/
|
||||||
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;
|
||||||
/**
|
/**
|
||||||
* 产品 Id
|
* 产品 Id
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.njzscloud.dispose.finance.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.pojo.entity.ScopeStrategyConfig;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -44,6 +46,11 @@ public class ModifyExpenseItemParam {
|
||||||
*/
|
*/
|
||||||
private BigDecimal taxRate;
|
private BigDecimal taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付费方;字典代码:payer
|
||||||
|
*/
|
||||||
|
private Payer payer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单价;单位:元,弹性模式-->每档价格
|
* 单价;单位:元,弹性模式-->每档价格
|
||||||
*/
|
*/
|
||||||
|
|
@ -65,20 +72,19 @@ public class ModifyExpenseItemParam {
|
||||||
private Integer everyQuantity;
|
private Integer everyQuantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属用户Id
|
* 适用用户;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private ScopeStrategyConfig userScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属客户Id
|
* 适用站点;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||||
*/
|
*/
|
||||||
private Long customerId;
|
private ScopeStrategyConfig stationScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属组织Id
|
* 适用产品;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||||
*/
|
*/
|
||||||
private Long orgId;
|
private ScopeStrategyConfig goodsScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品 Id
|
* 产品 Id
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.njzscloud.dispose.finance.pojo.result;
|
||||||
|
|
||||||
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.pojo.entity.ScopeStrategyConfig;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
@ -40,6 +42,7 @@ public class SearchExpenseItemResult {
|
||||||
*/
|
*/
|
||||||
private ExpenseStrategy expenseStrategy;
|
private ExpenseStrategy expenseStrategy;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计量单位;字典代码:unit
|
* 计量单位;字典代码:unit
|
||||||
*/
|
*/
|
||||||
|
|
@ -50,6 +53,12 @@ public class SearchExpenseItemResult {
|
||||||
*/
|
*/
|
||||||
private BigDecimal taxRate;
|
private BigDecimal taxRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付费方;字典代码:payer
|
||||||
|
*/
|
||||||
|
private Payer payer;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单价;单位:元,弹性模式-->每档价格
|
* 单价;单位:元,弹性模式-->每档价格
|
||||||
*/
|
*/
|
||||||
|
|
@ -71,19 +80,19 @@ public class SearchExpenseItemResult {
|
||||||
private Integer everyQuantity;
|
private Integer everyQuantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属用户Id
|
* 适用用户;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private ScopeStrategyConfig userScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属客户Id
|
* 适用站点;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||||
*/
|
*/
|
||||||
private Long customerId;
|
private ScopeStrategyConfig stationScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归属组织Id
|
* 适用产品;结构类型:{strategy: Wu | ZhiDing | SuoYou,ids:long[]}
|
||||||
*/
|
*/
|
||||||
private Long orgId;
|
private ScopeStrategyConfig goodsScope;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否可用;0-->否、1-->是
|
* 是否可用;0-->否、1-->是
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,10 @@ 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;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
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.mapper.ExpenseItemMapper;
|
||||||
import com.njzscloud.dispose.finance.pojo.entity.ExpenseItemEntity;
|
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.sys.auth.pojo.result.MyResult;
|
|
||||||
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;
|
||||||
|
|
@ -32,11 +30,7 @@ public class ExpenseItemService extends ServiceImpl<ExpenseItemMapper, ExpenseIt
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
public void add(AddExpenseItemParam addExpenseItemParam) {
|
public void add(AddExpenseItemParam addExpenseItemParam) {
|
||||||
MyResult userDetail = SecurityUtil.loginUser();
|
this.save(BeanUtil.copyProperties(addExpenseItemParam, ExpenseItemEntity.class));
|
||||||
this.save(BeanUtil.copyProperties(addExpenseItemParam, ExpenseItemEntity.class)
|
|
||||||
.setUserId(userDetail.getUserId())
|
|
||||||
.setCustomerId(userDetail.getCurrentCustomerId())
|
|
||||||
.setOrgId(userDetail.getCurrentOrgId()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,6 @@ public class GoodsCategoryEntity {
|
||||||
*/
|
*/
|
||||||
private String categoryName;
|
private String categoryName;
|
||||||
|
|
||||||
/**
|
|
||||||
* 分类码
|
|
||||||
*/
|
|
||||||
private String sn;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片
|
* 图片
|
||||||
*/
|
*/
|
||||||
|
|
@ -51,11 +46,6 @@ public class GoodsCategoryEntity {
|
||||||
*/
|
*/
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private String memo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人 Id;sys_user.id
|
* 创建人 Id;sys_user.id
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,8 @@ 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.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.sn.support.SnUtil;
|
|
||||||
import com.njzscloud.dispose.goods.contant.BizType;
|
import com.njzscloud.dispose.goods.contant.BizType;
|
||||||
import com.njzscloud.dispose.goods.mapper.GoodsCategoryMapper;
|
import com.njzscloud.dispose.goods.mapper.GoodsCategoryMapper;
|
||||||
import com.njzscloud.dispose.goods.pojo.entity.GoodsCategoryEntity;
|
import com.njzscloud.dispose.goods.pojo.entity.GoodsCategoryEntity;
|
||||||
|
|
@ -35,14 +32,6 @@ public class GoodsCategoryService extends ServiceImpl<GoodsCategoryMapper, Goods
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
public void add(GoodsCategoryEntity goodsCategoryEntity) {
|
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);
|
this.save(goodsCategoryEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,20 +74,6 @@ public class GoodsCategoryService extends ServiceImpl<GoodsCategoryMapper, Goods
|
||||||
);
|
);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,6 @@ public class MyResult extends UserDetail {
|
||||||
*/
|
*/
|
||||||
private Long currentCustomerId;
|
private Long currentCustomerId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 当前组织 Id
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Long currentOrgId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 头像
|
* 头像
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@ 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.sn.support.SnUtil;
|
import com.njzscloud.common.sn.support.SnUtil;
|
||||||
import com.njzscloud.dispose.cst.order.mapper.OrderTransMapper;
|
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.cst.order.pojo.result.OrderTransResult;
|
||||||
import com.njzscloud.dispose.wh.constant.PurchaseOrderStatus;
|
import com.njzscloud.dispose.wh.constant.PurchaseOrderStatus;
|
||||||
import com.njzscloud.dispose.wh.mapper.PurchaseOrderMapper;
|
import com.njzscloud.dispose.wh.mapper.PurchaseOrderMapper;
|
||||||
|
|
@ -19,10 +17,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购单
|
* 采购单
|
||||||
|
|
@ -35,7 +31,6 @@ import java.util.Objects;
|
||||||
public class PurchaseOrderService extends ServiceImpl<PurchaseOrderMapper, PurchaseOrderEntity> {
|
public class PurchaseOrderService extends ServiceImpl<PurchaseOrderMapper, PurchaseOrderEntity> {
|
||||||
|
|
||||||
private final OrderTransMapper orderTransMapper;
|
private final OrderTransMapper orderTransMapper;
|
||||||
private final OrderPaymentRecordMapper orderPaymentRecordMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
|
|
@ -50,14 +45,6 @@ public class PurchaseOrderService extends ServiceImpl<PurchaseOrderMapper, Purch
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void add(Long transOrderId) {
|
public void add(Long transOrderId) {
|
||||||
OrderTransResult orderTrans = orderTransMapper.getById(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)
|
this.add(BeanUtil.copyProperties(orderTrans, PurchaseOrderEntity.class)
|
||||||
.setOrderTransId(transOrderId)
|
.setOrderTransId(transOrderId)
|
||||||
.setSn(this.generateSn())
|
.setSn(this.generateSn())
|
||||||
|
|
@ -65,7 +52,7 @@ public class PurchaseOrderService extends ServiceImpl<PurchaseOrderMapper, Purch
|
||||||
.setPurchaseDate(orderTrans.getOrderTime().toLocalDate())
|
.setPurchaseDate(orderTrans.getOrderTime().toLocalDate())
|
||||||
.setArrivalDate(LocalDate.now())
|
.setArrivalDate(LocalDate.now())
|
||||||
.setQuantity(orderTrans.getEstimatedQuantity())
|
.setQuantity(orderTrans.getEstimatedQuantity())
|
||||||
.setTotalMoney(totalMoney)
|
.setTotalMoney(orderTrans.getSettleMoney())
|
||||||
.setMemo(""));
|
.setMemo(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
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.sn.support.SnUtil;
|
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.mapper.OrderTransMapper;
|
||||||
import com.njzscloud.dispose.cst.order.pojo.entity.OrderPaymentRecordEntity;
|
|
||||||
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
|
||||||
import com.njzscloud.dispose.wh.constant.SalesOrderStatus;
|
import com.njzscloud.dispose.wh.constant.SalesOrderStatus;
|
||||||
import com.njzscloud.dispose.wh.mapper.SalesOrderMapper;
|
import com.njzscloud.dispose.wh.mapper.SalesOrderMapper;
|
||||||
|
|
@ -20,10 +18,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销售单
|
* 销售单
|
||||||
|
|
@ -36,7 +32,6 @@ import java.util.Objects;
|
||||||
public class SalesOrderService extends ServiceImpl<SalesOrderMapper, SalesOrderEntity> {
|
public class SalesOrderService extends ServiceImpl<SalesOrderMapper, SalesOrderEntity> {
|
||||||
|
|
||||||
private final OrderTransMapper orderTransMapper;
|
private final OrderTransMapper orderTransMapper;
|
||||||
private final OrderPaymentRecordMapper orderPaymentRecordMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
|
|
@ -52,14 +47,6 @@ public class SalesOrderService extends ServiceImpl<SalesOrderMapper, SalesOrderE
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void add(Long transOrderId) {
|
public void add(Long transOrderId) {
|
||||||
OrderTransResult orderTrans = orderTransMapper.getById(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)
|
this.add(BeanUtil.copyProperties(orderTrans, AddSalesOrderParam.class)
|
||||||
.setOrderTransId(transOrderId)
|
.setOrderTransId(transOrderId)
|
||||||
.setSn(this.generateSn())
|
.setSn(this.generateSn())
|
||||||
|
|
@ -67,7 +54,7 @@ public class SalesOrderService extends ServiceImpl<SalesOrderMapper, SalesOrderE
|
||||||
.setOrderDate(orderTrans.getOrderTime().toLocalDate())
|
.setOrderDate(orderTrans.getOrderTime().toLocalDate())
|
||||||
.setShipmentDate(LocalDate.now())
|
.setShipmentDate(LocalDate.now())
|
||||||
.setQuantity(orderTrans.getEstimatedQuantity())
|
.setQuantity(orderTrans.getEstimatedQuantity())
|
||||||
.setTotalMoney(totalMoney)
|
.setTotalMoney(orderTrans.getSettleMoney())
|
||||||
.setMemo(""));
|
.setMemo(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,17 @@
|
||||||
<result column="address" property="address"/>
|
<result column="address" property="address"/>
|
||||||
<result column="lng" property="lng"/>
|
<result column="lng" property="lng"/>
|
||||||
<result column="lat" property="lat"/>
|
<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>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, order_id, zx, province, city, area, town,
|
id, order_id, zx, province, city, area, town,
|
||||||
province_name, city_name, area_name, town_name, address, lng, lat
|
province_name, city_name, area_name, town_name, address, lng, lat,
|
||||||
|
creator_id, modifier_id, create_time, modify_time, deleted
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -9,20 +9,27 @@
|
||||||
<result column="expense_item_name" property="expenseItemName"/>
|
<result column="expense_item_name" property="expenseItemName"/>
|
||||||
<result column="expense_strategy" property="expenseStrategy"/>
|
<result column="expense_strategy" property="expenseStrategy"/>
|
||||||
<result column="tax_rate" property="taxRate"/>
|
<result column="tax_rate" property="taxRate"/>
|
||||||
|
<result column="payer" property="payer"/>
|
||||||
<result column="unit" property="unit"/>
|
<result column="unit" property="unit"/>
|
||||||
<result column="unit_price" property="unitPrice"/>
|
<result column="unit_price" property="unitPrice"/>
|
||||||
<result column="initial_price" property="initialPrice"/>
|
<result column="initial_price" property="initialPrice"/>
|
||||||
<result column="initial_quantity" property="initialQuantity"/>
|
<result column="initial_quantity" property="initialQuantity"/>
|
||||||
<result column="every_quantity" property="everyQuantity"/>
|
<result column="every_quantity" property="everyQuantity"/>
|
||||||
<result column="user_id" property="userId"/>
|
<result column="user_scope" property="userScope"/>
|
||||||
<result column="customer_id" property="customerId"/>
|
<result column="station_scope" property="stationScope"/>
|
||||||
<result column="org_id" property="orgId"/>
|
<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"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, order_id, expense_item_category, expense_item_name, expense_strategy,
|
id, order_id, expense_item_category, expense_item_name, expense_strategy,
|
||||||
tax_rate, unit, unit_price, initial_price, initial_quantity,
|
tax_rate, payer, unit, unit_price, initial_price, initial_quantity,
|
||||||
every_quantity, user_id, customer_id, org_id
|
every_quantity, user_scope, station_scope, goods_scope,
|
||||||
|
creator_id, modifier_id, create_time, modify_time, deleted
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,17 @@
|
||||||
<result column="out_body_photo" property="outBodyPhoto"/>
|
<result column="out_body_photo" property="outBodyPhoto"/>
|
||||||
<result column="in_time" property="inTime"/>
|
<result column="in_time" property="inTime"/>
|
||||||
<result column="out_time" property="outTime"/>
|
<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_org_id" property="transOrgId"/>
|
||||||
<result column="trans_customer_id" property="transCustomerId"/>
|
<result column="trans_customer_id" property="transCustomerId"/>
|
||||||
<result column="assignment_trans_time" property="assignmentTransTime"/>
|
<result column="assignment_trans_time" property="assignmentTransTime"/>
|
||||||
|
|
@ -47,6 +58,11 @@
|
||||||
<result column="goods_sn" property="goodsSn"/>
|
<result column="goods_sn" property="goodsSn"/>
|
||||||
<result column="estimated_quantity" property="estimatedQuantity"/>
|
<result column="estimated_quantity" property="estimatedQuantity"/>
|
||||||
<result column="unit" property="unit"/>
|
<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>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
|
|
@ -82,6 +98,11 @@
|
||||||
cot.out_body_photo AS out_body_photo,
|
cot.out_body_photo AS out_body_photo,
|
||||||
cot.in_time AS in_time,
|
cot.in_time AS in_time,
|
||||||
cot.out_time AS out_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_org_id AS trans_org_id,
|
||||||
co.trans_customer_id AS trans_customer_id,
|
co.trans_customer_id AS trans_customer_id,
|
||||||
co.assignment_trans_time AS assignment_trans_time,
|
co.assignment_trans_time AS assignment_trans_time,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue