|
@@ -1,11 +1,13 @@
|
|
|
package com.sunxung.factoring.service.loanmanagement.impl;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.sunxung.factoring.component.exception.BusinessException;
|
|
|
import com.sunxung.factoring.component.exception.ValidatorException;
|
|
|
import com.sunxung.factoring.component.util.*;
|
|
|
import com.sunxung.factoring.dict.impl.FileModuleDict;
|
|
|
import com.sunxung.factoring.dict.impl.ProjectInitiationStatusDict;
|
|
|
+import com.sunxung.factoring.entity.financing.apply.CFinancingBasicInfo;
|
|
|
import com.sunxung.factoring.entity.financing.payment.PaymentApply;
|
|
|
import com.sunxung.factoring.entity.financing.payment.PaymentCondition;
|
|
|
import com.sunxung.factoring.entity.financing.payment.PaymentConditionFileRef;
|
|
@@ -27,7 +29,6 @@ import com.sunxung.factoring.entity.sys.FileStorage;
|
|
|
import com.sunxung.factoring.entity.sys.User;
|
|
|
import com.sunxung.factoring.entity.sys.UserDO;
|
|
|
import com.sunxung.factoring.mapper.loanmanagement.ExemptionMattersMapper;
|
|
|
-import com.sunxung.factoring.service.entprise.IEnterpriseService;
|
|
|
import com.sunxung.factoring.service.financing.apply.ICFinancingBasicInfoService;
|
|
|
import com.sunxung.factoring.service.financing.payment.IPaymentApplyService;
|
|
|
import com.sunxung.factoring.service.financing.payment.IPaymentConditionFileRefService;
|
|
@@ -124,9 +125,6 @@ public class ExemptionMattersServiceImpl extends ServiceImpl<ExemptionMattersMap
|
|
|
@Resource(name = "projectInformationService")
|
|
|
private IProjectInformationService projectInformationService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private IEnterpriseService enterpriseService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private CUserService cUserService;
|
|
|
|
|
@@ -382,13 +380,8 @@ public class ExemptionMattersServiceImpl extends ServiceImpl<ExemptionMattersMap
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<ExemptionMatters> getByPayBasicId(Long payBasicId) {
|
|
|
- return baseMapper.getByPayBasicId(payBasicId);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<ExemptionMatters> getByCreditSubject(String socialCreditCode) {
|
|
|
- return baseMapper.getByCreditSubject(socialCreditCode);
|
|
|
+ public List<ExemptionMatters> getByPaymentInfoId(Long payBasicId) {
|
|
|
+ return baseMapper.getByPaymentInfoId(payBasicId);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -451,6 +444,29 @@ public class ExemptionMattersServiceImpl extends ServiceImpl<ExemptionMattersMap
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Boolean judgeByMainEnterpriseId(Long mainEnterpriseId) {
|
|
|
+ List<CFinancingBasicInfo> financingBasicInfoList = financingBasicInfoService.list(new QueryWrapper<CFinancingBasicInfo>().eq("supplier_id", mainEnterpriseId));
|
|
|
+ if (CollectionUtil.isNotEmpty(financingBasicInfoList)) {
|
|
|
+ for (CFinancingBasicInfo financingBasicInfo : financingBasicInfoList) {
|
|
|
+ List<PaymentInfo> paymentInfoList = paymentInfoService.list(new QueryWrapper<PaymentInfo>().eq("c_financing_basic_info_id", financingBasicInfo.getId()));
|
|
|
+ if (CollectionUtil.isNotEmpty(paymentInfoList)) {
|
|
|
+ for (PaymentInfo paymentInfo : paymentInfoList) {
|
|
|
+ List<ExemptionMatters> exemptionMattersList = getByPaymentInfoId(paymentInfo.getId());
|
|
|
+ if (CollectionUtil.isNotEmpty(exemptionMattersList)) {
|
|
|
+ for (ExemptionMatters matters : exemptionMattersList) {
|
|
|
+ if (matters != null && ProjectInitiationStatusDict.ChildEnum.PROCESSING.getCode().equals(matters.getExemptionStatus())) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
// @Override
|
|
|
// public void sendEmailJob() {
|
|
|
// Date date = DateUtil.subDay(new Date(), 1);
|