工位参数设置添加或修改

托盘管理实现
dep_wangsr
Limy 4 years ago
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);
}
}

@ -1,6 +1,11 @@
package com.ruoyi.web.controller.nanjing; package com.ruoyi.web.controller.nanjing;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.nanjing.domain.TBdProductinfo;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -114,6 +119,42 @@ public class TSyStationparameternotesController extends BaseController
return toAjax(tSyStationparameternotesService.updateTSyStationparameternotes(tSyStationparameternotes)); return toAjax(tSyStationparameternotesService.updateTSyStationparameternotes(tSyStationparameternotes));
} }
@RequiresPermissions("nanjing:SubStation:param")
@PostMapping("/editParmSave")
@ResponseBody
public AjaxResult editParmSave(HttpServletRequest request){
// 查询实体
int res = 0;
// 结果实体列表
List<TSyStationparameternotes> ts = new ArrayList();
String StationID = request.getParameter("stationID");
String StationCode = request.getParameter("stationCode");
String TableName = request.getParameter("tableName");
String para = request.getParameter("paras");
String[] paras = para.split(",");
for (int i=1;i<=paras.length;i++){
TSyStationparameternotes tSyStationparameternotes = new TSyStationparameternotes();
if(!(paras[i-1].equals(""))||paras[i-1]!=null){ //参数不为空时执行
tSyStationparameternotes.setTabelName(TableName);
tSyStationparameternotes.setParaColumn("Para"+i);
ts = tSyStationparameternotesService.selectTSyStationparameternotesList(tSyStationparameternotes);
if(ts.size()==0){ //判断不存在此参数记录,则新增记录
tSyStationparameternotes.setStationCode(StationCode);
tSyStationparameternotes.setStationID(StationID);
tSyStationparameternotes.setUsedFlag("1");
tSyStationparameternotes.setParaMeaning(paras[i-1]);
res =tSyStationparameternotesService.insertTSyStationparameternotes(tSyStationparameternotes);
}else{ //判断存在此参数记录,则更新
tSyStationparameternotes.setId(ts.get(0).getId());
tSyStationparameternotes.setStationCode(StationCode);
tSyStationparameternotes.setStationID(StationID);
tSyStationparameternotes.setParaMeaning(paras[i-1]);
res=tSyStationparameternotesService.updateTSyStationparameternotes(tSyStationparameternotes);
}
}
}
return toAjax(res);
}
/** /**
* *
*/ */
@ -144,10 +185,6 @@ public class TSyStationparameternotesController extends BaseController
paraMean=""; paraMean="";
} }
} }
// TSyStationparameternotes tSyStationparameternotes = tSyStationparameternotesService.getParaVal(stationID,para);
// if(tSyStationparameternotes.getParaMeaning().equals("")||tSyStationparameternotes.getParaMeaning()==null){
// return AjaxResult.error(" ");
// }
return AjaxResult.success(paraMean); return AjaxResult.success(paraMean);
} }
} }

@ -106,7 +106,7 @@
function jmpParam(id) { function jmpParam(id) {
var url = table.options.editParamUrl.replace("{id}", id); var url = table.options.editParamUrl.replace("{id}", id);
console.log(url); // console.log(url);
$.modal.open("修改工位参数", url); $.modal.open("修改工位参数", url);
} }
</script> </script>

