Browse Source

修改

master
dimengzhe 2 years ago
parent
commit
b5f0c16c63
  1. 12
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java
  2. 11
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDelivered.java
  3. 16
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDeliveredDto.java
  4. 23
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDeliveredVo.java
  5. 47
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApply.java
  6. 61
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyDetailVo.java
  7. 50
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyDto.java
  8. 6
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyFeign.java
  9. 10
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyVo.java
  10. 3
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/SubmitDeliveredApplyDto.java
  11. 24
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapplydetails/BusDeliveredApplyDetails.java
  12. 16
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapplydetails/BusDeliveredApplyDetailsDto.java
  13. 16
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapplydetails/BusDeliveredApplyDetailsVo.java
  14. 31
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivereddetailsdiscount/BusDeliveredDetailsDiscount.java
  15. 28
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountDto.java
  16. 28
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountVo.java
  17. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderdiscount/BusSalesOrderDiscountFeign.java
  18. 3
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderdiscount/OrderDiscountVo.java
  19. 25
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivered/BusDeliveredMapper.xml
  20. 4
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivered/BusDeliveredService.java
  21. 3
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyMapper.java
  22. 6
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyMapper.xml
  23. 94
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java
  24. 33
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapplydetails/BusDeliveredApplyDetailsService.java
  25. 28
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountMapper.java
  26. 24
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountMapper.xml
  27. 28
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountService.java
  28. 5
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java
  29. 2
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdiscount/BusSalesOrderDiscountMapper.xml
  30. 34
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdiscount/BusSalesOrderDiscountService.java
  31. 44
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  32. 146
      doc/databases/bus-center_tables.sql

12
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java

