Authored by qinchao

发布工单

... ... @@ -24,17 +24,19 @@ public class ReleaseCheck {
*/
public BaseResponse check(String workid,HttpSession httpSession) {
BaseResponse rtnResponse=new BaseResponse();
rtnResponse.setCode(201);
rtnResponse.setMessage("用户无工单处理权限");
User user = (User) httpSession.getAttribute("user");
Map<String,String> map = new HashMap<>();
if (!StringUtils.equals("release0",workid)){//查询用户是否有工单处理权限
map.put("id",workid);
map.put("user",user.getName());
BaseResponse baseResponse = httpRestClient.defaultGet(HttpUriContants.CHECK_JOB_BY_OPERATOR,BaseResponse.class,map);
if (baseResponse!=null&&baseResponse.getCode() == 200){
rtnResponse.setCode(200);
rtnResponse.setMessage("");
if (baseResponse==null){
rtnResponse.setCode(201);
rtnResponse.setMessage("工单处理权限检查异常");
}else if(200!=baseResponse.getCode()){
rtnResponse.setCode(baseResponse.getCode());
rtnResponse.setMessage(baseResponse.getMessage());
}
}
return rtnResponse;
... ...