@ -22,7 +22,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">工位代码:</label> <label class="col-sm-3 control-label">工位代码:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="StationCode" th:field="*{StationCode}" class="form-control" readonly="readonly"> <input id="StationCode" name="StationCode" th:field="*{StationCode}" class="form-control" readonly="readonly">
</div> </div>
</div> </div>
<!-- <div class="form-group">--> <!-- <div class="form-group">-->
@ -36,7 +36,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">系统数据表:</label> <label class="col-sm-3 control-label">系统数据表:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="TableName" th:field="*{TableName}" class="form-control" readonly="readonly"> <input id="TableName" name="TableName" th:field="*{TableName}" class="form-control" readonly="readonly">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -45,30 +45,6 @@
<input id="paraCount" name="paraCount" th:field="*{paraCount}" class="form-control" readonly="readonly"> <input id="paraCount" name="paraCount" th:field="*{paraCount}" class="form-control" readonly="readonly">
</div> </div>
</div> </div>
<!-- <div class="form-group" id="parameter">-->
<!-- </div>-->
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">排序id</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="OrderID" th:field="*{OrderID}" 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="LimitID" class="form-control m-b" th:field="*{LimitID}" th:with="type=${@dict.getType('limitshow')}">-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">线路类型:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select name="LineID" class="form-control" th:field="*{LineID}">-->
<!-- <option th:each="st:${linename}" th:value="${st.LineID}" th:text="${st.LineTypeName}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
@ -81,17 +57,37 @@
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var formData = new FormData(); var formData = new FormData();
formData.append("StationID",$("StationID").val()); var para = new Array();
formData.append("StationCode",$("StationCode").val()); formData.append("stationID",$("#StationID").val());
formData.append("TableName",$("TableName").val()); formData.append("stationCode",$("#StationCode").val());
for () formData.append("tableName",$("#TableName").val());
$.operate.save(prefix + "/editParmSave", formData ); //$('#form-SubStation-editParam').serialize() $("input[name='para']").each(function(){
para.push($(this).val());
});
formData.append("paras",para);
$.ajax({
type: "post",
url: prefix + "/editParmSave",
data: formData,
contentType: false,
processData: false,
dataType: "json",
success: function (result) {
// console.log(result.msg);
if (result.code == web_status.SUCCESS){
alert(result.msg);
$.modal.close();
}else{
alert(result.msg);
}
}
});
} }
} }
$(function() { $(function() {
var paramCount = $('#paraCount').val(); var paramCount = $('#paraCount').val();
console.log(paramCount); // console.log(paramCount);
var i =0; var i =0;
while(i<paramCount) { while(i<paramCount) {
i++; i++;
@ -118,7 +114,7 @@
// 在div中添加txt // 在div中添加txt
var txt = document.createElement("input"); var txt = document.createElement("input");
var name = "Para"+num; var name = "Para"+num;
txt.setAttribute("name",name); txt.setAttribute("name","para");
txt.setAttribute("class","form-control"); txt.setAttribute("class","form-control");
div1.appendChild(txt); div1.appendChild(txt);
//换行 //换行
@ -136,7 +132,7 @@
processData: false, processData: false,
dataType: "json", dataType: "json",
success: function (result) { success: function (result) {
console.log(result.msg); // console.log(result.msg);
if (result.code == web_status.SUCCESS){ if (result.code == web_status.SUCCESS){
txt.value = result.msg; txt.value = result.msg;
}else{ }else{

@ -0,0 +1,122 @@
<!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="currentStation"/>
</li>
<li>
<label>系统条码:</label>
<input type="text" name="barCode"/>
</li>
<li>
<label>RFID条码</label>
<input type="text" name="rfidNum"/>
</li>
<li>
<label>质量品级:</label>
<select name="state" th:with="type=${@dict.getType('palletState')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li class="select-time">
<label>更新时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginUpdateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endUpdateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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="nanjing:WorkTrayHistoryInfo:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="nanjing:WorkTrayHistoryInfo:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="nanjing:WorkTrayHistoryInfo:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="nanjing:WorkTrayHistoryInfo: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('nanjing:WorkTrayHistoryInfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('nanjing:WorkTrayHistoryInfo:remove')}]];
var stateDatas = [[${@dict.getType('palletState')}]];
var prefix = ctx + "nanjing/WorkTrayHistoryInfo";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "工位历史生产信息",
columns: [{
checkbox: true
},
{
field: 'currentStation',
title: '当前工位'
},
{
field: 'barCode',
title: '系统条码'
},
{
field: 'rfidNum',
title: 'RFID条码'
},
{
field: 'state',
title: '质量品级',
formatter: function(value, row, index) {
return $.table.selectDictLabel(stateDatas, value);
}
},
{
field: 'updateTime',
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.currentStation + '\')"><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.currentStation + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

@ -0,0 +1,51 @@
<!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-WorkTrayHistoryInfo-add">
<div class="form-group">
<label class="col-sm-3 control-label">当前工位:</label>
<div class="col-sm-8">
<input name="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">
<input name="barCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RFID条码</label>
<div class="col-sm-8">
<input name="rfidNum" 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}"></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "nanjing/WorkTrayHistoryInfo"
$("#form-WorkTrayHistoryInfo-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-WorkTrayHistoryInfo-add').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,52 @@
<!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-WorkTrayHistoryInfo-edit" th:object="${tRpWorktrayhistoryinfo}">
<input name="currentStation" th:field="*{currentStation}" type="hidden">
<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">
<input name="barCode" th:field="*{barCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">RFID条码</label>
<div class="col-sm-8">
<input name="rfidNum" th:field="*{rfidNum}" 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>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "nanjing/WorkTrayHistoryInfo";
$("#form-WorkTrayHistoryInfo-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-WorkTrayHistoryInfo-edit').serialize());
}
}
</script>
</body>
</html>

@ -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>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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);
}

@ -62,4 +62,5 @@ public interface TSyStationparameternotesMapper
TSyStationparameternotes getParaVal(String stationID, String para); TSyStationparameternotes getParaVal(String stationID, String para);
List<TSyStationparameternotes> selectByStationID(String stationID); List<TSyStationparameternotes> selectByStationID(String stationID);
} }

@ -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);
}

@ -62,4 +62,5 @@ public interface ITSyStationparameternotesService
TSyStationparameternotes getParaVal(String stationID, String para); TSyStationparameternotes getParaVal(String stationID, String para);
List<TSyStationparameternotes> selectByStationID(String stationID); List<TSyStationparameternotes> selectByStationID(String stationID);
} }

@ -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);
}
}

@ -101,4 +101,5 @@ public class TSyStationparameternotesServiceImpl implements ITSyStationparameter
public List<TSyStationparameternotes> selectByStationID(String stationID) { public List<TSyStationparameternotes> selectByStationID(String stationID) {
return tSyStationparameternotesMapper.selectByStationID(stationID); return tSyStationparameternotesMapper.selectByStationID(stationID);
} }
} }

