Compare commits
5 Commits
62ebd4b11e
...
4d7332fba1
| Author | SHA1 | Date |
|---|---|---|
|
|
4d7332fba1 | |
|
|
2ab52441aa | |
|
|
ace5b119cf | |
|
|
1bf4daf421 | |
|
|
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, @RequestParam(value = "file[]", required = false) MultipartFile[] files) {
|
||||||
|
return service.addHuman(vo,files);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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,MultipartFile[] files);
|
||||||
|
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,60 @@
|
||||||
|
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 org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
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, MultipartFile[] files) {
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.securitycontrol.background.humanvehiclemanage.dao.HumanManageMapper">
|
||||||
|
<!--新增/修改 工程-->
|
||||||
|
<insert id="addHuman" useGeneratedKeys="true" keyProperty="userId">
|
||||||
|
INSERT INTO t_team_people
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="teamId != null and teamId != ''">team_id,</if>
|
||||||
|
<if test="userName != null and userName != ''">user_name,</if>
|
||||||
|
<if test="idNumber != null and idNumber!=''">id_number,</if>
|
||||||
|
<if test="phone != null and phone!=''">phone,</if>
|
||||||
|
<if test="proCode != null and proCode!=''">user_type,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="teamId != null and teamId != ''">#{teamId},</if>
|
||||||
|
<if test="userName != null and userName != ''">#{userName},</if>
|
||||||
|
<if test="idNumber != null and idNumber!=''">#{idNumber},</if>
|
||||||
|
<if test="phone != null and phone!=''">#{phone},</if>
|
||||||
|
<if test="userType != null and userType!=''">#{userType},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateHuman">
|
||||||
|
UPDATE t_team_people
|
||||||
|
<set>
|
||||||
|
<if test="teamId != null and teamId != ''">team_id = #{teamId},</if>
|
||||||
|
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||||
|
<if test="idNumber != null and idNumber != ''">id_number = #{idNumber},</if>
|
||||||
|
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||||
|
<if test="userType != null and userType != ''">user_type = #{userType},</if>
|
||||||
|
<if test="delFalge != null and delFalge != ''">del_falge = #{delFalge},</if>
|
||||||
|
</set>
|
||||||
|
WHERE user_id= #{userId}
|
||||||
|
</update>
|
||||||
|
<!--获取人员列表-->
|
||||||
|
<select id="getHumanLists" resultType="com.securitycontrol.background.humanvehiclemanage.entity.HumanManageVo">
|
||||||
|
SELECT
|
||||||
|
user_name as userName,
|
||||||
|
id_number as idnumber,
|
||||||
|
phone,
|
||||||
|
user_type as usertype
|
||||||
|
from
|
||||||
|
t_team_people ttp
|
||||||
|
<where>
|
||||||
|
<if test="keyWord !=null and keyWord!=''">
|
||||||
|
AND (
|
||||||
|
INSTR(ttp.user_name,#{keyWord}) > 0 OR
|
||||||
|
INSTR(tp.id_number,#{keyWord}) > 0
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.securitycontrol.background.humanvehiclemanage.dao.TeamManageMapper">
|
||||||
|
<!--新增/修改 工程-->
|
||||||
|
<insert id="addTeam">
|
||||||
|
INSERT INTO tb_work_team
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="teamName != null and teamName != ''">team_name,</if>
|
||||||
|
<if test="teamLeader != null and teamLeader != ''">team_leader,</if>
|
||||||
|
<if test="bidCode != null and bidCode!=''">bid_code,</if>
|
||||||
|
<if test="teamLeaderPhone != null and teamLeaderPhone!=''">team_leader_phone,</if>
|
||||||
|
<if test="idNumber != null and idNumber!=''">id_number,</if>
|
||||||
|
<if test="proCode != null and proCode!=''">team_num,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="teamName != null and teamName != ''">#{teamName},</if>
|
||||||
|
<if test="teamLeader != null and teamLeader != ''">#{teamLeader},</if>
|
||||||
|
<if test="bidCode != null and bidCode!=''">#{bidCode},</if>
|
||||||
|
<if test="teamLeaderPhone != null and teamLeaderPhone!=''">#{teamLeaderPhone},</if>
|
||||||
|
<if test="idNumber != null and idNumber!=''">#{idNumber},</if>
|
||||||
|
<if test="teamNum != null and teamNum!=''">#{teamNum},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateTeam">
|
||||||
|
UPDATE tb_work_team
|
||||||
|
<set>
|
||||||
|
<if test="teamName != null and teamName != ''">team_name = #{teamName},</if>
|
||||||
|
<if test="teamLeader != null and teamLeader != ''">team_leader = #{teamLeader},</if>
|
||||||
|
<if test="bidCode != null and bidCode != ''">bid_code = #{bidCode},</if>
|
||||||
|
<if test="teamLeaderPhone != null and teamLeaderPhone != ''">team_leader_phone = #{teamLeaderPhone},</if>
|
||||||
|
<if test="idNumber != null and idNumber != ''">id_number = #{idNumber},</if>
|
||||||
|
<if test="teamNum != null and teamNum != ''">team_num = #{teamNum},</if>
|
||||||
|
</set>
|
||||||
|
WHERE team_id= #{teamId}
|
||||||
|
</update>
|
||||||
|
<!--获取人员列表-->
|
||||||
|
<select id="getTeamLists" resultType="com.securitycontrol.background.humanvehiclemanage.entity.TeamManageVo">
|
||||||
|
SELECT
|
||||||
|
team_name as teamname,
|
||||||
|
team_leader as teamleader,
|
||||||
|
team_leader_phone as teamleaderphone,
|
||||||
|
id_number as idnumber,
|
||||||
|
bid_code as bidcode,
|
||||||
|
team_num as teamnum
|
||||||
|
from
|
||||||
|
tb_work_team twt
|
||||||
|
<where>
|
||||||
|
<if test="keyWord !=null and keyWord!=''">
|
||||||
|
AND (
|
||||||
|
INSTR(twt.team_leader,#{keyWord}) > 0 OR
|
||||||
|
INSTR(twt.id_number,#{keyWord}) > 0
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue