瀏覽代碼

x13-新增拉铆Ng复判相关逻辑

张田野 1 周之前
父節點
當前提交
689e961be7

+ 15 - 0
src/main/java/com/jeesite/modules/mes/dao/MesProductNgDao.java

@@ -0,0 +1,15 @@
+package com.jeesite.modules.mes.dao;
+
+import com.jeesite.common.dao.CrudDao;
+import com.jeesite.common.mybatis.annotation.MyBatisDao;
+import com.jeesite.modules.mes.entity.MesProductNg;
+
+/**
+ * NG中断记录DAO接口
+ * @author hzd
+ * @version 2025-09-18
+ */
+@MyBatisDao
+public interface MesProductNgDao extends CrudDao<MesProductNg> {
+    MesProductNg findInfo(MesProductNg mesProductNg);
+}

+ 110 - 0
src/main/java/com/jeesite/modules/mes/entity/MesProductNg.java

@@ -0,0 +1,110 @@
+package com.jeesite.modules.mes.entity;
+
+import com.jeesite.common.collect.ListUtils;
+import com.jeesite.common.entity.DataEntity;
+import com.jeesite.common.mybatis.annotation.Column;
+import com.jeesite.common.mybatis.annotation.Table;
+import com.jeesite.common.mybatis.mapper.query.QueryType;
+
+import javax.validation.constraints.Size;
+import java.util.List;
+
+/**
+ * NG中断记录Entity
+ * @author hzd
+ * @version 2025-09-18
+ */
+@Table(name="mes_product_ng", alias="a", label="NG中断记录信息", columns={
+		@Column(name="id", attrName="id", label="id", isPK=true),
+		@Column(name="sn", attrName="sn", label="工件码"),
+		@Column(name="line_sn", attrName="lineSn", label="产线编号"),
+		@Column(name="oprno", attrName="oprno", label="工位号",queryType=QueryType.LIKE),
+		@Column(name="state", attrName="state", label="状态"),
+		@Column(name="remark", attrName="remark", label="备注"),
+		@Column(name="pos", attrName="pos", label="位置"),
+		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
+		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false, isUpdateForce=true),
+		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
+		@Column(name="update_date", attrName="updateDate", label="修改日期", isQuery=false, isUpdateForce=true),
+	}, orderBy="a.update_date DESC"
+)
+public class MesProductNg extends DataEntity<MesProductNg> {
+	
+	private static final long serialVersionUID = 1L;
+	private String sn;		// 工件码
+	private String lineSn;		// 产线编号
+	private String oprno;		// 工位号
+	private String state;		// 状态
+	private String remark;		// 备注
+	private String pos;
+	private List img = ListUtils.newArrayList();
+
+	public MesProductNg() {
+		this(null);
+	}
+	
+	public MesProductNg(String id){
+		super(id);
+	}
+	
+	@Size(min=0, max=50, message="工件码长度不能超过 50 个字符")
+	public String getSn() {
+		return sn;
+	}
+
+	public void setSn(String sn) {
+		this.sn = sn;
+	}
+	
+	@Size(min=0, max=30, message="产线编号长度不能超过 30 个字符")
+	public String getLineSn() {
+		return lineSn;
+	}
+
+	public void setLineSn(String lineSn) {
+		this.lineSn = lineSn;
+	}
+	
+	@Size(min=0, max=20, message="工位号长度不能超过 20 个字符")
+	public String getOprno() {
+		return oprno;
+	}
+
+	public void setOprno(String oprno) {
+		this.oprno = oprno;
+	}
+	
+	@Size(min=0, max=1, message="状态长度不能超过 1 个字符")
+	public String getState() {
+		return state;
+	}
+
+	public void setState(String state) {
+		this.state = state;
+	}
+	
+	@Size(min=0, max=255, message="备注长度不能超过 255 个字符")
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public List getImg() {
+		return img;
+	}
+
+	public void setImg(List img) {
+		this.img = img;
+	}
+
+	public String getPos() {
+		return pos;
+	}
+
+	public void setPos(String pos) {
+		this.pos = pos;
+	}
+}

+ 91 - 0
src/main/java/com/jeesite/modules/mes/service/MesProductNgService.java