@ -509,18 +509,6 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa
e.printStackTrace();
}
//==================================添加线程
/*//极光推送
busVehicleApply.set(fetchBySid(businessSid));
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVo, messageFlowVo);
messageFlowableQuery.setUfVo(messageFlowVo);
messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(businessSid);
messageFlowableQuery.setModuleName("厂家采购申请");
messageFlowableQuery.setMsgContent(busVehicleApply.get().getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
messageFlowableQuery.setMsgTitle("厂家采购");
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);*/
return voResultBean;
}
if (r == 2) {

11
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDelivered.java

@ -78,4 +78,15 @@ public class BusDelivered extends BaseEntity {
private String useOrgSid;
@ApiModelProperty(value = "使用组织名称")
private String useOrgName;
@ApiModelProperty("返利人1")
private String distributorName;
@ApiModelProperty("返利金额1")
private String distributorPrice;
@ApiModelProperty("返利人2")
private String distributorNameTwo;
@ApiModelProperty("返利金额2")
private String distributorPriceTwo;
@ApiModelProperty("销售折让")
private String singleCarDiscountPrice;
}

16
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDeliveredDto.java

@ -52,8 +52,6 @@ public class BusDeliveredDto implements Dto {
private static final long serialVersionUID = -6078868417258339533L;
private String sid;
/* @ApiModelProperty("类型:1车款交清、2欠款提车")
private Integer type;*/
@ApiModelProperty("款项类型")
private String subscription;
private String subscriptionKey;
@ -75,13 +73,23 @@ public class BusDeliveredDto implements Dto {
private String idNo;
@ApiModelProperty(value = "联系地址")
private String address;
@ApiModelProperty(value = "成交价")
private String price;
@ApiModelProperty("分公司sid")
private String useOrgSid;
@ApiModelProperty("分公司名称")
private String useOrgName;
@ApiModelProperty("返利人1")
private String distributorName;
@ApiModelProperty("返利金额1")
private String distributorPrice;
@ApiModelProperty("返利人2")
private String distributorNameTwo;
@ApiModelProperty("返利金额2")
private String distributorPriceTwo;
@ApiModelProperty("销售折让")
private String singleCarDiscountPrice;
}

23
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDeliveredVo.java

@ -52,11 +52,10 @@ public class BusDeliveredVo implements Vo {
private static final long serialVersionUID = -9212919952192716940L;
private String sid;
// @ApiModelProperty("类型:1已交款、2未交款")
@ApiModelProperty("业务状态")
private String type;
@ApiModelProperty("销售类型")
private String paymentMethod;
private String subscription;
@ApiModelProperty("业务状态key")
private String subscriptionKey;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("客户名称")
@ -75,4 +74,20 @@ public class BusDeliveredVo implements Vo {
private String price;
@ApiModelProperty("销售类型")
private String paymentMethod;
@ApiModelProperty("销售类型key")
private String paymentMethodKey;
@ApiModelProperty("返利人1")
private String distributorName;
@ApiModelProperty("返利金额1")
private String distributorPrice;
@ApiModelProperty("返利人2")
private String distributorNameTwo;
@ApiModelProperty("返利金额2")
private String distributorPriceTwo;
@ApiModelProperty("销售折让")
private String singleCarDiscountPrice;
}

47
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApply.java

@ -26,14 +26,11 @@
package com.yxt.anrui.buscenter.api.busdeliveredapply;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* Project: anrui-buscenter(业务管理) <br/>
* File: BusDeliveredApply.java <br/>
@ -54,43 +51,41 @@ public class BusDeliveredApply extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("合同编号")
private String contractNo; // 合同编号
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty("申请日期")
private Date applyDate; // 申请日期
private String contractNo;
@ApiModelProperty("单据编号")
private String billNo;
@ApiModelProperty("客户名称")
private String name; // 客户名称
private String name;
@ApiModelProperty("车型Sid")
private String modelSid;
@ApiModelProperty("配置Sid")
private String configSid;
@ApiModelProperty("车型别名")
private String modelName; // 车型别名
@ApiModelProperty("是否是终端:1是,0不是")
private Integer isTerminal; // 是否是终端:1是,0不是
private String modelName;
@ApiModelProperty("销售类型")
private String paymentMethod;
@ApiModelProperty("销售类型key")
private String paymentMethodKey;
@ApiModelProperty(value = "申请人")
private String applyName;
@ApiModelProperty(value = "申请人sid")
private String applySid;
@ApiModelProperty(value = "申请人分公司sid")
private String orgSid;
@ApiModelProperty(value = "分公司sid")
private String useOrgSid;
/* @ApiModelProperty("是否是终端:1是,0不是")
private Integer isTerminal;*/
@ApiModelProperty(value = "客户手机号")
private String mobile;
@ApiModelProperty(value = "创建人sid")
private String createBySid;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty(value = "节点状态")
private String nodeState;
@ApiModelProperty(value = "节点id")
private String nodeId;
private String taskDefKey;
@ApiModelProperty(value = "流程id")
private String procDefId;
@ApiModelProperty(value = "实例id")
private String procInstId;
@ApiModelProperty(value = "任务id")
private String taskId;
@ApiModelProperty("发起部门sid")
private String applyDeptSid;
@ApiModelProperty("发起部门")
@ -108,4 +103,18 @@ public class BusDeliveredApply extends BaseEntity {
@ApiModelProperty("贷款人手机号")
private String loanMobile;
@ApiModelProperty("实际购车人类型:0订单客户,1贷款人,2其他人")
private String type;
@ApiModelProperty("成交价")
private String price;
@ApiModelProperty("返利人sid")
private String distributorName;
@ApiModelProperty("返利金额1")
private String distributorPrice;
@ApiModelProperty("返利人2sid")
private String distributorNameTwo;
@ApiModelProperty("返利金额2")
private String distributorPriceTwo;
}

61
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyDetailVo.java

@ -32,7 +32,6 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;
@ -54,29 +53,59 @@ import java.util.List;
public class BusDeliveredApplyDetailVo implements Vo {
private static final long serialVersionUID = -2021344742801203695L;
@ApiModelProperty("用户sid")
private String userSid;
@ApiModelProperty("发起部门sid")
private String applyDeptSid;
@ApiModelProperty("发起部门")
private String applyDept;
@ApiModelProperty("发起人sid")
private String applySid;
@ApiModelProperty("发起人")
private String applyName;
@ApiModelProperty("发起日期")
private String createTime;
@ApiModelProperty("分公司sid")
private String useOrgSid;
@ApiModelProperty("销售部门sid")
private String staffDeptSid;
@ApiModelProperty("销售部门")
private String staffDeptName;
@ApiModelProperty("销售专员用户sid")
private String staffUserSid;
@ApiModelProperty("销售专员")
private String staffName;
@ApiModelProperty("销售类型key")
private String paymentMethodKey;
@ApiModelProperty("销售类型")
private String paymentMethod;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("申请日期")
private String applyDate;
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty(value = "客户手机号")
@ApiModelProperty("客户手机号")
private String mobile;
@ApiModelProperty("车型别名")
private String modelName;
@ApiModelProperty("是否是终端:1是,0不是")
private Integer isTerminal;
@ApiModelProperty("用户sid")
private String userSid;
@ApiModelProperty("任务id")
private String taskId;
@ApiModelProperty("流程实例id")
private String procInstId;
@ApiModelProperty(value = "节点id")
private String taskDefKey;
@ApiModelProperty("流程定义id")
private String procDefId;
@ApiModelProperty("贷款人")
private String loanName;
@ApiModelProperty("贷款人手机号")
private String loanMobile;
@ApiModelProperty("实际购车人类型:0订单客户,1贷款人,2其他人")
private String type;
@ApiModelProperty(value = "出库申请车辆信息")
private List<BusDeliveredApplyDetailsVo> listVo = new ArrayList<>();
@ApiModelProperty("成交价")
private String price;
@ApiModelProperty("返利人sid")
private String distributorName;
@ApiModelProperty("返利金额1")
private String distributorPrice;
@ApiModelProperty("返利人2sid")
private String distributorNameTwo;
@ApiModelProperty("返利金额2")
private String distributorPriceTwo;
}

50
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyDto.java

@ -26,14 +26,12 @@
package com.yxt.anrui.buscenter.api.busdeliveredapply;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.BusDeliveredApplyDetailsDto;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
@ -57,22 +55,52 @@ public class BusDeliveredApplyDto implements Dto {
@ApiModelProperty(value = "出库申请sid")
private String sid;
private String userSid;
@ApiModelProperty("发起部门sid")
private String applyDeptSid;
@ApiModelProperty("发起部门")
private String applyDept;
@ApiModelProperty("发起人sid")
private String applySid;
@ApiModelProperty("发起人")
private String applyName;
@ApiModelProperty("销售部门sid")
private String staffDeptSid;
@ApiModelProperty("销售部门")
private String staffDeptName;
@ApiModelProperty("销售专员用户sid")
private String staffUserSid;
@ApiModelProperty("销售专员")
private String staffName;
@ApiModelProperty("销售类型key")
private String paymentMethodKey;
@ApiModelProperty("销售类型")
private String paymentMethod;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty(value = "申请人")
private String applyName;
@ApiModelProperty(value = "申请人sid")
private String applySid;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("申请日期")
private Date applyDate; // 申请日期
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("客户手机号")
private String mobile;
@ApiModelProperty("车型别名")
private String modelName;
@ApiModelProperty("是否是终端:1是,0不是")
private Integer isTerminal;
@ApiModelProperty("贷款人")
private String loanName;
@ApiModelProperty("贷款人手机号")
private String loanMobile;
@ApiModelProperty("实际购车人类型:0订单客户,1贷款人,2其他人")
private String type;
@ApiModelProperty(value = "出库申请的车辆信息")
private List<BusDeliveredApplyDetailsDto> detailsList;
private String orgPath;
@ApiModelProperty("成交价")
private String price;
@ApiModelProperty("返利人sid")
private String distributorName;
@ApiModelProperty("返利金额1")
private String distributorPrice;
@ApiModelProperty("返利人2sid")
private String distributorNameTwo;
@ApiModelProperty("返利金额2")
private String distributorPriceTwo;
}

6
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyFeign.java

@ -92,7 +92,7 @@ public interface BusDeliveredApplyFeign {
*/
@ApiOperation("提交")
@PostMapping("/submit")
@ResponseBody
// @ResponseBody
ResultBean submit(@RequestBody BusDeliveredApplyDto dto);
/**
@ -103,7 +103,7 @@ public interface BusDeliveredApplyFeign {
*/
@ApiOperation("列表上的提交")
@PutMapping("/submitBySid")
@ResponseBody
// @ResponseBody
ResultBean submitBySid(@RequestParam(value = "sid") String sid);
/**
@ -114,7 +114,7 @@ public interface BusDeliveredApplyFeign {
*/
@ApiOperation("列表上的撤回")
@PutMapping("/revokeBySid")
@ResponseBody
// @ResponseBody
ResultBean revokeBySid(@RequestParam(value = "sid") String sid);
/**

10
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyVo.java

@ -52,11 +52,19 @@ public class BusDeliveredApplyVo implements Vo {
private String sid;
@ApiModelProperty(value = "状态")
private String nodeState;
@ApiModelProperty("单据编号")
private String billNo;
@ApiModelProperty("销售类型")
private String paymentMethod;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("申请日期")
@ApiModelProperty("车型")
private String modelName;
@ApiModelProperty("台数")
private int num;
@ApiModelProperty("发起日期")
private String applyDate;
@ApiModelProperty(value = "申请人")
private String applyName;

3
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/SubmitDeliveredApplyDto.java

@ -7,8 +7,7 @@ import lombok.Data;
public class SubmitDeliveredApplyDto extends BusDeliveredApplyDto {
private static final long serialVersionUID = 452003563735204012L;
@ApiModelProperty("意见")
private String comment;
@ApiModelProperty("流程实例id")
private String instanceId;
@ApiModelProperty("任务id")

24
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapplydetails/BusDeliveredApplyDetails.java

@ -50,15 +50,21 @@ import lombok.Data;
public class BusDeliveredApplyDetails extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("出库申请sid")
private String applySid; // 出库申请sid
@ApiModelProperty("车架号")
private String vinNo; // 车架号
@ApiModelProperty("成交价")
private String price; // 成交价
@ApiModelProperty("出库申请sid")
private String applySid;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("车辆sid")
private String vinSid;
@ApiModelProperty("备注")
private String remarks; // 成交价
@ApiModelProperty("使用人信息sid")
private String useMessageSid; // 使用人信息sid
private String remarks;
@ApiModelProperty("使用人信息sid")
private String useMessageSid;
@ApiModelProperty("销售折让")
private String singleCarDiscountPrice;
@ApiModelProperty("赠送套餐")
private String discountAll;
}

16
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapplydetails/BusDeliveredApplyDetailsDto.java

@ -26,12 +26,16 @@
package com.yxt.anrui.buscenter.api.busdeliveredapplydetails;
import com.yxt.anrui.buscenter.api.busdelivereddetailsdiscount.BusDeliveredDetailsDiscountDto;
import com.yxt.anrui.buscenter.api.busdeliveredusemessage.BusDeliveredUseMessageDto;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: anrui-buscenter(业务管理) <br/>
* File: BusDeliveredApplyDetailsDto.java <br/>
@ -52,13 +56,17 @@ public class BusDeliveredApplyDetailsDto implements Dto {
private static final long serialVersionUID = 2067369170796332433L;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("成交价")
private String price;
@ApiModelProperty("车辆sid")
private String vinSid;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "联系电话")
private String mobile;
@ApiModelProperty(value = "使用人信息")
private BusDeliveredUseMessageDto useMessage;
@ApiModelProperty("销售折让")
private String singleCarDiscountPrice;
@ApiModelProperty("赠送套餐")
private String discountAll;
@ApiModelProperty("套餐list")
private List<BusDeliveredDetailsDiscountDto> discountList = new ArrayList<>();
}

16
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapplydetails/BusDeliveredApplyDetailsVo.java

@ -50,17 +50,21 @@ import lombok.Data;
public class BusDeliveredApplyDetailsVo implements Vo {
private static final long serialVersionUID = -6554786073803370571L;
@ApiModelProperty(value = "出库关联车辆sid")
private String sid;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("成交价")
private String price;
@ApiModelProperty("车辆sid")
private String vinSid;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "使用人信息sid")
private String useMessageSid;
@ApiModelProperty(value = "使用人信息")
private BusDeliveredUseMessageVo useMessage;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty("销售折让")
private String singleCarDiscountPrice;
@ApiModelProperty("赠送套餐")
private String discountAll;
}

31
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivereddetailsdiscount/BusDeliveredDetailsDiscount.java

@ -0,0 +1,31 @@
package com.yxt.anrui.buscenter.api.busdelivereddetailsdiscount;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2023/4/7 8:52
* @Description
*/
@Data
public class BusDeliveredDetailsDiscount extends BaseEntity {
private static final long serialVersionUID = 405239497732749032L;
@ApiModelProperty("关联的车辆表的sid")
private String detailsSid;
@ApiModelProperty("出库申请sid")
private String applySid;
@ApiModelProperty("优惠包名称")
private String name;
@ApiModelProperty("价值")
private String price;
@ApiModelProperty("优惠包项目说明")
private String discountExplain;
@ApiModelProperty("数量")
private Integer num;
@ApiModelProperty("本次剩余数量")
private Integer giveNum;
@ApiModelProperty("优惠包sid")
private String discountSid;
}

28
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountDto.java

@ -0,0 +1,28 @@
package com.yxt.anrui.buscenter.api.busdelivereddetailsdiscount;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2023/4/7 15:46
* @Description
*/
@Data
public class BusDeliveredDetailsDiscountDto implements Dto {
private static final long serialVersionUID = 5462568049453200753L;
@ApiModelProperty("优惠包名称")
private String name;
@ApiModelProperty("价值")
private String price;
@ApiModelProperty("优惠包项目说明")
private String discountExplain;
@ApiModelProperty("数量")
private Integer num;
@ApiModelProperty("本次剩余数量")
private Integer giveNum;
@ApiModelProperty("优惠包sid")
private String discountSid;
}

28
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountVo.java

@ -0,0 +1,28 @@
package com.yxt.anrui.buscenter.api.busdelivereddetailsdiscount;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author dimengzhe
* @Date 2023/4/7 16:26
* @Description
*/
@Data
public class BusDeliveredDetailsDiscountVo implements Vo {
private static final long serialVersionUID = 1624728389839141202L;
@ApiModelProperty("优惠包名称")
private String name;
@ApiModelProperty("价值")
private String price;
@ApiModelProperty("优惠包项目说明")
private String discountExplain;
@ApiModelProperty("数量")
private Integer num;
@ApiModelProperty("本次剩余数量")
private Integer giveNum;
@ApiModelProperty("优惠包sid")
private String discountSid;
}

2
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderdiscount/BusSalesOrderDiscountFeign.java

@ -74,5 +74,5 @@ public interface BusSalesOrderDiscountFeign {
@ApiOperation("出库选择套餐列表")
@GetMapping("/discountList")
@ResponseBody
ResultBean<List<OrderDiscountVo>> discountList(@RequestParam("contractNo") String contractNo,@RequestParam("vinSid")String vinSid);
ResultBean<List<OrderDiscountVo>> discountList(@RequestParam("contractNo") String contractNo, @RequestParam(value = "vinSid", required = false) String vinSid);
}

3
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderdiscount/OrderDiscountVo.java

@ -24,4 +24,7 @@ public class OrderDiscountVo {
@ApiModelProperty("本次赠送数量")
private Integer giveNum;
@ApiModelProperty("优惠包sid")
private String discountSid;
}

25
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivered/BusDeliveredMapper.xml

@ -11,16 +11,23 @@
bd.name,
<!--车架号-->
bd.vinNo,
<!--认款状态-->
bd.subscription as type,
bd.subscription,
bd.subscriptionKey,
bd.paymentMethodKey,
bd.paymentMethod,
bd.modelName,
bd.price,
bd.mobile,
bd.idNo,
bd.address,
bd.price
bd.price,
bd.distributorName,
bd.distributorPrice,
bd.distributorNameTwo,
bd.distributorPriceTwo,
bd.singleCarDiscountPrice
FROM bus_delivered bd
${ew.customSqlSegment}
${ew.customSqlSegment}
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.buscenter.api.busdelivered.BusDeliveredVo">
@ -39,11 +46,11 @@
${ew.sqlSegment}
<if test="name != null and name != ''">
and concat(IFNULL(bd.contractNo
, '')
, ifnull(bd.`name`
, '')) LIKE concat('%'
, #{name}
, '%')
, '')
, ifnull(bd.`name`
, '')) LIKE concat('%'
, #{name}
, '%')
</if>
</where>
group by bd.contractNo

4
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivered/BusDeliveredService.java

@ -98,10 +98,6 @@ public class BusDeliveredService extends MybatisBaseService<BusDeliveredMapper,
if (query.getVinNoList().size() > 0) {
qw.notIn("bd.vinNo", query.getVinNoList());
}
// //用户sid
// if (StringUtils.isNotBlank(query.getUserSid())) {
// qw.eq("bd.createBySid", query.getUserSid());
// }
//待出库:1,出库申请:0
qw.eq("bd.state", 1);

3
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyMapper.java

@ -37,7 +37,6 @@ import com.yxt.anrui.buscenter.api.busdeliveredapply.BusDeliveredApplyVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -62,7 +61,7 @@ public interface BusDeliveredApplyMapper extends BaseMapper<BusDeliveredApply> {
IPage<BusDeliveredApplyVo> selectPageVo(IPage<BusDeliveredApply> page, @Param(Constants.WRAPPER) Wrapper<BusDeliveredApply> qw);
int updateStateBySid(@Param("state") int i, @Param("sid") String sid, @Param("today") Date today);
int updateStateBySid(@Param("state") int i, @Param("sid") String sid);
/**
* 查询除了待提交状态外其他的还包含其他的状态若包含则返回false

6
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyMapper.xml

@ -12,7 +12,8 @@
bd.procInstId,
bd.procDefId,
DATE_FORMAT(bd.applyDate, '%Y-%m-%d') as applyDate,
bd.applyName
bd.applyName,
bd.modelName
FROM bus_delivered_apply bd
<where>
${ew.sqlSegment}
@ -21,8 +22,7 @@
<update id="updateStateBySid">
update bus_delivered_apply
set state = #{state},
applyDate = #{today}
set state = #{state}
where sid = #{sid}
</update>

94
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java

@ -44,6 +44,7 @@ import com.yxt.anrui.buscenter.api.busdeliveredusemessage.BusDeliveredUseMessage
import com.yxt.anrui.buscenter.api.busdeliveredusemessage.BusDeliveredUseMessageVo;
import com.yxt.anrui.buscenter.biz.busdelivered.BusDeliveredService;
import com.yxt.anrui.buscenter.biz.busdeliveredapplydetails.BusDeliveredApplyDetailsService;
import com.yxt.anrui.buscenter.biz.busdelivereddetailsdiscount.BusDeliveredDetailsDiscountService;
import com.yxt.anrui.buscenter.biz.busdeliveredusemessage.BusDeliveredUseMessageService;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
@ -114,6 +115,8 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
BaseVehicleFeign baseVehicleFeign;
@Autowired
private MessageFeign messageFeign;
@Autowired
private BusDeliveredDetailsDiscountService busDeliveredDetailsDiscountService;
/**
* 构造出库申请的查询条件
@ -160,30 +163,29 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
*/
public ResultBean saveOrUpdateDto(BusDeliveredApplyDto dto) {
ResultBean rb = ResultBean.fireFail();
if (dto.getDetailsList().size() <= 0) {
return rb.setMsg("请选择车辆信息!!!");
if (dto.getDetailsList().size() == 0) {
return rb.setMsg("请选择车辆信息!");
}
if (dto.getIsTerminal() == 3) {
return rb.setMsg("请选择是否为终端客户!!!");
if (StringUtils.isBlank(dto.getType())) {
return rb.setMsg("请选择实际购车人!");
}
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
//新增
BusDeliveredApply busDeliveredApply = new BusDeliveredApply();
String mobile = dto.getDetailsList().get(0).getUseMessage().getMobile();
busDeliveredApply.setMobile(mobile);
busDeliveredApply.setCreateBySid(dto.getUserSid());
BeanUtil.copyProperties(dto, busDeliveredApply, "sid");
busDeliveredApply.setCreateBySid(dto.getUserSid());
String useOrgSid = "";
if (StringUtils.isNotBlank(dto.getOrgPath())) {
useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData();
} else {
useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(dto.getUserSid()).getData();
}
busDeliveredApply.setUseOrgSid(useOrgSid);
List<BusDeliveredApplyDetailsDto> dtoList = dto.getDetailsList();
if (dtoList.size() > 0) {
busDeliveredApplyDetailsService.saveList(dtoList, busDeliveredApply.getSid());
}
//根据申请人sid查询分公司sid
ResultBean<String> stringResultBean = sysStaffOrgFeign.selectSidPathByStaffSid(dto.getApplySid());
if (stringResultBean.getSuccess()) {
busDeliveredApply.setOrgSid(stringResultBean.getData());
}
save(busDeliveredApply);
dtoSid = busDeliveredApply.getSid();
} else {
@ -191,9 +193,6 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
if (busDeliveredApply == null) {
return rb.setMsg("该申请不存在");
}
//删除
busDeliveredApplyDetailsService.deleteByApplySid(dtoSid);
busDeliveredUseMessageService.deleteByApplySid(dtoSid);
List<BusDeliveredApplyDetailsDto> dtoList = dto.getDetailsList();
if (dtoList.size() > 0) {
busDeliveredApplyDetailsService.saveList(dtoList, busDeliveredApply.getSid());
@ -219,10 +218,10 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
}
BeanUtil.copyProperties(entity, vo);
vo.setUserSid(entity.getCreateBySid());
vo.setTaskDefKey(entity.getNodeId());
String format = DateUtil.format(entity.getApplyDate(), "yyyy-MM-dd");
vo.setApplyDate(format);
if (vo.getIsTerminal().equals(1)) {
// vo.setTaskDefKey(entity.getTaskDefKey());
String format = DateUtil.format(entity.getCreateTime(), "yyyy-MM-dd");
vo.setCreateTime(format);
if ("0".equals(vo.getType())) {
List<BusDeliveredApplyDetailsVo> voList = busDeliveredApplyDetailsService.detailsList(sid);
voList.removeAll(Collections.singleton(null));
if (!voList.isEmpty()) {
@ -239,8 +238,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
}
}
vo.setListVo(voList);
} else if (vo.getIsTerminal().equals(0)) {
} else {
//根据出库申请单的sid查询需要出库的车辆信息
List<BusDeliveredApplyDetailsVo> voList = busDeliveredApplyDetailsService.detailsList(sid);
for (int i = 0; i < voList.size(); i++) {
@ -251,7 +249,6 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
}
vo.setListVo(voList);
}
return rb.success().setData(vo);
}
@ -268,7 +265,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
String sid = resultBean.getData().toString();
//更新出库申请的状态为待审核。
//状态:1待提交,2待审核,3已通过,4未通过
baseMapper.updateStateBySid(2, sid, DateUtil.date());
baseMapper.updateStateBySid(2, sid);
return rb.success().setMsg("提交成功");
}
return rb.setMsg(resultBean.getMsg());
@ -287,7 +284,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
return rb.setMsg("该出库申请不存在");
}
//状态:1待提交,2待审核,3已通过,4未通过
baseMapper.updateStateBySid(2, sid, DateUtil.date());
baseMapper.updateStateBySid(2, sid);
return rb.success().setMsg("提交成功");
}
@ -307,7 +304,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
if (!busDeliveredApply.getState().equals(2)) {
return rb.setMsg("撤回失败,该申请已在审核中");
}
baseMapper.updateStateBySid(1, sid, DateUtil.date());
baseMapper.updateStateBySid(1, sid);
return rb.success().setMsg("撤回成功");
}
@ -336,6 +333,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
for (int i = 0; i < sidsList.size(); i++) {
busDeliveredApplyDetailsService.deleteByApplySid(sidsList.get(i));
busDeliveredUseMessageService.deleteByApplySid(sidsList.get(i));
busDeliveredDetailsDiscountService.deleteByApplySid(sidsList.get(i));
deleteBySid(sidsList.get(i));
}
}
@ -447,7 +445,8 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
*/
public ResultBean submitDeliveredApply(SubmitDeliveredApplyDto dto) {
ResultBean rb = ResultBean.fireFail();
//根据用户sid获取staffSid
String orgSidPath = dto.getOrgPath();
/*//根据用户sid获取staffSid
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid());
if (!userVoResultBean.getSuccess()) {
return rb.setMsg(userVoResultBean.getMsg());
@ -456,9 +455,9 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(userVoResultBean.getData().getStaffSid());
if (!staffOrgResultBean.getSuccess()) {
return rb.setMsg(staffOrgResultBean.getMsg());
}
}*/
//用户的组织全路径
String orgSidPath = staffOrgResultBean.getData().getOrgSidPath();
// String orgSidPath = staffOrgResultBean.getData().getOrgSidPath();
BusDeliveredApply busDeliveredApply = fetchBySid(dto.getSid());
int r = submitBusinessData(dto, busDeliveredApply);
if (r == 3) {
@ -473,13 +472,14 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
return rb.setMsg(resultBean.getMsg());
}
String sid = resultBean.getData();
//更改状态
//将待出库中的车辆更改状态为出库申请0
List<String> stringList = busDeliveredApplyDetailsService.selectVinByApplySid(sid);
for (int i = 0; i < stringList.size(); i++) {
String vinNo = stringList.get(i);
busDeliveredService.updateState(vinNo, 0);
}
baseMapper.updateStateBySid(2, sid, DateUtil.date());
//更改申请的状态为待审核2
baseMapper.updateStateBySid(2, sid);
String businessSid = resultBean.getData();
//创建BusinessVariables实体对象
BusinessVariables bv = new BusinessVariables();
@ -498,6 +498,9 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId());
if (r == 1) {
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv);
if (!voResultBean.getSuccess()) {
return rb.setMsg(voResultBean.getMsg());
}
UpdateFlowFieldVo ufVo = voResultBean.getData();
updateFlowFiled(BeanUtil.beanToMap(ufVo));
return voResultBean;
@ -508,8 +511,8 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
return rb.setMsg("参数错误:instanceId");
}
bv.setTaskId(busDeliveredApply.getTaskId());
bv.setTaskDefKey(busDeliveredApply.getNodeId());
bv.setComment(StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交");
bv.setTaskDefKey(busDeliveredApply.getTaskDefKey());
bv.setComment("重新提交");
bv.setInstanceId(dto.getInstanceId());
return complete(bv);
}
@ -569,7 +572,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
return rb.setMsg(resultBean.getMsg());
}
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) {
baseMapper.updateStateBySid(3, bv.getBusinessSid(), DateUtil.date());
baseMapper.updateStateBySid(3, bv.getBusinessSid());
}
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
return rb.success().setData(resultBean.getData());
@ -635,7 +638,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
baseMapper.updateStateBySid(1, query.getBusinessSid(), DateUtil.date());
baseMapper.updateStateBySid(1, query.getBusinessSid());
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData());
//更新业务中的流程相关的参数
updateFlowFiled(map);
@ -669,7 +672,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
if (!resultBean.getSuccess()) {
return rb.setMsg("操作失败!");
}
baseMapper.updateStateBySid(1, query.getBusinessSid(), DateUtil.date());
baseMapper.updateStateBySid(1, query.getBusinessSid());
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
return rb.success().setData(resultBean.getData());
}
@ -702,7 +705,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
baseMapper.updateStateBySid(4, query.getBusinessSid(), DateUtil.date());
baseMapper.updateStateBySid(4, query.getBusinessSid());
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
return rb.success().setData(resultBean.getData());
}
@ -744,7 +747,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
//根据申请人sid查询分公司sid
ResultBean<String> stringResultBean = sysStaffOrgFeign.getPathSidByUserSid(appDeliveredApplyDto.getUserSid());
if (stringResultBean.getSuccess()) {
busDeliveredApply.setOrgSid(stringResultBean.getData());
busDeliveredApply.setUseOrgSid(stringResultBean.getData());
}
if (carList.size() > 0) {
String vin = carList.get(0).getVin();
@ -756,7 +759,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
busDeliveredService.updateState(vinNo, 0);
}
}
baseMapper.updateStateBySid(2, dtoSid, DateUtil.date());
baseMapper.updateStateBySid(2, dtoSid);
busDeliveredApply.setApplySid(sysUserVo.getSid());
busDeliveredApply.setApplyName(sysUserVo.getName());
busDeliveredApply.setModelSid(baseVehicle.getModelSid());
@ -801,16 +804,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
for (AppCarListVo v : voList) {
String contractNo = vo.getContractNo();
CommonContract commonContract = commonContractFeign.selectByNo(contractNo).getData();
// String customerSid = commonContract.getCustomerSid();
// CrmCustomerTempVo data = crmCustomerTempFeign.fetchSid(customerSid).getData();
AppUseInfoVo appUseInfoVo = null;
// if (data != null) {
// appUseInfoVo = new AppUseInfoVo();
// appUseInfoVo.setMobile(data.getMobile());
// appUseInfoVo.setCustomer(data.getName());
// appUseInfoVo.setAddress(data.getAddress());
// appUseInfoVo.setIdNumber(data.getIDNumber());
// }
v.setUseInfo(appUseInfoVo);
}
}
@ -871,7 +865,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
String vinNo = stringList.get(i);
busDeliveredService.updateState(vinNo, 0);
}
baseMapper.updateStateBySid(2, sid, DateUtil.date());
baseMapper.updateStateBySid(2, sid);
String businessSid = resultBean.getData();
//创建BusinessVariables实体对象
BusinessVariables bv = new BusinessVariables();
@ -915,7 +909,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
return rb.setMsg("参数错误:instanceId");
}
bv.setTaskId(busDeliveredApply.getTaskId());
bv.setTaskDefKey(busDeliveredApply.getNodeId());
bv.setTaskDefKey(busDeliveredApply.getTaskDefKey());
bv.setComment(StringUtils.isNotBlank(dto.getComment()) ? dto.getComment() : "重新提交");
bv.setInstanceId(dto.getInstanceId());
return complete(bv);

33
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapplydetails/BusDeliveredApplyDetailsService.java

@ -33,12 +33,12 @@ import com.yxt.anrui.base.api.basevehicle.BaseVehicleVo;
import com.yxt.anrui.base.api.basevehicletempstate.BaseVehicleTempstateDto;
import com.yxt.anrui.base.api.basevehicletempstate.BaseVehicleTempstateFeign;
import com.yxt.anrui.base.common.enums.VehicleStateTempOrLast;
import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsVo;
import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.AppCarListDto;
import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.AppCarListVo;
import com.yxt.anrui.buscenter.api.busdeliveredusemessage.AppUseInfoDto;
import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.*;
import com.yxt.anrui.buscenter.api.busdelivereddetailsdiscount.BusDeliveredDetailsDiscount;
import com.yxt.anrui.buscenter.api.busdelivereddetailsdiscount.BusDeliveredDetailsDiscountDto;
import com.yxt.anrui.buscenter.api.busdeliveredusemessage.AppUseInfoDto;
import com.yxt.anrui.buscenter.api.busdeliveredusemessage.BusDeliveredUseMessage;
import com.yxt.anrui.buscenter.biz.busdelivereddetailsdiscount.BusDeliveredDetailsDiscountService;
import com.yxt.anrui.buscenter.biz.busdeliveredusemessage.BusDeliveredUseMessageService;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
@ -48,6 +48,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
@ -71,6 +72,8 @@ public class BusDeliveredApplyDetailsService extends MybatisBaseService<BusDeliv
private BaseVehicleFeign baseVehicleFeign;
@Autowired
private BaseVehicleTempstateFeign baseVehicleTempstateFeign;
@Autowired
private BusDeliveredDetailsDiscountService busDeliveredDetailsDiscountService;
private QueryWrapper<BusDeliveredApplyDetails> createQueryWrapper(BusDeliveredApplyDetailsQuery query) {
// todo: 这里根据具体业务调整查询条件
@ -116,10 +119,16 @@ public class BusDeliveredApplyDetailsService extends MybatisBaseService<BusDeliv
}
public void saveList(List<BusDeliveredApplyDetailsDto> dtoList, String sid) {
//删除该出库的车辆以及优惠
baseMapper.deleteByApplySid(sid);
busDeliveredUseMessageService.deleteByApplySid(sid);
busDeliveredDetailsDiscountService.deleteByApplySid(sid);
for (int i = 0; i < dtoList.size(); i++) {
BusDeliveredApplyDetailsDto busDeliveredApplyDetailsDto = dtoList.get(i);
BusDeliveredApplyDetails busDeliveredApplyDetails = new BusDeliveredApplyDetails();
BeanUtil.copyProperties(dtoList.get(i), busDeliveredApplyDetails, "sid");
BeanUtil.copyProperties(busDeliveredApplyDetailsDto, busDeliveredApplyDetails, "sid");
busDeliveredApplyDetails.setApplySid(sid);
//保存使用人信息
if (dtoList.get(i).getUseMessage() != null) {
BusDeliveredUseMessage busDeliveredUseMessage = new BusDeliveredUseMessage();
BeanUtil.copyProperties(dtoList.get(i).getUseMessage(), busDeliveredUseMessage, "sid");
@ -128,6 +137,18 @@ public class BusDeliveredApplyDetailsService extends MybatisBaseService<BusDeliv
busDeliveredApplyDetails.setUseMessageSid(busDeliveredUseMessage.getSid());
}
save(busDeliveredApplyDetails);
//保存优惠套餐
List<BusDeliveredDetailsDiscountDto> discountList = busDeliveredApplyDetailsDto.getDiscountList();
discountList.removeAll(Collections.singleton(null));
if (!discountList.isEmpty()) {
for (int j = 0; j < discountList.size(); j++) {
BusDeliveredDetailsDiscountDto busDeliveredDetailsDiscountDto = discountList.get(j);
BusDeliveredDetailsDiscount busDeliveredDetailsDiscount = new BusDeliveredDetailsDiscount();
BeanUtil.copyProperties(busDeliveredDetailsDiscountDto, busDeliveredDetailsDiscount, "sid");
busDeliveredDetailsDiscount.setDetailsSid(busDeliveredApplyDetails.getSid());
busDeliveredDetailsDiscountService.insert(busDeliveredDetailsDiscount);
}
}
}
}
@ -137,7 +158,7 @@ public class BusDeliveredApplyDetailsService extends MybatisBaseService<BusDeliv
AppCarListDto appCarListDto = carList.get(i);
busDeliveredApplyDetails.setRemarks(appCarListDto.getCarRemarks());
busDeliveredApplyDetails.setVinNo(appCarListDto.getVin());
busDeliveredApplyDetails.setPrice(appCarListDto.getPrice());
// busDeliveredApplyDetails.setPrice(appCarListDto.getPrice());
busDeliveredApplyDetails.setApplySid(sid);
if (carList.get(i).getUseInfo() != null) {
AppUseInfoDto useInfo = carList.get(i).getUseInfo();

28
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountMapper.java

@ -0,0 +1,28 @@
package com.yxt.anrui.buscenter.biz.busdelivereddetailsdiscount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.anrui.buscenter.api.busdelivereddetailsdiscount.BusDeliveredDetailsDiscount;
import com.yxt.anrui.buscenter.api.bussalesorderdiscount.OrderDiscountVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @Author dimengzhe
* @Date 2023/4/7 8:54
* @Description
*/
@Mapper
public interface BusDeliveredDetailsDiscountMapper extends BaseMapper<BusDeliveredDetailsDiscount> {
List<OrderDiscountVo> selectBySid(String vinSid);
int selectCounts(String discountSid);
/**
* 根据出库申请删除优惠信息
*
* @param sid
* @return
*/
int deleteByApplySid(String sid);
}

24
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountMapper.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yxt.anrui.buscenter.biz.busdelivereddetailsdiscount.BusDeliveredDetailsDiscountMapper">
<select id="selectBySid" resultType="com.yxt.anrui.buscenter.api.bussalesorderdiscount.OrderDiscountVo">
select *
from bus_delivered_details_discount
where detailsSid = #{vinSid}
</select>
<select id="selectCounts" resultType="int">
select sum(bd.giveNum)
from bus_delivered_details_discount bd
left join bus_delivered_apply_details bad on bad.sid = bd.detailsSid
left join bus_delivered_apply bda on bda.sid = bad.applySid
where bd.discountSid = #{discountSid}
and (bda.nodeState = '已办结' or bda.nodeState = '销售支持部经理审批')
</select>
<delete id="deleteByApplySid">
delete
from bus_delivered_details_discount
where applySid = #{sid}
</delete>
</mapper>

28
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivereddetailsdiscount/BusDeliveredDetailsDiscountService.java

@ -0,0 +1,28 @@
package com.yxt.anrui.buscenter.biz.busdelivereddetailsdiscount;
import com.yxt.anrui.buscenter.api.busdelivereddetailsdiscount.BusDeliveredDetailsDiscount;
import com.yxt.anrui.buscenter.api.bussalesorderdiscount.OrderDiscountVo;
import com.yxt.common.base.service.MybatisBaseService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Author dimengzhe
* @Date 2023/4/7 8:53
* @Description
*/
@Service
public class BusDeliveredDetailsDiscountService extends MybatisBaseService<BusDeliveredDetailsDiscountMapper, BusDeliveredDetailsDiscount> {
public List<OrderDiscountVo> selectBySid(String vinSid) {
return baseMapper.selectBySid(vinSid);
}
public int selectCounts(String discountSid) {
return baseMapper.selectCounts(discountSid);
}
public int deleteByApplySid(String sid) {
return baseMapper.deleteByApplySid(sid);
}
}

5
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java

@ -3374,10 +3374,11 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
StringBuilder typeValue = new StringBuilder();
if (StringUtils.isNotBlank(solutionsDetailsVo.getTypeKey())) {
typeValue = typeValue.append("销售类型:" + solutionsDetailsVo.getType());
} else {
typeValue = typeValue.append("销售类型:" + "-");
}else{
typeValue = typeValue.append("销售类型:" + appOrderDetailsVo.getPayType());
}
list.add(getValueSpanSize(typeValue.toString(), 1, 0, false));
if (StringUtils.isNotBlank(solutionsDetailsVo.getTypeKey()) && "02".equals(solutionsDetailsVo.getTypeKey())) {
list.add(getValueSpanSize("融资项目", 2, 1, true));
//厂家贴息

2
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdiscount/BusSalesOrderDiscountMapper.xml

@ -57,6 +57,6 @@
</select>
<select id="discountList" resultType="com.yxt.anrui.buscenter.api.bussalesorderdiscount.OrderDiscountVo">
select * from bus_sales_order_discount
select bd.*,bd.sid discountSid from bus_sales_order_discount bd
</select>
</mapper>

34
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderdiscount/BusSalesOrderDiscountService.java

@ -35,6 +35,7 @@ import com.yxt.anrui.buscenter.api.bussalesorderdiscount.OrderDiscountVo;
import com.yxt.anrui.buscenter.api.bussalesorderdiscount.app.AppBusSalesOrderDiscountDto;
import com.yxt.anrui.buscenter.api.bussalesorderdiscount.app.AppBusSalesOrderDiscountListVo;
import com.yxt.anrui.buscenter.api.bussalesorderdiscount.app.AppDiscountInfoDto;
import com.yxt.anrui.buscenter.biz.busdelivereddetailsdiscount.BusDeliveredDetailsDiscountService;
import com.yxt.anrui.buscenter.biz.bussalesorder.BusSalesOrderService;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.StringUtils;
@ -65,6 +66,9 @@ public class BusSalesOrderDiscountService extends MybatisBaseService<BusSalesOrd
@Autowired
private BusSalesOrderService busSalesOrderService;
@Autowired
private BusDeliveredDetailsDiscountService busDeliveredDetailsDiscountService;
public void saveDiscount(List<BusSalesOrderDiscountDto> busSalesOrderDiscountList, String sid) {
//删除原有的
@ -174,10 +178,34 @@ public class BusSalesOrderDiscountService extends MybatisBaseService<BusSalesOrd
return baseMapper.selectDiscount(sid);
}
public ResultBean<List<OrderDiscountVo>> discountList(String contractNo,String vinSid) {
public ResultBean<List<OrderDiscountVo>> discountList(String contractNo, String vinSid) {
ResultBean<List<OrderDiscountVo>> rb = ResultBean.fireFail();
//查询出库的选择套餐中是否存在
List<OrderDiscountVo> list = baseMapper.discountList(contractNo);
List<OrderDiscountVo> list = new ArrayList<>();
//根据关联的车辆sid查询该条数据的优惠信息bus_deliveredDetails的sid
List<OrderDiscountVo> detailsList = busDeliveredDetailsDiscountService.selectBySid(vinSid);
detailsList.removeAll(Collections.singleton(null));
if (detailsList.isEmpty()) {
List<OrderDiscountVo> discountList = baseMapper.discountList(contractNo);
for (int i = 0; i < discountList.size(); i++) {
OrderDiscountVo discountVo = discountList.get(i);
//已使用的数量:根据优惠包sid查询出库已提交以及出库已办结的数量
int integerList = busDeliveredDetailsDiscountService.selectCounts(discountVo.getDiscountSid());
int num = discountVo.getNum();
int surplusNum = num - integerList;
discountVo.setSurplusNum(surplusNum);
list.add(discountVo);
}
} else {
for (int i = 0; i < detailsList.size(); i++) {
OrderDiscountVo discountVo = detailsList.get(i);
//已使用的数量:根据优惠包sid查询出库已提交以及出库已办结的数量
int integerList = busDeliveredDetailsDiscountService.selectCounts(discountVo.getDiscountSid());
int num = discountVo.getNum();
int surplusNum = num - integerList;
discountVo.setSurplusNum(surplusNum);
list.add(discountVo);
}
}
return rb.success().setData(list);
}
}

44
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java

@ -49,6 +49,7 @@ import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign;
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderDetailsVo;
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderModelInfoVo;
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderPriceInfoVo;
import com.yxt.anrui.buscenter.api.bussalesordersubmit.SubmitVo;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
@ -1230,6 +1231,26 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
return rb.success().setMsg("驳回成功");
}
/**
* 需求
* 全款
* 推送车款根据客户名称和手机号查询分组查询是否有车架号若有车架号则需要推送具体的车架号的数组若没有车架号则按照客户名称和手机号推送该客户整体的车款
* 推送订金根据客户名称和手机号查询分组查询是否有车架号若有车架号则需要推送具体的车架号的数组若没有车架号则按照客户名称和手机号推送该客户整体的订金
*
* 贷款
* 推送车款
* 查询所有的贷款的车款数据推送临时车架号
*
* 推送订金
* 查询所有的贷款的订金数据推送临时车架号
*
*
*
*
* @param sid
* @param userSid
* @return
*/
public ResultBean cashierConfirm(String sid, String userSid) {
ResultBean rb = ResultBean.fireFail();
FinCollectionConfirmation confirmation = fetchBySid(sid);
@ -1359,11 +1380,11 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
}
} else {
fEntityList = new ArrayList<>();
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY();
finSelectedReceivablesDetailedVos1.removeAll(Collections.singleton(null));
if (!finSelectedReceivablesDetailedVos1.isEmpty()) {
for (int i = 0; i < finSelectedReceivablesDetailedVos1.size(); i++) {
fEntityList = new ArrayList<>();
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY();
FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo = finSelectedReceivablesDetailedVos1.get(i);
//先推送客户
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), finSelectedReceivablesDetailedVo.getCustomerName(), finSelectedReceivablesDetailedVo.getCustomerPhone(), finSelectedReceivablesDetailedVo.getCustomerSid(), sid);
@ -1491,11 +1512,11 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
}
} else {
fEntityList = new ArrayList<>();
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY();
finSelectedReceivablesDetailedVos1.removeAll(Collections.singleton(null));
if (!finSelectedReceivablesDetailedVos1.isEmpty()) {
for (int i = 0; i < finSelectedReceivablesDetailedVos1.size(); i++) {
fEntityList = new ArrayList<>();
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY();
FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo = finSelectedReceivablesDetailedVos1.get(i);
//先推送客户
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), finSelectedReceivablesDetailedVo.getCustomerName(), finSelectedReceivablesDetailedVo.getCustomerPhone(), finSelectedReceivablesDetailedVo.getCustomerSid(), sid);
@ -1620,11 +1641,11 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
}
} else {
fEntityList = new ArrayList<>();
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY();
finSelectedReceivablesDetailedVos2.removeAll(Collections.singleton(null));
if (!finSelectedReceivablesDetailedVos2.isEmpty()) {
for (int i = 0; i < finSelectedReceivablesDetailedVos2.size(); i++) {
fEntityList = new ArrayList<>();
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY();
FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo = finSelectedReceivablesDetailedVos2.get(i);
//先推送客户
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), finSelectedReceivablesDetailedVo.getCustomerName(), finSelectedReceivablesDetailedVo.getCustomerPhone(), finSelectedReceivablesDetailedVo.getCustomerSid(), sid);
@ -1922,6 +1943,17 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
busDeliveredDto.setVinNo(v.getVIN());
busDeliveredDto.setMobile(v.getCustomerPhone());
busDeliveredDto.setPrice(priceInfoVo.getSingleFinalPrice());
SubmitVo intermediary1 = vo.getIntermediary1();
if(intermediary1 != null){
busDeliveredDto.setDistributorName(intermediary1.getIntermediaryName());
busDeliveredDto.setDistributorPrice(intermediary1.getAgencyFee());
}
SubmitVo intermediary2 = vo.getIntermediary2();
if(intermediary2 != null){
busDeliveredDto.setDistributorNameTwo(intermediary2.getIntermediaryName());
busDeliveredDto.setDistributorPriceTwo(intermediary2.getAgencyFee());
}
busDeliveredDto.setSingleCarDiscountPrice(priceInfoVo.getSingleCarDiscountPrice());
//根据客户sid查询客户的身份证号
AppOrderModelInfoVo appOrderModelInfoVo = vo.getModelInfo();
busDeliveredDto.setModelName(appOrderModelInfoVo.getModelName());

146
doc/databases/bus-center_tables.sql

@ -170,26 +170,37 @@ CREATE TABLE `bus_handover_items`
DROP TABLE IF EXISTS `bus_delivered`;
CREATE TABLE `bus_delivered`
(
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`type` INT(32) DEFAULT NULL COMMENT '类型:1车款交清、2欠款提车',
`contractNo` VARCHAR(64) DEFAULT NULL COMMENT '合同编号',
`name` VARCHAR(64) DEFAULT NULL COMMENT '客户名称',
`vinNo` VARCHAR(64) DEFAULT NULL COMMENT '车架号',
`modelName` VARCHAR(200) DEFAULT NULL COMMENT '车型别名',
`mobile` VARCHAR(64) DEFAULT NULL COMMENT '联系电话',
`idNo` VARCHAR(64) DEFAULT NULL COMMENT '证件号码',
`address` VARCHAR(64) DEFAULT NULL COMMENT '联系地址',
`price` VARCHAR(200) DEFAULT NULL COMMENT '成交价',
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`type` INT(32) DEFAULT NULL COMMENT '类型:1车款交清、2欠款提车',
`subscription` VARCHAR(64) DEFAULT NULL COMMENT '业务状态',
`subscriptionKey` VARCHAR(64) DEFAULT NULL COMMENT '业务状态',
`paymentMethod` VARCHAR(64) DEFAULT NULL COMMENT '销售类型',
`paymentMethodKey` VARCHAR(64) DEFAULT NULL COMMENT '销售类型',
`contractNo` VARCHAR(64) DEFAULT NULL COMMENT '合同编号',
`name` VARCHAR(64) DEFAULT NULL COMMENT '客户名称',
`vinNo` VARCHAR(64) DEFAULT NULL COMMENT '车架号',
`modelName` VARCHAR(200) DEFAULT NULL COMMENT '车型别名',
`mobile` VARCHAR(64) DEFAULT NULL COMMENT '联系电话',
`idNo` VARCHAR(64) DEFAULT NULL COMMENT '证件号码',
`address` VARCHAR(64) DEFAULT NULL COMMENT '联系地址',
`price` VARCHAR(200) DEFAULT NULL COMMENT '成交价',
`useOrgSid` VARCHAR(200) DEFAULT NULL COMMENT '分公司sid',
`useOrgName` VARCHAR(200) DEFAULT NULL COMMENT '分公司名称',
`distributorName` VARCHAR(200) DEFAULT NULL COMMENT '返利人1',
`distributorPrice` VARCHAR(200) DEFAULT NULL COMMENT '返利金额1',
`distributorNameTwo` VARCHAR(200) DEFAULT NULL COMMENT '返利人2',
`distributorPriceTwo` VARCHAR(200) DEFAULT NULL COMMENT '返利金额2',
`singleCarDiscountPrice` VARCHAR(200) DEFAULT NULL COMMENT '销售折让',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB
@ -199,24 +210,48 @@ CREATE TABLE `bus_delivered`
DROP TABLE IF EXISTS `bus_delivered_apply`;
CREATE TABLE `bus_delivered_apply`
(
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`contractNo` VARCHAR(64) DEFAULT NULL COMMENT '合同编号',
`applyDate` timestamp null DEFAULT NULL COMMENT '申请日期',
`name` VARCHAR(64) DEFAULT NULL COMMENT '客户名称',
`modelName` VARCHAR(64) DEFAULT NULL COMMENT '车型别名',
`applyName` VARCHAR(64) DEFAULT NULL COMMENT '申请人',
`applySid` VARCHAR(64) DEFAULT NULL COMMENT '申请人sid',
`isTerminal` int(32) DEFAULT NULL COMMENT '是否是终端:1是,0不是',
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`contractNo` VARCHAR(64) DEFAULT NULL COMMENT '合同编号',
`billNo` VARCHAR(64) DEFAULT NULL COMMENT '单据编号',
`name` VARCHAR(64) DEFAULT NULL COMMENT '客户名称',
`modelName` VARCHAR(64) DEFAULT NULL COMMENT '车型别名',
`paymentMethod` VARCHAR(64) DEFAULT NULL COMMENT '销售类型',
`paymentMethodKey` VARCHAR(64) DEFAULT NULL COMMENT '销售类型',
`applyName` VARCHAR(64) DEFAULT NULL COMMENT '申请人',
`applySid` VARCHAR(64) DEFAULT NULL COMMENT '申请人sid',
`useOrgSid` VARCHAR(64) DEFAULT NULL COMMENT '分公司sid',
`type` varchar(64) DEFAULT NULL COMMENT '实际购车人:0订单客户、1贷款人、2其他人',
`mobile` varchar(64) DEFAULT NULL COMMENT '客户手机号',
`nodeState` varchar(64) DEFAULT NULL COMMENT '审核状态',
`procDefId` varchar(64) DEFAULT NULL COMMENT '流程定义id',
`procInstId` varchar(64) DEFAULT NULL COMMENT '流程实例id',
`taskId` varchar(64) DEFAULT NULL COMMENT '任务id',
`taskDefKey` varchar(64) DEFAULT NULL COMMENT '环节id',
`modelSid` varchar(64) DEFAULT NULL COMMENT '车型sid',
`configSid` varchar(64) DEFAULT NULL COMMENT '配置sid',
`applyDeptSid` varchar(64) DEFAULT NULL COMMENT '发起部门sid',
`applyDept` varchar(64) DEFAULT NULL COMMENT '发起部门',
`staffUserSid` varchar(64) DEFAULT NULL COMMENT '销售专员用户sid',
`staffName` varchar(64) DEFAULT NULL COMMENT '销售专员名称',
`staffDeptSid` varchar(64) DEFAULT NULL COMMENT '销售部门sid',
`staffDeptName` varchar(64) DEFAULT NULL COMMENT '销售部门',
`loanName` varchar(64) DEFAULT NULL COMMENT '贷款人',
`loanMobile` varchar(64) DEFAULT NULL COMMENT '贷款人手机号',
`distributorName` VARCHAR(200) DEFAULT NULL COMMENT '返利人1',
`distributorPrice` VARCHAR(200) DEFAULT NULL COMMENT '返利金额1',
`distributorNameTwo` VARCHAR(200) DEFAULT NULL COMMENT '返利人2',
`distributorPriceTwo` VARCHAR(200) DEFAULT NULL COMMENT '返利金额2',
`price` varchar(64) DEFAULT NULL COMMENT '成交价',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB
@ -226,21 +261,23 @@ CREATE TABLE `bus_delivered_apply`
DROP TABLE IF EXISTS `bus_delivered_apply_details`;
CREATE TABLE `bus_delivered_apply_details`
(
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`applySid` VARCHAR(64) DEFAULT NULL COMMENT '出库申请sid',
`vinNo` varchar(64) DEFAULT NULL COMMENT '车架号',
`price` varchar(64) DEFAULT NULL COMMENT '成交价',
`useMessageSid` VARCHAR(64) DEFAULT NULL COMMENT '使用人信息sid',
`id` int(32) NOT NULL AUTO_INCREMENT COMMENT 'id',
`sid` varchar(64) NOT NULL COMMENT 'sid',
`lockVersion` int(32) DEFAULT '0' COMMENT '版本锁',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modifyTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`isEnable` int(32) DEFAULT '1' COMMENT '是否可用:1可用,0不可用',
`state` int(32) DEFAULT '1' COMMENT '状态',
`isDelete` int(32) DEFAULT '0' COMMENT '是否删除:0未删除,1已删除',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注(赠送套餐内容)',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`applySid` VARCHAR(64) DEFAULT NULL COMMENT '出库申请sid',
`vinNo` varchar(64) DEFAULT NULL COMMENT '车架号',
`vinSid` varchar(64) DEFAULT NULL COMMENT '车辆sid',
`useMessageSid` VARCHAR(64) DEFAULT NULL COMMENT '使用人信息sid',
`singleCarDiscountPrice` VARCHAR(200) DEFAULT NULL COMMENT '销售折让',
`discountAll` VARCHAR(200) DEFAULT NULL COMMENT '赠送套餐',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB
@ -260,13 +297,14 @@ CREATE TABLE `bus_delivered_details_discount`
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
`createBySid` varchar(64) DEFAULT NULL COMMENT '创建人sid',
`updateBySid` varchar(64) DEFAULT NULL COMMENT '修改人sid',
`applySid` varchar(64) DEFAULT NULL COMMENT '出库申请sid',
`detailsSid` VARCHAR(64) DEFAULT NULL COMMENT '出库车辆表sid',
`name` varchar(64) DEFAULT NULL COMMENT '优惠包名称',
`price` varchar(64) DEFAULT NULL COMMENT '价值',
`discountExplain` VARCHAR(64) DEFAULT NULL COMMENT '优惠包项目说明',
`num` int(32) DEFAULT NULL COMMENT '数量',
`surplusNum` int(32) DEFAULT NULL COMMENT '剩余数量',
`giveNum` int(32) DEFAULT NULL COMMENT '本次赠送数量',
`discountSid` varchar(32) DEFAULT NULL COMMENT '销售订单中主车优惠sid',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE = INNODB

Loading…
Cancel
Save