164 lines
5.0 KiB
Plaintext
164 lines
5.0 KiB
Plaintext
|
|
package com.sercurityControl.proteam.controller;
|
||
|
|
|
||
|
|
import com.securityControl.common.core.web.controller.BaseController;
|
||
|
|
import com.securityControl.common.core.web.domain.AjaxResult;
|
||
|
|
import com.securityControl.common.core.web.page.TableDataInfo;
|
||
|
|
import com.securityControl.common.log.annotation.Log;
|
||
|
|
import com.securityControl.common.log.enums.BusinessType;
|
||
|
|
import com.securityControl.common.log.enums.OperationType;
|
||
|
|
import com.sercurityControl.proteam.domain.ClassData;
|
||
|
|
import com.sercurityControl.proteam.domain.TeamData;
|
||
|
|
import com.sercurityControl.proteam.domain.TeamEvaData;
|
||
|
|
import com.sercurityControl.proteam.domain.UserCheck;
|
||
|
|
import com.sercurityControl.proteam.dutyTask.service.WorkTeamSchedule;
|
||
|
|
import com.sercurityControl.proteam.service.AllocationService;
|
||
|
|
import com.sercurityControl.proteam.service.TeamService;
|
||
|
|
import io.swagger.annotations.Api;
|
||
|
|
import io.swagger.annotations.ApiOperation;
|
||
|
|
import lombok.extern.slf4j.Slf4j;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
|
||
|
|
import javax.annotation.Resource;
|
||
|
|
import java.util.ArrayList;
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author bonus
|
||
|
|
* @data 2023/4/17 13:21
|
||
|
|
* @description 人员分配
|
||
|
|
*/
|
||
|
|
@Api(tags = "班组信息")
|
||
|
|
@Slf4j
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/pot/allocation")
|
||
|
|
public class AllocationController extends BaseController {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private AllocationService service;
|
||
|
|
/**
|
||
|
|
* 查询人员分配
|
||
|
|
*
|
||
|
|
* @param entity 条件
|
||
|
|
* @return 班组集合
|
||
|
|
*/
|
||
|
|
@ApiOperation(value = "查询人员分配")
|
||
|
|
@PostMapping("/getList")
|
||
|
|
@Log(title = "人员分配", menu = "人员分配", businessType = BusinessType.QUERY, details = "人员分配")
|
||
|
|
public TableDataInfo getTeamList(UserCheck entity) {
|
||
|
|
startPage();
|
||
|
|
try {
|
||
|
|
return getDataTable(service.getList(entity));
|
||
|
|
} catch (Exception e) {
|
||
|
|
return getDataTable(new ArrayList<>());
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 查询今日任务
|
||
|
|
*
|
||
|
|
* @param entity 条件
|
||
|
|
* @return 集合
|
||
|
|
*/
|
||
|
|
@ApiOperation(value = "查询今日任务")
|
||
|
|
@PostMapping("/getClass")
|
||
|
|
@Log(title = "查询今日任务", menu = "查询今日任务", businessType = BusinessType.QUERY, details = "查询今日任务")
|
||
|
|
public TableDataInfo getClass(ClassData entity) {
|
||
|
|
startPage();
|
||
|
|
try {
|
||
|
|
return getDataTable(service.getClass(entity));
|
||
|
|
} catch (Exception e) {
|
||
|
|
return getDataTable(new ArrayList<>());
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 查询今日任务
|
||
|
|
*
|
||
|
|
* @param entity 条件
|
||
|
|
* @return 集合
|
||
|
|
*/
|
||
|
|
@ApiOperation(value = "查询今日任务")
|
||
|
|
@PostMapping("/getClassData")
|
||
|
|
@Log(title = "查询今日任务", menu = "查询今日任务", businessType = BusinessType.QUERY, details = "查询今日任务")
|
||
|
|
public TableDataInfo getClassData(ClassData entity) {
|
||
|
|
startPage();
|
||
|
|
try {
|
||
|
|
return getDataTable(service.getClassData(entity));
|
||
|
|
} catch (Exception e) {
|
||
|
|
return getDataTable(new ArrayList<>());
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 移除任务
|
||
|
|
*
|
||
|
|
* @param entity 条件
|
||
|
|
* @return 条数
|
||
|
|
*/
|
||
|
|
@ApiOperation(value = "移除任务")
|
||
|
|
@PostMapping("/delData")
|
||
|
|
@Log(title = "移除任务", menu = "移除任务", businessType = BusinessType.UPDATE, details = "移除任务", grade = OperationType.UPDATE_BUSINESS)
|
||
|
|
public AjaxResult deleteTeamBlack(UserCheck entity) {
|
||
|
|
return service.delData(entity);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 移除任务
|
||
|
|
*
|
||
|
|
* @param entity 条件
|
||
|
|
* @return 条数
|
||
|
|
*/
|
||
|
|
@ApiOperation(value = "移除全部任务")
|
||
|
|
@PostMapping("/delAll")
|
||
|
|
@Log(title = "移除任务", menu = "移除全部任务", businessType = BusinessType.UPDATE, details = "移除任务", grade = OperationType.UPDATE_BUSINESS)
|
||
|
|
public AjaxResult delAll(UserCheck entity) {
|
||
|
|
return service.delAll(entity);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 添加任务
|
||
|
|
*
|
||
|
|
* @param params 条件
|
||
|
|
* @return 条数
|
||
|
|
*/
|
||
|
|
@ApiOperation(value = "添加任务")
|
||
|
|
@PostMapping("/insertData")
|
||
|
|
@Log(title = "添加任务", menu = "添加任务", businessType = BusinessType.UPDATE, details = "添加任务", grade = OperationType.UPDATE_BUSINESS)
|
||
|
|
public AjaxResult insertData(String params,String userId,String quality) {
|
||
|
|
return service.insertData(params,userId,quality);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 更新用户及专机设置
|
||
|
|
*
|
||
|
|
* @return 条数
|
||
|
|
*/
|
||
|
|
@PostMapping("/updateUserInformation")
|
||
|
|
public AjaxResult updateUserInformation(String userId,String type,String value) {
|
||
|
|
return service.updateUserInformation(userId,type,value);
|
||
|
|
}
|
||
|
|
/**
|
||
|
|
* 更新用户及专机设置
|
||
|
|
*
|
||
|
|
* @return 条数
|
||
|
|
*/
|
||
|
|
@Resource
|
||
|
|
public WorkTeamSchedule schedule;
|
||
|
|
|
||
|
|
@PostMapping("/initRwFp")
|
||
|
|
public AjaxResult initRwFp() {
|
||
|
|
schedule.classMettingZdFp();
|
||
|
|
return AjaxResult.success("刷新成功");
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|