Browse Source

开票管理 款项查看

master
fanzongzhe 2 years ago
parent
commit
74c4801dfb
  1. 3
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finvehicleinvoice/FinVehicleInvoiceMapper.java
  2. 11
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finvehicleinvoice/FinVehicleInvoiceMapper.xml
  3. 18
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finvehicleinvoice/FinVehicleInvoiceService.java

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

@ -69,5 +69,6 @@ public interface FinVehicleInvoiceMapper extends BaseMapper<FinVehicleInvoice> {
@Update("update fin_vehicle_invoice set isTakeTicket = '是' where sid = #{sid}")
void updateIsLPBySid(String sid);
List<FinSelectInvoiceVo> getFinSelectInvoiceVoListByBusVinSid(String busVinSid);
List<FinSelectInvoiceVo> getFinSelectInvoiceVoListByVinNo(String vinNo);
}

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

@ -260,7 +260,7 @@
where vehicleSid = #{vinSid}
and contractNo = #{contractNo}
</select>
<select id="getFinSelectInvoiceVoListByBusVinSid"
<select id="getFinSelectInvoiceVoListByVinNo"
resultType="com.yxt.anrui.fin.api.finvehicleinvoice.FinSelectInvoiceVo">
select fu.busVinSid,
fu.receivablesName,
@ -271,12 +271,13 @@
co.collectionBankNum,
co.receivingName,
co.payerName,
co.confirmDate as collectionDate
FROM fin_uncollected_receivables_detailed as fu
LEFT JOIN fin_selected_receivables_detailed as fs ON fu.sid = fs.receivablesSid
co.confirmDate as collectionDate
FROM fin_selected_receivables_detailed as fs
LEFT JOIN fin_uncollected_receivables_detailed as fu ON fu.sid = fs.receivablesSid
LEFT JOIN fin_collection_confirmation as co ON fs.collSid = co.sid
WHERE fu.busVinSid = #{busVinSid}
WHERE fs.VIN = #{vinNo}
and fs.auditState = '3'
ORDER BY co.createTime DESC
</select>
</mapper>

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

@ -617,10 +617,20 @@ public class FinVehicleInvoiceService extends MybatisBaseService<FinVehicleInvoi
//根据销售订单车辆查询款项情况
ResultBean<ReceiveInvoiceVo> receiveInvoiceVoResultBean = finUncollectedReceivablesDetailedService.receivedSelect(busSalesOrderVehicle.getSid(), busSalesOrderVehicle.getLinkSid());
if (receiveInvoiceVoResultBean.getData() != null) {
List<FinSelectInvoiceVo> finSelectVoList = baseMapper.getFinSelectInvoiceVoListByBusVinSid(busSalesOrderVehicle.getSid());
finSelectVoList.removeAll(Collections.singleton(null));
if (!finSelectVoList.isEmpty()) {
deliveredFinVo.setFinSelectVoList(finSelectVoList);
FinVehicleInvoice invoice = selectByVinAndContractNo(vinSid, contractNo).getData();
if (null != invoice) {
if (StringUtils.isNotBlank(invoice.getVIN())) {
List<FinSelectInvoiceVo> finSelectVoList = baseMapper.getFinSelectInvoiceVoListByVinNo(invoice.getVIN());
finSelectVoList.removeAll(Collections.singleton(null));
if (!finSelectVoList.isEmpty()) {
for (FinSelectInvoiceVo finSelectInvoiceVo : finSelectVoList) {
if (StringUtils.isBlank(finSelectInvoiceVo.getCollectionTypeValue())) {
finSelectInvoiceVo.setCollectionTypeValue("款项结转");
}
}
deliveredFinVo.setFinSelectVoList(finSelectVoList);
}
}
}
InvoiceVo invoiceVo = receiveInvoiceVoResultBean.getData().getInvoiceVo();
if (invoiceVo != null) {

Loading…
Cancel
Save