瀏覽代碼

修改数据

hongchuangyanfa 2 年之前
父節點
當前提交
fa2277e4a8

+ 32 - 2
blade-service/blade-manager/pom.xml

@@ -11,7 +11,7 @@
 
     <artifactId>blade-manager</artifactId>
     <name>${project.artifactId}</name>
-<version>${bladex.project.version}</version>
+    <version>${bladex.project.version}</version>
     <packaging>jar</packaging>
 
     <repositories>
@@ -151,5 +151,35 @@
             <scope>compile</scope>
         </dependency>
     </dependencies>
-
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <configuration>
+                    <username>${docker.username}</username>
+                    <password>${docker.password}</password>
+                    <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+                    <tag>${project.version}</tag>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+                <source>${java.version}</source>
+                <target>${java.version}</target>
+                <encoding>${project.build.sourceEncoding}</encoding>
+                <compilerArguments>
+                    <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar:${java.home}/lib/jsse.jar</bootclasspath>
+                </compilerArguments>
+            </configuration>
+        </plugin>
+        </plugins>
+    </build>
 </project>

+ 16 - 21
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -687,21 +687,7 @@ public class ExcelTabController extends BladeController {
     }
 
 
-    public static void main11(String[] args) throws Exception {
 
-        String thmlUrl = "/Users/hongchuangyanfa/Desktop/1574226461517152256.html";
-
-        String osUrl = "https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20220926/255f87504cd9f4ba61d888d044d1342c.xlsx";
-        InputStream redio = CommonUtil.getOSSInputStream(osUrl);
-        Workbook wb = new Workbook();
-        wb.loadFromMHtml(redio);
-        //获取工作表
-        Worksheet sheet = wb.getWorksheets().get(0);
-
-        sheet.saveToHtml(thmlUrl);
-
-        // expailHtmlInfo(thmlUrl,1L);
-    }
 
 
 
@@ -976,7 +962,6 @@ public class ExcelTabController extends BladeController {
                             }
                         }
 
-
                         if (inputText != null && inputText != "" && inputText.indexOf("_") >= 0) {
                             inputText = inputText.substring(0, inputText.lastIndexOf("_"));
                         }
@@ -2300,15 +2285,25 @@ public class ExcelTabController extends BladeController {
 
     public R getFirstExcelHtml() throws Exception {
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
-        String sql ="SELECT n.p_key_id,excelId from (SELECT p_key_id,(SELECT id from m_excel_tab x where x.alias like '%1542045893564796930%' and parent_id='1559347745306148865' and is_deleted=0 and x.name =m.full_name) as excelId  from m_wbs_tree_private m where m.project_id = '1578599210897772545' and m.type='2'   ) n where excelId is not null and p_key_id!='1578599433161932807' ";
+        String sql ="SELECT * from m_excel_tab x where x.alias like '%1579401528622919682%' and parent_id in ('1582212216210829314','1582211923960115201')  and is_deleted=0 and file_type=3 ";
         List<Map<String, Object>> dataInof = jdbcTemplate.queryForList(sql);
         System.out.println(dataInof.size());
         for (int i = 0; i < dataInof.size(); i++) {
-            String p_key_id = dataInof.get(i).get("p_key_id") + "";
-            Long excelId = Long.parseLong(dataInof.get(i).get("excelId") + "");
-            System.out.println(p_key_id+"__"+excelId);
-            this.saveLinkeTab(excelId, Long.valueOf(p_key_id));
-           // this.saveLinkeTab(, excelId);
+            String file_url = dataInof.get(i).get("file_url") + "";
+            Long p_key_id = Long.parseLong(dataInof.get(i).get("id") + "");
+            String  html_url = dataInof.get(i).get("html_url")+"";
+
+            ExcelTab detail = excelTabService.getById(p_key_id);
+            // 解析excel
+            Workbook wb = new Workbook();
+            wb.loadFromMHtml(CommonUtil.getOSSInputStream(file_url));
+            //
+            HTMLOptions options = new HTMLOptions();
+            options.setImageEmbedded(true);
+            //获取工作表
+            Worksheet sheet = wb.getWorksheets().get(0);
+            sheet.saveToHtml(html_url, options);
+            this.expailHtmlInfo(html_url,p_key_id);
             System.out.println(i);
         }
 

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

@@ -211,7 +211,7 @@ public class LinkdataInfoController extends BladeController {
 			element1.attr("placeholder",enName).attr("keyName",dataInfo2);
 			element1.attr("weighing","100");
 			element1.attr("v-model","formData."+dataInfo2);
-			element1.attr("@focus","getInformation('"+enName+"',"+linkdataInfo.getTrIndex()+","+linkdataInfo.getTdIndex()+")");
+			element.attr("@click","getInformation('"+enName+"',"+linkdataInfo.getTrIndex()+","+linkdataInfo.getTdIndex()+")");
 			System.out.println(element1);
 		}
 

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

@@ -255,9 +255,16 @@ public class TextdictInfoController extends BladeController {
                 String checkbox = "<hc-form-checkbox-group :objs="+objs+"  @change='checkboxGroupChange' :val=" + vmode + " v-model=" + vmode + " keyname=" + keyname + " weighing=" + weighing + " placeholder=" + placeholder + " trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + "> </hc-form-checkbox-group>";
                 element.empty().append(checkbox);
             }
-        } else if (textdictInfo.getTextId().equals("date")) { // 日期
-            element.empty().append("<el-date-picker v-model=" + vmode + " type='date' format='YYYY年MM月DD日' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
-        } else if (textdictInfo.getTextId().equals("daterange")) { // 时间段
+        } else if (textdictInfo.getTextId().equals("date")) { // 日期--年月日时分秒
+            element.empty().append("<el-date-picker v-model=" + vmode + " type='datetime' format='yyyy年MM月dd日 hh:mm:ss' value-format='yyyy-MM-dd hh:mm:ss' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
+        } else if (textdictInfo.getTextId().equals("dateYMD")) { // 日期--年月日
+            element.empty().append("<el-date-picker v-model=" + vmode + " type='date' format='yyyy年MM月dd日' value-format='yyyy-MM-dd' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
+        } else if (textdictInfo.getTextId().equals("dateHMS")) { // 日期--时分秒
+            element.empty().append("<el-time-picker v-model=" + vmode + " type='date' format='hh:mm:ss' value-format='hh:mm:ss' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
+        } else if (textdictInfo.getTextId().equals("dataSM")) { // 日期--时分
+            element.empty().append("<el-time-picker v-model=" + vmode + " type='date' format='hh:mm' value-format='hh:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
+        }
+        else if (textdictInfo.getTextId().equals("daterange")) { // 时间段
             element.empty().append("<el-date-picker  v-model=" + vmode + " type='datetimerange' placeholder=" + placeholder + "  start-placeholder='开始日期'  end-placeholder='结束日期' format='YYYY年MM月DD日' trIndex=" + trindex + " keyname=" + keyname + " weighing=" + weighing + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">");
             element.children().get(0).attr("@change", "datePickerChange($event,'" + keyname + "')");
         } else if (textdictInfo.getTextId().equals("img")) {

+ 0 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java

@@ -46,7 +46,6 @@ public class FileUtils {
             String downloadName = "附件-" + System.currentTimeMillis() + ".zip";
             response.setHeader("Content-Disposition", "attachment;fileName=" + URLEncoder.encode(downloadName, "UTF-8"));
 
-
             try {
                 zipos = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
                 // 设置压缩方法