Commit daf92bd9 authored by 郭武斌's avatar 郭武斌

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents 1af9198e e20c8276
package com.yeejoin.amos.boot.module.jcs.api.entity;
import java.util.List;
/**
* @author fengwang
* @date 2021-06-19.
*/
public class OrgMenu{
public Long key;
public String title;
public Long parentId;
public boolean isLeaf;
public List<OrgMenu> children;
public String bizOrgType;
public OrgMenu(Long key, String title, Long parentId, String bizOrgType, boolean isLeaf) {
super();
this.key = key;
this.title = title;
this.parentId = parentId;
this.bizOrgType = bizOrgType;
this.isLeaf = isLeaf;
}
public OrgMenu(Long key, String title, Long parentId, boolean isLeaf, List<OrgMenu> children, String bizOrgType) {
this.key = key;
this.title = title;
this.parentId = parentId;
this.isLeaf = isLeaf;
this.children = children;
this.bizOrgType = bizOrgType;
}
public Long getKey() {
return key;
}
public void setKey(Long key) {
this.key = key;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public List<OrgMenu> getChildren() {
return children;
}
public void setChildren(List<OrgMenu> children) {
this.children = children;
}
public String getBizOrgType() {
return bizOrgType;
}
public void setBizOrgType(String bizOrgType) {
this.bizOrgType = bizOrgType;
}
}
...@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper; ...@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import org.apache.ibatis.annotations.Param;
/** /**
* 机构/部门/人员表 Mapper 接口 * 机构/部门/人员表 Mapper 接口
...@@ -10,5 +12,10 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr; ...@@ -10,5 +12,10 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
* @date 2021-06-18 * @date 2021-06-18
*/ */
public interface OrgUsrMapper extends BaseMapper<OrgUsr> { public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
/**
* 根据parent_id查上级机构名
* @param biz_org_code
* @return
*/
String selectUpUnitByParam(@Param("biz_org_code")String biz_org_code);
} }
package com.yeejoin.amos.boot.module.jcs.api.service; package com.yeejoin.amos.boot.module.jcs.api.service;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgMenu;
/** /**
* 机构/部门/人员表 服务类 * 机构/部门/人员表 服务类
...@@ -12,9 +15,12 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrgMenu; ...@@ -12,9 +15,12 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrgMenu;
* @date 2021-06-18 * @date 2021-06-18
*/ */
public interface IOrgUsrService { public interface IOrgUsrService {
List<OrgMenu> getTree(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, String selectUpUnitByParam(String parent_id);
List<OrgMenuVo> getTree(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
List<OrgMenu> getSub(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuVo> getSub(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
List<Map<String, Object>> returnCompanyPersonMsg(List<Long> ids) throws Exception;
} }
...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.jcs.api.vo; ...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.jcs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -25,14 +24,37 @@ public class OrgDepartmentVo { ...@@ -25,14 +24,37 @@ public class OrgDepartmentVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "部门人员信息") @ApiModelProperty(value = "机构/部门名称")
private OrgUsr OrgUsr; private String bizOrgName;
@ApiModelProperty(value = "机构编码")
private String bizOrgCode;
@ApiModelProperty(value = "amos中公司/部门ID")
private String amosOrgId;
@ApiModelProperty(value = "amos中公司/部门编码")
private String amosOrgCode;
@ApiModelProperty(value = "机构类型`")
private String bizOrgType;
@ApiModelProperty(value = "所属建筑名称")
private String buildName;
@ApiModelProperty(value = "所属建筑ID")
private String buildId;
@ApiModelProperty(value = "归属机构/部门/人员")
private String parentId;
@ApiModelProperty(value = "动态表单值") @ApiModelProperty(value = "动态表单值")
private List<AlertFormValue> alertFormValue; private List<AlertFormValue> alertFormValue;
public OrgDepartmentVo(OrgUsr orgUsr, List<AlertFormValue> alertFormValue) { public OrgDepartmentVo(String bizOrgName, String parentId, String buildName, List<AlertFormValue> alertFormValue) {
OrgUsr = orgUsr; this.bizOrgName = bizOrgName;
this.parentId = parentId;
this.buildName = buildName;
this.alertFormValue = alertFormValue; this.alertFormValue = alertFormValue;
} }
} }
package com.yeejoin.amos.boot.module.jcs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
/**
* @author fengwang
* @date 2021-06-19.
*/
@Data
@Accessors(chain = true)
@ApiModel(value="OrgMenuVo", description="树菜单")
public class OrgMenuVo {
public Long key;
public String title;
public Long parentId;
public boolean isLeaf;
public List<OrgMenuVo> children;
public String bizOrgType;
public OrgMenuVo(Long key, String title, Long parentId, String bizOrgType, boolean isLeaf) {
super();
this.key = key;
this.title = title;
this.parentId = parentId;
this.bizOrgType = bizOrgType;
this.isLeaf = isLeaf;
}
public OrgMenuVo(Long key, String title, Long parentId, boolean isLeaf, List<OrgMenuVo> children, String bizOrgType) {
this.key = key;
this.title = title;
this.parentId = parentId;
this.isLeaf = isLeaf;
this.children = children;
this.bizOrgType = bizOrgType;
}
}
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -23,15 +22,48 @@ public class OrgPersonFormVo { ...@@ -23,15 +22,48 @@ public class OrgPersonFormVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "机构/部门id")
private Long id;
@ApiModelProperty(value = "机构/部门名称")
private String bizOrgName;
@ApiModelProperty(value = "人员基本信息") @ApiModelProperty(value = "机构编码")
private OrgUsr OrgUsr; private String bizOrgCode;
@ApiModelProperty(value = "amos中公司/部门ID")
private String amosOrgId;
@ApiModelProperty(value = "amos中公司/部门编码")
private String amosOrgCode;
@ApiModelProperty(value = "机构类型`")
private String bizOrgType;
@ApiModelProperty(value = "所属建筑名称")
private String buildName;
@ApiModelProperty(value = "所属建筑ID")
private String buildId;
@ApiModelProperty(value = "归属机构/部门/人员")
private String parentId;
@ApiModelProperty(value = "动态表单值") @ApiModelProperty(value = "动态表单值")
private List<FormValue> dynamicFormAlert; private List<FormValue> dynamicFormAlert;
public OrgPersonFormVo(OrgUsr orgUsr, List<FormValue> dynamicFormAlert) { public OrgPersonFormVo(String bizOrgName, String parentId, List<FormValue> dynamicFormAlert) {
OrgUsr = orgUsr; this.bizOrgName = bizOrgName;
this.parentId = parentId;
this.dynamicFormAlert = dynamicFormAlert; this.dynamicFormAlert = dynamicFormAlert;
} }
public OrgPersonFormVo(Long id, String bizOrgName, String parentId, List<FormValue> dynamicFormAlert) {
this.id = id;
this.bizOrgName = bizOrgName;
this.parentId = parentId;
this.dynamicFormAlert = dynamicFormAlert;
}
public OrgPersonFormVo() {
}
} }
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -23,9 +22,16 @@ public class OrgUsrFormVo { ...@@ -23,9 +22,16 @@ public class OrgUsrFormVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "单位id")
private Long id;
@ApiModelProperty(value = "机构/部门人员基本信息") @ApiModelProperty(value = "单位名称")
private OrgUsr OrgUsr; private String currentUnit;
@ApiModelProperty(value = "归属机构/部门")
private String parentId;
private Integer personNum;
@ApiModelProperty(value = "动态表单值") @ApiModelProperty(value = "动态表单值")
private List<FormValue> dynamicFormAlert; private List<FormValue> dynamicFormAlert;
...@@ -33,14 +39,23 @@ public class OrgUsrFormVo { ...@@ -33,14 +39,23 @@ public class OrgUsrFormVo {
@ApiModelProperty(value = "单位人员信息值") @ApiModelProperty(value = "单位人员信息值")
private List<OrgPersonFormVo> children; private List<OrgPersonFormVo> children;
public OrgUsrFormVo(OrgUsr orgUsr, List<FormValue> formValue) { public OrgUsrFormVo(String currentUnit, String parentId, Integer personNum, List<FormValue> dynamicFormAlert, List<OrgPersonFormVo> children) {
OrgUsr = orgUsr; this.currentUnit = currentUnit;
this.dynamicFormAlert = formValue; this.parentId = parentId;
this.personNum = personNum;
this.dynamicFormAlert = dynamicFormAlert;
this.children = children;
} }
public OrgUsrFormVo(OrgUsr orgUsr, List<FormValue> dynamicFormAlert, List<OrgPersonFormVo> children) { public OrgUsrFormVo(Long id, String currentUnit, String parentId, Integer personNum, List<FormValue> dynamicFormAlert, List<OrgPersonFormVo> children) {
this.OrgUsr = orgUsr; this.id = id;
this.currentUnit = currentUnit;
this.parentId = parentId;
this.personNum = personNum;
this.dynamicFormAlert = dynamicFormAlert; this.dynamicFormAlert = dynamicFormAlert;
this.children = children; this.children = children;
} }
public OrgUsrFormVo() {
}
} }
...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.jcs.api.vo; ...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.jcs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -11,27 +10,55 @@ import lombok.experimental.Accessors; ...@@ -11,27 +10,55 @@ import lombok.experimental.Accessors;
import java.util.List; import java.util.List;
/** /**
* 机构/部门/人员表 * 机构/部门/人员表
* *
* @author tb * @author tb
* @date 2021-06-18 * @date 2021-06-18
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@TableName("cb_org_usr") @TableName("cb_org_usr")
@ApiModel(value="OrgUsrVo", description="单位信息") @ApiModel(value = "OrgUsrVo", description = "单位信息")
public class OrgUsrVo{ public class OrgUsrVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "单位基本信息") @ApiModelProperty(value = "机构/部门名称")
private OrgUsr OrgUsr; private String bizOrgName;
@ApiModelProperty(value = "机构编码")
private String bizOrgCode;
@ApiModelProperty(value = "amos中公司/部门ID")
private String amosOrgId;
@ApiModelProperty(value = "amos中公司/部门编码")
private String amosOrgCode;
@ApiModelProperty(value = "机构类型`")
private String bizOrgType;
@ApiModelProperty(value = "所属建筑名称")
private String buildName;
@ApiModelProperty(value = "所属建筑ID")
private String buildId;
@ApiModelProperty(value = "归属机构/部门/人员")
private String parentId;
@ApiModelProperty(value = "单位动态表单值") @ApiModelProperty(value = "单位动态表单值")
private List<AlertFormValue> alertFormValue; private List<AlertFormValue> alertFormValue;
public OrgUsrVo(OrgUsr orgUsr, List<AlertFormValue> alertFormValue) { public OrgUsrVo(String bizOrgName, String bizOrgCode, String amosOrgId, String amosOrgCode, String bizOrgType, String buildName, String buildId, String parentId, List<AlertFormValue> alertFormValue) {
OrgUsr = orgUsr; this.bizOrgName = bizOrgName;
this.bizOrgCode = bizOrgCode;
this.amosOrgId = amosOrgId;
this.amosOrgCode = amosOrgCode;
this.bizOrgType = bizOrgType;
this.buildName = buildName;
this.buildId = buildId;
this.parentId = parentId;
this.alertFormValue = alertFormValue; this.alertFormValue = alertFormValue;
} }
} }
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.OrgUsrMapper">
<select id="selectUpUnitByParam" resultType="java.lang.String">
SELECT
biz_org_name
FROM
`cb_org_usr`
WHERE
1=1
<if test="biz_org_code != null and biz_org_code != ''">
and `sequence_nbr` = ( SELECT parent_id FROM `cb_org_usr` WHERE biz_org_code = #{biz_org_code} limit 1)
</if>
</select>
</mapper>
...@@ -13,6 +13,7 @@ import java.util.Map; ...@@ -13,6 +13,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -33,7 +34,6 @@ import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; ...@@ -33,7 +34,6 @@ import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.utils.ExcelUtils; import com.yeejoin.amos.boot.biz.common.utils.ExcelUtils;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils; import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgMenu;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue; import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentVo; import com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentVo;
...@@ -44,6 +44,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl; ...@@ -44,6 +44,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
/** /**
* @author fengwang * @author fengwang
...@@ -67,7 +68,8 @@ public class OrgDepartmentController { ...@@ -67,7 +68,8 @@ public class OrgDepartmentController {
@RequestMapping(value = "/save", method = RequestMethod.POST) @RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增部门信息", notes = "新增部门信息") @ApiOperation(httpMethod = "POST", value = "新增部门信息", notes = "新增部门信息")
public ResponseModel<Object> saveOrgUsr(HttpServletRequest request, @RequestBody OrgDepartmentVo OrgDepartmentVo) { public ResponseModel<Object> saveOrgUsr(HttpServletRequest request, @RequestBody OrgDepartmentVo OrgDepartmentVo) {
OrgUsr orgUsr = OrgDepartmentVo.getOrgUsr(); OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgDepartmentVo, orgUsr);
// 单位新增情况 // 单位新增情况
iOrgUsrService.save(orgUsr); iOrgUsrService.save(orgUsr);
// 动态表单 // 动态表单
...@@ -106,7 +108,8 @@ public class OrgDepartmentController { ...@@ -106,7 +108,8 @@ public class OrgDepartmentController {
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据") @ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据")
public ResponseModel<Object> updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgDepartmentVo OrgDepartmentVo, @PathVariable Long id) { public ResponseModel<Object> updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgDepartmentVo OrgDepartmentVo, @PathVariable Long id) {
OrgUsr orgUsr = OrgDepartmentVo.getOrgUsr(); OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgDepartmentVo, orgUsr);
// 单位新增情况 // 单位新增情况
iOrgUsrService.save(orgUsr); iOrgUsrService.save(orgUsr);
// 动态表单 // 动态表单
...@@ -132,15 +135,19 @@ public class OrgDepartmentController { ...@@ -132,15 +135,19 @@ public class OrgDepartmentController {
@ApiOperation(httpMethod = "GET", value = "获取部门详情", notes = "获取部门详情") @ApiOperation(httpMethod = "GET", value = "获取部门详情", notes = "获取部门详情")
public ResponseModel<OrgUsrFormVo> selectById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<OrgUsrFormVo> selectById(HttpServletRequest request, @PathVariable Long id) {
QueryWrapper<AlertFormValue> queryWrapper = new QueryWrapper<>(); QueryWrapper<AlertFormValue> queryWrapper = new QueryWrapper<>();
OrgUsr orgUsr = iOrgUsrService.getById(id);
queryWrapper.eq("alert_called_id", id); queryWrapper.eq("alert_called_id", id);
// 动态表单数据 // 动态表单数据
List<AlertFormValue> list = iAlertFromValueService.list(queryWrapper); List<AlertFormValue> list = iAlertFromValueService.list(queryWrapper);
List<FormValue> formValue = new ArrayList<FormValue>(); List<FormValue> formValue = new ArrayList<FormValue>();
for (AlertFormValue alertFormValue : list) { for (AlertFormValue alertFormValue : list) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(),alertFormValue.isBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(), alertFormValue.isBlock());
formValue.add(value); formValue.add(value);
} }
return ResponseHelper.buildResponse( new OrgUsrFormVo(iOrgUsrService.getById(id), formValue)); OrgUsrFormVo orgUsrFormVo = new OrgUsrFormVo();
BeanUtils.copyProperties(orgUsr,orgUsrFormVo);
orgUsrFormVo.setDynamicFormAlert(formValue);
return ResponseHelper.buildResponse(orgUsrFormVo);
} }
...@@ -173,12 +180,12 @@ public class OrgDepartmentController { ...@@ -173,12 +180,12 @@ public class OrgDepartmentController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/companyTree", method = RequestMethod.GET) @RequestMapping(value = "/companyTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取部门树", notes = "获取部门树") @ApiOperation(httpMethod = "GET", value = "获取部门树", notes = "获取部门树")
public ResponseModel< List<OrgMenu>> selectCompanyTree() throws Exception { public ResponseModel< List<OrgMenuVo>> selectCompanyTree() throws Exception {
Map<String, Object> columnMap = new HashMap<>(); Map<String, Object> columnMap = new HashMap<>();
columnMap.put("is_delete", CommonConstant.IS_DELETE_00); columnMap.put("is_delete", CommonConstant.IS_DELETE_00);
columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_DEPARTMENT); columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_DEPARTMENT);
Collection<OrgUsr> list = iOrgUsrService.listByMap(columnMap); Collection<OrgUsr> list = iOrgUsrService.listByMap(columnMap);
List<OrgMenu> menus = iOrgUsrService.getTree(null, list, OrgUsr.class.getName(), "getSequenceNbr", 2, "getBizOrgName", "getParentId", "getBizOrgType"); List<OrgMenuVo> menus = iOrgUsrService.getTree(null, list, OrgUsr.class.getName(), "getSequenceNbr", 2, "getBizOrgName", "getParentId", "getBizOrgType");
return ResponseHelper.buildResponse(menus); return ResponseHelper.buildResponse(menus);
} }
...@@ -192,7 +199,6 @@ public class OrgDepartmentController { ...@@ -192,7 +199,6 @@ public class OrgDepartmentController {
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询") @ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public IPage<OrgUsr> listPage(String pageNum, String pageSize, OrgUsr orgUsr) { public IPage<OrgUsr> listPage(String pageNum, String pageSize, OrgUsr orgUsr) {
Page<OrgUsr> pageBean; Page<OrgUsr> pageBean;
QueryWrapper<OrgUsr> orgUsrQueryWrapper = new QueryWrapper<>(); QueryWrapper<OrgUsr> orgUsrQueryWrapper = new QueryWrapper<>();
Class<? extends OrgUsr> aClass = orgUsr.getClass(); Class<? extends OrgUsr> aClass = orgUsr.getClass();
...@@ -259,23 +265,22 @@ public class OrgDepartmentController { ...@@ -259,23 +265,22 @@ public class OrgDepartmentController {
// return CommonResponseUtil.failure("机构类型需为部门"); // return CommonResponseUtil.failure("机构类型需为部门");
// } // }
/** // /**
* 获取部门列表 // * 获取部门列表
* // *
* @param orgCode // * @param orgCode
* @return // * @return
*/ // */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) // @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{orgCode}/users", method = RequestMethod.GET) // @RequestMapping(value = "/{orgCode}/users", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取部门人员列表", notes = "获取部门人员列表") // @ApiOperation(httpMethod = "GET", value = "获取部门人员列表", notes = "获取部门人员列表")
public ResponseModel<Collection<OrgUsr>> selectUsersByOrgCode(HttpServletRequest request,@PathVariable Long orgCode) { // public ResponseModel<Collection<OrgUsr>> selectUsersByOrgCode(HttpServletRequest request,@PathVariable Long orgCode) {
Map<String, Object> columnMap = new HashMap<>(); // Map<String, Object> columnMap = new HashMap<>();
columnMap.put("biz_org_code", orgCode); // columnMap.put("biz_org_code", orgCode);
columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_PERSON); // columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_PERSON);
columnMap.put("is_delete",CommonConstant.IS_DELETE_00); // columnMap.put("is_delete",CommonConstant.IS_DELETE_00);
return ResponseHelper.buildResponse(iOrgUsrService.listByMap(columnMap)); // return ResponseHelper.buildResponse(iOrgUsrService.listByMap(columnMap));
} // }
/** /**
* 导出部门模板 * 导出部门模板
* *
......
...@@ -35,14 +35,17 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils; ...@@ -35,14 +35,17 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue; import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgPersonFormVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgPersonVo; import com.yeejoin.amos.boot.module.jcs.api.vo.OrgPersonVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrDownloadTemplateVO; import com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrDownloadTemplateVO;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrFormVo;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
/** /**
* @author fengwang * @author fengwang
...@@ -97,7 +100,7 @@ public class OrgPersonController { ...@@ -97,7 +100,7 @@ public class OrgPersonController {
/** /**
* 更新单位数据 * 更新人员数据
* *
* @return * @return
*/ */
...@@ -106,7 +109,6 @@ public class OrgPersonController { ...@@ -106,7 +109,6 @@ public class OrgPersonController {
@ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据") @ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据")
public ResponseModel updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgUsr orgUsr, @PathVariable Long id) { public ResponseModel updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgUsr orgUsr, @PathVariable Long id) {
// 修改单位信息 // 修改单位信息
orgUsr.setSequenceNbr(id);
iOrgUsrService.updateById(orgUsr); iOrgUsrService.updateById(orgUsr);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
...@@ -132,7 +134,9 @@ public class OrgPersonController { ...@@ -132,7 +134,9 @@ public class OrgPersonController {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(),alertFormValue.isBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(),alertFormValue.isBlock());
formValue.add(value); formValue.add(value);
} }
OrgUsrFormVo orgUsrFormVo = new OrgUsrFormVo(orgUsr, formValue); OrgPersonFormVo orgUsrFormVo = new OrgPersonFormVo();
BeanUtils.copyProperties(orgUsr,orgUsrFormVo);
orgUsrFormVo.setDynamicFormAlert(formValue);
return ResponseHelper.buildResponse(orgUsrFormVo); return ResponseHelper.buildResponse(orgUsrFormVo);
} }
...@@ -230,7 +234,7 @@ public class OrgPersonController { ...@@ -230,7 +234,7 @@ public class OrgPersonController {
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{orgCode}/users", method = RequestMethod.GET) @RequestMapping(value = "/{orgCode}/users", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据orgCode分页查询", notes = "根据orgCode分页查询") @ApiOperation(httpMethod = "GET", value = "根据orgCode查询", notes = "根据orgCode查询")
public ResponseModel selectUsersByOrgCode(HttpServletRequest request, String pageNum, String pageSize, @PathVariable Long orgCode) { public ResponseModel selectUsersByOrgCode(HttpServletRequest request, String pageNum, String pageSize, @PathVariable Long orgCode) {
Map<String, Object> columnMap = new HashMap<>(); Map<String, Object> columnMap = new HashMap<>();
columnMap.put("is_delete",CommonConstant.IS_DELETE_00); columnMap.put("is_delete",CommonConstant.IS_DELETE_00);
......
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