Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
dimengzhe 2 years ago
parent
commit
ba936315de
  1. 2
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingAdd.vue
  2. 2
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuEdit.vue
  3. 4
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finvehicleinvoice/FinVehicleInvoiceQuery.java
  4. 110
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finvehicleinvoice/FinVehicleInvoiceMapper.xml
  5. 6
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finvehicleinvoice/FinVehicleInvoiceRest.java
  6. 68
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finvehicleinvoice/FinVehicleInvoiceService.java

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

@ -136,7 +136,7 @@
<el-table-column fixed align="center" label="操作" type="index" width="280">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="handleDel(scope.$index)">删除</el-button>
<el-button type="primary" size="small" @click="handleSelect(scope.row)">选择套餐</el-button>
<el-button type="primary" size="small" v-if="formobj.discountLeave.length !== '0'" @click="handleSelect(scope.row)">选择套餐</el-button>
<el-button type="primary" size="small" v-if="formobj.typeKey == '2'" @click="handleUpdateUser(scope.row)">修改购车人</el-button>
</template>
</el-table-column>

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

@ -135,7 +135,7 @@
<el-table-column fixed align="center" label="操作" type="index" width="280">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="handleDel(scope.$index)">删除</el-button>
<el-button type="primary" size="small" @click="handleSelect(scope.row)">选择套餐</el-button>
<el-button type="primary" size="small" v-if="formobj.discountLeave.length !== '0'" @click="handleSelect(scope.row)">选择套餐</el-button>
<el-button type="primary" size="small" v-if="formobj.typeKey == '2'" @click="handleUpdateUser(scope.row)">修改购车人</el-button>
</template>
</el-table-column>

4
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finvehicleinvoice/FinVehicleInvoiceQuery.java