@@ -0,0 +1,91 @@
+package com.jeesite.modules.mes.service;
+
+import com.jeesite.common.entity.Page;
+import com.jeesite.common.service.CrudService;
+import com.jeesite.modules.file.utils.FileUploadUtils;
+import com.jeesite.modules.mes.dao.MesProductNgDao;
+import com.jeesite.modules.mes.entity.MesProductNg;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * NG中断记录Service
+ * @author hzd
+ * @version 2025-09-18
+ */
+@Service
+public class MesProductNgService extends CrudService<MesProductNgDao, MesProductNg> {
+
+	@Autowired
+	private MesProductNgDao mesProductNgDao;
+
+	/**
+	 * 获取单条数据
+	 * @param mesProductNg
+	 * @return
+	 */
+	@Override
+	public MesProductNg get(MesProductNg mesProductNg) {
+		return super.get(mesProductNg);
+	}
+
+	public MesProductNg findInfo(MesProductNg mesProductNg) {
+		return mesProductNgDao.findInfo(mesProductNg);
+	}
+
+	/**
+	 * 查询分页数据
+	 * @param mesProductNg 查询条件
+	 * @param mesProductNg.page 分页对象
+	 * @return
+	 */
+	@Override
+	public Page<MesProductNg> findPage(MesProductNg mesProductNg) {
+		return super.findPage(mesProductNg);
+	}
+	
+	/**
+	 * 查询列表数据
+	 * @param mesProductNg
+	 * @return
+	 */
+	@Override
+	public List<MesProductNg> findList(MesProductNg mesProductNg) {
+		return super.findList(mesProductNg);
+	}
+	
+	/**
+	 * 保存数据(插入或更新)
+	 * @param mesProductNg
+	 */
+	@Override
+	@Transactional
+	public void save(MesProductNg mesProductNg) {
+		super.save(mesProductNg);
+		FileUploadUtils.saveFileUpload(mesProductNg, mesProductNg.getId(), "mesProductNg_image");
+	}
+	
+	/**
+	 * 更新状态
+	 * @param mesProductNg
+	 */
+	@Override
+	@Transactional
+	public void updateStatus(MesProductNg mesProductNg) {
+		super.updateStatus(mesProductNg);
+	}
+	
+	/**
+	 * 删除数据
+	 * @param mesProductNg
+	 */
+	@Override
+	@Transactional
+	public void delete(MesProductNg mesProductNg) {
+		super.delete(mesProductNg);
+	}
+	
+}

+ 236 - 0
src/main/java/com/jeesite/modules/mes/web/MesProductNgController.java

