实现交接班业务逻辑
parent
624dcac7f0
commit
5be9e8d18b
@ -0,0 +1,126 @@
|
||||
package com.ruoyi.web.controller.baseinfo;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.baseinfo.domain.BaseShiftdetailInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseShiftdetailInfoService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 交接班详情信息Controller
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-10-28
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baseinfo/shiftdetailinfo")
|
||||
public class BaseShiftdetailInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "baseinfo/shiftdetailinfo";
|
||||
|
||||
@Autowired
|
||||
private IBaseShiftdetailInfoService baseShiftdetailInfoService;
|
||||
|
||||
@RequiresPermissions("baseinfo:shiftdetailinfo:view")
|
||||
@GetMapping()
|
||||
public String shiftdetailinfo()
|
||||
{
|
||||
return prefix + "/shiftdetailinfo";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交接班详情信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftdetailinfo:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BaseShiftdetailInfo baseShiftdetailInfo)
|
||||
{
|
||||
startPage();
|
||||
List<BaseShiftdetailInfo> list = baseShiftdetailInfoService.selectBaseShiftdetailInfoList(baseShiftdetailInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交接班详情信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftdetailinfo:export")
|
||||
@Log(title = "交接班详情信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseShiftdetailInfo baseShiftdetailInfo)
|
||||
{
|
||||
List<BaseShiftdetailInfo> list = baseShiftdetailInfoService.selectBaseShiftdetailInfoList(baseShiftdetailInfo);
|
||||
ExcelUtil<BaseShiftdetailInfo> util = new ExcelUtil<BaseShiftdetailInfo>(BaseShiftdetailInfo.class);
|
||||
return util.exportExcel(list, "shiftdetailinfo");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交接班详情信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存交接班详情信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftdetailinfo:add")
|
||||
@Log(title = "交接班详情信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BaseShiftdetailInfo baseShiftdetailInfo)
|
||||
{
|
||||
return toAjax(baseShiftdetailInfoService.insertBaseShiftdetailInfo(baseShiftdetailInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交接班详情信息
|
||||
*/
|
||||
@GetMapping("/edit/{shiftNo}")
|
||||
public String edit(@PathVariable("shiftNo") String shiftNo, ModelMap mmap)
|
||||
{
|
||||
BaseShiftdetailInfo baseShiftdetailInfo = baseShiftdetailInfoService.selectBaseShiftdetailInfoById(shiftNo);
|
||||
mmap.put("baseShiftdetailInfo", baseShiftdetailInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存交接班详情信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftdetailinfo:edit")
|
||||
@Log(title = "交接班详情信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BaseShiftdetailInfo baseShiftdetailInfo)
|
||||
{
|
||||
return toAjax(baseShiftdetailInfoService.updateBaseShiftdetailInfo(baseShiftdetailInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交接班详情信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftdetailinfo:remove")
|
||||
@Log(title = "交接班详情信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(baseShiftdetailInfoService.deleteBaseShiftdetailInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,149 @@
|
||||
package com.ruoyi.web.controller.baseinfo;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.baseinfo.domain.BaseDeviceInfo;
|
||||
import com.ruoyi.baseinfo.domain.BaseGroupInfo;
|
||||
import com.ruoyi.baseinfo.domain.BaseShiftInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseDeviceInfoService;
|
||||
import com.ruoyi.baseinfo.service.IBaseGroupInfoService;
|
||||
import com.ruoyi.baseinfo.service.IBaseShiftInfoService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.baseinfo.domain.BaseShiftmasterInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseShiftmasterInfoService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 交接班基础信息Controller
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-10-28
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baseinfo/shiftmasterinfo")
|
||||
public class BaseShiftmasterInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "baseinfo/shiftmasterinfo";
|
||||
|
||||
@Autowired
|
||||
private IBaseShiftmasterInfoService baseShiftmasterInfoService;
|
||||
@Autowired
|
||||
private IBaseDeviceInfoService baseDeviceInfoService;
|
||||
@Autowired
|
||||
private IBaseShiftInfoService baseShiftInfoService;
|
||||
@Autowired
|
||||
private IBaseGroupInfoService baseGroupInfoService;
|
||||
|
||||
@RequiresPermissions("baseinfo:shiftmasterinfo:view")
|
||||
@GetMapping()
|
||||
public String shiftmasterinfo(ModelMap mmap)
|
||||
{
|
||||
BaseDeviceInfo baseDeviceInfo = new BaseDeviceInfo();
|
||||
BaseShiftInfo baseShiftInfo = new BaseShiftInfo();
|
||||
BaseGroupInfo baseGroupInfo = new BaseGroupInfo();
|
||||
mmap.put("cbdeviceInfo",baseDeviceInfoService.selectBaseDeviceInfoList(baseDeviceInfo));
|
||||
mmap.put("cbshitfInfo",baseShiftInfoService.selectBaseShiftInfoList(baseShiftInfo));
|
||||
mmap.put("cbgroupInfo",baseGroupInfoService.selectBaseGroupInfoList(baseGroupInfo));
|
||||
return prefix + "/shiftmasterinfo";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交接班基础信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftmasterinfo:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(BaseShiftmasterInfo baseShiftmasterInfo)
|
||||
{
|
||||
startPage();
|
||||
List<BaseShiftmasterInfo> list = baseShiftmasterInfoService.selectBaseShiftmasterInfoList(baseShiftmasterInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交接班基础信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftmasterinfo:export")
|
||||
@Log(title = "交接班基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(BaseShiftmasterInfo baseShiftmasterInfo)
|
||||
{
|
||||
List<BaseShiftmasterInfo> list = baseShiftmasterInfoService.selectBaseShiftmasterInfoList(baseShiftmasterInfo);
|
||||
ExcelUtil<BaseShiftmasterInfo> util = new ExcelUtil<BaseShiftmasterInfo>(BaseShiftmasterInfo.class);
|
||||
return util.exportExcel(list, "shiftmasterinfo");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交接班基础信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存交接班基础信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftmasterinfo:add")
|
||||
@Log(title = "交接班基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(BaseShiftmasterInfo baseShiftmasterInfo)
|
||||
{
|
||||
String code = new SimpleDateFormat("yyMMddHHmmss").format(new Date());
|
||||
baseShiftmasterInfo.setShiftNo(code);
|
||||
return toAjax(baseShiftmasterInfoService.insertBaseShiftmasterInfo(baseShiftmasterInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交接班基础信息
|
||||
*/
|
||||
@GetMapping("/edit/{shiftNo}")
|
||||
public String edit(@PathVariable("shiftNo") String shiftNo, ModelMap mmap)
|
||||
{
|
||||
BaseShiftmasterInfo baseShiftmasterInfo = baseShiftmasterInfoService.selectBaseShiftmasterInfoById(shiftNo);
|
||||
mmap.put("baseShiftmasterInfo", baseShiftmasterInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存交接班基础信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftmasterinfo:edit")
|
||||
@Log(title = "交接班基础信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(BaseShiftmasterInfo baseShiftmasterInfo)
|
||||
{
|
||||
return toAjax(baseShiftmasterInfoService.updateBaseShiftmasterInfo(baseShiftmasterInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交接班基础信息
|
||||
*/
|
||||
@RequiresPermissions("baseinfo:shiftmasterinfo:remove")
|
||||
@Log(title = "交接班基础信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(baseShiftmasterInfoService.deleteBaseShiftmasterInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增交接班详情信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-shiftdetailinfo-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_status_info')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseinfo/shiftdetailinfo"
|
||||
$("#form-shiftdetailinfo-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-shiftdetailinfo-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改交接班详情信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-shiftdetailinfo-edit" th:object="${baseShiftdetailInfo}">
|
||||
<input name="shiftNo" th:field="*{shiftNo}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('sys_status_info')}">
|
||||
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
|
||||
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseinfo/shiftdetailinfo";
|
||||
$("#form-shiftdetailinfo-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-shiftdetailinfo-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('交接班详情信息列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>状态标志:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('sys_status_info')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="baseinfo:shiftdetailinfo:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseinfo:shiftdetailinfo:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseinfo:shiftdetailinfo:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseinfo:shiftdetailinfo:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('baseinfo:shiftdetailinfo:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('baseinfo:shiftdetailinfo:remove')}]];
|
||||
var statusDatas = [[${@dict.getType('sys_status_info')}]];
|
||||
var prefix = ctx + "baseinfo/shiftdetailinfo";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "交接班详情信息",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'shiftNo',
|
||||
title: '交接班编号',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'postId',
|
||||
title: '职位ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'empId',
|
||||
title: '交接班人员ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态标志',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.shiftNo + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.shiftNo + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,192 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('交接班基础信息列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>基台设备:</label>
|
||||
<select name="deviceId" id="deviceId" class="form-control ">
|
||||
<option value="">--请选择设备基台--</option>
|
||||
<option name="cbdeviceInfo" th:each="deviceId:${cbdeviceInfo}" th:value="${deviceId.deviceId}" th:text="${deviceId.deviceName}" th:disabled="${deviceId.status == '1'}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>班次:</label>
|
||||
<select name="shiftId" id="shiftId" class="form-control ">
|
||||
<option value="">--请选择计划班次--</option>
|
||||
<option name="cbshitfInfo" th:each="shiftId:${cbshitfInfo}" th:value="${shiftId.shiftid}" th:text="${shiftId.shiftname}" th:disabled="${shiftId.status == '1'}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>班组:</label>
|
||||
<select name="groupId" id="groupId" class="groupId ">
|
||||
<option value="">--请选择计划班次--</option>
|
||||
<option name="cbgroupInfo" th:each="groupId:${cbgroupInfo}" th:value="${groupId.groupid}" th:text="${groupId.groupname}" th:disabled="${groupId.status == '1'}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="select-time">
|
||||
<label>起始时间:</label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginStartTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endStartTime]"/>
|
||||
</li>
|
||||
<li class="select-time">
|
||||
<label>结束时间:</label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginOverTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endOverTime]"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>状态标志:</label>
|
||||
<select name="status" th:with="type=${@dict.getType('sys_status_info')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="baseinfo:shiftmasterinfo:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseinfo:shiftmasterinfo:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseinfo:shiftmasterinfo:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseinfo:shiftmasterinfo:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('baseinfo:shiftmasterinfo:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('baseinfo:shiftmasterinfo:remove')}]];
|
||||
var statusDatas = [[${@dict.getType('sys_status_info')}]];
|
||||
var prefix = ctx + "baseinfo/shiftmasterinfo";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "交接班基础信息",
|
||||
detailView: true,
|
||||
onExpandRow: function(index, row, $detail) {
|
||||
initChildTable(index, row, $detail);
|
||||
},
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'shiftNo',
|
||||
title: '交接班编号',
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
field: 'deviceName',
|
||||
title: '基台设备'
|
||||
},
|
||||
{
|
||||
field: 'shiftname',
|
||||
title: '班次'
|
||||
},
|
||||
{
|
||||
field: 'groupname',
|
||||
title: '班组'
|
||||
},
|
||||
{
|
||||
field: 'startTime',
|
||||
title: '起始时间'
|
||||
},
|
||||
{
|
||||
field: 'overTime',
|
||||
title: '结束时间'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态标志',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.shiftNo + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.shiftNo + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
initChildTable = function(index, row, $detail) {
|
||||
var shiftNo = row.shiftNo;
|
||||
console.log(shiftNo)
|
||||
var childTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
|
||||
$(childTable).bootstrapTable({
|
||||
url: ctx + "baseinfo/shiftdetailinfo/list",
|
||||
method: 'post',
|
||||
sidePagination: "server",
|
||||
contentType: "application/x-www-form-urlencoded",
|
||||
queryParams : {
|
||||
shiftNo: row.shiftNo
|
||||
},
|
||||
columns: [{
|
||||
field : 'shiftNo',
|
||||
title : '交接班编号'
|
||||
},
|
||||
{
|
||||
field: 'postName',
|
||||
title: '职位',
|
||||
},
|
||||
{
|
||||
field: 'empName',
|
||||
title: '交接班人员',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态标志',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(statusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
title: '备注'
|
||||
},]
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseinfo.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseinfo.domain.BaseShiftdetailInfo;
|
||||
|
||||
/**
|
||||
* 交接班详情信息Mapper接口
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-10-28
|
||||
*/
|
||||
public interface BaseShiftdetailInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询交接班详情信息
|
||||
*
|
||||
* @param shiftNo 交接班详情信息ID
|
||||
* @return 交接班详情信息
|
||||
*/
|
||||
public BaseShiftdetailInfo selectBaseShiftdetailInfoById(String shiftNo);
|
||||
|
||||
/**
|
||||
* 查询交接班详情信息列表
|
||||
*
|
||||
* @param baseShiftdetailInfo 交接班详情信息
|
||||
* @return 交接班详情信息集合
|
||||
*/
|
||||
public List<BaseShiftdetailInfo> selectBaseShiftdetailInfoList(BaseShiftdetailInfo baseShiftdetailInfo);
|
||||
|
||||
/**
|
||||
* 新增交接班详情信息
|
||||
*
|
||||
* @param baseShiftdetailInfo 交接班详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseShiftdetailInfo(BaseShiftdetailInfo baseShiftdetailInfo);
|
||||
|
||||
/**
|
||||
* 修改交接班详情信息
|
||||
*
|
||||
* @param baseShiftdetailInfo 交接班详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseShiftdetailInfo(BaseShiftdetailInfo baseShiftdetailInfo);
|
||||
|
||||
/**
|
||||
* 删除交接班详情信息
|
||||
*
|
||||
* @param shiftNo 交接班详情信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseShiftdetailInfoById(String shiftNo);
|
||||
|
||||
/**
|
||||
* 批量删除交接班详情信息
|
||||
*
|
||||
* @param shiftNos 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseShiftdetailInfoByIds(String[] shiftNos);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseinfo.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseinfo.domain.BaseShiftmasterInfo;
|
||||
|
||||
/**
|
||||
* 交接班基础信息Mapper接口
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-10-28
|
||||
*/
|
||||
public interface BaseShiftmasterInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询交接班基础信息
|
||||
*
|
||||
* @param shiftNo 交接班基础信息ID
|
||||
* @return 交接班基础信息
|
||||
*/
|
||||
public BaseShiftmasterInfo selectBaseShiftmasterInfoById(String shiftNo);
|
||||
|
||||
/**
|
||||
* 查询交接班基础信息列表
|
||||
*
|
||||
* @param baseShiftmasterInfo 交接班基础信息
|
||||
* @return 交接班基础信息集合
|
||||
*/
|
||||
public List<BaseShiftmasterInfo> selectBaseShiftmasterInfoList(BaseShiftmasterInfo baseShiftmasterInfo);
|
||||
|
||||
/**
|
||||
* 新增交接班基础信息
|
||||
*
|
||||
* @param baseShiftmasterInfo 交接班基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseShiftmasterInfo(BaseShiftmasterInfo baseShiftmasterInfo);
|
||||
|
||||
/**
|
||||
* 修改交接班基础信息
|
||||
*
|
||||
* @param baseShiftmasterInfo 交接班基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseShiftmasterInfo(BaseShiftmasterInfo baseShiftmasterInfo);
|
||||
|
||||
/**
|
||||
* 删除交接班基础信息
|
||||
*
|
||||
* @param shiftNo 交接班基础信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseShiftmasterInfoById(String shiftNo);
|
||||
|
||||
/**
|
||||
* 批量删除交接班基础信息
|
||||
*
|
||||
* @param shiftNos 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseShiftmasterInfoByIds(String[] shiftNos);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseinfo.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseinfo.domain.BaseShiftdetailInfo;
|
||||
|
||||
/**
|
||||
* 交接班详情信息Service接口
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-10-28
|
||||
*/
|
||||
public interface IBaseShiftdetailInfoService
|
||||
{
|
||||
/**
|
||||
* 查询交接班详情信息
|
||||
*
|
||||
* @param shiftNo 交接班详情信息ID
|
||||
* @return 交接班详情信息
|
||||
*/
|
||||
public BaseShiftdetailInfo selectBaseShiftdetailInfoById(String shiftNo);
|
||||
|
||||
/**
|
||||
* 查询交接班详情信息列表
|
||||
*
|
||||
* @param baseShiftdetailInfo 交接班详情信息
|
||||
* @return 交接班详情信息集合
|
||||
*/
|
||||
public List<BaseShiftdetailInfo> selectBaseShiftdetailInfoList(BaseShiftdetailInfo baseShiftdetailInfo);
|
||||
|
||||
/**
|
||||
* 新增交接班详情信息
|
||||
*
|
||||
* @param baseShiftdetailInfo 交接班详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseShiftdetailInfo(BaseShiftdetailInfo baseShiftdetailInfo);
|
||||
|
||||
/**
|
||||
* 修改交接班详情信息
|
||||
*
|
||||
* @param baseShiftdetailInfo 交接班详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseShiftdetailInfo(BaseShiftdetailInfo baseShiftdetailInfo);
|
||||
|
||||
/**
|
||||
* 批量删除交接班详情信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseShiftdetailInfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除交接班详情信息信息
|
||||
*
|
||||
* @param shiftNo 交接班详情信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseShiftdetailInfoById(String shiftNo);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseinfo.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseinfo.domain.BaseShiftmasterInfo;
|
||||
|
||||
/**
|
||||
* 交接班基础信息Service接口
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-10-28
|
||||
*/
|
||||
public interface IBaseShiftmasterInfoService
|
||||
{
|
||||
/**
|
||||
* 查询交接班基础信息
|
||||
*
|
||||
* @param shiftNo 交接班基础信息ID
|
||||
* @return 交接班基础信息
|
||||
*/
|
||||
public BaseShiftmasterInfo selectBaseShiftmasterInfoById(String shiftNo);
|
||||
|
||||
/**
|
||||
* 查询交接班基础信息列表
|
||||
*
|
||||
* @param baseShiftmasterInfo 交接班基础信息
|
||||
* @return 交接班基础信息集合
|
||||
*/
|
||||
public List<BaseShiftmasterInfo> selectBaseShiftmasterInfoList(BaseShiftmasterInfo baseShiftmasterInfo);
|
||||
|
||||
/**
|
||||
* 新增交接班基础信息
|
||||
*
|
||||
* @param baseShiftmasterInfo 交接班基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseShiftmasterInfo(BaseShiftmasterInfo baseShiftmasterInfo);
|
||||
|
||||
/**
|
||||
* 修改交接班基础信息
|
||||
*
|
||||
* @param baseShiftmasterInfo 交接班基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseShiftmasterInfo(BaseShiftmasterInfo baseShiftmasterInfo);
|
||||
|
||||
/**
|
||||
* 批量删除交接班基础信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseShiftmasterInfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除交接班基础信息信息
|
||||
*
|
||||
* @param shiftNo 交接班基础信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseShiftmasterInfoById(String shiftNo);
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.baseinfo.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.baseinfo.mapper.BaseShiftdetailInfoMapper;
|
||||
import com.ruoyi.baseinfo.domain.BaseShiftdetailInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseShiftdetailInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 交接班详情信息Service业务层处理
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-10-28
|
||||
*/
|
||||
@Service
|
||||
public class BaseShiftdetailInfoServiceImpl implements IBaseShiftdetailInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BaseShiftdetailInfoMapper baseShiftdetailInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询交接班详情信息
|
||||
*
|
||||
* @param shiftNo 交接班详情信息ID
|
||||
* @return 交接班详情信息
|
||||
*/
|
||||
@Override
|
||||
public BaseShiftdetailInfo selectBaseShiftdetailInfoById(String shiftNo)
|
||||
{
|
||||
return baseShiftdetailInfoMapper.selectBaseShiftdetailInfoById(shiftNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交接班详情信息列表
|
||||
*
|
||||
* @param baseShiftdetailInfo 交接班详情信息
|
||||
* @return 交接班详情信息
|
||||
*/
|
||||
@Override
|
||||
public List<BaseShiftdetailInfo> selectBaseShiftdetailInfoList(BaseShiftdetailInfo baseShiftdetailInfo)
|
||||
{
|
||||
return baseShiftdetailInfoMapper.selectBaseShiftdetailInfoList(baseShiftdetailInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交接班详情信息
|
||||
*
|
||||
* @param baseShiftdetailInfo 交接班详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseShiftdetailInfo(BaseShiftdetailInfo baseShiftdetailInfo)
|
||||
{
|
||||
baseShiftdetailInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return baseShiftdetailInfoMapper.insertBaseShiftdetailInfo(baseShiftdetailInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交接班详情信息
|
||||
*
|
||||
* @param baseShiftdetailInfo 交接班详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseShiftdetailInfo(BaseShiftdetailInfo baseShiftdetailInfo)
|
||||
{
|
||||
baseShiftdetailInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseShiftdetailInfoMapper.updateBaseShiftdetailInfo(baseShiftdetailInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交接班详情信息对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseShiftdetailInfoByIds(String ids)
|
||||
{
|
||||
return baseShiftdetailInfoMapper.deleteBaseShiftdetailInfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交接班详情信息信息
|
||||
*
|
||||
* @param shiftNo 交接班详情信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseShiftdetailInfoById(String shiftNo)
|
||||
{
|
||||
return baseShiftdetailInfoMapper.deleteBaseShiftdetailInfoById(shiftNo);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.baseinfo.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.baseinfo.mapper.BaseShiftmasterInfoMapper;
|
||||
import com.ruoyi.baseinfo.domain.BaseShiftmasterInfo;
|
||||
import com.ruoyi.baseinfo.service.IBaseShiftmasterInfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 交接班基础信息Service业务层处理
|
||||
*
|
||||
* @author CaesarBao
|
||||
* @date 2020-10-28
|
||||
*/
|
||||
@Service
|
||||
public class BaseShiftmasterInfoServiceImpl implements IBaseShiftmasterInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BaseShiftmasterInfoMapper baseShiftmasterInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询交接班基础信息
|
||||
*
|
||||
* @param shiftNo 交接班基础信息ID
|
||||
* @return 交接班基础信息
|
||||
*/
|
||||
@Override
|
||||
public BaseShiftmasterInfo selectBaseShiftmasterInfoById(String shiftNo)
|
||||
{
|
||||
return baseShiftmasterInfoMapper.selectBaseShiftmasterInfoById(shiftNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交接班基础信息列表
|
||||
*
|
||||
* @param baseShiftmasterInfo 交接班基础信息
|
||||
* @return 交接班基础信息
|
||||
*/
|
||||
@Override
|
||||
public List<BaseShiftmasterInfo> selectBaseShiftmasterInfoList(BaseShiftmasterInfo baseShiftmasterInfo)
|
||||
{
|
||||
return baseShiftmasterInfoMapper.selectBaseShiftmasterInfoList(baseShiftmasterInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交接班基础信息
|
||||
*
|
||||
* @param baseShiftmasterInfo 交接班基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseShiftmasterInfo(BaseShiftmasterInfo baseShiftmasterInfo)
|
||||
{
|
||||
baseShiftmasterInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return baseShiftmasterInfoMapper.insertBaseShiftmasterInfo(baseShiftmasterInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交接班基础信息
|
||||
*
|
||||
* @param baseShiftmasterInfo 交接班基础信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseShiftmasterInfo(BaseShiftmasterInfo baseShiftmasterInfo)
|
||||
{
|
||||
baseShiftmasterInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseShiftmasterInfoMapper.updateBaseShiftmasterInfo(baseShiftmasterInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交接班基础信息对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseShiftmasterInfoByIds(String ids)
|
||||
{
|
||||
return baseShiftmasterInfoMapper.deleteBaseShiftmasterInfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交接班基础信息信息
|
||||
*
|
||||
* @param shiftNo 交接班基础信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseShiftmasterInfoById(String shiftNo)
|
||||
{
|
||||
return baseShiftmasterInfoMapper.deleteBaseShiftmasterInfoById(shiftNo);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
<?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.ruoyi.baseinfo.mapper.BaseShiftdetailInfoMapper">
|
||||
|
||||
<resultMap type="BaseShiftdetailInfo" id="BaseShiftdetailInfoResult">
|
||||
<result property="shiftNo" column="shift_no" />
|
||||
<result property="postId" column="post_id" />
|
||||
<result property="empId" column="emp_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="delFlag" column="del_flag" />
|
||||
<result property="postName" column="post_name" />
|
||||
<result property="empName" column="emp_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseShiftdetailInfoVo">
|
||||
select shift_no, post_id, emp_id, status, remark, create_by, create_time, update_by, update_time, del_flag from base_shiftdetail_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseShiftdetailInfoList" parameterType="BaseShiftdetailInfo" resultMap="BaseShiftdetailInfoResult">
|
||||
select shift_no, t1.post_id,t3.post_name, t1.emp_id,t2.emp_name, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_shiftdetail_info t1
|
||||
left join base_employee_info t2 on t1.emp_id = t2.emp_id
|
||||
left join base_post_info t3 on t1.post_id = t3.post_id
|
||||
<where>
|
||||
<if test="status != null and status != ''"> and t1.status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseShiftdetailInfoById" parameterType="String" resultMap="BaseShiftdetailInfoResult">
|
||||
<include refid="selectBaseShiftdetailInfoVo"/>
|
||||
where shift_no = #{shiftNo}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseShiftdetailInfo" parameterType="BaseShiftdetailInfo">
|
||||
insert into base_shiftdetail_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="shiftNo != null">shift_no,</if>
|
||||
<if test="postId != null">post_id,</if>
|
||||
<if test="empId != null">emp_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</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="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="shiftNo != null">#{shiftNo},</if>
|
||||
<if test="postId != null">#{postId},</if>
|
||||
<if test="empId != null">#{empId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</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="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseShiftdetailInfo" parameterType="BaseShiftdetailInfo">
|
||||
update base_shiftdetail_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="postId != null">post_id = #{postId},</if>
|
||||
<if test="empId != null">emp_id = #{empId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</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="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where shift_no = #{shiftNo}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseShiftdetailInfoById" parameterType="String">
|
||||
delete from base_shiftdetail_info where shift_no = #{shiftNo}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseShiftdetailInfoByIds" parameterType="String">
|
||||
delete from base_shiftdetail_info where shift_no in
|
||||
<foreach item="shiftNo" collection="array" open="(" separator="," close=")">
|
||||
#{shiftNo}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,114 @@
|
||||
<?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.ruoyi.baseinfo.mapper.BaseShiftmasterInfoMapper">
|
||||
|
||||
<resultMap type="BaseShiftmasterInfo" id="BaseShiftmasterInfoResult">
|
||||
<result property="shiftNo" column="shift_no" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="shiftId" column="shift_id" />
|
||||
<result property="groupId" column="group_id" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="overTime" column="over_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<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="delFlag" column="del_flag" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="shiftname" column="shiftname" />
|
||||
<result property="groupname" column="groupname" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseShiftmasterInfoVo">
|
||||
select shift_no, device_id, shift_id, group_id, start_time, over_time, status, remark, create_by, create_time, update_by, update_time, del_flag from base_shiftmaster_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseShiftmasterInfoList" parameterType="BaseShiftmasterInfo" resultMap="BaseShiftmasterInfoResult">
|
||||
select t1.shift_no, t1.device_id,t2.device_name, t1.shift_id,t3.shiftname, t1.group_id,t4.groupname, t1.start_time, t1.over_time, t1.status, t1.remark, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.del_flag from base_shiftmaster_info t1
|
||||
left join base_device_info t2 on t1.device_id = t2.device_id
|
||||
left join base_shift_info t3 on t1.shift_id = t3.shiftid
|
||||
left join base_group_info t4 on t1.group_id = t4.groupid
|
||||
<where>
|
||||
<if test="deviceId != null and deviceId != ''"> and t1.device_id = #{deviceId}</if>
|
||||
<if test="shiftId != null and shiftId != ''"> and t1.shift_id = #{shiftId}</if>
|
||||
<if test="groupId != null and groupId != ''"> and t1.group_id = #{groupId}</if>
|
||||
<if test="startTime != null "> and t1.start_time = #{startTime}</if>
|
||||
<if test="overTime != null "> and t1.over_time = #{overTime}</if>
|
||||
<if test="status != null and status != ''"> and t1.status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseShiftmasterInfoById" parameterType="String" resultMap="BaseShiftmasterInfoResult">
|
||||
<include refid="selectBaseShiftmasterInfoVo"/>
|
||||
where shift_no = #{shiftNo}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseShiftmasterInfo" parameterType="BaseShiftmasterInfo">
|
||||
insert into base_shiftmaster_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="shiftNo != null">shift_no,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="shiftId != null">shift_id,</if>
|
||||
<if test="groupId != null">group_id,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="overTime != null">over_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</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="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="shiftNo != null">#{shiftNo},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="shiftId != null">#{shiftId},</if>
|
||||
<if test="groupId != null">#{groupId},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="overTime != null">#{overTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</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="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseShiftmasterInfo" parameterType="BaseShiftmasterInfo">
|
||||
update base_shiftmaster_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="shiftId != null">shift_id = #{shiftId},</if>
|
||||
<if test="groupId != null">group_id = #{groupId},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="overTime != null">over_time = #{overTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</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="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where shift_no = #{shiftNo}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseShiftmasterInfoById" parameterType="String">
|
||||
delete from base_shiftmaster_info where shift_no = #{shiftNo}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseShiftmasterInfoByIds" parameterType="String">
|
||||
delete from base_shiftmaster_info where shift_no in
|
||||
<foreach item="shiftNo" collection="array" open="(" separator="," close=")">
|
||||
#{shiftNo}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue