|
@@ -18,8 +18,10 @@ import com.fjhx.purchase.entity.purchase.po.Purchase;
|
|
import com.fjhx.purchase.service.pay.PayDetailService;
|
|
import com.fjhx.purchase.service.pay.PayDetailService;
|
|
import com.fjhx.purchase.service.pay.PayService;
|
|
import com.fjhx.purchase.service.pay.PayService;
|
|
import com.fjhx.purchase.service.purchase.PurchaseService;
|
|
import com.fjhx.purchase.service.purchase.PurchaseService;
|
|
|
|
+import com.ruoyi.common.core.domain.entity.SysUser;
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
-import com.ruoyi.common.utils.SecurityUtils;
|
|
|
|
|
|
+import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
|
+import com.ruoyi.system.service.ISysUserService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
@@ -51,6 +53,8 @@ public class PayFlow extends FlowDelegate {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private PurchaseService purchaseService;
|
|
private PurchaseService purchaseService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ISysUserService userService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public String getFlowKey() {
|
|
public String getFlowKey() {
|
|
@@ -106,7 +110,10 @@ public class PayFlow extends FlowDelegate {
|
|
payment.setAccountManagementId(pay.getAccountManagementId());
|
|
payment.setAccountManagementId(pay.getAccountManagementId());
|
|
payment.setBusinessId(pay.getId());
|
|
payment.setBusinessId(pay.getId());
|
|
payment.setCurrency(pay.getCurrency());
|
|
payment.setCurrency(pay.getCurrency());
|
|
- payment.setDepartmentId(SecurityUtils.getDeptId());
|
|
|
|
|
|
+ SysUser sysUser = userService.getOne(IWrapper.<SysUser>getWrapper().eq(SysUser::getUserId, pay.getCreateUser()));
|
|
|
|
+ if (ObjectUtils.isNotEmpty(sysUser)) {
|
|
|
|
+ payment.setDepartmentId(sysUser.getDeptId());
|
|
|
|
+ }
|
|
// todo 暂时写死人民币
|
|
// todo 暂时写死人民币
|
|
payment.setPaymentRemark(pay.getRemark());
|
|
payment.setPaymentRemark(pay.getRemark());
|
|
payment.setType(PaymentTypeEnum.REJECT.getKey());
|
|
payment.setType(PaymentTypeEnum.REJECT.getKey());
|
|
@@ -122,6 +129,7 @@ public class PayFlow extends FlowDelegate {
|
|
payment.setAccountOpening(pay.getAccountOpening());
|
|
payment.setAccountOpening(pay.getAccountOpening());
|
|
payment.setInterbankNumber(pay.getInterbankNumber());
|
|
payment.setInterbankNumber(pay.getInterbankNumber());
|
|
payment.setPaymentMethod(pay.getPayType());
|
|
payment.setPaymentMethod(pay.getPayType());
|
|
|
|
+ payment.setApplyForTime(pay.getCreateTime());//申请时间
|
|
accountPaymentService.save(payment);
|
|
accountPaymentService.save(payment);
|
|
|
|
|
|
// 修改合同付款状态
|
|
// 修改合同付款状态
|