人员管理及班组管理 --- jsk
This commit is contained in:
parent
7ae7d19915
commit
13aca12c30
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.controller;
|
||||||
|
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.entity.HumanManageVo;
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.service.HumanService;
|
||||||
|
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.OperationType;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员管理
|
||||||
|
*
|
||||||
|
* @author jsk
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/humanManage")
|
||||||
|
@RestController
|
||||||
|
public class HumanManageController extends BaseController {
|
||||||
|
|
||||||
|
@Resource(name = "HumanService")
|
||||||
|
private HumanService service;
|
||||||
|
|
||||||
|
@ApiOperation(value = "获取人员列表")
|
||||||
|
@PostMapping("getHumanLists")
|
||||||
|
@Log(title = "人员管理", menu = "人员管理->人员管理", grade = OperationType.QUERY_BUSINESS, details = "查询人员", type = "业务日志")
|
||||||
|
public TableDataInfo getHumanLists(HumanManageVo vo) {
|
||||||
|
startPage();
|
||||||
|
List<HumanManageVo> list = new ArrayList<>();
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "新增人员")
|
||||||
|
@PostMapping("addHuman")
|
||||||
|
@Log(title = "人员管理", menu = "人车管理->人员管理", grade = OperationType.ADD_BUSINESS, details = "新增人员", type = "业务日志")
|
||||||
|
public AjaxResult addHuman(HumanManageVo vo) {
|
||||||
|
return service.addHuman(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改人员")
|
||||||
|
@PostMapping("editPro")
|
||||||
|
@Log(title = "人员管理", menu = "人车管理->人员管理", grade = OperationType.UPDATE_BUSINESS, details = "修改人员", type = "业务日志")
|
||||||
|
public AjaxResult editPro(HumanManageVo vo) {
|
||||||
|
return service.updateHuman(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除人员")
|
||||||
|
@PostMapping("delHuman")
|
||||||
|
@Log(title = "人员管理", menu = "人车管理->人员管理", grade = OperationType.DELETE_BUSINESS, details = "删除人员", type = "业务日志")
|
||||||
|
public AjaxResult delPro(@RequestBody HumanManageVo dto) {
|
||||||
|
return service.delHuman(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.controller;
|
||||||
|
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.entity.TeamManageVo;
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.service.TeamService;
|
||||||
|
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.OperationType;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
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 jsk
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/teamManage")
|
||||||
|
@RestController
|
||||||
|
public class TeamManageController extends BaseController {
|
||||||
|
|
||||||
|
@Resource(name = "TeamService")
|
||||||
|
private TeamService service;
|
||||||
|
|
||||||
|
@ApiOperation(value = "获取人员列表")
|
||||||
|
@PostMapping("getTeamLists")
|
||||||
|
@Log(title = "人员管理", menu = "人员管理->人员管理", grade = OperationType.QUERY_BUSINESS, details = "查询人员", type = "业务日志")
|
||||||
|
public TableDataInfo getTeamLists(TeamManageVo vo) {
|
||||||
|
startPage();
|
||||||
|
List<TeamManageVo> list = service.getTeamLists(vo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "新增人员")
|
||||||
|
@PostMapping("addTeam")
|
||||||
|
@Log(title = "人员管理", menu = "人车管理->人员管理", grade = OperationType.ADD_BUSINESS, details = "新增人员", type = "业务日志")
|
||||||
|
public AjaxResult addTeam(TeamManageVo vo) {
|
||||||
|
return service.addTeam(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改人员")
|
||||||
|
@PostMapping("updateTeam")
|
||||||
|
@Log(title = "人员管理", menu = "人车管理->人员管理", grade = OperationType.UPDATE_BUSINESS, details = "修改人员", type = "业务日志")
|
||||||
|
public AjaxResult updateTeam(TeamManageVo vo) {
|
||||||
|
return service.updateTeam(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除人员")
|
||||||
|
@PostMapping("delTeam")
|
||||||
|
@Log(title = "人员管理", menu = "人车管理->人员管理", grade = OperationType.DELETE_BUSINESS, details = "删除人员", type = "业务日志")
|
||||||
|
public AjaxResult delTeam(@RequestBody TeamManageVo dto) {
|
||||||
|
return service.delTeam(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.dao;
|
||||||
|
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.entity.HumanManageVo;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository(value = "HumanManageMapper")
|
||||||
|
public interface HumanManageMapper {
|
||||||
|
List<HumanManageVo> getHumanLists(HumanManageVo vo);
|
||||||
|
int addHuman(HumanManageVo vo);
|
||||||
|
int updateHuman(HumanManageVo vo);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.dao;
|
||||||
|
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.entity.TeamManageVo;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository(value = "TeamManageMapper")
|
||||||
|
public interface TeamManageMapper {
|
||||||
|
List<TeamManageVo> getTeamLists(TeamManageVo vo);
|
||||||
|
int addTeam(TeamManageVo vo);
|
||||||
|
int updateTeam(TeamManageVo vo);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class HumanManageVo {
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
private String id;
|
||||||
|
@ApiModelProperty(value = "工程ID")
|
||||||
|
private String proId;
|
||||||
|
@ApiModelProperty(value = "班组ID")
|
||||||
|
private String teamId;
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private String userName;
|
||||||
|
@ApiModelProperty(value = "身份证编号")
|
||||||
|
private String idNumber;
|
||||||
|
@ApiModelProperty(value = "电话号码")
|
||||||
|
private String phone;
|
||||||
|
@ApiModelProperty(value = "工种")
|
||||||
|
private String userType;
|
||||||
|
@ApiModelProperty(value = "人员状态")
|
||||||
|
private String status;
|
||||||
|
@ApiModelProperty(value = "性别")
|
||||||
|
private String sex;
|
||||||
|
@ApiModelProperty(value = "年龄")
|
||||||
|
private String age;
|
||||||
|
private String delFalge;
|
||||||
|
private String userId;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TeamManageVo {
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
private String id;
|
||||||
|
@ApiModelProperty(value = "工程ID")
|
||||||
|
private String proId;
|
||||||
|
@ApiModelProperty(value = "班组ID")
|
||||||
|
private String teamId;
|
||||||
|
@ApiModelProperty(value = "班组长")
|
||||||
|
private String teamLeader;
|
||||||
|
@ApiModelProperty(value = "身份证编号")
|
||||||
|
private String idNumber;
|
||||||
|
@ApiModelProperty(value = "电话号码")
|
||||||
|
private String teamLeaderPhone;
|
||||||
|
@ApiModelProperty(value = "工种")
|
||||||
|
private String userType;
|
||||||
|
@ApiModelProperty(value = "班组状态")
|
||||||
|
private String status;
|
||||||
|
@ApiModelProperty(value = "性别")
|
||||||
|
private String sex;
|
||||||
|
@ApiModelProperty(value = "年龄")
|
||||||
|
private String age;
|
||||||
|
@ApiModelProperty(value = "班组人数")
|
||||||
|
private String teamNum;
|
||||||
|
@ApiModelProperty(value = "工程编码")
|
||||||
|
private String bidCode;
|
||||||
|
private String delFalge;
|
||||||
|
private String userId;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.service;
|
||||||
|
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.entity.HumanManageVo;
|
||||||
|
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface HumanService {
|
||||||
|
List<HumanManageVo> getHumanLists(HumanManageVo vo);
|
||||||
|
AjaxResult addHuman(HumanManageVo vo);
|
||||||
|
AjaxResult updateHuman(HumanManageVo vo);
|
||||||
|
AjaxResult delHuman(HumanManageVo vo);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.service;
|
||||||
|
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.entity.TeamManageVo;
|
||||||
|
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface TeamService {
|
||||||
|
List<TeamManageVo> getTeamLists(TeamManageVo vo);
|
||||||
|
AjaxResult addTeam(TeamManageVo vo);
|
||||||
|
AjaxResult updateTeam(TeamManageVo vo);
|
||||||
|
AjaxResult delTeam(TeamManageVo vo);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.service.impl;
|
||||||
|
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.dao.HumanManageMapper;
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.entity.HumanManageVo;
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.service.HumanService;
|
||||||
|
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service(value = "HumanService")
|
||||||
|
@Slf4j
|
||||||
|
public class HumanServiceImpl implements HumanService {
|
||||||
|
|
||||||
|
@Resource(name = "HumanManageMapper")
|
||||||
|
private HumanManageMapper mapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HumanManageVo> getHumanLists(HumanManageVo vo) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult addHuman(HumanManageVo vo) {
|
||||||
|
try{
|
||||||
|
mapper.addHuman(vo);
|
||||||
|
}catch (Exception e){
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult updateHuman(HumanManageVo vo) {
|
||||||
|
try{
|
||||||
|
mapper.updateHuman(vo);
|
||||||
|
}catch (Exception e){
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult delHuman(HumanManageVo vo) {
|
||||||
|
try{
|
||||||
|
HumanManageVo delvo=new HumanManageVo();
|
||||||
|
delvo.setUserId(vo.getUserId());
|
||||||
|
delvo.setDelFalge("0");
|
||||||
|
mapper.updateHuman(delvo);
|
||||||
|
}catch (Exception e){
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.securitycontrol.background.humanvehiclemanage.service.impl;
|
||||||
|
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.dao.TeamManageMapper;
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.entity.TeamManageVo;
|
||||||
|
import com.securitycontrol.background.humanvehiclemanage.service.TeamService;
|
||||||
|
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service(value = "TeamService")
|
||||||
|
@Slf4j
|
||||||
|
public class TeamServiceImpl implements TeamService {
|
||||||
|
|
||||||
|
@Resource(name = "TeamManageMapper")
|
||||||
|
private TeamManageMapper mapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TeamManageVo> getTeamLists(TeamManageVo vo) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult addTeam(TeamManageVo vo) {
|
||||||
|
try{
|
||||||
|
mapper.addTeam(vo);
|
||||||
|
}catch (Exception e){
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult updateTeam(TeamManageVo vo) {
|
||||||
|
try{
|
||||||
|
mapper.updateTeam(vo);
|
||||||
|
}catch (Exception e){
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public AjaxResult delTeam(TeamManageVo vo) {
|
||||||
|
try{
|
||||||
|
TeamManageVo delvo=new TeamManageVo();
|
||||||
|
delvo.setUserId(vo.getUserId());
|
||||||
|
delvo.setDelFalge("0");
|
||||||
|
mapper.updateTeam(delvo);
|
||||||
|
}catch (Exception e){
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue