Prechádzať zdrojové kódy

2023 09 05 bug修改

zhuwei 1 rok pred
rodič
commit
df2025f716

+ 2 - 6
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -301,14 +301,10 @@ public class ExcelTabController extends BladeController {
         String filecode = SnowFlakeUtil.getId() + "";
         String thmlUrl = file_path + filecode + ".html";
         String exceUrl = file_path + filecode + "123.xlsx";
-        //ExcelInfoUtils.excelInfo(file.getInputStream(),exceUrl,thmlUrl,"1");
+        ExcelInfoUtils.excelInfo(file.getInputStream(),exceUrl,thmlUrl,"1");
         // 上传excel文件
-        // BladeFile bladeFile = newIOSSClient.uploadFile(file.getOriginalFilename(),exceUrl);
+         BladeFile bladeFile = newIOSSClient.uploadFile(file.getOriginalFilename(),exceUrl);
         // 解析原始excel
-        Workbook wb = new Workbook();
-        wb.loadFromMHtml(file.getInputStream());
-        Worksheet sheet = wb.getWorksheets().get(0);
-        sheet.saveToHtml(thmlUrl);
 
         BladeFile bladeFileR = newIOSSClient.uploadFileByInputStream(file);
         detail.setExtension(file.getOriginalFilename());

+ 1 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java

@@ -416,9 +416,7 @@ public class TextdictInfoController extends BladeController {
 
                 } else if (textdictInfo.getTextId().equals("textarea")) { // 文本域
                     int rowspan = element.attr("ROWSPAN").equals("") ? 0 : Integer.parseInt(element.attr("ROWSPAN"));
-
                     element.empty().append("<el-input  :rows=" + rowspan * 2 + "  id=" + keyname + "  @mouseup.left=" + leftCli + "  @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight'  type='textarea' placeholder=" + placeholder + " v-model=" + vmode + "    keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick(" + parm + ")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'  > </el-input>");
-
                 } else if (textdictInfo.getTextId().equals("select")) { // 下拉框
                     String selectText = " <el-select id=" + keyname + " v-model=" + vmode + " @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight'  @mouseup.right='RightClick(" + parm +")'  keyname=" + keyname + " weighing=" + weighing + " placeholder=" + placeholder + " trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">"; //v-model="+keyname+"
                     List<TextdictInfo_vo> optionList = textdictInfo.getTextInfo();
@@ -454,7 +452,7 @@ public class TextdictInfoController extends BladeController {
                     }
                 } else if (textdictInfo.getTextId().equals("date")) { // 日期--年月日时分秒
                     List<DateFormat> dateFormat = textdictInfo.getDateFormat();
-                    String dataf = "yyyy年MM月dd日";
+                    String dataf = "YYYY年MM月DD日";
                     String dateType = "date";
                     if(dateFormat!=null && dateFormat.size()>=1){
                         Map<String, String> dateForm = ExcelInfoUtils.getDateFormat(dateFormat);

+ 3 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/ExcelInfoUtils.java

@@ -453,7 +453,7 @@ public class ExcelInfoUtils {
                     sp2 =  datef.getValue();
                 }else if(datef.getName().equals("divide_c")){
                     sp3 =  datef.getValue();
-                }else if(datef.getValue().equals("yyyy")||datef.getValue().equals("MM")||datef.getValue().equals("dd")){
+                }else if(datef.getValue().equals("YYYY")||datef.getValue().equals("MM")||datef.getValue().equals("DD")){
                     dateFormaty.add(datef);
                 }else if(datef.getValue().equals("HH")||datef.getValue().equals("mm")||datef.getValue().equals("ss")){
                     dateFormath.add(datef);
@@ -468,7 +468,7 @@ public class ExcelInfoUtils {
             }
             if(!sp1.equals("文本")){
                 format  = format.replace("年",sp1).replace("月",sp1).replace("日"," ");
-                if(format.indexOf("dd")<0){
+                if(format.indexOf("DD")<0){
                     format = format.substring(0,format.length()-1);
                 }
             }
@@ -488,7 +488,7 @@ public class ExcelInfoUtils {
             }
         }
         if(StringUtils.isEmpty(format)){
-            format ="yyyy年MM月dd日";
+            format ="YYYY年MM月DD日";
         }
         if(dateFormaty.size()>=1&&dateFormath.size()>=1){
             redata.put("type","datetime");