Explorar o código

Merge remote-tracking branch 'origin/dev1.0' into dev1.0

zhangc hai 9 meses
pai
achega
06c599d183
Modificáronse 17 ficheiros con 192 adicións e 61 borrados
  1. 16 17
      src/main/java/com/sunxung/factoring/entity/cashflowmanage/request/AddCashFlowRequest.java
  2. 13 2
      src/main/java/com/sunxung/factoring/entity/credit/CreditDetail.java
  3. 18 0
      src/main/java/com/sunxung/factoring/entity/credit/CreditInfo.java
  4. 14 0
      src/main/java/com/sunxung/factoring/entity/financing/contract/SysCustomer.java
  5. 14 0
      src/main/java/com/sunxung/factoring/entity/financing/contract/UploadContractInfo.java
  6. 3 3
      src/main/java/com/sunxung/factoring/entity/invoicemanage/PurchaseInvoiceHisInfo.java
  7. 15 0
      src/main/java/com/sunxung/factoring/entity/ledger/LedgerAccountBasicInfo.java
  8. 2 2
      src/main/java/com/sunxung/factoring/service/credit/CreditService.java
  9. 53 24
      src/main/java/com/sunxung/factoring/service/credit/impl/CreditServiceImpl.java
  10. 18 7
      src/main/java/com/sunxung/factoring/service/financing/contract/impl/ContractMakingServiceImpl.java
  11. 1 1
      src/main/java/com/sunxung/factoring/service/financing/contract/impl/NewContractMakingServiceImpl.java
  12. 2 1
      src/main/java/com/sunxung/factoring/service/invoicemanage/impl/InvoiceBasicInfoServiceImpl.java
  13. 2 1
      src/main/java/com/sunxung/factoring/service/settlement/impl/SettlementManagementServiceImpl.java
  14. 2 1
      src/main/java/com/sunxung/factoring/web/credit/CreditController.java
  15. 2 1
      src/main/resources/data/update/v1.0/liujia.sql
  16. 2 0
      src/main/resources/mapper/customerinformation/ElectronicSignaturePersonalMapper.xml
  17. 15 1
      src/main/resources/mapper/ledger/LedgerAccountBasicInfoMapper.xml

+ 16 - 17
src/main/java/com/sunxung/factoring/entity/cashflowmanage/request/AddCashFlowRequest.java

@@ -1,6 +1,5 @@
 package com.sunxung.factoring.entity.cashflowmanage.request;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -12,36 +11,36 @@ import java.util.Date;
 public class AddCashFlowRequest {
 
 
-  private Long id;
+    private Long id;
 
-  private Long companyId;//   '企业id',
+    private Long companyId;//   '企业id',
 
-  private Long accountBelong; //账户归属   长银 非长银 资方',
+    private Long accountBelong; //账户归属   长银 非长银 资方',
 
-  private Long companyBelong;  //公司归属',
+    private Long companyBelong;  //公司归属',
 
-  private Long bankAccountId; // 'sop 查询',
+    private Long bankAccountId; // 'sop 查询',
 
-  private String bankName;  // "sop" 银行名称
+    private String bankName;  // "sop" 银行名称
 
-  private String bankAccount; // sop 银行账号
+    private String bankAccount; // sop 银行账号
 
-  private Long businessType; //业务类型
+    private Long businessType; //业务类型
 
-  private String businessTypeNumber; //业务类型编号
+    private String businessTypeNumber; //业务类型编号
 
-  private String type; //'入账类型  现金/票据',
+    private String type; //'入账类型  现金/票据',
 
-  private Date incomeDate;// '入账日期',
+    private Date incomeDate;// '入账日期',
 
-  private BigDecimal incomeAmount; //'入账金额',
+    private BigDecimal incomeAmount; //'入账金额',
 
-  private BigDecimal invoiceAmount;  // '票据金额',
+    private BigDecimal invoiceAmount;  // '票据金额',
 
-  private BigDecimal realAmount; // '实际金额',
+    private BigDecimal realAmount; // '实际金额',
 
-  private String remark;//  '备注',
+    private String remark;//  '备注',
 
-  private String content;  //富文本内容
+    private String content;  //富文本内容
 
 }

