change - add异常告警、异常数据
parent
20dd2e875f
commit
cda1fc94a7
@ -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,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…
Reference in New Issue