修复请假流程bug,优化代码
This commit is contained in:
parent
51dd2e906e
commit
ed2331433d
|
@ -193,7 +193,7 @@ public class ActivitiController extends BaseController {
|
|||
*/
|
||||
@GetMapping(value = "showAct")
|
||||
@ResponseBody
|
||||
public String showAct(org.springframework.ui.Model model, ProcessDefinition definition,
|
||||
public ReType showAct(org.springframework.ui.Model model, ProcessDefinition definition,
|
||||
String page, String limit) {
|
||||
ProcessDefinitionQuery processDefinitionQuery = repositoryService
|
||||
.createProcessDefinitionQuery();
|
||||
|
@ -212,8 +212,7 @@ public class ActivitiController extends BaseController {
|
|||
List<ProcessDefinition> list = new ArrayList<>();
|
||||
processDefinitionList
|
||||
.forEach(processDefinition -> list.add(new ProcessDefinition(processDefinition)));
|
||||
ReType reType = new ReType(count, list);
|
||||
return JSON.toJSONString(reType);
|
||||
return new ReType(count, list);
|
||||
}
|
||||
|
||||
|
||||
|
@ -227,7 +226,7 @@ public class ActivitiController extends BaseController {
|
|||
*/
|
||||
@GetMapping(value = "showAm")
|
||||
@ResponseBody
|
||||
public String showModel(org.springframework.ui.Model model, ActModel actModel, String page,
|
||||
public ReType showModel(org.springframework.ui.Model model, ActModel actModel, String page,
|
||||
String limit) {
|
||||
ModelQuery modelQuery = repositoryService.createModelQuery();
|
||||
if (actModel != null) {
|
||||
|
@ -243,8 +242,7 @@ public class ActivitiController extends BaseController {
|
|||
long count = repositoryService.createModelQuery().count();
|
||||
List<ActModel> list = new ArrayList<>();
|
||||
models.forEach(mo -> list.add(new ActModel(mo)));
|
||||
ReType reType = new ReType(count, list);
|
||||
return JSON.toJSONString(reType);
|
||||
return new ReType(count, list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -105,7 +105,7 @@ public class UserLeaveController extends BaseController {
|
|||
|
||||
@GetMapping(value = "showLeaveList")
|
||||
@ResponseBody
|
||||
public String showLeaveList(Model model, UserLeave userLeave, String page, String limit) {
|
||||
public ReType showLeaveList(Model model, UserLeave userLeave, String page, String limit) {
|
||||
String userId = CommonUtil.getUser().getId();
|
||||
userLeave.setUserId(userId);
|
||||
List<UserLeave> tList = null;
|
||||
|
@ -124,8 +124,7 @@ public class UserLeaveController extends BaseController {
|
|||
} catch (MyException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
ReType reType = new ReType(tPage.getTotal(), tList);
|
||||
return JSON.toJSONString(reType);
|
||||
return new ReType(tPage.getTotal(), tList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.len.base;
|
||||
|
||||
import com.len.util.ReType;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
|
@ -57,6 +59,6 @@ public interface BaseService<T, E extends Serializable> extends BaseMapper<T, E>
|
|||
|
||||
List<T> selectListByPage(T record);*/
|
||||
|
||||
public String show(T t, int page, int limit);
|
||||
public ReType show(T t, int page, int limit);
|
||||
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ public abstract class BaseServiceImpl<T, E extends Serializable> implements Base
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String show(T t, int page, int limit) {
|
||||
public ReType show(T t, int page, int limit) {
|
||||
List<T> tList = null;
|
||||
Page<T> tPage = PageHelper.startPage(page, limit);
|
||||
try {
|
||||
|
@ -205,7 +205,7 @@ public abstract class BaseServiceImpl<T, E extends Serializable> implements Base
|
|||
e.printStackTrace();
|
||||
}
|
||||
ReType reType = new ReType(tPage.getTotal(), tList);
|
||||
return JSON.toJSONString(reType);
|
||||
return reType;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.len.service.JobService;
|
|||
import com.len.util.BeanUtil;
|
||||
import com.len.util.Checkbox;
|
||||
import com.len.util.JsonUtil;
|
||||
import com.len.util.ReType;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -51,7 +52,7 @@ public class JobController extends BaseController<SysJob> {
|
|||
@GetMapping(value = "showJobList")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("job:show")
|
||||
public String showUser(Model model, SysJob job, String page, String limit) {
|
||||
public ReType showUser(Model model, SysJob job, String page, String limit) {
|
||||
return jobService.show(job, Integer.valueOf(page), Integer.valueOf(limit));
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class LogController extends BaseController {
|
|||
*/
|
||||
@GetMapping(value = "showLogList")
|
||||
@ResponseBody
|
||||
public String showLog(SysLog sysLog, String page, String limit) {
|
||||
public ReType showLog(SysLog sysLog, String page, String limit) {
|
||||
List<SysLog> tList = null;
|
||||
Page<SysLog> tPage = PageHelper.startPage(Integer.valueOf(page), Integer.valueOf(limit));
|
||||
try {
|
||||
|
@ -60,8 +60,7 @@ public class LogController extends BaseController {
|
|||
log.error("class:LogController ->method:showLog->message:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
ReType reType = new ReType(tPage.getTotal(), tList);
|
||||
return JSON.toJSONString(reType);
|
||||
return new ReType(tPage.getTotal(), tList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,6 +14,7 @@ import com.len.service.RoleService;
|
|||
import com.len.service.RoleUserService;
|
||||
import com.len.util.BeanUtil;
|
||||
import com.len.util.JsonUtil;
|
||||
import com.len.util.ReType;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -60,7 +61,7 @@ public class RoleController extends BaseController {
|
|||
@GetMapping(value = "showRoleList")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("role:show")
|
||||
public String showRoleList(SysRole role, Model model, String page, String limit) {
|
||||
public ReType showRoleList(SysRole role, Model model, String page, String limit) {
|
||||
return roleService.show(role, Integer.valueOf(page), Integer.valueOf(limit));
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ public class UserController extends BaseController {
|
|||
@GetMapping(value = "showUserList")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("user:show")
|
||||
public String showUser(Model model, SysUser user, String page, String limit) {
|
||||
public ReType showUser(Model model, SysUser user, String page, String limit) {
|
||||
return userService.show(user, Integer.valueOf(page), Integer.valueOf(limit));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public class SwaggerConfig {
|
|||
.title("Swagger接口列表")
|
||||
.description("接口")
|
||||
.termsOfServiceUrl("http://localhost:8081/swagger-ui.html")
|
||||
.contact(new Contact("zxm", "211.159.219.111", "154040976@qq.com"))
|
||||
.contact(new Contact("zxm", "http://www.lenosp.cn", "154040976@qq.com"))
|
||||
.version("1.1.0")
|
||||
.build();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue