Procházet zdrojové kódy

更新前端代码

zhang_qk před 6 měsíci
rodič
revize
c223aa9ea2

+ 49 - 1
DBScript/张奇凯/001-DDL.sql

@@ -73,5 +73,53 @@ NEGATIVE_OFF_PROJECT_TYPE   VARCHAR(60)  DEFAULT  null  comment  '
 STAGEIN_ID   VARCHAR(60)  DEFAULT  null  comment  '所属阶段',
 SUBJECT_SQL   VARCHAR(4000) DEFAULT  null  comment  '总账取数规则',
 PRODUCT_SQL   VARCHAR(4000) DEFAULT  null  comment  '勾稽明细取数规则',
-RECONCILIATION_STATE   VARCHAR(60)  DEFAULT  null  comment  '状态'
+YESORNO   VARCHAR(60)  DEFAULT  null  comment  '状态'
 )ENGING=EXPRESS    DEFAULT CHARSET =utf8 COMMENT='总账勾稽配置信息';
+
+
+-- 差异容忍度规则定义表
+DROP TABLE IF EXISTS  RWA_CALC_CONF_DIFFTOLERANCE;
+create table IF NOT EXISTS  RWA_CALC_CONF_DIFFTOLERANCE(
+CALCINDEX   VARCHAR(60) DEFAULT  null comment '计算实例号',
+SDATE   VARCHAR(8) DEFAULT  null comment '起始数据日期',
+EDATE   VARCHAR(8) DEFAULT  null comment '截止数据日期',
+TERM   VARCHAR(8) DEFAULT  null comment '年月',
+DATA_DATE   VARCHAR(8) DEFAULT  null comment '数据日期',
+RULE_NO   VARCHAR(60) DEFAULT  null comment '规则编号',
+RULE_NAME   VARCHAR(300) DEFAULT  null comment '规则名称',
+UPPER_LIMIT   VARCHAR(60) DEFAULT  null comment '容忍度下限%',
+LOWER_LIMIT   VARCHAR(60) DEFAULT  null comment '容忍度上限%',
+INTERVAL_TYPE   VARCHAR(60) DEFAULT  null comment '区间开闭类型',
+RULE_AREA_TYPE   VARCHAR(60) DEFAULT  null comment '适用范围类型',
+)ENGING=EXPRESS    DEFAULT CHARSET =utf8 COMMENT='差异容忍度规则定义表';
+
+-- 差异容忍度适用范围表
+DROP TABLE IF EXISTS  RWA_CALC_CONF_DIFFTOLERANCERANGE;
+create table IF NOT EXISTS  RWA_CALC_CONF_DIFFTOLERANCERANGE(
+CALCINDEX   VARCHAR(60) DEFAULT  null comment '计算实例号',
+SDATE   VARCHAR(8) DEFAULT  null comment '起始数据日期',
+EDATE   VARCHAR(8) DEFAULT  null comment '截止数据日期',
+TERM   VARCHAR(8) DEFAULT  null comment '年月',
+DATA_DATE   VARCHAR(8) DEFAULT  null comment '数据日期',
+RULE_NO   VARCHAR(60) DEFAULT  null comment '规则编号',
+ROLE_LEDGERCHECK_NO   VARCHAR(60) DEFAULT  null comment '总分勾稽规则ID'
+)ENGING=EXPRESS    DEFAULT CHARSET =utf8 COMMENT='差异容忍度适用范围表';
+
+
+
+-- 总账勾稽结果表
+DROP TABLE IF EXISTS  RWA_LEART_INS_LEDGRESULT;
+create table IF NOT EXISTS  RWA_LEART_INS_LEDGRESULT(
+TERM  VARCHAR(60)  DEFAULT  null comment  '数据期次',
+ORGCODE  VARCHAR(60)  DEFAULT  null comment  '法人机构',
+SUBJCODE  VARCHAR(30)  DEFAULT  null comment  '科目代码',
+SUBJNAME  VARCHAR(60)  DEFAULT  null comment  '科目名称',
+CCY  VARCHAR(60)  DEFAULT  null comment  '币种',
+GLAMT  DECIMAL(30,6)  DEFAULT  null comment  '总账科目余额(万元)',
+LEDGARTAMT  DECIMAL(30,6)  DEFAULT  null comment  '勾稽汇总金额(万元)',
+DIFFERAMT  DECIMAL(30,6)  DEFAULT  null comment  '核对差异金额(万元)',
+DIFFERRATE  DECIMAL(30,6)  DEFAULT  null comment  '核对差异率%',
+PERCTHRESHOLD  DECIMAL(30,6)  DEFAULT  null comment  '差异容忍度%',
+LEARTRESULTTYPE  VARCHAR(30)  DEFAULT  null comment  '是否超过容忍度',
+OFFSETDIFFERAMT  DECIMAL(30,6)  DEFAULT  null comment  '轧差后核对差异(万元)'
+)  DEFAULT CHARSET =utf8 COMMENT='总账勾稽结果表';

+ 64 - 3
Procedure/backend/project/out/production/project/com/sundata/product/rwa/SectorList/mybatis/SysListOfPublicSectorMapper.xml

@@ -3,12 +3,73 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.sundata.product.rwa.SectorList.mapper.SysListOfPublicSectorMapper">
+    <resultMap id="useMap" type="com.sundata.product.rwa.SectorList.model.ListOfPublicSectorModel">
+        <result property="calcIndex" column="CALCINDEX"></result>
+        <result property="startDate" column="SDATE"></result>
+        <result property="endDate" column="EDATE"></result>
+        <result property="customerName" column="CUST_NAME"></result>
+        <result property="crmFirstLevel" column="CRM_FIRST_LEVEL"></result>
+        <result property="crmToolTypename" column="QUALFIED_CREDIT_TOOL_TYPE_NAME"></result>
+        <result property="baseWeight" column="BASE_WEIGHT"></result>
+        <result property="exemptionWeight" column="EXEMPTION_WEIGHT"></result>
+    </resultMap>
 
