Browse Source

Merge remote-tracking branch 'origin/master'

master
fanzongzhe 2 years ago
parent
commit
2f386cc007
  1. 1
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyVo.java
  2. 29
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivered/BusDeliveredService.java
  3. 1
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyMapper.xml
  4. 34
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java
  5. 2
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesordervehicle/BusSalesOrderVehicleMapper.xml
  6. 2
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvalcustfiling/BusValcustFilingService.java
  7. 2
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqing.vue
  8. 10
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingAdd.vue
  9. 10
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingInfo.vue
  10. 10
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuDaiBanInfo.vue
  11. 10
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuEdit.vue
  12. 10
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuYiBanInfo.vue
  13. 4
      anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/finginvoiceapply/backups/finginvoiceapplyAdd.vue
  14. 4
      anrui-buscenter/anrui-finmanage-ui/src/views/workFlow/kaipiaoguanliFlow/finginvoiceapplyEdit.vue
  15. 4
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/PcSelBillVinNoQuery.java
  16. 18
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java
  17. 2
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillvehicle/FinBillVehicleMapper.java
  18. 11
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillvehicle/FinBillVehicleMapper.xml
  19. 4
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillvehicle/FinBillVehicleService.java
  20. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/invoiced/InvoicedFeign.java
  21. 6
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/invoiced/SelBillVinNoPageVo.java
  22. 77
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/invoiced/InvoicedService.java

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