@@ -0,0 +1,236 @@
+package com.jeesite.modules.mes.web;
+
+import com.jeesite.common.collect.ListUtils;
+import com.jeesite.common.collect.MapUtils;
+import com.jeesite.common.config.Global;
+import com.jeesite.common.entity.Page;
+import com.jeesite.common.lang.ObjectUtils;
+import com.jeesite.common.lang.StringUtils;
+import com.jeesite.common.web.BaseController;
+import com.jeesite.modules.file.entity.FileUpload;
+import com.jeesite.modules.file.service.FileUploadService;
+import com.jeesite.modules.file.utils.FileUploadUtils;
+import com.jeesite.modules.mes.entity.MesProductNg;
+import com.jeesite.modules.mes.resp.CommonResp;
+import com.jeesite.modules.mes.service.MesProductNgService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * NG中断记录Controller
+ * @author hzd
+ * @version 2025-09-18
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/mes/mesProductNg")
+public class MesProductNgController extends BaseController {
+
+	@Autowired
+	private MesProductNgService mesProductNgService;
+
+	@Autowired
+	protected FileUploadService fileUploadService;
+	
+	/**
+	 * 获取数据
+	 */
+	@ModelAttribute
+	public MesProductNg get(String id, boolean isNewRecord) {
+		return mesProductNgService.get(id, isNewRecord);
+	}
+	
+	/**
+	 * 查询列表
+	 */
+	@RequiresPermissions("mes:mesProductNg:view")
+	@RequestMapping(value = {"list", ""})
+	public String list(MesProductNg mesProductNg, Model model) {
+		model.addAttribute("mesProductNg", mesProductNg);
+		return "modules/mes/mesProductNgList";
+	}
+	
+	/**
+	 * 查询列表数据
+	 */
+	@RequiresPermissions("mes:mesProductNg:view")
+	@RequestMapping(value = "listData")
+	@ResponseBody
+	public Page<MesProductNg> listData(MesProductNg mesProductNg, HttpServletRequest request, HttpServletResponse response) {
+		mesProductNg.setPage(new Page<>(request, response));
+		Page<MesProductNg> page = mesProductNgService.findPage(mesProductNg);
+		return page;
+	}
+
+	/**
+	 * 查看编辑表单
+	 */
+	@RequiresPermissions("mes:mesProductNg:view")
+	@RequestMapping(value = "form")
+	public String form(MesProductNg mesProductNg, Model model) {
+		model.addAttribute("mesProductNg", mesProductNg);
+		return "modules/mes/mesProductNgForm";
+	}
+
+	/**
+	 * 保存数据
+	 */
+	@RequiresPermissions("mes:mesProductNg:edit")
+	@PostMapping(value = "save")
+	@ResponseBody
+	public String save(@Validated MesProductNg mesProductNg) {
+		mesProductNgService.save(mesProductNg);
+		return renderResult(Global.TRUE, text("保存NG中断记录成功!"));
+	}
+	
+	/**
+	 * 删除数据
+	 */
+	@RequiresPermissions("mes:mesProductNg:edit")
+	@RequestMapping(value = "delete")
+	@ResponseBody
+	public String delete(MesProductNg mesProductNg) {
+		mesProductNgService.delete(mesProductNg);
+		return renderResult(Global.TRUE, text("删除NG中断记录成功!"));
+	}
+
+//	@RequiresPermissions("mes:mesProductNg:api")
+	@RequestMapping(value = "ulist")
+	@ResponseBody
+	public CommonResp ulist(HttpServletRequest req, HttpServletResponse response) {
+		CommonResp<Page> resp = new CommonResp<>();
+
+		MesProductNg mesProductNg = new MesProductNg();
+		mesProductNg.setPage(new Page<>(req, response));
+		Page<MesProductNg> page = mesProductNgService.findPage(mesProductNg);
+		resp.setData(page);
+		resp.setResult(Global.TRUE);
+		return resp;
+	}
+
+//	@RequiresPermissions("mes:mesProductNg:api")
+	@RequestMapping(value = "detail")
+	@ResponseBody
+	public CommonResp detail(MesProductNg mesProductNg, HttpServletRequest req) {
+		CommonResp<MesProductNg> resp = new CommonResp<>();
+		String host = req.getScheme() + "://" + req.getServerName() + ":" + req.getServerPort() + "/js";
+		Map<String, Object> map = MapUtils.newHashMap();
+
+		// 图片
+		FileUpload fu = new FileUpload();
+		fu.setBizKey(mesProductNg.getId());
+		fu.setBizType("mesProductNg_image");
+		List<FileUpload> finfo = fileUploadService.findList(fu);
+		if (!ListUtils.isEmpty(finfo)) {
+			List imgList = ListUtils.newArrayList();
+			for (FileUpload fi : finfo) {
+				Map<String, Object> map1 = MapUtils.newHashMap();
+				map1.put("id", fi.getFileEntity().getFileId());
+				map1.put("url", host + fi.getFileUrl());
+				map1.put("name", fi.getFileName());
+				map1.put("size", fi.getFileEntity().getFileSize());
+
+				imgList.add(map1);
+			}
+			mesProductNg.setImg(imgList);
+		}
+
+		resp.setData(mesProductNg);
+		resp.setResult(Global.TRUE);
+		return resp;
+	}
+
+//	@RequiresPermissions("mes:mesProductNg:api")
+	@PostMapping(value = "deal")
+	@ResponseBody
+	public String deal(@Validated MesProductNg mesProductNg) {
+		mesProductNg.setState("1");
+		mesProductNgService.save(mesProductNg);
+		return renderResult(Global.TRUE, text("操作成功!"));
+	}
+
+
+	@PostMapping(value = "addData")
+	@ResponseBody
+	public String addData(@Validated MesProductNg mesProductNg) {
+		mesProductNg.setState("0");
+		mesProductNgService.save(mesProductNg);
+		return renderResult(Global.TRUE, text("操作成功!"));
+	}
+
+	@PostMapping(value = "ngcheck")
+	@ResponseBody
+	public String ngcheck(HttpServletRequest req) {
+		String sn =  req.getParameter("sn");
+		String oprno =  req.getParameter("oprno");
+		String lineSn =  req.getParameter("lineSn");
+		String pos =  req.getParameter("pos");
+
+		MesProductNg mesProductNg = new MesProductNg();
+		mesProductNg.setSn(sn);
+		mesProductNg.setOprno(oprno);
+		mesProductNg.setLineSn(lineSn);
+		if(!StringUtils.isEmpty(pos)){
+			mesProductNg.setPos(pos);
+		}
+		MesProductNg mesProductNg2 = mesProductNgService.findInfo(mesProductNg);
+		if(ObjectUtils.isEmpty(mesProductNg2)){
+			return renderResult(Global.TRUE, text("操作成功!"));
+		}
+		if(mesProductNg2.getState().equals("1")){
+			return renderResult(Global.TRUE, text("操作成功!"));
+		}
+		return renderResult(Global.FALSE, text("NG中断未确认"));
+	}
+
+	// pda上传图片处理ng中断
+	@PostMapping("/submit")
+	@ResponseBody
+	public String submit(MesProductNg mesProductNg){
+		// 检查工位码参数
+		String sn = mesProductNg.getSn();
+		if (org.apache.commons.lang3.StringUtils.isBlank(sn))
+			return renderResult(Global.FALSE, "缺少必要参数");
+
+		// 检查工位号参数
+		String oprno = mesProductNg.getOprno();
+		if (org.apache.commons.lang3.StringUtils.isBlank(oprno))
+			return renderResult(Global.FALSE, "缺少必要参数");
+
+		// 检查产线编号参数
+		String lineSn = mesProductNg.getLineSn();
+		if (org.apache.commons.lang3.StringUtils.isBlank(lineSn))
+			return renderResult(Global.FALSE, "缺少必要参数");
+
+		// 按照上面三个参数查询按时间排序最近的一条记录
+		mesProductNg.getSqlMap().getOrder().setOrderBy("create_date desc");
+		MesProductNg mesProductNg2 = mesProductNgService.findInfo(mesProductNg);
+		if (ObjectUtils.isEmpty(mesProductNg2)){
+			return renderResult(Global.FALSE, text("没查到NG中断记录!"));
+		}
+		if ("1".equals(mesProductNg2.getState())){
+			return renderResult(Global.FALSE, text("操作成功!"));
+		}
+		mesProductNg2.setState("1");
+		mesProductNgService.save(mesProductNg2);
+
+		FileUploadUtils.saveFileUpload(mesProductNg2, mesProductNg2.getId(), "mesProductNg_image");
+
+		return renderResult(Global.TRUE, text("操作成功!"));
+	}
+
+
+
+	
+}

+ 3 - 0
src/main/resources/config/application.yml

@@ -681,6 +681,9 @@ shiro:
     ${adminPath}/mes/mesGlueRecord/editSave = anon
     ${adminPath}/mes/mesGlueRecord/edit = anon
     ${adminPath}/mes/mesGlueRecord/listData2 = anon
+    ${adminPath}/mes/mesProductNg/save = anon
+    ${adminPath}/mes/mesProductNg/addData = anon
+    ${adminPath}/mes/mesProductNg/ngcheck = anon
     ${adminPath}/** = user
 
 

+ 24 - 0
src/main/resources/mappings/modules/mes/MesProductNgDao.xml

@@ -0,0 +1,24 @@
+<?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.jeesite.modules.mes.dao.MesProductNgDao">
+	
+	<!-- 查询数据
+	<select id="findList" resultType="MesProductNg">
+		SELECT ${sqlMap.column.toSql()}
+		FROM ${sqlMap.table.toSql()}
+		<where>
+			${sqlMap.where.toSql()}
+		</where>
+		ORDER BY ${sqlMap.order.toSql()}
+	</select> -->
+
+    <select id="findInfo" resultType="com.jeesite.modules.mes.entity.MesProductNg">
+        SELECT ${sqlMap.column.toSql()}
+        FROM ${sqlMap.table.toSql()}
+        <where>
+            ${sqlMap.where.toSql()}
+        </where>
+        ORDER BY ${sqlMap.order.toSql()}
+        LIMIT 1
+    </select>
+</mapper>

+ 103 - 0
src/main/resources/views/modules/mes/mesProductNgForm.html

@@ -0,0 +1,103 @@
+<% layout('/layouts/default.html', {title: 'NG中断记录管理', libs: ['validate','fileupload']}){ %>
+<div class="main-content">
+	<div class="box box-main">
+		<div class="box-header with-border">
+			<div class="box-title">
+				<i class="fa icon-note"></i> ${text('NG中断记录')}
+			</div>
+			<div class="box-tools pull-right">
+				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
+			</div>
+		</div>
+		<#form:form id="inputForm" model="${mesProductNg}" action="${ctx}/mes/mesProductNg/save" method="post" class="form-horizontal">
+			<div class="box-body">
+				<div class="form-unit">${text('基本信息')}</div>
+				<#form:hidden path="id"/>
+				<div class="row">
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('工件码')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="sn" maxlength="50" class="form-control" readonly="true"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('产线编号')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="lineSn" maxlength="30" class="form-control" readonly="true"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('工位号')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="oprno" maxlength="20" class="form-control" readonly="true"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('状态')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:select path="state" dictType="mes_product_ng_state" readonly="true" blankOption="true" class="form-control" />
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('备注')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="remark" maxlength="255" class="form-control" readonly="true" />
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-12">
+						<div class="form-group">
+							<label class="control-label col-sm-2">
+								<span class="required hide">*</span> ${text('图片上传')}:</label>
+							<div class="col-sm-10">
+								<#form:fileupload id="uploadImage" bizKey="${mesProductNg.id}" bizType="mesProductNg_image"
+									uploadType="image" class="" readonly="true" preview="true"/>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div class="box-footer">
+				<div class="row">
+					<div class="col-sm-offset-2 col-sm-10">
+						<% if (hasPermi('mes:mesProductNg:edit')){ %>
+<!--							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;-->
+						<% } %>
+						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
+					</div>
+				</div>
+			</div>
+		</#form:form>
+	</div>
+</div>
+<% } %>
+<script>
+$("#inputForm").validate({
+	submitHandler: function(form){
+		js.ajaxSubmitForm($(form), function(data){
+			js.showMessage(data.message);
+			if(data.result == Global.TRUE){
+				js.closeCurrentTabPage(function(contentWindow){
+					contentWindow.page();
+				});
+			}
+		}, "json");
+    }
+});
+</script>

+ 73 - 0
src/main/resources/views/modules/mes/mesProductNgList.html

@@ -0,0 +1,73 @@
+<% layout('/layouts/default.html', {title: 'NG中断记录管理', libs: ['dataGrid']}){ %>
+<div class="main-content">
+	<div class="box box-main">
+		<div class="box-header">
+			<div class="box-title">
+				<i class="fa icon-notebook"></i> ${mesProductNg.oprno}${text('NG中断记录')}
+			</div>
+			<div class="box-tools pull-right">
+				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
+				<% if(hasPermi('mes:mesProductNg:edit')){ %>
+<!--					<a href="${ctx}/mes/mesProductNg/form" class="btn btn-default btnTool" title="${text('新增NG中断记录')}"><i class="fa fa-plus"></i> ${text('新增')}</a>-->
+				<% } %>
+				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
+			</div>
+		</div>
+		<div class="box-body">
+			<#form:form id="searchForm" model="${mesProductNg}" action="${ctx}/mes/mesProductNg/listData" method="post" class="form-inline hide"
+					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
+			<#form:hidden path="oprno"/>
+				<div class="form-group">
+					<label class="control-label">${text('工件码')}:</label>
+					<div class="control-inline">
+						<#form:input path="sn" maxlength="50" class="form-control width-260"/>
+					</div>
+				</div>
+
+
+				<div class="form-group">
+					<label class="control-label">${text('状态')}:</label>
+					<div class="control-inline width-120">
+						<#form:select path="state" dictType="mes_product_ng_state" blankOption="true" class="form-control"/>
+					</div>
+				</div>
+				<div class="form-group">
+					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
+					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
+				</div>
+			</#form:form>
+			<table id="dataGrid"></table>
+			<div id="dataGridPage"></div>
+		</div>
+	</div>
+</div>
+<% } %>
+<script>
+// 初始化DataGrid对象
+$('#dataGrid').dataGrid({
+	searchForm: $("#searchForm"),
+	columnModel: [
+		{header:'${text("工件码")}', name:'sn', index:'a.sn', width:280, align:"center", frozen:true},
+		{header:'${text("产线编号")}', name:'lineSn', index:'a.line_sn', width:150, align:"center"},
+		{header:'${text("工位号")}', name:'oprno', index:'a.oprno', width:150, align:"center"},
+		{header:'${text("状态")}', name:'state', index:'a.state', width:150, align:"center", formatter: function(val, obj, row, act){
+			return js.getDictLabel(${@DictUtils.getDictListJson('mes_product_ng_state')}, val, '${text("未知")}', true);
+		}},
+		{header:'${text("备注")}', name:'remark', index:'a.remark', width:150, align:"center"},
+		{header:'${text("修改日期")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
+		{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
+			var actions = [];
+			//<% if(hasPermi('mes:mesProductNg:edit')){ %>
+			// 	actions.push('<a href="${ctx}/mes/mesProductNg/form?id='+row.id+'" class="btnList" title="${text("编辑NG中断记录")}"><i class="fa fa-pencil"></i></a>&nbsp;');
+			// 	actions.push('<a href="${ctx}/mes/mesProductNg/delete?id='+row.id+'" class="btnList" title="${text("删除NG中断记录")}" data-confirm="${text("确认要删除该NG中断记录吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
+			//<% } %>
+				actions.push('<a href="${ctx}/mes/mesProductNg/form?id='+row.id+'" class="btnList" title="${text("编辑NG中断记录")}"><i class="fa fa-pencil"></i></a>&nbsp;');
+			return actions.join('');
+		}}
+	],
+	// 加载成功后执行事件
+	ajaxSuccess: function(data){
+		
+	}
+});
+</script>