瀏覽代碼

增加 数据库函数、处理功能导入的问题,解决数据库脚本执行过程中变量无法替换的问题,处理表外配置可能为空的问题。

CodeLife Leno 3 周之前
父節點
當前提交
fde1e865b3

+ 4 - 0
DBScript/李庚谱/002-DML.sql

@@ -94,5 +94,9 @@ INSERT INTO sys_roleright (ROLEID, FUNCCODE, DATASCOPE, BLINE) VALUES ('sysadmin
 INSERT INTO sys_roleright (ROLEID, FUNCCODE, DATASCOPE, BLINE) VALUES ('sysadmin', 'BL100004', null, '0');
 INSERT INTO sys_roleright (ROLEID, FUNCCODE, DATASCOPE, BLINE) VALUES ('sysadmin', 'BL100006', null, '0');
 
+-- 监管报表菜单
+delete from sys_funinfo where FUNCCODE in ('M150002','M150003');
+insert into sys_funinfo (FUNCCODE, FUNCNAME, PARENTCODE, ORDERNO, LEAF, URL, LEVELCODE, REMARK, ORGTYPE, TERMINALTYPE) values ('M150002', '第二档银行:G4B-2表外信用风险加权资产计算表(权重法)', 'M150000', 4.000000000000000000000000000000, '1', '/rdp/rdpAnalysis/analTemplate/query/SupplementPlanQuery', 2.000000000000000000000000000000, null, '4tailbranch', 'null');
+insert into sys_funinfo (FUNCCODE, FUNCNAME, PARENTCODE, ORDERNO, LEAF, URL, LEVELCODE, REMARK, ORGTYPE, TERMINALTYPE) values ('M150003', '第二档银行:G4B-2表外信用风险加权资产计算表(权重法)', 'M150000', 6.000000000000000000000000000000, '1', '/rdp/rdpAnalysis/analTemplate/query/SupplementResultQuery', 2.000000000000000000000000000000, null, '4tailbranch', 'null');
 
 

+ 0 - 1
Procedure/backend/project/src/main/java/com/sundata/product/rwa/calc/service/implement/units/GeneralLedgerUnit.java

@@ -120,7 +120,6 @@ public class GeneralLedgerUnit extends CalcUnit {
     public void calc(CalcResult<String, Object> thisResult, String calculateInstanceNumber, Map<String, Object> context, Map<CalcUnit, CalcResult<String, Object>> sourceResults) {
         // 计算过程中,需要循环配置表并将每一个数据进行处理
 
-
         Map<String,Object> newContext = new HashMap<>();
         for (String key: context.keySet()) {
             Object value = context.get(key);

+ 1 - 1
Procedure/backend/project/src/main/java/com/sundata/product/rwa/calc/utils/DateChecker.java

@@ -37,7 +37,7 @@ public class DateChecker {
     }
 
     public static Calendar getShortCalendar(String dateStr) {
-        isSimpleDateFormat(dateStr);
+//        isSimpleDateFormat(dateStr);
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(DateUtil.parse(dateStr,SHORT_DATE_PATTERN));
         return calendar;

+ 28 - 24
Procedure/backend/project/src/main/java/com/sundata/product/rwa/reportformconfigreportcreater/action/ReportFileExportController.java

@@ -4,10 +4,8 @@ import com.sundata.common.annotation.Auth;
 import com.sundata.common.base.BaseAction;
 import com.sundata.common.util.DBExecutor;
 import com.sundata.common.util.FileUtil;
-import com.sundata.common.util.HtmlUtil;
 import com.sundata.product.rwa.reportformconfigreportcreater.model.ReportFileExportModel;
 import com.sundata.product.rwa.util.html.ToHtml;
-import com.sundata.product.rwa.util.html.ToMergeHtml;
 import jakarta.servlet.http.HttpServletResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,23 +36,23 @@ public class ReportFileExportController extends BaseAction {
         String templatePath = DBExecutor.doQuery("select NOUNVALUE from sys_noun where NOUNITEM = 'ATTACHPATH'");
         File reportResultDirPath = new File(templatePath + File.separator + "reportResult" + File.separator + model.getTerm() + File.separator + model.getReportNo() + File.separator + "default");
         Map<String, Object> rsp = new HashMap<>();
-        if (!reportResultDirPath.exists()) {
-            rsp.put("flag", false);
-            HtmlUtil.writeJson(response, rsp);
-            return;
-        }
-        if (reportResultDirPath.listFiles() == null || reportResultDirPath.listFiles().length == 0) {
-            rsp.put("flag", false);
-            HtmlUtil.writeJson(response, rsp);
-            return;
-        }
-        File report = reportResultDirPath.listFiles()[0];
-        if (!report.exists()) {
-            rsp.put("flag", false);
-            HtmlUtil.writeJson(response, rsp);
-            return;
-        }
+        rsp.put("flag", true);
+        File tempFileDir = new File(templatePath + File.separator + "reportuploadconfig" + File.separator + model.getReportNo() + "/" + "default");
         try {
+            if (!reportResultDirPath.exists()) {
+                rsp.put("flag", false);
+            }
+            if (reportResultDirPath.listFiles() == null || reportResultDirPath.listFiles().length == 0) {
+                rsp.put("flag", false);
+            }
+            File report = reportResultDirPath.listFiles()[0];
+            if (!report.exists()) {
+                rsp.put("flag", false);
+            }
+            if (rsp.get("flag").toString().equals("false")) {
+                FileUtil.getContent(report.getName(), response, Files.newInputStream(tempFileDir.listFiles()[0].toPath()));
+                return;
+            }
             FileUtil.getContent(report.getName(), response, Files.newInputStream(report.toPath()));
         } catch (IOException e) {
             log.error("读取文件出现异常,请检查是否存在权限问题:{}", e.getMessage(), e);
@@ -72,27 +70,33 @@ public class ReportFileExportController extends BaseAction {
             String templatePath = DBExecutor.doQuery("select NOUNVALUE from sys_noun where NOUNITEM = 'ATTACHPATH'");
             File reportResultDirPath = new File(templatePath + File.separator + "reportResult" + File.separator + model.getTerm() + File.separator + model.getReportNo() + File.separator + "default");
             Map<String, Object> rsp = new HashMap<>();
+            rsp.put("flag", true);
+            File tempFileDir = new File(templatePath + File.separator + "reportuploadconfig" + File.separator + model.getReportNo() + "/" + "default");
             if (!reportResultDirPath.exists()) {
                 rsp.put("flag", false);
-                HtmlUtil.writeJson(response, rsp);
-                return;
             }
             if (reportResultDirPath.listFiles() == null || reportResultDirPath.listFiles().length == 0) {
                 rsp.put("flag", false);
-                HtmlUtil.writeJson(response, rsp);
-                return;
             }
             File report = reportResultDirPath.listFiles()[0];
             if (!report.exists()) {
                 rsp.put("flag", false);
-                HtmlUtil.writeJson(response, rsp);
             }
             StringWriter writer = new StringWriter();
+            if (rsp.get("flag").toString().equals("false")) {
+                ToHtml toHtml = ToHtml.create(Files.newInputStream(tempFileDir.listFiles()[0].toPath()), writer);
+                toHtml.setCompleteHTML(false);
+                toHtml.printPage();
+                rsp.put("flag", true);
+                rsp.put("htmlString", writer.toString());
+                sendData(response, rsp);
+                return;
+            }
             ToHtml toHtml = ToHtml.create(Files.newInputStream(report.toPath()), writer);
             toHtml.setCompleteHTML(false);
             toHtml.printPage();
             rsp.put("flag", true);
-            rsp.put("htmlString",writer.toString());
+            rsp.put("htmlString", writer.toString());
 //            rsp.put("htmlString", ToMergeHtml.mergeExcelHtml(report));
 
             sendData(response, rsp);

文件差異過大導致無法顯示
+ 9 - 0
ShortCode/001-初始化/李庚谱/补录流程/流程图-250324.cfg


部分文件因文件數量過多而無法顯示