+ 13 - 2
src/main/java/com/sunxung/factoring/entity/credit/CreditDetail.java

@@ -1,6 +1,9 @@
 package com.sunxung.factoring.entity.credit;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.sunxung.factoring.entity.BaseEntity;
+import com.sunxung.factoring.entity.sys.FileStorage;
+import com.sunxung.factoring.entity.sys.FileStorageDO;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -13,12 +16,20 @@ public class CreditDetail extends BaseEntity {
     //征信id
     private Long creditId;
 
-    //授权书地址
+    //授权书Id
     private String authAddress;
 
-    //征信地址
+    //授权书文件
+    @TableField(exist = false)
+    private FileStorage authAddressFile;
+
+    //征信地址id
     private String creditAddress;
 
+    //征信地址文件
+    @TableField(exist = false)
+    private FileStorage creditAddressFile;
+
     //征信查询时间
     private Date searchDate;
 

+ 18 - 0
src/main/java/com/sunxung/factoring/entity/credit/CreditInfo.java

@@ -2,6 +2,8 @@ package com.sunxung.factoring.entity.credit;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.sunxung.factoring.entity.BaseEntity;
+import com.sunxung.factoring.entity.sys.FileStorage;
+import com.sunxung.factoring.entity.sys.FileStorageDO;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -30,9 +32,17 @@ public class CreditInfo extends BaseEntity {
     //身份证正面
     private String cardPhoto;
 
+    //身份证正面文件
+    @TableField(exist = false)
+    private FileStorage cardPhotoFile;
+
     //身份证反面
     private String cardRevPhoto;
 
+    //身份证反面文件
+    @TableField(exist = false)
+    private FileStorage cardRevPhotoFile;
+
     //最近征信查询时间
     private Date searchDate;
 
@@ -40,10 +50,18 @@ public class CreditInfo extends BaseEntity {
     @TableField(exist = false)
     private String authAddress;
 
+    //授权书地址
+    @TableField(exist = false)
+    private FileStorage authAddressFile;
+
     //征信地址
     @TableField(exist = false)
     private String creditAddress;
 
+    //征信地址
+    @TableField(exist = false)
+    private FileStorage creditAddressFile;
+
     //征信详情
     @TableField(exist = false)
     private List<CreditDetail> creditDetails;

+ 14 - 0
src/main/java/com/sunxung/factoring/entity/financing/contract/SysCustomer.java

@@ -27,6 +27,12 @@ public class SysCustomer extends BaseEntity {
     @TableField("ent_business_id")
     private Long entBusinessId;
 
+    /**
+     * 贸易平台id
+     */
+    @TableField("platform_id")
+    private Long platformId;
+
     /**
      * 企业认证状态 0:未认证 1:已认证
      */
@@ -342,4 +348,12 @@ public class SysCustomer extends BaseEntity {
     public void setElectronicPersonInfo(ElectronicPersonInfo electronicPersonInfo) {
         this.electronicPersonInfo = electronicPersonInfo;
     }
+
+    public Long getPlatformId() {
+        return platformId;
+    }
+
+    public void setPlatformId(Long platformId) {
+        this.platformId = platformId;
+    }
 }

+ 14 - 0
src/main/java/com/sunxung/factoring/entity/financing/contract/UploadContractInfo.java

@@ -52,6 +52,12 @@ public class UploadContractInfo extends BaseEntity {
     @TableField(exist = false)
     private List<UploadContractSignatory> uploadContractSignatories;
 
+    /**
+     * 签署人名称集合
+     */
+    @TableField(exist = false)
+    private List<String> signatoryNameList;
+
     public Long getContractInfoId() {
         return contractInfoId;
     }
@@ -99,4 +105,12 @@ public class UploadContractInfo extends BaseEntity {
     public void setFileStorage(FileStorage fileStorage) {
         this.fileStorage = fileStorage;
     }
+
+    public List<String> getSignatoryNameList() {
+        return signatoryNameList;
+    }
+
+    public void setSignatoryNameList(List<String> signatoryNameList) {
+        this.signatoryNameList = signatoryNameList;
+    }
 }

+ 3 - 3
src/main/java/com/sunxung/factoring/entity/invoicemanage/PurchaseInvoiceHisInfo.java

@@ -30,7 +30,7 @@ public class PurchaseInvoiceHisInfo extends BaseEntity {
      **/
     @NotNull(message = "数量")
     @TableField(value = "invoice_num")
-    private Long nvoiceNum;
+    private BigDecimal nvoiceNum;
     /**
      * 金额
      */
@@ -72,11 +72,11 @@ public class PurchaseInvoiceHisInfo extends BaseEntity {
         this.nvoiceNumber = nvoiceNumber;
     }
 
-    public Long getNvoiceNum() {
+    public BigDecimal getNvoiceNum() {
         return nvoiceNum;
     }
 
-    public void setNvoiceNum(Long nvoiceNum) {
+    public void setNvoiceNum(BigDecimal nvoiceNum) {
         this.nvoiceNum = nvoiceNum;
     }
 

+ 15 - 0
src/main/java/com/sunxung/factoring/entity/ledger/LedgerAccountBasicInfo.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.sunxung.factoring.entity.BaseEntity;
 import com.sunxung.factoring.entity.ledger.vo.GoodsAssignVo;
+import com.sunxung.factoring.entity.sys.Dictionary;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -54,6 +55,12 @@ public class LedgerAccountBasicInfo extends BaseEntity {
     @TableField("ledger_status")
     private String ledgerStatus;
 
+    /**
+     * 分账状态字典项
+     */
+    @TableField(exist = false)
+    private Dictionary ledgerStatusDict;
+
     /**
      * 币种
      */
@@ -216,4 +223,12 @@ public class LedgerAccountBasicInfo extends BaseEntity {
     public void setAssignVoList(List<GoodsAssignVo> assignVoList) {
         this.assignVoList = assignVoList;
     }
+
+    public Dictionary getLedgerStatusDict() {
+        return ledgerStatusDict;
+    }
+
+    public void setLedgerStatusDict(Dictionary ledgerStatusDict) {
+        this.ledgerStatusDict = ledgerStatusDict;
+    }
 }

+ 2 - 2
src/main/java/com/sunxung/factoring/service/credit/CreditService.java

@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.sunxung.factoring.entity.GridPage;
 import com.sunxung.factoring.entity.credit.CreditInfo;
 import com.sunxung.factoring.entity.entprise.Enterprise;
-import com.sunxung.factoring.entity.sys.FileStorageDO;
+import com.sunxung.factoring.entity.sys.FileStorage;
 
 import java.util.List;
 
@@ -16,7 +16,7 @@ public interface CreditService extends IService<CreditInfo> {
 
     void update(CreditInfo creditInfo);
 
-    FileStorageDO getAuthAddress(String cardNo) throws Exception;
+    FileStorage getAuthAddress(String cardNo) throws Exception;
 
     List<Enterprise> getBusinessByKeyWord(String keyword);
 

+ 53 - 24
src/main/java/com/sunxung/factoring/service/credit/impl/CreditServiceImpl.java

@@ -9,24 +9,20 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
 import com.sunxung.factoring.component.config.FileUploadProperties;
-import com.sunxung.factoring.component.exception.ServiceException;
 import com.sunxung.factoring.component.exception.ValidatorException;
 import com.sunxung.factoring.component.util.ElectronicSignatureUtil;
-import com.sunxung.factoring.component.util.FileUtil;
-import com.sunxung.factoring.component.util.HttpClientUtil;
 import com.sunxung.factoring.dict.impl.FileModuleDict;
 import com.sunxung.factoring.entity.GridPage;
 import com.sunxung.factoring.entity.credit.CreditDetail;
 import com.sunxung.factoring.entity.credit.CreditInfo;
-import com.sunxung.factoring.entity.customerinformation.ElectronicSignaturePersonal;
 import com.sunxung.factoring.entity.entprise.Enterprise;
-import com.sunxung.factoring.entity.sys.FileStorageDO;
+import com.sunxung.factoring.entity.sys.FileStorage;
 import com.sunxung.factoring.mapper.credit.CreditInfoMapper;
 import com.sunxung.factoring.mapper.customerinformation.ElectronicSignaturePersonalMapper;
 import com.sunxung.factoring.service.credit.CreditDetailService;
 import com.sunxung.factoring.service.credit.CreditService;
-import com.sunxung.factoring.service.customerinformation.IElectronicSignaturePersonalService;
-import com.sunxung.factoring.service.sys.FileService;
+import com.sunxung.factoring.service.sys.FileStorageService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -54,7 +50,7 @@ public class CreditServiceImpl extends ServiceImpl<CreditInfoMapper, CreditInfo>
     private ElectronicSignaturePersonalMapper electronicSignaturePersonalMapper;
 
     @Autowired
-    private FileService fileService;
+    private FileStorageService fileStorageService;
 
     @Value("${sop.getBusinessByKeyWordUrl}")
     private String getBusinessByKeyWordUrl;
@@ -63,10 +59,10 @@ public class CreditServiceImpl extends ServiceImpl<CreditInfoMapper, CreditInfo>
     public GridPage findByName(String name, Integer type, Integer page, Integer rows) {
         Page objectPage = PageHelper.startPage(page, rows);
         List<CreditInfo> list ;
-        list = lambdaQuery().eq(CreditInfo::getType,type).like(CreditInfo::getName, name).list();
+        list = lambdaQuery().eq(CreditInfo::getType,type).like(CreditInfo::getName, name).orderByDesc(CreditInfo::getGmtCreate).list();
         return new GridPage(rows,page,objectPage.getTotal(),list);
     }
-
+                                                                     
     @Override
     public void add(CreditInfo creditInfo) {
         CreditInfo creditInfo1 = this.getOne(new QueryWrapper<CreditInfo>().eq("card_no", creditInfo.getCardNo()));
@@ -86,8 +82,36 @@ public class CreditServiceImpl extends ServiceImpl<CreditInfoMapper, CreditInfo>
     @Override
     public CreditInfo get(Long id) {
         CreditInfo creditInfo = getById(id);
+        if (StringUtils.isNotEmpty(creditInfo.getCardPhoto())){
+            FileStorage fileStorage = fileStorageService.get(Long.valueOf(creditInfo.getCardPhoto()));
+            creditInfo.setCardPhotoFile(fileStorage);
+        }
+        if (StringUtils.isNotEmpty(creditInfo.getCardRevPhoto())){
+            FileStorage fileStorage = fileStorageService.get(Long.valueOf(creditInfo.getCardRevPhoto()));
+            creditInfo.setCardRevPhotoFile(fileStorage);
+        }
+        if (StringUtils.isNotEmpty(creditInfo.getAuthAddress())){
+            FileStorage fileStorage = fileStorageService.get(Long.valueOf(creditInfo.getAuthAddress()));
+            creditInfo.setAuthAddressFile(fileStorage);
+        }
+        if (StringUtils.isNotEmpty(creditInfo.getCreditAddress())){
+            FileStorage fileStorage = fileStorageService.get(Long.valueOf(creditInfo.getCreditAddress()));
+            creditInfo.setCreditAddressFile(fileStorage);
+        }
         List<CreditDetail> creditDetails = creditDetailService.getByCreditId(id);
-        creditInfo.setCreditDetails(creditDetails);
+        if (CollectionUtil.isNotEmpty(creditDetails)){
+            for (CreditDetail creditDetail : creditDetails){
+                if (StringUtils.isNotEmpty(creditDetail.getAuthAddress())){
+                    FileStorage fileStorage = fileStorageService.get(Long.valueOf(creditDetail.getAuthAddress()));
+                    creditDetail.setAuthAddressFile(fileStorage);
+                }
+                if (StringUtils.isNotEmpty(creditDetail.getCreditAddress())){
+                    FileStorage fileStorage = fileStorageService.get(Long.valueOf(creditDetail.getCreditAddress()));
+                    creditDetail.setCreditAddressFile(fileStorage);
+                }
+            }
+            creditInfo.setCreditDetails(creditDetails);
+        }
         return creditInfo;
     }
 
@@ -95,17 +119,20 @@ public class CreditServiceImpl extends ServiceImpl<CreditInfoMapper, CreditInfo>
     public void update(CreditInfo creditInfo) {
         //更新最近查询时间
         updateById(creditInfo);
-        CreditDetail creditDetail = new CreditDetail();
-        creditDetail.setCreditId(creditInfo.getId());
-        creditDetail.setAuthAddress(creditInfo.getAuthAddress());
-        creditDetail.setCreditAddress(creditInfo.getCreditAddress());
-        creditDetail.setSearchDate(creditInfo.getSearchDate());
-        creditDetailService.add(creditDetail);
+        if ((creditInfo.getType() == 1 && StringUtils.isNotEmpty(creditInfo.getCreditAddress()) ) ||
+                (creditInfo.getType() == 0 && (StringUtils.isNotEmpty(creditInfo.getCreditAddress()) || creditInfo.getSearchDate() != null))){
+            CreditDetail creditDetail = new CreditDetail();
+            creditDetail.setCreditId(creditInfo.getId());
+            creditDetail.setAuthAddress(creditInfo.getAuthAddress());
+            creditDetail.setCreditAddress(creditInfo.getCreditAddress());
+            creditDetail.setSearchDate(creditInfo.getSearchDate());
+            creditDetailService.add(creditDetail);
+        }
     }
 
     @Override
-    public FileStorageDO getAuthAddress(String cardNo) throws Exception {
-        FileStorageDO result = null;
+    public FileStorage getAuthAddress(String cardNo) throws Exception {
+        FileStorage result = null;
         List<Enterprise> list = electronicSignaturePersonalMapper.findByComName(cardNo, null);
         for (Enterprise enterprise : list) {
             if (enterprise.getCertificateSignStatus() == 1){
@@ -113,7 +140,7 @@ public class CreditServiceImpl extends ServiceImpl<CreditInfoMapper, CreditInfo>
                 String url = ElectronicSignatureUtil.downloadContract(contractId);
                 //下载征信授权书
                 result = createFileStorage("征信授权书", ".pdf", FileModuleDict.ChildEnum.CREDIT_AUTH.getCode());
-                fileService.save(result);
+                fileStorageService.add(result);
                 downloadFile(url,result.getAbsolutePath());
                 break;
             }
@@ -122,18 +149,20 @@ public class CreditServiceImpl extends ServiceImpl<CreditInfoMapper, CreditInfo>
     }
 
 
-    public static FileStorageDO createFileStorage(String name,String suffix,
+    public static FileStorage createFileStorage(String name,String suffix,
                                                    String fileBusinessEnum) {
-        FileStorageDO fileStorageDO = new FileStorageDO();
+        FileStorage fileStorageDO = new FileStorage();
         fileStorageDO.setOriginalName(name);
-        fileStorageDO.setType(suffix);
+        fileStorageDO.setFileType(suffix);
         String newFileName = IdUtil.fastSimpleUUID() + suffix;
         FileUploadProperties bean = SpringUtil.getBean(FileUploadProperties.class);
         fileStorageDO.setPath(fileBusinessEnum + File.separator + newFileName);
         File file = new File(bean.getStoragePath() + File.separator + fileBusinessEnum + File.separator
                 + newFileName);
         fileStorageDO.setAbsolutePath(file.getAbsolutePath());
-        fileStorageDO.setBusinessType(fileBusinessEnum);
+        FileStorage.Belong belong = new FileStorage.Belong();
+        belong.setBelongType(fileBusinessEnum);
+        fileStorageDO.setBelong(belong);
         return fileStorageDO;
     }
 

+ 18 - 7
src/main/java/com/sunxung/factoring/service/financing/contract/impl/ContractMakingServiceImpl.java

@@ -522,8 +522,12 @@ public class ContractMakingServiceImpl implements ContractMakingService {
                 for (UploadContractInfo uploadContractInfo : uploadContractInfoList) {
                     List<UploadContractSignatory> signatoryList = uploadContractSignatoryService.list(new QueryWrapper<UploadContractSignatory>()
                             .eq("upload_contract_info_Id", uploadContractInfo.getId()));
-                    uploadContractInfo.setUploadContractSignatories(signatoryList);
-                    if (uploadContractInfo.getFileStorageId()!=null){
+                    if (CollectionUtil.isNotEmpty(signatoryList)) {
+                        List<String> signatoryNameList = signatoryList.stream().map(UploadContractSignatory::getName).collect(Collectors.toList());
+                        uploadContractInfo.setUploadContractSignatories(signatoryList);
+                        uploadContractInfo.setSignatoryNameList(signatoryNameList);
+                    }
+                    if (uploadContractInfo.getFileStorageId() != null) {
                         FileStorage fileStorage = fileStorageService.get(uploadContractInfo.getFileStorageId());
                         uploadContractInfo.setFileStorage(fileStorage);
                     }
@@ -823,8 +827,8 @@ public class ContractMakingServiceImpl implements ContractMakingService {
         //合同自动签署
         String signKeyword = autoSignKeyword;
         //获取长安银科商业保理有限公司的customerid
-        SysCustomer sysCustomer = sysCustomerService.getCustomerIdBySocialCreditCode("91610132MA6U08HU0L");
-        ElectronicSignatureUtil.autoSign(transactionId, contractId, sysCustomer.getFddCustomerId(), docTitle, signKeyword);
+        Platform platform = platformService.getOne(new QueryWrapper<Platform>().eq("socialCreditCode", "91610132MA6U08HU0L"));
+        ElectronicSignatureUtil.autoSign(transactionId, contractId, platform.getFddCustomerId(), docTitle, signKeyword);
         contractElectronicInfo.setAutoSignTransactionId(transactionId);
         contractElectronicInfoService.save(contractElectronicInfo);
         for (ContractElectronicCustomerInfo contractElectronicCustomerInfo : contractElectronicCustomerInfos) {
@@ -872,7 +876,14 @@ public class ContractMakingServiceImpl implements ContractMakingService {
                     } else {
                         SysCustomer customer = new SysCustomer();
                         customer.setAccountType("2");
-                        customer.setEntBusinessId(enterpriseBusinessInfo.getId());
+                        if (enterpriseBusinessInfo != null) {
+                            customer.setEntBusinessId(enterpriseBusinessInfo.getId());
+                        } else {
+                            Platform platform = platformService.getOne(new QueryWrapper<Platform>().eq("socialCreditCode", uploadContractSignatory.getSocialCreditCode()));
+                            if (platform != null) {
+                                customer.setPlatformId(platform.getId());
+                            }
+                        }
                         sysCustomerService.add(customer);
                         ContractElectronicCustomerInfo contractElectronicCustomerInfo = new ContractElectronicCustomerInfo("khqz" + keyword, customer.getFddCustomerId());
                         contractElectronicCustomerInfo.setSysCustomerId(customer.getId());
@@ -956,8 +967,8 @@ public class ContractMakingServiceImpl implements ContractMakingService {
         //合同自动签署
         String signKeyword = autoSignKeyword;
         //获取长安银科商业保理有限公司的customerid
-        SysCustomer sysCustomer = sysCustomerService.getCustomerIdBySocialCreditCode("91610132MA6U08HU0L");
-        ElectronicSignatureUtil.autoSign(transactionId, contractId, sysCustomer.getFddCustomerId(), docTitle, signKeyword);
+        Platform platform = platformService.getOne(new QueryWrapper<Platform>().eq("socialCreditCode", "91610132MA6U08HU0L"));
+        ElectronicSignatureUtil.autoSign(transactionId, contractId, platform.getFddCustomerId(), docTitle, signKeyword);
         contractElectronicInfo.setAutoSignTransactionId(transactionId);
         contractElectronicInfoService.save(contractElectronicInfo);
         for (ContractElectronicCustomerInfo contractElectronicCustomerInfo : contractElectronicCustomerInfos) {

+ 1 - 1
src/main/java/com/sunxung/factoring/service/financing/contract/impl/NewContractMakingServiceImpl.java

@@ -259,7 +259,7 @@ public class NewContractMakingServiceImpl implements INewContractMakingService {
             dataMap.put("day", DateUtil.getDay(date));
             if (type.equals(ConstantConversionUtil.POOLFACTORINGBUSINESSCONTRACT)) {
                 ClassPathResource classPathResource = new ClassPathResource("ftl/contractTemplate/24、池保理业务合同.docx");
-                template = XWPFTemplate.compile(classPathResource.getPath()).render(dataMap);
+                template = XWPFTemplate.compile(classPathResource.getInputStream()).render(dataMap);
                 path = FileUtil.getAbsolutePath("池保理业务合同" + applicantCompanyName, ".docx", FileModuleDict.ChildEnum.CONTRACT_FILE_PREVIEW);
                 File file = new File(path);
                 if (!file.exists()) {

+ 2 - 1
src/main/java/com/sunxung/factoring/service/invoicemanage/impl/InvoiceBasicInfoServiceImpl.java

@@ -259,9 +259,10 @@ public class InvoiceBasicInfoServiceImpl extends ServiceImpl<InvoiceBasicInfoMap
             sysAttachmentRefService.saveFileAndRefHis(accepyanceFile, attachmentDtoPendindInvoic);
             FileStorageDO fileStorageDO = new FileStorageDO();
             fileStorageDO.setAbsolutePath(fileStorage.getAbsolutePath());
-            fileStorageDO.setFilePath(fileStorage.getPath());
+            fileStorageDO.setPath(fileStorage.getPath());
             fileStorageDO.setOriginalName(fileStorage.getOriginalName());
             fileStorageDO.setSize(fileStorage.getSize());
+            fileStorageDO.setType(fileStorage.getFileType());
             fileStorageDO.setBusinessType(FileModuleDict.ChildEnum.INVOICE_SALES_FILE.getCode());
             fileStorageDO.setBusinessId(invoiceBasicInfo.getId());
             fileService.save(fileStorageDO);

+ 2 - 1
src/main/java/com/sunxung/factoring/service/settlement/impl/SettlementManagementServiceImpl.java

@@ -1462,9 +1462,10 @@ public class SettlementManagementServiceImpl implements SettlementManagementServ
                 sysAttachmentRefService.saveFileAndRefHis(accepyanceFile, attachmentDtoAcceptanceFile);
                 FileStorageDO fileStorageDO = new FileStorageDO();
                 fileStorageDO.setAbsolutePath(fileStorage.getAbsolutePath());
-                fileStorageDO.setFilePath(fileStorage.getPath());
+                fileStorageDO.setPath(fileStorage.getPath());
                 fileStorageDO.setOriginalName(fileStorage.getOriginalName());
                 fileStorageDO.setSize(fileStorage.getSize());
+                fileStorageDO.setType(fileStorage.getFileType());
                 fileStorageDO.setBusinessType(FileModuleDict.ChildEnum.SETTLEMENT_UPSTREAM_UNSIGNED_FILE.getCode());
                 fileStorageDO.setBusinessId(settlementBasicInfo.getId());
                 fileService.save(fileStorageDO);

+ 2 - 1
src/main/java/com/sunxung/factoring/web/credit/CreditController.java

@@ -8,6 +8,7 @@ import com.sunxung.factoring.entity.ResponseJson;
 import com.sunxung.factoring.entity.credit.CreditInfo;
 import com.sunxung.factoring.entity.customerinformation.ElectronicSignaturePersonal;
 import com.sunxung.factoring.entity.entprise.Enterprise;
+import com.sunxung.factoring.entity.sys.FileStorage;
 import com.sunxung.factoring.entity.sys.FileStorageDO;
 import com.sunxung.factoring.service.credit.CreditService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -71,7 +72,7 @@ public class CreditController {
     @ResponseBody
     @PostMapping("getAuthAddress")
     public ResponseJson getAuthAddress(String cardNo) throws Exception {
-        FileStorageDO authAddress = creditService.getAuthAddress(cardNo);
+        FileStorage authAddress = creditService.getAuthAddress(cardNo);
         return new ResponseJson(authAddress);
     }
 

+ 2 - 1
src/main/resources/data/update/v1.0/liujia.sql

@@ -1123,7 +1123,8 @@ CREATE TABLE `contract_electronic_customer_info` (
 DROP TABLE IF EXISTS `sys_customer`;
 CREATE TABLE `sys_customer` (
         `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
-        `ent_business_id` bigint(20) NOT NULL COMMENT '企业工商信息表id',
+        `ent_business_id` bigint(20) DEFAULT NULL COMMENT '企业工商信息表id',
+        `platform_id` bigint(20) DEFAULT NULL COMMENT '贸易平台id',
         `auth_status` tinyint(1) DEFAULT '0' COMMENT '企业认证状态 0:未认证 1:已认证',
         `auto_sign_status` tinyint(1) DEFAULT '0' COMMENT '企业授权自动签署状态 0:未认证 1:已认证',
         `auth_url` varchar(1024) DEFAULT NULL COMMENT '认证链接',

+ 2 - 0
src/main/resources/mapper/customerinformation/ElectronicSignaturePersonalMapper.xml

@@ -13,6 +13,7 @@
                 and auth_status = #{status}
             </if>
         </where>
+        order by gmt_create desc
     </select>
 
     <select id="findByName" resultType="com.sunxung.factoring.entity.customerinformation.ElectronicSignaturePersonal">
@@ -25,5 +26,6 @@
                 and auth_status = #{status}
             </if>
         </where>
+        order by gmt_create desc
     </select>
 </mapper>

+ 15 - 1
src/main/resources/mapper/ledger/LedgerAccountBasicInfoMapper.xml

@@ -14,8 +14,9 @@
 		<result property="goodsAmount" column="goods_amount" />
 		<result property="gmtModified" column="gmt_modified" />
 <!--		<association property="currency" column="currency" resultMap="currencyResult" />-->
-		<result property="ledgerStatus" column="ledger_status"/>
+<!--		<result property="ledgerStatus" column="ledger_status"/>-->
 		<result property="ledgerType" column="ledger_type" />
+		<association property="ledgerStatusDict" column="ledger_status" resultMap="dictionaryResult"/>
 		<collection property="assignVoList" ofType="com.sunxung.factoring.entity.ledger.vo.GoodsAssignVo"
 					select="com.sunxung.factoring.mapper.ledger.LedgerAccountBasicInfoMapper.findAssignList" column="{id=id}">
 			<result property="contractNo" column="contract_no" />
@@ -28,6 +29,12 @@
 		</collection>
 	</resultMap>
 
+	<resultMap id="dictionaryResult" type="Dictionary">
+		<result property="id" column="did" />
+		<result property="name" column="dname" />
+		<result property="code" column="dcode" />
+	</resultMap>
+
     <select id="findAll" resultMap="baseResultMap">
 		SELECT DISTINCT
 			tt.id,
@@ -36,6 +43,9 @@
 # 		    tt.cid,
 # 		    tt.ccode,
 # 		    tt.cname,
+			tt.did,
+			tt.dcode,
+			tt.dname,
 		    tt.ledger_status,
 			tt.ledger_type,
 		    tt.gmt_modified
@@ -49,6 +59,9 @@
 # 			t4.code ccode,
 			t1.ledger_amount,
 			t1.ledger_status,
+			t3.id did,
+			t3.name dname,
+			t3.code dcode,
 			t1.ledger_type,
 			t5.business_number,
 			t6.project_name,
@@ -57,6 +70,7 @@
 			t1.gmt_modified
 			FROM
 			ledger_account_basic_info t1
+			LEFT JOIN t_dictionary t3 ON t1.ledger_status = t3.code
 			LEFT JOIN ledger_fund_goods_assign t5 ON t1.id = t5.ledger_account_basic_info_id
 			LEFT JOIN c_project_information t6 ON t5.business_number = t6.business_number
 			LEFT JOIN c_project_core_enterprise t7 ON t6.id = t7.c_project_information_id