Commit 5082472e by yuquan.zhu

Merge branch 'develop' of 120.24.24.239:8timerv2/8timerapiv200 into zyq-mvn

parents 2e5f7b81 357b583e
...@@ -32,8 +32,13 @@ public class Swagger2Config { ...@@ -32,8 +32,13 @@ public class Swagger2Config {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Bean @Bean
public ApiInfo apiInfo() { public ApiInfo apiInfo() {
return new ApiInfoBuilder().title("8小时-Api接口文档").description("快速进行Api接口调试").termsOfServiceUrl("127.0.0.1:8080") return new ApiInfoBuilder()
.contact("TangZhaoQian").version("1.0").build(); .title("8小时-Api接口文档")
.description("快速进行Api接口调试")
.termsOfServiceUrl("127.0.0.1:8080")
.contact("TangZhaoQian")
.version("1.0")
.build();
} }
/** /**
......
...@@ -232,8 +232,8 @@ public class DzhtController { ...@@ -232,8 +232,8 @@ public class DzhtController {
list.add(map13); list.add(map13);
return ResultUtil.data(list); return ResultUtil.data(list);
} }
final static String savePath = "E:\\esignHtmb";// 本地服务器文件保存路径 final static String savePath = "esignTemplate";// 本地服务器文件保存路径
final static String APP_ID = ConfigConstant.PROJECT_ID;// 项目id final static String APP_ID = ConfigConstant.PROJECT_ID;// 项目id
final static String APP_SECRET = ConfigConstant.PROJECT_SECRET;// 项目密码 final static String APP_SECRET = ConfigConstant.PROJECT_SECRET;// 项目密码
// final static String RE_TOKEN = "8b58973c290cc848b67ff0017cd424ff"; // final static String RE_TOKEN = "8b58973c290cc848b67ff0017cd424ff";
...@@ -678,10 +678,18 @@ public class DzhtController { ...@@ -678,10 +678,18 @@ public class DzhtController {
} }
@GetMapping("/queryName") @GetMapping("/queryName")
@ApiOperation(value = "查员工名字", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "查版本名字", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> getName(@RequestParam String empNum) { public Result<Object> getName(@RequestParam String empNum) {
return ResultUtil.data(YgglMainEmp.builder().build() String a = System.getProperty("os.name");
.selectOne(new QueryWrapper<YgglMainEmp>().eq("emp_num", empNum)).getName()); String b = System.getProperty("os.arch");
String c = System.getProperty("os.version");
Map<String, String> map = new HashMap<>();
map.put("os.name", a);
map.put("os.arch", b);
map.put("os.version", c);
return ResultUtil.data(map);
// return ResultUtil.data(YgglMainEmp.builder().build()
// .selectOne(new QueryWrapper<YgglMainEmp>().eq("emp_num", empNum)).getName());
} }
/*************************** 设置请求头 ***************************************/ /*************************** 设置请求头 ***************************************/
......
...@@ -192,7 +192,8 @@ public class DzhtController2 { ...@@ -192,7 +192,8 @@ public class DzhtController2 {
@ApiOperation(value = "创建机构模板印章", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "创建机构模板印章", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> orgTemplate(@CurrentUser UserBean userBean, @RequestBody DzhtAssoQyyz qyyz) { public Result<Object> orgTemplate(@CurrentUser UserBean userBean, @RequestBody DzhtAssoQyyz qyyz) {
String orgId = DzhtAssoQyzc.builder().build().selectOne( String orgId = DzhtAssoQyzc.builder().build().selectOne(
new QueryWrapper<DzhtAssoQyzc>().eq("third_party_user_id", qyyz.getThirdPartyUserId()).select("org_id")) // new QueryWrapper<DzhtAssoQyzc>().eq("third_party_user_id", qyyz.getThirdPartyUserId()).select("org_id"))
new QueryWrapper<DzhtAssoQyzc>().eq("org_code", userBean.getOrgCode()).select("org_id"))
.getOrgId();// 查询orgId .getOrgId();// 查询orgId
// String orgId = "dfd84b9a58d345ea90f6711bad853435";// 测试公司账户 // String orgId = "dfd84b9a58d345ea90f6711bad853435";// 测试公司账户
// 印章参数 // 印章参数
......
package cn.timer.api.controller.spmk; package cn.timer.api.controller.spmk;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -21,9 +22,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -21,9 +22,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Console;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import cn.timer.api.bean.spmk.SpmkIcon; import cn.timer.api.bean.spmk.SpmkIcon;
import cn.timer.api.bean.spmk.SpmkJqgz; import cn.timer.api.bean.spmk.SpmkJqgz;
import cn.timer.api.bean.spmk.SpmkLcjd; import cn.timer.api.bean.spmk.SpmkLcjd;
...@@ -33,12 +37,15 @@ import cn.timer.api.bean.spmk.SpmkSpcz; ...@@ -33,12 +37,15 @@ import cn.timer.api.bean.spmk.SpmkSpcz;
import cn.timer.api.bean.spmk.SpmkSpgl; import cn.timer.api.bean.spmk.SpmkSpgl;
import cn.timer.api.bean.spmk.SpmkSpz; import cn.timer.api.bean.spmk.SpmkSpz;
import cn.timer.api.bean.spmk.SpmkSxpz; import cn.timer.api.bean.spmk.SpmkSxpz;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enums.CommonEnum; import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.dao.spmk.SpmkSpglMapper; import cn.timer.api.dao.spmk.SpmkSpglMapper;
import cn.timer.api.dao.spmk.SpmkSpzMapper; import cn.timer.api.dao.spmk.SpmkSpzMapper;
import cn.timer.api.dto.spmk.SpmkMbKjDto; import cn.timer.api.dto.spmk.SpmkMbKjDto;
import cn.timer.api.dto.spmk.Router;
import cn.timer.api.dto.spmk.Spmk;
import cn.timer.api.dto.spmk.SpmkSpglDto; import cn.timer.api.dto.spmk.SpmkSpglDto;
import cn.timer.api.dto.spmk.SpmkSpglMoveDto; import cn.timer.api.dto.spmk.SpmkSpglMoveDto;
import cn.timer.api.dto.spmk.SpmkSpglSortDto; import cn.timer.api.dto.spmk.SpmkSpglSortDto;
...@@ -47,6 +54,7 @@ import cn.timer.api.dto.spmk.SpmkSpzSortDto; ...@@ -47,6 +54,7 @@ import cn.timer.api.dto.spmk.SpmkSpzSortDto;
import cn.timer.api.dto.spmk.SpmkSpzSpglDto; import cn.timer.api.dto.spmk.SpmkSpzSpglDto;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
import cn.timer.api.utils.RouterUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -392,12 +400,104 @@ public class SpmkServiceImpl { ...@@ -392,12 +400,104 @@ public class SpmkServiceImpl {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
IPage<SpmkJqgz> sPage = SpmkJqgz.builder().build().selectPage(p, new QueryWrapper<SpmkJqgz>().eq("org_code",orgCode)); IPage<SpmkJqgz> sPage = SpmkJqgz.builder().build().selectPage(p, new QueryWrapper<SpmkJqgz>().eq("org_code",orgCode));
List<SpmkJqgz> spmkJqgzs = sPage.getRecords(); List<SpmkJqgz> spmkJqgzs = sPage.getRecords();
sPage.getCurrent();
sPage.getPages();
sPage.getTotal();
sPage.getSize();
return ResultUtil.data(sPage, spmkJqgzs, "获取假期规则列表成功"); return ResultUtil.data(sPage, spmkJqgzs, "获取假期规则列表成功");
} }
/**
* 流程节点解析
*/
@PostMapping(value = "/jsonparse")
@ApiOperation(value = "流程节点解析", httpMethod = "POST", notes = "流程节点解析")
@ApiOperationSupport(order = 1)
public Result<Object> jsonToObj(@RequestBody Object jsonObj){
JSONObject obj = JSONUtil.parseObj(jsonObj, false, true);
Router Router = obj.get("router", Router.class);
Console.log("obj:" + obj.toStringPretty());
Console.log("Router:" + Router.toPrettyString());
Console.log("Router:" + Router.toJSONString());
return ResultUtil.success("解析成功!");
}
/**
* 流程节点解析
*/
@PostMapping(value = "/jsonparse_plus")
@ApiOperation(value = "流程节点解析_plus", httpMethod = "POST", notes = "流程节点解析_plus")
@ApiOperationSupport(order = 1)
public Result<Object> jsonToObj2(@RequestBody Router jsonObj){
Console.log("jsonObj:" + jsonObj);
Console.log("jsonObj:" + jsonObj.getChildren());
return ResultUtil.data(jsonObj, "解析成功!");
}
/**
* 流程节点解析
*/
@PostMapping(value = "/jsonparse_plusx")
@ApiOperation(value = "流程节点解析_plus", httpMethod = "POST", notes = "流程节点解析_plus")
@ApiOperationSupport(order = 1)
public Result<Object> jsonToObj3(@RequestBody Object jsonObj){
JSONObject obj = JSONUtil.parseObj(jsonObj, false, true);
obj.put("orgCode", 4);
Console.log("jsonObj:" + obj.get("name"));
Console.log("jsonObj:" + obj.get("id"));
Console.log("jsonObj:" + obj.get("aaa"));
return ResultUtil.data(jsonObj, "解析成功!");
}
/**
* 部门id 查询 员工
*/
@PostMapping(value = "/deptSelectEmp")
@ApiOperation(value = "部门id 查询 员工", httpMethod = "POST", notes = "流程节点解析_plus")
@ApiOperationSupport(order = 1)
public Result<Object> selectEmpBydept(@RequestParam Integer id){
List<YgglMainEmp> ygglMainEmp = RouterUtils.selectOtherlistent(4,id);
return ResultUtil.data(ygglMainEmp, "解析成功!");
}
/**
* 流程节点解析123
*/
@PostMapping(value = "/jsonparse_plus_plus")
@ApiOperation(value = "流程节点解析_plus", httpMethod = "POST", notes = "流程节点解析_plus")
@ApiOperationSupport(order = 1)
public Result<Object> jsonToObj123(@RequestBody Spmk spmk){
List<Router> listRouter = new ArrayList<Router>();
listRouter.add(spmk.getRouter());
return ResultUtil.data(RouterUtils.NextNode(listRouter, spmk.getData()), "解析成功!");
}
} }
package cn.timer.api.dto.spmk;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Condition {
private String key;
private String format;
private String value;
}
package cn.timer.api.dto.spmk;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Relation {
/**
* 类型
*/
private String type;
/**
* 名称
*/
private String name;
/**
* 部门ID
*/
private String departmentId;
/**
* 用户
*/
private List<User> users;
}
package cn.timer.api.dto.spmk;
import java.util.List;
import cn.hutool.json.JSONSupport;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Router extends JSONSupport {
/**
* 节点类型
* 1.creator-发起
* 2.audit-审批
* 3.copy-抄送
* 4.rules-规则
*/
private String className;
/**
* 执行
*/
private String execute;
/**
* 通过
*/
private Boolean flow;
/**
* 关系
*/
private List<Relation> relation;
/**
* 条件
*/
private List<Condition> condition;
/**
* 下一级
*/
private List<Router> children;
}
package cn.timer.api.dto.spmk;
import cn.hutool.json.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Spmk {
private Router router;
private JSONObject data;
}
package cn.timer.api.dto.spmk;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User{
private String name;
private String id;
private String execute;
}
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