igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Dept.java
@@ -4,10 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.*; import java.io.Serializable; import java.util.Date; @@ -104,4 +101,34 @@ @Column(name = "zhgxsj") private Date zhgxsj; /** * --------é¸ç°å¾ä¿¡æ¯-------- **/ @Column(name = "FILE_ID_", length = 30) @PropertyDef(label = "é¸ç°å¾id") private String fileId; @Column(name = "FILE_NAME_", length = 50) @PropertyDef(label = "é¸ç°å¾åç§°") private String fileName; /** * --------å®£ä¼ è§é¢ä¿¡æ¯-------- **/ @Column(name = "VIDEO_ID_", length = 30) @PropertyDef(label = "è§é¢éä»¶id") private String videoId; @Column(name = "VIDEO_NAME_", length = 50) @PropertyDef(label = "è§é¢éä»¶åç§°") private String videoName; //å ¨è·¯å¾ @Transient private String imgFilePath; //å ¨è·¯å¾ @Transient private String videoFilePath; } igds-dzhwk-core/src/main/java/com/fzzy/igds/file/FileService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,138 @@ package com.fzzy.igds.file; import com.fzzy.common.utils.Base64Util; import com.fzzy.igds.dzhwk.data.DzhwkConfigData; import com.ruoyi.common.config.FrameworkConfig; import lombok.extern.slf4j.Slf4j; import com.ruoyi.common.utils.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.io.File; import java.util.Date; /** * @Description 仿¿serviceå± * @Author CZT * @Date 2024/11/20 19:03 */ @Slf4j @Service public class FileService { @Resource private DzhwkConfigData configData; /** * è·ååºåºè·¯å¾ä¸æä»¶ * @param companyId * @return */ public String getDeptFilePath(String companyId) { if (StringUtils.isEmpty(companyId)){ companyId = configData.getCompanyId(); } String basePath = configData.getProfile() + "IMG/"+ companyId + "/SECURITY/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } public String getInoutFilePath(Date date) { if (null == date) date = new Date(); String basePath = configData.getProfile() + "INOUT/" + DateFormatUtils.format(date, "yyyyMM") + "/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } public String getSnapFilePath(Date date) { if (null == date) date = new Date(); String basePath = configData.getProfile() + "SNAP/" + DateFormatUtils.format(date, "yyyyMM") + "/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } public String getSnapFilePath(String dateStr) { if (null == dateStr) return null; if (dateStr.length() > 6) dateStr = dateStr.substring(0, 6); String basePath = configData.getProfile() + "SNAP/" + dateStr + "/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } public String getCommonFilePath(Date date) { if (null == date) date = new Date(); String basePath = configData.getProfile() + "COMMON/" + DateFormatUtils.format(date, "yyyyMM") + "/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } public String getSnapPlateFilePath(Date date) { if (null == date) date = new Date(); String basePath = configData.getProfile() + "TEMP/" + DateFormatUtils.format(date, "yyyyMM") + "/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } public String getTempFilePath(String companyId) { String basePath = configData.getProfile() + "TEMP/"; if (StringUtils.isNotEmpty(companyId)) { basePath += companyId + "/"; } File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } public String getConfPath() { String basePath = configData.getProfile() + "CONF/"; File file = new File(basePath); if (!file.exists()) { file.mkdirs(); } return basePath; } public void baseImg2Disk(String basePath, String fileName, String imgData) { Base64Util.generateImage(imgData, basePath + fileName); } } igds-dzhwk-view/pom.xml
@@ -74,7 +74,29 @@ </exclusion> </exclusions> </dependency> <dependency> <groupId>com.bstek.dorado</groupId> <artifactId>dorado-uploader</artifactId> <version>1.0.20</version> <exclusions> <exclusion> <artifactId>slf4j-jcl</artifactId> <groupId>org.slf4j</groupId> </exclusion> <exclusion> <artifactId>slf4j-log4j12</artifactId> <groupId>org.slf4j</groupId> </exclusion> <exclusion> <artifactId>log4j</artifactId> <groupId>log4j</groupId> </exclusion> <exclusion> <artifactId>slf4j-jdk14</artifactId> <groupId>org.slf4j</groupId> </exclusion> </exclusions> </dependency> </dependencies> igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Building.view.xml
@@ -245,59 +245,53 @@ </PropertyDef> </DataType> </Model> <View layout="regionPadding:10"> <View> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="dataProvider">buildingPR#loadData</Property> <Property name="dataType">[dtMain]</Property> </DataSet> <Container layout="regionPadding:10" layoutConstraint="top"> <Property name="exClassName">bg-color</Property> <Property name="height">55</Property> <Property name="contentOverflow">hidden</Property> <Label layoutConstraint="left"> <Property name="text">èåæ ï¼</Property> </Label> <Button layoutConstraint="left"> <ClientEvent name="onClick">view.get("#dsMain").insert();
 view.get("#dialogMain").show();</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="iconClass">fa fa-plus</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick">
 var select = view.get("#dgMain").get("selection");
 <Container> <Property name="exClassName">c-data</Property> <ToolBar> <ToolBarLabel> <Property name="text">èåæ ï¼</Property> <Property name="exClassName">menu-bar-caption</Property> </ToolBarLabel> <ToolBarButton> <ClientEvent name="onClick">view.get("#dsMain").insert();
 view.get("#dialogMain").show();</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="iconClass">fa fa-plus</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 if(select){
 view.get("#dialogMain").show();;
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 } </ClientEvent> <Property name="caption">ç¼è¾</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-pencil</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick"> 
 var select = view.get("#dgMain").get("selection");
 }</ClientEvent> <Property name="caption">ç¼è¾</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-pencil</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 if(select){
 view.get("#ajaxDel").set("parameter",select).execute(function(){
 select.remove();
 });
 select.remove();
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çæ°æ®â¦â¦");
 }
 </ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-trash-o</Property> </Button> </Container> <Container layout="regionPadding:10" layoutConstraint="center"> <Property name="exClassName">bg-color</Property> <DataGrid id="dgMain"> <ClientEvent name="onDataRowDoubleClick">var dialog= view.get("#dialogMain");
 dialog.show();</ClientEvent> }</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-trash-o</Property> </ToolBarButton> </ToolBar> <DataGrid id="dgMain" layoutConstraint="padding:15px 0px 0px 0px"> <ClientEvent name="onDataRowClick">view.get("#dgMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> @@ -345,7 +339,8 @@ </DataColumn> </DataGrid> </Container> <Dialog id="dialogMain"> <Dialog id="dialogMain" layout="regionPadding:10"> <Property name="iconClass">fa fa-pencil-square-o</Property> <Property name="closeable">false</Property> <Property name="caption">仿¿ä¿¡æ¯</Property> <Property name="width">60%</Property> @@ -373,116 +368,122 @@ </Button> </Buttons> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">150</Property> <AutoFormElement> <Property name="name">id</Property> <Property name="property">id</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">deptId</Property> <Property name="property">deptId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">storage</Property> <Property name="property">storage</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">length</Property> <Property name="property">length</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">width</Property> <Property name="property">width</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">height</Property> <Property name="property">height</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">diameter</Property> <Property name="property">diameter</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">volume</Property> <Property name="property">volume</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">doorNum</Property> <Property name="property">doorNum</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ground</Property> <Property name="property">ground</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">wall</Property> <Property name="property">wall</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">roof</Property> <Property name="property">roof</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">roofTruss</Property> <Property name="property">roofTruss</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createDate</Property> <Property name="property">createDate</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">userDate</Property> <Property name="property">userDate</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">lon</Property> <Property name="property">lon</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">lat</Property> <Property name="property">lat</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">deVolume</Property> <Property name="property">deVolume</Property> <Editor/> </AutoFormElement> <Link> <Property name="href">http://api.map.baidu.com/lbsapi/getpoint/</Property> <Property name="target">_blank</Property> <Property name="style"> <Property name="padding-left">150px</Property> </Property> <Property name="text">帮å©ï¼ç¹å»åæ ä½ç½®æ¾å</Property> </Link> </AutoForm> <FieldSet layout="padding:5"> <Property name="caption">åºæ¬ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">120</Property> <AutoFormElement> <Property name="name">id</Property> <Property name="property">id</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">deptId</Property> <Property name="property">deptId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">storage</Property> <Property name="property">storage</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">length</Property> <Property name="property">length</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">width</Property> <Property name="property">width</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">height</Property> <Property name="property">height</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">diameter</Property> <Property name="property">diameter</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">volume</Property> <Property name="property">volume</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">doorNum</Property> <Property name="property">doorNum</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ground</Property> <Property name="property">ground</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">wall</Property> <Property name="property">wall</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">roof</Property> <Property name="property">roof</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">roofTruss</Property> <Property name="property">roofTruss</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createDate</Property> <Property name="property">createDate</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">userDate</Property> <Property name="property">userDate</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">lon</Property> <Property name="property">lon</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">lat</Property> <Property name="property">lat</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">deVolume</Property> <Property name="property">deVolume</Property> <Editor/> </AutoFormElement> <Link> <Property name="href">http://api.map.baidu.com/lbsapi/getpoint/</Property> <Property name="target">_blank</Property> <Property name="style"> <Property name="padding-left">150px</Property> </Property> <Property name="text">帮å©ï¼ç¹å»åæ ä½ç½®æ¾å</Property> </Link> </AutoForm> </Children> </FieldSet> </Children> <Tools/> </Dialog> igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Company.view.xml
@@ -208,52 +208,46 @@ </PropertyDef> </DataType> </Model> <View layout="regionPadding:10"> <View> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="dataProvider">companyPR#getData</Property> <Property name="dataType">[dtMain]</Property> </DataSet> <Container layout="regionPadding:10" layoutConstraint="top"> <Property name="exClassName">bg-color</Property> <Property name="height">55</Property> <Property name="contentOverflow">hidden</Property> <Label layoutConstraint="left"> <Property name="text">èåæ ï¼</Property> </Label> <Button layoutConstraint="left"> <ClientEvent name="onClick">
 var select = view.get("#dgMain").get("selection");
 <Container> <Property name="exClassName">c-data</Property> <ToolBar> <ToolBarLabel> <Property name="text">èåæ ï¼</Property> <Property name="exClassName">menu-bar-caption</Property> </ToolBarLabel> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 if(select){
 view.get("#dialogMain").show();;
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 } </ClientEvent> <Property name="caption">详æ ç¼è¾</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-pencil</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick"> 
 var select = view.get("#dgMain").get("selection");
 $notify("è¯·éæ©éè¦ç¼è¾çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">详æ ç¼è¾</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-pencil</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 if(select){
 view.get("#ajaxDel").set("parameter",select).execute(function(){
 select.remove();
 });
 select.remove();
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çæ°æ®â¦â¦");
 }
 </ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-trash-o</Property> </Button> </Container> <Container layout="regionPadding:10" layoutConstraint="center"> <Property name="exClassName">bg-color</Property> <DataGrid id="dgMain"> <ClientEvent name="onDataRowDoubleClick">var dialog= view.get("#dialogMain");
 dialog.show();</ClientEvent> }
</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-trash-o</Property> </ToolBarButton> </ToolBar> <DataGrid id="dgMain" layoutConstraint="padding:15px 0px 0px 0px"> <ClientEvent name="onDataRowClick">view.get("#dgMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> @@ -301,7 +295,8 @@ </DataColumn> </DataGrid> </Container> <Dialog id="dialogMain"> <Dialog id="dialogMain" layout="regionPadding:10"> <Property name="iconClass">fa fa-pencil-square-o</Property> <Property name="caption">ä»å¨åä½ä¿¡æ¯</Property> <Property name="width">1200</Property> <Property name="closeable">false</Property> @@ -328,7 +323,7 @@ </Button> </Buttons> <Children> <FieldSet layout="padding:15"> <FieldSet layout="padding:5"> <Property name="caption">åºæ¬ä¿¡æ¯</Property> <Buttons/> <Children> @@ -465,10 +460,7 @@ </AutoForm> </Children> </FieldSet> <Control> <Property name="height">10</Property> </Control> <FieldSet layout="padding:15"> <FieldSet layout="padding:5"> <Property name="caption">ä¸çº§åä½ä¿¡æ¯</Property> <Buttons/> <Children> @@ -496,7 +488,7 @@ </AutoForm> </Children> </FieldSet> <FieldSet layout="padding:15"> <FieldSet layout="padding:5"> <Property name="caption">ç»è®¡ä¿¡æ¯</Property> <Buttons/> <Children> igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Dept.view.xml
@@ -133,53 +133,96 @@ <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> </PropertyDef> <PropertyDef name="fileId"> <Property></Property> <Property name="label">é¸ç°å¾id</Property> </PropertyDef> <PropertyDef name="fileName"> <Property></Property> <Property name="label">é¸ç°å¾</Property> </PropertyDef> <PropertyDef name="videoId"> <Property></Property> <Property name="label">è§é¢éä»¶id</Property> </PropertyDef> <PropertyDef name="videoName"> <Property></Property> <Property name="label">ç®ä»è§é¢</Property> </PropertyDef> </DataType> </Model> <View layout="regionPadding:10"> <View> <ClientEvent name="onClick">/**
 * é¢è§è§é¢
 */
 showVideo = function(){
 var cur = view.get("#dsMain.data:#");
 var fileName = cur.get("fileId");
 if(!fileName){
 $alert("没æä¸ä¼ è§é¢ä¿¡æ¯ï¼æ æ³é¢è§ã");
 return;
 }
 var id = cur.get("id");
 
 view.get("#iFrameVideo").set("path", "./dzhwk/dept-video?id=" + id);
 view.get("#dialogVideo").show();
 
 }; /**
 * é¢è§å¾ç
 */
 showImg = function(){
 var cur = view.get("#dsMain.data:#");
 var fileName = cur.get("fileId");
 if(!fileName){
 $alert("没æä¸ä¼ è§é¢ä¿¡æ¯ï¼æ æ³é¢è§ã");
 return;
 }
 var id = cur.get("id");
 
 view.get("#iFrameImg").set("path", "./dzhwk/dept-img?id=" + id);
 view.get("#dialogImg").show();
 
 };</ClientEvent> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="dataProvider">deptPR#getData</Property> <Property name="dataType">[dtMain]</Property> </DataSet> <Container layout="regionPadding:10" layoutConstraint="top"> <Property name="exClassName">bg-color</Property> <Property name="height">55</Property> <Property name="contentOverflow">hidden</Property> <Label layoutConstraint="left"> <Property name="text">èåæ ï¼</Property> </Label> <Button layoutConstraint="left"> <ClientEvent name="onClick">
 var select = view.get("#dgMain").get("selection");
 <Container> <Property name="exClassName">c-data</Property> <ToolBar> <ToolBarLabel> <Property name="text">èåæ ï¼</Property> <Property name="exClassName">menu-bar-caption</Property> </ToolBarLabel> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 if(select){
 view.get("#dialogMain").show();;
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 } </ClientEvent> <Property name="caption">详æ ç¼è¾</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-pencil</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick"> 
 var select = view.get("#dgMain").get("selection");
 $notify("è¯·éæ©éè¦ç¼è¾çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">详æ ç¼è¾</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-pencil</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 if(select){
 view.get("#ajaxDel").set("parameter",select).execute(function(){
 select.remove();
 });
 select.remove();
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-trash-o</Property> </Button> </Container> <Container layout="regionPadding:10" layoutConstraint="center"> <Property name="exClassName">bg-color</Property> <DataGrid id="dgMain"> <ClientEvent name="onDataRowDoubleClick">var dialog= view.get("#dialogMain");
 dialog.show();</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-trash-o</Property> </ToolBarButton> </ToolBar> <DataGrid id="dgMain" layoutConstraint="padding:15px 0px 0px 0px"> <ClientEvent name="onDataRowClick">view.get("#dgMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> @@ -223,7 +266,8 @@ </DataColumn> </DataGrid> </Container> <Dialog id="dialogMain"> <Dialog id="dialogMain" layout="regionPadding:10"> <Property name="iconClass">fa fa-pencil-square-o</Property> <Property name="caption">åºåºä¿¡æ¯</Property> <Property name="width">1200</Property> <Property name="closeable">false</Property> @@ -250,7 +294,7 @@ </Button> </Buttons> <Children> <FieldSet layout="padding:15"> <FieldSet layout="padding:5"> <Property name="caption">åºæ¬ä¿¡æ¯</Property> <Buttons/> <Children> @@ -357,6 +401,114 @@ </AutoForm> </Children> </FieldSet> <FieldSet layout="padding:5"> <Property name="caption">é¸ç°å¾</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator"> : </Property> <Property name="labelWidth">120</Property> <AutoFormElement> <Property name="name">fileName</Property> <Property name="property">fileName</Property> <Property name="readOnly">true</Property> <Property name="editorType">Label</Property> <Editor> <TextEditor> <Property name="blankText"> -- ç³»ç»èªå¨çæ --</Property> </TextEditor> </Editor> </AutoFormElement> <Container> <Button layoutConstraint="left"> <Property name="action">uploadFileImg</Property> <Property name="caption">é¸ç°å¾ä¸ä¼ ...</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-cloud-upload</Property> </Button> <Label layoutConstraint="left"> <Property name="width">10px</Property> </Label> <Button layoutConstraint="left "> <ClientEvent name="onClick">showImg();</ClientEvent> <Property name="caption">é¸ç°å¾é¢è§</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-picture-o</Property> </Button> </Container> </AutoForm> </Children> </FieldSet> <FieldSet layout="padding:5"> <Property name="caption">ç®ä»è§é¢</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator"> : </Property> <Property name="labelWidth">120</Property> <AutoFormElement> <Property name="name">videoName</Property> <Property name="property">videoName</Property> <Property name="readOnly">true</Property> <Property name="editorType">Label</Property> <Editor> <TextEditor> <Property name="blankText"> -- ç³»ç»èªå¨çæ --</Property> </TextEditor> </Editor> </AutoFormElement> <Container> <Button layoutConstraint="left"> <Property name="action">uploadFileVideo</Property> <Property name="caption">è§é¢ä¸ä¼ ...</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-cloud-upload</Property> </Button> <Label layoutConstraint="left"> <Property name="width">10px</Property> </Label> <Button layoutConstraint="left "> <ClientEvent name="onClick">showVideo();</ClientEvent> <Property name="caption">è§é¢é¢è§</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-picture-o</Property> </Button> </Container> </AutoForm> </Children> </FieldSet> </Children> <Tools/> </Dialog> <Dialog id="dialogImg"> <Property name="width">1000</Property> <Property name="height">640</Property> <Property name="iconClass">fa fa-tasks</Property> <Property name="caption">é¸ç°å¾é¢è§</Property> <Buttons/> <Children> <IFrame id="iFrameImg"> <Property name="width">100%</Property> </IFrame> </Children> <Tools/> </Dialog> <Dialog id="dialogVideo"> <Property name="width">1000</Property> <Property name="height">640</Property> <Property name="iconClass">fa fa-tasks</Property> <Property name="caption">è§é¢é¢è§</Property> <Buttons/> <Children> <IFrame id="iFrameVideo"> <Property name="width">100%</Property> </IFrame> </Children> <Tools/> </Dialog> @@ -436,5 +588,23 @@ </DataPilot> </Container> </CustomDropDown> <UploadAction id="uploadFileImg"> <ClientEvent name="onFileUploaded">var fileId = arg.returnValue;
 var data = view.get("#dsMain.data:#");
 data.set("fileId",fileId);
 data.set("fileName",arg.file.name);</ClientEvent> <Property name="fileResolver">fileUploadManage#imgFile</Property> <Property name="maxFileSize">50MB</Property> <Filters/> </UploadAction> <UploadAction id="uploadFileVideo"> <ClientEvent name="onFileUploaded">var videoId = arg.returnValue;
 var data = view.get("#dsMain.data:#");
 data.set("videoId",videoId);
 data.set("videoName",arg.file.name);</ClientEvent> <Property name="fileResolver">fileUploadManage#videoFile</Property> <Property name="maxFileSize">500MB</Property> <Filters/> </UploadAction> </View> </ViewConfig> igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Granary.view.xml
@@ -110,56 +110,57 @@ </PropertyDef> </DataType> </Model> <View layout="regionPadding:10"> <View> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="dataProvider">granaryPR#getGranary</Property> <Property name="dataType">[dtMain]</Property> </DataSet> <Container layout="regionPadding:10" layoutConstraint="top"> <Property name="exClassName">bg-color</Property> <Property name="height">55</Property> <Property name="contentOverflow">hidden</Property> <Label layoutConstraint="left"> <Property name="text">èåæ ï¼</Property> </Label> <Button layoutConstraint="left"> <ClientEvent name="onClick">view.get("#dsMain").insert();
 <Container> <Property name="exClassName">c-data</Property> <ToolBar> <ToolBarLabel> <Property name="text">èåæ ï¼</Property> <Property name="exClassName">menu-bar-caption</Property> </ToolBarLabel> <ToolBarButton> <ClientEvent name="onClick">view.get("#dsMain").insert();
 view.get("#dialogMain").show();</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="iconClass">fa fa-plus</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick">var dialog= view.get("#dialogMain");
 dialog.show();</ClientEvent> <Property name="caption">ç¼è¾</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-pencil</Property> </Button> <Button layoutConstraint="left"> <ClientEvent name="onClick">var cur = view.get("#dsMain.data:#");
 if(!cur) return;
 view.get("#ajaxDel").set("parameter",cur).execute(function(result){
 if(result){
 $alert(result);
 return;
 }else{
 cur.remove();
 }
 });</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-trash-o</Property> </Button> </Container> <Container layout="regionPadding:10" layoutConstraint="center"> <Property name="exClassName">bg-color</Property> <DataGrid id="dgMain"> <ClientEvent name="onDataRowDoubleClick">var dialog= view.get("#dialogMain");
 dialog.show();</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="iconClass">fa fa-plus</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 if(select){
 view.get("#dialogMain").show();;
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">ç¼è¾</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-pencil</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 if(select){
 view.get("#ajaxDel").set("parameter",select).execute(function(){
 select.remove();
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-trash-o</Property> </ToolBarButton> </ToolBar> <DataGrid id="dgMain" layoutConstraint="padding:15px 0px 0px 0px"> <ClientEvent name="onDataRowClick">view.get("#dgMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> <RowSelectorColumn/> <RowNumColumn/> <DataColumn name="ajdh"> <Property name="property">ajdh</Property> @@ -203,7 +204,8 @@ </DataColumn> </DataGrid> </Container> <Dialog id="dialogMain"> <Dialog id="dialogMain" layout="regionPadding:10"> <Property name="iconClass">fa fa-pencil-square-o</Property> <Property name="closeable">false</Property> <Property name="caption">å»é´ä¿¡æ¯</Property> <Property name="width">60%</Property> @@ -231,73 +233,79 @@ </Button> </Buttons> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">150</Property> <AutoFormElement> <Property name="name">ajdh</Property> <Property name="property">ajdh</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">deptId</Property> <Property name="property">deptId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajmc</Property> <Property name="property">ajmc</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cfbh</Property> <Property name="property">cfbh</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajcd</Property> <Property name="property">ajcd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajkd</Property> <Property name="property">ajkd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajgd</Property> <Property name="property">ajgd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajsjcr</Property> <Property name="property">ajsjcr</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajlxdh</Property> <Property name="property">ajlxdh</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajqyrq</Property> <Property name="property">ajqyrq</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajzt</Property> <Property name="property">ajzt</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateTime</Property> <Property name="property">updateTime</Property> <Editor/> </AutoFormElement> </AutoForm> <FieldSet layout="padding:5"> <Property name="caption">åºæ¬ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">150</Property> <AutoFormElement> <Property name="name">ajdh</Property> <Property name="property">ajdh</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">deptId</Property> <Property name="property">deptId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajmc</Property> <Property name="property">ajmc</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cfbh</Property> <Property name="property">cfbh</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajcd</Property> <Property name="property">ajcd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajkd</Property> <Property name="property">ajkd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajgd</Property> <Property name="property">ajgd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajsjcr</Property> <Property name="property">ajsjcr</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajlxdh</Property> <Property name="property">ajlxdh</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajqyrq</Property> <Property name="property">ajqyrq</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ajzt</Property> <Property name="property">ajzt</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateTime</Property> <Property name="property">updateTime</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> </Children> <Tools/> </Dialog> igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/FileUploadManage.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,88 @@ package com.fzzy.igds.sys.pr; import com.bstek.dorado.uploader.UploadFile; import com.bstek.dorado.uploader.annotation.FileResolver; import com.fzzy.igds.file.FileService; import com.fzzy.igds.util.ContextUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.io.File; import java.io.IOException; import java.util.Map; /** * @Description Dorado7 éä»¶ä¸ä¼ å ¬å ±ç®¡çå± * @Author CZT * @Date 2024/12/28 10:05 */ @Slf4j @Component public class FileUploadManage { @Resource private FileService fileService; /** * ä¸ä¼ åºåºç®ä»è§é¢ * fileUploadManage#videoFile * * @param file * @param parameter * @return */ @FileResolver public String videoFile(UploadFile file, Map<String, Object> parameter) { String fileId = null; try { String basePath = fileService.getDeptFilePath(null); fileId = "aerial-" + ContextUtil.subDeptId(null) + file.getFileName().substring( file.getFileName().lastIndexOf(".")); file.transferTo(new File(basePath + fileId)); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return fileId; } /** * ä¸ä¼ åºåºé¸ç°å¾ * fileUploadManage#imgFile * * @param file * @param parameter * @return */ @FileResolver public String imgFile(UploadFile file, Map<String, Object> parameter) { String fileId = null; try { String basePath = fileService.getDeptFilePath(null); fileId = "aerial-" + ContextUtil.subDeptId(null) + file.getFileName().substring( file.getFileName().lastIndexOf(".")); file.transferTo(new File(basePath + fileId)); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return fileId; } } igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/controller/WebController.java
@@ -1,6 +1,9 @@ package com.fzzy.igds.dzhwk.controller; import com.fzzy.igds.dzhwk.data.DzhwkConfigData; import com.fzzy.igds.dzhwk.domain.Dept; import com.fzzy.igds.dzhwk.manager.WebManager; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; @@ -23,6 +26,8 @@ @Resource private DzhwkConfigData dzhwkConfigData; @Resource private WebManager webManager; /** * éå± @@ -262,4 +267,40 @@ return prefix + "sys"; } /** * è§é¢é¢è§é¡µé¢ * * @return */ @RequestMapping("/dept-video") public String deptVideo(@RequestParam(value = "id", required = true) String id, ModelMap view) { if(StringUtils.isNotEmpty(id)){ Dept dept = webManager.getDeptFile(id); view.put("videoPath", dept.getVideoFilePath()); } return prefix + "dept-video"; } /** * é¸ç°å¾é¢è§é¡µé¢ * * @return */ @RequestMapping("/dept-img") public String deptImg(@RequestParam(value = "id", required = true) String id, ModelMap view) { if(StringUtils.isNotEmpty(id)){ Dept dept = webManager.getDeptFile(id);; view.put("imgPath", dept.getImgFilePath()); } return prefix + "dept-img"; } } igds-dzhwk-web/src/main/java/com/fzzy/igds/dzhwk/manager/WebManager.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,62 @@ package com.fzzy.igds.dzhwk.manager; import com.fzzy.igds.dzhwk.data.DzhwkConfigData; import com.fzzy.igds.dzhwk.domain.Dept; import com.fzzy.igds.file.FileService; import com.fzzy.igds.sys.CoreDeptService; import com.ruoyi.common.config.FrameworkConfig; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.io.File; /** * @Description * @Author CZT * @Date 2025/6/3 16:06 */ @Slf4j @Component("WebManager") public class WebManager { @Resource private CoreDeptService coreDeptService; @Resource private FileService fileService; @Resource private DzhwkConfigData dzhwkConfigData; /** * æ ¹æ®åä½IDè·ååä½ä¿¡æ¯ * * @param deptId * @return */ public Dept getDeptFile(String deptId) { if (StringUtils.isEmpty(deptId)) { return null; } Dept dept = coreDeptService.getDataById(deptId); dept.setImgFilePath("æªä¸ä¼ "); if (StringUtils.isNotEmpty(dept.getFileId())) { String imgBathPath = fileService.getDeptFilePath(dept.getCompanyId()) + dept.getFileId(); File imgFile = new File(imgBathPath); if (imgFile.exists()) { imgBathPath = imgBathPath.replace(dzhwkConfigData.getProfile(), "/profile/"); dept.setImgFilePath(imgBathPath); } } dept.setVideoFilePath("æªä¸ä¼ "); if (StringUtils.isNotEmpty(dept.getVideoId())) { String imgBathPath = fileService.getDeptFilePath(dept.getCompanyId()) + dept.getVideoId(); File imgFile = new File(imgBathPath); if (imgFile.exists()) { imgBathPath = imgBathPath.replace(dzhwkConfigData.getProfile(), "/profile/"); dept.setVideoFilePath(imgBathPath); } } return dept; } } igds-dzhwk-web/src/main/resources/templates/dzhwk/dept-img.html
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,50 @@ <!DOCTYPE html> <html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <title>è§é¢é¢è§</title> <link rel="stylesheet" th:href="@{/ajax/libs/layui/css/layui.css}"/> <style type="text/css"> .layui-card-header { font-weight: bold; background-color: #39aef5; color: #FFF; } .layui-card-body { text-align: center; } thead span { font-weight: bold } .video { width: 100%;; height: 100%; } </style> </head> <body> <!-- å¯è¿½è¸ªä¿¡æ¯ --> <div class="layui-tab-content"> <div class="layui-fluid" id="recordFilesDiv"> <div class="layui-col-md12 layui-col-sm12"> <div class="layui-card"> <div class="layui-card-body"> <img th:src="${imgPath}" style="height: 100%;width: 100%"> </div> </div> </div> </div> </div> <script th:src="@{/js/jquery.min.js}"></script> <script th:src="@{/ajax/libs/layui/layui.js}"></script> <script> </script> </body> </html> igds-dzhwk-web/src/main/resources/templates/dzhwk/dept-video.html
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,50 @@ <!DOCTYPE html> <html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <title>è§é¢é¢è§</title> <link rel="stylesheet" th:href="@{/ajax/libs/layui/css/layui.css}"/> <style type="text/css"> .layui-card-header { font-weight: bold; background-color: #39aef5; color: #FFF; } .layui-card-body { text-align: center; } thead span { font-weight: bold } .video { width: 100%;; height: 100%; } </style> </head> <body> <!-- å¯è¿½è¸ªä¿¡æ¯ --> <div class="layui-tab-content"> <div class="layui-fluid" id="recordFilesDiv"> <div class="layui-col-md12 layui-col-sm12"> <div class="layui-card"> <div class="layui-card-body"> <video class='video' th:src="${videoPath}" controls='controls'></video> </div> </div> </div> </div> </div> <script th:src="@{/js/jquery.min.js}"></script> <script th:src="@{/ajax/libs/layui/layui.js}"></script> <script> </script> </body> </html>