+    <!-- 初始化 -->
+    <select id="initProgram"  resultMap="useMap" parameterType="com.sundata.product.rwa.SectorList.model.ListOfPublicSectorModel">
+         select CALCINDEX,SDATE,EDATE,CUST_NAME,CRM_FIRST_LEVEL,
+         QUALFIED_CREDIT_TOOL_TYPE_NAME,BASE_WEIGHT,EXEMPTION_WEIGHT
+         from RWA_BDM_OBJ_CONF_OTHER_PUBLIC_ENTITY_LIST
+    </select>
 
-    <!-- 判断当前登录人员是否是总行数据分析岗 -->
-    <select id="initProgram"  resultType="com.sundata.product.rwa.SectorList.model.ListOfPublicSectorModel">
-         select * from RWA_BDM_OBJ_CONF_OTHER_PUBLIC_ENTITY_LIST;
+    <!-- 初始化 -->
+    <select id="getDataList"  resultMap="useMap" parameterType="com.sundata.product.rwa.SectorList.model.ListOfPublicSectorModel">
+        select CALCINDEX,SDATE,EDATE,CUST_NAME,CRM_FIRST_LEVEL,
+        QUALFIED_CREDIT_TOOL_TYPE_NAME,BASE_WEIGHT,EXEMPTION_WEIGHT
+        from RWA_BDM_OBJ_CONF_OTHER_PUBLIC_ENTITY_LIST
+        <if test="null != #{model.customerName} and '' != #{model.customerName}">
+            <where>
+                CUST_NAME = #{model.customerName}
+            </where>
+        </if>
     </select>
 
