需求优化2
This commit is contained in:
parent
34dd115da1
commit
a1ed3e45c9
|
|
@ -78,4 +78,6 @@ public interface GradeService {
|
|||
*/
|
||||
Map<String, Object> getTabInfo();
|
||||
|
||||
|
||||
String getLevelId(Long id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,15 +161,19 @@ public class GradeServiceImpl extends Service implements GradeService {
|
|||
Map<String, Object> completeParams = levelBrowserBean.getCompleteParams();
|
||||
completeParams.put("currenttime", l);
|
||||
completeParams.put("scheme_id_"+ l,gradePO.getSchemeId());
|
||||
completeParams.put("level_id_"+ l,"''");
|
||||
Map<String, Object> conditionDataParams = levelBrowserBean.getConditionDataParams();
|
||||
conditionDataParams.put("currenttime", l);
|
||||
conditionDataParams.put("scheme_id_"+ l,gradePO.getSchemeId());
|
||||
conditionDataParams.put("level_id_"+ l,"''");
|
||||
Map<String, Object> dataParams = levelBrowserBean.getDataParams();
|
||||
dataParams.put("currenttime", l);
|
||||
dataParams.put("scheme_id_"+ l,gradePO.getSchemeId());
|
||||
dataParams.put("level_id_"+ l,"''");
|
||||
Map<String, Object> destDataParams = levelBrowserBean.getDestDataParams();
|
||||
destDataParams.put("currenttime", l);
|
||||
destDataParams.put("scheme_id_"+ l,gradePO.getSchemeId());
|
||||
destDataParams.put("level_id_"+ l,"''");
|
||||
|
||||
levelBrowserItem.setBrowserConditionParam(levelBrowserBean);
|
||||
|
||||
|
|
@ -212,6 +216,11 @@ public class GradeServiceImpl extends Service implements GradeService {
|
|||
return apiDatas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLevelId(Long id) {
|
||||
return MapperProxyFactory.getProxy(GradeMapper.class).getGradeByID(id).getLevelId();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件
|
||||
*
|
||||
|
|
|
|||
|
|
@ -12,10 +12,7 @@ import weaver.hrm.User;
|
|||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
|
@ -205,4 +202,18 @@ public class GradeController {
|
|||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getLevelId")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getLevelId(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@QueryParam("id")Long id) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getGradeWrapper(user).getLevelId(id));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,4 +144,9 @@ public class GradeWrapper extends OrganizationWrapper {
|
|||
public Map<String, Object> getTabInfo() {
|
||||
return getGradeService(user).getTabInfo();
|
||||
}
|
||||
|
||||
|
||||
public String getLevelId(Long id) {
|
||||
return getGradeService(user).getLevelId(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue