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}") @Update("update fin_vehicle_invoice set isTakeTicket = '是' where sid = #{sid}")
void updateIsLPBySid(String 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} where vehicleSid = #{vinSid}
and contractNo = #{contractNo} and contractNo = #{contractNo}
</select> </select>
<select id="getFinSelectInvoiceVoListByBusVinSid" <select id="getFinSelectInvoiceVoListByVinNo"
resultType="com.yxt.anrui.fin.api.finvehicleinvoice.FinSelectInvoiceVo"> resultType="com.yxt.anrui.fin.api.finvehicleinvoice.FinSelectInvoiceVo">
select fu.busVinSid, select fu.busVinSid,
fu.receivablesName, fu.receivablesName,
@ -271,12 +271,13 @@
co.collectionBankNum, co.collectionBankNum,
co.receivingName, co.receivingName,
co.payerName, co.payerName,
co.confirmDate as collectionDate co.confirmDate as collectionDate
FROM fin_uncollected_receivables_detailed as fu FROM fin_selected_receivables_detailed as fs
LEFT JOIN fin_selected_receivables_detailed as fs ON fu.sid = fs.receivablesSid 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 LEFT JOIN fin_collection_confirmation as co ON fs.collSid = co.sid
WHERE fu.busVinSid = #{busVinSid} WHERE fs.VIN = #{vinNo}
and fs.auditState = '3' and fs.auditState = '3'
ORDER BY co.createTime DESC ORDER BY co.createTime DESC
</select> </select>
</mapper> </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()); ResultBean<ReceiveInvoiceVo> receiveInvoiceVoResultBean = finUncollectedReceivablesDetailedService.receivedSelect(busSalesOrderVehicle.getSid(), busSalesOrderVehicle.getLinkSid());
if (receiveInvoiceVoResultBean.getData() != null) { if (receiveInvoiceVoResultBean.getData() != null) {
List<FinSelectInvoiceVo> finSelectVoList = baseMapper.getFinSelectInvoiceVoListByBusVinSid(busSalesOrderVehicle.getSid()); FinVehicleInvoice invoice = selectByVinAndContractNo(vinSid, contractNo).getData();
finSelectVoList.removeAll(Collections.singleton(null)); if (null != invoice) {
if (!finSelectVoList.isEmpty()) { if (StringUtils.isNotBlank(invoice.getVIN())) {
deliveredFinVo.setFinSelectVoList(finSelectVoList); 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(); InvoiceVo invoiceVo = receiveInvoiceVoResultBean.getData().getInvoiceVo();
if (invoiceVo != null) { if (invoiceVo != null) {

Loading…
Cancel
Save