Browse Source

房地产开发贷款维护维护、业务配置、表外风险暴漏维护(三个功能)代码提交

username 6 months ago
parent
commit
61af612801
30 changed files with 4851 additions and 0 deletions
  1. 122 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/action/BusinessAction.java
  2. 104 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/action/RealEstateAction.java
  3. 24 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/mapper/BusinessMapper.java
  4. 19 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/mapper/RealEstateMapper.java
  5. 84 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/model/BusinessModel.java
  6. 182 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/model/RealEstateModel.java
  7. 141 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/model/SubjectListModel.java
  8. 157 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/mybatis/BusinessMapper.xml
  9. 184 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/mybatis/RealEstateMapper.xml
  10. 172 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/service/BusinessService.java
  11. 156 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/service/RealEstateService.java
  12. 93 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/action/InfoListAction.java
  13. 30 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/mapper/InfoListMapper.java
  14. 145 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/model/RiskExposureClassRuleModel.java
  15. 154 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/model/RiskExposureDefinitionModel.java
  16. 255 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/mybatis/InfoListMapper.xml
  17. 69 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/service/InfoListService.java
  18. 78 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/action/RuleAction.java
  19. 19 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/mapper/RuleMapper.java
  20. 194 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/model/RuleModel.java
  21. 207 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/mybatis/RuleMapper.xml
  22. 97 0
      Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/service/RuleService.java
  23. 502 0
      Procedure/frontend/projectb/src/pages/rwa_calc_config_001riskexposure/info.tsx
  24. 347 0
      Procedure/frontend/projectb/src/pages/rwa_calc_config_acquisition/rule.tsx
  25. 395 0
      Procedure/frontend/projectb/src/pages/rwa_calc_config_dataparam/bussiness.tsx
  26. 339 0
      Procedure/frontend/projectb/src/pages/rwa_calc_config_dataparam/realestate.tsx
  27. 155 0
      Procedure/frontend/projectb/src/services/rwa/rwa_calc_config_001riskexposure/info.ts
  28. 150 0
      Procedure/frontend/projectb/src/services/rwa/rwa_calc_config_acquisition/rule.ts
  29. 158 0
      Procedure/frontend/projectb/src/services/rwa/rwa_calc_config_dataparam/bussiness.ts
  30. 119 0
      Procedure/frontend/projectb/src/services/rwa/rwa_calc_config_dataparam/realestate.ts

+ 122 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/action/BusinessAction.java

