fix(finance): 修复财务模块显示和数据处理问题
- 修正付款单和收票单状态显示,将'已生成'改为'全部生成'以保持一致性 - 修正收款单和开票单状态显示,将'已生成'改为'全部生成' - 修正应收模块中生成时间列的布局问题,将span从16改为8 - 修正订单编号标签为合同编号 - 将供应商标签改为制造商 - 修正核销模块中表格列标题,将'应付单生成时间'和'付款单生成时间'统一为'生成时间' - 隐藏付款单核销总额显示 - 为库存查询添加limit 1优化 - 添加付款单按编码查询的接口和实现 - 修正合并发票和收票对话框中的进货商名称显示宽度 - 在付款明细查询中添加产品类型字段 - 修正项目名称为空时的显示,使用'应付'或'应收'占位符 - 添加付款类型和配置天数字段到付款单实体 - 修正收票单查询中的合作伙伴名称条件 - 移除预收款自动核销的TODO注释 - 修正预付款恢复通知邮件标题为预收款恢复通知 - 修正附件删除时的单据类型枚举 - 添加收票单审批完成后的自动核销功能 - 修正开票和收款计划时间格式,从日期改为日期时间 - 添加订单详情中产品信息和折扣验证的空值检查 - 添加付款详情页面的标题显示 - 修正应付单列表标题为应付单信息 - 修正邮件模板类型定义,更新预付款和预收款相关通知的描述 - 在待办服务中添加业务信息处理和流程键匹配逻辑dev_1.0.1
parent
3102a2c0a0
commit
4ce68abe84
|
|
@ -42,7 +42,7 @@
|
|||
<el-table v-loading="loading" :data="invoiceReceiptList">
|
||||
<el-table-column label="序号" type="index" width="50" align="center" />
|
||||
<el-table-column label="收票编号" align="center" prop="ticketBillCode" />
|
||||
<el-table-column label="供应商" align="center" prop="vendorName" />
|
||||
<el-table-column label="制造商" align="center" prop="vendorName" />
|
||||
<!-- <el-table-column label="项目名称" align="center" prop="projectName" />-->
|
||||
<el-table-column label="金额" align="center" prop="totalPriceWithTax" />
|
||||
<!-- <el-table-column label="登记人" align="center" prop="createUserName" />-->
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div class="payment-detail">
|
||||
<div style="text-align: center;font-weight:bold;font-size: 25px;">付款申请单</div>
|
||||
<el-descriptions title="付款单信息" :column="3" border>
|
||||
<el-descriptions-item label="采购-付款单编号">{{ data.paymentBillCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="制造商名称">{{ data.vendorName }}</el-descriptions-item>
|
||||
|
|
@ -20,7 +21,7 @@
|
|||
</el-descriptions>
|
||||
|
||||
<div class="section" style="margin-top: 20px;" v-show="data.payableDetails && data.payableDetails.length>0">
|
||||
<div class="el-descriptions__title">应付单列表</div>
|
||||
<div class="el-descriptions__title">应付单信息</div>
|
||||
<el-table :data="data.payableDetails" border style="width: 100%; margin-top: 10px;">
|
||||
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
|
||||
<el-table-column prop="payableBillCode" label="采购-应付单编号" align="center"></el-table-column>
|
||||
|
|
|
|||
|
|
@ -74,10 +74,10 @@
|
|||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="detail-item"><strong>生成付款单:</strong> {{ formData.totalPriceWithTax == formData.unpaidPaymentAmount ? '未生成' : formData.unpaidPaymentAmount == 0 ? '已生成' : '部分生成' }}</div>
|
||||
<div class="detail-item"><strong>生成付款单:</strong> {{ formData.totalPriceWithTax == formData.unpaidPaymentAmount ? '未生成' : formData.unpaidPaymentAmount == 0 ? '全部生成' : '部分生成' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item"><strong>生成收票单:</strong> {{ formData.totalPriceWithTax == formData.unreceivedTicketAmount ? '未生成' : formData.unreceivedTicketAmount == 0 ? '已生成' : '部分生成' }}</div>
|
||||
<div class="detail-item"><strong>生成收票单:</strong> {{ formData.totalPriceWithTax == formData.unreceivedTicketAmount ? '未生成' : formData.unreceivedTicketAmount == 0 ? '全部生成' : '部分生成' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item" style="display: flex"><strong>产品类型:</strong>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<el-col :span="8">
|
||||
<div class="detail-item"><strong>生成时间:</strong> {{ formData.createTime }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<div class="detail-item"><strong>进货商名称:</strong> {{ formData.partnerName }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item"><strong>订单编号:</strong> {{ formData.orderCode }}</div>
|
||||
<div class="detail-item"><strong>合同编号:</strong> {{ formData.orderCode }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item"><strong>出库单号:</strong> {{ formData.inventoryCode }}</div>
|
||||
|
|
@ -74,10 +74,10 @@
|
|||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="detail-item"><strong>生成收款单:</strong> {{ formData.totalPriceWithTax==formData.unreceivedAmount ? '未生成' : formData.unreceivedAmount == 0 ? '已生成' : '部分生成'}}</div>
|
||||
<div class="detail-item"><strong>生成收款单:</strong> {{ formData.totalPriceWithTax==formData.unreceivedAmount ? '未生成' : formData.unreceivedAmount == 0 ? '全部生成' : '部分生成'}}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item"><strong>生成开票单:</strong> {{ formData.totalPriceWithTax==formData.uninvoicedAmount ? '未生成' : formData.uninvoicedAmount == 0 ? '已生成' : '部分生成'}}</div>
|
||||
<div class="detail-item"><strong>生成开票单:</strong> {{ formData.totalPriceWithTax==formData.uninvoicedAmount ? '未生成' : formData.uninvoicedAmount == 0 ? '全部生成' : '部分生成'}}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item" style="display: flex"><strong>产品类型:</strong>
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="进货商名称">
|
||||
<el-input v-model="form.partnerName" readonly/>
|
||||
<el-input v-model="form.partnerName" style="width:400px" readonly/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">-->
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="进货商名称">
|
||||
<el-input v-model="form.partnerName" readonly/>
|
||||
<el-input v-model="form.partnerName" style="width:400px" readonly/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">-->
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@
|
|||
show-overflow-tooltip/>
|
||||
<el-table-column label="采购应付单编号" fixed="right" align="center" prop="payableBillCode" width="150"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column label="应付单生成时间" fixed="right" align="center" prop="createTime" width="160">
|
||||
<el-table-column label="生成时间" fixed="right" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
|
|
@ -164,7 +164,7 @@
|
|||
<!-- 采购付款单表格 -->
|
||||
<h3 style="margin-top: 30px;">采购付款单</h3>
|
||||
<div class="table-summary" style="margin-bottom: 10px;">
|
||||
<span style="font-weight: bold; margin-right: 20px;">付款单本次核销总额: <span
|
||||
<span style="font-weight: bold; margin-right: 20px;display: none">付款单本次核销总额: <span
|
||||
:style="{color: isWriteOffAmountValid ? '#67C23A' : '#F56C6C'}">{{
|
||||
totalPaymentWriteOffAmount.toFixed(2)
|
||||
}}</span></span>
|
||||
|
|
@ -208,7 +208,7 @@
|
|||
show-overflow-tooltip/>
|
||||
<el-table-column label="采购付款单号" fixed="right" align="center" prop="paymentBillCode" width="150"
|
||||
show-overflow-tooltip/>
|
||||
<el-table-column label="付款单生成时间" fixed="right" align="center" prop="createTime" width="160">
|
||||
<el-table-column label="生成时间" fixed="right" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@ import OrderInfo from '@/views/project/order/components/OrderInfo.vue';
|
|||
import SelectProject from "@/views/project/info/SelectProject";
|
||||
import SelectUser from "@/views/system/user/selectUser";
|
||||
import SelectPartner from "@/views/system/partner/selectPartner";
|
||||
import {isEmpty} from "@/utils/validate";
|
||||
|
||||
export default {
|
||||
name: "OrderDetail",
|
||||
|
|
@ -460,12 +461,14 @@ export default {
|
|||
this.$modal.msgError("项目编号为必填");
|
||||
return;
|
||||
}
|
||||
const checkDiscount = (list) => !list || list.every(item => item.discount === null || item.discount === undefined || item.discount <= 1);
|
||||
//为空 或者 折扣在之正常 则不提示
|
||||
const checkDiscount = (list) => isEmpty(list) || ( !isEmpty(list) && list.every(item => item.discount === null || item.discount === undefined || item.discount <= 1));
|
||||
if (!checkDiscount(this.form.softwareProjectProductInfoList) || !checkDiscount(this.form.hardwareProjectProductInfoList) || !checkDiscount(this.form.maintenanceProjectProductInfoList)) {
|
||||
this.$modal.msgError("折扣不能大于100%");
|
||||
return;
|
||||
}
|
||||
const checkProduct=(list)=>!list ||list.every(item => item.productBomCode!=='')
|
||||
//为空 或者 产品编码都不为空 则不提示
|
||||
const checkProduct=(list)=>isEmpty(list) ||( !isEmpty(list) && list.every(item => item.productBomCode!==''))
|
||||
if (!checkProduct(this.form.softwareProjectProductInfoList) || !checkProduct(this.form.hardwareProjectProductInfoList) || !checkProduct(this.form.maintenanceProjectProductInfoList)) {
|
||||
this.$modal.msgError("请完善产品信息");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -98,9 +98,9 @@ public class TemplateMailUtil {
|
|||
PASSWORD_RESET("passwordTemplate.html", "密码重置"),
|
||||
REJECT_EMAIL("rejectTemplate.html", "董事长驳回订单审批流程"),
|
||||
PAYABLE_EMAIL("payableTemplate.html", "预付款变动通知"),
|
||||
PAYABLE_REFUNDED_EMAIL("payableRefundedTemplate.html", "董事长驳回订单审批流程"),
|
||||
RECEIPT_EMAIL("receiptTemplate.html", "董事长驳回订单审批流程"),
|
||||
RECEIPT_REFUNDED_EMAIL("receiptRefundedTemplate.html", "董事长驳回订单审批流程"),
|
||||
PAYABLE_REFUNDED_EMAIL("payableRefundedTemplate.html", "预付款恢复通知"),
|
||||
RECEIPT_EMAIL("receiptTemplate.html", "预收款变动通知"),
|
||||
RECEIPT_REFUNDED_EMAIL("receiptRefundedTemplate.html", "预收款恢复通知"),
|
||||
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -128,6 +128,12 @@ public class OmsPaymentBillController extends BaseController
|
|||
{
|
||||
return AjaxResult.success(omsPaymentBillService.query(id));
|
||||
}
|
||||
@GetMapping("/code/{code}")
|
||||
@ResponseBody
|
||||
public AjaxResult query(@PathVariable("code") String paymentBillCode)
|
||||
{
|
||||
return AjaxResult.success(omsPaymentBillService.queryByCode(paymentBillCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增预付单
|
||||
|
|
|
|||
|
|
@ -136,6 +136,8 @@ public class OmsPaymentBill extends BaseEntity
|
|||
private String processKey;
|
||||
private String todoId;
|
||||
private String taskId;
|
||||
private String payType;
|
||||
private Integer payConfigDay;
|
||||
|
||||
|
||||
private BigDecimal writeOffAmount;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ public class OmsReceivableInvoicePlan extends BaseEntity
|
|||
private Long receivableBillId;
|
||||
|
||||
/** 计划开票时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "计划开票时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "计划开票时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planInvoiceDate;
|
||||
|
||||
/** 计划开票金额 */
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ public class OmsReceivableReceiptPlan extends BaseEntity
|
|||
private Long receivableBillId;
|
||||
|
||||
/** 计划收款日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "计划收款日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "计划收款日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planReceiptDate;
|
||||
|
||||
/** 计划收款金额 */
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import lombok.Data;
|
|||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,10 @@ public class TodoServiceImpl implements TodoService {
|
|||
*/
|
||||
@Override
|
||||
public List<Todo> selectTodoList(Todo todo) {
|
||||
return todoMapper.selectTodoList(todo);
|
||||
List<Todo> todoList = todoMapper.selectTodoList(todo);
|
||||
//关联业务信息
|
||||
dealBusinessInfo(todo, todoList);
|
||||
return todoList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -191,6 +194,11 @@ public class TodoServiceImpl implements TodoService {
|
|||
} else if (todo.getProcessKeyList().contains(processConfig.getDefinition().getPurchaseOrderApprove())) {
|
||||
todoExecuteInstance = getTodoExecuteInstance(processConfig.getDefinition().getPurchaseOrderApprove());
|
||||
}
|
||||
|
||||
|
||||
if (todoExecuteInstance == null && todo.getProcessKey()!=null){
|
||||
todoExecuteInstance=getTodoExecuteInstance(todo.getProcessKey());
|
||||
}
|
||||
if (todoExecuteInstance != null) {
|
||||
todoExecuteInstance.fillBusinessInfo(todoCompletedList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,4 +115,6 @@ public interface IOmsPaymentBillService
|
|||
List<OmsPaymentBill> listPreResidueAmountByVendorCodeList(List<String> collect);
|
||||
|
||||
void deleteFile(Long id);
|
||||
|
||||
PaymentBillDetailDTO queryByCode(String paymentBillCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ public class OmsPayableWriteOffServiceImpl implements IOmsPayableWriteOffService
|
|||
dict.put("vendorName", vendorInfo.getVendorName());
|
||||
dict.put("preResidueAmount", paymentBill.getPreResidueAmount());
|
||||
dict.put("preResidueAmountSub", decimal);
|
||||
dict.put("projectName", omsPayableBills.stream().map(OmsPayableBill::getProjectName).filter(StrUtil::isNotEmpty).distinct().collect(Collectors.joining(",")));
|
||||
dict.put("projectName", omsPayableBills.stream().map(item->StrUtil.isEmpty(item.getProjectName())?"应付":item.getProjectName()).distinct().collect(Collectors.joining(",")));
|
||||
dict.put("paymentAmount", totalAmount);
|
||||
dict.put("currentDate", DateUtils.parseDateToStr(DatePattern.CHINESE_DATE_PATTERN,DateUtils.getNowDate()));
|
||||
TemplateMailUtil.sendTemplateMailNotImage(Collections.singletonList(vendorInfo.getVendorEmail()), title,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import java.util.*;
|
|||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
|
|
@ -603,9 +604,7 @@ public class OmsPaymentBillServiceImpl implements IOmsPaymentBillService , TodoC
|
|||
List<OmsPayableBill> omsPayableBills = payableBillService.selectOmsPayableBillList(query);
|
||||
Map<Long, String> projectNameMap = omsPayableBills.stream().collect(Collectors.toMap(OmsPayableBill::getId, OmsPayableBill::getProjectName));
|
||||
Map<String, Set<String>> projectNamePaymentCodeMapSet = omsPayablePaymentDetails.stream().collect(Collectors.groupingBy(OmsPayablePaymentDetail::getPaymentBillCode,
|
||||
Collectors.mapping(item -> {
|
||||
return projectNameMap.get(item.getPayableBillId());
|
||||
},
|
||||
Collectors.mapping(item -> StrUtil.isEmpty(projectNameMap.get(item.getPayableBillId()))?"应付":projectNameMap.get(item.getPayableBillId()),
|
||||
Collectors.toSet())));
|
||||
|
||||
for (OmsPaymentBill bill : updateBills) {
|
||||
|
|
@ -677,4 +676,14 @@ public class OmsPaymentBillServiceImpl implements IOmsPaymentBillService , TodoC
|
|||
updateBill.setActualPaymentTime(null);
|
||||
omsPaymentBillMapper.updateReturnWriteOffBatch(Collections.singletonList(updateBill));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaymentBillDetailDTO queryByCode(String paymentBillCode) {
|
||||
PaymentBillDetailDTO paymentBillDetailDTO=new PaymentBillDetailDTO();
|
||||
OmsPaymentBill omsPaymentBill = omsPaymentBillMapper.selectOmsPaymentBillByCode(paymentBillCode);
|
||||
BeanUtil.copyProperties(omsPaymentBill,paymentBillDetailDTO);
|
||||
List<PaymentBillPayableDetailDTO> paymentBillPayableDetailDTOS = detailService.listPayableByPaymentCode(paymentBillDetailDTO.getPaymentBillCode());
|
||||
paymentBillDetailDTO.setPayableDetails(paymentBillPayableDetailDTOS);
|
||||
return paymentBillDetailDTO;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -328,7 +328,6 @@ public class OmsReceiptBillServiceImpl implements IOmsReceiptBillService, TodoCo
|
|||
receiptBill.setReceiptStatus(OmsReceiptBill.ReceiptStatusEnum.PAYMENT.getCode());
|
||||
update(receiptBill);
|
||||
if (!receiptBill.getReceiptBillType().equals(OmsReceiptBill.ReceiptBillTypeEnum.PRE_RECEIPT.getCode())) {
|
||||
//todo 自动核销
|
||||
List<OmsReceivableReceiptDetail> omsReceivableReceiptDetailList = omsReceivableReceiptDetailService.listByReceiptBillCode(receiptBill.getReceiptBillCode());
|
||||
//
|
||||
//
|
||||
|
|
@ -412,7 +411,8 @@ public class OmsReceiptBillServiceImpl implements IOmsReceiptBillService, TodoCo
|
|||
List<OmsReceivableBill> receivableBillList = receivableBillService.selectOmsReceivableBillList(queryBill);
|
||||
Map<Long, String> projectNameMap = receivableBillList.stream().collect(Collectors.toMap(OmsReceivableBill::getId, OmsReceivableBill::getProjectName, (v1, v2) -> v1));
|
||||
Map<String, Set<String>> projectNameBillCodeMap = omsReceivableReceiptDetails.stream().collect(Collectors.groupingBy(OmsReceivableReceiptDetail::getReceiptBillCode,
|
||||
Collectors.mapping(item -> projectNameMap.get(item.getReceivableBillId()), Collectors.toSet())));
|
||||
Collectors.mapping(item ->
|
||||
StrUtil.isEmpty(projectNameMap.get(item.getReceivableBillId())) ? "应收" : projectNameMap.get(item.getReceivableBillId()), Collectors.toSet())));
|
||||
|
||||
|
||||
for (OmsReceiptBill bill : updateBills) {
|
||||
|
|
@ -421,7 +421,7 @@ public class OmsReceiptBillServiceImpl implements IOmsReceiptBillService, TodoCo
|
|||
if (partnerInfo != null && StrUtil.isNotEmpty(partnerInfo.getContactEmail())) {
|
||||
BigDecimal increaseAmount = paymentBillWriteOffAmountMap.getOrDefault(
|
||||
bill.getReceiptBillCode(), BigDecimal.ZERO);
|
||||
String title = "预付款恢复通知";
|
||||
String title = "预收款恢复通知";
|
||||
Dict dict = Dict.create();
|
||||
dict.put("partnerName", partnerInfo.getPartnerName());
|
||||
dict.put("preResidueAmount", bill.getRemainingAmount().subtract(increaseAmount));
|
||||
|
|
@ -464,7 +464,7 @@ public class OmsReceiptBillServiceImpl implements IOmsReceiptBillService, TodoCo
|
|||
}
|
||||
if (CollUtil.isNotEmpty(updateBills)) {
|
||||
omsReceiptBillMapper.updateReturnWriteOffBatch(updateBills);
|
||||
attachmentService.deleteOmsFinAttachment(updateBills.stream().map(OmsReceiptBill::getId).collect(Collectors.toList()), OmsFinAttachment.RelatedBillTypeEnum.PAYMENT.getCode());
|
||||
attachmentService.deleteOmsFinAttachment(updateBills.stream().map(OmsReceiptBill::getId).collect(Collectors.toList()), OmsFinAttachment.RelatedBillTypeEnum.RECEIPT.getCode());
|
||||
}
|
||||
omsReceivableReceiptDetailService.clearWriteOffByWriteOffId(writeOffIdList);
|
||||
}
|
||||
|
|
@ -599,6 +599,20 @@ public class OmsReceiptBillServiceImpl implements IOmsReceiptBillService, TodoCo
|
|||
omsReceiptBillMapper.update(updateBill);
|
||||
List<OmsReceivableReceiptDetail> omsReceivableReceiptDetailList = omsReceivableReceiptDetailService.listByReceiptBillCode(receiptBill.getReceiptBillCode());
|
||||
receivableBillService.updateReceiptAmount(omsReceivableReceiptDetailList.stream().map(OmsReceivableReceiptDetail::getReceivableBillId).collect(Collectors.toList()));
|
||||
if (!receiptBill.getReceiptBillType().equals(OmsReceiptBill.ReceiptBillTypeEnum.PRE_RECEIPT.getCode())) {
|
||||
//审批完成后需要自动核销 因为审批时已经上传附件
|
||||
WriteOffReceiptRequestDto writeOffRequestDto = new WriteOffReceiptRequestDto();
|
||||
writeOffRequestDto.setReceiptBillId(receiptBill.getId());
|
||||
writeOffRequestDto.setDetailList(omsReceivableReceiptDetailList);
|
||||
writeOffRequestDto.setPartnerCode(receiptBill.getPartnerCode());
|
||||
writeOffRequestDto.setPartnerName(receiptBill.getPartnerName());
|
||||
writeOffRequestDto.setRemark(StrUtil.format("{}自动核销数据:{}", DateUtils.getTime(), receiptBill.getReceiptBillCode()));
|
||||
// 新增核销记录
|
||||
omsReceivableWriteOffService.autoWriteOff(writeOffRequestDto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else if(todo.getProcessKey().equals(processConfig.getDefinition().getFinanceReceiptRefound()) && taskName.startsWith("公司领导")){
|
||||
//处理退款审批
|
||||
OmsReceiptBill updateBill = new OmsReceiptBill();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import com.ruoyi.sip.dto.WriteOffReceiptRequestDto;
|
|||
import com.ruoyi.sip.mapper.OmsReceivableWriteOffMapper;
|
||||
import com.ruoyi.sip.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -164,7 +165,7 @@ public class OmsReceivableWriteOffServiceImpl implements IOmsReceivableWriteOffS
|
|||
dict.put("partnerName", writeOffRequestDto.getPartnerName());
|
||||
dict.put("preResidueAmount", receiptBill.getRemainingAmount());
|
||||
dict.put("preResidueAmountSub", decimal);
|
||||
dict.put("projectName", receivableBillList.stream().map(OmsReceivableBill::getProjectName).collect(Collectors.joining(", ")));
|
||||
dict.put("projectName", receivableBillList.stream().map(item->StrUtil.isEmpty(item.getProjectName()) ? "应收" : item.getProjectName()).distinct().collect(Collectors.joining(", ")));
|
||||
dict.put("paymentAmount", totalAmount);
|
||||
dict.put("currentDate", DateUtils.parseDateToStr(DatePattern.CHINESE_DATE_PATTERN,DateUtils.getNowDate()));
|
||||
TemplateMailUtil.sendTemplateMailNotImage(Collections.singletonList(partnerInfo.getContactEmail()), title,
|
||||
|
|
|
|||
|
|
@ -1236,7 +1236,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
return;
|
||||
}
|
||||
item.setBusinessId(projectOrderInfo.getId());
|
||||
item.setProjectCode(projectOrderInfo.getProjectCode());
|
||||
// item.setProjectCode(projectOrderInfo.getProjectCode());
|
||||
item.setBusinessName(projectOrderInfo.getProjectName());
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@
|
|||
and t1.partner_code = #{partnerCode}
|
||||
</if>
|
||||
<if test="partnerName != null and partnerName != ''">
|
||||
and t1.partner_name = #{partnerName}
|
||||
and t2.partner_name = #{partnerName}
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
and t1.order_code = #{orderCode}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ORDER BY t1.create_time DESC
|
||||
</select>
|
||||
<select id="listPayableByPaymentCode" resultType="com.ruoyi.sip.domain.dto.PaymentBillPayableDetailDTO">
|
||||
select t1.payment_amount, t2.payable_bill_code, t4.project_name, t4.project_code, t2.total_price_with_tax
|
||||
select t1.payment_amount, t2.payable_bill_code, t4.project_name, t4.project_code, t2.total_price_with_tax,t2.product_type
|
||||
from (SELECT sum(payment_amount) payment_amount,
|
||||
payable_bill_id
|
||||
FROM oms_payable_payment_detail t1
|
||||
|
|
|
|||
|
|
@ -103,7 +103,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pb.bank_number,
|
||||
|
||||
pb.refund_status,
|
||||
ovi.vendor_name
|
||||
ovi.vendor_name,
|
||||
ovi.pay_type,
|
||||
ovi.pay_config_day
|
||||
from oms_payment_bill pb
|
||||
left join oms_vendor_info ovi on pb.vendor_code = ovi.vendor_code
|
||||
</sql>
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
INNER JOIN project_product_info t3
|
||||
ON (t2.product_code = t3.product_bom_code AND t3.project_id = t4.project_id)
|
||||
where t2.outer_code = #{outerCode}
|
||||
limit 1
|
||||
|
||||
</select>
|
||||
<select id="listByInvoiceBillCode" resultType="com.ruoyi.sip.domain.InventoryOuter">
|
||||
|
|
|
|||
Loading…
Reference in New Issue