19 Ревизии 33230694b6 ... 195b29bfd0

Автор SHA1 Съобщение Дата
  liutao 195b29bfd0 fix(验收单):bug修改 преди 1 седмица
  liutao 75019c8b49 fix(苏商银行):更改开户行 преди 2 седмици
  liutao b2010ec418 Merge branch 'refs/heads/smb' преди 2 седмици
  liutao 53dc0a59ae fix(苏商银行):更改开户行 преди 2 седмици
  liutao 8ab3ee9984 Merge branch 'smb' преди 2 седмици
  liutao 0efff3cb6c fix(苏商银行):更改开户行 преди 2 седмици
  liutao 37725f6512 Merge branch 'smb' преди 3 седмици
  liutao d16f837575 fix(苏商银行):更改开户行 преди 3 седмици
  liutao fd765100fe Merge branch 'smb' преди 3 седмици
  liutao ed562d4089 fix(苏商银行):更改开户行 преди 3 седмици
  liutao e771cccbeb Merge branch 'smb' преди 4 седмици
  liutao 586132867a fix(苏商银行):更改开户行 преди 1 месец
  liutao bb96ccc0c9 Merge branch 'smb' преди 1 месец
  liutao 57a4e451b7 fix(苏商银行):更改开户行 преди 1 месец
  liutao 7f836d0941 fix(苏商银行):更改开户行 преди 1 месец
  liutao bcd4c44372 Merge branch 'smb' преди 1 месец
  liutao 7fb83ce035 fix(苏商银行):续授信逻辑修改 преди 1 месец
  liutao e60f909131 Merge branch 'smb' преди 1 месец
  liutao ac3b370eca fix(苏商银行):续授信逻辑修改 преди 1 месец

+ 1 - 1
build.gradle