@ -33,6 +33,10 @@ public class FinVehicleInvoiceQuery implements Query {
private List<String> sids;
@ApiModelProperty("开票单位")
private String invoiceTitle;
@ApiModelProperty("创建组织sid")
private String createOrgSid;
@ApiModelProperty("组织全路径")
private String orgSidPath;
@ApiModelProperty("开票状态")
private String billingState;
@ApiModelProperty("开票状态Key")

110
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finvehicleinvoice/FinVehicleInvoiceMapper.xml

@ -40,35 +40,38 @@
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultMap="selectPageVoResultMap">
<select id="selectPageVo" resultType="com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoiceVo">
SELECT DISTINCT
sid,
`state`,
billingStateKey,
billingState,
businessStateKey,
businessState,
transferStateKey,
transferState,
invoiceTitle,
invoiceType,
invoiceTypeKey,
contractNo,
customerName,
VIN,
invoicingName,
invoiceAmount,
createTime,
invoiceCode,
invoiceNo,
filePath,
address,
telPhone,
openingBank,
bankNum,
recipient,
transferTime
FROM fin_vehicle_invoice
v.useOrgSid,
v.sid,
v.`state`,
v.billingStateKey,
v.billingState,
v.businessStateKey,
v.businessState,
v.transferStateKey,
v.transferState,
v.invoiceTitle,
v.invoiceType,
v.invoiceTypeKey,
v.contractNo,
v.customerName,
v.VIN as vinNo,
v.invoicingName,
v.invoiceAmount,
v.invoiceDate as createTime,
v.invoiceCode,
v.invoiceNo,
v.filePath,
v.address,
v.telPhone,
v.openingBank,
v.bankNum,
v.recipient,
v.transferTime,
so.orgSidPath
FROM fin_vehicle_invoice as v
left join anrui_portal.sys_organization so on v.useOrgSid = so.sid
<where>
${ew.sqlSegment}
</where>
@ -147,34 +150,33 @@
<result column="recipient" property="recipient"></result>
<result column="transferTime" property="transferTime"></result>
<result column="taxpayerNo" property="taxpayerNo"></result>
</resultMap>
<select id="getInvoiceDetailsBySid"
resultMap="getInvoiceDetailsBySidResultMap">
SELECT DISTINCT si.`name` as name,
v.sid as sid,
v.invoiceTitle as invoiceTitle,
v.contractNo as contractNo,
v.customerName as customerName,
v.VIN as VIN,
v.invoiceType as invoiceType,
v.invoiceTypeKey as invoiceTypeKey,
v.invoiceAmount as invoiceAmount,
v.`state` as state,
v.billingState as billingState,
v.billingStateKey as billingStateKey,
v.invoicingName as invoicingName,
v.createTime as createTime,
v.invoiceNo as invoiceNo,
v.invoiceCode as invoiceCode,
v.filePath as filePath,
v.address as address,
v.telPhone as telPhone,
v.openingBank as openingBank,
v.recipient as recipient,
v.transferTime as transferTime,
v.bankNum as bankNum,
v.taxpayerNo as taxpayerNo
resultType="com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoiceDetailsVo">
SELECT DISTINCT si.`name`,
v.sid,
v.invoiceTitle,
v.contractNo,
v.customerName,
v.VIN as vinNo,
v.invoiceType,
v.invoiceTypeKey,
v.invoiceAmount,
v.`state`,
v.billingState,
v.billingStateKey,
v.invoicingName,
v.invoiceDate as createTime,
v.invoiceNo,
v.invoiceCode,
v.filePath,
v.address,
v.telPhone,
v.openingBank,
v.recipient,
v.transferTime,
v.bankNum,
v.taxpayerNo
FROM fin_vehicle_invoice AS v
LEFT JOIN anrui_portal.sys_user AS u ON v.createBySid = u.sid
LEFT JOIN anrui_portal.sys_staffinfo AS si ON u.staffSid = si.sid

6
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finvehicleinvoice/FinVehicleInvoiceRest.java

@ -1,6 +1,7 @@
package com.yxt.anrui.fin.biz.finvehicleinvoice;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.api.R;
import com.yxt.anrui.fin.api.finvehicleinvoice.*;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.utils.ExportExcelUtils;
@ -104,9 +105,8 @@ public class FinVehicleInvoiceRest implements FinVehicleInvoiceFeign {
@Override
public ResultBean saveOrUpdate(FinVehicleInvoiceDto dto) {
ResultBean rb = ResultBean.fireFail();
String sid = dto.getSid();
if (StringUtils.isNotEmpty(sid)) {
finVehicleInvoiceService.myUpdateBySid(dto, sid);
if (StringUtils.isNotEmpty(dto.getSid())) {
finVehicleInvoiceService.myUpdateBySid(dto, dto.getSid());
} else {
finVehicleInvoiceService.mySave(dto);
}

68
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finvehicleinvoice/FinVehicleInvoiceService.java

@ -22,7 +22,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -73,60 +75,59 @@ public class FinVehicleInvoiceService extends MybatisBaseService<FinVehicleInvoi
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<FinVehicleInvoice> qw = new QueryWrapper<>();
// ===========================================================
// String orgSidPath = query.getOrgSidPath();
// SysOrganizationVo data = sysOrganizationFeign.selectByOrgSidPath(orgSidPath).getData();
// String orgLevelKey = data.getOrgLevelKey();
// if ("2".equals(orgLevelKey)) {
// orgSidPath = orgSidPath.substring(0, 73);
// qw.like("so.orgSidPath", orgSidPath);
// } else if ("3".equals(orgLevelKey)) {
// qw.eq("saiq.createOrgSid", query.getCreateOrgSid());
// }
// =================================================================
qw.eq("isDelete", "0");
qw.eq("v.isDelete", "0");
//层级筛选
String orgSidPath = query.getOrgSidPath();
SysOrganizationVo data = sysOrganizationFeign.selectByOrgSidPath(orgSidPath).getData();
String orgLevelKey = data.getOrgLevelKey();
if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, 73);
qw.like("so.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
qw.eq("v.useOrgSid", query.getCreateOrgSid());
}
if (StringUtils.isNotBlank(query.getInvoiceTitle())) {
qw.like("invoiceTitle", query.getInvoiceTitle());
qw.like("v.invoiceTitle", query.getInvoiceTitle());
}
if (StringUtils.isNotBlank(query.getInvoiceTypeKey())) {
qw.like("invoiceTypeKey", query.getInvoiceTypeKey());
qw.like("v.invoiceTypeKey", query.getInvoiceTypeKey());
}
if (StringUtils.isNotBlank(query.getInvoiceType())) {
qw.like("invoiceType", query.getInvoiceType());
qw.like("v.invoiceType", query.getInvoiceType());
}
if (StringUtils.isNotBlank(query.getContractNo())) {
qw.like("contractNo", query.getContractNo());
qw.like("v.contractNo", query.getContractNo());
}
if (StringUtils.isNotBlank(query.getCustomerName())) {
qw.like("customerName", query.getCustomerName());
qw.like("v.customerName", query.getCustomerName());
}
if (StringUtils.isNotBlank(query.getVinNo())) {
qw.like("VIN", query.getVinNo());
qw.like("v.VIN", query.getVinNo());
}
if (StringUtils.isNotBlank(query.getTransferState())) {
qw.eq("transferState", query.getTransferState());
qw.eq("v.transferState", query.getTransferState());
}
if (StringUtils.isNotBlank(query.getBillingState())) {
qw.eq("billingState", query.getBillingState());
qw.eq("v.billingState", query.getBillingState());
}
if (StringUtils.isNotBlank(query.getTransferStateKey())) {
qw.eq("transferStateKey", query.getTransferStateKey());
qw.eq("v.transferStateKey", query.getTransferStateKey());
}
if (StringUtils.isNotBlank(query.getBillingStateKey())) {
qw.eq("billingStateKey", query.getBillingStateKey());
qw.eq("v.billingStateKey", query.getBillingStateKey());
}
if (StringUtils.isNotBlank(query.getInvoicingName())) {
qw.like("invoicingName", query.getInvoicingName());
qw.like("v.invoicingName", query.getInvoicingName());
}
if (StringUtils.isNotBlank(query.getInvoiceCode())) {
qw.like("invoiceCode", query.getInvoiceCode());
qw.like("v.invoiceCode", query.getInvoiceCode());
}
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
qw.apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createStartTime), "date_format (v.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(org.apache.commons.lang3.StringUtils.isNotEmpty(createEndTime), "date_format (v.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
qw.orderByDesc("createTime");
qw.orderByDesc("v.createTime");
return qw;
}
@ -136,7 +137,6 @@ public class FinVehicleInvoiceService extends MybatisBaseService<FinVehicleInvoi
IPage<FinVehicleInvoice> page = PagerUtil.queryToPage(pq);
IPage<FinVehicleInvoiceVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<FinVehicleInvoiceVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
@ -264,9 +264,8 @@ public class FinVehicleInvoiceService extends MybatisBaseService<FinVehicleInvoi
String urlPrefix = fileUploadComponent.getUrlPrefix();
if (null != dto.getFilePaths()) {
for (String filePath : dto.getFilePaths()) {
String[] split = filePath.split(urlPrefix);
String s = split[1];
sb.append(s).append(",");
String path = filePath.substring(urlPrefix.length() + 1);
sb.append(path).append(",");
}
sb.delete(sb.length() - 1, sb.length());
dto.setFilePath(sb.toString());
@ -274,6 +273,7 @@ public class FinVehicleInvoiceService extends MybatisBaseService<FinVehicleInvoi
if (com.yxt.common.base.utils.StringUtils.isNotBlank(dto.getFilePath())) {
dto.setBillingStateKey("002");
dto.setBillingState("已开票");
dto.setInvoiceDate((new Date()));
}
if (com.yxt.common.base.utils.StringUtils.isNotEmpty(dto.getVinNo())) {
String VIN = dto.getVinNo();
@ -291,14 +291,14 @@ public class FinVehicleInvoiceService extends MybatisBaseService<FinVehicleInvoi
String urlPrefix = fileUploadComponent.getUrlPrefix();
if (null != dto.getFilePaths()) {
for (String filePath : dto.getFilePaths()) {
String[] split = filePath.split(urlPrefix);
String s = split[1];
sb.append(s).append(",");
String path = filePath.substring(urlPrefix.length() + 1);
sb.append(path).append(",");
}
sb.delete(sb.length() - 1, sb.length());
finVehicleInvoice.setFilePath(sb.toString());
finVehicleInvoice.setBillingStateKey("002");
finVehicleInvoice.setBillingState("已开票");
dto.setInvoiceDate((new Date()));
}
if (com.yxt.common.base.utils.StringUtils.isNotEmpty(dto.getVinNo())) {
String VIN = dto.getVinNo();

Loading…
Cancel
Save