Commit 952c1b00 authored by 赵啸非's avatar 赵啸非

添加上传附件限制

parent 7805084f
...@@ -66,3 +66,8 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '房间公告-菜单管理-查 ...@@ -66,3 +66,8 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '房间公告-菜单管理-查
INSERT INTO `mortals_xhx_resource` VALUES (null, '房间公告-菜单管理-维护', '/notice/room/add,/notice/room/edit,/notice/room/delete,/notice/room/logicDelete,/notice/room/save,/notice/room/importData', 3, 0, NULL, NULL, NULL, 0); INSERT INTO `mortals_xhx_resource` VALUES (null, '房间公告-菜单管理-维护', '/notice/room/add,/notice/room/edit,/notice/room/delete,/notice/room/logicDelete,/notice/room/save,/notice/room/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
2023-09-14
-- ----------------------------
ALTER TABLE mortals_xhx_workman ADD COLUMN `fileName` varchar(256) default '' COMMENT '文件名称';
ALTER TABLE mortals_xhx_workman ADD COLUMN `filePath` varchar(256) default '' COMMENT '文件相对路径地址';
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
prePath="/file/preview" prePath="/file/preview"
:fileName="form.photoPath" :fileName="form.photoPath"
/></Field> /></Field>
<Field :span="20" label="党员示范logo" ><fileUpload v-model="form.filePath" :fileName="form.fileName" @getFileName="getFileName" prePath="/file/fileupload"/></Field>
</el-row> </el-row>
...@@ -93,6 +94,9 @@ ...@@ -93,6 +94,9 @@
}, },
methods: { methods: {
getFileName(fileName) {
this.form.fileName = fileName;
},
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset()
......
package com.mortals.xhx.module.workman.model; package com.mortals.xhx.module.workman.model;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonProperty; import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.workman.model.vo.WorkmanVo; import com.mortals.xhx.module.workman.model.vo.WorkmanVo;
import lombok.Data; import lombok.Data;
/** /**
* 工作人员实体对象 * 工作人员实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-25 * @date 2023-09-14
*/ */
@Data @Data
public class WorkmanEntity extends WorkmanVo { public class WorkmanEntity extends WorkmanVo {
...@@ -65,8 +70,17 @@ public class WorkmanEntity extends WorkmanVo { ...@@ -65,8 +70,17 @@ public class WorkmanEntity extends WorkmanVo {
/** /**
* 密码 * 密码
*/ */
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
private String loginPwd; private String loginPwd;
/**
* 文件名称
*/
@Excel(name = "文件名称")
private String fileName;
/**
* 文件相对路径地址
*/
@Excel(name = "文件相对路径地址")
private String filePath;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -84,31 +98,20 @@ public class WorkmanEntity extends WorkmanVo { ...@@ -84,31 +98,20 @@ public class WorkmanEntity extends WorkmanVo {
} }
public void initAttrValue(){ public void initAttrValue(){
this.roomId = null; this.roomId = null;
this.roomName = ""; this.roomName = "";
this.deptName = ""; this.deptName = "";
this.name = ""; this.name = "";
this.sex = 0; this.sex = 0;
this.userPost = ""; this.userPost = "";
this.phone = ""; this.phone = "";
this.mobile = ""; this.mobile = "";
this.summary = ""; this.summary = "";
this.photoPath = ""; this.photoPath = "";
this.workStatus = ""; this.workStatus = "";
this.loginName = ""; this.loginName = "";
this.loginPwd = ""; this.loginPwd = "";
this.fileName = "";
this.filePath = "";
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.workman.model.WorkmanEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.module.workman.model.WorkmanEntity;
* 工作人员查询对象 * 工作人员查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-25 * @date 2023-09-14
*/ */
public class WorkmanQuery extends WorkmanEntity { public class WorkmanQuery extends WorkmanEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -136,6 +136,16 @@ public class WorkmanQuery extends WorkmanEntity { ...@@ -136,6 +136,16 @@ public class WorkmanQuery extends WorkmanEntity {
/** 密码排除列表 */ /** 密码排除列表 */
private List <String> loginPwdNotList; private List <String> loginPwdNotList;
/** 文件名称 */
private List<String> fileNameList;
/** 文件名称排除列表 */
private List <String> fileNameNotList;
/** 文件相对路径地址 */
private List<String> filePathList;
/** 文件相对路径地址排除列表 */
private List <String> filePathNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<WorkmanQuery> orConditionList; private List<WorkmanQuery> orConditionList;
...@@ -884,6 +894,70 @@ public class WorkmanQuery extends WorkmanEntity { ...@@ -884,6 +894,70 @@ public class WorkmanQuery extends WorkmanEntity {
this.loginPwdNotList = loginPwdNotList; this.loginPwdNotList = loginPwdNotList;
} }
/**
* 获取 文件名称
* @return fileNameList
*/
public List<String> getFileNameList(){
return this.fileNameList;
}
/**
* 设置 文件名称
* @param fileNameList
*/
public void setFileNameList(List<String> fileNameList){
this.fileNameList = fileNameList;
}
/**
* 获取 文件名称
* @return fileNameNotList
*/
public List<String> getFileNameNotList(){
return this.fileNameNotList;
}
/**
* 设置 文件名称
* @param fileNameNotList
*/
public void setFileNameNotList(List<String> fileNameNotList){
this.fileNameNotList = fileNameNotList;
}
/**
* 获取 文件相对路径地址
* @return filePathList
*/
public List<String> getFilePathList(){
return this.filePathList;
}
/**
* 设置 文件相对路径地址
* @param filePathList
*/
public void setFilePathList(List<String> filePathList){
this.filePathList = filePathList;
}
/**
* 获取 文件相对路径地址
* @return filePathNotList
*/
public List<String> getFilePathNotList(){
return this.filePathNotList;
}
/**
* 设置 文件相对路径地址
* @param filePathNotList
*/
public void setFilePathNotList(List<String> filePathNotList){
this.filePathNotList = filePathNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -1311,6 +1385,44 @@ public class WorkmanQuery extends WorkmanEntity { ...@@ -1311,6 +1385,44 @@ public class WorkmanQuery extends WorkmanEntity {
return this; return this;
} }
/**
* 设置 文件名称
* @param fileName
*/
public WorkmanQuery fileName(String fileName){
setFileName(fileName);
return this;
}
/**
* 设置 文件名称
* @param fileNameList
*/
public WorkmanQuery fileNameList(List<String> fileNameList){
this.fileNameList = fileNameList;
return this;
}
/**
* 设置 文件相对路径地址
* @param filePath
*/
public WorkmanQuery filePath(String filePath){
setFilePath(filePath);
return this;
}
/**
* 设置 文件相对路径地址
* @param filePathList
*/
public WorkmanQuery filePathList(List<String> filePathList){
this.filePathList = filePathList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment