优化:工单管理模块
This commit is contained in:
@@ -10,8 +10,10 @@ import com.gxwebsoft.common.core.web.BatchParam;
|
|||||||
import com.gxwebsoft.common.core.web.PageResult;
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
import com.gxwebsoft.oa.entity.App;
|
import com.gxwebsoft.oa.entity.App;
|
||||||
|
import com.gxwebsoft.oa.entity.AppRenew;
|
||||||
import com.gxwebsoft.oa.entity.AppUser;
|
import com.gxwebsoft.oa.entity.AppUser;
|
||||||
import com.gxwebsoft.oa.param.AppParam;
|
import com.gxwebsoft.oa.param.AppParam;
|
||||||
|
import com.gxwebsoft.oa.service.AppRenewService;
|
||||||
import com.gxwebsoft.oa.service.AppService;
|
import com.gxwebsoft.oa.service.AppService;
|
||||||
import com.gxwebsoft.oa.service.AppUserService;
|
import com.gxwebsoft.oa.service.AppUserService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -38,6 +40,8 @@ public class AppController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private AppUserService appUserService;
|
private AppUserService appUserService;
|
||||||
@Resource
|
@Resource
|
||||||
|
private AppRenewService appRenewService;
|
||||||
|
@Resource
|
||||||
private RedisUtil redisUtil;
|
private RedisUtil redisUtil;
|
||||||
|
|
||||||
@ApiOperation("分页查询应用管理记录表")
|
@ApiOperation("分页查询应用管理记录表")
|
||||||
@@ -55,7 +59,7 @@ public class AppController extends BaseController {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 过滤续费提醒参数
|
// 过滤续费提醒参数
|
||||||
if (param.getAppStatus() != null && param.getAppStatus().equals("续费提醒")) {
|
if (param.getAppStatus() != null && param.getAppStatus().equals("续费中")) {
|
||||||
param.setAppStatus(null);
|
param.setAppStatus(null);
|
||||||
}
|
}
|
||||||
// 使用关联查询
|
// 使用关联查询
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.gxwebsoft.oa.controller;
|
package com.gxwebsoft.oa.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.gxwebsoft.common.core.web.*;
|
import com.gxwebsoft.common.core.web.*;
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
import com.gxwebsoft.oa.entity.App;
|
import com.gxwebsoft.oa.entity.App;
|
||||||
@@ -60,13 +61,11 @@ public class AppRenewController extends BaseController {
|
|||||||
}
|
}
|
||||||
if (appRenewService.save(appRenew)) {
|
if (appRenewService.save(appRenew)) {
|
||||||
// 更新到期时间
|
// 更新到期时间
|
||||||
if (appRenew.getStatus().equals(0)) {
|
|
||||||
App app = appService.getById(appRenew.getAppId());
|
App app = appService.getById(appRenew.getAppId());
|
||||||
app.setExpirationTime(appRenew.getEndTime());
|
app.setExpirationTime(appRenew.getEndTime());
|
||||||
app.setRenewMoney(appRenew.getMoney());
|
app.setRenewMoney(appRenew.getMoney());
|
||||||
app.setShowExpiration(true);
|
app.setShowExpiration(true);
|
||||||
appService.updateById(app);
|
appService.updateById(app);
|
||||||
}
|
|
||||||
return success("添加成功");
|
return success("添加成功");
|
||||||
}
|
}
|
||||||
return fail("添加失败");
|
return fail("添加失败");
|
||||||
@@ -85,6 +84,14 @@ public class AppRenewController extends BaseController {
|
|||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
if (appRenewService.removeById(id)) {
|
if (appRenewService.removeById(id)) {
|
||||||
|
// 没有续费单则不显示在续费提醒列表
|
||||||
|
AppRenew appRenew = appRenewService.getById(id);
|
||||||
|
if (appRenewService.count(new LambdaQueryWrapper<AppRenew>().eq(AppRenew::getAppId,appRenew.getAppId())) == 0) {
|
||||||
|
App app = new App();
|
||||||
|
app.setAppId(appRenew.getAppId());
|
||||||
|
app.setShowExpiration(false);
|
||||||
|
appService.updateById(app);
|
||||||
|
}
|
||||||
return success("删除成功");
|
return success("删除成功");
|
||||||
}
|
}
|
||||||
return fail("删除失败");
|
return fail("删除失败");
|
||||||
|
|||||||
@@ -94,6 +94,9 @@ public class TaskController extends BaseController {
|
|||||||
task.setLastAvatar(loginUser.getAvatar());
|
task.setLastAvatar(loginUser.getAvatar());
|
||||||
task.setLastReadUser(loginUser.getUserId());
|
task.setLastReadUser(loginUser.getUserId());
|
||||||
task.setLastNickname(loginUser.getNickname());
|
task.setLastNickname(loginUser.getNickname());
|
||||||
|
if(task.getName() == null){
|
||||||
|
task.setName(task.getContent());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (taskService.saveByRel(task)) {
|
if (taskService.saveByRel(task)) {
|
||||||
return success("添加成功", task);
|
return success("添加成功", task);
|
||||||
|
|||||||
Reference in New Issue
Block a user