Merge pull request '架构图' (#170) from feature/cl into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/170
This commit is contained in:
commit
94de6f7c85
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.engine.organization.entity.chart;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author liang.cheng
|
||||||
|
* @Date 2023/6/29 11:19 AM
|
||||||
|
* @Description: TODO
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class TimeLinesBO {
|
||||||
|
|
||||||
|
private Integer key;
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
private String color;
|
||||||
|
|
||||||
|
private String time;
|
||||||
|
}
|
||||||
|
|
@ -85,4 +85,12 @@ public interface OrgChartService {
|
||||||
*/
|
*/
|
||||||
void insertChartVersion(Integer fclass,String description);
|
void insertChartVersion(Integer fclass,String description);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:时间轴查询
|
||||||
|
* @Author: liang.cheng
|
||||||
|
* @Date: 2023/6/29 10:36 AM
|
||||||
|
* @param: [request2Map]
|
||||||
|
* @return: java.util.Map<java.lang.String,java.lang.Object>
|
||||||
|
*/
|
||||||
|
Map<String, Object> searchTimeLines(Map<String, Object> request2Map);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.date.DateField;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.engine.core.impl.Service;
|
import com.engine.core.impl.Service;
|
||||||
import com.engine.organization.entity.chart.CompanyTreePO;
|
import com.engine.organization.entity.chart.CompanyTreePO;
|
||||||
|
import com.engine.organization.entity.chart.TimeLinesBO;
|
||||||
import com.engine.organization.entity.map.JclOrgMap;
|
import com.engine.organization.entity.map.JclOrgMap;
|
||||||
import com.engine.organization.entity.scheme.po.GradePO;
|
import com.engine.organization.entity.scheme.po.GradePO;
|
||||||
import com.engine.organization.entity.scheme.po.LevelPO;
|
import com.engine.organization.entity.scheme.po.LevelPO;
|
||||||
|
|
@ -620,6 +621,28 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> searchTimeLines(Map<String, Object> params) {
|
||||||
|
Map<String,Object> datas = new HashMap<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
String fclass = Util.null2String(params.get("fclass"));
|
||||||
|
List<TimeLinesBO> timeLinesBOList = new ArrayList<>();
|
||||||
|
timeLinesBOList.add(TimeLinesBO.builder().key(0).id(0).title("当前版本").color("blue").time("").build());
|
||||||
|
rs.executeQuery("SELECT id,recorddate,description from JCL_ORG_CHARTVERSION where fclass = ? and deletetype = ?",fclass,0);
|
||||||
|
while (rs.next()) {
|
||||||
|
timeLinesBOList.add(TimeLinesBO.builder()
|
||||||
|
.key(rs.getInt("id"))
|
||||||
|
.id(rs.getInt("id"))
|
||||||
|
.title(Util.null2String(rs.getString("description")))
|
||||||
|
.color("grey")
|
||||||
|
.time(Util.null2String(rs.getString("recorddate")))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
datas.put("timelineList",timeLinesBOList);
|
||||||
|
return datas;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新在岗、编制数
|
* 刷新在岗、编制数
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,8 @@ public class OrgChartController {
|
||||||
@GET
|
@GET
|
||||||
@Path("/getCondition")
|
@Path("/getCondition")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String getCondition(@Context HttpServletRequest request, @Context HttpServletResponse
|
public String getCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
response) {
|
Map<String, Object> apidatas = new HashMap<>();
|
||||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
|
||||||
try {
|
try {
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
//实例化Service 并调用业务类处理
|
//实例化Service 并调用业务类处理
|
||||||
|
|
@ -47,7 +46,24 @@ public class OrgChartController {
|
||||||
return JSONObject.toJSONString(apidatas);
|
return JSONObject.toJSONString(apidatas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/timeLines")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String searchTimeLines(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||||
|
Map<String, Object> apidatas = new HashMap<>();
|
||||||
|
try {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
apidatas = getOrgChartWrapper(user).searchTimeLines(ParamUtil.request2Map(request), user);
|
||||||
|
} catch (Exception e) {
|
||||||
|
//异常处理
|
||||||
|
e.printStackTrace();
|
||||||
|
apidatas.put("api_status", false);
|
||||||
|
apidatas.put("api_errormsg", "catch exception : " + e.getMessage());
|
||||||
|
}
|
||||||
|
return JSONObject.toJSONString(apidatas);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/getSubCompanyTree")
|
@Path("/getSubCompanyTree")
|
||||||
|
|
@ -77,7 +93,7 @@ public class OrgChartController {
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String getCompanyData(@Context HttpServletRequest request, @Context HttpServletResponse
|
public String getCompanyData(@Context HttpServletRequest request, @Context HttpServletResponse
|
||||||
response) {
|
response) {
|
||||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
Map<String, Object> apidatas = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
//实例化Service 并调用业务类处理
|
//实例化Service 并调用业务类处理
|
||||||
|
|
|
||||||
|
|
@ -48,4 +48,7 @@ public class OrgChartWrapper extends Service {
|
||||||
return getOrgChartService(user).synchronousData(request2Map, user);
|
return getOrgChartService(user).synchronousData(request2Map, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> searchTimeLines(Map<String, Object> request2Map, User user) {
|
||||||
|
return getOrgChartService(user).searchTimeLines(request2Map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue