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