change - add异常告警、异常数据

main
yinq 6 months ago
parent 20dd2e875f
commit cda1fc94a7

@ -13,7 +13,7 @@ ruoyi:
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证
captchaType: math
captchaType: char
# 开发环境配置
server:

@ -137,7 +137,7 @@
#end
#end
#end
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
<template slot-scope="scope">
<el-button
size="mini"

@ -151,7 +151,7 @@
<el-table-column label="${comment}" align="center" prop="${javaField}" v-if="columns[${foreach.index}].visible"/>
#end
#end
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<el-button
size="mini"

@ -0,0 +1,100 @@
package com.os.mes.base.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.os.common.annotation.Log;
import com.os.common.core.controller.BaseController;
import com.os.common.core.domain.AjaxResult;
import com.os.common.enums.BusinessType;
import com.os.mes.base.domain.BaseStaffInfo;
import com.os.mes.base.service.IBaseStaffInfoService;
import com.os.common.utils.poi.ExcelUtil;
import com.os.common.core.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2024-05-15
*/
@RestController
@RequestMapping("/mes/base/baseStaffInfo")
public class BaseStaffInfoController extends BaseController {
@Autowired
private IBaseStaffInfoService baseStaffInfoService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseStaffInfo:list')")
@GetMapping("/list")
public TableDataInfo list(BaseStaffInfo baseStaffInfo) {
startPage();
List<BaseStaffInfo> list = baseStaffInfoService.selectBaseStaffInfoList(baseStaffInfo);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseStaffInfo:export')")
@Log(title = "员工信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BaseStaffInfo baseStaffInfo) {
List<BaseStaffInfo> list = baseStaffInfoService.selectBaseStaffInfoList(baseStaffInfo);
ExcelUtil<BaseStaffInfo> util = new ExcelUtil<BaseStaffInfo>(BaseStaffInfo.class);
util.exportExcel(response, list, "员工信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseStaffInfo:query')")
@GetMapping(value = "/{objId}")
public AjaxResult getInfo(@PathVariable("objId") Long objId) {
return success(baseStaffInfoService.selectBaseStaffInfoByObjId(objId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseStaffInfo:add')")
@Log(title = "员工信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseStaffInfo baseStaffInfo) {
baseStaffInfo.setCreateBy(getUsername());
return toAjax(baseStaffInfoService.insertBaseStaffInfo(baseStaffInfo));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseStaffInfo:edit')")
@Log(title = "员工信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseStaffInfo baseStaffInfo) {
baseStaffInfo.setUpdateBy(getUsername());
return toAjax(baseStaffInfoService.updateBaseStaffInfo(baseStaffInfo));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseStaffInfo:remove')")
@Log(title = "员工信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{objIds}")
public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(baseStaffInfoService.deleteBaseStaffInfoByObjIds(objIds));
}
}

@ -0,0 +1,109 @@
package com.os.mes.base.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.os.common.annotation.Log;
import com.os.common.core.controller.BaseController;
import com.os.common.core.domain.AjaxResult;
import com.os.common.enums.BusinessType;
import com.os.mes.base.domain.BaseTeamMembers;
import com.os.mes.base.service.IBaseTeamMembersService;
import com.os.common.utils.poi.ExcelUtil;
import com.os.common.core.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2024-05-15
*/
@RestController
@RequestMapping("/mes/base/baseTeamMembers")
public class BaseTeamMembersController extends BaseController {
@Autowired
private IBaseTeamMembersService baseTeamMembersService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseTeamMembers:list')")
@GetMapping("/list")
public TableDataInfo list(BaseTeamMembers baseTeamMembers) {
startPage();
List<BaseTeamMembers> list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/getBaseTeamMembers")
public AjaxResult getBaseTeamMembers(BaseTeamMembers baseTeamMembers) {
List<BaseTeamMembers> list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers);
return success(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseTeamMembers:export')")
@Log(title = "班组信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BaseTeamMembers baseTeamMembers) {
List<BaseTeamMembers> list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers);
ExcelUtil<BaseTeamMembers> util = new ExcelUtil<BaseTeamMembers>(BaseTeamMembers.class);
util.exportExcel(response, list, "班组信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseTeamMembers:query')")
@GetMapping(value = "/{objId}")
public AjaxResult getInfo(@PathVariable("objId") Long objId) {
return success(baseTeamMembersService.selectBaseTeamMembersByObjId(objId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseTeamMembers:add')")
@Log(title = "班组信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseTeamMembers baseTeamMembers) {
baseTeamMembers.setCreateBy(getUsername());
return toAjax(baseTeamMembersService.insertBaseTeamMembers(baseTeamMembers));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseTeamMembers:edit')")
@Log(title = "班组信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseTeamMembers baseTeamMembers) {
baseTeamMembers.setUpdateBy(getUsername());
return toAjax(baseTeamMembersService.updateBaseTeamMembers(baseTeamMembers));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/base:baseTeamMembers:remove')")
@Log(title = "班组信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{objIds}")
public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(baseTeamMembersService.deleteBaseTeamMembersByObjIds(objIds));
}
}

@ -0,0 +1,175 @@
package com.os.mes.base.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.os.common.annotation.Excel;
import com.os.common.core.domain.BaseEntity;
/**
* base_staff_info
*
* @author Yinq
* @date 2024-05-15
*/
public class BaseStaffInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
* ID
*/
@Excel(name = "员工ID")
private String staffId;
/**
*
*/
@Excel(name = "员工名称")
private String staffName;
/**
* 1 2
*/
@Excel(name = "员工类型", readConverterExp = "1=班长,2=组员")
private String staffType;
/**
*
*/
@Excel(name = "卡号")
private String cardId;
/**
*
*/
@Excel(name = "班组编号")
private String teamCode;
/**
*
*/
@Excel(name = "手机号")
private String phoneNumber;
/**
* 0 1 2
*/
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
/**
*
*/
@Excel(name = "卡密")
private String passWord;
/**
* 0 2
*/
private String delFlag;
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public String getStaffId() {
return staffId;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public String getStaffName() {
return staffName;
}
public void setStaffType(String staffType) {
this.staffType = staffType;
}
public String getStaffType() {
return staffType;
}
public void setCardId(String cardId) {
this.cardId = cardId;
}
public String getCardId() {
return cardId;
}
public void setTeamCode(String teamCode) {
this.teamCode = teamCode;
}
public String getTeamCode() {
return teamCode;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getSex() {
return sex;
}
public void setPassWord(String passWord) {
this.passWord = passWord;
}
public String getPassWord() {
return passWord;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("staffId", getStaffId())
.append("staffName", getStaffName())
.append("staffType", getStaffType())
.append("cardId", getCardId())
.append("teamCode", getTeamCode())
.append("phoneNumber", getPhoneNumber())
.append("sex", getSex())
.append("passWord", getPassWord())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -0,0 +1,190 @@
package com.os.mes.base.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.os.common.annotation.Excel;
import com.os.common.core.domain.BaseEntity;
/**
* base_team_members
*
* @author Yinq
* @date 2024-05-15
*/
public class BaseTeamMembers extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "班组编号")
private String teamCode;
/**
*
*/
@Excel(name = "班组名称")
private String teamName;
/**
*
*/
@Excel(name = "班组负责人")
private String teamHead;
/**
*
*/
@Excel(name = "所属工位")
private String stationCode;
/**
* 1 2
*/
@Excel(name = "班次", readConverterExp = "1=早班,2=晚班")
private String classes;
/**
*
*/
@Excel(name = "上班时间")
private String startTime;
/**
*
*/
@Excel(name = "下班时间")
private String endTime;
/**
*
*/
@Excel(name = "休息时间")
private String dineTime;
/**
*
*/
@Excel(name = "是否标识")
private String isFlag;
/**
*
*/
@Excel(name = "机台编号")
private String machineCode;
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setTeamCode(String teamCode) {
this.teamCode = teamCode;
}
public String getTeamCode() {
return teamCode;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public String getTeamName() {
return teamName;
}
public void setTeamHead(String teamHead) {
this.teamHead = teamHead;
}
public String getTeamHead() {
return teamHead;
}
public void setStationCode(String stationCode) {
this.stationCode = stationCode;
}
public String getStationCode() {
return stationCode;
}
public void setClasses(String classes) {
this.classes = classes;
}
public String getClasses() {
return classes;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getStartTime() {
return startTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getEndTime() {
return endTime;
}
public void setDineTime(String dineTime) {
this.dineTime = dineTime;
}
public String getDineTime() {
return dineTime;
}
public void setIsFlag(String isFlag) {
this.isFlag = isFlag;
}
public String getIsFlag() {
return isFlag;
}
public void setMachineCode(String machineCode) {
this.machineCode = machineCode;
}
public String getMachineCode() {
return machineCode;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("teamCode", getTeamCode())
.append("teamName", getTeamName())
.append("teamHead", getTeamHead())
.append("stationCode", getStationCode())
.append("classes", getClasses())
.append("startTime", getStartTime())
.append("endTime", getEndTime())
.append("dineTime", getDineTime())
.append("isFlag", getIsFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("machineCode", getMachineCode())
.toString();
}
}

@ -0,0 +1,61 @@
package com.os.mes.base.mapper;
import java.util.List;
import com.os.mes.base.domain.BaseStaffInfo;
/**
* Mapper
*
* @author Yinq
* @date 2024-05-15
*/
public interface BaseStaffInfoMapper {
/**
*
*
* @param objId
* @return
*/
public BaseStaffInfo selectBaseStaffInfoByObjId(Long objId);
/**
*
*
* @param baseStaffInfo
* @return
*/
public List<BaseStaffInfo> selectBaseStaffInfoList(BaseStaffInfo baseStaffInfo);
/**
*
*
* @param baseStaffInfo
* @return
*/
public int insertBaseStaffInfo(BaseStaffInfo baseStaffInfo);
/**
*
*
* @param baseStaffInfo
* @return
*/
public int updateBaseStaffInfo(BaseStaffInfo baseStaffInfo);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseStaffInfoByObjId(Long objId);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseStaffInfoByObjIds(Long[] objIds);
}

@ -0,0 +1,61 @@
package com.os.mes.base.mapper;
import java.util.List;
import com.os.mes.base.domain.BaseTeamMembers;
/**
* Mapper
*
* @author Yinq
* @date 2024-05-15
*/
public interface BaseTeamMembersMapper {
/**
*
*
* @param objId
* @return
*/
public BaseTeamMembers selectBaseTeamMembersByObjId(Long objId);
/**
*
*
* @param baseTeamMembers
* @return
*/
public List<BaseTeamMembers> selectBaseTeamMembersList(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param baseTeamMembers
* @return
*/
public int insertBaseTeamMembers(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param baseTeamMembers
* @return
*/
public int updateBaseTeamMembers(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseTeamMembersByObjId(Long objId);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseTeamMembersByObjIds(Long[] objIds);
}

@ -0,0 +1,61 @@
package com.os.mes.base.service;
import java.util.List;
import com.os.mes.base.domain.BaseStaffInfo;
/**
* Service
*
* @author Yinq
* @date 2024-05-15
*/
public interface IBaseStaffInfoService {
/**
*
*
* @param objId
* @return
*/
public BaseStaffInfo selectBaseStaffInfoByObjId(Long objId);
/**
*
*
* @param baseStaffInfo
* @return
*/
public List<BaseStaffInfo> selectBaseStaffInfoList(BaseStaffInfo baseStaffInfo);
/**
*
*
* @param baseStaffInfo
* @return
*/
public int insertBaseStaffInfo(BaseStaffInfo baseStaffInfo);
/**
*
*
* @param baseStaffInfo
* @return
*/
public int updateBaseStaffInfo(BaseStaffInfo baseStaffInfo);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseStaffInfoByObjIds(Long[] objIds);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseStaffInfoByObjId(Long objId);
}

@ -0,0 +1,61 @@
package com.os.mes.base.service;
import java.util.List;
import com.os.mes.base.domain.BaseTeamMembers;
/**
* Service
*
* @author Yinq
* @date 2024-05-15
*/
public interface IBaseTeamMembersService {
/**
*
*
* @param objId
* @return
*/
public BaseTeamMembers selectBaseTeamMembersByObjId(Long objId);
/**
*
*
* @param baseTeamMembers
* @return
*/
public List<BaseTeamMembers> selectBaseTeamMembersList(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param baseTeamMembers
* @return
*/
public int insertBaseTeamMembers(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param baseTeamMembers
* @return
*/
public int updateBaseTeamMembers(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseTeamMembersByObjIds(Long[] objIds);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseTeamMembersByObjId(Long objId);
}

@ -0,0 +1,90 @@
package com.os.mes.base.service.impl;
import java.util.List;
import com.os.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.os.mes.base.mapper.BaseStaffInfoMapper;
import com.os.mes.base.domain.BaseStaffInfo;
import com.os.mes.base.service.IBaseStaffInfoService;
/**
* Service
*
* @author Yinq
* @date 2024-05-15
*/
@Service
public class BaseStaffInfoServiceImpl implements IBaseStaffInfoService {
@Autowired
private BaseStaffInfoMapper baseStaffInfoMapper;
/**
*
*
* @param objId
* @return
*/
@Override
public BaseStaffInfo selectBaseStaffInfoByObjId(Long objId) {
return baseStaffInfoMapper.selectBaseStaffInfoByObjId(objId);
}
/**
*
*
* @param baseStaffInfo
* @return
*/
@Override
public List<BaseStaffInfo> selectBaseStaffInfoList(BaseStaffInfo baseStaffInfo) {
return baseStaffInfoMapper.selectBaseStaffInfoList(baseStaffInfo);
}
/**
*
*
* @param baseStaffInfo
* @return
*/
@Override
public int insertBaseStaffInfo(BaseStaffInfo baseStaffInfo) {
baseStaffInfo.setCreateTime(DateUtils.getNowDate());
return baseStaffInfoMapper.insertBaseStaffInfo(baseStaffInfo);
}
/**
*
*
* @param baseStaffInfo
* @return
*/
@Override
public int updateBaseStaffInfo(BaseStaffInfo baseStaffInfo) {
baseStaffInfo.setUpdateTime(DateUtils.getNowDate());
return baseStaffInfoMapper.updateBaseStaffInfo(baseStaffInfo);
}
/**
*
*
* @param objIds
* @return
*/
@Override
public int deleteBaseStaffInfoByObjIds(Long[] objIds) {
return baseStaffInfoMapper.deleteBaseStaffInfoByObjIds(objIds);
}
/**
*
*
* @param objId
* @return
*/
@Override
public int deleteBaseStaffInfoByObjId(Long objId) {
return baseStaffInfoMapper.deleteBaseStaffInfoByObjId(objId);
}
}

@ -0,0 +1,90 @@
package com.os.mes.base.service.impl;
import java.util.List;
import com.os.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.os.mes.base.mapper.BaseTeamMembersMapper;
import com.os.mes.base.domain.BaseTeamMembers;
import com.os.mes.base.service.IBaseTeamMembersService;
/**
* Service
*
* @author Yinq
* @date 2024-05-15
*/
@Service
public class BaseTeamMembersServiceImpl implements IBaseTeamMembersService {
@Autowired
private BaseTeamMembersMapper baseTeamMembersMapper;
/**
*
*
* @param objId
* @return
*/
@Override
public BaseTeamMembers selectBaseTeamMembersByObjId(Long objId) {
return baseTeamMembersMapper.selectBaseTeamMembersByObjId(objId);
}
/**
*
*
* @param baseTeamMembers
* @return
*/
@Override
public List<BaseTeamMembers> selectBaseTeamMembersList(BaseTeamMembers baseTeamMembers) {
return baseTeamMembersMapper.selectBaseTeamMembersList(baseTeamMembers);
}
/**
*
*
* @param baseTeamMembers
* @return
*/
@Override
public int insertBaseTeamMembers(BaseTeamMembers baseTeamMembers) {
baseTeamMembers.setCreateTime(DateUtils.getNowDate());
return baseTeamMembersMapper.insertBaseTeamMembers(baseTeamMembers);
}
/**
*
*
* @param baseTeamMembers
* @return
*/
@Override
public int updateBaseTeamMembers(BaseTeamMembers baseTeamMembers) {
baseTeamMembers.setUpdateTime(DateUtils.getNowDate());
return baseTeamMembersMapper.updateBaseTeamMembers(baseTeamMembers);
}
/**
*
*
* @param objIds
* @return
*/
@Override
public int deleteBaseTeamMembersByObjIds(Long[] objIds) {
return baseTeamMembersMapper.deleteBaseTeamMembersByObjIds(objIds);
}
/**
*
*
* @param objId
* @return
*/
@Override
public int deleteBaseTeamMembersByObjId(Long objId) {
return baseTeamMembersMapper.deleteBaseTeamMembersByObjId(objId);
}
}

@ -0,0 +1,132 @@
<?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.os.mes.base.mapper.BaseStaffInfoMapper">
<resultMap type="BaseStaffInfo" id="BaseStaffInfoResult">
<result property="objId" column="obj_id"/>
<result property="staffId" column="staff_id"/>
<result property="staffName" column="staff_name"/>
<result property="staffType" column="staff_type"/>
<result property="cardId" column="card_id"/>
<result property="teamCode" column="team_code"/>
<result property="phoneNumber" column="phone_number"/>
<result property="sex" column="sex"/>
<result property="passWord" column="pass_word"/>
<result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectBaseStaffInfoVo">
select obj_id,
staff_id,
staff_name,
staff_type,
card_id,
team_code,
phone_number,
sex,
pass_word,
del_flag,
create_by,
create_time,
update_by,
update_time,
remark
from base_staff_info
</sql>
<select id="selectBaseStaffInfoList" parameterType="BaseStaffInfo" resultMap="BaseStaffInfoResult">
<include refid="selectBaseStaffInfoVo"/>
<where>
<if test="staffId != null and staffId != ''">and staff_id = #{staffId}</if>
<if test="staffName != null and staffName != ''">and staff_name like concat('%', #{staffName}, '%')</if>
<if test="staffType != null and staffType != ''">and staff_type = #{staffType}</if>
<if test="cardId != null and cardId != ''">and card_id = #{cardId}</if>
<if test="teamCode != null and teamCode != ''">and team_code = #{teamCode}</if>
<if test="phoneNumber != null and phoneNumber != ''">and phone_number = #{phoneNumber}</if>
<if test="sex != null and sex != ''">and sex = #{sex}</if>
<if test="passWord != null and passWord != ''">and pass_word = #{passWord}</if>
</where>
</select>
<select id="selectBaseStaffInfoByObjId" parameterType="Long" resultMap="BaseStaffInfoResult">
<include refid="selectBaseStaffInfoVo"/>
where obj_id = #{objId}
</select>
<insert id="insertBaseStaffInfo" parameterType="BaseStaffInfo" useGeneratedKeys="true" keyProperty="objId">
insert into base_staff_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="staffId != null and staffId != ''">staff_id,</if>
<if test="staffName != null and staffName != ''">staff_name,</if>
<if test="staffType != null">staff_type,</if>
<if test="cardId != null">card_id,</if>
<if test="teamCode != null and teamCode != ''">team_code,</if>
<if test="phoneNumber != null">phone_number,</if>
<if test="sex != null">sex,</if>
<if test="passWord != null">pass_word,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="staffId != null and staffId != ''">#{staffId},</if>
<if test="staffName != null and staffName != ''">#{staffName},</if>
<if test="staffType != null">#{staffType},</if>
<if test="cardId != null">#{cardId},</if>
<if test="teamCode != null and teamCode != ''">#{teamCode},</if>
<if test="phoneNumber != null">#{phoneNumber},</if>
<if test="sex != null">#{sex},</if>
<if test="passWord != null">#{passWord},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateBaseStaffInfo" parameterType="BaseStaffInfo">
update base_staff_info
<trim prefix="SET" suffixOverrides=",">
<if test="staffId != null and staffId != ''">staff_id = #{staffId},</if>
<if test="staffName != null and staffName != ''">staff_name = #{staffName},</if>
<if test="staffType != null">staff_type = #{staffType},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="teamCode != null and teamCode != ''">team_code = #{teamCode},</if>
<if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="passWord != null">pass_word = #{passWord},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where obj_id = #{objId}
</update>
<delete id="deleteBaseStaffInfoByObjId" parameterType="Long">
delete
from base_staff_info
where obj_id = #{objId}
</delete>
<delete id="deleteBaseStaffInfoByObjIds" parameterType="String">
delete from base_staff_info where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,134 @@
<?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.os.mes.base.mapper.BaseTeamMembersMapper">
<resultMap type="BaseTeamMembers" id="BaseTeamMembersResult">
<result property="objId" column="obj_id"/>
<result property="teamCode" column="team_code"/>
<result property="teamName" column="team_name"/>
<result property="teamHead" column="team_head"/>
<result property="stationCode" column="station_code"/>
<result property="classes" column="classes"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="dineTime" column="dine_time"/>
<result property="isFlag" column="is_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="machineCode" column="machine_code"/>
</resultMap>
<sql id="selectBaseTeamMembersVo">
select obj_id,
team_code,
team_name,
team_head,
station_code,
classes,
start_time,
end_time,
dine_time,
is_flag,
create_by,
create_time,
update_by,
update_time,
machine_code
from base_team_members
</sql>
<select id="selectBaseTeamMembersList" parameterType="BaseTeamMembers" resultMap="BaseTeamMembersResult">
<include refid="selectBaseTeamMembersVo"/>
<where>
<if test="teamCode != null and teamCode != ''">and team_code = #{teamCode}</if>
<if test="teamName != null and teamName != ''">and team_name like concat('%', #{teamName}, '%')</if>
<if test="teamHead != null and teamHead != ''">and team_head = #{teamHead}</if>
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</if>
<if test="classes != null and classes != ''">and classes = #{classes}</if>
<if test="startTime != null and startTime != ''">and start_time = #{startTime}</if>
<if test="endTime != null and endTime != ''">and end_time = #{endTime}</if>
<if test="dineTime != null and dineTime != ''">and dine_time = #{dineTime}</if>
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if>
<if test="machineCode != null and machineCode != ''">and machine_code = #{machineCode}</if>
</where>
</select>
<select id="selectBaseTeamMembersByObjId" parameterType="Long" resultMap="BaseTeamMembersResult">
<include refid="selectBaseTeamMembersVo"/>
where obj_id = #{objId}
</select>
<insert id="insertBaseTeamMembers" parameterType="BaseTeamMembers" useGeneratedKeys="true" keyProperty="objId">
insert into base_team_members
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="teamCode != null">team_code,</if>
<if test="teamName != null">team_name,</if>
<if test="teamHead != null">team_head,</if>
<if test="stationCode != null">station_code,</if>
<if test="classes != null">classes,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="dineTime != null">dine_time,</if>
<if test="isFlag != null">is_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="machineCode != null">machine_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="teamCode != null">#{teamCode},</if>
<if test="teamName != null">#{teamName},</if>
<if test="teamHead != null">#{teamHead},</if>
<if test="stationCode != null">#{stationCode},</if>
<if test="classes != null">#{classes},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="dineTime != null">#{dineTime},</if>
<if test="isFlag != null">#{isFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="machineCode != null">#{machineCode},</if>
</trim>
</insert>
<update id="updateBaseTeamMembers" parameterType="BaseTeamMembers">
update base_team_members
<trim prefix="SET" suffixOverrides=",">
<if test="teamCode != null">team_code = #{teamCode},</if>
<if test="teamName != null">team_name = #{teamName},</if>
<if test="teamHead != null">team_head = #{teamHead},</if>
<if test="stationCode != null">station_code = #{stationCode},</if>
<if test="classes != null">classes = #{classes},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="dineTime != null">dine_time = #{dineTime},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="machineCode != null">machine_code = #{machineCode},</if>
</trim>
where obj_id = #{objId}
</update>
<delete id="deleteBaseTeamMembersByObjId" parameterType="Long">
delete
from base_team_members
where obj_id = #{objId}
</delete>
<delete id="deleteBaseTeamMembersByObjIds" parameterType="String">
delete from base_team_members where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save