Commit 2bc23b98 authored by tangwei's avatar tangwei

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

parents 778f58e1 e0a870b7
......@@ -10,8 +10,15 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -21,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -50,9 +58,13 @@ import io.swagger.annotations.ApiOperation;
@RestController
@Api(tags = "人员Api")
@RequestMapping(value = "/org-person")
public class OrgPersonController {
public class OrgPersonController {
@Autowired
OrgUsrServiceImpl iOrgUsrService;
@Autowired
private RedisUtils redisUtils;
@Value("${auth-key-org-user:org_user_info}")
private String authKey;
/**
* 新增人员信息
......@@ -89,6 +101,7 @@ public class OrgPersonController {
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "更新人员数据", notes = "更新人员数据")
......@@ -165,10 +178,16 @@ public class OrgPersonController {
*
* @return
*/
@PersonIdentify
@TycloudOperation( ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<Object> listPage(@RequestParam Map<String, Object> requestBody) {
// 权限处理
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
PermissionInterceptorContext.setDataAuthRule(authKey);
requestBody.put("bizOrgCode", reginParams.getPersonIdentity().getBizOrgCode());
return ResponseHelper.buildResponse(iOrgUsrService.pagePerson(
requestBody.containsKey("pageNum") ? requestBody.get("pageNum").toString() : null ,
requestBody.containsKey("pageSize") ? requestBody.get("pageSize").toString() : null ,
......
......@@ -5,6 +5,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.yeejoin.equipmanage.mapper.EquipmentManageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
......@@ -67,6 +68,14 @@ public class EquipmentManageController extends AbstractBaseController{
return equipmentManageService.getUtils(orgCode);
}
@GetMapping(value = "/getSystemList")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取系统列表", notes = "获取系统列表")
public List<EquipmentManageVo> getSystemList() {
return equipmentManageService.getSystemList();
}
@GetMapping(value = "/getUsers")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取人员列表", notes = "获取人员列表")
......
......@@ -40,6 +40,8 @@ public interface EquipmentManageService extends IService<EquipmentManageEntity>
*/
Map<String, Object> getUsers();
List<EquipmentManageVo> getSystemList();
Map<String, Object> deleteById(List<EquipmentManageVo> list);
/**
......
......@@ -100,6 +100,11 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
}
@Override
public List<EquipmentManageVo> getSystemList(){
return equipmentManageMapper.getSystemList();
}
@Override
public Map<String, Object> deleteById(List<EquipmentManageVo> list) {
Map<String, Object> result = new HashMap();
String stringresult = "";
......
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