@@ -0,0 +1,122 @@
+package com.sundata.product.rwa.rwacalcconfigdataparam.action;
+
+import com.sundata.common.base.BaseAction;
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.BusinessModel;
+import com.sundata.product.rwa.rwacalcconfigdataparam.service.BusinessService;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.List;
+
+@Controller
+@RequestMapping("product/rwa/rwacalcconfigdataparam/BusinessAction")
+public class BusinessAction extends BaseAction {
+
+    // 日志
+    static final Logger log = LoggerFactory.getLogger(BusinessAction.class);
+
+    @Autowired
+    BusinessService businessService;
+
+    @RequestMapping("/updateExistData")
+    public void updateExistData(HttpServletRequest request, HttpServletResponse response,
+                                @RequestBody BusinessModel model, @RequestParam String businessCode){
+        // 改
+        sendData(response, businessService.updateExistData(model,businessCode));
+    }
+
+    @RequestMapping("/deleteRows")
+    public void deleteRows(HttpServletRequest request, HttpServletResponse response,@RequestParam String businessCode) {
+        businessService.deleteRows(businessCode);
+    }
+
+    @RequestMapping("/createDetailData")
+    public void createDetailData(HttpServletRequest request, HttpServletResponse response,
+                                @RequestBody BusinessModel model){
+        // 新增
+        businessService.createDetailData(model);
+    }
+
+    @RequestMapping("/selectDataList")
+    public void selectDataList (HttpServletRequest request, HttpServletResponse response,
+                                @RequestBody BusinessModel model) {
+        // 初始化
+        sendData(response, businessService.selectDataList(model));
+    }
+
+    // 查询当前行
+    @RequestMapping("/selectRowData")
+    public void selectRowData (HttpServletRequest request, HttpServletResponse response,
+                               @RequestBody BusinessModel model) {
+        sendData(response, businessService.selectRowData(model));
+    }
+
+
+    @RequestMapping("/exportExcelModel")
+    public void exportExcelModel (HttpServletRequest request, HttpServletResponse response,
+                                  @RequestParam String fileNameCode, @RequestBody List<BusinessModel> modelList) throws IOException {
+
+        try {
+            request.setCharacterEncoding("UTF-8");
+            response.setContentType("test/html; charset=UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            throw new RuntimeException(e);
+        }
+        // 导出数据
+        businessService.exportExcelModel(response,fileNameCode,modelList);
+        // sendData(response, businessService.exportExcelModel(response,fileNameCode,modelList));
+    }
+
+    @RequestMapping("/importExcelModel")
+    public void importExcelModel (HttpServletRequest request,
+                                  HttpServletResponse response, @RequestParam("rfile") MultipartFile file) {
+        // 输入流对象
+        InputStream io;
+        try {
+            // 获取前端上传文件流
+            io = file.getInputStream();
+            // 上传文件
+            businessService.importExcelModel(io,file);
+            // sendData(response, businessService.importExcelModel(io,file));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+
+    @RequestMapping("/templateUploadModel")
+    public void templateUploadModel (HttpServletRequest request,
+                                     HttpServletResponse response,@RequestParam String fileNameCode) throws IOException {
+
+        // 模板下载
+        businessService.templateUploadModel(response,fileNameCode);
+    }
+
+
+    @RequestMapping("/selectProductData")
+    public void selectProductData (HttpServletRequest request,
+                                     HttpServletResponse response,@RequestParam String productBussinessCode) throws IOException {
+
+        // 产品列表查看
+        sendData(response,businessService.selectProductData(productBussinessCode));
+    }
+
+    @RequestMapping("/selectSubjectData")
+    public void selectSubjectData (HttpServletRequest request,
+                                   HttpServletResponse response,@RequestParam String productBussinessCode) throws IOException {
+
+        // 产品列表查看
+        sendData(response,businessService.selectSubjectData(productBussinessCode));
+    }
+
+
+}

+ 104 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/action/RealEstateAction.java

@@ -0,0 +1,104 @@
+package com.sundata.product.rwa.rwacalcconfigdataparam.action;
+
+import com.sundata.common.base.BaseAction;
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.RealEstateModel;
+import com.sundata.product.rwa.rwacalcconfigdataparam.service.RealEstateService;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.List;
+
+@Controller
+@RequestMapping("product/rwa/rwacalcconfigdataparam/RealEstateAction")
+public class RealEstateAction extends BaseAction {
+
+    // 日志
+    static final Logger log = LoggerFactory.getLogger(RealEstateAction.class);
+
+    @Autowired
+    RealEstateService realEstateService;
+
+    @RequestMapping("/updateExistData")
+    public void updateExistData(HttpServletRequest request, HttpServletResponse response,
+                                @RequestBody RealEstateModel model,@RequestParam String loanReferenceNo){
+        // 改
+        sendData(response, realEstateService.updateExistData(model,loanReferenceNo));
+    }
+
+    @RequestMapping("/selectDataList")
+    public void selectDataList (HttpServletRequest request, HttpServletResponse response,
+                                @RequestBody RealEstateModel model) {
+        // 初始化
+        sendData(response, realEstateService.selectDataList(model));
+    }
+
+    // 查询当前行
+    @RequestMapping("/selectRowData")
+    public void selectRowData (HttpServletRequest request, HttpServletResponse response,
+                               @RequestBody RealEstateModel model) {
+        sendData(response, realEstateService.selectRowData(model));
+    }
+
+
+    @RequestMapping("/exportExcelModel")
+    public void exportExcelModel (HttpServletRequest request, HttpServletResponse response,
+                                  @RequestParam String fileNameCode, @RequestBody List<RealEstateModel> modelList) throws IOException {
+
+        try {
+            request.setCharacterEncoding("UTF-8");
+            response.setContentType("test/html; charset=UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            throw new RuntimeException(e);
+        }
+        // 导出数据
+        realEstateService.exportExcelModel(response,fileNameCode,modelList);
+        // sendData(response, realEstateService.exportExcelModel(response,fileNameCode,modelList));
+    }
+
+    @RequestMapping("/importExcelModel")
+    public void importExcelModel (HttpServletRequest request,
+                                  HttpServletResponse response, @RequestParam("rfile") MultipartFile file) {
+        // 输入流对象
+        InputStream io;
+        try {
+            // 获取前端上传文件流
+            io = file.getInputStream();
+            // 上传文件
+            realEstateService.importExcelModel(io,file);
+            // sendData(response, realEstateService.importExcelModel(io,file));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+
+    @RequestMapping("/templateUploadModel")
+    public void templateUploadModel (HttpServletRequest request,
+                                     HttpServletResponse response,@RequestParam String fileNameCode) throws IOException {
+
+        // 模板下载
+        realEstateService.templateUploadModel(response,fileNameCode);
+    }
+
+//    @RequestMapping("/isNotExist")
+//    public void isNotExist (HttpServletRequest request,
+//                            HttpServletResponse response, @RequestBody RealEstateModel model) {
+//        // 查询当前行详细数据
+//        RealEstateModel selectData = realEstateService.selectRowData(model);
+//        String rst = selectData.getCustomerName() ==  null ? "true" : "交易对手已存在";
+//        sendData(response,rst);
+//    }
+
+
+}

+ 24 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/mapper/BusinessMapper.java

@@ -0,0 +1,24 @@
+package com.sundata.product.rwa.rwacalcconfigdataparam.mapper;
+
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.BusinessModel;
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.ProductListModel;
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.SubjectListModel;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface BusinessMapper {
+    boolean updateExistData(@Param("model") BusinessModel model, @Param("businessCode") String businessCode);
+
+    List<BusinessModel> selectDataList(@Param("model") BusinessModel model);
+
+    Object selectRowData(@Param("model") BusinessModel model);
+
+    boolean deleteRows(@Param("businessCode") String businessCode);
+
+    boolean createDetailData(@Param("model") BusinessModel model);
+
+    List<ProductListModel> selectProductData(@Param("productBussinessCode") String productBussinessCode);
+
+    List<SubjectListModel> selectSubjectData(@Param("productBussinessCode") String productBussinessCode);
+}

+ 19 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/mapper/RealEstateMapper.java

@@ -0,0 +1,19 @@
+package com.sundata.product.rwa.rwacalcconfigdataparam.mapper;
+
+import com.sundata.product.rwa.businessconfig.model.ListOfPublicSectorModel;
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.RealEstateModel;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface RealEstateMapper {
+    boolean updateExistData(@Param("model") RealEstateModel model,@Param("loanReferenceNo") String loanReferenceNo);
+
+    List<RealEstateModel> selectDataList(@Param("model") RealEstateModel model);
+
+    Object selectRowData(@Param("model") RealEstateModel model);
+
+    boolean deleteRows(Object o);
+
+    boolean createDetailData(@Param("model") RealEstateModel model);
+}

+ 84 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/model/BusinessModel.java

@@ -0,0 +1,84 @@
+package com.sundata.product.rwa.rwacalcconfigdataparam.model;
+
+public class BusinessModel {
+    //计算实例号
+    private String calcIndex;
+    // 起始数据日期
+    private String startDate;
+    // 截止数据日期
+    private String endDate;
+    // 年月
+    private String term;
+    // 数据日期
+    private String dataDate;
+    // 业务名称
+    private String businessName;
+    // 业务编号
+    private String businessCode;
+    // 业务属性
+    private String businessAttr;
+
+    public String getCalcIndex() {
+        return calcIndex;
+    }
+
+    public void setCalcIndex(String calcIndex) {
+        this.calcIndex = calcIndex;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getTerm() {
+        return term;
+    }
+
+    public void setTerm(String term) {
+        this.term = term;
+    }
+
+    public String getDataDate() {
+        return dataDate;
+    }
+
+    public void setDataDate(String dataDate) {
+        this.dataDate = dataDate;
+    }
+
+    public String getBusinessName() {
+        return businessName;
+    }
+
+    public void setBusinessName(String businessName) {
+        this.businessName = businessName;
+    }
+
+    public String getBusinessCode() {
+        return businessCode;
+    }
+
+    public void setBusinessCode(String businessCode) {
+        this.businessCode = businessCode;
+    }
+
+    public String getBusinessAttr() {
+        return businessAttr;
+    }
+
+    public void setBusinessAttr(String businessAttr) {
+        this.businessAttr = businessAttr;
+    }
+}

+ 182 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/model/RealEstateModel.java

@@ -0,0 +1,182 @@
+package com.sundata.product.rwa.rwacalcconfigdataparam.model;
+
+import java.util.HashMap;
+
+public class RealEstateModel {
+    // 计算实例号
+    private String calcIndex;
+    // 起始数据日期
+    private String startDate;
+    // 截止数据日期
+    private String endDate;
+    // 年月
+    private String term;
+    // 数据日期
+    private String dataDate;
+    // 债项编号
+    private String loanReferenceNo;
+    // 客户编号
+    private String custNo;
+    //客户名称
+    private String custName;
+    // 产品编号
+    private String productNo;
+    // 产品名称
+    private String productName;
+    // 经营机构
+    private String[] mgmtBranchNos;
+    // 经营机构
+    private String mgmtBranchNo;
+    // 逾期天数
+    private String overdueDays;
+    // 是否为住房开发贷款
+    private String ishousing;
+    // 是否属于重组资产
+    private String isrecombine;
+    // 核心客户号
+    private String bpCustNo;
+
+    public String getCalcIndex() {
+        return calcIndex;
+    }
+
+    public void setCalcIndex(String calcIndex) {
+        this.calcIndex = calcIndex;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getTerm() {
+        return term;
+    }
+
+    public void setTerm(String term) {
+        this.term = term;
+    }
+
+    public String getDataDate() {
+        return dataDate;
+    }
+
+    public void setDataDate(String dataDate) {
+        this.dataDate = dataDate;
+    }
+
+    public String getLoanReferenceNo() {
+        return loanReferenceNo;
+    }
+
+    public void setLoanReferenceNo(String loanReferenceNo) {
+        this.loanReferenceNo = loanReferenceNo;
+    }
+
+    public String getCustNo() {
+        return custNo;
+    }
+
+    public void setCustNo(String custNo) {
+        this.custNo = custNo;
+    }
+
+    public String getCustName() {
+        return custName;
+    }
+
+    public void setCustName(String custName) {
+        this.custName = custName;
+    }
+
+    public String getProductNo() {
+        return productNo;
+    }
+
+    public void setProductNo(String productNo) {
+        this.productNo = productNo;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String[] getMgmtBranchNos() {
+        return mgmtBranchNos;
+    }
+
+    public void setMgmtBranchNos(String[] mgmtBranchNos) {
+        this.mgmtBranchNos = mgmtBranchNos;
+    }
+
+    public String getMgmtBranchNo() {
+        return mgmtBranchNo;
+    }
+
+    public void setMgmtBranchNo(String mgmtBranchNo) {
+        this.mgmtBranchNo = mgmtBranchNo;
+    }
+
+    public String getOverdueDays() {
+        return overdueDays;
+    }
+
+    public void setOverdueDays(String overdueDays) {
+        this.overdueDays = overdueDays;
+    }
+
+    public String getIshousing() {
+        return ishousing;
+    }
+
+    public void setIshousing(String ishousing) {
+        this.ishousing = ishousing;
+    }
+
+    public String getIsrecombine() {
+        return isrecombine;
+    }
+
+    public void setIsrecombine(String isrecombine) {
+        this.isrecombine = isrecombine;
+    }
+
+    public String getBpCustNo() {
+        return bpCustNo;
+    }
+
+    public void setBpCustNo(String bpCustNo) {
+        this.bpCustNo = bpCustNo;
+    }
+
+    public static HashMap<String,String> getCastFileCellToJson() {
+        HashMap<String,String> map = new HashMap<String,String>();
+        map.put("数据日期","dataDate");
+        map.put("债项编号","loanReferenceNo");
+        map.put("客户编号","custNo");
+        map.put("客户名称","custName");
+        map.put("产品编号","productNo");
+        map.put("产品名称","productName");
+        map.put("经营机构","mgmtBranchNo");
+        map.put("逾期天数","overdueDays");
+        map.put("是否为住房开发贷款","ishousing");
+        map.put("是否属于重组资产","isrecombine");
+        map.put("核心客户号","bpCustNo");
+        return map;
+    }
+}

+ 141 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/model/SubjectListModel.java

@@ -0,0 +1,141 @@
+package com.sundata.product.rwa.rwacalcconfigdataparam.model;
+
+import java.math.BigDecimal;
+
+public class SubjectListModel {
+    private String  calcindex;   //计算实例号
+    private String  sdate;   //起始数据日期
+    private String  edate;   //截止数据日期
+    private String  term;   //年月
+    private String  dataDate;   //数据日期
+    private String  productNo;   //产品编号
+    private String  productName;   //产品名称
+    private String  ruleCode;   //规则编号
+    private String  ruleName;   //规则名称
+    private BigDecimal ruleIndex;   //规则序号
+    private String  dataType;   //数据类型
+    private String  ruleSubject;   //对应科目
+    private String  ruleIn;   //输入
+    private String  ruleOut;   //输出
+    private String  ruleGetdata;   //取数规则
+
+    public String getCalcindex() {
+        return calcindex;
+    }
+
+    public void setCalcindex(String calcindex) {
+        this.calcindex = calcindex;
+    }
+
+    public String getSdate() {
+        return sdate;
+    }
+
+    public void setSdate(String sdate) {
+        this.sdate = sdate;
+    }
+
+    public String getEdate() {
+        return edate;
+    }
+
+    public void setEdate(String edate) {
+        this.edate = edate;
+    }
+
+    public String getTerm() {
+        return term;
+    }
+
+    public void setTerm(String term) {
+        this.term = term;
+    }
+
+    public String getDataDate() {
+        return dataDate;
+    }
+
+    public void setDataDate(String dataDate) {
+        this.dataDate = dataDate;
+    }
+
+    public String getProductNo() {
+        return productNo;
+    }
+
+    public void setProductNo(String productNo) {
+        this.productNo = productNo;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String getRuleCode() {
+        return ruleCode;
+    }
+
+    public void setRuleCode(String ruleCode) {
+        this.ruleCode = ruleCode;
+    }
+
+    public String getRuleName() {
+        return ruleName;
+    }
+
+    public void setRuleName(String ruleName) {
+        this.ruleName = ruleName;
+    }
+
+    public BigDecimal getRuleIndex() {
+        return ruleIndex;
+    }
+
+    public void setRuleIndex(BigDecimal ruleIndex) {
+        this.ruleIndex = ruleIndex;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public String getRuleSubject() {
+        return ruleSubject;
+    }
+
+    public void setRuleSubject(String ruleSubject) {
+        this.ruleSubject = ruleSubject;
+    }
+
+    public String getRuleIn() {
+        return ruleIn;
+    }
+
+    public void setRuleIn(String ruleIn) {
+        this.ruleIn = ruleIn;
+    }
+
+    public String getRuleOut() {
+        return ruleOut;
+    }
+
+    public void setRuleOut(String ruleOut) {
+        this.ruleOut = ruleOut;
+    }
+
+    public String getRuleGetdata() {
+        return ruleGetdata;
+    }
+
+    public void setRuleGetdata(String ruleGetdata) {
+        this.ruleGetdata = ruleGetdata;
+    }
+}

+ 157 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/mybatis/BusinessMapper.xml

@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sundata.product.rwa.rwacalcconfigdataparam.mapper.BusinessMapper">
+
+    <!-- 初始化与按查询条件查询 -->
+    <select id="selectDataList" resultType="com.sundata.product.rwa.rwacalcconfigdataparam.model.BusinessModel" parameterType="com.sundata.product.rwa.rwacalcconfigdataparam.model.BusinessModel">
+        select
+        CALCINDEX         AS    calcIndex,
+        SDATE             AS    startDate,
+        EDATE             AS    endDate,
+        TERM              AS    term,
+        DATA_DATE         AS    dataDate,
+        BUSSINESS_NAME    AS    businessName,
+        BUSSINESS_CODE    AS    businessCode,
+        CASE
+        WHEN BUSSINESS_ATTR = 'ON' THEN '表内'
+        WHEN BUSSINESS_ATTR = 'OFF' THEN '表外'
+        END               AS    businessAttr
+        from RWA_CALC_CONF_BUSSINESS
+        <where>
+            <if test="model.businessCode != null and '' != model.businessCode">
+                and BUSSINESS_CODE like concat(concat('%',#{model.businessCode}),'%')
+            </if>
+            <if test="model.businessName != null and '' != model.businessName">
+                and BUSSINESS_NAME like concat(concat('%',#{model.businessName}),'%')
+            </if>
+        </where>
+        order by DATA_DATE
+    </select>
+
+    <!-- 修改数据 -->
+    <update id="updateExistData">
+        update RWA_CALC_CONF_BUSSINESS
+        <trim suffixOverrides=",">
+            <set>
+                <if test="model.businessCode != null and model.businessCode != ''">
+                    BUSSINESS_CODE = #{model.businessCode},
+                </if>
+                <if test="model.businessName != null and model.businessName != ''">
+                    BUSSINESS_NAME = #{model.businessName},
+                </if>
+                <if test="model.businessAttr != null and model.businessAttr != ''">
+                    BUSSINESS_ATTR = #{model.businessAttr},
+                </if>
+            </set>
+        </trim>
+        <where>
+            BUSSINESS_CODE = #{businessCode}
+        </where>
+    </update>
+
+
+    <!-- 新建数据 -->
+    <insert id="createDetailData" parameterType="com.sundata.product.rwa.rwacalcconfigdataparam.model.BusinessModel">
+        insert into RWA_CALC_CONF_BUSSINESS
+        (
+        CALCINDEX,
+        SDATE,
+        EDATE,
+        TERM,
+        DATA_DATE,
+        BUSSINESS_NAME,
+        BUSSINESS_CODE,
+        BUSSINESS_ATTR
+        )
+        values(
+        #{model.calcIndex},
+        #{model.startDate},
+        #{model.endDate},
+        #{model.term},
+        #{model.dataDate},
+        #{model.businessName},
+        #{model.businessCode},
+        #{model.businessAttr}
+        )
+    </insert>
+
+    <!-- 删除当前行 -->
+    <delete id="deleteRows"  parameterType="java.lang.String">
+        delete  from RWA_CALC_CONF_BUSSINESS
+        <where>
+            1=1
+            <if test="businessCode != null and '' != businessCode">
+                and BUSSINESS_CODE = #{businessCode}
+            </if>
+        </where>
+    </delete>
+
+    <!-- 查询当前行(修改用) -->
+    <select id="selectRowData"
+            parameterType="com.sundata.product.rwa.rwacalcconfigdataparam.model.BusinessModel"
+            resultType="com.sundata.product.rwa.rwacalcconfigdataparam.model.BusinessModel">
+        select
+        CALCINDEX         AS    calcIndex,
+        SDATE             AS    startDate,
+        EDATE             AS    endDate,
+        TERM              AS    term,
+        DATA_DATE         AS    dataDate,
+        BUSSINESS_NAME    AS    businessName,
+        BUSSINESS_CODE    AS    businessCode,
+        BUSSINESS_ATTR    AS    businessAttr
+        from RWA_CALC_CONF_BUSSINESS
+        <where>
+            BUSSINESS_CODE = #{model.businessCode}
+        </where>
+    </select>
+
+    <!-- 产品列表 -->
+    <select id="selectProductData"
+            resultType="com.sundata.product.rwa.rwacalcconfigdataparam.model.ProductListModel">
+        select
+        CALCINDEX as calcindex,
+        SDATE as sdate,
+        EDATE as edate,
+        TERM as term,
+        DATA_DATE as dataDate,
+        PRODUCT_NO as productNo,
+        PRODUCT_NAME as productName,
+        PRODUCT_TYPE as productType,
+        PRODUCT_BUSSINESS_CODE as productBussinessCode,
+        PRODUCT_STAGE_ID as productStageId,
+        PRODUCT_INDEX as productIndex,
+        PRODUCT_FROM_SYSTEM as productFromSystem,
+        DEFAULT_GETDATARULE as defaultGetdatarule,
+        DEFAULT_OUT as defaultOut
+        from RWA_CALC_CONF_PRODUCT
+        <where>
+            PRODUCT_BUSSINESS_CODE = #{productBussinessCode}
+        </where>
+    </select>
+
+    <!-- 科目列表 -->
+    <select id="selectSubjectData"  resultType="com.sundata.product.rwa.rwacalcconfigdataparam.model.SubjectListModel">
+        select
+        T1.CALCINDEX as calcindex,
+        T1.DATA_DATE as dataDate,
+        T1.DATA_TYPE as dataType,
+        T1.EDATE as edate,
+        T1.PRODUCT_NO as productNo,
+        T2.PRODUCT_NAME as productName,
+        T1.RULE_CODE as ruleCode,
+        T1.SDATE as sdate,
+        T1.RULE_SUBJECT as ruleSubject,
+        T1.TERM as term
+        from RWA_CALC_CONF_PRODUCTRULES T1
+        LEFT JOIN RWA_CALC_CONF_PRODUCT T2
+        ON T1.PRODUCT_NO = T2.PRODUCT_NO
+        <where>
+            T2.PRODUCT_BUSSINESS_CODE = #{productBussinessCode}
+        </where>
+    </select>
+
+
+
+</mapper>

+ 184 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/mybatis/RealEstateMapper.xml

@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sundata.product.rwa.rwacalcconfigdataparam.mapper.RealEstateMapper">
+
+    <!-- 初始化与按查询条件查询 -->
+    <select id="selectDataList" resultType="com.sundata.product.rwa.rwacalcconfigdataparam.model.RealEstateModel" parameterType="com.sundata.product.rwa.rwacalcconfigdataparam.model.RealEstateModel">
+        select
+        CALCINDEX                AS  calcIndex,
+        SDATE                    AS  startDate,
+        EDATE                    AS  endDate,
+        TERM                     AS  term,
+        DATA_DATE                AS  dataDate,
+        LOAN_REFERENCE_NO        AS  loanReferenceNo,
+        CUST_NO                  AS  custNo,
+        CUST_NAME                AS  custName,
+        PRODUCT_NO               AS  productNo,
+        PRODUCT_NAME             AS  productName,
+        MGMT_BRANCH_NO           AS  mgmtBranchNo,
+        OVERDUE_DAYS             AS  overdueDays,
+        case
+        when ISHOUSING = '1' then '是'
+        when ISHOUSING = '0' then '否'
+        end                      AS  ishousing,
+        case
+        when ISRECOMBINE = '1' then '是'
+        when ISRECOMBINE = '0' then '否'
+        end                      AS  isrecombine,
+        BP_CUST_NO               AS  bpCustNo
+        from RWA_BDM_BUS_ITM_FC_REALTY_LOAN
+        <where>
+            <if test="model.loanReferenceNo != null and '' != model.loanReferenceNo">
+                and LOAN_REFERENCE_NO like concat(concat('%',#{model.loanReferenceNo}),'%')
+            </if>
+            <if test="model.custName != null and '' != model.custName">
+                and CUST_NAME like concat(concat('%',#{model.custName}),'%')
+            </if>
+            <if test="model.productName != null and '' != model.productName">
+                and PRODUCT_NAME like concat(concat('%',#{model.productName}),'%')
+            </if>
+            <if test="model.mgmtBranchNos != null and model.mgmtBranchNos.length > 0 ">
+                <foreach collection="model.mgmtBranchNos" item="item" open="and  MGMT_BRANCH_NO in ( " close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+        order by DATA_DATE
+    </select>
+
+    <!-- 修改数据 -->
+    <update id="updateExistData">
+        update RWA_BDM_BUS_ITM_FC_REALTY_LOAN
+        <trim suffixOverrides=",">
+            <set>
+                <if test="model.loanReferenceNo != null and model.loanReferenceNo != ''">
+                    LOAN_REFERENCE_NO = #{model.loanReferenceNo},
+                </if>
+                <if test="model.bpCustNo != null and model.bpCustNo != ''">
+                    BP_CUST_NO = #{model.bpCustNo},
+                </if>
+                <if test="model.custNo != null and model.custNo != ''">
+                    CUST_NO = #{model.custNo},
+                </if>
+                <if test="model.custName != null and model.custName != ''">
+                    CUST_NAME = #{model.custName},
+                </if>
+                <if test="model.productNo != null and model.productNo != ''">
+                    PRODUCT_NO = #{model.productNo},
+                </if>
+                <if test="model.productName != null and model.productName != ''">
+                    PRODUCT_NAME = #{model.productName},
+                </if>
+                <if test="model.mgmtBranchNo != null and model.mgmtBranchNo != ''">
+                    MGMT_BRANCH_NO = #{model.mgmtBranchNo},
+                </if>
+                <if test="model.overdueDays != null and model.overdueDays != ''">
+                    OVERDUE_DAYS = #{model.overdueDays},
+                </if>
+                <if test="model.ishousing != null and model.ishousing != ''">
+                    ISHOUSING = #{model.ishousing},
+                </if>
+                <if test="model.isrecombine != null and model.isrecombine != ''">
+                    ISRECOMBINE = #{model.isrecombine},
+                </if>
+            </set>
+        </trim>
+        <where>
+            LOAN_REFERENCE_NO = #{loanReferenceNo}
+        </where>
+    </update>
+
+
+    <!-- 新建数据 -->
+    <insert id="createDetailData" parameterType="com.sundata.product.rwa.rwacalcconfigdataparam.model.RealEstateModel">
+        insert into RWA_BDM_BUS_ITM_FC_REALTY_LOAN
+        (
+        CALCINDEX,
+        SDATE,
+        EDATE,
+        TERM,
+        DATA_DATE,
+        LOAN_REFERENCE_NO,
+        CUST_NO,
+        CUST_NAME,
+        PRODUCT_NO,
+        PRODUCT_NAME,
+        MGMT_BRANCH_NO,
+        OVERDUE_DAYS,
+        ISHOUSING,
+        ISRECOMBINE,
+        BP_CUST_NO
+        )
+        values(
+        #{model.calcIndex},
+        #{model.startDate},
+        #{model.endDate},
+        #{model.term},
+        #{model.dataDate},
+        #{model.loanReferenceNo},
+        #{model.custNo},
+        #{model.custName},
+        #{model.productNo},
+        #{model.productName},
+        #{model.mgmtBranchNo},
+        #{model.overdueDays},
+        <choose>
+            <when test= 'model.ishousing == "是" '>
+                '1',
+            </when>
+            <when test= 'model.ishousing == "否" '>
+                '0',
+            </when>
+        </choose>
+        <choose>
+            <when test= 'model.isrecombine == "是" ' >
+                '1',
+            </when>
+            <when test=' model.isrecombine == "否" '>
+                '0',
+            </when>
+        </choose>
+        #{model.bpCustNo}
+        )
+    </insert>
+
+    <!-- 删除当前行 -->
+    <delete id="deleteRows"  parameterType="java.lang.String">
+        delete  from RWA_BDM_BUS_ITM_FC_REALTY_LOAN
+        <where>
+            1=1
+            <if test="loanReferenceNo != null and '' != loanReferenceNo">
+                and LOAN_REFERENCE_NO = #{loanReferenceNo};
+            </if>
+        </where>
+    </delete>
+
+    <!-- 查询当前行(修改用) -->
+    <select id="selectRowData"
+            parameterType="com.sundata.product.rwa.rwacalcconfigdataparam.model.RealEstateModel"
+            resultType="com.sundata.product.rwa.rwacalcconfigdataparam.model.RealEstateModel">
+        select
+        CALCINDEX                AS  calcIndex,
+        SDATE                    AS  startDate,
+        EDATE                    AS  endDate,
+        TERM                     AS  term,
+        DATA_DATE                AS  dataDate,
+        LOAN_REFERENCE_NO        AS  loanReferenceNo,
+        CUST_NO                  AS  custNo,
+        CUST_NAME                AS  custName,
+        PRODUCT_NO               AS  productNo,
+        PRODUCT_NAME             AS  productName,
+        MGMT_BRANCH_NO           AS  mgmtBranchNo,
+        OVERDUE_DAYS             AS  overdueDays,
+        ISHOUSING                AS  ishousing,
+        ISRECOMBINE              AS  isrecombine,
+        BP_CUST_NO               AS  bpCustNo
+        from RWA_BDM_BUS_ITM_FC_REALTY_LOAN
+        <where>
+            LOAN_REFERENCE_NO = #{model.loanReferenceNo}
+        </where>
+    </select>
+
+</mapper>

+ 172 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/service/BusinessService.java

@@ -0,0 +1,172 @@
+package com.sundata.product.rwa.rwacalcconfigdataparam.service;
+
+import com.sundata.admin.excelmanage.mapper.RptDefineMapper;
+import com.sundata.admin.excelmanage.model.RptDefineModel;
+import com.sundata.common.base.BaseMapper;
+import com.sundata.common.base.BaseService;
+import com.sundata.common.exception.BusinessException;
+import com.sundata.common.util.DBExecutor;
+import com.sundata.product.rwa.businessconfig.utils.FilesValueCheckUtils;
+import com.sundata.product.rwa.rwacalcconfigdataparam.mapper.BusinessMapper;
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.BusinessModel;
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.ProductListModel;
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.SubjectListModel;
+import jakarta.servlet.http.HttpServletResponse;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class BusinessService extends BaseService<RptDefineModel> {
+
+
+    // 日志
+    static final Logger log = LoggerFactory.getLogger(BusinessService.class);
+
+    @Autowired
+    private RptDefineMapper<RptDefineModel> rptDefineMapper;
+
+    @Autowired
+    BusinessMapper businessMapper;
+
+    public Object updateExistData(BusinessModel model, String businessCode) {
+        return businessMapper.updateExistData(model,businessCode);
+    }
+
+
+    public void deleteRows(String businessCode) {
+        businessMapper.deleteRows(businessCode);
+    }
+
+    public void createDetailData(BusinessModel model) {
+        businessMapper.createDetailData(model);
+    }
+
+    public List<BusinessModel> selectDataList(BusinessModel model) {
+        return businessMapper.selectDataList(model);
+    }
+
+    public Object selectRowData(BusinessModel model) {
+        return businessMapper.selectRowData(model);
+    }
+
+    public void exportExcelModel(HttpServletResponse response, String fileNameCode, List<BusinessModel> modelList) throws IOException {
+        // 数据检查
+        if (null == modelList) {
+            String err = "导出数据为空!";
+            log.error(err);
+            throw new BusinessException(err);
+        }
+        // 取得文件名
+        String fileName = DBExecutor.doQuery("select RPTNAME from SYS_RPTDEFINE where RPTCODE = '"+ fileNameCode +"'");
+        // 字典里获取附件路径
+        String templatePath = DBExecutor.doQuery("select NOUNVALUE from sys_noun where NOUNITEM = 'ATTACHPATH'");
+
+        // TODO  获取菜单名
+        String menuName = DBExecutor.doQuery("select funcname from sys_funinfo where funccode='M412000'");
+        StringBuilder pathName = new StringBuilder(templatePath+"/"+menuName);
+        // 获取数据库模板文件
+        RptDefineModel entity = (RptDefineModel)this.queryOne(fileNameCode);
+        // 判断是否获取成功
+        if (entity == null) {
+            String err = "报表代码[" + fileNameCode + "]不存在!";
+            log.error(err);
+            throw new BusinessException(err);
+        } else {
+            // 获取成功执行导出方法
+            FilesValueCheckUtils.exportExcelModel(response,modelList,pathName,fileName,entity);
+        }
+    }
+
+    public void importExcelModel(InputStream io, MultipartFile file) {
+        String fileName = file.getOriginalFilename().toLowerCase();
+        List<BusinessModel> modelList = new ArrayList<BusinessModel>();
+        // 导入文件流转换为poi对象
+        Workbook book = FilesValueCheckUtils.workBookInstance(io,file);
+        if (book == null) {
+            String err = "文件格式不正确!,请用xlsx或xls文件";
+            log.error(err);
+            throw new BusinessException(err);
+        }
+
+        FilesValueCheckUtils.castFileValue(book,BusinessModel.class,modelList);
+
+        if (modelList.isEmpty()) {
+            String err = "文件转换对象异常!";
+            log.error(err);
+            throw new BusinessException(err);
+        }
+
+        // 批量插入
+        // 先全量删除
+        boolean flag = true;
+        flag = businessMapper.deleteRows(null);
+        if (!flag) {
+            String err = "数据库删除异常!";
+            log.error(err);
+            throw new BusinessException(err);
+        }
+        for (BusinessModel businessModel : modelList) {
+
+            // 向数据库批量插入
+            flag = businessMapper.createDetailData(businessModel);
+            if (!flag) {
+                String err = "数据库插入异常!";
+                log.error(err);
+                throw new BusinessException(err);
+            }
+        }
+        // 工作流关闭
+        try {
+            book.close();
+            io.close();
+        } catch (IOException e) {
+            String err = "io流关闭异常";
+            log.error(err,e);
+            throw new BusinessException(err,e);
+        }
+    }
+
+    public void templateUploadModel(HttpServletResponse response, String fileNameCode) throws IOException {
+        List<BusinessModel> modelList = new ArrayList<BusinessModel>();
+        modelList.add(new BusinessModel());
+        // 取得文件名
+        String fileName = DBExecutor.doQuery("select RPTNAME from SYS_RPTDEFINE where RPTCODE = '"+ fileNameCode +"'");
+        // 字典里获取附件路径
+        String templatePath = DBExecutor.doQuery("select NOUNVALUE from sys_noun where NOUNITEM = 'ATTACHPATH'");
+
+        // TODO  获取菜单名
+        String menuName = DBExecutor.doQuery("select funcname from sys_funinfo where funccode='M412000'");
+        StringBuilder pathName = new StringBuilder(templatePath+"/"+menuName);
+        // 获取数据库模板文件
+        RptDefineModel entity = (RptDefineModel)this.queryOne(fileNameCode);
+        if (entity == null) {
+            String err = "报表代码[" + fileNameCode + "]不存在!";
+            log.error(err);
+            throw new BusinessException(err);
+        } else {
+            FilesValueCheckUtils.exportExcelModel(response,modelList,pathName,fileName,entity);
+        }
+    }
+
+    @Override
+    public BaseMapper<RptDefineModel> getMapper() {
+        return this.rptDefineMapper;
+    }
+
+    public List<ProductListModel> selectProductData(String productBussinessCode) {
+       return businessMapper.selectProductData(productBussinessCode);
+    }
+
+    public List<SubjectListModel> selectSubjectData(String productBussinessCode) {
+       return businessMapper.selectSubjectData(productBussinessCode);
+    }
+}

+ 156 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwaCalcConfigDataparam/service/RealEstateService.java

@@ -0,0 +1,156 @@
+package com.sundata.product.rwa.rwacalcconfigdataparam.service;
+
+import com.sundata.admin.excelmanage.mapper.RptDefineMapper;
+import com.sundata.admin.excelmanage.model.RptDefineModel;
+import com.sundata.common.base.BaseMapper;
+import com.sundata.common.base.BaseService;
+import com.sundata.common.exception.BusinessException;
+import com.sundata.common.util.DBExecutor;
+
+
+import com.sundata.product.rwa.businessconfig.service.SysListOfPublicSectorService;
+import com.sundata.product.rwa.businessconfig.utils.FilesValueCheckUtils;
+import com.sundata.product.rwa.rwacalcconfigdataparam.mapper.RealEstateMapper;
+import com.sundata.product.rwa.rwacalcconfigdataparam.model.RealEstateModel;
+import jakarta.servlet.http.HttpServletResponse;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class RealEstateService extends BaseService<RptDefineModel> {
+
+    // 日志
+    static final Logger log = LoggerFactory.getLogger(RealEstateService.class);
+
+    @Autowired
+    private RptDefineMapper<RptDefineModel> rptDefineMapper;
+    
+    @Autowired
+    RealEstateMapper realEstateMapper;
+    
+    public Object updateExistData(RealEstateModel model,String loanReferenceNo) {
+        return realEstateMapper.updateExistData(model,loanReferenceNo);
+    }
+
+    public List<RealEstateModel> selectDataList(RealEstateModel model) {
+        return realEstateMapper.selectDataList(model);
+    }
+
+    public Object selectRowData(RealEstateModel model) {
+        return realEstateMapper.selectRowData(model);
+    }
+
+    public void exportExcelModel(HttpServletResponse response, String fileNameCode, List<RealEstateModel> modelList) throws IOException {
+        // 数据检查
+        if (null == modelList) {
+            String err = "导出数据为空!";
+            log.error(err);
+            throw new BusinessException(err);
+        }
+        // 取得文件名
+        String fileName = DBExecutor.doQuery("select RPTNAME from SYS_RPTDEFINE where RPTCODE = '"+ fileNameCode +"'");
+        // 字典里获取附件路径
+        String templatePath = DBExecutor.doQuery("select NOUNVALUE from sys_noun where NOUNITEM = 'ATTACHPATH'");
+
+        // TODO  获取菜单名
+        String menuName = DBExecutor.doQuery("select funcname from sys_funinfo where funccode='M412000'");
+        StringBuilder pathName = new StringBuilder(templatePath+"/"+menuName);
+        // 获取数据库模板文件
+        RptDefineModel entity = (RptDefineModel)this.queryOne(fileNameCode);
+        // 判断是否获取成功
+        if (entity == null) {
+            String err = "报表代码[" + fileNameCode + "]不存在!";
+            log.error(err);
+            throw new BusinessException(err);
+        } else {
+            // 获取成功执行导出方法
+            FilesValueCheckUtils.exportExcelModel(response,modelList,pathName,fileName,entity);
+        }
+    }
+
+    public void importExcelModel(InputStream io, MultipartFile file) {
+        String fileName = file.getOriginalFilename().toLowerCase();
+        List<RealEstateModel> modelList = new ArrayList<RealEstateModel>();
+        // 导入文件流转换为poi对象
+        Workbook book = FilesValueCheckUtils.workBookInstance(io,file);
+        if (book == null) {
+            String err = "文件格式不正确!,请用xlsx或xls文件";
+            log.error(err);
+            throw new BusinessException(err);
+        }
+
+        FilesValueCheckUtils.castFileValue(book,RealEstateModel.class,modelList);
+
+        if (modelList.isEmpty()) {
+            String err = "文件转换对象异常!";
+            log.error(err);
+            throw new BusinessException(err);
+        }
+
+        // 批量插入
+        // 先全量删除
+        boolean flag = true;
+        flag = realEstateMapper.deleteRows(null);
+        if (!flag) {
+            String err = "数据库删除异常!";
+            log.error(err);
+            throw new BusinessException(err);
+        }
+        for (RealEstateModel realEstateModel : modelList) {
+
+            // 向数据库批量插入
+            flag = realEstateMapper.createDetailData(realEstateModel);
+            if (!flag) {
+                String err = "数据库插入异常!";
+                log.error(err);
+                throw new BusinessException(err);
+            }
+        }
+        // 工作流关闭
+        try {
+            book.close();
+            io.close();
+        } catch (IOException e) {
+            String err = "io流关闭异常";
+            log.error(err,e);
+            throw new BusinessException(err,e);
+        }
+    }
+
+    public void templateUploadModel(HttpServletResponse response, String fileNameCode) throws IOException {
+        List<RealEstateModel> modelList = new ArrayList<RealEstateModel>();
+        modelList.add(new RealEstateModel());
+        // 取得文件名
+        String fileName = DBExecutor.doQuery("select RPTNAME from SYS_RPTDEFINE where RPTCODE = '"+ fileNameCode +"'");
+        // 字典里获取附件路径
+        String templatePath = DBExecutor.doQuery("select NOUNVALUE from sys_noun where NOUNITEM = 'ATTACHPATH'");
+
+        // TODO  获取菜单名
+        String menuName = DBExecutor.doQuery("select funcname from sys_funinfo where funccode='M412000'");
+        StringBuilder pathName = new StringBuilder(templatePath+"/"+menuName);
+        // 获取数据库模板文件
+        RptDefineModel entity = (RptDefineModel)this.queryOne(fileNameCode);
+        if (entity == null) {
+            String err = "报表代码[" + fileNameCode + "]不存在!";
+            log.error(err);
+            throw new BusinessException(err);
+        } else {
+            FilesValueCheckUtils.exportExcelModel(response,modelList,pathName,fileName,entity);
+        }
+    }
+
+    @Override
+    public BaseMapper<RptDefineModel> getMapper() {
+        return this.rptDefineMapper;
+    }
+}

+ 93 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/action/InfoListAction.java

@@ -0,0 +1,93 @@
+package com.sundata.product.rwa.rwacalcconfig001riskexposure.action;
+
+import com.sundata.admin.nounmanage.model.DictContent;
+import com.sundata.admin.nounmanage.model.DictTree;
+import com.sundata.common.base.BaseAction;
+
+import com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureClassRuleModel;
+import com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureDefinitionModel;
+import com.sundata.product.rwa.rwacalcconfig001riskexposure.service.InfoListService;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/product/rwa/rwacalcconfig001riskexposure/InfoListAction")
+public class InfoListAction extends BaseAction {
+    @Autowired
+    InfoListService infoListService;
+
+    @RequestMapping({"getFunTree1"})
+    public List<DictTree> getFunTree1(HttpServletRequest request, HttpServletResponse response) {
+        return this.infoListService.getFunTree1();
+    }
+
+    @RequestMapping({"getSelectTreeData"})
+    public void getSelectTreeData(HttpServletRequest request, HttpServletResponse response, @RequestParam String key) {
+        sendData(response,infoListService.getSelectTreeData(key));
+    }
+
+    // 新增风险暴漏定义
+    @RequestMapping({"createRiskData"})
+    public void createRiskData(HttpServletRequest request, HttpServletResponse response, @RequestBody RiskExposureDefinitionModel model) {
+        infoListService.createRiskData(model);
+    }
+
+    // 风险暴漏定义维护修改
+    @RequestMapping({"updateRiskData"})
+    public void updateRiskData(HttpServletRequest request, HttpServletResponse response, @RequestBody RiskExposureDefinitionModel model) {
+        infoListService.updateRiskData(model);
+    }
+
+    // 风险暴漏定义维护作废
+    @RequestMapping({"delRiskData"})
+    public void delRiskData(HttpServletRequest request, HttpServletResponse response, @RequestParam String code) {
+        infoListService.delRiskData(code);
+    }
+
+
+
+    @RequestMapping({"getRiskDataList"})
+    public void getRiskDataList(HttpServletRequest request, HttpServletResponse response,
+                                @RequestBody RiskExposureClassRuleModel model, @RequestParam String key) {
+        sendData(response,infoListService.getRiskDataList(model,key));
+    }
+
+
+    @RequestMapping({"createRiskRuleData"})
+    public void createRiskRuleData(HttpServletRequest request, HttpServletResponse response,
+                                   @RequestBody RiskExposureClassRuleModel model, @RequestParam String key ) {
+        infoListService.createRiskRuleData(model,key);
+    }
+
+    @RequestMapping({"updateRiskRuleExistData"})
+    public void updateRiskRuleExistData(HttpServletRequest request, HttpServletResponse response,
+                                        @RequestBody RiskExposureClassRuleModel model,@RequestParam String ruleNo ) {
+        infoListService.updateRiskRuleExistData(model,ruleNo);
+    }
+
+    @RequestMapping({"delRiskRuleData"})
+    public void delRiskRuleData(HttpServletRequest request, HttpServletResponse response, @RequestBody RiskExposureClassRuleModel model) {
+        infoListService.delRiskRuleData(model);
+    }
+
+    // 校验数据
+    @RequestMapping({"isNotExist"})
+    public void isNotExist(HttpServletRequest request, HttpServletResponse response, @RequestBody RiskExposureDefinitionModel model) {
+        if (null != model && !model.getRiskExposureNo().isEmpty()){
+            RiskExposureDefinitionModel checkModel = infoListService.getSelectTreeData(model.getRiskExposureNo());
+            if (null != checkModel) {
+                sendData(response,"该代码已存在");
+            } else {
+                sendData(response,true);
+            }
+        }
+    }
+
+}

+ 30 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/mapper/InfoListMapper.java

@@ -0,0 +1,30 @@
+package com.sundata.product.rwa.rwacalcconfig001riskexposure.mapper;
+
+import com.sundata.admin.nounmanage.model.DictContent;
+import com.sundata.common.base.BaseMapper;
+
+import com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureClassRuleModel;
+import com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureDefinitionModel;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface InfoListMapper{
+    List<DictContent> getFunTree1();
+
+    RiskExposureDefinitionModel getSelectTreeData(@Param("key") String key);
+
+    List<RiskExposureClassRuleModel> getRiskDataList(@Param("model") RiskExposureClassRuleModel model, @Param("key") String key);
+
+    void createRiskRuleData(@Param("model") RiskExposureClassRuleModel model,@Param("key") String key);
+
+    void updateRiskRuleExistData(@Param("model") RiskExposureClassRuleModel model,@Param("ruleNo")  String ruleNo);
+
+    void delRiskRuleData(@Param("model") RiskExposureClassRuleModel model);
+
+    void createRiskData(@Param("model") RiskExposureDefinitionModel model);
+
+    void updateRiskData(@Param("model") RiskExposureDefinitionModel model);
+
+    void delRiskData(@Param("code") String code);
+}

+ 145 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/model/RiskExposureClassRuleModel.java

@@ -0,0 +1,145 @@
+package com.sundata.product.rwa.rwacalcconfig001riskexposure.model;
+
+public class RiskExposureClassRuleModel {
+
+    // 计算实例号
+    private String calcIndex;
+    // 起始数据日期
+    private String startDate;
+    // 截止数据日期
+    private String endDate;
+    // 年月
+    private String term;
+    // 数据日期
+    private String dataDate;
+    // 风险暴露分类编号
+    private String riskExposureNo;
+    // 规则名称
+    private String ruleName;
+    // 规则编号
+    private String ruleNo;
+    // 所属产品
+    private String ruleProductNo;
+    // 划分规则
+    private String ruleGetdata;
+    // 规则序号
+    private String ruleIndex;
+    // 输入
+    private String ruleIn;
+    // 输出
+    private String ruleOut;
+    // 权重(%)
+    private String riskExposureWeight;
+
+    public String getCalcIndex() {
+        return calcIndex;
+    }
+
+    public void setCalcIndex(String calcIndex) {
+        this.calcIndex = calcIndex;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getTerm() {
+        return term;
+    }
+
+    public void setTerm(String term) {
+        this.term = term;
+    }
+
+    public String getDataDate() {
+        return dataDate;
+    }
+
+    public void setDataDate(String dataDate) {
+        this.dataDate = dataDate;
+    }
+
+    public String getRiskExposureNo() {
+        return riskExposureNo;
+    }
+
+    public void setRiskExposureNo(String riskExposureNo) {
+        this.riskExposureNo = riskExposureNo;
+    }
+
+    public String getRuleName() {
+        return ruleName;
+    }
+
+    public void setRuleName(String ruleName) {
+        this.ruleName = ruleName;
+    }
+
+    public String getRuleNo() {
+        return ruleNo;
+    }
+
+    public void setRuleNo(String ruleNo) {
+        this.ruleNo = ruleNo;
+    }
+
+    public String getRuleProductNo() {
+        return ruleProductNo;
+    }
+
+    public void setRuleProductNo(String ruleProductNo) {
+        this.ruleProductNo = ruleProductNo;
+    }
+
+    public String getRuleGetdata() {
+        return ruleGetdata;
+    }
+
+    public void setRuleGetdata(String ruleGetdata) {
+        this.ruleGetdata = ruleGetdata;
+    }
+
+    public String getRuleIndex() {
+        return ruleIndex;
+    }
+
+    public void setRuleIndex(String ruleIndex) {
+        this.ruleIndex = ruleIndex;
+    }
+
+    public String getRuleIn() {
+        return ruleIn;
+    }
+
+    public void setRuleIn(String ruleIn) {
+        this.ruleIn = ruleIn;
+    }
+
+    public String getRuleOut() {
+        return ruleOut;
+    }
+
+    public void setRuleOut(String ruleOut) {
+        this.ruleOut = ruleOut;
+    }
+
+    public String getRiskExposureWeight() {
+        return riskExposureWeight;
+    }
+
+    public void setRiskExposureWeight(String riskExposureWeight) {
+        this.riskExposureWeight = riskExposureWeight;
+    }
+}

+ 154 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/model/RiskExposureDefinitionModel.java

@@ -0,0 +1,154 @@
+package com.sundata.product.rwa.rwacalcconfig001riskexposure.model;
+
+public class RiskExposureDefinitionModel {
+    // 计算实例号
+    private String calcIndex;
+    // 起始数据日期
+    private String startDate;
+    // 截止数据日期
+    private String endDate;
+    // 年月
+    private String term;
+    // 数据日期
+    private String dataDate;
+    // 风险暴露分类编号
+    private String riskExposureNo;
+    // 风险暴露分类名称
+    private String riskExposureName;
+    // 所属阶段
+    private String riskExposureStageId;
+    // 默认输出
+    private String defaultOut;
+    // 分类定义序号
+    private String riskExposureIndex;
+    // 上级项目代码
+    private String riskExposureSuper;
+    // 上级项目代码名称
+    private String riskExposureSuperName;
+    // 是否最细一级
+    private String riskExposureIsmini;
+    // 默认权重(%)
+    private String riskExposureWeight;
+    // 状态
+    private String riskExposureState;
+
+    public String getCalcIndex() {
+        return calcIndex;
+    }
+
+    public void setCalcIndex(String calcIndex) {
+        this.calcIndex = calcIndex;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getTerm() {
+        return term;
+    }
+
+    public void setTerm(String term) {
+        this.term = term;
+    }
+
+    public String getDataDate() {
+        return dataDate;
+    }
+
+    public void setDataDate(String dataDate) {
+        this.dataDate = dataDate;
+    }
+
+    public String getRiskExposureNo() {
+        return riskExposureNo;
+    }
+
+    public void setRiskExposureNo(String riskExposureNo) {
+        this.riskExposureNo = riskExposureNo;
+    }
+
+    public String getRiskExposureName() {
+        return riskExposureName;
+    }
+
+    public void setRiskExposureName(String riskExposureName) {
+        this.riskExposureName = riskExposureName;
+    }
+
+    public String getRiskExposureStageId() {
+        return riskExposureStageId;
+    }
+
+    public void setRiskExposureStageId(String riskExposureStageId) {
+        this.riskExposureStageId = riskExposureStageId;
+    }
+
+    public String getDefaultOut() {
+        return defaultOut;
+    }
+
+    public void setDefaultOut(String defaultOut) {
+        this.defaultOut = defaultOut;
+    }
+
+    public String getRiskExposureIndex() {
+        return riskExposureIndex;
+    }
+
+    public void setRiskExposureIndex(String riskExposureIndex) {
+        this.riskExposureIndex = riskExposureIndex;
+    }
+
+    public String getRiskExposureSuper() {
+        return riskExposureSuper;
+    }
+
+    public void setRiskExposureSuper(String riskExposureSuper) {
+        this.riskExposureSuper = riskExposureSuper;
+    }
+
+    public String getRiskExposureSuperName() {
+        return riskExposureSuperName;
+    }
+
+    public void setRiskExposureSuperName(String riskExposureSuperName) {
+        this.riskExposureSuperName = riskExposureSuperName;
+    }
+
+    public String getRiskExposureIsmini() {
+        return riskExposureIsmini;
+    }
+
+    public void setRiskExposureIsmini(String riskExposureIsmini) {
+        this.riskExposureIsmini = riskExposureIsmini;
+    }
+
+    public String getRiskExposureWeight() {
+        return riskExposureWeight;
+    }
+
+    public void setRiskExposureWeight(String riskExposureWeight) {
+        this.riskExposureWeight = riskExposureWeight;
+    }
+
+    public String getRiskExposureState() {
+        return riskExposureState;
+    }
+
+    public void setRiskExposureState(String riskExposureState) {
+        this.riskExposureState = riskExposureState;
+    }
+}

+ 255 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/mybatis/InfoListMapper.xml

@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sundata.product.rwa.rwacalcconfig001riskexposure.mapper.InfoListMapper">
+    <select id="getFunTree1" resultType="com.sundata.admin.nounmanage.model.DictContent">
+         select
+        RISKEXPOSURE_NO       as id,
+        RISKEXPOSURE_NAME     as text,
+        RISKEXPOSURE_SUPER    as parentid,
+        RISKEXPOSURE_STATE    as attributes
+        from RWA_CALC_CONF_RISKEXPOSURE
+        order by RISKEXPOSURE_SUPER,RISKEXPOSURE_NO
+    </select>
+
+    <!-- 定义维护页面展示 -->
+    <select id="getSelectTreeData" resultType="com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureDefinitionModel">
+        SELECT
+        T1.CALCINDEX                     AS      calcIndex,
+        T1.SDATE                         AS      startDate,
+        T1.EDATE                         AS      endDate,
+        T1.TERM                          AS      term,
+        T1.DATA_DATE                     AS      dataDate,
+        T1.RISKEXPOSURE_NO               AS      riskExposureNo,
+        T1.RISKEXPOSURE_NAME             AS      riskExposureName,
+        T1.RISKEXPOSURE_STAGE_ID         AS      riskExposureStageId,
+        T1.DEFAULT_OUT                   AS      defaultOut,
+        T1.RISKEXPOSURE_INDEX            AS      riskExposureIndex,
+        T1.RISKEXPOSURE_SUPER            AS      riskExposureSuper,
+        T1.RISKEXPOSURE_ISMINI           AS      riskExposureIsmini,
+        T1.RISKEXPOSURE_WEIGHT           AS      riskExposureWeight,
+        CASE
+        WHEN T1.RISKEXPOSURE_STATE = '1' THEN '生效'
+        WHEN T1.RISKEXPOSURE_STATE = '0' THEN '失效'
+        END                              AS      riskExposureState,
+        T2.RISKEXPOSURE_NAME             AS      riskExposureSuperName
+        FROM RWA_CALC_CONF_RISKEXPOSURE T1
+        LEFT JOIN
+        (SELECT
+        RISKEXPOSURE_NO,
+        RISKEXPOSURE_NAME
+        FROM
+        RWA_CALC_CONF_RISKEXPOSURE )T2
+        ON T1.RISKEXPOSURE_SUPER = T2.RISKEXPOSURE_NO
+        <where>
+            <if test="key != null and key !=''">
+                T1.RISKEXPOSURE_NO = #{key}
+            </if>
+        </where>
+    </select>
+
+    <!-- 风险暴漏定义维护新建数据 -->
+    <insert id="createRiskData" parameterType="com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureDefinitionModel">
+        insert into RWA_CALC_CONF_RISKEXPOSURE
+        (CALCINDEX,
+        SDATE,
+        EDATE,
+        TERM,
+        DATA_DATE,
+        RISKEXPOSURE_NO,
+        RISKEXPOSURE_NAME,
+        RISKEXPOSURE_STAGE_ID,
+        DEFAULT_OUT,
+        RISKEXPOSURE_INDEX,
+        RISKEXPOSURE_SUPER,
+        RISKEXPOSURE_ISMINI,
+        RISKEXPOSURE_WEIGHT,
+        RISKEXPOSURE_STATE
+        )
+        values(
+        #{model.calcIndex},
+        #{model.startDate},
+        #{model.endDate},
+        #{model.term},
+        #{model.dataDate},
+        #{model.riskExposureNo},
+        #{model.riskExposureName},
+        #{model.riskExposureStageId},
+        #{model.defaultOut},
+        #{model.riskExposureIndex},
+        #{model.riskExposureSuper},
+        #{model.riskExposureIsmini},
+        #{model.riskExposureWeight},
+        #{model.riskExposureState}
+        )
+    </insert>
+
+
+    <!-- 风险暴漏定义维护修改数据 -->
+    <update id="delRiskData">
+        update RWA_CALC_CONF_RISKEXPOSURE
+        <trim suffixOverrides=",">
+            <set>
+                RISKEXPOSURE_STATE = '0'
+            </set>
+        </trim>
+        <where>
+            RISKEXPOSURE_NO = #{code}
+        </where>
+    </update>
+
+    <!-- 风险暴漏定义维护修改数据 -->
+    <update id="updateRiskData">
+        update RWA_CALC_CONF_RISKEXPOSURE
+        <trim suffixOverrides=",">
+            <set>
+                <if test="model.riskExposureSuper != null and model.riskExposureSuper != ''">
+                    RISKEXPOSURE_SUPER = #{model.riskExposureSuper},
+                </if>
+                <if test="model.riskExposureIsmini != null and model.riskExposureIsmini != ''">
+                    RISKEXPOSURE_ISMINI = #{model.riskExposureIsmini},
+                </if>
+                <if test="model.riskExposureWeight != null and model.riskExposureWeight != ''">
+                    RISKEXPOSURE_WEIGHT = #{model.riskExposureWeight},
+                </if>
+                <choose>
+                    <when test='model.riskExposureIsmini == "0" '>
+                        RISKEXPOSURE_WEIGHT = 0,
+                    </when>
+                </choose>
+                <if test="model.defaultOut != null and model.defaultOut != ''">
+                    DEFAULT_OUT = #{model.defaultOut},
+                </if>
+                <if test="model.riskExposureStageId != null and model.riskExposureStageId != ''">
+                    RISKEXPOSURE_STAGE_ID = #{model.riskExposureStageId},
+                </if>
+                <if test="model.riskExposureIndex != null and model.riskExposureIndex != ''">
+                    RISKEXPOSURE_INDEX = #{model.riskExposureIndex},
+                </if>
+                    RISKEXPOSURE_STATE = '1'
+            </set>
+        </trim>
+        <where>
+            RISKEXPOSURE_NO = #{model.riskExposureNo}
+        </where>
+    </update>
+
+
+
+    <!-- 规则列表展示 -->
+    <select id="getRiskDataList" resultType="com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureClassRuleModel">
+        SELECT
+        CALCINDEX                             AS       calcIndex,
+        SDATE                                 AS       startDate,
+        EDATE                                 AS       endDate,
+        TERM                                  AS       term,
+        DATA_DATE                             AS       dataDate,
+        RISKEXPOSURE_NO                       AS       riskExposureNo,
+        RULE_NAME                             AS       ruleName,
+        RULE_NO                               AS       ruleNo,
+        RULE_PRODUCT_NO                       AS       ruleProductNo,
+        RULE_GETDATA                          AS       ruleGetdata,
+        RULE_INDEX                            AS       ruleIndex,
+        RULE_IN                               AS       ruleIn,
+        RULE_OUT                              AS       ruleOut,
+        RISKEXPOSURE_WEIGHT                   AS       riskExposureWeight
+        FROM
+        RWA_CALC_CONF_RISKEXPOSURERULE
+        <where>
+            <if test="null != key and '' != key">
+                RISKEXPOSURE_NO = #{key}
+            </if>
+            <if test="null != model.ruleNo and '' != model.ruleNo">
+                and RULE_NO = #{model.ruleNo}
+            </if>
+        </where>
+    </select>
+
+
+
+    <!-- 风险暴漏规则修改数据 -->
+    <update id="updateRiskRuleExistData">
+        update RWA_CALC_CONF_RISKEXPOSURERULE
+        <trim suffixOverrides=",">
+            <set>
+                <if test="model.ruleNo != null and model.ruleNo != ''">
+                    RULE_NO = #{model.ruleNo},
+                </if>
+                <if test="model.ruleName != null and model.ruleName != ''">
+                    RULE_NAME = #{model.ruleName},
+                </if>
+                <if test="model.ruleProductNo != null and model.ruleProductNo != ''">
+                    RULE_PRODUCT_NO = #{model.ruleProductNo},
+                </if>
+                <if test="model.ruleIn != null and model.ruleIn != ''">
+                    RULE_IN = #{model.ruleIn},
+                </if>
+                <if test="model.ruleOut != null and model.ruleOut != ''">
+                    RULE_OUT = #{model.ruleOut},
+                </if>
+                <if test="model.ruleIndex != null and model.ruleIndex != ''">
+                    RULE_INDEX = #{model.ruleIndex},
+                </if>
+                <if test="model.ruleGetdata != null and model.ruleGetdata != ''">
+                    RULE_GETDATA = #{model.ruleGetdata},
+                </if>
+                <if test="model.riskExposureWeight != null and model.riskExposureWeight != ''">
+                    RISKEXPOSURE_WEIGHT = #{model.riskExposureWeight},
+                </if>
+            </set>
+        </trim>
+        <where>
+            RULE_NO = #{ruleNo}
+        </where>
+    </update>
+
+
+    <!-- 风险暴漏规则新建数据 -->
+    <insert id="createRiskRuleData" parameterType="com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureClassRuleModel">
+        insert into RWA_CALC_CONF_RISKEXPOSURERULE
+        (CALCINDEX,
+        SDATE,
+        EDATE,
+        TERM,
+        DATA_DATE,
+        RISKEXPOSURE_NO,
+        RULE_NAME,
+        RULE_NO,
+        RULE_PRODUCT_NO,
+        RULE_GETDATA,
+        RULE_INDEX,
+        RULE_IN,
+        RULE_OUT,
+        RISKEXPOSURE_WEIGHT
+        )
+        values(
+        #{model.calcIndex},
+        #{model.startDate},
+        #{model.endDate},
+        #{model.term},
+        #{model.dataDate},
+        #{key},
+        #{model.ruleName},
+        #{model.ruleNo},
+        #{model.ruleProductNo},
+        #{model.ruleGetdata},
+        #{model.ruleIndex},
+        #{model.ruleIn},
+        #{model.ruleOut},
+        #{model.riskExposureWeight}
+        )
+    </insert>
+
+    <!-- 风险暴漏规则删除当前行 -->
+    <delete id="delRiskRuleData">
+        delete  from RWA_CALC_CONF_RISKEXPOSURERULE
+        <where>
+            <if test=" null != model.ruleNo and '' != model.ruleNo">
+                 RULE_NO = #{model.ruleNo};
+            </if>
+        </where>
+    </delete>
+
+
+</mapper>

+ 69 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfig001riskexposure/service/InfoListService.java

@@ -0,0 +1,69 @@
+package com.sundata.product.rwa.rwacalcconfig001riskexposure.service;
+
+
+import com.sundata.admin.nounmanage.model.DictContent;
+import com.sundata.admin.nounmanage.model.DictTree;
+import com.sundata.common.util.TreeUtil;
+
+import com.sundata.product.rwa.rwacalcconfig001riskexposure.mapper.InfoListMapper;
+import com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureClassRuleModel;
+import com.sundata.product.rwa.rwacalcconfig001riskexposure.model.RiskExposureDefinitionModel;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public  class InfoListService  implements CommandLineRunner {
+    @Autowired
+    InfoListMapper infoListMapper;
+
+
+
+
+    public List<DictTree> getFunTree1() {
+        List<DictTree> treeList = null;
+        List<DictContent> parseTreeData = infoListMapper.getFunTree1();
+        treeList = TreeUtil.parseTree(parseTreeData);
+        return treeList;
+    }
+
+
+    @Override
+    public void run(String... args) throws Exception {
+
+    }
+
+    public RiskExposureDefinitionModel getSelectTreeData(String key) {
+        return infoListMapper.getSelectTreeData(key);
+    }
+
+    public List<RiskExposureClassRuleModel> getRiskDataList(RiskExposureClassRuleModel model, String key) {
+        return infoListMapper.getRiskDataList(model,key);
+    }
+
+    public void createRiskRuleData(RiskExposureClassRuleModel model,String key) {
+        infoListMapper.createRiskRuleData(model,key);
+    }
+
+    public void updateRiskRuleExistData(RiskExposureClassRuleModel model,String ruleNo) {
+        infoListMapper.updateRiskRuleExistData(model,ruleNo);
+    }
+
+    public void delRiskRuleData(RiskExposureClassRuleModel model) {
+        infoListMapper.delRiskRuleData(model);
+    }
+
+    public void createRiskData(RiskExposureDefinitionModel model) {
+        infoListMapper.createRiskData(model);
+    }
+
+    public void updateRiskData(RiskExposureDefinitionModel model) {
+        infoListMapper.updateRiskData(model);
+    }
+
+    public void delRiskData(String code) {
+        infoListMapper.delRiskData(code);
+    }
+}

+ 78 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/action/RuleAction.java

@@ -0,0 +1,78 @@
+package com.sundata.product.rwa.rwacalcconfigacquisition.action;
+
+import com.sundata.common.base.BaseAction;
+import com.sundata.product.rwa.rwacalcconfigacquisition.model.RuleModel;
+import com.sundata.product.rwa.rwacalcconfigacquisition.service.RuleService;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.List;
+
+@Controller
+@RequestMapping("product/rwa/rwacalcconfigacquisition/RuleAction")
+public class RuleAction extends BaseAction {
+    // 日志
+    static final Logger log = LoggerFactory.getLogger(RuleAction.class);
+    
+    @Autowired
+    RuleService ruleService;
+
+    @RequestMapping("/getDataList")
+    public void getDataList (HttpServletRequest request, HttpServletResponse response,
+                             @RequestBody RuleModel model) {
+        // 页面初始化
+        sendData(response, ruleService.getDataList(model));
+    }
+
+    @RequestMapping("/createDetailData")
+    public void createDetailData (HttpServletRequest request, HttpServletResponse response
+            ,@RequestBody RuleModel model) {
+        // 新建数据
+        sendData(response, ruleService.createDetailData(model));
+    }
+
+    @RequestMapping("/deleteRows")
+    public void updateDataState (HttpServletRequest request,
+                            HttpServletResponse response, @RequestParam String ruleNo) {
+        // 作废当前行
+        sendData(response, ruleService.updateDataState(ruleNo));
+    }
+
+    @RequestMapping("/selectDetailData")
+    public void selectDetailData (HttpServletRequest request,
+                                  HttpServletResponse response, @RequestBody RuleModel model) {
+        // 查询当前行详细数据
+        sendData(response, ruleService.selectDetailData(model));
+    }
+
+    @RequestMapping("/updateExistData")
+    public void updateExistData (HttpServletRequest request,
+                                 HttpServletResponse response, @RequestParam String ruleNo, @RequestBody RuleModel model) {
+        // 更新数据行
+        sendData(response, ruleService.updateExistData(ruleNo,model));
+    }
+
+    @RequestMapping("/exportExcelModel")
+    public void exportExcelModel (HttpServletRequest request, HttpServletResponse response,
+                                  @RequestParam String fileNameCode,@RequestBody List<RuleModel> modelList) throws IOException {
+
+        try {
+            request.setCharacterEncoding("UTF-8");
+            response.setContentType("test/html; charset=UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            throw new RuntimeException(e);
+        }
+        // 导出数据
+        ruleService.exportExcelModel(response,fileNameCode,modelList);
+        // sendData(response, ruleService.exportExcelModel(response,fileNameCode,modelList));
+    }
+}

+ 19 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/mapper/RuleMapper.java

@@ -0,0 +1,19 @@
+package com.sundata.product.rwa.rwacalcconfigacquisition.mapper;
+
+import com.sundata.product.rwa.rwacalcconfigacquisition.model.RuleModel;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface RuleMapper {
+    // 数据初始化查询
+    List<RuleModel> getDataList(@Param("model") RuleModel model);
+    // 新增数据
+    boolean createDetailData(@Param("model") RuleModel model);
+    // 删除数据
+    boolean updateDataState(@Param("ruleNo") String ruleNo);
+    // 查询当前行数据
+    RuleModel selectDetailData(@Param("model") RuleModel model);
+    // 更新数据
+    boolean updateExistData(@Param("ruleNo")String ruleNo, @Param("model") RuleModel model);
+}

+ 194 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/model/RuleModel.java

@@ -0,0 +1,194 @@
+package com.sundata.product.rwa.rwacalcconfigacquisition.model;
+
+public class RuleModel {
+    // 计算实例号
+    private String calcIndex;
+    // 起始数据日期
+    private String startDate;
+    // 截止数据日期
+    private String endDate;
+    // 年月
+    private String term;
+    // 数据日期
+    private String dataDate;
+    // 规则编号
+    private String ruleNo;
+    // 规则名称
+    private String ruleName;
+    // 科目代码
+    private String subjectCodes;
+    // 科目名称
+    private String subjectNames;
+    // 记账方向
+    private String accountingDirection;
+    // 计算方式
+    private String calcMode;
+    // 表内外标识
+    private String onOrOff;
+    // 取值方式
+    private String getdataMode;
+    // 计算项
+    private String resultType;
+    // 表内风险暴露分类
+    private String ledgerRiskexposureNo;
+    // 表外项目分类
+    private String ledgerOffObjectNo;
+    // 所属阶段
+    private String ledgerStageId;
+    // 总账取数规则
+    private String ledgerGetdataRule;
+    // 状态
+    private String state;
+
+    public String getCalcIndex() {
+        return calcIndex;
+    }
+
+    public void setCalcIndex(String calcIndex) {
+        this.calcIndex = calcIndex;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getTerm() {
+        return term;
+    }
+
+    public void setTerm(String term) {
+        this.term = term;
+    }
+
+    public String getDataDate() {
+        return dataDate;
+    }
+
+    public void setDataDate(String dataDate) {
+        this.dataDate = dataDate;
+    }
+
+    public String getRuleNo() {
+        return ruleNo;
+    }
+
+    public void setRuleNo(String ruleNo) {
+        this.ruleNo = ruleNo;
+    }
+
+    public String getRuleName() {
+        return ruleName;
+    }
+
+    public void setRuleName(String ruleName) {
+        this.ruleName = ruleName;
+    }
+
+    public String getSubjectCodes() {
+        return subjectCodes;
+    }
+
+    public void setSubjectCodes(String subjectCodes) {
+        this.subjectCodes = subjectCodes;
+    }
+
+    public String getSubjectNames() {
+        return subjectNames;
+    }
+
+    public void setSubjectNames(String subjectNames) {
+        this.subjectNames = subjectNames;
+    }
+
+    public String getAccountingDirection() {
+        return accountingDirection;
+    }
+
+    public void setAccountingDirection(String accountingDirection) {
+        this.accountingDirection = accountingDirection;
+    }
+
+    public String getCalcMode() {
+        return calcMode;
+    }
+
+    public void setCalcMode(String calcMode) {
+        this.calcMode = calcMode;
+    }
+
+    public String getOnOrOff() {
+        return onOrOff;
+    }
+
+    public void setOnOrOff(String onOrOff) {
+        this.onOrOff = onOrOff;
+    }
+
+    public String getGetdataMode() {
+        return getdataMode;
+    }
+
+    public void setGetdataMode(String getdataMode) {
+        this.getdataMode = getdataMode;
+    }
+
+    public String getResultType() {
+        return resultType;
+    }
+
+    public void setResultType(String resultType) {
+        this.resultType = resultType;
+    }
+
+    public String getLedgerRiskexposureNo() {
+        return ledgerRiskexposureNo;
+    }
+
+    public void setLedgerRiskexposureNo(String ledgerRiskexposureNo) {
+        this.ledgerRiskexposureNo = ledgerRiskexposureNo;
+    }
+
+    public String getLedgerOffObjectNo() {
+        return ledgerOffObjectNo;
+    }
+
+    public void setLedgerOffObjectNo(String ledgerOffObjectNo) {
+        this.ledgerOffObjectNo = ledgerOffObjectNo;
+    }
+
+    public String getLedgerStageId() {
+        return ledgerStageId;
+    }
+
+    public void setLedgerStageId(String ledgerStageId) {
+        this.ledgerStageId = ledgerStageId;
+    }
+
+    public String getLedgerGetdataRule() {
+        return ledgerGetdataRule;
+    }
+
+    public void setLedgerGetdataRule(String ledgerGetdataRule) {
+        this.ledgerGetdataRule = ledgerGetdataRule;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+}

+ 207 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/mybatis/RuleMapper.xml

@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sundata.product.rwa.rwacalcconfigacquisition.mapper.RuleMapper">
+    <!-- 初始化与按查询条件查询 -->
+    <select id="getDataList" resultType="com.sundata.product.rwa.rwacalcconfigacquisition.model.RuleModel" parameterType="com.sundata.product.rwa.rwacalcconfigacquisition.model.RuleModel">
+        select
+        CALCINDEX                              as calcIndex,
+        SDATE                                  as startDate,
+        EDATE                                  as endDate,
+        TERM                                   as term,
+        DATA_DATE                              as dataDate,
+        RULE_NO                                as ruleNo,
+        RULE_NAME                              as ruleName,
+        SUBJECT_CODES                          as subjectCodes,
+        SUBJECT_NAMES                          as subjectNames,
+        ACCOUNTING_DIRECTION                   as accountingDirection,
+        CALC_MODE                              as calcMode,
+        ONOROFF                                as onOrOff,
+        GETDATA_MODE                           as getdataMode,
+        RESULT_TYPE                            as resultType,
+        LEDGER_RISKEXPOSURE_NO                 as ledgerRiskexposureNo,
+        LEDGER_OFFOBJECT_NO                    as ledgerOffObjectNo,
+        LEDGER_STAGE_ID                        as ledgerStageId,
+        LEDGER_GETDATA_RULE                    as ledgerGetdataRule,
+        case
+        when LEDGER_STATE = '0' then '失效'
+        when LEDGER_STATE = '1' then '生效'
+        end                                    as state
+        from RWA_CALC_CONF_LEDGERCONFIG
+        <where>
+            <if test="model.ruleNo != null and '' != model.ruleNo">
+                and RULE_NO like concat(concat('%',#{model.ruleNo}),'%')
+            </if>
+            <if test="model.ruleName != null and '' != model.ruleName">
+                and RULE_NAME like concat(concat('%',#{model.ruleName}),'%')
+            </if>
+            <if test="model.subjectCodes != null and '' != model.subjectCodes">
+                and SUBJECT_CODES like concat(concat('%',#{model.subjectCodes}),'%')
+            </if>
+            <if test="model.subjectNames != null and '' != model.subjectNames">
+                and SUBJECT_NAMES like concat(concat('%',#{model.subjectNames}),'%')
+            </if>
+            <if test="model.ledgerRiskexposureNo != null and '' != model.ledgerRiskexposureNo">
+                and LEDGER_RISKEXPOSURE_NO like concat(concat('%',#{model.ledgerRiskexposureNo}),'%')
+            </if>
+            <if test="model.ledgerOffObjectNo != null and '' != model.ledgerOffObjectNo">
+                and LEDGER_OFFOBJECT_NO like concat(concat('%',#{model.ledgerOffObjectNo}),'%')
+            </if>
+        </where>
+        order by RULE_NO,SUBJECT_CODES,LEDGER_RISKEXPOSURE_NO,LEDGER_OFFOBJECT_NO
+    </select>
+
+    <!-- 新建数据 -->
+    <insert id="createDetailData" parameterType="com.sundata.product.rwa.rwacalcconfigacquisition.model.RuleModel">
+    insert into RWA_CALC_CONF_LEDGERCONFIG
+        (CALCINDEX,
+        SDATE,
+        EDATE,
+        TERM,
+        DATA_DATE,
+        RULE_NO,
+        RULE_NAME,
+        SUBJECT_CODES,
+        SUBJECT_NAMES,
+        ACCOUNTING_DIRECTION,
+        CALC_MODE,
+        ONOROFF,
+        GETDATA_MODE,
+        RESULT_TYPE,
+        LEDGER_RISKEXPOSURE_NO,
+        LEDGER_OFFOBJECT_NO,
+        LEDGER_STAGE_ID,
+        LEDGER_GETDATA_RULE,
+        LEDGER_STATE)
+    values(
+        #{model.calcIndex},
+        #{model.startDate},
+        #{model.endDate},
+        #{model.term},
+        #{model.dataDate},
+        #{model.ruleNo},
+        #{model.ruleName},
+        #{model.subjectCodes},
+        #{model.subjectNames},
+        #{model.accountingDirection},
+        #{model.calcMode},
+        #{model.onOrOff},
+        #{model.getdataMode},
+        #{model.resultType},
+        #{model.ledgerRiskexposureNo},
+        #{model.ledgerOffObjectNo},
+        #{model.ledgerStageId},
+        #{model.ledgerGetdataRule},
+        #{model.state}
+        )
+    </insert>
+
+    <!-- 删除当前行 -->
+    <delete id="deleteRows"  parameterType="java.lang.String">
+        delete  from RWA_CALC_CONF_LEDGERCONFIG
+        <where>
+            <if test="ruleNo != null and '' != ruleNo">
+                and RULE_NO = #{ruleNo};
+            </if>
+        </where>
+    </delete>
+
+    <!-- 更新数据 -->
+    <update id="updateExistData">
+        update RWA_CALC_CONF_LEDGERCONFIG
+        <trim suffixOverrides=",">
+            <set>
+                <if test="model.ruleNo != null and '' != model.ruleNo">
+                    RULE_NO=#{model.ruleNo},
+                </if>
+                <if test="model.ruleNo != null and '' != model.ruleNo">
+                    RULE_NO=#{model.ruleNo},
+                </if>
+                <if test="model.ruleName != null and '' != model.ruleName">
+                    RULE_NAME=#{model.ruleName},
+                </if>
+                <if test="model.subjectCodes != null and '' != model.subjectCodes">
+                    SUBJECT_CODES=#{model.subjectCodes},
+                </if>
+                <if test="model.subjectNames != null and '' != model.subjectNames">
+                    SUBJECT_NAMES=#{model.subjectNames},
+                </if>
+                <if test="model.accountingDirection != null and '' != model.accountingDirection">
+                    ACCOUNTING_DIRECTION=#{model.accountingDirection},
+                </if>
+                <if test="model.calcMode != null and '' != model.calcMode">
+                    CALC_MODE=#{model.calcMode},
+                </if>
+                <if test="model.onOrOff != null and '' != model.onOrOff">
+                    ONOROFF=#{model.onOrOff},
+                </if>
+                <if test="model.getdataMode != null and '' != model.getdataMode">
+                    GETDATA_MODE=#{model.getdataMode},
+                </if>
+                <if test="model.resultType != null and '' != model.resultType">
+                    RESULT_TYPE=#{model.resultType},
+                </if>
+                <if test="model.ledgerRiskexposureNo != null and '' != model.ledgerRiskexposureNo">
+                    LEDGER_RISKEXPOSURE_NO=#{model.ledgerRiskexposureNo},
+                </if>
+                <if test="model.ledgerOffObjectNo != null and '' != model.ledgerOffObjectNo">
+                    LEDGER_OFFOBJECT_NO=#{model.ledgerOffObjectNo},
+                </if>
+                <if test="model.ledgerStageId != null and '' != model.ledgerStageId">
+                    LEDGER_STAGE_ID=#{model.ledgerStageId},
+                </if>
+                <if test="model.ledgerGetdataRule != null and '' != model.ledgerGetdataRule">
+                    LEDGER_GETDATA_RULE=#{model.ledgerGetdataRule},
+                </if>
+                LEDGER_STATE='1'
+            </set>
+        </trim>
+        <where>
+            RULE_NO = #{ruleNo};
+        </where>
+    </update>
+
+    <!-- 作废数据(逻辑删除) -->
+    <update id="updateDataState"  parameterType="java.lang.String">
+        update RWA_CALC_CONF_LEDGERCONFIG
+        <set>
+            LEDGER_STATE = 0
+        </set>
+        <where>
+            RULE_NO = #{ruleNo};
+        </where>
+    </update>
+
+
+    <!-- 查询当前行(修改用) -->
+    <select id="selectDetailData"
+            parameterType="com.sundata.product.rwa.rwacalcconfigacquisition.model.RuleModel"
+            resultType="com.sundata.product.rwa.rwacalcconfigacquisition.model.RuleModel">
+        select
+        CALCINDEX                              as calcIndex,
+        SDATE                                  as startDate,
+        EDATE                                  as endDate,
+        TERM                                   as term,
+        DATA_DATE                              as dataDate,
+        RULE_NO                                as ruleNo,
+        RULE_NAME                              as ruleName,
+        SUBJECT_CODES                          as subjectCodes,
+        SUBJECT_NAMES                          as subjectNames,
+        ACCOUNTING_DIRECTION                   as accountingDirection,
+        CALC_MODE                              as calcMode,
+        ONOROFF                                as onOrOff,
+        GETDATA_MODE                           as getdataMode,
+        RESULT_TYPE                            as resultType,
+        LEDGER_RISKEXPOSURE_NO                 as ledgerRiskexposureNo,
+        LEDGER_OFFOBJECT_NO                    as ledgerOffObjectNo,
+        LEDGER_STAGE_ID                        as ledgerStageId,
+        LEDGER_GETDATA_RULE                    as ledgerGetdataRule,
+        LEDGER_STATE                           as state
+        from RWA_CALC_CONF_LEDGERCONFIG
+        <where>
+            RULE_NO = #{model.ruleNo}
+        </where>
+    </select>
+
+</mapper>

+ 97 - 0
Procedure/backend/project/src/main/java/com/sundata/product/rwa/rwacalcconfigacquisition/service/RuleService.java

@@ -0,0 +1,97 @@
+package com.sundata.product.rwa.rwacalcconfigacquisition.service;
+
+import com.sundata.admin.excelmanage.mapper.RptDefineMapper;
+import com.sundata.admin.excelmanage.model.RptDefineModel;
+import com.sundata.common.base.BaseMapper;
+import com.sundata.common.base.BaseService;
+import com.sundata.common.exception.BusinessException;
+import com.sundata.common.util.DBExecutor;
+import com.sundata.product.rwa.businessconfig.utils.FilesValueCheckUtils;
+import com.sundata.product.rwa.rwacalcconfigacquisition.mapper.RuleMapper;
+import com.sundata.product.rwa.rwacalcconfigacquisition.model.RuleModel;
+import jakarta.servlet.http.HttpServletResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.util.List;
+
+@Service
+public class RuleService extends BaseService<RptDefineModel> {
+
+    // 日志
+    static final Logger log = LoggerFactory.getLogger(RuleService.class);
+
+    @Autowired
+    RuleMapper ruleMapper;
+
+    @Autowired
+    private RptDefineMapper<RptDefineModel> rptDefineMapper;
+
+    // 初始化查询数据
+    public List<RuleModel> getDataList(RuleModel model) {
+        List<RuleModel> resultData = ruleMapper.getDataList(model);
+        return resultData;
+    }
+
+    // 新增数据
+    public boolean createDetailData(RuleModel model) {
+        boolean ddlSqlFlag = ruleMapper.createDetailData(model);
+        return ddlSqlFlag;
+    }
+
+    // 作废数据
+    public boolean updateDataState(String ruleNo) {
+        boolean ddlSqlFlag = ruleMapper.updateDataState(ruleNo);
+        return ddlSqlFlag;
+    }
+
+    // 查询当前行数据
+    public RuleModel selectDetailData(RuleModel model) {
+        RuleModel resultModel = ruleMapper.selectDetailData(model);
+        return resultModel;
+    }
+
+    // 更新已存在数据
+    public boolean updateExistData(String ruleNo,RuleModel model) {
+        boolean ddlSqlFlag = ruleMapper.updateExistData(ruleNo,model);
+        return ddlSqlFlag;
+    }
+
+    // 导出数据
+    public void exportExcelModel(HttpServletResponse response, String fileNameCode, List<RuleModel> modelList) throws IOException {
+
+        // 数据检查
+        if (null == modelList) {
+            String err = "导出数据为空!";
+            log.error(err);
+            throw new BusinessException(err);
+        }
+        // 取得文件名
+        String fileName = DBExecutor.doQuery("select RPTNAME from SYS_RPTDEFINE where RPTCODE = '"+ fileNameCode +"'");
+        // 字典里获取附件路径
+        String templatePath = DBExecutor.doQuery("select NOUNVALUE from sys_noun where NOUNITEM = 'ATTACHPATH'");
+
+        // TODO  获取菜单名
+        String menuName = DBExecutor.doQuery("select funcname from sys_funinfo where funccode='M411001'");
+        StringBuilder pathName = new StringBuilder(templatePath+"/"+menuName);
+        // 获取数据库模板文件
+        RptDefineModel entity = (RptDefineModel)this.queryOne(fileNameCode);
+        // 判断是否获取成功
+        if (entity == null) {
+            String err = "报表代码[" + fileNameCode + "]不存在!";
+            log.error(err);
+            throw new BusinessException(err);
+        } else {
+            // 获取成功执行导出方法
+            FilesValueCheckUtils.exportExcelModel(response,modelList,pathName,fileName,entity);
+        }
+    }
+
+    @Override
+    public BaseMapper<RptDefineModel> getMapper() {
+        return this.rptDefineMapper;
+    }
+}

+ 502 - 0
Procedure/frontend/projectb/src/pages/rwa_calc_config_001riskexposure/info.tsx

@@ -0,0 +1,502 @@
+import React, { useEffect, useRef, useState } from 'react';
+import { Button, Dropdown, Form, FormInstance, Input, Menu, Space, Tooltip, Upload } from 'antd';
+import { ActionType, ProColumns, ProFormInstance, ProTable } from '@ant-design/pro-components';
+import { baseFun, ContextMenu, DictTree, EditType, SDOperate, SDForm, SDFormDict, SDFormText, SDLayout, SDModalForm, SDPage, SDSubmitButton, SDTable, SDTree, TableData,SDButton,SDAreaTtile } from '@sundata/ui-frame';
+import { SysFunButtonInfoModel,riskExposureDefinitionModel,riskExposureClassRuleModel } from '@/services/rwa/rwa_calc_config_001riskexposure/info';
+import {  getDetail1, getFunTree1,getSelectTreeData,getRiskDataList,createRiskRuleData,updateRiskRuleExistData,delRiskRuleData,createRiskData,updateRiskData,isNotExist,deleteFunc } from '@/services/rwa/rwa_calc_config_001riskexposure/info';
+import { DataNode } from 'antd/lib/tree';
+import { MenuInfo } from 'rc-menu/lib/interface';
+import { SortOrder } from 'antd/es/table/interface';
+import { CheckSquareOutlined, CloseSquareTwoTone, PlusSquareTwoTone, WomanOutlined } from "@ant-design/icons";
+import { ProductProps } from '@/sundataImport';
+import { useModel } from '@umijs/max';
+import { number } from 'echarts';
+import { method, toNumber } from 'lodash';
+import DirectoryTree from 'antd/es/tree/DirectoryTree';
+
+type widowProp = {
+  onCancel:  () => void;
+  onChangeVisible(visible: boolean, type: string): unknown;
+  onChangeVisdible:(visible:boolean,type ?: 'none' | 'raload' )=>void;
+}& ProductProps;
+const info: React.FC<widowProp> = (prop:widowProp) => {
+
+    /** 编辑方式,查看、修改、新增按钮时设置,详细信息表单中使用 */
+    const [editType, setEditType] = useState<EditType>(prop.editType || 'update');
+    /** 是否显示详细信息窗口 */
+    const [detailVisible, setDetailVisible] = useState<boolean>(false);
+    const [currentRow, setCurrentRow] = useState<riskExposureClassRuleModel>();
+    /** 表格引用对象,刷新表格使用   */
+    const actionRef = useRef<ActionType>();
+    const formRef = useRef<FormInstance<any>>();
+    const proformRef = useRef<FormInstance>();
+    const [key, setKey] = useState<any>();
+    const [editRuleNo, setEditRuleNo] = useState<any>();
+    /** 编辑方式,查看、修改、新增按钮时设置,详细信息表单中使用 */
+    const [backEditType, setBackEditType] = useState<EditType>(prop.editType || 'update');
+    const backformRef = useRef<FormInstance>();
+    /** 表格引用对象,刷新表格使用   */
+    const backActionRef = useRef<ActionType>();
+    const [treeData, setTreeData] = useState<DictTree[]>();
+
+    const leaf = useRef('1');
+    const levelcode = useRef(0);
+
+    const [dataSource, setDataSource] = useState<readonly SysFunButtonInfoModel[]>()
+    let runtimeEditType: EditType;
+    /** 是否单一权重 显示使用   */
+    const [riskFlag,setRiskFlag] = useState<boolean>(false);
+    const[riskWeightFlag,setRiskWeightFlag] = useState<boolean>(false);
+
+    // 页面数据
+    const[formData,setFormData] = useState<riskExposureClassRuleModel[]>();
+
+    const { fetchDict } = useModel('dict');
+
+  useEffect(() => {
+    refreshTree();
+  }, []);
+
+  // 获取树结构
+  const refreshTree = async () => {
+    const newTree = await getFunTree1();
+    formatArray(newTree);
+    setTreeData(newTree);
+  };
+
+  // 树结构图标初始化(新增和废除)
+  function formatArray (arr:DictTree[]) {
+    arr.forEach((item) => {
+     if(Array.isArray(item.children)==false){
+      if (item.attribute == '0') {
+        item.icon=<CloseSquareTwoTone/>;
+      } else {
+        item.icon= <CheckSquareOutlined/>;
+      }
+     };
+     Array.isArray(item.children) ? formatArray(item.children) : item;
+    });
+ }
+
+  // 新建节点
+  const createNode = (node: DictTree) => {
+    const offobjectNo = node.key as string;
+    setEditType('create');
+    runtimeEditType = 'create';
+    // 设置新增初始值
+    formRef.current?.setFieldsValue({
+      buttonList: [],
+      funccode: '',
+      funcname: '',
+      num: 0,
+      oldfunccode: '',
+      orderno: 1,
+      parentname: node.title?.toString(),
+      remark: '',
+      url: '',
+    });
+    leaf.current = '1';
+    levelcode.current = levelcode.current + 1;
+  }
+
+  // 废除节点
+  const deleteNode = (node: DictTree) => {
+    const funccode = node.key;
+    if (node.children) {
+      baseFun.warning('请先作废所有下级节点');
+      return;
+    }
+    if (treeData?.length === 1 && !treeData[0].children) {
+      baseFun.warning('不能作废根节点');
+      return;
+    }
+    baseFun.confirm("请确认是否继续操作", ()=>{  deleteFunc(funccode).then(()=>{
+    baseFun.info("作废成功");
+    refreshTree();
+    });
+  });
+
+  }
+
+
+
+  // 菜单增加
+  const handleSave =async(record:riskExposureDefinitionModel)=>{
+    if (editType == 'create') {
+      await createRiskData(record).then(()=>{
+        baseFun.info("执行成功");
+      });
+      refreshTree();
+      closeAndRefresh();
+    } else if (editType == 'update') {
+      await updateRiskData(record).then(()=>{
+        baseFun.info("执行成功");
+        refreshTree();
+        closeAndRefresh();
+      });
+    }
+    
+  }
+
+  // 风险暴漏规则新增或删除
+  const handleRiskRuleSave =async(record:any)=>{
+    if (backEditType == 'update' ) {
+      if (currentRow?.ruleNo) {
+        updateRiskRuleExistData(record,currentRow?.ruleNo);
+        closeAndRefresh();
+      }
+    } else if (backEditType == 'create' ) {
+      createRiskRuleData(record,key);
+      closeAndRefresh();
+    }
+  }
+
+    //关闭窗口刷新父页面
+    const closeAndRefresh = ()=>{
+    actionRef.current?.reloadAndRest?.();
+    }
+
+    // 选中树节点数据查询
+    const handleSelect =async(record:any)=>{
+      const selectKey = record[0];
+      setKey(selectKey);
+      const data = await getSelectTreeData(selectKey);
+      // 页面联动值初始化
+      if (data.riskExposureIsmini == '1') {
+        setRiskFlag(true);
+        closeAndRefresh();  
+      } else {
+        setRiskFlag(false);
+      }
+      if (data.riskExposureIsmini == '1') {
+        setRiskWeightFlag(true);
+      } else {
+        setRiskWeightFlag(false);
+      }
+      formRef.current?.setFieldsValue(data);
+    }
+
+  // 风险暴漏分类规则删除
+  const delRiskRule = async (record:any) => {
+    baseFun.confirm('请确认是否继续操作',async() =>{
+      await delRiskRuleData(record);
+      closeAndRefresh();
+    }) 
+  }
+
+  // 风险暴漏分类规则当前行查询
+  const selectRiskRowData = async (record:any) => {
+    const formDataList = await getRiskDataList(record,key);
+    backformRef.current?.setFieldsValue(formDataList[0]);
+  }
+
+  // 编辑规则编号
+  const setRuleNoAdd = () => {
+    let lastEditRuleNo ="";
+    if (formData !== null || formData !== undefined) {
+      if (formData?.length == 0) {
+        lastEditRuleNo = "FXBL" + key + 1;
+      } else {
+        let lastNo = formData?.filter((item)=>{
+          return item.ruleNo == formData[formData.length-1].ruleNo;
+        })[0].ruleNo;
+        let numberNo = lastNo?.substring(lastNo.length-3,lastNo.length);
+        let castnumber = toNumber(numberNo);
+        castnumber = castnumber+1;
+        lastEditRuleNo = "FXBL" + key + castnumber;
+      }
+    } else {
+      lastEditRuleNo = "FXBL" + key + 1;
+    }
+    setEditRuleNo(lastEditRuleNo);
+  }
+
+    // 页面展示元素
+    const columns: ProColumns<riskExposureClassRuleModel>[] = [
+      {
+        title: '计算实例号',
+        dataIndex: 'calcindex',
+        search: false,
+        hideInTable: true,
+      },
+      {
+        title: '起始数据日期',
+        dataIndex: 'startDate',
+        search: false,
+        hideInTable: true,
+      },
+      {
+        title: '截止数据日期',
+        dataIndex: 'endDate',
+        search: false,
+        hideInTable: true,
+      },
+      {
+        title: '规则编号', 
+        dataIndex: 'ruleNo',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '规则说明', 
+        dataIndex: 'ruleName',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '产品名称', 
+        dataIndex: 'ruleProductNo',
+        search: false,
+        hideInTable: false,
+        valueType: 'treeSelect',
+          request: () => fetchDict('CUST_TYPE_LV02'),
+          fieldProps: {
+           treeDefaultExpandAll: true,
+           treeCheckable:true,
+        },
+      },
+      {
+        title: '权重(%)', 
+        dataIndex: 'riskExposureWeight',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '输入数据源', 
+        dataIndex: 'ruleIn',
+        search: false,
+        hideInTable: false,
+        valueType: 'treeSelect',
+        request: () => fetchDict('CUST_TYPE_LV02'),
+        fieldProps: {
+         treeDefaultExpandAll: true,
+         treeCheckable:true,
+      },
+      },
+      {
+        title: '输出数据源', 
+        dataIndex: 'ruleOut',
+        search: false,
+        hideInTable: false,
+        valueType: 'treeSelect',
+        request: () => fetchDict('CUST_TYPE_LV02'),
+        fieldProps: {
+         treeDefaultExpandAll: true,
+         treeCheckable:true,
+      },
+      },
+      {
+        title: '执行序号', 
+        dataIndex: 'ruleIndex',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '风险暴露分类认定规则', 
+        dataIndex: 'ruleGetdata',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '操作',
+        dataIndex: 'operate',
+        valueType: 'option',
+        render: (_, record) => [
+          <SDOperate
+            key="roleCfg"
+            icon={<WomanOutlined />}
+            successMessage=""
+            onClick={
+              ()=>{
+              selectRiskRowData(record);
+              setBackEditType('update');
+              setDetailVisible(true);
+              setCurrentRow(record);
+             }}
+          >
+            修改
+          </SDOperate>,
+          <SDOperate
+          key="roleCfg"
+          icon={<WomanOutlined />}
+          successMessage=""
+          onClick={()=>{
+            delRiskRule(record);
+          } }
+        >
+          删除
+        </SDOperate>,
+         
+        ],
+      },
+
+    ];
+
+    // 右键菜单
+    const items: any[] = [
+      {
+        label: <a>新建</a>,
+        key: 'create',
+      },
+      {
+        label: <a>作废</a>,
+        key: 'delete',
+      },
+      {
+        type: 'divider',
+      },
+    ];
+
+
+    return(
+        <SDPage footer={[<SDSubmitButton successMessage='' editType={editType}   formRef={formRef} doSubmit={handleSave} >保存</SDSubmitButton>]}> 
+        <SDLayout subLayout='horizontal' >
+        <SDLayout
+         title='菜单列表'
+         colSpan='25%'
+         fixHeight
+         >
+         <DirectoryTree treeData={treeData} onSelect={handleSelect} showLine={true} autoExpandParent={true}  
+         titleRender={(nodeData) => {
+          return (
+            <Dropdown menu={{ items, onClick: (e) => {
+              console.log(e.key,nodeData)
+              if (e.key == 'create') {
+                   createNode(nodeData);
+              } else if (e.key == 'delete') {
+                   deleteNode(nodeData);
+              }
+            }}} trigger={['contextMenu']}
+            >
+              <span>{nodeData.title}</span>
+            </Dropdown>
+          )
+         }}
+         onRightClick={({event, node}: any) => {
+          event.preventDefault();
+         }}
+         />
+        </SDLayout>
+        <SDLayout
+         title='风险暴露分类信息维护'
+         colSpan='75%'
+         fixHeight
+         >
+        <SDForm 
+            editType={editType}
+            //doSubmit={handleSave}
+            formRef={formRef}
+            onValuesChange={
+              (changedValues, values)=>{
+                if (changedValues.riskExposureIsmini == '1'){
+                  setRiskFlag(true);
+                  setRiskWeightFlag(true);
+                } else if (values.riskExposureIsmini == '0' || values.riskExposureIsmini== null) {
+                  setRiskFlag(false);
+                  setRiskWeightFlag(false);
+                  formRef.current?.setFieldValue('riskExposureWeight',null);
+                }
+              }
+            }
+            >
+            <SDFormText name="riskExposureNo" required={true} 
+            bgValidater={(riskExposureNo: string) => isNotExist({
+              riskExposureNo: riskExposureNo,
+              calcIndex: '',
+              startDate: '',
+              endDate: '',
+              term: '',
+              dataDate: '',
+              riskExposureName: '',
+              riskExposureStageId: '',
+              defaultOut: '',
+              riskExposureIndex: '',
+              riskExposureSuper: '',
+              riskExposureSuperName: '',
+              riskExposureIsmini: '',
+              riskExposureWeight: '',
+              riskExposureState: ''
+            })}
+            readonlyCond='update'  label="项目代码"/>
+            <SDFormText name="riskExposureName" readonlyCond='update' required={true} label="项目名称" rules={[{max:50,message:'不可超过50个字'},]}/>
+            <SDFormText name="riskExposureSuper"  label="上级项目代码"/>
+            <SDFormText name="riskExposureSuperName"  label="上级项目名称"/>
+            <SDFormDict name="riskExposureIsmini" dictKey="YESORNO" label="是否最细一级"/>
+            {riskWeightFlag && <SDFormText name="riskExposureWeight" required={true}   label="默认权重(%)"/>}
+            <SDFormDict name="defaultOut" dictKey='CUST_TYPE_LV02'  label="默认输出数据源"/>
+            <SDFormDict name="riskExposureStageId" dictKey='CUST_TYPE_LV02' label="所属阶段"/>
+            <SDFormText name="riskExposureIndex"  label="认定顺序号"/>
+            <SDFormText name="riskExposureState" readonlyCond='both' label="状态"/>
+        </SDForm>
+
+
+        { riskFlag &&
+        <SDTable
+              title="风险暴露分类认定规则列表"
+              search={false}
+              rowKey="ruleNo"
+              columns={columns}
+              toolBarRender={(_, { selectedRows }) => [
+                <SDButton
+                  key="create"
+                  icon={<PlusSquareTwoTone />}
+                  successMessage=''
+                  onClick={() => {
+                    setDetailVisible(true);
+                    setBackEditType('create');
+                    setRuleNoAdd();
+                  }}
+                >
+                  新建
+                </SDButton>,
+                ]}
+              request={ async(record:riskExposureClassRuleModel)=>{
+                const formDataList = await getRiskDataList(record,key);
+                setFormData(formDataList);
+                return {data:formDataList}
+              }}
+              actionRef={actionRef}
+              formRef={proformRef}
+              setDetailVisible={() => {setDetailVisible(true)}}
+              setEditType={setBackEditType}
+              setCurrentRow={setCurrentRow}
+        />}
+
+      {detailVisible && (
+      <SDModalForm          
+        title={'详细信息'}
+        editType={backEditType}
+        visible={detailVisible}
+        initialValues={{ruleNo:editRuleNo}}
+        onVisibleChange={() => {setDetailVisible(false)}}
+        footer={[
+        <SDSubmitButton  editType={backEditType}   formRef={backformRef} doSubmit={handleRiskRuleSave} >保存</SDSubmitButton>,
+        <SDButton
+          key="closeUpdate"
+          successMessage=''
+          onClick={() => {setDetailVisible(false);}}>关闭</SDButton>
+        ]}
+        formRef={backformRef}
+      >
+        <SDAreaTtile title='风险暴露分类认定规则信息'/>
+          <SDFormText name="ruleNo" readonlyCond='both'  label="规则编号"/>
+          <SDFormText name="ruleName" required={true}  label="规则说明"/>
+          <SDFormDict name="ruleProductNo"  dictKey='CUST_TYPE_LV02' rules={[{required:true}]} label="产品名称"/>
+          <SDFormText name="riskExposureWeight"  label="权重(%)"/>
+          <SDFormDict name="ruleIn" dictKey='CUST_TYPE_LV02' rules={[{required:true}]} label="输入数据源"/>
+          <SDFormDict name="ruleOut" dictKey='CUST_TYPE_LV02' rules={[{required:true}]} label="输出数据源" />
+          <SDFormText name="ruleIndex" required={true}  label="执行序号" />
+          <SDFormText name="ruleGetdata" required={true} type="textarea" label="风险暴露分类认定规则"/>
+      </SDModalForm>
+      )}
+        </SDLayout>
+        </SDLayout>
+        </SDPage>
+
+        
+    )
+
+  
+
+}
+export default info;

+ 347 - 0
Procedure/frontend/projectb/src/pages/rwa_calc_config_acquisition/rule.tsx

@@ -0,0 +1,347 @@
+import React, { useEffect, useRef, useState } from "react";
+import type { ProColumns, ActionType } from '@ant-design/pro-components';
+import type {FormInstance} from 'antd'
+import  {Upload} from 'antd'
+import { SDPage,SDFormText,SDModalForm,SDTable,SDFormItem,SDButton,SDSubmitButton,EditType, SDAreaTtile, SDOperate, baseFun,SDModal, validateFun, SDFormDict, } from "@sundata/ui-frame";
+import {getDataList,deleteRows,selectDetailData,fetchDetailData,
+  updateExistData,exportExcelModel,uploadAction,templateUpload,seleDictCodeName} from '@/services/rwa/rwa_calc_config_acquisition/rule';
+import { WomanOutlined } from "@ant-design/icons";
+import { ProductProps } from "@/sundataImport";
+import { useModel } from '@umijs/max';
+import { max } from "lodash";
+import { SysListModel } from "@/services/rwa/rwa_calc_config_acquisition/rule";
+
+type widowRush = {
+  subjectCodes:string;
+  onOrOff:string;
+  resultType:string;
+  ruleNo:string;
+  onCancel:  () => void;
+  onChangeVisible(visible: boolean, type: string): unknown;
+  onChangeVisdible:(visible:boolean,type ?: 'none' | 'raload' )=>void;
+}& ProductProps;
+// 总账取数
+const rule : React.FC<widowRush> = (prop:widowRush) => {
+
+    /** 编辑方式,查看、修改、新增按钮时设置,详细信息表单中使用 */
+    const [editType, setEditType] = useState<EditType>(prop.editType || 'display');
+    /** 是否显示详细信息窗口 */
+    const [detailVisible, setDetailVisible] = useState<boolean>(false);
+    /** 当前行数据   */
+    const [currentRow, setCurrentRow] = useState<SysListModel>();
+    /** 表格引用对象,刷新表格使用   */
+    const actionRef = useRef<ActionType>();
+    const formRef = useRef<FormInstance<any>>();
+    /** 声明字典  */
+    const { fetchDict } = useModel('dict');
+
+    // 页面数据
+    var formDataList = new Array<SysListModel>;
+    /**上传文件 */
+    const [fileData, setFileData] = useState<File>();
+    // 导入窗口显示
+    const [importVisible, setImportVisible] = useState<boolean>(false);
+ 
+    useEffect(() => {
+
+      }, []);
+    
+    // 修改查询查询
+    const selectData = async (formdata : SysListModel) => {
+      const data = await selectDetailData(formdata);
+      formRef.current?.setFieldsValue(data);
+     }
+
+    // 作废
+    const delRows =async(record:any)=>{ 
+       baseFun.confirm('请确认是否继续操作',async() =>{
+        if (record.state == '失效') {
+          baseFun.info("此数据已为失效状态");
+          return;
+        } else {
+          await deleteRows(record.ruleNo);
+          baseFun.info("作废成功");
+        }
+        closeAndRefresh();
+       });
+       
+     }
+
+    //关闭窗口刷新父页面
+    const closeAndRefresh = ()=>{
+    actionRef.current?.reloadAndRest?.();
+    }
+
+  // 插入或者更新数据
+  const handleSave = async(data: SysListModel,) => {
+    
+    if (editType == 'update' ) {
+      if (currentRow?.ruleNo) {
+        await updateExistData(data,currentRow?.ruleNo);
+        closeAndRefresh();
+      } else {
+        baseFun.error("当前行为空");
+        return;
+      }
+    } else if (editType == 'create' ) {
+      await fetchDetailData(data);
+      closeAndRefresh();
+    }
+    setDetailVisible(false);
+  }
+
+  // 模板下载
+  const templateUploadAction = async() => {
+    // 模板下载(模板code:ListOfPublicSector)
+    await templateUpload("ListOfPublicSector");
+  }
+
+  /**上传属性 */
+  const fileProps = {
+      onRemove: () => {
+      setFileData(undefined);
+     },
+      beforeUpload(info: any) {
+      setFileData(info);
+    },
+  };
+
+  /**上传提交 */
+  const uploadSubmit = async () => {
+      if (!fileData) {
+        baseFun.warning('未上传文件');
+        return;
+      }
+      const res = await uploadAction(fileData);
+      if ('' === res) {
+        // baseFun.info("处理完成");
+        closeAndRefresh()
+      } else {
+        baseFun.error(res);
+      }
+      setEditType('update');
+      setDetailVisible(false);
+  };
+     
+    // 页面展示元素
+    const columns: ProColumns<SysListModel>[] = [
+        {
+          title: '计算实例号',
+          dataIndex: 'calcindex',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '起始数据日期',
+          dataIndex: 'startDate',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '截止数据日期',
+          dataIndex: 'endDate',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '年月',
+          dataIndex: 'term',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '数据日期',
+          dataIndex: 'dataDate',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '规则编号', 
+          dataIndex: 'ruleNo',
+          hideInTable: false,
+        },
+        {
+          title: '规则名称',
+          dataIndex: 'ruleName',
+          hideInTable: false,
+        },
+        {
+          title: '科目代码',
+          dataIndex: 'subjectCodes',
+          hideInTable: false,
+        },
+        {
+          title: '科目名称', 
+          dataIndex: 'subjectNames',
+          hideInTable: false,
+        },
+        {
+          title: '表内风险暴露分类', 
+          dataIndex: 'ledgerRiskexposureNo',
+          hideInTable: false,
+          valueType: 'treeSelect',
+          request: () => fetchDict('businessScale'),
+          fieldProps: {
+           treeDefaultExpandAll: true,
+           treeCheckable:true,
+          },
+        },
+        {
+          title: '表外项目分类', 
+          dataIndex: 'ledgerOffObjectNo',
+          hideInTable: false,
+          valueType: 'treeSelect',
+          request: () => fetchDict('businessScale'),
+          fieldProps: {
+           treeDefaultExpandAll: true,
+           treeCheckable:true,
+          },
+        },
+        {
+          title: '状态', 
+          dataIndex: 'state',
+          search: false,
+          hideInTable: false,
+        },
+        {
+          title: '操作',
+          dataIndex: 'operate',
+          valueType: 'option',
+          render: (_, record) => [
+            <SDOperate
+              key="roleCfg"
+              icon={<WomanOutlined />}
+              successMessage=""
+              onClick={
+                ()=>{ 
+                  selectData(record);
+                  setCurrentRow(record);
+                  setDetailVisible(true);
+                  setEditType('update')
+               } }
+            >
+              修改
+            </SDOperate>,
+            <SDOperate
+            key="roleCfg"
+            icon={<WomanOutlined />}
+            successMessage=""
+            
+            onClick={()=>{
+              selectData(record);
+              setEditType('display')
+              setDetailVisible(true)} }
+          >
+            查看
+          </SDOperate>,
+          <SDOperate
+          key="roleCfg"
+          icon={<WomanOutlined />}
+          successMessage=""
+          onClick={()=>{delRows(record) } }
+        >
+          作废
+        </SDOperate>,
+          ],
+        },
+
+      ];
+    
+    return (
+        <SDPage>
+        <SDTable
+         title="查询表格"
+         rowKey="customerName"
+         request={async (formdata:SysListModel) =>{
+           const formDatas = await getDataList(formdata);
+           // 解构数组(导出用)
+           formDataList=[...formDatas];
+           return {data: formDatas}
+         }  }
+         columns={columns}
+         operations={["create"]}
+         toolBarRender={(_, { selectedRows }) => [
+          <SDButton
+            key="export"
+            successMessage=''
+            onClick={() => {
+               baseFun.confirm('确认导出数据?',async() => {  exportExcelModel(formDataList,"ListOfPublicSector")});
+            }}
+          >
+            全部导出
+          </SDButton>,
+        ]}
+         actionRef={actionRef}
+         formRef={formRef}
+         setDetailVisible={() => {setDetailVisible(true)}}
+         setEditType={setEditType}
+         setCurrentRow={()=>{setCurrentRow}}
+         />
+
+        {detailVisible && (
+        <SDModalForm          
+          title={'详细信息'}
+          editType={editType}
+          params={currentRow}
+          visible={detailVisible}
+          initialValues={
+            {
+              getdataMode:'取实际余额',
+              subjectCodes:prop.subjectCodes,
+              resultType:prop.resultType,
+              onOrOff:prop.onOrOff
+            }
+          }
+          onVisibleChange={() => {setDetailVisible(false)}}
+          onValuesChange={async (changevalues) => {
+            if (changevalues.subjectCodes != undefined) {
+              const value = await seleDictCodeName(changevalues.subjectCodes);
+              formRef.current?.setFieldValue('subjectNames',value);
+            }
+            if (changevalues.resultType != undefined) {
+              if (changevalues.resultType == '01') {
+                formRef.current?.setFieldValue('onOrOff','表内');
+              } else if (changevalues.resultType == '02') {
+                formRef.current?.setFieldValue('onOrOff','表外');
+              } else {
+                formRef.current?.setFieldValue('onOrOff','');
+              }
+            }
+          }}
+          footer={[
+          <SDSubmitButton  editType={editType}   formRef={formRef} doSubmit={handleSave} >保存</SDSubmitButton>,
+          <SDButton
+            key="closeUpdate"
+            successMessage=''
+            onClick={() => {
+               setDetailVisible(false);
+
+            }}>关闭</SDButton>
+          ]}
+          tableRef={actionRef}
+          formRef={formRef}
+        >
+            <SDAreaTtile title='缓释品信息'/>
+            <SDFormText name="ruleNo" rules={[{max:20, message:'名称长度不能超过20位'}]} label="规则编号"/>
+            <SDFormText name="ruleName" label="规则名称" rules={[{max:30, message:'名称长度不能超过30位'}]} />
+            <SDFormDict name="subjectCodes" dictKey="SUBJECTCODE"  label="科目代码" />
+            <SDFormText name="subjectNames"  label="科目名称" />
+            <SDFormDict name="accountingDirection" dictKey="ACCOUNTDIRECTION"  label="记账方向"/> 
+            <SDFormDict name="calcMode" dictKey="CALCULATIONMETHOD" label="计算方式"/>
+            <SDFormDict name="getdataMode"  label="取值方式" />
+            <SDFormDict name="resultType" dictKey="CALC_ITEMS"  label="计算项" />
+            <SDFormText name="onOrOff"  label="表内外标识" />
+            <SDFormDict name="ledgerRiskexposureNo"  label="表内风险暴露分类" />
+            <SDFormDict name="ledgerOffObjectNo"  label="表外项目分类" />
+            <SDFormDict name="ledgerStageId"  label="所属阶段" />
+            <SDFormText name="ledgerGetdataRule" 
+            type="textarea" label="总账取数规则"/>
+         
+        </SDModalForm>
+        
+      )}
+        </SDPage>
+        
+    );
+}
+export default rule;

+ 395 - 0
Procedure/frontend/projectb/src/pages/rwa_calc_config_dataparam/bussiness.tsx

@@ -0,0 +1,395 @@
+import React, { useEffect, useRef, useState } from "react";
+import { type ProColumns, type ActionType, type ProFormInstance, ProTable } from '@ant-design/pro-components';
+import type {FormInstance,CollapseProps} from 'antd'
+import  {Upload,Collapse} from 'antd'
+import { SDPage,SDFormText,SDModalForm,SDTable,SDFormItem,SDButton,SDSubmitButton,EditType, SDAreaTtile, SDOperate, baseFun,SDModal, validateFun, SDFormDict, SDLayout, } from "@sundata/ui-frame";
+import type { SysListModel,productListModel,subjectListModel } from '@/services/rwa/rwa_calc_config_dataparam/bussiness';
+import {getDataList,selectDetailData,deleteRows,isNotExist,
+  updateExistData,fetchDetailData,selectProductData,selectSubjectData} from '@/services/rwa/rwa_calc_config_dataparam/bussiness';
+import { WomanOutlined } from "@ant-design/icons";
+import { ProductProps } from "@/sundataImport";
+import { useModel } from '@umijs/max';
+
+type widowRush = {
+  onCancel:  () => void;
+  onChangeVisible(visible: boolean, type: string): unknown;
+  onChangeVisdible:(visible:boolean,type ?: 'none' | 'raload' )=>void;
+}& ProductProps;
+const bussiness : React.FC<widowRush> = (prop:widowRush) => {
+
+    /** 编辑方式,查看、修改、新增按钮时设置,详细信息表单中使用 */
+    const [editType, setEditType] = useState<EditType>(prop.editType || 'display');
+    /** 是否显示详细信息窗口 */
+    const [detailVisible, setDetailVisible] = useState<boolean>(false);
+    /** 是否显示产品列表窗口 */
+    const [productListVisible, setProductListVisible] = useState<boolean>(false);
+    /** 是否显示科目列表窗口 */
+    const [subjectListVisible, setSubjectListVisible] = useState<boolean>(false);
+    // 当前行数据
+    const [currentRow, setCurrentRow] = useState<SysListModel>();
+    /** 表格引用对象,刷新表格使用   */
+    const actionRef = useRef<ActionType>();
+    const formRef = useRef<FormInstance<any>>();
+    const templateRef = useRef<FormInstance<any>>();
+
+    // 页面数据
+    var formDataList = new Array<SysListModel>;
+    /**上传文件 */
+    const [fileData, setFileData] = useState<File>();
+    // 导入窗口显示
+    const [importVisible, setImportVisible] = useState<boolean>(false);
+    const { fetchDict } = useModel('dict');
+
+    /** 产品列表表单显示 */
+    const [mockData, setMockData] = useState<productListModel[]>([]);
+
+    /** 产品列表表单显示 */
+    const [subjectMockData, setSubjectMockData] = useState<subjectListModel[]>([]);
+ 
+    useEffect(() => {
+      }, []);
+    
+    // 修改查询查询
+    const selectData = async (formdata : SysListModel) => {
+      const data = await selectDetailData(formdata);
+      formRef.current?.setFieldsValue(data);
+     }
+
+    //关闭窗口刷新父页面
+    const closeAndRefresh = ()=>{
+    actionRef.current?.reloadAndRest?.();
+    }
+
+  // 插入或者更新数据
+  const handleSave = async(data: SysListModel,) => {
+    
+    if (editType == 'update' ) {
+      if (currentRow?.businessCode) {
+        await updateExistData(data,currentRow?.businessCode);
+        closeAndRefresh();
+      } 
+    
+    } else if (editType == 'create' ) {
+      await fetchDetailData(data);
+      closeAndRefresh();
+    }
+    setDetailVisible(false);
+  }
+
+
+
+  /**查询产品列表 */
+  const selectProductList= async (record: SysListModel) => {
+    if (record.businessCode) {
+      const data =  await selectProductData(record.businessCode);
+      setMockData(data);
+    }
+
+  }
+
+  /**查询科目列表 */
+  const selectSubjectList = async (record: SysListModel) => {
+    if (record.businessCode) {
+      const data = await selectSubjectData(record.businessCode);
+      setSubjectMockData(data);
+    }
+    
+  }
+
+  // 删除
+  const delRows =async(record:any)=>{ 
+      baseFun.confirm('请确认是否继续操作?',async() =>{
+      await deleteRows(record.businessCode);
+      baseFun.info("删除成功");
+      closeAndRefresh();
+    });
+  }
+
+  // 校验
+  const roleidCheck = (bussinessCode: string) => isNotExist(bussinessCode);
+
+
+  
+    // 页面展示元素
+    const columns: ProColumns<SysListModel>[] = [
+        {
+          title: '计算实例号',
+          dataIndex: 'calcindex',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '起始数据日期',
+          dataIndex: 'startDate',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '截止数据日期',
+          dataIndex: 'endDate',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '数据日期',
+          dataIndex: 'dataDate',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '业务编号', 
+          dataIndex: 'businessCode',
+          hideInTable: false,
+        },
+        {
+          title: '业务名称', 
+          dataIndex: 'businessName',
+          hideInTable: false,
+        },
+        {
+          title: '表内外标识', 
+          dataIndex: 'businessAttr',
+          search: false,
+          hideInTable: false,
+        },
+        {
+          title: '操作',
+          dataIndex: 'operate',
+          valueType: 'option',
+          render: (_, record) => [
+            <SDOperate
+              key="roleCfg"
+              icon={<WomanOutlined />}
+              successMessage=""
+              onClick={
+                ()=>{
+                selectData(record);
+                setCurrentRow(record);
+                setDetailVisible(true);
+                setEditType('update')
+               } }
+            >
+              修改
+            </SDOperate>,
+            <SDOperate
+            key="roleCfg"
+            icon={<WomanOutlined />}
+            successMessage=""   
+            onClick={()=>{
+              delRows(record) } }
+            >
+            删除
+            </SDOperate>,
+            <SDOperate
+            key="roleCfg"
+            icon={<WomanOutlined />}
+            successMessage=""   
+            onClick={()=>{
+              selectProductList(record);
+              setProductListVisible(true);} }
+            >
+            产品列表
+            </SDOperate>,
+            <SDOperate
+            key="roleCfg"
+            icon={<WomanOutlined />}
+            successMessage=""   
+            onClick={()=>{
+              selectSubjectList(record);
+              setSubjectListVisible(true);
+              } }
+            >
+            科目列表
+            </SDOperate>,
+          ],
+        },
+
+      ];
+
+    // 页面展示元素
+    const productColumns: ProColumns<productListModel>[] = [
+      {
+        title: '产品编号',
+        dataIndex: 'productNo',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '产品名称',
+        dataIndex: 'productName',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '产品分类',
+        dataIndex: 'productType',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '表内外标识',
+        dataIndex: 'onOrOff',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '来源系统',
+        dataIndex: 'productFromSystem',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '操作',
+        dataIndex: 'operate',
+        valueType: 'option',
+        render: (_, record) => [
+          <SDOperate
+          key="roleCfg"
+          icon={<WomanOutlined />}
+          successMessage=""   
+          onClick={()=>{
+            setProductListVisible(true);
+            setSubjectListVisible(true);
+            delRows(record) } }
+          >
+          查看
+          </SDOperate>,
+        ],
+      },
+    ]
+
+    // 页面展示元素
+    const subjectColumns: ProColumns<subjectListModel>[] = [
+      {
+        title: '产品编号',
+        dataIndex: 'productNo',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '产品名称',
+        dataIndex: 'productName',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '科目编号',
+        dataIndex: 'ruleCode',
+        search: false,
+        hideInTable: false,
+      },
+      {
+        title: '科目名称',
+        dataIndex: 'ruleCode',
+        search: false,
+        hideInTable: false,
+        valueType: "treeSelect",
+          request: () => fetchDict('org'),
+          fieldProps: {
+          treeDefaultExpandAll: true,
+          treeCheckable:true,
+          },
+      },
+      {
+        title: '数据类型',
+        dataIndex: 'dataType',
+        search: false,
+        hideInTable: false,
+      },
+    ]
+    
+    return (
+        <SDPage>
+        <SDTable
+         title="查询表格"
+         rowKey="customerName"
+         request={async (formdata:SysListModel) =>{
+           const formDatas = await getDataList(formdata);
+           // 解构数组(导出用)
+           formDataList=[...formDatas];
+           return {data: formDatas}
+         }  }
+         columns={columns}
+         operations={['create']}
+         actionRef={actionRef}
+         formRef={formRef}
+         setDetailVisible={() => {setDetailVisible(true)}}
+         setEditType={setEditType}
+         setCurrentRow={setCurrentRow}
+         />
+
+        {detailVisible && (
+        <SDModalForm          
+          title={'详细信息'}
+          editType={editType}
+          params={currentRow}
+          visible={detailVisible}
+          onVisibleChange={() => {setDetailVisible(false)}}
+          footer={[
+          <SDSubmitButton  editType={editType}   formRef={formRef} doSubmit={handleSave} >保存</SDSubmitButton>,
+          <SDButton
+            key="closeUpdate"
+            successMessage=''
+            onClick={() => {
+                setDetailVisible(false);
+            }}>关闭</SDButton>
+          ]}
+          tableRef={actionRef}
+          formRef={formRef}
+        >
+            <SDAreaTtile title='业务配置信息'/>
+            <SDFormText name="businessCode" bgValidater={roleidCheck} label="业务编号"/>
+            <SDFormText name="businessName"  label="业务名称" rules={[{max:50,message:'不可超过50个字'},]}/>
+            <SDFormDict name="businessAttr" dictKey="ONOROFF" label="表内外标识"/>
+        </SDModalForm>
+        
+      )}
+      
+
+      {productListVisible && 
+      <SDModalForm 
+      title={'产品列表'} 
+      visible={productListVisible} 
+      editType={editType} 
+      onVisibleChange={() => { setProductListVisible(false);}
+    }>
+      <SDLayout>
+      <ProTable
+        rowKey="productNo"
+        search={false} 
+        dataSource={mockData}
+        columns={productColumns}
+        //singleSelect={false}
+       actionRef={actionRef}
+       formRef={formRef}
+        />
+     </SDLayout>
+      </SDModalForm>
+      }
+
+
+     {subjectListVisible && 
+      <SDModalForm 
+      title={'科目列表'} 
+      visible={subjectListVisible} 
+      editType={editType} 
+      onVisibleChange={() => { setSubjectListVisible(false);}
+      }>
+      <SDLayout>
+      <ProTable
+        rowKey="productNo"
+        search={false} 
+        dataSource={subjectMockData}
+        columns={subjectColumns}
+       actionRef={actionRef}
+       formRef={formRef}
+        />
+     </SDLayout>
+      </SDModalForm>
+      }
+    </SDPage>
+        
+    );
+}
+export default bussiness;
+

+ 339 - 0
Procedure/frontend/projectb/src/pages/rwa_calc_config_dataparam/realestate.tsx

@@ -0,0 +1,339 @@
+import React, { useEffect, useRef, useState } from "react";
+import type { ProColumns, ActionType, ProFormInstance } from '@ant-design/pro-components';
+import type {FormInstance} from 'antd'
+import  {Upload} from 'antd'
+import { SDPage,SDFormText,SDModalForm,SDTable,SDFormItem,SDButton,SDSubmitButton,EditType, SDAreaTtile, SDOperate, baseFun,SDModal, validateFun, SDFormDict, } from "@sundata/ui-frame";
+import type { SysListModel } from '@/services/rwa/rwa_calc_config_dataparam/realestate';
+import {getDataList,selectDetailData,fetchDetailData,
+  updateExistData,exportExcelModel,uploadAction,templateUpload,seleDictCodeName} from '@/services/rwa/rwa_calc_config_dataparam/realestate';
+import { WomanOutlined } from "@ant-design/icons";
+import { ProductProps } from "@/sundataImport";
+import { useModel } from '@umijs/max';
+
+type widowRush = {
+  onCancel:  () => void;
+  onChangeVisible(visible: boolean, type: string): unknown;
+  onChangeVisdible:(visible:boolean,type ?: 'none' | 'raload' )=>void;
+}& ProductProps;
+const realestate : React.FC<widowRush> = (prop:widowRush) => {
+
+    /** 编辑方式,查看、修改、新增按钮时设置,详细信息表单中使用 */
+    const [editType, setEditType] = useState<EditType>(prop.editType || 'display');
+    /** 是否显示详细信息窗口 */
+    const [detailVisible, setDetailVisible] = useState<boolean>(false);
+    const [currentRow, setCurrentRow] = useState<SysListModel>();
+    /** 表格引用对象,刷新表格使用   */
+    const actionRef = useRef<ActionType>();
+    const formRef = useRef<FormInstance<any>>();
+    const templateRef = useRef<FormInstance<any>>();
+
+    // 页面数据
+    var formDataList = new Array<SysListModel>;
+    /**上传文件 */
+    const [fileData, setFileData] = useState<File>();
+    // 导入窗口显示
+    const [importVisible, setImportVisible] = useState<boolean>(false);
+    const { fetchDict } = useModel('dict');
+ 
+    useEffect(() => {
+      //actionRef.current?.reload();
+        // init().then((data) => {
+          
+        // });
+      }, []);
+    
+    // 修改查询查询
+    const selectData = async (formdata : SysListModel) => {
+      const data = await selectDetailData(formdata);
+      formRef.current?.setFieldsValue(data);
+     }
+
+    //关闭窗口刷新父页面
+    const closeAndRefresh = ()=>{
+    actionRef.current?.reloadAndRest?.();
+    }
+
+  // 插入或者更新数据
+  const handleSave = async(data: SysListModel,) => {
+    
+    if (editType == 'update' ) {
+      if (currentRow?.loanReferenceNo) {
+        await updateExistData(data,currentRow?.loanReferenceNo);
+        closeAndRefresh();
+      } 
+    
+    }
+    // else if (editType == 'create' ) {
+    //   await fetchDetailData(data);
+    //   closeAndRefresh();
+    // }
+    setDetailVisible(false);
+  }
+
+  // 模板下载
+  const templateUploadAction = async() => {
+    // 模板下载(模板code:ListOfPublicSector)
+    await templateUpload("realestate");
+  }
+
+  /**上传属性 */
+  const fileProps = {
+      onRemove: () => {
+      setFileData(undefined);
+     },
+      beforeUpload(info: any) {
+      setFileData(info);
+    },
+  };
+
+  /**上传提交 */
+  const uploadSubmit = async () => {
+      if (!fileData) {
+        baseFun.warning('未上传文件');
+        return;
+      }
+      const res = await uploadAction(fileData);
+      if ('' === res) {
+        // baseFun.info("处理完成");
+        closeAndRefresh()
+      } else {
+        baseFun.error(res);
+      }
+      setEditType('update');
+      setDetailVisible(false);
+  };
+     
+    // 页面展示元素
+    const columns: ProColumns<SysListModel>[] = [
+        {
+          title: '计算实例号',
+          dataIndex: 'calcindex',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '起始数据日期',
+          dataIndex: 'startDate',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '截止数据日期',
+          dataIndex: 'endDate',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '数据日期',
+          dataIndex: 'dataDate',
+          search: false,
+          hideInTable: true,
+        },
+        {
+          title: '债项编号', 
+          dataIndex: 'loanReferenceNo',
+          hideInTable: false,
+        },
+        {
+          title: '核心客户号', 
+          dataIndex: 'bpCustNo',
+          search: false,
+          hideInTable: false,
+        },
+        {
+          title: '客户编号', 
+          dataIndex: 'custNo',
+          search: false,
+          hideInTable: false,
+        },
+        {
+          title: '客户名称', 
+          dataIndex: 'custName',
+          hideInTable: false,
+        },
+        {
+          title: '产品编号', 
+          dataIndex: 'productNo',
+          search: false,
+          hideInTable: false,
+        },
+        {
+          title: '产品名称', 
+          dataIndex: 'productName',
+          hideInTable: false,
+        },
+        {
+          title: '经营机构', 
+          dataIndex: 'mgmtBranchNos',
+          hideInTable: true,
+          valueType: "treeSelect",
+          request: () => fetchDict('org'),
+          fieldProps: {
+          treeDefaultExpandAll: true,
+          treeCheckable:true,
+          },
+        },
+        {
+          title: '经营机构', 
+          dataIndex: 'mgmtBranchNo',
+          search:false,
+          hideInTable: false,
+          valueType: "treeSelect",
+          request: () => fetchDict('org'),
+          fieldProps: {
+          treeDefaultExpandAll: true,
+          treeCheckable:true,
+          },
+        },
+        {
+          title: '逾期天数',
+          dataIndex: 'overdueDays',
+          hideInTable: false,
+          search: false,
+        },
+        {
+          title: '是否为住房开发贷款', 
+          dataIndex: 'ishousing',
+          search: false,
+          hideInTable: false,
+        },
+        {
+          title: '是否属于重组资产', 
+          dataIndex: 'isrecombine',
+          search: false,
+          hideInTable: false,
+        },
+        {
+          title: '操作',
+          dataIndex: 'operate',
+          valueType: 'option',
+          render: (_, record) => [
+            <SDOperate
+              key="roleCfg"
+              icon={<WomanOutlined />}
+              successMessage=""
+              onClick={
+                ()=>{
+                selectData(record);
+                setCurrentRow(record);
+                setDetailVisible(true);
+                setEditType('update')
+               } }
+            >
+              修改
+            </SDOperate>,
+          ],
+        },
+
+      ];
+    
+    return (
+        <SDPage>
+        <SDTable
+         title="查询表格"
+         rowKey="customerName"
+         request={async (formdata:SysListModel) =>{
+           const formDatas = await getDataList(formdata);
+           // 解构数组(导出用)
+           formDataList=[...formDatas];
+           return {data: formDatas}
+         }  }
+         columns={columns}
+         toolBarRender={(_, { selectedRows }) => [
+          <SDButton
+            key="export"
+            successMessage=''
+            onClick={() => {
+               baseFun.confirm('确认导出数据?',async() => {  exportExcelModel(formDataList,"realestate")});
+            }}
+          >
+            全部导出
+          </SDButton>,
+          <SDButton
+          key="import"
+          successMessage=''
+          onClick={() => {
+            baseFun.confirm("请注意本功能意在覆盖本表所有数据,请慎重使用!", () => {setImportVisible(true)});
+          }}
+        >
+          覆盖导入
+        </SDButton>,
+        ]}
+         actionRef={actionRef}
+         formRef={formRef}
+         setDetailVisible={() => {setDetailVisible(true)}}
+         setEditType={setEditType}
+         setCurrentRow={setCurrentRow}
+         />
+
+        {detailVisible && (
+        <SDModalForm          
+          title={'详细信息'}
+          editType={editType}
+          params={currentRow}
+          visible={detailVisible}
+          onVisibleChange={() => {setDetailVisible(false)}}
+          footer={[
+          <SDSubmitButton  editType={editType}   formRef={formRef} doSubmit={handleSave} >保存</SDSubmitButton>,
+          <SDButton
+            key="closeUpdate"
+            successMessage=''
+            onClick={() => {
+                setDetailVisible(false);
+            }}>关闭</SDButton>
+          ]}
+          tableRef={actionRef}
+          formRef={formRef}
+        >
+            <SDAreaTtile title='房地产开发贷款信息'/>
+            <SDFormText name="loanReferenceNo" required={true} label="债项编号"/>
+            <SDFormText name="bpCustNo" label="核心客户号"/>
+            <SDFormText name="custNo"  label="客户编号" />
+            <SDFormText name="custName" label="客户名称"/>
+            <SDFormText name="productNo" rules={[{max:500,message:'最大字符数不超过500'}]} label="产品编号"/>
+            <SDFormText name="productName" label="产品名称"/>
+            <SDFormDict name="mgmtBranchNo" dictKey="org" label="经营机构"/>
+            <SDFormText name="overdueDays" rules={[{validator: validateFun.number,message:'请输入数字类型'}]} label="逾期天数"/>
+            <SDFormDict name="ishousing" dictKey="YESORNO" label="是否为住房开发贷款"/>
+            <SDFormDict name="isrecombine" dictKey="YESORNO" label="是否属于重组资产"/>
+        </SDModalForm>
+        
+      )}
+
+      {importVisible && (
+         <SDModalForm
+        title={'上传文件窗口'}
+        visible={importVisible}
+        editType={editType}
+        onVisibleChange={() => {setImportVisible(false)}}
+        tableRef={actionRef}
+        formRef={templateRef}
+        footer={[
+        <SDSubmitButton  editType={'update'}  formRef={formRef} 
+          doSubmit={async() => {await uploadSubmit();}} >提交</SDSubmitButton>,
+          <SDButton
+          key="template"
+          onClick={() => {
+            templateUploadAction();
+          }}
+        >
+          模板下载
+        </SDButton>
+        ]
+        }
+        >
+         <SDFormItem nestType="form">
+            <Upload maxCount={1} {...fileProps} name="rfile">
+              <div style={{ paddingLeft: '5.5vw' }}>
+                选择上传文件: &nbsp;&nbsp;<SDOperate>上传</SDOperate>
+              </div>
+            </Upload>
+        </SDFormItem>
+        </SDModalForm>
+      )}
+
+        </SDPage>
+        
+    );
+}
+export default realestate;

+ 155 - 0
Procedure/frontend/projectb/src/services/rwa/rwa_calc_config_001riskexposure/info.ts

@@ -0,0 +1,155 @@
+import { baseFun, BaseModel, DictTree, TableData } from "@sundata/ui-frame"
+
+/** 功能按钮信息 */
+export type SysFunButtonInfoModel = {
+    id: number;
+    buttondescr?: string;
+    buttonid?: string;
+    buttonname?: string;
+    buttonurl?: string;
+    funccode?: string;
+    offobjectNo?: string;
+  } & BaseModel;
+
+// 风险暴露分类定义表
+export type riskExposureDefinitionModel={
+// 计算实例号
+calcIndex: string;
+// 起始数据日期
+startDate: string;
+// 截止数据日期
+endDate: string;
+// 年月
+term: string;
+// 数据日期
+dataDate: string;
+// 风险暴露分类编号
+riskExposureNo: string;
+// 风险暴露分类名称
+riskExposureName: string;
+// 所属阶段
+riskExposureStageId: string;
+// 默认输出
+defaultOut: string;
+// 分类定义序号
+riskExposureIndex: string;
+// 上级项目代码
+riskExposureSuper: string;
+// 上级项目代码名称
+riskExposureSuperName: string;
+// 是否最细一级
+riskExposureIsmini: string;
+// 默认权重(%)
+riskExposureWeight: string;
+// 状态
+riskExposureState: string;
+}
+
+// 风险暴露分类认定规则表
+export type riskExposureClassRuleModel={
+buttonList?:  SysFunButtonInfoModel[];
+// 计算实例号
+calcIndex: string;
+// 起始数据日期
+startDate: string;
+// 截止数据日期
+endDate: string;
+// 年月
+term: string;
+// 数据日期
+dataDate: string;
+// 风险暴露分类编号
+riskExposureNo: string;
+// 规则名称
+ruleName: string;
+// 规则编号
+ruleNo: string;
+// 所属产品
+ruleProductNo: string;
+// 划分规则
+ruleGetdata: string;
+// 规则序号
+ruleIndex: string;
+// 输入
+ruleIn: string;
+// 输出
+ruleOut: string;
+// 权重(%)
+riskExposureWeight: string;
+}& BaseModel;
+
+
+/** 获取菜单及按钮详情 POST /api/admin/funmanage/getDetail.do */
+export function getDetail1(body: riskExposureClassRuleModel) {
+    return baseFun.request<riskExposureClassRuleModel>('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/getDetail1', {
+      data: body,
+    });
+  }
+
+/** 获取菜单树 POST /api/admin/funmanage/getFunTree.do */
+export function getFunTree1() {
+    return baseFun.request<DictTree[]>('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/getFunTree1', {});
+}
+
+
+/** 获取选择菜单树数据 POST /api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/getSelectTreeData.do */
+export function getSelectTreeData(key:string) {
+  return baseFun.request<riskExposureDefinitionModel>
+  ('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/getSelectTreeData', {params:{key}});
+}
+
+/** 菜单树增加 POST /api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/createRiskData.do */
+export function createRiskData(body:any) {
+  return baseFun.request<void>
+  ('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/createRiskData', {data:body});
+}
+
+/** 菜单树修改维护 POST /api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/createRiskData.do */
+export function updateRiskData(body:any) {
+  return baseFun.request<void>
+  ('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/updateRiskData', {data:body});
+}
+
+/** 获取选择风险暴漏规则列表数据 POST /api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/getRiskDataList.do */
+export function getRiskDataList(body:riskExposureClassRuleModel,key:string) {
+  return baseFun.request<riskExposureClassRuleModel[]>
+  ('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/getRiskDataList', {data:body,params:{key}});
+}
+
+/** 风险暴漏规则新增 POST /api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/createRiskRuleData.do */
+export function createRiskRuleData(body:riskExposureClassRuleModel,key:string) {
+  return baseFun.request<void>
+  ('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/createRiskRuleData', {data:body,
+    params:{key}
+  });
+}
+
+/** 风险暴漏规则保存 POST /api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/updateRiskRuleExistData.do */
+export function updateRiskRuleExistData(body:riskExposureClassRuleModel,ruleNo:string) {
+  return baseFun.request<void>
+  ('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/updateRiskRuleExistData', {data:body,
+    params:{ruleNo}
+  });
+}
+
+/** 风险暴漏规则删除 POST /api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/delRiskRuleData.do */
+export function delRiskRuleData(body:riskExposureClassRuleModel) {
+  return baseFun.request<void>
+  ('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/delRiskRuleData', {data:body});
+}
+
+
+/** 唯一性校验 POST */
+export async function isNotExist(body: riskExposureDefinitionModel) {
+  return baseFun.request<any>('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/isNotExist.do', {
+    data: body,
+  });
+}
+
+/** 作废 POST */
+export async function deleteFunc(code: string) {
+  return baseFun.request<any>('/api/product/rwa/rwacalcconfig001riskexposure/InfoListAction/delRiskData.do', {
+    params: {code},
+  });
+}
+

+ 150 - 0
Procedure/frontend/projectb/src/services/rwa/rwa_calc_config_acquisition/rule.ts

@@ -0,0 +1,150 @@
+import type { BasePageModel, TableData } from '@sundata/ui-frame';
+import { baseFun } from '@sundata/ui-frame';
+
+export type SysListModel = {
+    // 计算实例号
+    calcIndex?: string;
+    // 起始数据日期
+    startDate?: string;
+    // 截止数据日期
+    endDate?: string;
+    // 年月
+    term?: string;
+    // 数据日期
+    dataDate?: string;
+    // 规则编号
+    ruleNo?: string;
+    // 规则名称
+    ruleName?: string;
+    // 科目代码
+    subjectCodes?: string;
+    // 科目名称
+    subjectNames?: string;
+    // 记账方向
+    accountingDirection?: string;
+    // 计算方式
+    calcMode?: string;
+    // 表内外标识
+    onOrOff?: string;
+    // 取值方式
+    getdataMode?: string;
+    // 计算项
+    resultType?: string;
+    // 表内风险暴露分类
+    ledgerRiskexposureNo?: string;
+    // 表外项目分类
+    ledgerOffObjectNo?: string;
+    // 所属阶段
+    ledgerStageId?: string;
+    // 总账取数规则
+    ledgerGetdataRule?: string;
+    // 状态
+    state?: string;
+  } & BasePageModel;
+
+  export type glAccountModel = {
+    // 数据日期
+    dataDate?: string;
+    // 报表日期
+    reportDate?: string;
+    // 账务机构编码	
+    finBranchNo?: string;
+    // 账务机构名称
+    finBranchName?: string;
+    // 科目
+    glCode?: string;
+    // 科目描述
+    subjectDesc?: string;
+    // 当日借方余额
+    deBalance?: string;
+    // 当日贷方余额
+    crBalance?: string;
+  }
+
+
+  /** 获取页面初始化查询 POST*/
+export async function getDataList(body:SysListModel) {
+    return baseFun.request<SysListModel[]>('/api/product/rwa/rwacalcconfigacquisition/RuleAction/getDataList.do',{data: body});
+  }
+
+/** 获取页面初始化查询 POST*/
+export async function seleDictCodeName(subjectCode:string) {
+    return baseFun.request<string>('/api/product/rwa/rwacalcconfigacquisition/RuleAction/getDataList.do',{data: subjectCode});
+}
+
+  /** 新建数据 POST*/
+export async function fetchDetailData(body: SysListModel) {
+    return baseFun.request<TableData<SysListModel>>('/api/product/rwa/rwacalcconfigacquisition/RuleAction/createDetailData.do',{data: body});
+  }
+
+  /** 更新数据 POST*/
+export async function updateExistData(body: SysListModel,ruleNo: string) {
+    return baseFun.request<TableData<SysListModel>>('/api/product/rwa/rwacalcconfigacquisition/RuleAction/updateExistData.do',
+      { data: body,
+        params:{ruleNo}
+      });
+  }
+
+  /** 作废当前行数据 POST*/
+export async function deleteRows(ruleNo: string) {
+    return baseFun.request<void>('/api/product/rwa/rwacalcconfigacquisition/RuleAction/updateDataState.do?ruleNo='+ruleNo);
+  }
+
+  /** 查询当前行详细数据 POST*/
+export async function selectDetailData(body: any) {
+    return baseFun.request<SysListModel>('/api/product/rwa/rwacalcconfigacquisition/RuleAction/selectDetailData.do',{data: body});
+  }
+
+/** 全部导出 */
+export async function exportExcelModel(body:any,fileNameCode:string) {
+  const url = "/api/product/rwa/rwacalcconfigacquisition/RuleAction/exportExcelModel.do?fileNameCode="+fileNameCode;
+  return baseFun.download(url,body);
+}
+
+//上传
+export async function uploadAction(file?: File) {
+  //const rptJsonStr = JSON.stringify(rpt);
+  const data = {rfile:file};
+  const url = "/api/product/rwa/rwacalcconfigacquisition/RuleAction/importExcelModel.do";
+  const res = baseFun.upload(url,data,'rfile');
+  return res;
+}
+
+/** 模板下载 */
+export async function templateUpload(fileNameCode:string) {
+  // return baseFun.request('/api/product/rwa/rwacalcconfigacquisition/RuleAction/templateUploadModel.do');
+    
+  // const resFileName = (  fileName + '.xlsx') as string;
+  const url = "/api/product/rwa/rwacalcconfigacquisition/RuleAction/templateUploadModel.do?fileNameCode="+fileNameCode;
+  const res = baseFun.download(url,null);
+
+    // 下载方式二
+    //const file =  baseFun.request('/api/product/rwa/rwacalcconfigacquisition/RuleAction/templateUploadModel.do',{params:{fileName}});
+    // const resFileName = (  fileName + '.xlsx') as string;
+    // baseFun
+    // .request('/api/product/rwa/rwacalcconfigacquisition/RuleAction/templateUploadModel.do', {
+    //   method: 'POST',
+    //   params: { resFileName },
+    //   responseType: 'blob',
+    // })
+    // .then((res) => {
+    //   const content = res; // 文件流
+    //   const blob = new Blob([content], { type: 'application/octet-stream' });
+    //   // 下载处理
+    //   if ('download' in document.createElement('a')) {
+    //     // 非IE下载,通过创建a标签并触发点击事件执行下载
+    //     const link = document.createElement('a');
+    //     link.download = resFileName;
+    //     link.style.display = 'none';
+    //     link.href = URL.createObjectURL(blob);
+    //     document.body.appendChild(link);
+    //     link.click();
+    //     URL.revokeObjectURL(link.href); // 释放URL 对象
+    //     document.body.removeChild(link);
+    //   } else {
+    //     // IE10+下载 TODO报此方法不存在,待解决
+    //     // navigator.msSaveBlob(blob,fileName);
+    //   }
+    // })
+  }
+  

+ 158 - 0
Procedure/frontend/projectb/src/services/rwa/rwa_calc_config_dataparam/bussiness.ts

@@ -0,0 +1,158 @@
+import type { BasePageModel, TableData } from '@sundata/ui-frame';
+import { baseFun } from '@sundata/ui-frame';
+
+export type SysListModel = {
+    // 计算实例号
+    calcIndex?: string;
+    // 起始数据日期
+    startDate?: string;
+    // 截止数据日期
+    endDate?: string;
+    // 年月
+    term?: string;
+    // 数据日期
+    dataDate?: string;
+    // 业务名称
+    businessName?: string;
+    // 业务编号
+    businessCode?: string;
+    // 业务属性
+    businessAttr?: string;
+  } & BasePageModel;
+
+export type productListModel={
+    //计算实例号
+    calcindex:String;
+    //起始数据日期
+    sdate : String;
+    //截止数据日期
+    edate:String;
+    //年月
+    term:String;
+    //数据日期
+    dataDate:String;
+    //产品编号
+    productNo:String;
+    //产品名称
+    productName:String;
+    //产品分类
+    productType:String;
+    //对应业务
+    productBussinessCode:String;
+    //产品所属阶段
+    productStageId:String;
+    //产品序号
+    productIndex:number;
+    //来源系统
+    productFromSystem:String;
+    //默认取数逻辑
+    defaultGetdatarule:String;
+    //默认输出
+    defaultOut:String; 
+} & BasePageModel;
+
+
+export type subjectListModel={
+    //计算实例号
+    calcindex:String;
+    //起始数据日期
+    sdate:String;
+    //截止数据日期
+    edate:String;
+    //年月
+    term:String;
+    //数据日期
+    dataDate:String;
+    //产品编号
+    productNo:String;
+    //规则编号
+    ruleCode:String;
+    //规则名称
+    ruleName:String;
+    //规则序号
+    ruleIndex:number;
+    //数据类型
+    dataType:String;
+    //对应科目
+    ruleSubject:String;
+    //输入
+    ruleIn:String;
+    //输出
+    ruleOut:String;
+    //取数规则
+    ruleGetdata:String;
+} & BasePageModel;
+
+/** 校验 POST*/
+export async function isNotExist(businessCode:string) {
+  return baseFun.request<string>('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/selectDataList.do',{params: {businessCode}});
+}
+
+/** 获取页面初始化查询 POST*/
+export async function getDataList(body:SysListModel) {
+    return baseFun.request<SysListModel[]>('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/selectDataList.do',{data: body});
+}
+
+/** 获取页面初始化查询 POST*/
+export async function seleDictCodeName(subjectCode:string) {
+    return baseFun.request<string>('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/getDataList.do',{data: subjectCode});
+}
+
+  /** 新建数据 POST*/
+export async function fetchDetailData(body: SysListModel) {
+    return baseFun.request<TableData<SysListModel>>('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/createDetailData.do',{data: body});
+  }
+
+  /** 更新数据 POST*/
+export async function updateExistData(body: SysListModel,businessCode: string) {
+    return baseFun.request<TableData<SysListModel>>('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/updateExistData.do',
+      { data: body,
+        params:{businessCode}
+      });
+  }
+
+/** 删除当前行数据 POST*/
+export async function deleteRows(businessCode: string) {
+    return baseFun.request<void>('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/deleteRows.do?businessCode='+businessCode);
+}
+
+  /** 查询当前行详细数据 POST*/
+export async function selectDetailData(body: any) {
+    return baseFun.request<SysListModel>('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/selectRowData.do',{data: body});
+  }
+
+/** 全部导出 */
+export async function exportExcelModel(body:any,fileNameCode:string) {
+  const url = "/api/product/rwa/rwacalcconfigdataparam/BusinessAction/exportExcelModel.do?fileNameCode="+fileNameCode;
+  return baseFun.download(url,body);
+}
+
+//上传
+export async function uploadAction(file?: File) {
+  //const rptJsonStr = JSON.stringify(rpt);
+  const data = {rfile:file};
+  const url = "/api/product/rwa/rwacalcconfigdataparam/BusinessAction/importExcelModel.do";
+  const res = baseFun.upload(url,data,'rfile');
+  return res;
+}
+
+/** 模板下载 */
+export async function templateUpload(fileNameCode:string) {
+  // return baseFun.request('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/templateUploadModel.do');
+    
+  // const resFileName = (  fileName + '.xlsx') as string;
+  const url = "/api/product/rwa/rwacalcconfigdataparam/BusinessAction/templateUploadModel.do?fileNameCode="+fileNameCode;
+  const res = baseFun.download(url,null);
+}
+
+/** 查询产品列表详细数据 POST*/
+export async function selectProductData(productBussinessCode: string) {
+  return baseFun.request<productListModel[]>('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/selectProductData.do',{params: {productBussinessCode}});
+}
+
+/** 查询科目规则详细数据 POST*/
+export async function selectSubjectData(productBussinessCode: string) {
+  return baseFun.request<subjectListModel[]>('/api/product/rwa/rwacalcconfigdataparam/BusinessAction/selectSubjectData.do',{params: {productBussinessCode}});
+}
+
+  

+ 119 - 0
Procedure/frontend/projectb/src/services/rwa/rwa_calc_config_dataparam/realestate.ts

@@ -0,0 +1,119 @@
+import type { BasePageModel, TableData } from '@sundata/ui-frame';
+import { baseFun } from '@sundata/ui-frame';
+
+export type SysListModel = {
+    // 计算实例号
+    calcIndex?: string;
+    // 起始数据日期
+    startDate?: string;
+    // 截止数据日期
+    endDate?: string;
+    // 年月
+    term?: string;
+    // 数据日期
+    dataDate?: string;
+    // 债项编号
+    loanReferenceNo?: string;
+    // 客户编号
+    custNo?: string;
+    //客户名称
+    custName?: string;
+    // 产品编号
+    productNo?: string;
+    // 产品名称
+    productName?: string;
+    // 经营机构
+    mgmtBranchNo?: string;
+    // 经营机构
+    mgmtBranchNos?: string[];
+    // 逾期天数
+    overdueDays?: string;
+    // 是否为住房开发贷款
+    ishousing?: string;
+    // 是否属于重组资产
+    isrecombine?: string;
+    // 核心客户号
+    bpCustNo?: string;
+  } & BasePageModel;
+
+  /** 获取页面初始化查询 POST*/
+export async function getDataList(body:SysListModel) {
+    return baseFun.request<SysListModel[]>('/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/selectDataList.do',{data: body});
+  }
+
+/** 获取页面初始化查询 POST*/
+export async function seleDictCodeName(subjectCode:string) {
+    return baseFun.request<string>('/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/getDataList.do',{data: subjectCode});
+}
+
+  /** 新建数据 POST*/
+export async function fetchDetailData(body: SysListModel) {
+    return baseFun.request<TableData<SysListModel>>('/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/createDetailData.do',{data: body});
+  }
+
+  /** 更新数据 POST*/
+export async function updateExistData(body: SysListModel,loanReferenceNo: string) {
+    return baseFun.request<TableData<SysListModel>>('/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/updateExistData.do',
+      { data: body,
+        params:{loanReferenceNo}
+      });
+  }
+
+  /** 查询当前行详细数据 POST*/
+export async function selectDetailData(body: any) {
+    return baseFun.request<SysListModel>('/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/selectRowData.do',{data: body});
+  }
+
+/** 全部导出 */
+export async function exportExcelModel(body:any,fileNameCode:string) {
+  const url = "/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/exportExcelModel.do?fileNameCode="+fileNameCode;
+  return baseFun.download(url,body);
+}
+
+//上传
+export async function uploadAction(file?: File) {
+  //const rptJsonStr = JSON.stringify(rpt);
+  const data = {rfile:file};
+  const url = "/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/importExcelModel.do";
+  const res = baseFun.upload(url,data,'rfile');
+  return res;
+}
+
+/** 模板下载 */
+export async function templateUpload(fileNameCode:string) {
+  // return baseFun.request('/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/templateUploadModel.do');
+    
+  // const resFileName = (  fileName + '.xlsx') as string;
+  const url = "/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/templateUploadModel.do?fileNameCode="+fileNameCode;
+  const res = baseFun.download(url,null);
+
+    // 下载方式二
+    //const file =  baseFun.request('/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/templateUploadModel.do',{params:{fileName}});
+    // const resFileName = (  fileName + '.xlsx') as string;
+    // baseFun
+    // .request('/api/product/rwa/rwacalcconfigdataparam/RealEstateAction/templateUploadModel.do', {
+    //   method: 'POST',
+    //   params: { resFileName },
+    //   responseType: 'blob',
+    // })
+    // .then((res) => {
+    //   const content = res; // 文件流
+    //   const blob = new Blob([content], { type: 'application/octet-stream' });
+    //   // 下载处理
+    //   if ('download' in document.createElement('a')) {
+    //     // 非IE下载,通过创建a标签并触发点击事件执行下载
+    //     const link = document.createElement('a');
+    //     link.download = resFileName;
+    //     link.style.display = 'none';
+    //     link.href = URL.createObjectURL(blob);
+    //     document.body.appendChild(link);
+    //     link.click();
+    //     URL.revokeObjectURL(link.href); // 释放URL 对象
+    //     document.body.removeChild(link);
+    //   } else {
+    //     // IE10+下载 TODO报此方法不存在,待解决
+    //     // navigator.msSaveBlob(blob,fileName);
+    //   }
+    // })
+  }
+