Pre Merge pull request !83 from reset/feature/cl

pull/83/MERGE
reset 3 years ago committed by Gitee
commit 9b57c1213a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -0,0 +1,34 @@
package com.engine.organization.entity.fieldset.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author weaver_cl
* @Description:
* @Date 2022/6/15
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FieldTypeTreeParam {
private Long id;
private Long parentid;
private String name;
private String isShow;
private String groupOrder;
private List<FieldTypeTreeParam> childs;
}

@ -1,6 +1,8 @@
package com.engine.organization.service; package com.engine.organization.service;
import com.engine.organization.entity.extend.param.ExtendTitleSaveParam; import com.engine.organization.entity.extend.param.ExtendTitleSaveParam;
import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam;
import com.engine.organization.entity.fieldset.vo.TypeTreeVO; import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
import com.engine.organization.enums.ModuleTypeEnum; import com.engine.organization.enums.ModuleTypeEnum;
@ -16,6 +18,11 @@ import java.util.Map;
public interface FieldDefinedService { public interface FieldDefinedService {
/**
*
* @param moduleTypeEnum
* @return
*/
List<TypeTreeVO> getTree(ModuleTypeEnum moduleTypeEnum); List<TypeTreeVO> getTree(ModuleTypeEnum moduleTypeEnum);
/** /**
@ -50,4 +57,13 @@ public interface FieldDefinedService {
*/ */
Map<String, Object> saveTitle(ExtendTitleSaveParam param); Map<String, Object> saveTitle(ExtendTitleSaveParam param);
/**
*
* @param moduleTypeEnum
* @param fieldTypeTreeParam
* @return
*/
void addTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam);
} }

@ -8,6 +8,7 @@ import com.engine.organization.entity.extend.bo.ExtendGroupBO;
import com.engine.organization.entity.extend.param.ExtendTitleSaveParam; import com.engine.organization.entity.extend.param.ExtendTitleSaveParam;
import com.engine.organization.entity.extend.po.ExtendGroupPO; import com.engine.organization.entity.extend.po.ExtendGroupPO;
import com.engine.organization.entity.extend.po.ExtendTitlePO; import com.engine.organization.entity.extend.po.ExtendTitlePO;
import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam;
import com.engine.organization.entity.fieldset.vo.TypeTreeVO; import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
import com.engine.organization.enums.ModuleTypeEnum; import com.engine.organization.enums.ModuleTypeEnum;
import com.engine.organization.mapper.extend.ExtendGroupMapper; import com.engine.organization.mapper.extend.ExtendGroupMapper;
@ -30,6 +31,7 @@ import java.util.stream.Collectors;
* @Version V1.0 * @Version V1.0
**/ **/
public class FieldDefinedServiceImpl extends Service implements FieldDefinedService { public class FieldDefinedServiceImpl extends Service implements FieldDefinedService {
private ExtendTitleMapper getExtendTitleMapper() { private ExtendTitleMapper getExtendTitleMapper() {
return MapperProxyFactory.getProxy(ExtendTitleMapper.class); return MapperProxyFactory.getProxy(ExtendTitleMapper.class);
} }
@ -144,4 +146,17 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
datas.put("status", "1"); datas.put("status", "1");
return datas; return datas;
} }
public void addTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
buildExtentGroup(moduleTypeEnum,fieldTypeTreeParam);
}
private void buildExtentGroup(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
}
} }

