add: 代码更新
This commit is contained in:
@@ -8,8 +8,8 @@ import java.util.Date;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* 公司
|
||||||
*
|
*
|
||||||
* @author ls
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2025-02-26 19:46:19
|
* @date 2025-02-26 19:46:19
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import com.boge.common.utils.R;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
* 工单
|
||||||
* @author ls
|
* @author ls
|
||||||
* @email dengpbs@163.com
|
* @email dengpbs@163.com
|
||||||
* @date 2025-03-05 14:29:12
|
* @date 2025-03-05 14:29:12
|
||||||
@@ -35,7 +35,7 @@ public class TicketsController {
|
|||||||
private TicketsService ticketsService;
|
private TicketsService ticketsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 工单列表
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/list")
|
@RequestMapping("/list")
|
||||||
//@RequiresPermissions("tickets:tickets:list")
|
//@RequiresPermissions("tickets:tickets:list")
|
||||||
@@ -46,6 +46,18 @@ public class TicketsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单列表分为(发起、待办、完成)
|
||||||
|
*/
|
||||||
|
@RequestMapping("/listType")
|
||||||
|
//@RequiresPermissions("tickets:tickets:list")
|
||||||
|
public R listByType(@RequestParam Map<String, Object> params){
|
||||||
|
PageUtils page = ticketsService.queryPageByType(params);
|
||||||
|
|
||||||
|
return R.ok().put("page", page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 信息
|
* 信息
|
||||||
*/
|
*/
|
||||||
@@ -93,4 +105,6 @@ public class TicketsController {
|
|||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import lombok.Getter;
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum TicketsStatusEnums {
|
public enum TicketsStatusEnums {
|
||||||
|
|
||||||
UNCHECK(0, "未开始"),
|
UNCHECK(0, "未开始"),
|
||||||
CHECKED(1, "已指派"),
|
CHECKED(1, "已指派"),
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.boge.modules.tickets.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum TicketsTypeEnums {
|
||||||
|
|
||||||
|
ASSIGN("1", "发起"),
|
||||||
|
TO_BE_DONE("2", "待办"),
|
||||||
|
FINISH("3", "已完成");
|
||||||
|
private String code;
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
public static String getStatus(String code) {
|
||||||
|
for (TicketsTypeEnums value : values()) {
|
||||||
|
if (value.code.equals(code)) {
|
||||||
|
return value.msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,5 +19,7 @@ public interface TicketsService extends IService<TicketsEntity> {
|
|||||||
PageUtils queryPage(Map<String, Object> params);
|
PageUtils queryPage(Map<String, Object> params);
|
||||||
|
|
||||||
TicketsDTO getTicketsById(String ticketsId);
|
TicketsDTO getTicketsById(String ticketsId);
|
||||||
|
|
||||||
|
PageUtils queryPageByType(Map<String, Object> params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import com.boge.modules.sys.service.impl.SysUserServiceImpl;
|
|||||||
import com.boge.modules.tickets.dto.TicketsDTO;
|
import com.boge.modules.tickets.dto.TicketsDTO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.boge.modules.tickets.enums.TicketsTypeEnums;
|
||||||
|
import com.boge.modules.tickets.enums.TicketsStatusEnums;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -65,6 +67,34 @@ public class TicketsServiceImpl extends ServiceImpl<TicketsDao, TicketsEntity> i
|
|||||||
return new PageUtils(page);
|
return new PageUtils(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageUtils queryPageByType(Map<String, Object> params) {
|
||||||
|
SysUserEntity loginUser = ShiroUtils.getUserEntity();
|
||||||
|
QueryWrapper<TicketsEntity> ticketsEntityQueryWrapper = new QueryWrapper<>();
|
||||||
|
if (ObjectUtil.isNotEmpty(loginUser)){
|
||||||
|
//判断是否是超级管理员
|
||||||
|
ticketsEntityQueryWrapper.orderBy(true, false,"create_time");
|
||||||
|
if (TicketsTypeEnums.ASSIGN.getCode().equals(params.get("type"))){
|
||||||
|
ticketsEntityQueryWrapper.eq("create_user", loginUser.getUsername());
|
||||||
|
}
|
||||||
|
if (TicketsTypeEnums.TO_BE_DONE.getCode().equals(params.get("type"))){
|
||||||
|
ticketsEntityQueryWrapper.eq("assign_user_id", loginUser.getUserId()).eq("status",TicketsStatusEnums.CHECKED.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TicketsTypeEnums.FINISH.getCode().equals(params.get("type"))){
|
||||||
|
ticketsEntityQueryWrapper.eq("assign_user_id", loginUser.getUserId()).eq("status",TicketsStatusEnums.CANCEL.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
IPage<TicketsEntity> page = this.page(new Query<TicketsEntity>().getPage(params),
|
||||||
|
ticketsEntityQueryWrapper
|
||||||
|
);
|
||||||
|
|
||||||
|
return new PageUtils(page);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TicketsDTO getTicketsById(String ticketsId) {
|
public TicketsDTO getTicketsById(String ticketsId) {
|
||||||
TicketsDTO tickets = ticketsDao.getTicketsDTOById(ticketsId);
|
TicketsDTO tickets = ticketsDao.getTicketsDTOById(ticketsId);
|
||||||
|
|||||||
20797
base-vue/package-lock.json
generated
20797
base-vue/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -54,9 +54,8 @@
|
|||||||
"babel-plugin-transform-runtime": "6.22.0",
|
"babel-plugin-transform-runtime": "6.22.0",
|
||||||
"babel-preset-env": "1.3.2",
|
"babel-preset-env": "1.3.2",
|
||||||
"babel-preset-stage-2": "6.22.0",
|
"babel-preset-stage-2": "6.22.0",
|
||||||
"babel-register": "6.22.0",
|
"babel-regis额ter": "6.22.0",
|
||||||
"chalk": "2.3.0",
|
"chalk": "2.3.0",
|
||||||
"chromedriver": "^2.27.2",
|
|
||||||
"copy-webpack-plugin": "4.0.1",
|
"copy-webpack-plugin": "4.0.1",
|
||||||
"cross-spawn": "5.0.1",
|
"cross-spawn": "5.0.1",
|
||||||
"css-loader": "0.28.0",
|
"css-loader": "0.28.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user