+    <!-- 新建数据 -->
+    <insert id="createDetailData" parameterType="com.sundata.product.rwa.SectorList.model.ListOfPublicSectorModel">
+        insert into RWA_BDM_OBJ_CONF_OTHER_PUBLIC_ENTITY_LIST
+        (CALCINDEX,SDATE,EDATE,CUST_NAME,CRM_FIRST_LEVEL,
+         QUALFIED_CREDIT_TOOL_TYPE_NAME,BASE_WEIGHT,EXEMPTION_WEIGHT)
+        values(
+            #{model.calcIndex},
+            #{model.startDate},
+            #{model.endDate},
+            #{model.customerName},
+            #{model.crmFirstLevel},
+            #{model.crmToolTypename},
+            #{model.baseWeight},
+            #{model.exemptionWeight})
+    </insert>
+
+    <!-- 删除当前行 -->
+    <delete id="deleteRows"  parameterType="java.lang.String">
+        delete  from RWA_BDM_OBJ_CONF_OTHER_PUBLIC_ENTITY_LIST
+        where CUST_NAME = #{customerName};
+    </delete>
+
+    <select id="selectDetailData"
+            parameterType="com.sundata.product.rwa.SectorList.model.ListOfPublicSectorModel"
+            resultMap="useMap">
+        select CALCINDEX,SDATE,EDATE,CUST_NAME,CRM_FIRST_LEVEL,
+        QUALFIED_CREDIT_TOOL_TYPE_NAME,BASE_WEIGHT,EXEMPTION_WEIGHT
+        from RWA_BDM_OBJ_CONF_OTHER_PUBLIC_ENTITY_LIST
+        <where>
+            CUST_NAME = #{model.customerName}
+<!--            <if test=" null != #{model.calcIndex} ">-->
+<!--                CALCINDEX = #{model.calcIndex}-->
+<!--            </if>-->
+<!--            <if test=" null != #{model.customerName} ">-->
+<!--                and CUST_NAME = #{model.customerName}-->
+<!--            </if>-->
+        </where>
+    </select>
 
 </mapper>

+ 2 - 1
Procedure/frontend/projectb/config/config.ts

@@ -96,8 +96,9 @@ export default defineConfig({
    { path: '/govFinancialAssetComp' , component: './rdpMng/Template/Coding/components/govFinancialAssetComp' },
    { path: '/faGlBalanceSheet' , component: './rdpMng/Template/Coding/components/faGlBalanceSheet' },
    { path: '/itItfRate' , component: './rdpMng/Template/Coding/components/itItfRate' },
-   { path: '/result_list' , component: './rwa_data_check/result_list' },
+   { path: '/rule_list' , component: './rwa_data_check/rule_list' },
    { path: '/diffconfig_list' , component: './rwa_data_check/diffconfig_list' },
+   { path: '/result_list' , component: './rwa_data_check/result_list' },
 
    { path: '/GuaranteeTable' , component: './project/dataquality/GuaranteeTable' },
 

+ 1 - 1
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/fcCommitment.tsx

@@ -155,7 +155,7 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
       },
 	  {
         title  : '承诺类型代码',
-        dataIndex : 'commType',
+        dataIndex : 'commTypes',
         //  hideInTable: true,
        // search: false,
         order:-9,

+ 30 - 7
Procedure/frontend/projectb/src/pages/rdpMng/Template/Coding/components/fcLoan.tsx

@@ -4,14 +4,19 @@ import { EditType, SDForm, SDFormDict, SDFormText, SDModal, SDModalForm, SDOpera
 import { ActionType, ProColumns } from '@ant-design/pro-table';
 import { WomanOutlined } from '@ant-design/icons';
 import { deletedata } from '@/services/idataMng/impandauditp';
-import { exportExcelModel, FcLoanModel, getFcLoan } from '@/services/rwa/fcLoan';
+import { exportExcelModel, FcLoanModel, getFcLoan, getFcLoan1 } from '@/services/rwa/fcLoan';
 import { request, useModel } from '@umijs/max';
+import { type } from '@/pages/rf-eng/rfDefine/compnents/param_new';
 
-type aaa = {
-    
+export type FcLoanModel1 ={
+  loanReferenceNo ?:any;
+  search ?:any;
 }
 
-const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
+
+const fcLoan: React.FC<FcLoanModel1>= (props : FcLoanModel1) => {
+
+  //const {glAccountId } = props;
     const [editType, setEditType] = useState<EditType>('update');
     const formRef = useRef<FormInstance<any>>();
       /** 当前行对象,查看详情、修改时,作为详细信息表单的查询条件 */
@@ -26,8 +31,16 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
     const tableActionRef = useRef<ActionType>();
     var formDataList = new Array<FcLoanModel>;
     
+    const [id ,setId] =useState<boolean>(false);
+
+    console.log(props.loanReferenceNo);
+    console.log(props.search);
+    // if(props.search=="true"){
+    //   setId(true);
+    // }else{ setId(false);}
 
-    const columns: ProColumns<FcLoanModel>[] = [
+
+     const columns: ProColumns<FcLoanModel>[] = [
       { 
         title  : '数据日期',
         dataIndex : 'dataDate',
@@ -534,9 +547,16 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
     return(
         <SDPage >
         <SDTable
-      title="查询表格"
+      title="信贷表"
       rowKey="custName"
       request={async(formData : FcLoanModel)=>{
+        if(props.search==='0'){
+          setId(false);
+          const sd1 =await getFcLoan1(props.loanReferenceNo);
+          formDataList =[...sd1];
+          return {data :sd1 };
+
+        }else{ setId(true);}
         const sd = await getFcLoan(formData);
         formDataList =[...sd];
         return {data :sd };
@@ -547,8 +567,10 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
       //displayColumn="custName"
      actionRef={actionRef}
      formRef={formRef}
+     search={id}
      //handleRemove={deletedata}
       setCurrentRow={setCurrentRow}
+      
       setEditType={setEditType}
       toolBarRender={(_, { selectedRows }) => [
         <SDButton
@@ -572,5 +594,6 @@ const fcOffSheetts: React.FC<aaa>= (prop : aaa) => {
     )
 
 
-  };export default fcOffSheetts;
+  };export default fcLoan;
+
 

+ 127 - 63
Procedure/frontend/projectb/src/pages/rwa_data_check/diffconfig_list.tsx

@@ -1,18 +1,19 @@
-import React, { useEffect, useRef, useState } from 'react';
-import { Button, Form, FormInstance, Input, Space, Tooltip, Upload } from 'antd';
-import { ActionType, ProColumns, ProFormInstance } from '@ant-design/pro-components';
+import React, { Key, useEffect, useRef, useState } from 'react';
+import { Button, Form, FormInstance, Input, Radio, Space, Table, Tooltip, Upload } from 'antd';
+import { ActionType, ProColumns, ProFormInstance, ProTable } from '@ant-design/pro-components';
 import { baseFun, EditType, SDAreaTtile, SDButton, SDForm, SDFormDict, SDFormSearch, SDFormText, SDLayout, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, validateFun } from '@sundata/ui-frame';
-import { diffconfig_deleteone, difftoleranceModel, rule_list, rule_list1, rule_querylist, rule_queryone } from '@/services/rwa/diffconfig_list';
+import { diffconfig_addone, diffconfig_addone1, diffconfig_deleteone, difftoleranceModel, most, resultListModel, rule_list, rule_list1, rule_querylist, rule_queryone } from '@/services/rwa/diffconfig_list';
 import { useModel } from '@umijs/max';
 import { WomanOutlined } from '@ant-design/icons';
 import { RuleObject } from 'antd/lib/form';
-import { resultListModel } from '@/services/rwa/result_list';
 import Footer from '@/components/Footer';
 
 type aaa = {
     lowerLimit ?:any;
     upperLimit ?:any;
     ruleAreaType ?:any;
+    ruleNo ?:any;
+    ruleId ?:any;
     onCancel:  () => void;
     onChangeVisible(visible: boolean, type: string): unknown;
     onChangeVisdible:(visible:boolean,type ?: 'none' | 'raload' )=>void;
@@ -22,32 +23,53 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
     var formDataList = new Array<difftoleranceModel>;
     var formDataList1 = new Array<resultListModel>;
 
+
     const [windowProps, setWindowProps] = useState<{
       //selectedRowKeys: React.Key[];
-      selectedRows: resultListModel[];
+      //selectedRows: resultListModel[];
     }>({ selectedRows: [] });
-
+ 
     const [visible,setVisible] = useState<boolean>(false);//弹窗是否显示
     const [visible1,setVisible1] = useState<boolean>(false);//弹窗是否显示
     const [visible2,setVisible2] = useState<boolean>(false);//弹窗是否显示
     const formRef = useRef<FormInstance<any>>();
     const [editType, setEditType] = useState<EditType>('update');
 
+    const parentformRef = useRef<FormInstance<any>>();
+    const childenformRef= useRef<FormInstance<any>>();
+
+    const [mockData, setMockData] = useState<resultListModel[]>([]);
+
+    const [tableData, setTableData] = useState(mockData);
+
       /** 当前行对象,查看详情、修改时,作为详细信息表单的查询条件 */
-    const [currentRow, setCurrentRow] = useState<difftoleranceModel>();
+    const [currentRow, setCurrentRow] = useState<resultListModel>();
 
     const actionRef = useRef<ActionType>();
     const { fetchDict } = useModel('dict');   
 
+    const [selectedValue, setSelectedValue] = useState('');
+
+
+
+    const [allSelectedRowKeys, setAllSelectedRowKeys] = useState<Key[]>();
+
+
     const selectdata = async (record:any)=>{
-        const sd =await rule_queryone(record.ruleId);
-         formRef.current?.setFieldsValue(sd);
+        const sd =await rule_queryone(record.ruleNo);
+        parentformRef.current?.setFieldsValue(sd.result1[0]);
+        if(editType==='update')
+         {setMockData(sd.result2);
+        } else {
+          setMockData([]);
+        }
+         
     }
 
     
     const deldata = async (record:any)=>{
         baseFun.confirm("请确认是否继续操作",async()=>{
-            await diffconfig_deleteone(record.ruleId);
+            await diffconfig_deleteone(record.ruleNo);
         })
     }
 
@@ -60,16 +82,22 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
       const upperLimit =(_?: RuleObject, value?: any)=>{
 
       }
-      const inst =  async(formData : resultListModel) => {
+      const inst =  async(formData : difftoleranceModel) => {
         setEditType('create')
-       const ResultList =await rule_addone(formData)  
-       if("规则编号已重复,请重新输入"===ResultList){
-        baseFun.warning(ResultList);
-       }else{
-        baseFun.info(ResultList);
-       closeAndRefresh();
-       }
+      //  const ResultList =await rule_addone(formData)  
+      //  if("规则编号已重复,请重新输入"===ResultList){
+      //   baseFun.warning(ResultList);
+      //  }else{
+      //   baseFun.info(ResultList);
+      //  closeAndRefresh();
+      //  }
       
+      await diffconfig_addone(formData);
+      var obg ={...mockData,ruleNo:formData.ruleNo}
+      inst1(formData.ruleNo,obg);
+      }
+      const inst1 = async(ruleNo:any,obg:any)=>{
+        await diffconfig_addone1(ruleNo,mockData);
       }
     const columns: ProColumns<difftoleranceModel>[] = [
         { title : '计算实例号',
@@ -152,9 +180,9 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
                 successMessage=""
                 
                 onClick={()=>{ 
-                    selectdata(record);
-                setVisible(true);
-                setEditType('update')
+                  setEditType('update');
+                  selectdata(record);
+                  setVisible(true);
                  } }
               >
                 修改
@@ -188,11 +216,10 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
         dataIndex : 'subjectDesc',
         width : 150
         },
-        
 
     ]
 
-    const columns2: ProColumns<difftoleranceModel>[] = [
+    const columns2: ProColumns<resultListModel>[] = [
       { title : '规则编号',
       dataIndex : 'ruleId',
       search:false,
@@ -220,12 +247,23 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
       request: () => fetchDict('ONOROFF'),//码值后续添加
       width : 150
       },
+
     ]
-    const aa=async()=>{
-      
+
+
+    const removeRow = (key: any) => {
+     const String =`${key.join(' ')}`;
+      setMockData(mockData .filter((item) => item.ruleId !== String));
+    };
+
+    const rule_list11 =async(formData : resultListModel)=>{
+      const sd = await rule_list(formData);
+          formDataList1=[...sd];
+            setMockData(formDataList1)
+          
+
     }
 
-    
 
     return(
         <SDPage>
@@ -234,6 +272,7 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
       request={async(formData : difftoleranceModel)=>{
         const sd = await rule_querylist(formData);
         formDataList =[...sd];
+        
         return {data :sd };
       }}
       columns={columns}
@@ -249,6 +288,7 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
         onClick={() => {
           setVisible(true);
           setEditType('create');
+          setVisible2(false);
         }}
         >
           新增
@@ -257,15 +297,16 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
       />
       {visible &&(
         
-      <SDModalForm title={''} visible={visible} editType={editType} onVisibleChange={() => { setVisible(false);}
+      <SDModalForm title={''} visible={visible} editType={editType} onVisibleChange={() => { closeAndRefresh(); setVisible(false);  }
     } 
-    footer={[<SDSubmitButton  editType={editType}   formRef={formRef} successMessage="" doSubmit={inst} >保存</SDSubmitButton>,
+    footer={[<SDSubmitButton  editType={editType}   formRef={parentformRef} successMessage="" doSubmit={inst} >保存</SDSubmitButton>,
     <SDButton     successMessage="" onClick={()=>closeAndRefresh()} >关闭</SDButton>
   ]}
       >
-      <SDAreaTtile title='差异容忍度规则新增'/>
+      <SDAreaTtile title='差异容忍度规则新增' />
       {
-        <SDForm editType={editType} formRef={formRef} onValuesChange={(changedValues,Values)=>{
+       
+        <SDForm editType={editType} formRef={parentformRef}  onValuesChange={(changedValues,Values)=>{
             if(Values.upperLimit!="" && Values.lowerLimit!="" && Values.upperLimit!=undefined && Values.lowerLimit!=undefined){
               const  upperLimit =Values.upperLimit;
               const  lowerLimit =Values.lowerLimit;
@@ -287,43 +328,48 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
         }
     }
         >
-        <SDFormText name="ruleNo"   label="规则编号"  />
-        <SDFormText name="ruleName"   label="规则名称"  />
-        <SDFormText name="upperLimit"   label="容忍度下限%"  />
-        <SDFormText name="lowerLimit"   label="容忍度上限%"  />
-        <SDFormDict name="intervalType"   label="区间开闭类型"  dictKey='limitinterval'/>
-        <SDFormDict name="ruleAreaType"   label="适用范围类型" dictKey='RULE_AREA_TYPE' />
+        <SDFormText name="ruleNo"   label="规则编号"  required  readonlyCond='update'/>
+        <SDFormText name="ruleName"   label="规则名称"  required />
+        <SDFormDict name="ruleAreaType"   label="适用范围类型" dictKey='RULE_AREA_TYPE'  required/>
+        <SDFormDict name="intervalType"   label="区间开闭类型"  dictKey='limitinterval' required/>
+        <SDFormText name="lowerLimit"   label="容忍度上限%"   required />
+        <SDFormText name="upperLimit"   label="容忍度下限%"   required/>
         </SDForm>
       }
       <SDAreaTtile title='总分勾稽规则列表'  />
       <SDLayout>
-        <SDTable 
-        rowKey="custName"
+        <ProTable 
+        rowKey="ruleId"
         search={false} 
+        dataSource={mockData}
         request={async(formData : resultListModel)=>{
           const sd = await rule_list(formData);
-          formDataList1 =[...sd];
-          return {data :sd };
-        }}
+              formDataList1=[...sd];
+              if(editType==='update')
+              {setMockData(sd);
+             } else {
+               setMockData([]);
+             }
+            return {data:sd}}}
         columns={columns1}
-
-       //  singleSelect={false}
-     //  operations={["create"]}
-       // displayColumn="custName"
+        //singleSelect={false}
        actionRef={actionRef}
-       formRef={formRef}
-       //handleRemove={deletedata}
-        setEditType={setEditType}
-        setDetailVisible={setVisible} 
-        toolBarRender={() => {
+       formRef={childenformRef}
+       //handleRemove={selectedValue}
+       // setEditType={setEditType}
+        //setDetailVisible={setVisible} 
+        toolBarRender={(_, { selectedRowKeys }) => {
             if(visible2){
                 return[  <SDButton
                 key="create"
                 successMessage=''
                 icon={<WomanOutlined />}
-                onClick={() => {
+                onClick={async() => {
                   setVisible1(true);
                   setEditType('create');
+                  mockData.forEach(function (item){
+                    setCurrentRow(item);
+                  });
                 }}
                 >
                   新增
@@ -332,27 +378,29 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
                 key="create"
                 successMessage=''
                 icon={<WomanOutlined />}
-                onClick={() => {
-                    console.log(prop.formRef)
-                }}
+                onClick={()=>{removeRow(selectedRowKeys) ;}}
                 >
                   删除
                 </SDButton>
-
            ] }else{return []}
-         
+           
         } }
+          rowSelection={
+            {
+  selections:[Table.SELECTION_ALL, Table.SELECTION_INVERT],
+  type:'checkbox'
+}
+}
         />
       </SDLayout>
       {visible1 &&(
         <SDModalForm title={''} visible={visible1} editType={editType} onVisibleChange={() => { setVisible1(false);}
       } >
         <SDLayout>
-            <SDTable
-            rowKey="custName"
+            <ProTable
+            rowKey="ruleId"
             request={async(formData : resultListModel)=>{
               const sd = await rule_list1(formData);
-              formDataList1 =[...sd];
               return {data :sd };
             }}
             columns={columns2}
@@ -366,22 +414,38 @@ const diffconfig_list: React.FC<aaa>= (prop : aaa) => {
             setDetailVisible={setVisible1} 
             singleSelect={false}
             
-            toolBarRender={() => {
-              
+            toolBarRender={(_, { selectedRows }) => {    
               return [
                 <SDButton
                 key="create"
                 successMessage=''
                 icon={<WomanOutlined />}
                 onClick={() => {
+                  if (selectedRows) {
+                    setMockData(selectedRows);
+                    setVisible1(false);
+                  } else {
+                    setMockData([]);
+                  }
+                 // actionRef.current?.reload?.(true)
                 }}
                 >
                   选择
                 </SDButton>,
-
               ]
             }
           }
+          
+          rowSelection={
+            {
+              selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
+              selectedRowKeys: allSelectedRowKeys,
+              onChange: (selectedRowKeys, selectedRows) => {
+                setAllSelectedRowKeys(selectedRowKeys);
+              }
+              
+            }
+          }
             />
             </SDLayout>
             </SDModalForm>

+ 164 - 300
Procedure/frontend/projectb/src/pages/rwa_data_check/result_list.tsx

@@ -1,266 +1,125 @@
 import React, { useEffect, useRef, useState } from 'react';
 import { Button, Form, FormInstance, Input, Space, Tooltip, Upload } from 'antd';
-import { ActionType, ProColumns, ProFormInstance } from '@ant-design/pro-components';
-import { baseFun, EditType, SDButton, SDFormDict, SDFormSearch, SDFormText, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, validateFun } from '@sundata/ui-frame';
-import {  rule_list, rule_addone, resultListModel, rule_queryone, selectsubjectNature, updateResultList } from '@/services/rwa/result_list';
-import { useModel } from '@umijs/max';
+import { ActionType, ProColumns, ProFormInstance, ProTable } from '@ant-design/pro-components';
+import { baseFun, EditType, SDAreaTtile, SDButton, SDForm, SDFormDict, SDFormSearch, SDFormText, SDLayout, SDModal, SDModalForm, SDOperate, SDPage, SDSubmitButton, SDTable, SDTabs, validateFun } from '@sundata/ui-frame';
+import { resultListModel, result_list } from '@/services/rwa/result_list';
 import { WomanOutlined } from '@ant-design/icons';
+import { renderTemplate } from '../rdpMng/Template/components/common';
+import { FcLoanModel } from '@/services/rwa/fcLoan';
+
+
 
 type aaa = {
-    glCode ?:any;
-    subjectNature ?:any;
+  loanReferenceNo ?:any;
+  search ?:any;
     onCancel:  () => void;
     onChangeVisible(visible: boolean, type: string): unknown;
     onChangeVisdible:(visible:boolean,type ?: 'none' | 'raload' )=>void;
     formRef: React.MutableRefObject<ProFormInstance<any> | undefined>;
   }
-const result_list: React.FC<aaa>= (prop : aaa) => {
-    
+const resultlist: React.FC<aaa>= (prop : aaa) => {
     var formDataList = new Array<resultListModel>;
     const [visible,setVisible] = useState<boolean>(false);//弹窗是否显示
     const formRef = useRef<FormInstance<any>>();
     const [editType, setEditType] = useState<EditType>('update');
-
-      /** 当前行对象,查看详情、修改时,作为详细信息表单的查询条件 */
-    const [currentRow, setCurrentRow] = useState<resultListModel>();
+    var formDataList1 = new Array<FcLoanModel>;
 
     const actionRef = useRef<ActionType>();
-    const { fetchDict } = useModel('dict');
-    const tableActionRef = useRef<ActionType>();
-
-    const [onoroff1,setOnoroff] =useState<Boolean>(false);
 
-    const closeAndRefresh = ()=>{
-        setVisible(false);
-        actionRef.current?.reloadAndRest?.();
-      }
-    
-
-    const selectdata = async (record:any)=>{
-        const sd =await rule_queryone(record.ruleId);
-         formRef.current?.setFieldsValue(sd);
-    }
-
-    const disdata = async (record:any)=>{
-        const sd =await rule_queryone(record.ruleId);
-        console.log(sd);
-        formRef.current?.setFieldsValue(sd);
-     }
-     const inst =  async(formData : resultListModel) => {
-        setEditType('create')
-       const ResultList =await rule_addone(formData)  
-       if("规则编号已重复,请重新输入"===ResultList){
-        baseFun.warning(ResultList);
-       }else{
-        baseFun.info(ResultList);
-       closeAndRefresh();
-       }
-      
-      }
-      const state =async(record:any)=>{
-        baseFun.confirm("请确实是否继续操作" ,async()=>{
-         await updateResultList(record.ruleId) 
-         closeAndRefresh();
-       })
-     }
-     
+    const subjcode = useRef<any>();
 
+      /** 当前行对象,查看详情、修改时,作为详细信息表单的查询条件 */
+      const [currentRow, setCurrentRow] = useState<resultListModel>();
     const columns: ProColumns<resultListModel>[] = [
-{ title : '计算实例号',
-dataIndex : 'calcindex',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '起始数据日期',
-dataIndex : 'sdate',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '截止数据日期',
-dataIndex : 'edate',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '年月',
-dataIndex : 'term',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '数据日期',
-dataIndex : 'dataDate',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '规则编号',
-dataIndex : 'ruleId',
-width : 150
-},
-
-{ title : '规则名称',
-dataIndex : 'ruleName',
-width : 150
-},
-
-{ title : '科目代码',
-dataIndex : 'glCode',
-width : 150
-},
-
-{ title : '科目名称',
-dataIndex : 'subjectDesc',
-width : 150
-},
-
-{ title : '科目性质',
-dataIndex : 'subjectNature',
-search:false,
-width : 150
-},
-
-{ title : '科目状态',
-dataIndex : 'subjectState',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '表内外标识',
-dataIndex : 'onoroff',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '记账方向',
-dataIndex : 'accountingDirection',
-search:false,
-width : 150
-},
-
-{ title : '计算方式',
-dataIndex : 'calcMethod',
-search:false,
-width : 150
-},
-
-{ title : '正差异风险暴露分类',
-dataIndex : 'positiveRiskType',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '负差异风险暴露分类',
-dataIndex : 'negativeRiskType',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '正差异表外项目分类',
-dataIndex : 'positiveOffProjectType',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '负差异表外项目分类',
-dataIndex : 'negativeOffProjectType',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '所属阶段',
-dataIndex : 'stageinId',
-search:false,
-hideInTable: true,
-width : 150
-},
-
-{ title : '总账取数规则',
-dataIndex : 'subjectSql',
-hideInTable: true,
-search:false,
-width : 150
-},
-
-{ title : '勾稽明细取数规则',
-dataIndex : 'productSql',
-search:false,
-hideInTable: true,
-width : 150
-},
-{ title : '状态',
-dataIndex : 'yesorno',
-search:false,
-width : 150
-},
-{
-    title: '操作',
-    dataIndex: 'operate',
-    valueType: 'option',
-    render: (_, record) => [
-
-      <SDOperate
-        key="roleCfg"
-        icon={<WomanOutlined />}
-        successMessage=""
+        { title : '数据期次',
+        dataIndex : 'term',
+        width : 150
+        },
         
-        onClick={()=>{ 
-            selectdata(record);
-        setVisible(true);
-        setEditType('update')
-         } }
-      >
-        修改
-      </SDOperate>,
-
-     <SDOperate
-     key="roleCfg"
-     icon={<WomanOutlined />}
-     successMessage=""
-     onClick={()=>{ 
-      disdata(record);
-      closeAndRefresh();
-     setVisible(true);
-     setEditType('display')
-      } }
-   >
-     查看
-   </SDOperate>,
-   <span style={record?.yesorno==="作废" ? {display:'none'}: {}}>
-   <SDOperate
-   key="roleCfg"
-   icon={<WomanOutlined />}
-   successMessage=""
-   onClick={()=>{ 
-    state(record);
-    } }
- >
-   作废
- </SDOperate>,
- </span>
-    ],
-  },
- ]
+        { title : '法人机构',
+        dataIndex : 'orgcode',
+        width : 150
+        },
+        
+        { title : '科目代码',
+        dataIndex : 'subjcode',
+        width : 150
+        },
+        
+        { title : '科目名称',
+        dataIndex : 'subjname',
+        width : 150
+        },
+        
+        { title : '币种',
+        dataIndex : 'ccy',
+        width : 150
+        },
+        
+        { title : '总账科目余额(万元)',
+        dataIndex : 'glamt',
+        width : 150
+        },
+        
+        { title : '勾稽汇总金额(万元)',
+        dataIndex : 'ledgartamt',
+        width : 150
+        },
+        
+        { title : '核对差异金额(万元)',
+        dataIndex : 'differamt',
+        width : 150
+        },
+        
+        { title : '核对差异率%',
+        dataIndex : 'differrate',
+        width : 150
+        },
+        
+        { title : '差异容忍度%',
+        dataIndex : 'percthreshold',
+        width : 150
+        },
+        
+        { title : '是否超过容忍度',
+        dataIndex : 'leartresulttype',
+        width : 150
+        },
+        
+        { title : '轧差后核对差异(万元)',
+        dataIndex : 'offsetdifferamt',
+        width : 150
+        },
+        {
+            title: '操作',
+            dataIndex: 'operate',
+            valueType: 'option',
+            render: (_, record) => [
+              <SDOperate
+                key="roleCfg"
+                icon={<WomanOutlined />}
+                successMessage=""
+                onClick={()=>{ 
+                 //selectdata(record);
+                setVisible(true);
+                subjcode.current=record.subjcode; 
+                setEditType('update')
+                 } }
+              >
+                勾稽明细
+              </SDOperate>,
+    ]}
+
+    ]
+  
+    
     return(
         <SDPage>
-         <SDTable
+           <SDTable
       title="查询表格"
       rowKey="custName"
       request={async(formData : resultListModel)=>{
-        const sd = await rule_list(formData);
+        const sd = await result_list(formData);
         formDataList =[...sd];
         return {data :sd };
       }}
@@ -274,72 +133,77 @@ width : 150
       setCurrentRow={setCurrentRow}
       setEditType={setEditType}
       setDetailVisible={setVisible} 
-      toolBarRender={(_, { selectedRows }) => [
-        <SDButton
-        key="create"
-        successMessage=''
-        onClick={() => {
-          setVisible(true);
-          setOnoroff(true);
-          setEditType('create');
-        }}
-        >
-          新增
-        </SDButton>
-      ]} 
+      // toolBarRender={(_, { selectedRows }) => [
+      //   <SDButton
+      //   key="create"
+      //   successMessage=''
+      //   onClick={() => {
+      //     setVisible(true);
+      //     setOnoroff(true);
+      //     setEditType('create');
+      //   }}
+      //   >
+      //     新增
+      //   </SDButton>
+      // ]} 
       />
-      { visible &&(
-      <SDModalForm  
-      visible={visible}
-      //rowKey="custName" 
-      editType={editType} 
 
-      //request={selectdata1}
-      //params={setDataSource}
-      onVisibleChange={() => { setVisible(false);
+
+
+{visible  &&(
+  <SDModal title={undefined} visible={visible}  onCancel={() => { setVisible(false); }
+    } >
+      {/* <ProTable
+      rowKey="id"
+      key="tableQuery"
+      request={async(formData : FcLoanModel)=>{
+        const sd = await getFcLoan(formData);
+        formDataList1 =[...sd];
+        return {data :sd };
       }}
-      initialValues={{glCode:prop.glCode,subjectNature:prop.subjectNature,editType:setEditType}}
-      footer={[<SDSubmitButton  editType={editType}   formRef={formRef} successMessage="" doSubmit={inst} >保存</SDSubmitButton>,
-    <SDButton     successMessage="" onClick={()=>closeAndRefresh()} >关闭</SDButton>
-  ]}
+      columns={columns1}
       formRef={formRef}
-      onValuesChange={async (changedValues,Values) => {
-        if(Values.glCode!=undefined){    
-            const sd = await selectsubjectNature(Values.glCode);  
-            console.log(sd);
-          formRef.current?.setFieldValue('subjectDesc',sd)}
-          if(Values.subjectNature=="04"){
-            setOnoroff(false);
-          }else{
-            setOnoroff(true);
-          }
-
-        }
-      }
-       >
-<SDFormText name="ruleId"   label="规则编号"  max={20}/>
-<SDFormText name="ruleName"   label="规则名称"  max={60}  width={250}/>
-<SDFormDict  name="glCode"   label="科目代码" dictKey='org' />
-<SDFormText name="subjectDesc"   label="科目名称"   readonlyCond='both' />
-<SDFormDict name="subjectNature"   label="科目性质"  dictKey='SUBJECT_DESC' />
-<SDFormDict name="onoroff"   label="表内外标识"  required={onoroff1} dictKey='ONOROFF'/>
-<SDFormDict name="accountingDirection"   label="记账方向"   dictKey='ACCOUNTING_DIRECTION'  />
-<SDFormDict name="calcMethod"   label="计算方式"  dictKey='CALC_METHOD'/>
-<SDFormDict name="positiveRiskType"   label="正差异风险暴露分类"  />
-<SDFormDict name="negativeRiskType"   label="负差异风险暴露分类"  />
-<SDFormDict name="positiveOffProjectType"   label="正差异表外项目分类"  />
-<SDFormDict name="negativeOffProjectType"   label="负差异表外项目分类"  />
-<SDFormDict name="stageinId"   label="所属阶段"  />
-<SDFormText name="subjectSql"   label="总账取数规则" type='textarea' />
-<SDFormText name="productSql"   label="勾稽明细取数规则"  type='textarea' />
-<div style={{display:"none"}}>
-<SDFormText name="yesorno"   label="状态"  />
-</div>
-      </SDModalForm>
-     )
-     }  
+      search={false}
+      ></ProTable> */}
+<SDTabs defaultActiveKey="t2" tabPosition="top" type="card" 
+                items={[                    
+                    {
+                        key:'t1',
+                        label:'信贷表',
+                        type:"card",
+                        children: (
+                            renderTemplate({
+                                key: "fcLoan",
+                                prodCode:"fcLoan",
+                                openType:"child",
+                                initParams:{editType:'display',loanReferenceNo:subjcode.current,search:'0'},
+                            },"coding")
+                        )
+                        
+                    },
+                    {
+                      key:'t2',
+                      label:'回购表',
+                      type:"card",
+                      children: (
+                          renderTemplate({
+                              key: "scbaseinfo",
+                              prodCode:"fcCommitment",
+                              openType:"child",
+                              initParams:{editType:'display',subjcode:subjcode.current},
+                          },"coding")
+                      )
+                      
+                  },
+                    
+                ]}
+
+                >        
+                </SDTabs>
+                </SDModal>
+)}
         </SDPage>
     );
 
-} 
-export default result_list;
+}
+    export default resultlist;

+ 39 - 10
Procedure/frontend/projectb/src/services/rwa/diffconfig_list.ts

@@ -1,4 +1,4 @@
-import { baseFun } from "@sundata/ui-frame"
+import { baseFun, TableData } from "@sundata/ui-frame"
 
 //差异容忍度规则定义表
 export type difftoleranceModel={
@@ -91,6 +91,16 @@ subjectSql : String;
 productSql : String;
 //状态
 yesorno : String;
+//规则编号
+ruleNo : String;
+}
+
+
+export type most ={
+    most1 ?:difftoleranceModel;
+    most2 ?:resultListModel;
+    most3 ?:difftolerancerangeModel;
+
 }
 
 //总分勾稽规则列表
@@ -101,8 +111,8 @@ export async function rule_list(body:any){
     ;
 }
 
-export async function rule_list1(body:any){
-    return baseFun.request<resultListModel[]>('/api/product/rwa/resultList/DiffconfigListAction/rule_list1',{
+export async function rule_list1(body:resultListModel){
+    return baseFun.request<TableData<resultListModel>[]>('/api/product/rwa/resultList/DiffconfigListAction/rule_list1',{
         data:body
     })
     ;
@@ -117,17 +127,36 @@ export async function rule_querylist(body:any){
 }
 
 //修改,查询
-export async function rule_queryone(ruleId :String){
-    return baseFun.request<difftoleranceModel[]>('/api/product/rwa/resultList/DiffconfigListAction/rule_queryone',{
-        params:{ruleId}
+export async function rule_queryone(ruleNo :String){
+    return baseFun.request<any>('/api/product/rwa/resultList/DiffconfigListAction/rule_queryone',{
+        params:{ruleNo}
     })
     ;
 }
 
-//修改,查询
-export async function diffconfig_deleteone(ruleId :String){
-    return baseFun.request<string>('/api/product/rwa/resultList/DiffconfigListAction/rule_queryone',{
-        params:{ruleId}
+//删除
+export async function diffconfig_deleteone(ruleNo :String){
+    return baseFun.request<string>('/api/product/rwa/resultList/DiffconfigListAction/diffconfig_deleteone',{
+        params:{ruleNo}
+    })
+    ;
+}
+
+
+
+//初始化
+export async function diffconfig_addone(body:any){
+    return baseFun.request<difftoleranceModel[]>('/api/product/rwa/resultList/DiffconfigListAction/diffconfig_addone',{
+        data:body
+    })
+    ;
+}
+
+//初始化
+export async function diffconfig_addone1(ruleNo:String,body:resultListModel[]){
+    return baseFun.request<resultListModel[]>('/api/product/rwa/resultList/DiffconfigListAction/diffconfig_addone1',{
+        data:body,
+        params:{ruleNo}
     })
     ;
 }

+ 1 - 0
Procedure/frontend/projectb/src/services/rwa/fcCommitment.ts

@@ -55,6 +55,7 @@ bpCustNo : String ;
 busLine : String[] ; 
 //承诺类型
 commType : String[] ; 
+commTypes : String ; 
 ccyCdId : String ; 
 commTypeId: String ; 
 onOffFlagId: String ; 

+ 9 - 1
Procedure/frontend/projectb/src/services/rwa/fcLoan.ts

@@ -1,6 +1,7 @@
 import { baseFun, DictTree, SDTable, SDTableProps,TableData } from "@sundata/ui-frame"
 
 export type FcLoanModel ={
+
      //计算实例号
      calcindex : String ; 
      //起始数据日期
@@ -50,7 +51,7 @@ export type FcLoanModel ={
      //计提准备金
      reserve : String ; 
      //本金科目号
-     glAccountId : String ; 
+     glAccountId ?: String ; 
      //应收利息科目号
      recIntAccount : String ; 
      //应计利息科目号
@@ -116,6 +117,13 @@ export async function getFcLoan(body:any){
     })
     ;
 }
+export async function getFcLoan1(loanReferenceNo:String){
+    return baseFun.request<FcLoanModel[]>('/api/product/rwa/parameter/FcLoanAction/getFcLoan1',{
+        params:{loanReferenceNo}
+    // dats:modelcode
+    })
+    ;
+}
 
     /** 全部导出 */
     export async function exportExcelModel(fileName:string,body:any) {

+ 25 - 80
Procedure/frontend/projectb/src/services/rwa/result_list.ts

@@ -1,92 +1,37 @@
 import { baseFun } from "@sundata/ui-frame"
 
 export type resultListModel={
-    //计算实例号
-calcindex : String;
-//起始数据日期
-sdate : String;
-//截止数据日期
-edate : String;
-//年月
+    //数据期次
 term : String;
-//数据日期
-dataDate : String;
-//规则编号
-ruleId : String;
-//规则名称
-ruleName : String;
-//总账科目号
-glCode : String;
+//法人机构
+orgcode : String;
+//科目代码
+subjcode : String;
 //科目名称
-subjectDesc : String;
-//科目性质
-subjectNature : String;
-//科目状态
-subjectState : String;
-//表内外标识
-onoroff : String;
-//记账方向(A:实际,D:借方,C:贷方)
-accountingDirection : String;
-//计算方式
-calcMethod : String;
-//正差异风险暴露分类
-positiveRiskType : String;
-//负差异风险暴露分类
-negativeRiskType : String;
-//正差异表外项目分类
-positiveOffProjectType : String;
-//负差异表外项目分类
-negativeOffProjectType : String;
-//所属阶段
-stageinId : String;
-//总账取数规则
-subjectSql : String;
-//勾稽明细取数规则
-productSql : String;
-//状态
-yesorno : String;
-}
+subjname : String;
+//币种
+ccy : String;
+//总账科目余额(万元)
+glamt : number;
+//勾稽汇总金额(万元)
+ledgartamt : number;
+//核对差异金额(万元)
+differamt : number;
+//核对差异率%
+differrate : number;
+//差异容忍度%
+percthreshold : number;
+//是否超过容忍度
+leartresulttype : String;
+//轧差后核对差异(万元)
+offsetdifferamt : number;
 
-//初始化
-export async function rule_list(body:any){
-    return baseFun.request<resultListModel[]>('/api/product/rwa/resultList/ResultListAction/rule_list',{
-        data:body
-    })
-    ;
 }
 
-
-//修改,查询
-export async function rule_queryone(ruleId :String){
-    return baseFun.request<resultListModel[]>('/api/product/rwa/resultList/ResultListAction/rule_queryone',{
-        params:{ruleId}
-    })
-    ;
-}
-
-//新增
-export async function rule_addone(body :resultListModel){
-    return baseFun.request<any>('/api/product/rwa/resultList/ResultListAction/rule_addone',{
+//总分勾稽规则列表
+export async function result_list(body:any){
+    return baseFun.request<resultListModel[]>('/api/product/rwa/resultList/ResultListAction/result_list',{
         data:body
-    // dats:modelcode
-    });
-}
-
-//校验唯一性
-export async function selectsubjectNature(glCode :any){
-    return baseFun.request<any>('/api/product/rwa/resultList/ResultListAction/selectsubjectNature',{
-        params:{glCode}
-    // dats:modelcode
-    });
-
-}
-
-
-//作废状态
-export async function updateResultList(ruleId :String){
-    return baseFun.request<resultListModel>('/api/product/rwa/resultList/ResultListAction/updateResultList',{
-        params:{ruleId}
-    // dats:modelcode
     })
     ;
 }