@@ -9,7 +9,7 @@ targetCompatibility = 1.8
 
 jar {
     baseName = 'factoring-trade-prod'
-    version = '1.0.67'
+    version = '1.0.78'
 }
 
 springBoot {

+ 12 - 0
src/main/java/com/sunxung/factoring/entity/smbApi/SMBRequestLogPO.java

@@ -37,6 +37,18 @@ public class SMBRequestLogPO extends BaseEntity {
      * 请求失败原因
      */
     private String remark;
+    /**
+     * 业务编号
+     */
+    private String businessNumber;
+
+    public String getBusinessNumber() {
+        return businessNumber;
+    }
+
+    public void setBusinessNumber(String businessNumber) {
+        this.businessNumber = businessNumber;
+    }
 
     public String getTransCode() {
         return transCode;

+ 14 - 12
src/main/java/com/sunxung/factoring/service/acceptancesheet/impl/AcceptanceBasicInfoServiceImpl.java

@@ -1221,18 +1221,20 @@ public class AcceptanceBasicInfoServiceImpl extends ServiceImpl<AcceptanceBasicI
                     CSalesContractSupplementBasicInfo salesContractSupplementBasicInfo = salesContractSupplementBasicInfoService.lambdaQuery()
                             .eq(CSalesContractSupplementBasicInfo::getcSalesContractSupplementInfoId, s.getId())
                             .one();
-                    List<FileStorageDO> SupplementFileStorageDOS = fileService.findByBusinessId(salesContractSupplementBasicInfo.getId(),
-                            FileModuleDict.ChildEnum.SALES_CONTRACT_SUPPLEMENT_CONTRACT_FILE.getCode());
-                    if (CollectionUtil.isNotEmpty(SupplementFileStorageDOS)) {
-                        SupplementFileStorageDOS.forEach(fileStorageDO -> {
-                            FileStorage fileStorage = new FileStorage();
-                            fileStorage.setAbsolutePath(fileStorageDO.getAbsolutePath());
-                            fileStorage.setName(fileStorageDO.getOriginalName());
-                            fileStorage.setPath(fileStorageDO.getPath());
-                            fileStorage.setId(fileStorageDO.getId());
-                            fileStorage.setOriginalName(fileStorageDO.getOriginalName());
-                            salesContract.add(fileStorage);
-                        });
+                    if(salesContractSupplementBasicInfo!=null){
+                        List<FileStorageDO> SupplementFileStorageDOS = fileService.findByBusinessId(salesContractSupplementBasicInfo.getId(),
+                                FileModuleDict.ChildEnum.SALES_CONTRACT_SUPPLEMENT_CONTRACT_FILE.getCode());
+                        if (CollectionUtil.isNotEmpty(SupplementFileStorageDOS)) {
+                            SupplementFileStorageDOS.forEach(fileStorageDO -> {
+                                FileStorage fileStorage = new FileStorage();
+                                fileStorage.setAbsolutePath(fileStorageDO.getAbsolutePath());
+                                fileStorage.setName(fileStorageDO.getOriginalName());
+                                fileStorage.setPath(fileStorageDO.getPath());
+                                fileStorage.setId(fileStorageDO.getId());
+                                fileStorage.setOriginalName(fileStorageDO.getOriginalName());
+                                salesContract.add(fileStorage);
+                            });
+                        }
                     }
 
                     CSalesSupplementSignConfirmation salesSupplementSignConfirmation = salesSupplementSignConfirmationService

+ 1 - 1
src/main/java/com/sunxung/factoring/service/financing/payment/impl/PaymentApplyServiceImpl.java

@@ -1264,7 +1264,7 @@ public class PaymentApplyServiceImpl extends ServiceImpl<PaymentApplyMapper, Pay
         //绿色贷款类型
         loanCreditRiskMsg.setGreenLoanFlag("00");
         //行业类型代码
-        loanCreditRiskMsg.setIndustryFlag(financingFromInvestors.getIndustryTypeThree());
+        loanCreditRiskMsg.setIndustryFlag(financingFromInvestors.getIndustryTypeFore());
         //担保方式
         loanCreditRiskMsg.setGuaranteeFlag("3");
         //贷款方式

+ 1 - 1
src/main/java/com/sunxung/factoring/service/smb/impl/FinancingLoanInfoServiceImpl.java

@@ -308,7 +308,7 @@ public class FinancingLoanInfoServiceImpl extends ServiceImpl<FinancingLoanInfoM
             //绿色贷款类型
             loanCreditRiskMsg.setGreenLoanFlag("00");
             //行业类型代码
-            loanCreditRiskMsg.setIndustryFlag(financingFromInvestors.getIndustryTypeThree());
+            loanCreditRiskMsg.setIndustryFlag(financingFromInvestors.getIndustryTypeFore());
             //担保方式
             loanCreditRiskMsg.setGuaranteeFlag("3");
             //贷款方式

+ 29 - 2
src/main/java/com/sunxung/factoring/service/smbApi/api/impl/SMBRequestLogServiceImpl.java

@@ -6,14 +6,22 @@ import cn.hutool.json.JSONArray;
 import cn.hutool.json.JSONObject;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
+import com.sunxung.factoring.component.util.CollectionUtil;
+import com.sunxung.factoring.component.util.StringUtil;
 import com.sunxung.factoring.entity.GridPage;
 import com.sunxung.factoring.entity.ResponseJson;
+import com.sunxung.factoring.entity.financing.apply.CFinancingBasicInfo;
 import com.sunxung.factoring.entity.financing.sop.RefinancingRepaymentPlan;
+import com.sunxung.factoring.entity.smb.FinancingLoanInfo;
 import com.sunxung.factoring.entity.smb.vo.SmbRequestLogVo;
 import com.sunxung.factoring.entity.smbApi.SMBRequestLogPO;
 import com.sunxung.factoring.entity.underlying.sop.PaymentCollectionPlanFactoring;
 import com.sunxung.factoring.mapper.smbApi.SMBRequestLogMapper;
+import com.sunxung.factoring.service.financing.apply.ICFinancingBasicInfoService;
+import com.sunxung.factoring.service.smb.IFinancingLoanInfoService;
 import com.sunxung.factoring.service.smbApi.api.SMBRequestLogService;
+import com.sunxung.factoring.service.smbApi.constants.TransCodeEnum;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -30,6 +38,12 @@ public class SMBRequestLogServiceImpl implements SMBRequestLogService {
     @Resource
     private SMBRequestLogMapper smbRequestLogMapper;
 
+    @Autowired
+    private IFinancingLoanInfoService financingLoanInfoService;
+
+    @Autowired
+    private ICFinancingBasicInfoService financingBasicInfoService;
+
     @Override
     public void add(SMBRequestLogPO po) {
         smbRequestLogMapper.add(po);
@@ -39,6 +53,19 @@ public class SMBRequestLogServiceImpl implements SMBRequestLogService {
     public GridPage<SMBRequestLogPO> findBySearch(SmbRequestLogVo smbRequestLogVo) {
         Page page = PageHelper.startPage(smbRequestLogVo.getPage(), smbRequestLogVo.getRows());
         List<SMBRequestLogPO> result = smbRequestLogMapper.findBySearch(smbRequestLogVo.getTransCode());
+        for (SMBRequestLogPO smbRequestLogPO : result) {
+            String requestPayload = smbRequestLogPO.getRequestPayload();
+            JSONObject jsonObject = new JSONObject(requestPayload);
+            String duebillNo = jsonObject.getStr("duebillNo");
+            if(StringUtil.isNotEmpty(duebillNo)){
+                FinancingLoanInfo financingLoanInfo = financingLoanInfoService.lambdaQuery().eq(FinancingLoanInfo::getDueBillNo, duebillNo).eq(FinancingLoanInfo::getPayoutStatus, "02").one();
+                if(financingLoanInfo.getcFinancingBasicInfoId() != null){
+                    CFinancingBasicInfo financingBasicInfo = financingBasicInfoService.getById(financingLoanInfo.getcFinancingBasicInfoId());
+                    String businessNumber = financingBasicInfo.getBusinessNumber();
+                    smbRequestLogPO.setBusinessNumber(businessNumber);
+                }
+            }
+        }
         return new GridPage<>(smbRequestLogVo.getRows(),smbRequestLogVo.getPage(),page.getTotal(),result);
     }
 
@@ -54,7 +81,7 @@ public class SMBRequestLogServiceImpl implements SMBRequestLogService {
         String requestPayload = smbRequestLogVo.getResponsePayload();
         JSONObject jsonObject = new JSONObject(requestPayload);
         JSONArray repay ;
-        if(smbRequestLogVo.getTransCode().equals("snb.eloan.ecpms.repay.plan.query")){
+        if(smbRequestLogVo.getTransCode().equals(TransCodeEnum.REPAY_PLAN_QUERY.getCode())){
             repay = jsonObject.getJSONArray("list");
             for (Object o : repay) {
                 JSONObject object = new JSONObject(o);
@@ -82,7 +109,7 @@ public class SMBRequestLogServiceImpl implements SMBRequestLogService {
                     plans.add(refinancingRepaymentPlan);
                 }
             }
-        } else if (smbRequestLogVo.getTransCode().equals("snb.eloan.ecpms.repay.plan.trial")) {
+        } else if (smbRequestLogVo.getTransCode().equals(TransCodeEnum.REPAY_PLAN_TRIAL.getCode())) {
             repay = jsonObject.getJSONArray("repay");
             for (Object o : repay) {
                 JSONObject object = new JSONObject(o);

+ 13 - 3
src/main/java/com/sunxung/factoring/service/sys/impl/ClientUserServiceImpl.java

@@ -170,8 +170,8 @@ public class ClientUserServiceImpl extends ServiceImpl<ClientUserMapper, ClientU
       clientUserQueryRequest.setUserIds(userIds);
       clientUserQueryRequest.setOrgIds(orgIds);
     }
-    Page<Object> objects = PageHelper.startPage(clientUserQueryRequest.getPage(),
-        clientUserQueryRequest.getRows());
+//    Page<Object> objects = PageHelper.startPage(clientUserQueryRequest.getPage(),
+//        clientUserQueryRequest.getRows());
     List<ClientUserVO> clientUserVOS = this.baseMapper.pageList(clientUserQueryRequest);
     if (!CollectionUtils.isEmpty(clientUserVOS)) {
       for (ClientUserVO vo : clientUserVOS) {
@@ -209,8 +209,18 @@ public class ClientUserServiceImpl extends ServiceImpl<ClientUserMapper, ClientU
         }
       }).collect(Collectors.toList());
     }
+    int index = (clientUserQueryRequest.getPage()-1)*10;
+    List<ClientUserVO> result = new ArrayList<>();
+    for (int i = 0; i < 10; i++) {
+      int a = index + i;
+      if( a>= clientUserVOS.size()){
+        break;
+      }
+      ClientUserVO clientUserVO = clientUserVOS.get(index+ i );
+      result.add(clientUserVO);
+    }
     return new GridPage<>(clientUserQueryRequest.getRows(), clientUserQueryRequest.getPage(),
-        objects.getTotal(), clientUserVOS);
+            clientUserVOS.size(), result);
   }
 
   /**

+ 1 - 1
src/main/resources/application.yml

@@ -1,4 +1,4 @@
 #环境配置
 spring:
   profiles:
-    active: dev
+    active: prod

+ 2 - 2
src/main/resources/mapper/refundManagement/RefundManagementMapper.xml

@@ -205,8 +205,8 @@
             <if test="quotaDisburseBatch == null">
                 and tt.quota_disburse_batch is null
             </if>
-            AND tt.amount_type NOT IN
-            (SELECT mm.amount_type FROM refund_details mm WHERE mm.refund_management_id = #{id})
+            AND tt.ledger_fund_goods_assign_id NOT IN
+            (SELECT nn.ledger_fund_goods_assign_id from refund_details nn where nn.refund_management_id = a.id)
         </where>
         )
     </select>

+ 1 - 0
src/main/resources/mapper/smb/FinancingFromInvestorsMapper.xml

@@ -66,6 +66,7 @@
                   </foreach>
               </if>
         </where>
+            order by  FIELD(t1.credit_status, '', 'smb_07', 'smb_01', 'smb_02', 'smb_03'), t6.effective_date desc
     </select>
 
 </mapper>

+ 1 - 0
src/main/resources/mapper/smb/FinancingLoanInfoMapper.xml

@@ -69,6 +69,7 @@
                 OR t2.corporate_name LIKE CONCAT('%',#{fastSearch},'%'))
             </if>
         </where>
+            order by FIELD(t1.payout_status,'01','02','03'),t1.gmt_modified desc
     </select>
 
 </mapper>