parent
1f7ed1b0b3
commit
55862e3fab
@ -0,0 +1,126 @@
|
||||
package com.ruoyi.web.controller.nanjing;
|
||||
|
||||
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.nanjing.domain.TRpWorktrayhistoryinfo;
|
||||
import com.ruoyi.nanjing.service.ITRpWorktrayhistoryinfoService;
|
||||
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 limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/nanjing/WorkTrayHistoryInfo")
|
||||
public class TRpWorktrayhistoryinfoController extends BaseController
|
||||
{
|
||||
private String prefix = "nanjing/WorkTrayHistoryInfo";
|
||||
|
||||
@Autowired
|
||||
private ITRpWorktrayhistoryinfoService tRpWorktrayhistoryinfoService;
|
||||
|
||||
@RequiresPermissions("nanjing:WorkTrayHistoryInfo:view")
|
||||
@GetMapping()
|
||||
public String WorkTrayHistoryInfo()
|
||||
{
|
||||
return prefix + "/WorkTrayHistoryInfo";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工位历史生产信息列表
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayHistoryInfo:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo)
|
||||
{
|
||||
startPage();
|
||||
List<TRpWorktrayhistoryinfo> list = tRpWorktrayhistoryinfoService.selectTRpWorktrayhistoryinfoList(tRpWorktrayhistoryinfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工位历史生产信息列表
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayHistoryInfo:export")
|
||||
@Log(title = "工位历史生产信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo)
|
||||
{
|
||||
List<TRpWorktrayhistoryinfo> list = tRpWorktrayhistoryinfoService.selectTRpWorktrayhistoryinfoList(tRpWorktrayhistoryinfo);
|
||||
ExcelUtil<TRpWorktrayhistoryinfo> util = new ExcelUtil<TRpWorktrayhistoryinfo>(TRpWorktrayhistoryinfo.class);
|
||||
return util.exportExcel(list, "WorkTrayHistoryInfo");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工位历史生产信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存工位历史生产信息
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayHistoryInfo:add")
|
||||
@Log(title = "工位历史生产信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo)
|
||||
{
|
||||
return toAjax(tRpWorktrayhistoryinfoService.insertTRpWorktrayhistoryinfo(tRpWorktrayhistoryinfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工位历史生产信息
|
||||
*/
|
||||
@GetMapping("/edit/{currentStation}")
|
||||
public String edit(@PathVariable("currentStation") String currentStation, ModelMap mmap)
|
||||
{
|
||||
TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo = tRpWorktrayhistoryinfoService.selectTRpWorktrayhistoryinfoById(currentStation);
|
||||
mmap.put("tRpWorktrayhistoryinfo", tRpWorktrayhistoryinfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存工位历史生产信息
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayHistoryInfo:edit")
|
||||
@Log(title = "工位历史生产信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo)
|
||||
{
|
||||
return toAjax(tRpWorktrayhistoryinfoService.updateTRpWorktrayhistoryinfo(tRpWorktrayhistoryinfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工位历史生产信息
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayHistoryInfo:remove")
|
||||
@Log(title = "工位历史生产信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(tRpWorktrayhistoryinfoService.deleteTRpWorktrayhistoryinfoByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,184 @@
|
||||
package com.ruoyi.web.controller.nanjing;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.aspectj.weaver.loadtime.Aj;
|
||||
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.nanjing.domain.TRpWorktrayrealtimeinfo;
|
||||
import com.ruoyi.nanjing.service.ITRpWorktrayrealtimeinfoService;
|
||||
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;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 托盘管理Controller
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/nanjing/WorkTrayRealTimeInfo")
|
||||
public class TRpWorktrayrealtimeinfoController extends BaseController
|
||||
{
|
||||
private String prefix = "nanjing/WorkTrayRealTimeInfo";
|
||||
|
||||
@Autowired
|
||||
private ITRpWorktrayrealtimeinfoService tRpWorktrayrealtimeinfoService;
|
||||
|
||||
@RequiresPermissions("nanjing:WorkTrayRealTimeInfo:view")
|
||||
@GetMapping()
|
||||
public String WorkTrayRealTimeInfo()
|
||||
{
|
||||
return prefix + "/WorkTrayRealTimeInfo";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询托盘管理列表
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayRealTimeInfo:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo)
|
||||
{
|
||||
startPage();
|
||||
List<TRpWorktrayrealtimeinfo> list = tRpWorktrayrealtimeinfoService.selectTRpWorktrayrealtimeinfoList(tRpWorktrayrealtimeinfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出托盘管理列表
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayRealTimeInfo:export")
|
||||
@Log(title = "托盘管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo)
|
||||
{
|
||||
List<TRpWorktrayrealtimeinfo> list = tRpWorktrayrealtimeinfoService.selectTRpWorktrayrealtimeinfoList(tRpWorktrayrealtimeinfo);
|
||||
ExcelUtil<TRpWorktrayrealtimeinfo> util = new ExcelUtil<TRpWorktrayrealtimeinfo>(TRpWorktrayrealtimeinfo.class);
|
||||
return util.exportExcel(list, "WorkTrayRealTimeInfo");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增托盘管理
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存托盘管理
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayRealTimeInfo:add")
|
||||
@Log(title = "托盘管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo)
|
||||
{
|
||||
tRpWorktrayrealtimeinfo.setInsertTime(new Date());
|
||||
tRpWorktrayrealtimeinfo.setCurrentStation("0");
|
||||
tRpWorktrayrealtimeinfo.setState(0L);
|
||||
tRpWorktrayrealtimeinfo.setUsedFlag(1L);
|
||||
return toAjax(tRpWorktrayrealtimeinfoService.insertTRpWorktrayrealtimeinfo(tRpWorktrayrealtimeinfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改托盘管理
|
||||
*/
|
||||
@GetMapping("/edit/{rfidNum}")
|
||||
public String edit(@PathVariable("rfidNum") String rfidNum, ModelMap mmap)
|
||||
{
|
||||
TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo = tRpWorktrayrealtimeinfoService.selectTRpWorktrayrealtimeinfoById(rfidNum);
|
||||
mmap.put("tRpWorktrayrealtimeinfo", tRpWorktrayrealtimeinfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存托盘管理
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayRealTimeInfo:edit")
|
||||
@Log(title = "托盘管理", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo)
|
||||
{
|
||||
return toAjax(tRpWorktrayrealtimeinfoService.updateTRpWorktrayrealtimeinfo(tRpWorktrayrealtimeinfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除托盘管理
|
||||
*/
|
||||
@RequiresPermissions("nanjing:WorkTrayRealTimeInfo:remove")
|
||||
@Log(title = "托盘管理", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(tRpWorktrayrealtimeinfoService.deleteTRpWorktrayrealtimeinfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
*启用托盘
|
||||
*/
|
||||
@PostMapping("/start")
|
||||
@ResponseBody
|
||||
public AjaxResult startPallet(HttpServletRequest request){
|
||||
String rfidNum = request.getParameter("rfidNum");
|
||||
String msg = "";
|
||||
TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo = tRpWorktrayrealtimeinfoService.selectTRpWorktrayrealtimeinfoById(rfidNum);
|
||||
if(tRpWorktrayrealtimeinfo.getUsedFlag()==0){
|
||||
tRpWorktrayrealtimeinfo.setUsedFlag(1L);
|
||||
tRpWorktrayrealtimeinfo.setUpdateTime(new Date());
|
||||
int res = tRpWorktrayrealtimeinfoService.updateTRpWorktrayrealtimeinfo(tRpWorktrayrealtimeinfo);
|
||||
if(res>0){
|
||||
msg = "已启用!";
|
||||
return AjaxResult.success(msg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
msg="已是启用状态!";
|
||||
}
|
||||
return AjaxResult.error(msg);
|
||||
}
|
||||
@PostMapping("/end")
|
||||
@ResponseBody
|
||||
public AjaxResult endPallet(HttpServletRequest request){
|
||||
String rfidNum = request.getParameter("rfidNum");
|
||||
String msg = "";
|
||||
TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo = tRpWorktrayrealtimeinfoService.selectTRpWorktrayrealtimeinfoById(rfidNum);
|
||||
if(tRpWorktrayrealtimeinfo.getUsedFlag()==1){
|
||||
tRpWorktrayrealtimeinfo.setUsedFlag(0L);
|
||||
tRpWorktrayrealtimeinfo.setUpdateTime(new Date());
|
||||
tRpWorktrayrealtimeinfo.setDeleteTime(new Date());
|
||||
int res = tRpWorktrayrealtimeinfoService.updateTRpWorktrayrealtimeinfo(tRpWorktrayrealtimeinfo);
|
||||
if(res>0){
|
||||
msg = "已停用!";
|
||||
return AjaxResult.success(msg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
msg="已是停用状态!";
|
||||
}
|
||||
return AjaxResult.error(msg);
|
||||
}
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
<!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>
|
||||
<input type="text" name="rfidNum"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>使用状态:</label>
|
||||
<select name="usedFlag" th:with="type=${@dict.getType('palletUseflag')}">
|
||||
<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>
|
||||
<a class="btn btn-success btn-rounded btn-sm" onclick="$.operate.add()" shiro:hasPermission="nanjing:WorkTrayRealTimeInfo:add"><i class="fa fa-plus"></i> 添加</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="nanjing:WorkTrayRealTimeInfo:export"><i class="fa fa-download"></i> 导出</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</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('nanjing:WorkTrayRealTimeInfo:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('nanjing:WorkTrayRealTimeInfo:remove')}]];
|
||||
var stateDatas = [[${@dict.getType('palletState')}]];
|
||||
var usedFlagDatas = [[${@dict.getType('palletUseflag')}]];
|
||||
var prefix = ctx + "nanjing/WorkTrayRealTimeInfo";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "托盘管理",
|
||||
columns: [
|
||||
{
|
||||
field: 'rfidNum',
|
||||
title: '托盘条码'
|
||||
},
|
||||
{
|
||||
field: 'insertTime',
|
||||
title: '添加时间'
|
||||
},
|
||||
{
|
||||
field: 'deleteTime',
|
||||
title: '停用时间'
|
||||
},
|
||||
{
|
||||
field: 'usedFlag',
|
||||
title: '使用状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(usedFlagDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
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="startUse(\'' + row.rfidNum + '\')"><i class="fa fa-edit"></i>启用</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="endUse(\'' + row.rfidNum + '\')"><i class="fa fa-remove"></i>停用</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function startUse(rfidNum) {
|
||||
var formData = new FormData();
|
||||
formData.append("rfidNum",rfidNum);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: prefix+"/start",
|
||||
data: formData,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: "json",
|
||||
success: function (result) {
|
||||
console.log(result.msg);
|
||||
if (result.code == web_status.SUCCESS){
|
||||
alert(result.msg);
|
||||
$.table.refresh();
|
||||
}else{
|
||||
alert(result.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function endUse(rfidNum) {
|
||||
var formData = new FormData();
|
||||
formData.append("rfidNum",rfidNum);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: prefix+"/end",
|
||||
data: formData,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: "json",
|
||||
success: function (result) {
|
||||
console.log(result.msg);
|
||||
if (result.code == web_status.SUCCESS){
|
||||
alert(result.msg);
|
||||
$.table.refresh();
|
||||
}else{
|
||||
alert(result.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增托盘管理')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-WorkTrayRealTimeInfo-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">托盘条码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rfidNum" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "nanjing/WorkTrayRealTimeInfo"
|
||||
$("#form-WorkTrayRealTimeInfo-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-WorkTrayRealTimeInfo-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改托盘管理')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-WorkTrayRealTimeInfo-edit" th:object="${tRpWorktrayrealtimeinfo}">
|
||||
<input name="rfidNum" th:field="*{rfidNum}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统条码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="barCode" th:field="*{barCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">产线条码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="semiBarcode" th:field="*{semiBarcode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">当前工位:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="currentStation" th:field="*{currentStation}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">质量品级:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="state" class="form-control m-b" th:with="type=${@dict.getType('palletState')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{state}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">使用状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="usedFlag" class="form-control m-b" th:with="type=${@dict.getType('palletUseflag')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{usedFlag}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">添加时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="insertTime" th:value="${#dates.format(tRpWorktrayrealtimeinfo.insertTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">停用时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="deleteTime" th:value="${#dates.format(tRpWorktrayrealtimeinfo.deleteTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "nanjing/WorkTrayRealTimeInfo";
|
||||
$("#form-WorkTrayRealTimeInfo-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-WorkTrayRealTimeInfo-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='insertTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("input[name='deleteTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,81 @@
|
||||
package com.ruoyi.nanjing.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 工位历史生产信息对象 T_RP_WorkTrayHistoryInfo
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
public class TRpWorktrayhistoryinfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 当前工位 */
|
||||
@Excel(name = "当前工位")
|
||||
private String currentStation;
|
||||
|
||||
/** 系统条码 */
|
||||
@Excel(name = "系统条码")
|
||||
private String barCode;
|
||||
|
||||
/** RFID条码 */
|
||||
@Excel(name = "RFID条码")
|
||||
private String rfidNum;
|
||||
|
||||
/** 质量品级 */
|
||||
@Excel(name = "质量品级")
|
||||
private String state;
|
||||
|
||||
public void setCurrentStation(String currentStation)
|
||||
{
|
||||
this.currentStation = currentStation;
|
||||
}
|
||||
|
||||
public String getCurrentStation()
|
||||
{
|
||||
return currentStation;
|
||||
}
|
||||
public void setBarCode(String barCode)
|
||||
{
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public String getBarCode()
|
||||
{
|
||||
return barCode;
|
||||
}
|
||||
public void setRfidNum(String rfidNum)
|
||||
{
|
||||
this.rfidNum = rfidNum;
|
||||
}
|
||||
|
||||
public String getRfidNum()
|
||||
{
|
||||
return rfidNum;
|
||||
}
|
||||
public void setState(String state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("currentStation", getCurrentStation())
|
||||
.append("barCode", getBarCode())
|
||||
.append("rfidNum", getRfidNum())
|
||||
.append("state", getState())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
package com.ruoyi.nanjing.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 托盘管理对象 T_RP_WorkTrayRealTimeInfo
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
public class TRpWorktrayrealtimeinfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 托盘条码 */
|
||||
@Excel(name = "托盘条码")
|
||||
private String rfidNum;
|
||||
|
||||
/** 系统条码 */
|
||||
@Excel(name = "系统条码")
|
||||
private String barCode;
|
||||
|
||||
/** 产线条码 */
|
||||
@Excel(name = "产线条码")
|
||||
private String semiBarcode;
|
||||
|
||||
/** 当前工位 */
|
||||
private String currentStation;
|
||||
|
||||
/** 质量品级 */
|
||||
private Long state;
|
||||
|
||||
/** 使用状态 */
|
||||
@Excel(name = "使用状态")
|
||||
private Long usedFlag;
|
||||
|
||||
/** 添加时间 */
|
||||
@Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date insertTime;
|
||||
|
||||
/** 停用时间 */
|
||||
@Excel(name = "停用时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deleteTime;
|
||||
|
||||
public void setRfidNum(String rfidNum)
|
||||
{
|
||||
this.rfidNum = rfidNum;
|
||||
}
|
||||
|
||||
public String getRfidNum()
|
||||
{
|
||||
return rfidNum;
|
||||
}
|
||||
public void setBarCode(String barCode)
|
||||
{
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public String getBarCode()
|
||||
{
|
||||
return barCode;
|
||||
}
|
||||
public void setSemiBarcode(String semiBarcode)
|
||||
{
|
||||
this.semiBarcode = semiBarcode;
|
||||
}
|
||||
|
||||
public String getSemiBarcode()
|
||||
{
|
||||
return semiBarcode;
|
||||
}
|
||||
public void setCurrentStation(String currentStation)
|
||||
{
|
||||
this.currentStation = currentStation;
|
||||
}
|
||||
|
||||
public String getCurrentStation()
|
||||
{
|
||||
return currentStation;
|
||||
}
|
||||
public void setState(Long state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
public void setUsedFlag(Long usedFlag)
|
||||
{
|
||||
this.usedFlag = usedFlag;
|
||||
}
|
||||
|
||||
public Long getUsedFlag()
|
||||
{
|
||||
return usedFlag;
|
||||
}
|
||||
public void setInsertTime(Date insertTime)
|
||||
{
|
||||
this.insertTime = insertTime;
|
||||
}
|
||||
|
||||
public Date getInsertTime()
|
||||
{
|
||||
return insertTime;
|
||||
}
|
||||
public void setDeleteTime(Date deleteTime)
|
||||
{
|
||||
this.deleteTime = deleteTime;
|
||||
}
|
||||
|
||||
public Date getDeleteTime()
|
||||
{
|
||||
return deleteTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("rfidNum", getRfidNum())
|
||||
.append("barCode", getBarCode())
|
||||
.append("semiBarcode", getSemiBarcode())
|
||||
.append("currentStation", getCurrentStation())
|
||||
.append("state", getState())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("usedFlag", getUsedFlag())
|
||||
.append("insertTime", getInsertTime())
|
||||
.append("deleteTime", getDeleteTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.nanjing.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.nanjing.domain.TRpWorktrayhistoryinfo;
|
||||
|
||||
/**
|
||||
* 工位历史生产信息Mapper接口
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
public interface TRpWorktrayhistoryinfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询工位历史生产信息
|
||||
*
|
||||
* @param currentStation 工位历史生产信息ID
|
||||
* @return 工位历史生产信息
|
||||
*/
|
||||
public TRpWorktrayhistoryinfo selectTRpWorktrayhistoryinfoById(String currentStation);
|
||||
|
||||
/**
|
||||
* 查询工位历史生产信息列表
|
||||
*
|
||||
* @param tRpWorktrayhistoryinfo 工位历史生产信息
|
||||
* @return 工位历史生产信息集合
|
||||
*/
|
||||
public List<TRpWorktrayhistoryinfo> selectTRpWorktrayhistoryinfoList(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo);
|
||||
|
||||
/**
|
||||
* 新增工位历史生产信息
|
||||
*
|
||||
* @param tRpWorktrayhistoryinfo 工位历史生产信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTRpWorktrayhistoryinfo(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo);
|
||||
|
||||
/**
|
||||
* 修改工位历史生产信息
|
||||
*
|
||||
* @param tRpWorktrayhistoryinfo 工位历史生产信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTRpWorktrayhistoryinfo(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo);
|
||||
|
||||
/**
|
||||
* 删除工位历史生产信息
|
||||
*
|
||||
* @param currentStation 工位历史生产信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTRpWorktrayhistoryinfoById(String currentStation);
|
||||
|
||||
/**
|
||||
* 批量删除工位历史生产信息
|
||||
*
|
||||
* @param currentStations 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTRpWorktrayhistoryinfoByIds(String[] currentStations);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.nanjing.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.nanjing.domain.TRpWorktrayrealtimeinfo;
|
||||
|
||||
/**
|
||||
* 托盘管理Mapper接口
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
public interface TRpWorktrayrealtimeinfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询托盘管理
|
||||
*
|
||||
* @param rfidNum 托盘管理ID
|
||||
* @return 托盘管理
|
||||
*/
|
||||
public TRpWorktrayrealtimeinfo selectTRpWorktrayrealtimeinfoById(String rfidNum);
|
||||
|
||||
/**
|
||||
* 查询托盘管理列表
|
||||
*
|
||||
* @param tRpWorktrayrealtimeinfo 托盘管理
|
||||
* @return 托盘管理集合
|
||||
*/
|
||||
public List<TRpWorktrayrealtimeinfo> selectTRpWorktrayrealtimeinfoList(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo);
|
||||
|
||||
/**
|
||||
* 新增托盘管理
|
||||
*
|
||||
* @param tRpWorktrayrealtimeinfo 托盘管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTRpWorktrayrealtimeinfo(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo);
|
||||
|
||||
/**
|
||||
* 修改托盘管理
|
||||
*
|
||||
* @param tRpWorktrayrealtimeinfo 托盘管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTRpWorktrayrealtimeinfo(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo);
|
||||
|
||||
/**
|
||||
* 删除托盘管理
|
||||
*
|
||||
* @param rfidNum 托盘管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTRpWorktrayrealtimeinfoById(String rfidNum);
|
||||
|
||||
/**
|
||||
* 批量删除托盘管理
|
||||
*
|
||||
* @param rfidNums 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTRpWorktrayrealtimeinfoByIds(String[] rfidNums);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.nanjing.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.nanjing.domain.TRpWorktrayhistoryinfo;
|
||||
|
||||
/**
|
||||
* 工位历史生产信息Service接口
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
public interface ITRpWorktrayhistoryinfoService
|
||||
{
|
||||
/**
|
||||
* 查询工位历史生产信息
|
||||
*
|
||||
* @param currentStation 工位历史生产信息ID
|
||||
* @return 工位历史生产信息
|
||||
*/
|
||||
public TRpWorktrayhistoryinfo selectTRpWorktrayhistoryinfoById(String currentStation);
|
||||
|
||||
/**
|
||||
* 查询工位历史生产信息列表
|
||||
*
|
||||
* @param tRpWorktrayhistoryinfo 工位历史生产信息
|
||||
* @return 工位历史生产信息集合
|
||||
*/
|
||||
public List<TRpWorktrayhistoryinfo> selectTRpWorktrayhistoryinfoList(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo);
|
||||
|
||||
/**
|
||||
* 新增工位历史生产信息
|
||||
*
|
||||
* @param tRpWorktrayhistoryinfo 工位历史生产信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTRpWorktrayhistoryinfo(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo);
|
||||
|
||||
/**
|
||||
* 修改工位历史生产信息
|
||||
*
|
||||
* @param tRpWorktrayhistoryinfo 工位历史生产信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTRpWorktrayhistoryinfo(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo);
|
||||
|
||||
/**
|
||||
* 批量删除工位历史生产信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTRpWorktrayhistoryinfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除工位历史生产信息信息
|
||||
*
|
||||
* @param currentStation 工位历史生产信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTRpWorktrayhistoryinfoById(String currentStation);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.nanjing.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.nanjing.domain.TRpWorktrayrealtimeinfo;
|
||||
|
||||
/**
|
||||
* 托盘管理Service接口
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
public interface ITRpWorktrayrealtimeinfoService
|
||||
{
|
||||
/**
|
||||
* 查询托盘管理
|
||||
*
|
||||
* @param rfidNum 托盘管理ID
|
||||
* @return 托盘管理
|
||||
*/
|
||||
public TRpWorktrayrealtimeinfo selectTRpWorktrayrealtimeinfoById(String rfidNum);
|
||||
|
||||
/**
|
||||
* 查询托盘管理列表
|
||||
*
|
||||
* @param tRpWorktrayrealtimeinfo 托盘管理
|
||||
* @return 托盘管理集合
|
||||
*/
|
||||
public List<TRpWorktrayrealtimeinfo> selectTRpWorktrayrealtimeinfoList(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo);
|
||||
|
||||
/**
|
||||
* 新增托盘管理
|
||||
*
|
||||
* @param tRpWorktrayrealtimeinfo 托盘管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTRpWorktrayrealtimeinfo(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo);
|
||||
|
||||
/**
|
||||
* 修改托盘管理
|
||||
*
|
||||
* @param tRpWorktrayrealtimeinfo 托盘管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTRpWorktrayrealtimeinfo(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo);
|
||||
|
||||
/**
|
||||
* 批量删除托盘管理
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTRpWorktrayrealtimeinfoByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除托盘管理信息
|
||||
*
|
||||
* @param rfidNum 托盘管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTRpWorktrayrealtimeinfoById(String rfidNum);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.nanjing.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.nanjing.mapper.TRpWorktrayhistoryinfoMapper;
|
||||
import com.ruoyi.nanjing.domain.TRpWorktrayhistoryinfo;
|
||||
import com.ruoyi.nanjing.service.ITRpWorktrayhistoryinfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 工位历史生产信息Service业务层处理
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
@Service
|
||||
public class TRpWorktrayhistoryinfoServiceImpl implements ITRpWorktrayhistoryinfoService
|
||||
{
|
||||
@Autowired
|
||||
private TRpWorktrayhistoryinfoMapper tRpWorktrayhistoryinfoMapper;
|
||||
|
||||
/**
|
||||
* 查询工位历史生产信息
|
||||
*
|
||||
* @param currentStation 工位历史生产信息ID
|
||||
* @return 工位历史生产信息
|
||||
*/
|
||||
@Override
|
||||
public TRpWorktrayhistoryinfo selectTRpWorktrayhistoryinfoById(String currentStation)
|
||||
{
|
||||
return tRpWorktrayhistoryinfoMapper.selectTRpWorktrayhistoryinfoById(currentStation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工位历史生产信息列表
|
||||
*
|
||||
* @param tRpWorktrayhistoryinfo 工位历史生产信息
|
||||
* @return 工位历史生产信息
|
||||
*/
|
||||
@Override
|
||||
public List<TRpWorktrayhistoryinfo> selectTRpWorktrayhistoryinfoList(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo)
|
||||
{
|
||||
return tRpWorktrayhistoryinfoMapper.selectTRpWorktrayhistoryinfoList(tRpWorktrayhistoryinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工位历史生产信息
|
||||
*
|
||||
* @param tRpWorktrayhistoryinfo 工位历史生产信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTRpWorktrayhistoryinfo(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo)
|
||||
{
|
||||
return tRpWorktrayhistoryinfoMapper.insertTRpWorktrayhistoryinfo(tRpWorktrayhistoryinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工位历史生产信息
|
||||
*
|
||||
* @param tRpWorktrayhistoryinfo 工位历史生产信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTRpWorktrayhistoryinfo(TRpWorktrayhistoryinfo tRpWorktrayhistoryinfo)
|
||||
{
|
||||
tRpWorktrayhistoryinfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return tRpWorktrayhistoryinfoMapper.updateTRpWorktrayhistoryinfo(tRpWorktrayhistoryinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工位历史生产信息对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTRpWorktrayhistoryinfoByIds(String ids)
|
||||
{
|
||||
return tRpWorktrayhistoryinfoMapper.deleteTRpWorktrayhistoryinfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工位历史生产信息信息
|
||||
*
|
||||
* @param currentStation 工位历史生产信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTRpWorktrayhistoryinfoById(String currentStation)
|
||||
{
|
||||
return tRpWorktrayhistoryinfoMapper.deleteTRpWorktrayhistoryinfoById(currentStation);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.nanjing.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.nanjing.mapper.TRpWorktrayrealtimeinfoMapper;
|
||||
import com.ruoyi.nanjing.domain.TRpWorktrayrealtimeinfo;
|
||||
import com.ruoyi.nanjing.service.ITRpWorktrayrealtimeinfoService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 托盘管理Service业务层处理
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-28
|
||||
*/
|
||||
@Service
|
||||
public class TRpWorktrayrealtimeinfoServiceImpl implements ITRpWorktrayrealtimeinfoService
|
||||
{
|
||||
@Autowired
|
||||
private TRpWorktrayrealtimeinfoMapper tRpWorktrayrealtimeinfoMapper;
|
||||
|
||||
/**
|
||||
* 查询托盘管理
|
||||
*
|
||||
* @param rfidNum 托盘管理ID
|
||||
* @return 托盘管理
|
||||
*/
|
||||
@Override
|
||||
public TRpWorktrayrealtimeinfo selectTRpWorktrayrealtimeinfoById(String rfidNum)
|
||||
{
|
||||
return tRpWorktrayrealtimeinfoMapper.selectTRpWorktrayrealtimeinfoById(rfidNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询托盘管理列表
|
||||
*
|
||||
* @param tRpWorktrayrealtimeinfo 托盘管理
|
||||
* @return 托盘管理
|
||||
*/
|
||||
@Override
|
||||
public List<TRpWorktrayrealtimeinfo> selectTRpWorktrayrealtimeinfoList(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo)
|
||||
{
|
||||
return tRpWorktrayrealtimeinfoMapper.selectTRpWorktrayrealtimeinfoList(tRpWorktrayrealtimeinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增托盘管理
|
||||
*
|
||||
* @param tRpWorktrayrealtimeinfo 托盘管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTRpWorktrayrealtimeinfo(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo)
|
||||
{
|
||||
return tRpWorktrayrealtimeinfoMapper.insertTRpWorktrayrealtimeinfo(tRpWorktrayrealtimeinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改托盘管理
|
||||
*
|
||||
* @param tRpWorktrayrealtimeinfo 托盘管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTRpWorktrayrealtimeinfo(TRpWorktrayrealtimeinfo tRpWorktrayrealtimeinfo)
|
||||
{
|
||||
tRpWorktrayrealtimeinfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return tRpWorktrayrealtimeinfoMapper.updateTRpWorktrayrealtimeinfo(tRpWorktrayrealtimeinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除托盘管理对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTRpWorktrayrealtimeinfoByIds(String ids)
|
||||
{
|
||||
return tRpWorktrayrealtimeinfoMapper.deleteTRpWorktrayrealtimeinfoByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除托盘管理信息
|
||||
*
|
||||
* @param rfidNum 托盘管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTRpWorktrayrealtimeinfoById(String rfidNum)
|
||||
{
|
||||
return tRpWorktrayrealtimeinfoMapper.deleteTRpWorktrayrealtimeinfoById(rfidNum);
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
<?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.nanjing.mapper.TRpWorktrayhistoryinfoMapper">
|
||||
|
||||
<resultMap type="TRpWorktrayhistoryinfo" id="TRpWorktrayhistoryinfoResult">
|
||||
<result property="currentStation" column="CurrentStation" />
|
||||
<result property="barCode" column="barCode" />
|
||||
<result property="rfidNum" column="RFIDNum" />
|
||||
<result property="state" column="State" />
|
||||
<result property="updateTime" column="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTRpWorktrayhistoryinfoVo">
|
||||
select CurrentStation, barCode, RFIDNum, State, updateTime from T_RP_WorkTrayHistoryInfo
|
||||
</sql>
|
||||
|
||||
<select id="selectTRpWorktrayhistoryinfoList" parameterType="TRpWorktrayhistoryinfo" resultMap="TRpWorktrayhistoryinfoResult">
|
||||
<include refid="selectTRpWorktrayhistoryinfoVo"/>
|
||||
<where>
|
||||
<if test="currentStation != null and currentStation != ''"> and CurrentStation = #{currentStation}</if>
|
||||
<if test="barCode != null and barCode != ''"> and barCode = #{barCode}</if>
|
||||
<if test="rfidNum != null "> and RFIDNum = #{rfidNum}</if>
|
||||
<if test="state != null and state != ''"> and State = #{state}</if>
|
||||
<if test="updateTime != null "> and updateTime = #{updateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTRpWorktrayhistoryinfoById" parameterType="String" resultMap="TRpWorktrayhistoryinfoResult">
|
||||
<include refid="selectTRpWorktrayhistoryinfoVo"/>
|
||||
where CurrentStation = #{currentStation}
|
||||
</select>
|
||||
|
||||
<insert id="insertTRpWorktrayhistoryinfo" parameterType="TRpWorktrayhistoryinfo">
|
||||
insert into T_RP_WorkTrayHistoryInfo
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="currentStation != null">CurrentStation,</if>
|
||||
<if test="barCode != null">barCode,</if>
|
||||
<if test="rfidNum != null">RFIDNum,</if>
|
||||
<if test="state != null">State,</if>
|
||||
<if test="updateTime != null">updateTime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="currentStation != null">#{currentStation},</if>
|
||||
<if test="barCode != null">#{barCode},</if>
|
||||
<if test="rfidNum != null">#{rfidNum},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTRpWorktrayhistoryinfo" parameterType="TRpWorktrayhistoryinfo">
|
||||
update T_RP_WorkTrayHistoryInfo
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="barCode != null">barCode = #{barCode},</if>
|
||||
<if test="rfidNum != null">RFIDNum = #{rfidNum},</if>
|
||||
<if test="state != null">State = #{state},</if>
|
||||
<if test="updateTime != null">updateTime = #{updateTime},</if>
|
||||
</trim>
|
||||
where CurrentStation = #{currentStation}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTRpWorktrayhistoryinfoById" parameterType="String">
|
||||
delete from T_RP_WorkTrayHistoryInfo where CurrentStation = #{currentStation}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTRpWorktrayhistoryinfoByIds" parameterType="String">
|
||||
delete from T_RP_WorkTrayHistoryInfo where CurrentStation in
|
||||
<foreach item="currentStation" collection="array" open="(" separator="," close=")">
|
||||
#{currentStation}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,88 @@
|
||||
<?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.nanjing.mapper.TRpWorktrayrealtimeinfoMapper">
|
||||
|
||||
<resultMap type="TRpWorktrayrealtimeinfo" id="TRpWorktrayrealtimeinfoResult">
|
||||
<result property="rfidNum" column="RFIDNum" />
|
||||
<result property="barCode" column="barCode" />
|
||||
<result property="semiBarcode" column="SemiBarcode" />
|
||||
<result property="currentStation" column="CurrentStation" />
|
||||
<result property="state" column="State" />
|
||||
<result property="updateTime" column="updateTime" />
|
||||
<result property="usedFlag" column="UsedFlag" />
|
||||
<result property="insertTime" column="InsertTime" />
|
||||
<result property="deleteTime" column="DeleteTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTRpWorktrayrealtimeinfoVo">
|
||||
select RFIDNum, barCode, SemiBarcode, CurrentStation, State, updateTime, UsedFlag, InsertTime, DeleteTime from T_RP_WorkTrayRealTimeInfo
|
||||
</sql>
|
||||
|
||||
<select id="selectTRpWorktrayrealtimeinfoList" parameterType="TRpWorktrayrealtimeinfo" resultMap="TRpWorktrayrealtimeinfoResult">
|
||||
<include refid="selectTRpWorktrayrealtimeinfoVo"/>
|
||||
<where>
|
||||
<if test="rfidNum != '' "> and RFIDNum like ('%' + #{rfidNum} + '%')</if>
|
||||
<if test="usedFlag != null "> and UsedFlag = #{usedFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTRpWorktrayrealtimeinfoById" parameterType="String" resultMap="TRpWorktrayrealtimeinfoResult">
|
||||
<include refid="selectTRpWorktrayrealtimeinfoVo"/>
|
||||
where RFIDNum = #{rfidNum}
|
||||
</select>
|
||||
|
||||
<insert id="insertTRpWorktrayrealtimeinfo" parameterType="TRpWorktrayrealtimeinfo">
|
||||
insert into T_RP_WorkTrayRealTimeInfo
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="rfidNum != null">RFIDNum,</if>
|
||||
<if test="barCode != null">barCode,</if>
|
||||
<if test="semiBarcode != null">SemiBarcode,</if>
|
||||
<if test="currentStation != null">CurrentStation,</if>
|
||||
<if test="state != null">State,</if>
|
||||
<if test="updateTime != null">updateTime,</if>
|
||||
<if test="usedFlag != null">UsedFlag,</if>
|
||||
<if test="insertTime != null">InsertTime,</if>
|
||||
<if test="deleteTime != null">DeleteTime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rfidNum != null">#{rfidNum},</if>
|
||||
<if test="barCode != null">#{barCode},</if>
|
||||
<if test="semiBarcode != null">#{semiBarcode},</if>
|
||||
<if test="currentStation != null">#{currentStation},</if>
|
||||
<if test="state != null">#{state},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="usedFlag != null">#{usedFlag},</if>
|
||||
<if test="insertTime != null">#{insertTime},</if>
|
||||
<if test="deleteTime != null">#{deleteTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTRpWorktrayrealtimeinfo" parameterType="TRpWorktrayrealtimeinfo">
|
||||
update T_RP_WorkTrayRealTimeInfo
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="barCode != null">barCode = #{barCode},</if>
|
||||
<if test="semiBarcode != null">SemiBarcode = #{semiBarcode},</if>
|
||||
<if test="currentStation != null">CurrentStation = #{currentStation},</if>
|
||||
<if test="state != null">State = #{state},</if>
|
||||
<if test="updateTime != null">updateTime = #{updateTime},</if>
|
||||
<if test="usedFlag != null">UsedFlag = #{usedFlag},</if>
|
||||
<if test="insertTime != null">InsertTime = #{insertTime},</if>
|
||||
<if test="deleteTime != null">DeleteTime = #{deleteTime},</if>
|
||||
</trim>
|
||||
where RFIDNum = #{rfidNum}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTRpWorktrayrealtimeinfoById" parameterType="String">
|
||||
delete from T_RP_WorkTrayRealTimeInfo where RFIDNum = #{rfidNum}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTRpWorktrayrealtimeinfoByIds" parameterType="String">
|
||||
delete from T_RP_WorkTrayRealTimeInfo where RFIDNum in
|
||||
<foreach item="rfidNum" collection="array" open="(" separator="," close=")">
|
||||
#{rfidNum}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue