Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 2 years ago
parent
commit
89943b712b
  1. 6
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutVoExeclNew.java
  2. 5
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutMapper.xml
  3. 20
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutService.java
  4. 6
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java
  5. 10
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformation.java
  6. 26
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformationDto.java
  7. 9
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformationFeign.java
  8. 6
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformationFeignFallback.java
  9. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandover.java
  10. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDetailsVo.java
  11. 8
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDto.java
  12. 7
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverFeign.java
  13. 5
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverFeignFallback.java
  14. 4
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverVo.java
  15. 2
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsMapper.xml
  16. 43
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java
  17. 4
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformation/BusVehicleInformationMapper.java
  18. 6
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformation/BusVehicleInformationRest.java
  19. 4
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformation/BusVehicleInformationService.java
  20. 4
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverMapper.xml
  21. 5
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverRest.java
  22. 232
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java
  23. 14
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java
  24. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoicePageVo.java
  25. 4
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/vehicleinformationhandover/AppVehicleInformationDto.java
  26. 1
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/advanceInvoice/AppBusAdvanceGinvoiceapplyService.java

6
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutVoExeclNew.java

@ -39,8 +39,10 @@ public class BaseVehicleOutVoExeclNew {
private String staffName;
@ExportEntityMap(CnName = "合同编号", EnName = "concatNo")
private String concatNo;
@ExportEntityMap(CnName = "实际购车人", EnName = "buyerTypeValue")
private String buyerTypeValue;
@ExportEntityMap(CnName = "实际购车人电话", EnName = "realityBuyCarPhone")
private String realityBuyCarPhone;
@ExportEntityMap(CnName = "实际购车人名称", EnName = "realityBuyCarName")
private String realityBuyCarName;
@ExportEntityMap(CnName = "客户名称", EnName = "customerName")
private String customerName;
@ExportEntityMap(CnName = "手机号码", EnName = "mobile")

5
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutMapper.xml

@ -204,13 +204,14 @@
RIGHT(bvo.vinNo,8) AS vinNo,
bv.modelName AS modelConfig,
bv.insideCode,
bvo.type,
bvoa.saleTypeValue as `type`,
bvoa.saleDate,
bvo.price,
bvoa.orgName,
bvoa.staffName,
bvoa.contractNo AS concatNo,
bvoa.buyerTypeValue,
bvo.realityBuyCarPhone,
bvo.realityBuyCarName,
bvoa.customerName,
bvoa.mobile,
bvo.giftsDescription,

20
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutService.java

@ -1818,6 +1818,7 @@ public class BaseVehicleOutService extends MybatisBaseService<BaseVehicleOutMapp
public List<BaseVehicleOutVoExeclNew> listExcelNew(BaseVehicleOutQuery params) {
QueryWrapper<BaseVehicleOutVoExeclNew> qw = new QueryWrapper<>();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(params.getCreateOrgSid()).getData();
if (params != null) {
String orgSidPath = params.getOrgSidPath();
SysOrganizationVo data = sysOrganizationFeign.selectByOrgSidPath(orgSidPath).getData();
@ -1826,7 +1827,7 @@ public class BaseVehicleOutService extends MybatisBaseService<BaseVehicleOutMapp
orgSidPath = orgSidPath.substring(0, 73);
qw.like("so.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
qw.eq("bvo.createOrgSid", params.getCreateOrgSid());
qw.eq("bvoa.createOrgSid", params.getCreateOrgSid());
}
//车架号
if (StringUtils.isNotBlank(params.getVinNo())) {
@ -1834,27 +1835,27 @@ public class BaseVehicleOutService extends MybatisBaseService<BaseVehicleOutMapp
}
//销售类型
if (StringUtils.isNotBlank(params.getTypeKey())) {
qw.eq("bvo.typeKey", params.getTypeKey());
qw.eq("bvoa.saleTypeKey", params.getTypeKey());
}
//销售日期开始-销售日期结束
qw.apply(StringUtils.isNotBlank(params.getSaleDateStart()), "date_format (bvo.saleDate,'%Y-%m-%d') >= date_format('" + params.getSaleDateStart() + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(params.getSaleDateEnd()), "date_format (bvo.saleDate,'%Y-%m-%d') <= date_format('" + params.getSaleDateEnd() + "','%Y-%m-%d')"
qw.apply(StringUtils.isNotBlank(params.getSaleDateStart()), "date_format (bvoa.saleDate,'%Y-%m-%d') >= date_format('" + params.getSaleDateStart() + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(params.getSaleDateEnd()), "date_format (bvoa.saleDate,'%Y-%m-%d') <= date_format('" + params.getSaleDateEnd() + "','%Y-%m-%d')"
);
//合同编号
if (StringUtils.isNotBlank(params.getConcatNo())) {
qw.like("bvo.concatNo", params.getConcatNo());
qw.like("bvoa.contractNo", params.getConcatNo());
}
//客户名称
if (StringUtils.isNotBlank(params.getCustomerName())) {
qw.like("bvo.customerName", params.getCustomerName());
qw.like("bvoa.customerName", params.getCustomerName());
}
//销售部门
if (StringUtils.isNotBlank(params.getOrgDeptSid())) {
qw.eq("bvo.orgSid", params.getOrgDeptSid());
qw.eq("bvoa.orgSid", params.getOrgDeptSid());
}
//销售人员
if (StringUtils.isNotBlank(params.getStaffSid())) {
qw.eq("bvo.staffSid", params.getStaffSid());
qw.eq("bvoa.staffSid", params.getStaffSid());
}
//内部编码
if (StringUtils.isNotBlank(params.getInsideCode())) {
@ -1862,13 +1863,14 @@ public class BaseVehicleOutService extends MybatisBaseService<BaseVehicleOutMapp
}
//分公司
if (StringUtils.isNotBlank(params.getOrgSid())) {
qw.eq("bvo.createOrgSid", params.getOrgSid());
qw.eq("bvoa.createOrgSid", params.getOrgSid());
}
}
List<BaseVehicleOutVoExeclNew> baseVehicleOutVoExeclNews = baseMapper.listExcelNew(qw);
int id = 1;
for (BaseVehicleOutVoExeclNew baseVehicleOutVoExeclNew : baseVehicleOutVoExeclNews) {
baseVehicleOutVoExeclNew.setRankNo(id);
baseVehicleOutVoExeclNew.setCreateOrgName(sysOrganizationVo.getName());
id = id + 1;
}
return baseVehicleOutVoExeclNews;

6
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java

@ -2861,8 +2861,9 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
BusVehicleInformationHandover data = busVehicleInformationHandoverFeign.selectByVehicleSid(vehicleSid).getData();
if (null != data) {
if (StringUtils.isNotBlank(data.getSid())) {
BusVehicleInformation information = busVehicleInformationFeign.getByHandoverSid(data.getSid()).getData();
if (null != information) {
List<BusVehicleInformation> informations = busVehicleInformationFeign.getByHandoverSid(data.getSid()).getData();
if (null != informations) {
for (BusVehicleInformation information : informations) {
// //发票
// if (null != information.getInvoice()) {
// if (information.getInvoice() < 1) {
@ -2951,6 +2952,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
}
}
}
}
if (str.length() > 0) {
str.delete(str.length() - 1, str.length());
record.setVehicleHandoverData(str.toString());

10
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformation.java

@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Administrator
* @description
@ -37,7 +39,13 @@ public class BusVehicleInformation extends BaseEntity {
@ApiModelProperty("随车资料交接表sid")
private String handoverSid; // 随车资料交接表sid
@ApiModelProperty("交接次数")
private Integer handoverNum; // 交接次数
private String handoverNum; // 交接次数
@ApiModelProperty("是否是燃气车 0不是1是")
private Integer isFuelVehicle; // 是否是燃气车 0不是1是
@ApiModelProperty("接收人")
private String recName; // 接收人
@ApiModelProperty("接收时间")
private Date recTime; // 接收时间
@ApiModelProperty("移交人")
private String transferName; // 移交人
}

26
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformationDto.java

@ -4,6 +4,8 @@ import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Administrator
* @description
@ -12,23 +14,29 @@ import lombok.Data;
@Data
public class BusVehicleInformationDto implements Dto {
@ApiModelProperty("车钥匙个数")
private Integer vehicleKeyNum; // 车钥匙个数
private String vehicleKeyNum; // 车钥匙个数
@ApiModelProperty("一致性证书0无1有")
private Integer certificate; // 一致性证书0无1有
private String certificate; // 一致性证书0无1有
@ApiModelProperty("申请表0无1有")
private Integer applyForm; // 申请表0无1有
private String applyForm; // 申请表0无1有
@ApiModelProperty("保修手册、说明书0无1有")
private Integer manual; // 保修手册、说明书0无1有
private String manual; // 保修手册、说明书0无1有
@ApiModelProperty("环保清单0无1有")
private Integer environmentalList; // 环保清单0无1有
private String environmentalList; // 环保清单0无1有
@ApiModelProperty("驾驶员卡0无1有")
private Integer dirverCard; // 驾驶员卡0无1有
private String dirverCard; // 驾驶员卡0无1有
@ApiModelProperty("气瓶产品质量证明书(燃气车)0无1有")
private Integer gasCertificate; // 气瓶产品质量证明书(燃气车)0无1有
private String gasCertificate; // 气瓶产品质量证明书(燃气车)0无1有
@ApiModelProperty("随车资料交接表sid")
private String handoverSid; // 随车资料交接表sid
@ApiModelProperty("交接次数")
private Integer handoverNum; // 交接次数
private String handoverNum; // 交接次数
@ApiModelProperty("是否是燃气车 0不是1是")
private Integer isFuelVehicle; // 是否是燃气车 0不是1是
private String isFuelVehicle; // 是否是燃气车 0不是1是
@ApiModelProperty("接收人")
private String recName; // 接收人
@ApiModelProperty("接收时间")
private Date recTime; // 接收时间
@ApiModelProperty("移交人")
private String transferName; // 移交人
}

9
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformationFeign.java

@ -1,14 +1,13 @@
package com.yxt.anrui.buscenter.api.busvehicleinformation;
import com.yxt.anrui.buscenter.api.busvehicleinformationhandover.*;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author Administrator
* @description
@ -19,13 +18,13 @@ import org.springframework.web.bind.annotation.*;
contextId = "anrui-buscenter-BusVehicleInformation",
name = "anrui-buscenter",
path = "v1/busvehicleinformation",
fallback = BusVehicleInformationHandoverFeignFallback.class)
fallback = BusVehicleInformationFeignFallback.class)
public interface BusVehicleInformationFeign {
@ApiOperation("根据交接表sid查询数据")
@PostMapping("/getByHandoverSid")
@ResponseBody
public ResultBean<BusVehicleInformation> getByHandoverSid(@RequestParam("handoverSid") String handoverSid);
public ResultBean<List<BusVehicleInformation>> getByHandoverSid(@RequestParam("handoverSid") String handoverSid);
}

6
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformationHandoverFeignFallback.java → anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformationFeignFallback.java

@ -2,14 +2,16 @@ package com.yxt.anrui.buscenter.api.busvehicleinformation;
import com.yxt.common.core.result.ResultBean;
import java.util.List;
/**
* @author Administrator
* @description
* @date 2023/5/16 14:15
*/
public class BusVehicleInformationHandoverFeignFallback implements BusVehicleInformationFeign{
public class BusVehicleInformationFeignFallback implements BusVehicleInformationFeign{
@Override
public ResultBean<BusVehicleInformation> getByHandoverSid(String handoverSid) {
public ResultBean<List<BusVehicleInformation>> getByHandoverSid(String handoverSid) {
return null;
}
}

2
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandover.java

@ -35,8 +35,6 @@ public class BusVehicleInformationHandover extends BaseEntity {
private String contractNo; // 合同号
@ApiModelProperty("接收人")
private String recName; // 接收人
@ApiModelProperty("接收日期")
private Date recTime;
@ApiModelProperty("接收人电话")
private String recPhone; // 接收人电话
@ApiModelProperty("分公司sid")

2
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDetailsVo.java

@ -20,6 +20,8 @@ public class BusVehicleInformationHandoverDetailsVo implements Vo {
private String sid;
@ApiModelProperty("车辆sid")
private String vehicleSid; // 车辆sid
@ApiModelProperty("是否是燃气车 0不是1是")
private String isFuelVehicle; // 是否是燃气车 0不是1是
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty("车型")

8
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDto.java

@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @author Administrator
@ -45,12 +46,15 @@ public class BusVehicleInformationHandoverDto implements Dto {
private String useOrgName;
@ApiModelProperty("关联业务sid")
private String busSid;
@ApiModelProperty("接收日期")
private Date recTime;
@ApiModelProperty("随车资料")
private BusVehicleInformationDto busVehicleInformation;
@ApiModelProperty("备注信息")
private String remarks;
@ApiModelProperty("是否是燃气车 0不是1是")
private Integer isFuelVehicle; // 是否是燃气车 0不是1是
@ApiModelProperty("是否完成")
private Boolean complete; // ture/false 完成/未完成
@ApiModelProperty("是否修改状态")
private Boolean modifyState; // ture/false 是/否
}

7
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverFeign.java

@ -32,6 +32,13 @@ public interface BusVehicleInformationHandoverFeign {
@ResponseBody
public ResultBean<String> saveOrUpdate(@RequestBody BusVehicleInformationHandoverDto dto);
@ApiOperation("交车准备中随车资料交接确认修改状态")
@PostMapping("/updateHandoverState")
@ResponseBody
public ResultBean<String> updateHandoverState(@RequestBody BusVehicleInformationHandoverDto dto);
@ApiOperation("根据sid删除记录")
@DeleteMapping("/delBySids")
@ResponseBody

5
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverFeignFallback.java

@ -23,6 +23,11 @@ public class BusVehicleInformationHandoverFeignFallback implements BusVehicleInf
return null;
}
@Override
public ResultBean<String> updateHandoverState(BusVehicleInformationHandoverDto dto) {
return null;
}
@Override
public ResultBean delBySids(String[] sids) {
return null;

4
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverVo.java

@ -19,10 +19,6 @@ public class BusVehicleInformationHandoverVo implements Vo {
private String sid;
@ApiModelProperty("交接状态:0待交接,1已交接")
private String handoverState;
@ApiModelProperty("显示状态 ture待交接,false已交接")
private Boolean showHandoverState;
@ApiModelProperty("显示补充按钮 ture需要补充,false无需补充")
private Boolean showReplenish;
@ApiModelProperty("创建日期")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;

2
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicledetails/BusArrearsCarryVehicleDetailsMapper.xml

@ -35,6 +35,6 @@
</select>
<select id="selectByApplySidOne" resultType="java.lang.String">
select vinNo from bus_arrears_carry_vehicle_details where applySid = #{sid}
select RIGHT(vinNo,8) from bus_arrears_carry_vehicle_details where applySid = #{sid}
</select>
</mapper>

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

@ -62,6 +62,7 @@ import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderDetailsVo;
import com.yxt.anrui.buscenter.api.bussalesorderdiscount.BusSalesOrderDiscount;
import com.yxt.anrui.buscenter.api.bussalesordersubmit.SubmitVo;
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle;
import com.yxt.anrui.buscenter.api.busvehicleinformationhandover.BusVehicleInformationHandoverDto;
import com.yxt.anrui.buscenter.biz.busdelivered.BusDeliveredService;
import com.yxt.anrui.buscenter.biz.busdeliveredapplydetails.BusDeliveredApplyDetailsService;
import com.yxt.anrui.buscenter.biz.busdelivereddetailsdiscount.BusDeliveredDetailsDiscountService;
@ -70,6 +71,7 @@ import com.yxt.anrui.buscenter.biz.busdiscountpackagehandover.BusDiscountpackage
import com.yxt.anrui.buscenter.biz.bussalesorder.BusSalesOrderService;
import com.yxt.anrui.buscenter.biz.bussalesorderdiscount.BusSalesOrderDiscountService;
import com.yxt.anrui.buscenter.biz.bussalesordervehicle.BusSalesOrderVehicleService;
import com.yxt.anrui.buscenter.biz.busvehicleinformationhandover.BusVehicleInformationHandoverService;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
import com.yxt.anrui.fin.api.finbillapplication.FinBillApplicationDto;
@ -180,6 +182,8 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
private BaseMiddlemanFeign baseMiddlemanFeign;
@Autowired
private BaseVehicleOutFeign baseVehicleOutFeign;
@Autowired
private BusVehicleInformationHandoverService busVehicleInformationHandoverService;
/**
* 构造出库申请的查询条件
@ -658,6 +662,9 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
Future future3 = pool.submit(() -> {
pushOutApply(busDeliveredApply, detailsList, orderDetailsVoResultBean.getData(), userVoResultBean.getData());
});
Future future4 = pool.submit(() -> {
pushVehicleInforHandov(busDeliveredApply, detailsList, orderDetailsVoResultBean.getData(), userVoResultBean.getData());
});
} catch (Exception e) {
e.printStackTrace();
log.error("推送数据失败=========================" + e.getMessage());
@ -681,6 +688,42 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
}
}
/**
* 推送随车资料
* @param busDeliveredApply
* @param detailsList
* @param data
* @param data1
*/
private void pushVehicleInforHandov(BusDeliveredApply busDeliveredApply, List<BusDeliveredApplyDetails> detailsList, AppOrderDetailsVo data, SysUserVo data1) {
if(!detailsList.isEmpty()){
for (int i = 0; i < detailsList.size(); i++) {
BusDeliveredApplyDetails busDeliveredApplyDetails = detailsList.get(i);
BusVehicleInformationHandoverDto dto = new BusVehicleInformationHandoverDto();
dto.setBusSid(busDeliveredApplyDetails.getSid());
dto.setCreateBySid(busDeliveredApply.getCreateBySid());
dto.setVinNo(busDeliveredApplyDetails.getVinNo());
dto.setVehicleSid(busDeliveredApplyDetails.getVinSid());
if ("1".equals(busDeliveredApply.getPaymentMethodKey())) {
dto.setCustomerName(busDeliveredApply.getName());
} else {
dto.setCustomerName(busDeliveredApply.getLoanName());
}
dto.setModel(busDeliveredApply.getModelName());
dto.setModelSid(busDeliveredApply.getModelSid());
dto.setContractNo(busDeliveredApply.getContractNo());
dto.setRecName(busDeliveredApply.getStaffName());
dto.setRecPhone(data1.getMobile());
dto.setUseOrgSid(busDeliveredApply.getUseOrgSid());
ResultBean<SysOrganizationVo> organizationVoResultBean = sysOrganizationFeign.fetchBySid(busDeliveredApply.getUseOrgSid());
if (organizationVoResultBean.getData() != null) {
dto.setUseOrgName(organizationVoResultBean.getData().getName());
}
busVehicleInformationHandoverService.saveOrUpdate(dto);
}
}
}
/**
* 出库办理后推送开票
*

4
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformation/BusVehicleInformationMapper.java

@ -5,6 +5,8 @@ import com.yxt.anrui.buscenter.api.busvehicleinformation.BusVehicleInformation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author Administrator
* @description
@ -12,5 +14,5 @@ import org.apache.ibatis.annotations.Param;
*/
@Mapper
public interface BusVehicleInformationMapper extends BaseMapper<BusVehicleInformation> {
BusVehicleInformation getByHandoverSid(@Param("handoverSid") String handoverSid);
List<BusVehicleInformation> getByHandoverSid(@Param("handoverSid") String handoverSid);
}

6
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformation/BusVehicleInformationRest.java

@ -9,6 +9,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author Administrator
* @description
@ -22,9 +24,9 @@ public class BusVehicleInformationRest implements BusVehicleInformationFeign {
private BusVehicleInformationService busVehicleInformationService;
@Override
public ResultBean<BusVehicleInformation> getByHandoverSid(String handoverSid) {
public ResultBean<List<BusVehicleInformation>> getByHandoverSid(String handoverSid) {
ResultBean rb = ResultBean.fireFail();
BusVehicleInformation busVehicleInformation = busVehicleInformationService.getByHandoverSid(handoverSid);
List<BusVehicleInformation> busVehicleInformation = busVehicleInformationService.getByHandoverSid(handoverSid);
return rb.success().setData(busVehicleInformation);
}
}

4
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformation/BusVehicleInformationService.java

@ -4,6 +4,8 @@ import com.yxt.anrui.buscenter.api.busvehicleinformation.BusVehicleInformation;
import com.yxt.common.base.service.MybatisBaseService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author Administrator
* @description
@ -12,7 +14,7 @@ import org.springframework.stereotype.Service;
@Service
public class BusVehicleInformationService extends MybatisBaseService<BusVehicleInformationMapper, BusVehicleInformation> {
public BusVehicleInformation getByHandoverSid(String handoverSid) {
public List<BusVehicleInformation> getByHandoverSid(String handoverSid) {
return baseMapper.getByHandoverSid(handoverSid);
}
}

4
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverMapper.xml

@ -22,7 +22,9 @@
WHEN 0 THEN
'待交接'
WHEN 1 THEN
'已交接'
'未完成'
WHEN 2 THEN
'已完成'
END AS handoverState
FROM
bus_vehicle_information_handover

5
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverRest.java

@ -38,6 +38,11 @@ public class BusVehicleInformationHandoverRest implements BusVehicleInformationH
return busVehicleInformationHandoverService.saveOrUpdate(dto);
}
@Override
public ResultBean<String> updateHandoverState(BusVehicleInformationHandoverDto dto) {
return busVehicleInformationHandoverService.updateHandoverState(dto);
}
@Override
public ResultBean delBySids(String[] sids) {
ResultBean rb = ResultBean.fireFail();

232
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java

@ -43,10 +43,10 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
private BusVehicleInformationService busVehicleInformationService;
@Autowired
private BaseVehicleFeign baseVehicleFeign;
@Autowired
private BaseVehicleModelFeign baseVehicleModelFeign;
/**
* 新增或修改
*
@ -61,39 +61,66 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
BusVehicleInformationHandover entity = fetchBySid(sid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
BusVehicleInformationDto informationDto = dto.getBusVehicleInformation();
if (null != informationDto) {
BusVehicleInformation informationByHandoverSid = busVehicleInformationService.getByHandoverSid(sid);
if (null != informationByHandoverSid) {
BeanUtil.copyProperties(informationDto, informationByHandoverSid, "id", "sid");
informationByHandoverSid.setHandoverSid(sid);
busVehicleInformationService.updateById(informationByHandoverSid);
//判断是不是一次交接还是二次
List<BusVehicleInformation> informations = busVehicleInformationService.getByHandoverSid(sid);
if (null != informations && !informations.isEmpty() && informations.size() < 2) {
for (BusVehicleInformation information : informations) {
BusVehicleInformation twiceInformation = new BusVehicleInformation();
if ("001".equals(information.getHandoverNum())) {
BeanUtil.copyProperties(information, twiceInformation, "id", "sid");
if (null != informationDto.getRecTime()) {
twiceInformation.setRecTime(informationDto.getRecTime());
}
if (null != information.getVehicleKeyNum() && information.getVehicleKeyNum() != 0) {
twiceInformation.setVehicleKeyNum(information.getVehicleKeyNum());
}
if (information.getIsFuelVehicle() == 1) {
twiceInformation.setGasCertificate(1);
} else {
if (null != informationDto.getManual() ||
null != informationDto.getVehicleKeyNum() ||
null != informationDto.getCertificate() ||
null != informationDto.getDirverCard() ||
null != informationDto.getApplyForm() ||
null != informationDto.getEnvironmentalList() ||
null != informationDto.getGasCertificate()
) {
BusVehicleInformation vehicleInformation = new BusVehicleInformation();
BeanUtil.copyProperties(informationDto, vehicleInformation, "id", "sid");
vehicleInformation.setHandoverSid(sid);
vehicleInformation.setCreateBySid(dto.getCreateBySid());
busVehicleInformationService.insert(vehicleInformation);
}
}
}
BusVehicleInformation information = busVehicleInformationService.getByHandoverSid(sid);
if (null != information) {
twiceInformation.setGasCertificate(0);
}
twiceInformation.setCertificate(1);
twiceInformation.setApplyForm(1);
twiceInformation.setManual(1);
twiceInformation.setEnvironmentalList(1);
twiceInformation.setDirverCard(1);
twiceInformation.setHandoverNum("002");
busVehicleInformationService.insert(twiceInformation);
}
}
} else if (informations.size() != 2) {
//一次交接
BusVehicleInformation newInformation = new BusVehicleInformation();
BeanUtil.copyProperties(informationDto, newInformation, "id", "sid");
newInformation.setHandoverNum("001");
newInformation.setRecName(dto.getRecName());
newInformation.setHandoverSid(sid);
if (null != fetchBySid(sid).getIsFuelVehicle()) {
newInformation.setIsFuelVehicle(fetchBySid(sid).getIsFuelVehicle());
}
busVehicleInformationService.insert(newInformation);
}
List<BusVehicleInformation> informationList = busVehicleInformationService.getByHandoverSid(sid);
if (null != informationList) {
entity.setHandoverState(1);
entity.setRecTime(new Date());
}
baseMapper.updateById(entity);
return rb.success().setData(sid);
} else {
BusVehicleInformationHandover entity = new BusVehicleInformationHandover();
BeanUtil.copyProperties(dto, entity, "id", "sid");
if (StringUtils.isNotBlank(dto.getModelSid())) {
BaseVehicleModel model = baseVehicleModelFeign.selectDetails(dto.getModelSid()).getData();
if (null != model) {
if (StringUtils.isNotBlank(model.getFuelType())) {
if ("004".equals(model.getFuelType()) || "04".equals(model.getFuelType())) {
entity.setIsFuelVehicle(0);
} else {
entity.setIsFuelVehicle(1);
}
}
}
}
baseMapper.insert(entity);
return rb.success().setData(entity.getSid());
}
@ -116,7 +143,11 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
qw.and(wrapper -> wrapper.like("contractNo", query.getName()).or().like("vinNo", query.getName()).or().like("customerName", query.getName()));
}
if (StringUtils.isNotBlank(query.getHandoverState())) {
qw.eq("handoverState", query.getHandoverState());
if ("0".equals(query.getHandoverState())) {
qw.eq("handoverState", 0);
} else {
qw.ne("handoverState", 0);
}
}
qw.eq("useOrgSid", query.getUseOrgSid());
qw.eq("isDelete", 0);
@ -136,90 +167,6 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
QueryWrapper<BusVehicleInformationHandover> qw = createQueryWrapper(query);
IPage<BusVehicleInformationHandover> page = PagerUtil.queryToPage(pq);
IPage<BusVehicleInformationHandoverVo> pagging = baseMapper.selectPageVo(page, qw);
List<BusVehicleInformationHandoverVo> records = pagging.getRecords();
if (null != records) {
for (BusVehicleInformationHandoverVo vo : records) {
if (null != vo) {
if (StringUtils.isNotBlank(vo.getHandoverState())) {
if ("待交接".equals(vo.getHandoverState())) {
vo.setShowHandoverState(true);
} else if ("已交接".equals(vo.getHandoverState())) {
vo.setShowReplenish(false);
}
if ("已交接".equals(vo.getHandoverState())) {
vo.setShowHandoverState(false);
//得到sid 查询随车资料
BusVehicleInformation information = busVehicleInformationService.getByHandoverSid(vo.getSid());
if (null != information) {
if (information.getCertificate() != null &&
information.getApplyForm() != null &&
information.getDirverCard() != null &&
information.getEnvironmentalList() != null &&
information.getManual() != null &&
information.getVehicleKeyNum() != null) {
if (information.getCertificate() != 1 ||
information.getApplyForm() != 1 ||
information.getDirverCard() != 1 ||
information.getEnvironmentalList() != 1 ||
information.getManual() != 1 ||
information.getVehicleKeyNum() < 1) {
vo.setShowReplenish(true);
} else {
if (null != information.getGasCertificate()) {
if (information.getGasCertificate() != 1) {
//判断是否为燃气车 通过车辆sid查询
if (StringUtils.isNotBlank(vo.getVehicleSid())) {
String vehicleSid = vo.getVehicleSid();
BaseVehicleSelectVo vehicleVo = baseVehicleFeign.details(vehicleSid).getData();
if (null != vehicleVo) {
if (StringUtils.isNotBlank(vehicleVo.getModelSid())) {
BaseVehicleModel model = baseVehicleModelFeign.selectDetails(vehicleVo.getModelSid()).getData();
if (null != model) {
if (StringUtils.isNotBlank(model.getFuelType())) {
if ("04".equals(model.getFuelType())) {
vo.setShowReplenish(false);
} else if ("002".equals(model.getFuelType())) {
vo.setShowReplenish(true);
}
}
}
}
}
}
} else {
vo.setShowReplenish(false);
}
} else {
//判断是否为燃气车 通过车架号查询
if (StringUtils.isNotBlank(vo.getVehicleSid())) {
String vehicleSid = vo.getVehicleSid();
BaseVehicleSelectVo vehicleVo = baseVehicleFeign.details(vehicleSid).getData();
if (null != vehicleVo) {
if (StringUtils.isNotBlank(vehicleVo.getModelSid())) {
BaseVehicleModel model = baseVehicleModelFeign.selectDetails(vehicleVo.getModelSid()).getData();
if (null != model) {
if (StringUtils.isNotBlank(model.getFuelType())) {
if ("04".equals(model.getFuelType())) {
vo.setShowReplenish(false);
} else if ("002".equals(model.getFuelType())) {
vo.setShowReplenish(true);
}
}
}
}
}
}
}
}
} else {
vo.setShowReplenish(true);
}
}
}
}
}
}
}
PagerVo<BusVehicleInformationHandoverVo> p = PagerUtil.pageToVo(pagging, null);
return rb.success().setData(p);
}
@ -236,8 +183,10 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
BusVehicleInformationHandoverDetailsVo vo = new BusVehicleInformationHandoverDetailsVo();
BeanUtil.copyProperties(informationHandover, vo, "id", "sid");
vo.setSid(sid);
BusVehicleInformation informationServiceByHandoverSid = busVehicleInformationService.getByHandoverSid(sid);
if (null != informationServiceByHandoverSid) {
List<BusVehicleInformation> busVehicleInformations = busVehicleInformationService.getByHandoverSid(sid);
if (null != busVehicleInformations) {
for (BusVehicleInformation informationServiceByHandoverSid : busVehicleInformations) {
BusVehicleInformationVo informationVo = new BusVehicleInformationVo();
BeanUtil.copyProperties(informationServiceByHandoverSid, informationVo, "id", "sid");
if (null == informationServiceByHandoverSid.getApplyForm()) {
@ -262,6 +211,7 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
informationVo.setGasCertificate("");
}
vo.setBusVehicleInformation(informationVo);
}
} else {
BusVehicleInformationVo informationVo = new BusVehicleInformationVo();
informationVo.setApplyForm("");
@ -277,13 +227,13 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
}
public void delAllBySids(String[] sids) {
for (String sid : sids) {
deleteBySid(sid);
BusVehicleInformation vehicleInformation = busVehicleInformationService.getByHandoverSid(sid);
if (null != vehicleInformation) {
busVehicleInformationService.deleteBySid(vehicleInformation.getSid());
}
}
// for (String sid : sids) {
// deleteBySid(sid);
// BusVehicleInformation vehicleInformation = busVehicleInformationService.getByHandoverSid(sid);
// if (null != vehicleInformation) {
// busVehicleInformationService.deleteBySid(vehicleInformation.getSid());
// }
// }
}
@ -292,4 +242,46 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
BusVehicleInformationHandover busVehicleInformationHandover = baseMapper.selectByVehicleSid(vehicleSid);
return rb.success().setData(busVehicleInformationHandover);
}
/**
* 交车准备随车资料交接确认修改状态
*
* @param dto
* @return
*/
public ResultBean<String> updateHandoverState(BusVehicleInformationHandoverDto dto) {
ResultBean rb = ResultBean.fireFail();
BusVehicleInformationHandover entity = fetchBySid(dto.getSid());
List<BusVehicleInformation> informationList = busVehicleInformationService.getByHandoverSid(dto.getSid());
if (null != informationList) {
for (BusVehicleInformation busVehicleInformation : informationList) {
if ("001".equals(busVehicleInformation.getHandoverNum())) {
if (busVehicleInformation.getVehicleKeyNum() < 1
|| busVehicleInformation.getCertificate() < 1
|| busVehicleInformation.getApplyForm() < 1
|| busVehicleInformation.getManual() < 1
|| busVehicleInformation.getEnvironmentalList() < 1
|| busVehicleInformation.getDirverCard() < 1
) {
entity.setHandoverState(1);
} else {
if (busVehicleInformation.getGasCertificate() < 1) {
if (busVehicleInformation.getIsFuelVehicle() == 0) {
entity.setHandoverState(2);
} else {
entity.setHandoverState(1);
}
} else {
entity.setHandoverState(2);
}
}
}
if ("002".equals(busVehicleInformation.getHandoverNum())) {
entity.setHandoverState(2);
}
}
}
baseMapper.updateById(entity);
return rb.success().setData(dto.getSid());
}
}

14
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java

@ -238,7 +238,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
List<FinBillVehicleVo> finBillVehicleVos = finBillVehicleService.fetchByMainSid(sid);
String vinNos = "";
for (FinBillVehicleVo finBillVehicleVo : finBillVehicleVos) {
String vinNo = finBillVehicleVo.getVinNo();
String vinNo = finBillVehicleVo.getVinNo().substring(finBillVehicleVo.getVinNo().length() - 8);
vinNos = vinNos + vinNo + ",";
}
record.setVinNo(vinNos.substring(0, vinNos.lastIndexOf(",")));
@ -864,7 +864,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
for (FinBillApplicationDetailsVo finBillApplicationDetailsVo : finBillApplicationDetailsVos) {
String nodeState = finBillApplicationDetailsVo.getNodeState();
if (!"待提交".equals(nodeState) && !"已办结".equals(nodeState) && !"终止".equals(nodeState) && !"发起申请".equals(nodeState)) {
return rb.setMsg("该合同已有开票/欠款开票/欠款领票申请正在审批中,不可提交");
return rb.setMsg("该合同已有开票/欠款开票申请正在审批中,不可提交");
}
}
}
@ -1708,7 +1708,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
for (FinBillApplicationDetailsVo finBillApplicationDetailsVo : finBillApplicationDetailsVos) {
String nodeState = finBillApplicationDetailsVo.getNodeState();
if (!"待提交".equals(nodeState) && !"已办结".equals(nodeState) && !"终止".equals(nodeState) && !"发起申请".equals(nodeState)) {
return rb.setMsg("该合同已有开票/欠款开票/欠款领票申请正在审批中,不可提交");
return rb.setMsg("该合同已有开票/欠款开票申请正在审批中,不可提交");
}
}
}
@ -2224,7 +2224,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
List<FinBillVehicleVo> finBillVehicleVos = finBillVehicleService.fetchByMainSid(sid);
String vinNos = "";
for (FinBillVehicleVo finBillVehicleVo : finBillVehicleVos) {
String vinNo = finBillVehicleVo.getVinNo();
String vinNo = finBillVehicleVo.getVinNo().substring(finBillVehicleVo.getVinNo().length() - 8);;
vinNos = vinNos + vinNo + ",";
}
record.setVinNo(vinNos.substring(0, vinNos.lastIndexOf(",")));
@ -2288,7 +2288,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
List<FinBillVehicleVo> finBillVehicleVos = finBillVehicleService.fetchByMainSid(sid);
String vinNos = "";
for (FinBillVehicleVo finBillVehicleVo : finBillVehicleVos) {
String vinNo = finBillVehicleVo.getVinNo();
String vinNo = finBillVehicleVo.getVinNo().substring(finBillVehicleVo.getVinNo().length() - 8);;
vinNos = vinNos + vinNo + ",";
}
record.setVinNo(vinNos.substring(0, vinNos.lastIndexOf(",")));
@ -2396,7 +2396,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
public ResultBean submitFinBillApplicationQKLP(SubmitFinBillApplicationDto dto) {
ResultBean rb = ResultBean.fireFail();
String contractNo = dto.getContractNo();
List<FinBillApplicationDetailsVo> finBillApplicationDetailsVos = baseMapper.selectByContractNo(contractNo);
/*List<FinBillApplicationDetailsVo> finBillApplicationDetailsVos = baseMapper.selectByContractNo(contractNo);
if (finBillApplicationDetailsVos != null) {
for (FinBillApplicationDetailsVo finBillApplicationDetailsVo : finBillApplicationDetailsVos) {
String nodeState = finBillApplicationDetailsVo.getNodeState();
@ -2404,7 +2404,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
return rb.setMsg("该合同已有开票/欠款开票/欠款领票申请正在审批中,不可提交");
}
}
}
}*/
//用户的组织全路径
String orgSidPath = "";
if (StringUtils.isNotBlank(dto.getOrgSidPath())) {

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/advanceInvoice/AdvanceInvoicePageVo.java

@ -41,4 +41,6 @@ public class AdvanceInvoicePageVo implements Vo {
private String type;
@ApiModelProperty("车架号(拼接)")
private String vinNo;
@ApiModelProperty("是否领取发票原件")
private String isLQOrigInvoice;
}

4
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/vehicleinformationhandover/AppVehicleInformationDto.java

@ -31,4 +31,8 @@ public class AppVehicleInformationDto implements Dto {
private Integer gasCertificate; // 气瓶产品质量证明书(燃气车)0无1有
@ApiModelProperty("随车资料交接表sid")
private String handoverSid; // 随车资料交接表sid
@ApiModelProperty("交接次数")
private Integer handoverNum; // 交接次数
@ApiModelProperty("是否是燃气车 0不是1是")
private Integer isFuelVehicle; // 是否是燃气车 0不是1是
}

1
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/advanceInvoice/AppBusAdvanceGinvoiceapplyService.java

@ -130,6 +130,7 @@ public class AppBusAdvanceGinvoiceapplyService {
advanceInvoicePageVo.setType(record.getSaleTypeValue());
advanceInvoicePageVo.setContractType(record.getNodeState());
advanceInvoicePageVo.setVinNo(record.getVinNo());
advanceInvoicePageVo.setIsLQOrigInvoice(record.getIsLQOrigInvoice());
if (record.getNodeState().equals("待提交")) {
advanceInvoicePageVo.setShowUpdateBtn(true);
advanceInvoicePageVo.setShowDeleteBtn(true);

Loading…
Cancel
Save