@ -3,6 +3,7 @@ package com.engine.organization.web;
import com.engine.common.util.ParamUtil; import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil; import com.engine.common.util.ServiceUtil;
import com.engine.organization.entity.extend.param.ExtendTitleSaveParam; import com.engine.organization.entity.extend.param.ExtendTitleSaveParam;
import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam;
import com.engine.organization.enums.ModuleTypeEnum; import com.engine.organization.enums.ModuleTypeEnum;
import com.engine.organization.util.response.ReturnResult; import com.engine.organization.util.response.ReturnResult;
import com.engine.organization.wrapper.FieldDefinedWrapper; import com.engine.organization.wrapper.FieldDefinedWrapper;
@ -32,7 +33,7 @@ public class FieldDefinedController {
@GET @GET
@Path("/{moduleTypeEnum}/getTree") @Path("/{moduleTypeEnum}/getTree")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public ReturnResult getHasRight(@Context HttpServletRequest request, @Context HttpServletResponse response, public ReturnResult getTree(@Context HttpServletRequest request, @Context HttpServletResponse response,
@PathParam("moduleTypeEnum") ModuleTypeEnum moduleTypeEnum) { @PathParam("moduleTypeEnum") ModuleTypeEnum moduleTypeEnum) {
try { try {
User user = HrmUserVarify.getUser(request, response); User user = HrmUserVarify.getUser(request, response);
@ -42,6 +43,45 @@ public class FieldDefinedController {
} }
} }
@POST
@Path("/{moduleTypeEnum}/saveTree")
@Produces(MediaType.APPLICATION_JSON)
public ReturnResult saveTree(@Context HttpServletRequest request, @Context HttpServletResponse response,
@PathParam("moduleTypeEnum") ModuleTypeEnum moduleTypeEnum) {
try {
User user = HrmUserVarify.getUser(request, response);
return getFieldDefinedWrapper(user).getTree(moduleTypeEnum);
} catch (Exception e) {
return ReturnResult.exceptionHandle(e.getMessage());
}
}
@POST
@Path("/{moduleTypeEnum}/addTree")
@Produces(MediaType.APPLICATION_JSON)
public ReturnResult addTree(@Context HttpServletRequest request, @Context HttpServletResponse response,
@PathParam("moduleTypeEnum") ModuleTypeEnum moduleTypeEnum, @RequestBody FieldTypeTreeParam fieldTypeTreeParam) {
try {
User user = HrmUserVarify.getUser(request, response);
return getFieldDefinedWrapper(user).addTree(moduleTypeEnum,fieldTypeTreeParam);
} catch (Exception e) {
return ReturnResult.exceptionHandle(e.getMessage());
}
}
@POST
@Path("/{moduleTypeEnum}/editTree")
@Produces(MediaType.APPLICATION_JSON)
public ReturnResult editTree(@Context HttpServletRequest request, @Context HttpServletResponse response,
@PathParam("moduleTypeEnum") ModuleTypeEnum moduleTypeEnum,@RequestBody FieldTypeTreeParam fieldTypeTreeParam) {
try {
User user = HrmUserVarify.getUser(request, response);
return getFieldDefinedWrapper(user).getTree(moduleTypeEnum);
} catch (Exception e) {
return ReturnResult.exceptionHandle(e.getMessage());
}
}
@GET @GET
@Path("/getTabInfo") @Path("/getTabInfo")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)

@ -3,6 +3,7 @@ package com.engine.organization.wrapper;
import com.engine.common.util.ServiceUtil; import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service; import com.engine.core.impl.Service;
import com.engine.organization.entity.extend.param.ExtendTitleSaveParam; import com.engine.organization.entity.extend.param.ExtendTitleSaveParam;
import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam;
import com.engine.organization.entity.fieldset.vo.TypeTreeVO; import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
import com.engine.organization.enums.ModuleTypeEnum; import com.engine.organization.enums.ModuleTypeEnum;
import com.engine.organization.service.FieldDefinedService; import com.engine.organization.service.FieldDefinedService;
@ -33,7 +34,6 @@ public class FieldDefinedWrapper extends Service {
/** /**
* *
*
* @param groupType * @param groupType
* @return * @return
*/ */
@ -53,11 +53,16 @@ public class FieldDefinedWrapper extends Service {
/** /**
* *
*
* @param param * @param param
* @return * @return
*/ */
public Map<String, Object> saveTitle(ExtendTitleSaveParam param) { public Map<String, Object> saveTitle(ExtendTitleSaveParam param) {
return getFieldDefinedService(user).saveTitle(param); return getFieldDefinedService(user).saveTitle(param);
} }
public ReturnResult addTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
getFieldDefinedService(user).addTree(moduleTypeEnum,fieldTypeTreeParam);
return ReturnResult.successed();
}
} }

Loading…
Cancel
Save