@ -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>

@ -50,10 +50,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where StationID = #{stationID} where StationID = #{stationID}
</select> </select>
<insert id="insertTSyStationparameternotes" parameterType="TSyStationparameternotes"> <insert id="insertTSyStationparameternotes" parameterType="TSyStationparameternotes">
insert into T_SY_StationParameterNotes insert into T_SY_StationParameterNotes
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">ID,</if> <!-- <if test="id != null">ID,</if>-->
<if test="tabelName != null">TabelName,</if> <if test="tabelName != null">TabelName,</if>
<if test="paraColumn != null">ParaColumn,</if> <if test="paraColumn != null">ParaColumn,</if>
<if test="paraMeaning != null">ParaMeaning,</if> <if test="paraMeaning != null">ParaMeaning,</if>
@ -65,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="usedFlag != null">UsedFlag,</if> <if test="usedFlag != null">UsedFlag,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <!-- <if test="id != null">#{id},</if>-->
<if test="tabelName != null">#{tabelName},</if> <if test="tabelName != null">#{tabelName},</if>
<if test="paraColumn != null">#{paraColumn},</if> <if test="paraColumn != null">#{paraColumn},</if>
<if test="paraMeaning != null">#{paraMeaning},</if> <if test="paraMeaning != null">#{paraMeaning},</if>

Loading…
Cancel
Save