@ -56,6 +56,7 @@ public class BusDeliveredApplyVo implements Vo {
private String billNo;
@ApiModelProperty("销售类型")
private String paymentMethod;
private String paymentMethodKey;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("客户名称")

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

@ -565,6 +565,8 @@ public class BusDeliveredService extends MybatisBaseService<BusDeliveredMapper,
if (!detailsList.isEmpty()) {
for (int i = 0; i < detailsList.size(); i++) {
BusDeliveredApplyDetails busDeliveredApplyDetails = detailsList.get(i);
//根据合同编号和车辆sid查询销售订单的车辆信息
BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleService.selectByNoAndVinSid(busDeliveredApply.getContractNo(), busDeliveredApplyDetails.getVinSid());
AppCarListVo appCarListVo = new AppCarListVo();
appCarListVo.setDiscount(busDeliveredApplyDetails.getSingleCarDiscountPrice());
appCarListVo.setVinSid(busDeliveredApplyDetails.getVinSid());
@ -615,6 +617,33 @@ public class BusDeliveredService extends MybatisBaseService<BusDeliveredMapper,
realBuyer.setVin(busDeliveredApplyDetails.getVinNo());
appCarListVo.setRealBuyer(realBuyer);
//===============================添加资料是否齐全和资方放款是否审核
BusSalesOrder busSalesOrder = busSalesOrderService.fetchBySid(busSalesOrderVehicle.getSalesOrderSid());
if(busSalesOrder != null && "2".equals(busSalesOrder.getPayTypeKey())){
String saleOrderSid = busSalesOrderVehicle.getSalesOrderSid();
String loanContractSid = busSalesOrderVehicle.getLoanContractSid();
//根据消贷合同和销售订单查询
ResultBean<LoanFileexamine> loanFileexamineResultBean = loanFileexamineFeign.selectOrderSidAndContract(saleOrderSid,loanContractSid);
if(!loanFileexamineResultBean.getSuccess()){
appCarListVo.setBankStateValue("未审核");
appCarListVo.setZlStateValue("否");
}else{
LoanFileexamine loanFileexamine = loanFileexamineResultBean.getData();
if("1".equals(loanFileexamine.getZlState())){
appCarListVo.setZlStateValue("是");
appCarListVo.setZlState(loanFileexamine.getZlState());
}else{
appCarListVo.setZlStateValue("否");
appCarListVo.setZlState(loanFileexamine.getZlState());
}
if(StringUtils.isBlank(loanFileexamine.getBankStateValue())){
appCarListVo.setBankStateValue("未审核");
}else{
appCarListVo.setBankStateValue(loanFileexamine.getBankStateValue());
appCarListVo.setBankStateKey(loanFileexamine.getBankStateKey());
}
}
}
carList.add(appCarListVo);
}
}

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

@ -16,6 +16,7 @@
bd.modelName,
bd.billNo,
bd.paymentMethod,
bd.paymentMethodKey,
bd.createBySid,
(select count(*) from bus_delivered_apply_details bad where bad.applySid = bd.sid) as num
FROM bus_delivered_apply bd

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

@ -141,6 +141,8 @@ import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.portal.api.sysuser.UserQuery;
import com.yxt.anrui.riskcenter.api.loanfileexamine.LoanFileexamine;
import com.yxt.anrui.riskcenter.api.loanfileexamine.LoanFileexamineFeign;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterFeign;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsFeign;
import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDetailsVo;
@ -258,6 +260,8 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
private BusValcustFilingService busValcustFilingService;
@Autowired
private BusArrearsCarryVehicleApplyService busArrearsCarryVehicleApplyService;
@Autowired
private LoanFileexamineFeign loanFileexamineFeign;
/**
@ -2579,6 +2583,8 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
if (!detailsList.isEmpty()) {
for (int i = 0; i < detailsList.size(); i++) {
BusDeliveredApplyDetails busDeliveredApplyDetails = detailsList.get(i);
//根据合同编号和车辆sid查询销售订单的车辆信息
BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleService.selectByNoAndVinSid(busDeliveredApply.getContractNo(), busDeliveredApplyDetails.getVinSid());
AppCarListVo appCarListVo = new AppCarListVo();
appCarListVo.setDiscount(busDeliveredApplyDetails.getSingleCarDiscountPrice());
appCarListVo.setVinSid(busDeliveredApplyDetails.getVinSid());
@ -2615,6 +2621,34 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
BeanUtil.copyProperties(busDeliveredUseMessage, realBuyer);
realBuyer.setVin(busDeliveredApplyDetails.getVinNo());
appCarListVo.setRealBuyer(realBuyer);
//===============================添加资料是否齐全和资方放款是否审核
BusSalesOrder busSalesOrder = busSalesOrderService.fetchBySid(busSalesOrderVehicle.getSalesOrderSid());
if(busSalesOrder != null && "2".equals(busSalesOrder.getPayTypeKey())){
String saleOrderSid = busSalesOrderVehicle.getSalesOrderSid();
String loanContractSid = busSalesOrderVehicle.getLoanContractSid();
//根据消贷合同和销售订单查询
ResultBean<LoanFileexamine> loanFileexamineResultBean = loanFileexamineFeign.selectOrderSidAndContract(saleOrderSid,loanContractSid);
if(!loanFileexamineResultBean.getSuccess()){
appCarListVo.setBankStateValue("未审核");
appCarListVo.setZlStateValue("否");
}else{
LoanFileexamine loanFileexamine = loanFileexamineResultBean.getData();
if("1".equals(loanFileexamine.getZlState())){
appCarListVo.setZlStateValue("是");
appCarListVo.setZlState(loanFileexamine.getZlState());
}else{
appCarListVo.setZlStateValue("否");
appCarListVo.setZlState(loanFileexamine.getZlState());
}
if(StringUtils.isBlank(loanFileexamine.getBankStateValue())){
appCarListVo.setBankStateValue("未审核");
}else{
appCarListVo.setBankStateValue(loanFileexamine.getBankStateValue());
appCarListVo.setBankStateKey(loanFileexamine.getBankStateKey());
}
}
}
carList.add(appCarListVo);
}
}

2
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesordervehicle/BusSalesOrderVehicleMapper.xml

@ -114,7 +114,7 @@
<select id="selectByNoAndVinSidsNew"
resultType="com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle">
select bv.linkSid, bv.sid, bv.linkNo
select bv.linkSid, bv.sid, bv.linkNo,bv.salesOrderSid
from (select busSid
from anrui_base.base_vehicle_state
where busState = '401'

2
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvalcustfiling/BusValcustFilingService.java

@ -345,6 +345,7 @@ public class BusValcustFilingService extends MybatisBaseService<BusValcustFiling
return rb.setMsg(resultBean.getMsg());
}
String businessSid = resultBean.getData();
busValcustFiling = fetchBySid(businessSid);
//创建BusinessVariables实体对象
BusinessVariables bv = new BusinessVariables();
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
@ -363,7 +364,6 @@ public class BusValcustFilingService extends MybatisBaseService<BusValcustFiling
//流程定义id
bv.setModelId(ProcDefEnum.BUSVALCUSTFILING.getProDefId());
//========================================
busValcustFiling = fetchBySid(businessSid);
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);

2
anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqing.vue

@ -63,7 +63,7 @@
</el-table-column>
<el-table-column label="销售类型" align="center">
<template slot-scope="scope">
<span class="bluezi" v-if="scope.row.paymentMethod === '担保贷款'" @click="lookQuotation(scope.row)">{{ scope.row.paymentMethod }}</span>
<span class="bluezi" v-if="scope.row.paymentMethodKey == '2'" @click="lookQuotation(scope.row)">{{ scope.row.paymentMethod }}</span>
<span v-else>{{ scope.row.paymentMethod }}</span>
</template>
</el-table-column>

10
anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingAdd.vue

@ -176,6 +176,16 @@
<span>{{ remarks(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.zlStateValue }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.bankStateValue }}</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">

10
anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingInfo.vue

@ -146,6 +146,16 @@
<span>{{ remarks(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.zlStateValue }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.bankStateValue }}</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">

10
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuDaiBanInfo.vue

@ -151,6 +151,16 @@
<span>{{ remarks(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.zlStateValue }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.bankStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="款、票情况" align="center" width="200">
<template slot-scope="scope">
<span class="bluezi" @click="lookPayment(scope.row)">查看</span>

10
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuEdit.vue

@ -175,6 +175,16 @@
<span>{{ remarks(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.zlStateValue }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.bankStateValue }}</span>
</template>
</el-table-column>
</el-table>
<el-row>
<el-col :span="24">

10
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuYiBanInfo.vue

@ -149,6 +149,16 @@
<span>{{ remarks(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.zlStateValue }}</span>
</template>
</el-table-column>
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.realBuyer.bankStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="款、票情况" align="center" width="200">
<template slot-scope="scope">
<span class="bluezi" @click="lookPayment(scope.row)">查看</span>

4
anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/finginvoiceapply/backups/finginvoiceapplyAdd.vue

@ -6,7 +6,7 @@
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" v-if="formobj.saleTypeValue !== '全款(含非担保贷款)'" @click="handleChoose()">选择车辆</el-button>
<el-button type="primary" size="small" v-if="formobj.saleTypeKey == '' || formobj.saleTypeKey == '2'" @click="handleChoose()">选择车辆</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSave()">保存
</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSubmit()">提交
@ -92,7 +92,7 @@
</el-row>
<el-table :key="tableKey" :data="formobj.finBillVehicles" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column v-if="formobj.saleTypeValue !== '全款(含非担保贷款)'" label="车架号" align="center">
<el-table-column v-if="formobj.saleTypeKey == '2'" label="车架号" align="center">
<template slot-scope="scope">
<el-button type="danger" size="mini" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
</template>

4
anrui-buscenter/anrui-finmanage-ui/src/views/workFlow/kaipiaoguanliFlow/finginvoiceapplyEdit.vue

@ -6,7 +6,7 @@
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" v-if="formobj.saleTypeValue !== '全款(含非担保贷款)'" @click="handleChoose()">选择车辆</el-button>
<el-button type="primary" size="small" v-if="formobj.saleTypeKey == '' || formobj.saleTypeKey == '2'" @click="handleChoose()">选择车辆</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSave()">保存
</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSubmit()">提交
@ -91,7 +91,7 @@
</el-row>
<el-table :key="tableKey" :data="formobj.finBillVehicles" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column v-if="formobj.saleTypeValue !== '全款(含非担保贷款)'" label="车架号" align="center">
<el-table-column v-if="formobj.saleTypeKey == ''" label="车架号" align="center">
<template slot-scope="scope">
<el-button type="danger" size="mini" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
</template>

4
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/PcSelBillVinNoQuery.java

@ -54,8 +54,10 @@ public class PcSelBillVinNoQuery implements Query {
private String orgPath;
@ApiModelProperty("合同号")
private String contractId;
@ApiModelProperty("已选车架号")
@ApiModelProperty("已选车辆sid")
private List<String> vins;
@ApiModelProperty("已选车架号")
private List<String> vinNos;
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("车架号")

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

@ -405,11 +405,15 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
qw.eq("bo.customerName", query.getName());
}
if (StringUtils.isNotBlank(query.getVinNo())) {
qw.eq("bv.linkNo", query.getVinNo());
}
if (query.getVins() != null && query.getVins().size() > 0) {
qw.notIn("bv.linkSid", query.getVins());
}
if (query.getVinNos() != null && query.getVinNos().size() > 0) {
qw.notIn("bv.linkNo", query.getVinNos());
}
//移动端条件
if (StringUtils.isNotBlank(query.getName())) {
qw.and(wrapper -> wrapper.like("bo.contractNo", query.getName()).or().like("bo.customerName", query.getName()));
@ -1275,6 +1279,14 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
}
}
}
//判断车辆是否发起过开票申请
List<FinBillVehicleDto> finBillVehicles = dto.getFinBillVehicles();
for (FinBillVehicleDto finBillVehicle : finBillVehicles) {
int i = finBillVehicleService.checkIsKp(contractNo, finBillVehicle.getVehSid());
if (i > 0){
return rb.setMsg(finBillVehicle.getVinNo() + "已发起过开票申请");
}
}
//用户的组织全路径
String orgSidPath = "";
if (StringUtils.isNotBlank(dto.getOrgSidPath())) {
@ -2420,8 +2432,10 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
finVehicleInvoiceDto.setTaxpayerNo(finCompanyInvoicingDetailsVo.getTaxpayerNo());
} else {
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.fetchSid(finBillVehicleVo.getOpenTickSid()).getData();
finVehicleInvoiceDto.setTelPhone(crmCustomerTempVo.getMobile());
finVehicleInvoiceDto.setTaxpayerNo(crmCustomerTempVo.getIDNumber());
if (crmCustomerTempVo != null){
finVehicleInvoiceDto.setTelPhone(crmCustomerTempVo.getMobile());
finVehicleInvoiceDto.setTaxpayerNo(crmCustomerTempVo.getIDNumber());
}
}
finVehicleInvoiceDto.setIsTakeTicket(finBillApplication.getIsLQOrigInvoice());
finVehicleInvoiceService.mySave(finVehicleInvoiceDto);

2
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillvehicle/FinBillVehicleMapper.java

@ -83,4 +83,6 @@ public interface FinBillVehicleMapper extends BaseMapper<FinBillVehicle> {
List<FinBillVehicleVo> fetchByMainSid(String sid);
List<String> fetchByUseOrgSid(@Param(Constants.WRAPPER) Wrapper<FinBillVehicle> qw);
int checkIsKp(@Param("contractNo") String contractNo,@Param("vehSid") String vehSid);
}

11
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillvehicle/FinBillVehicleMapper.xml

@ -45,4 +45,15 @@
AND fba.`nodeState` != "待提交"
AND fba.`nodeState` != "终止"
</select>
<select id="checkIsKp" resultType="int">
SELECT COUNT(*)
FROM fin_bill_vehicle fv
JOIN fin_bill_application fa
ON fv.`billAppSid` = fa.`sid`
WHERE fa.`contractNo` = #{contractNo}
AND fv.`vehSid` = #{vehSid}
AND fa.`nodeState` != '待提交'
AND fv.`isDelete` = 0
</select>
</mapper>

4
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillvehicle/FinBillVehicleService.java

@ -161,4 +161,8 @@ public class FinBillVehicleService extends MybatisBaseService<FinBillVehicleMapp
qw.ne("fba.nodeState","终止");
return baseMapper.fetchByUseOrgSid(qw);
}
public int checkIsKp(String contractNo, String vehSid) {
return baseMapper.checkIsKp(contractNo,vehSid);
}
}

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/invoiced/InvoicedFeign.java

@ -29,7 +29,7 @@ public interface InvoicedFeign {
public ResultBean<PagerVo<BillApplicationPageVo>> getInvoicedApplyList(@RequestBody PagerQuery<BillApplicationPageQuery> pagerQuery);
@ApiOperation("手机端-删除开票申请")
@GetMapping("/deleteInvoice")
@DeleteMapping("/deleteInvoice")
@ResponseBody
public ResultBean deleteInvoice(@RequestParam("sid") String sid);

6
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/invoiced/SelBillVinNoPageVo.java

@ -24,6 +24,12 @@ public class SelBillVinNoPageVo implements Vo {
private String invoicingUnit;
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("单台开票金额")
private String invoiceMoney;
@ApiModelProperty("车型sid")
private String modelSid;
@ApiModelProperty("车型名称")
private String modelName;
@ApiModelProperty("主车信息")
private List<SelBillZcVo> cars;

77
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/invoiced/InvoicedService.java

@ -50,6 +50,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
/**
@ -128,32 +129,71 @@ public class InvoicedService {
public ResultBean<PagerVo<SelBillVinNoPageVo>> getSelectVinsList(PagerQuery<SelBillVinNoQuery> pagerQuery) {
ResultBean<PagerVo<SelBillVinNoPageVo>> rb = ResultBean.fireFail();
SelBillVinNoQuery params = pagerQuery.getParams();
FinBillApplicationQuery finBillApplicationQuery = new FinBillApplicationQuery();
finBillApplicationQuery.setCreateBySid(params.getUserSid());
finBillApplicationQuery.setName(params.getName());
finBillApplicationQuery.setOrgPath(params.getOrgPath());
//finBillApplicationQuery.setType(params.getType());
//finBillApplicationQuery.setMenuSid(params.getMenuSid());
PagerQuery<FinBillApplicationQuery> pcq = new PagerQuery<>();
pcq.setParams(finBillApplicationQuery);
ResultBean<PagerVo<FinBillApplicationVo>> resultBean = finBillApplicationFeign.listPage(pcq);
List<FinBillApplicationVo> records = resultBean.getData().getRecords();
List<SelBillVinNoPageVo> billApplicationPageVos = new ArrayList<>();
PcSelBillVinNoQuery pcSelBillVinNoQuery = new PcSelBillVinNoQuery();
pcSelBillVinNoQuery.setUserSid(params.getUserSid());
pcSelBillVinNoQuery.setName(params.getName());
pcSelBillVinNoQuery.setOrgPath(params.getOrgPath());
pcSelBillVinNoQuery.setContractId(params.getContractId());
pcSelBillVinNoQuery.setVinNos(params.getVins());
PagerQuery<PcSelBillVinNoQuery> pcq = new PagerQuery<>();
pcq.setParams(pcSelBillVinNoQuery);
PagerVo<PcSelBillVinNoPageVo> data = finBillApplicationFeign.getSelectVinsList(pcq).getData();
List<SelBillVinNoPageVo> selBillVinNoPageVos = new ArrayList<>();
List<SelBillZcVo> selBillZcVos = new ArrayList<>();
PagerVo<SelBillVinNoPageVo> v = new PagerVo<>();
v.setRecords(billApplicationPageVos);
for (PcSelBillVinNoPageVo record : data.getRecords()) {
//第一层
SelBillVinNoPageVo selBillVinNoPageVo = new SelBillVinNoPageVo();
if (selBillVinNoPageVos.stream().
filter(item -> item.getContractId().
equals(record.getContractId())).findAny().
isPresent()) {
} else {
selBillZcVos = new ArrayList<>();
BeanUtil.copyProperties(record, selBillVinNoPageVo);
selBillVinNoPageVo.setInvoiceMoney(record.getKpMoney());
selBillVinNoPageVos.add(selBillVinNoPageVo);
}
//第二层
if (selBillVinNoPageVos.stream().
filter(item -> item.getContractId().
equals(record.getContractId())).findAny().
isPresent()) {
SelBillZcVo selBillZcVo = new SelBillZcVo();
BeanUtil.copyProperties(record, selBillZcVo);
//第三层
List<PcSelBillGcVo> finBillTrailers = record.getFinBillTrailers();
List<SelBillGcVo> selBillGcVos = new ArrayList<>();
if (finBillTrailers != null && finBillTrailers.size() > 0) {
for (PcSelBillGcVo finBillTrailer : finBillTrailers) {
SelBillGcVo selBillGcVo = new SelBillGcVo();
BeanUtil.copyProperties(finBillTrailer, selBillGcVo);
selBillGcVos.add(selBillGcVo);
}
}
selBillZcVo.setFinBillTrailers(selBillGcVos);
selBillZcVos.add(selBillZcVo);
selBillVinNoPageVo.setCars(selBillZcVos);
}
}
v.setRecords(selBillVinNoPageVos);
return rb.success().setData(v);
}
public ResultBean<BillApplicationIInfoVo> getInvoicedApply(BillApplicationPageInfoQuery query) {
ResultBean<BillApplicationIInfoVo> rb = ResultBean.fireFail();
BillApplicationIInfoVo vo = new BillApplicationIInfoVo();
if (StringUtils.isBlank(query.getSid())){
if (StringUtils.isBlank(query.getSid())) {
String userSid = query.getUserSid();
String orgPath = query.getOrgPath();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.selectByOrgSidPath(orgPath).getData();
vo.setPublishInfo(sysOrganizationVo.getName() + sysUserVo.getName());
vo.setPublishInfo(sysOrganizationVo.getName() + "-" + sysUserVo.getName());
vo.setShowBtn(true);
vo.setInvoiceStateKey("001");
vo.setInvoiceState("正常开票");
vo.setDate(DateUtil.formatDate(new Date()));
return rb.success().setData(vo);
}
ResultBean<FinBillApplicationDetailsVo> resultBean = finBillApplicationFeign.fetchDetailsBySid(query.getSid());
if (!resultBean.getSuccess()) {
@ -428,9 +468,9 @@ public class InvoicedService {
FinBillApplicationDto finBillApplicationDto = new FinBillApplicationDto();
BeanUtil.copyProperties(dto, finBillApplicationDto, "carBuyContractImages");
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData();
if (dto.getShowBtn()){
if (dto.getShowBtn()) {
finBillApplicationDto.setShowBtnStr("1");
}else {
} else {
finBillApplicationDto.setShowBtnStr("0");
}
finBillApplicationDto.setUseOrgSid(useOrgSid);
@ -540,6 +580,7 @@ public class InvoicedService {
finBillApplicationDto.setKpxxqrsApplicationAppendxs(kpxxqrsApplicationAppendxs);
finBillApplicationDto.setCldjhtApplicationAppendxs(cldjhtApplicationAppendxs);
finBillApplicationDto.setZjApplicationAppendxs(idCardImagesPC);
finBillApplicationDto.setArrearsMoney("0");
ResultBean resultBean = finBillApplicationFeign.save(finBillApplicationDto);
return resultBean;
}
@ -740,9 +781,9 @@ public class InvoicedService {
public ResultBean submitInvoicedInfo(SubmitInvoicedInfoDto dto) {
ResultBean rb = ResultBean.fireFail();
if (dto.getShowBtn()){
if (dto.getShowBtn()) {
List<VinListDto> vinList = dto.getVinList();
if (vinList == null || vinList.size() == 0){
if (vinList == null || vinList.size() == 0) {
return rb.setMsg("车辆不能为空");
}
}

Loading…
Cancel
Save