Commit 29fad707 by 翁国栋

一、审批流程内的表单设计正文编辑框添加office编辑框(可以插入图片、表格功能。

五、新建审批的流程基础内的“谁可以发起这个审批-部分-部门添加”功能无法使用。(已注释)
parent f2b3025b
......@@ -5,11 +5,9 @@ import java.util.Date;
import java.util.List;
import java.util.stream.Stream;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.*;
import cn.timer.api.bean.yggl.YgglMainEmp;
import com.alibaba.druid.sql.ast.expr.SQLCaseExpr.Item;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -79,6 +77,11 @@ public class ZzglBmgwM extends Model<ZzglBmgwM> {
@ApiModelProperty(value = "创建时间 ", example = "2019-10-01")
private Date createTime;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "员工列表")
private List<YgglMainEmp> userList;
// 遍历,获取旗下所有子部门和岗位id
public static void getupDepts(ArrayList<Integer> list, Integer objId, List<ZzglBmgwM> objs) {
if (objId != null) {
......
......@@ -316,11 +316,11 @@ public class HtzzController {
try {
zipUrl = oss.createZip(url);
return ResultUtil.data(zipUrl);
} catch (Exception e) {
} catch (IOException e) {
e.printStackTrace();
}
return ResultUtil.error("操作失败");
}
}
@GetMapping(value = "/exportContract")
public void exportContract(@CurrentUser UserBean userBean, @RequestParam("url") String url, HttpServletRequest request, HttpServletResponse resp) {
......
......@@ -167,4 +167,13 @@ public class OSSController {
// return ResultUtil.success("删除成功");
// }
@PostMapping(value = "/uploadOss")
@ApiOperation(value = "上传普通文件", httpMethod = "POST", notes = "接口发布说明")
@ResponseBody
public Result<String> uploadOss(@CurrentUser UserBean userBean, @RequestParam(required = false) String moudle, @Param("file") MultipartFile file) throws Exception {
Result<String> data = ossService.upload(userBean.getOrgCode(), moudle, file);
return data;
}
}
......@@ -146,6 +146,19 @@ public class ZzglController {
return ResultUtil.data(treeNodes);
}
@GetMapping(value = "/deptlist_ultra")
@ApiOperation(value = "获取部门岗位", httpMethod = "GET", notes = "接口发布说明")
public Result<List<ZzglBmgwM>> deptlist_plusUltra(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list();
zzglBmgwMs.forEach(z->{
if(z.getType()==1){
z.setUserList(new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper).eq(YgglMainEmp::getBmgwId,z.getId()).list());
}
});
return ResultUtil.data(zzglBmgwMs);
}
// 非递归,利用树的层次遍历
// public static int deep2(List<Tree<String>> treeNodes) {
// if(treeNodes == null)
......
......@@ -584,7 +584,7 @@ public class OSSUtil {
* @Description 创建zip
* @Date 2021/12/2 18:06
**/
public String createZip(Map<String, String> urlMap) throws Exception {
public String createZip(Map<String, String> urlMap) throws IOException {
DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String fileName = dateFormat.format(new Date()) + ".zip";
FileOutputStream fos = null;
......@@ -613,12 +613,12 @@ public class OSSUtil {
zos.write(buffer, 0, nNumber);
}
} catch (IOException e) {
throw new Exception("写入失败");//TODO 应作为自定义异常
throw new IOException("写入失败");//TODO 应作为自定义异常
} finally {
try {
inputStream.close();
} catch (IOException e) {
throw new Exception("关闭失败");//TODO 应作为自定义异常
throw new IOException("关闭失败");//TODO 应作为自定义异常
}
}
}
......@@ -636,7 +636,7 @@ public class OSSUtil {
fos.close();
}
} catch (IOException e) {
throw new Exception("关闭失败");//TODO 应作为自定义异常
throw new IOException("关闭失败");//TODO 应作为自定义异常
}
}
return fileName;
......
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