| New file |
| | |
| | | -- save basDevpErrorLog record |
| | | -- mysql |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basDevpErrorLog/basDevpErrorLog.html', 'basDevpErrorLog管理', null , '2', null , '1'); |
| | | |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basDevpErrorLog#view', '查询', '', '3', '0', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basDevpErrorLog#btn-add', '新增', '', '3', '1', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basDevpErrorLog#btn-edit', '编辑', '', '3', '2', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basDevpErrorLog#btn-delete', '删除', '', '3', '3', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basDevpErrorLog#btn-export', '导出', '', '3', '4', '1'); |
| | | |
| | | -- sqlserver |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basDevpErrorLog/basDevpErrorLog.html', N'basDevpErrorLog管理', null, '2', null, '1'); |
| | | |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basDevpErrorLog#view', N'查询', '', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basDevpErrorLog#btn-add', N'新增', '', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basDevpErrorLog#btn-edit', N'编辑', '', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basDevpErrorLog#btn-delete', N'删除', '', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basDevpErrorLog#btn-export', N'导出', '', '3', '4', '1'); |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.*; |
| | | import com.zy.asrs.entity.BasAgvMast; |
| | | import com.zy.asrs.service.BasAgvMastService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @RequestMapping(value = "/basAgvMast/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasAgvMast basAgvMast) { |
| | | SnowflakeIdWorker snowflakeIdWorker = SpringUtils.getBean(SnowflakeIdWorker.class); |
| | | long nextId = snowflakeIdWorker.nextId(); |
| | | basAgvMast.setTimestamp(nextId); |
| | | basAgvMast.setDevpId(1); |
| | | basAgvMastService.insert(basAgvMast); |
| | | return R.ok(); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasDevpErrorLog; |
| | | import com.zy.asrs.service.BasDevpErrorLogService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class BasDevpErrorLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasDevpErrorLogService basDevpErrorLogService; |
| | | |
| | | @RequestMapping(value = "/basDevpErrorLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDevpErrorLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevpErrorLog/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasDevpErrorLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDevpErrorLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basDevpErrorLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevpErrorLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDevpErrorLog basDevpErrorLog) { |
| | | basDevpErrorLogService.insert(basDevpErrorLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevpErrorLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasDevpErrorLog basDevpErrorLog){ |
| | | if (Cools.isEmpty(basDevpErrorLog) || null==basDevpErrorLog.getId()){ |
| | | return R.error(); |
| | | } |
| | | basDevpErrorLogService.updateById(basDevpErrorLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevpErrorLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basDevpErrorLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevpErrorLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDevpErrorLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDevpErrorLog")); |
| | | convert(map, wrapper); |
| | | List<BasDevpErrorLog> list = basDevpErrorLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevpErrorLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDevpErrorLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("dev_no", condition); |
| | | Page<BasDevpErrorLog> page = basDevpErrorLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDevpErrorLog basDevpErrorLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basDevpErrorLog.getId()); |
| | | map.put("value", basDevpErrorLog.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevpErrorLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDevpErrorLog> wrapper = new EntityWrapper<BasDevpErrorLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDevpErrorLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDevpErrorLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | if (Cools.isEmpty(param.getTaskNo())) { |
| | | return R.error("WMS任务号[taskNo]不能为空"); |
| | | if (Cools.isEmpty(param.getReqCode())) { |
| | | return R.error("WMS任务号[reqCode]不能为空"); |
| | | } |
| | | String reqCode = param.getReqCode(); |
| | | String[] split = reqCode.split("-"); |
| | | param.setTaskNo(Integer.parseInt(split[0])); |
| | | // if (Cools.isEmpty(param.getTimestamp())) { |
| | | // return R.error("RGV任务号[timestamp]不能为空"); |
| | | // } |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "task_no", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | public BasAgvMast() {} |
| | | public BasAgvMast() { |
| | | SnowflakeIdWorker snowflakeIdWorker = SpringUtils.getBean(SnowflakeIdWorker.class); |
| | | this.timestamp = snowflakeIdWorker.nextId(); |
| | | } |
| | | |
| | | public BasAgvMast(Integer taskNo,Long timestamp,Integer sourceStaNo,Integer staNo,String sourceLocNo,String locNo,Long priority,Integer floorNo,Integer status,Date errorTime,String errorMemo,Date appeTime,Date modiTime,String modiUser) { |
| | | this.taskNo = taskNo; |
| New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_devp_error_log") |
| | | public class BasDevpErrorLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 输送编号 |
| | | */ |
| | | @ApiModelProperty(value= "输送编号") |
| | | @TableField("dev_no") |
| | | private Integer devNo; |
| | | |
| | | /** |
| | | * 物体进/出超时 |
| | | */ |
| | | @ApiModelProperty(value= "物体进/出超时") |
| | | @TableField("pass_time_out") |
| | | private String passTimeOut; |
| | | |
| | | /** |
| | | * 有物体无数据 |
| | | */ |
| | | @ApiModelProperty(value= "有物体无数据") |
| | | @TableField("object_no_id_error") |
| | | private String objectNoIdError; |
| | | |
| | | /** |
| | | * 有数据无物体 |
| | | */ |
| | | @ApiModelProperty(value= "有数据无物体") |
| | | @TableField("id_no_object_error") |
| | | private String idNoObjectError; |
| | | |
| | | /** |
| | | * 线体电机热继报警 |
| | | */ |
| | | @ApiModelProperty(value= "线体电机热继报警") |
| | | @TableField("lmfr_error") |
| | | private String lmfrError; |
| | | |
| | | /** |
| | | * 顶升报警 |
| | | */ |
| | | @ApiModelProperty(value= "顶升报警") |
| | | @TableField("lift_error") |
| | | private String liftError; |
| | | |
| | | /** |
| | | * 顶升电机热继报警 |
| | | */ |
| | | @ApiModelProperty(value= "顶升电机热继报警") |
| | | @TableField("dlfr_error") |
| | | private String dlfrError; |
| | | |
| | | /** |
| | | * 顶升横移电机热继报警 |
| | | */ |
| | | @ApiModelProperty(value= "顶升横移电机热继报警") |
| | | @TableField("dmfr_error") |
| | | private String dmfrError; |
| | | |
| | | /** |
| | | * 变频故障 |
| | | */ |
| | | @ApiModelProperty(value= "变频故障") |
| | | @TableField("vfd_error") |
| | | private String vfdError; |
| | | |
| | | /** |
| | | * 伺服故障 |
| | | */ |
| | | @ApiModelProperty(value= "伺服故障") |
| | | @TableField("srv_error") |
| | | private String srvError; |
| | | |
| | | /** |
| | | * 预留1 |
| | | */ |
| | | @ApiModelProperty(value= "预留1") |
| | | private String res1; |
| | | |
| | | /** |
| | | * 预留2 |
| | | */ |
| | | @ApiModelProperty(value= "预留2") |
| | | private String res2; |
| | | |
| | | /** |
| | | * 预留3 |
| | | */ |
| | | @ApiModelProperty(value= "预留3") |
| | | private String res3; |
| | | |
| | | /** |
| | | * 与上位机通讯超时 |
| | | */ |
| | | @ApiModelProperty(value= "与上位机通讯超时") |
| | | @TableField("communication_time_out") |
| | | private String communicationTimeOut; |
| | | |
| | | /** |
| | | * 信息参数不全 |
| | | */ |
| | | @ApiModelProperty(value= "信息参数不全") |
| | | @TableField("parameter_incomplete_error") |
| | | private String parameterIncompleteError; |
| | | |
| | | /** |
| | | * 信息数据未清除 |
| | | */ |
| | | @ApiModelProperty(value= "信息数据未清除") |
| | | @TableField("data_not_clear") |
| | | private String dataNotClear; |
| | | |
| | | /** |
| | | * 参数设置报警 |
| | | */ |
| | | @ApiModelProperty(value= "参数设置报警") |
| | | @TableField("set_parameter_error") |
| | | private String setParameterError; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value= "创建时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("in_enable") |
| | | private String inEnable; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("out_enable") |
| | | private String outEnable; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("data_error") |
| | | private String dataError; |
| | | |
| | | public BasDevpErrorLog() {} |
| | | |
| | | public BasDevpErrorLog(Integer devNo,String passTimeOut,String objectNoIdError,String idNoObjectError,String lmfrError,String liftError,String dlfrError,String dmfrError,String vfdError,String srvError,String res1,String res2,String res3,String communicationTimeOut,String parameterIncompleteError,String dataNotClear,String setParameterError,Date createTime,String inEnable,String outEnable,String dataError) { |
| | | this.devNo = devNo; |
| | | this.passTimeOut = passTimeOut; |
| | | this.objectNoIdError = objectNoIdError; |
| | | this.idNoObjectError = idNoObjectError; |
| | | this.lmfrError = lmfrError; |
| | | this.liftError = liftError; |
| | | this.dlfrError = dlfrError; |
| | | this.dmfrError = dmfrError; |
| | | this.vfdError = vfdError; |
| | | this.srvError = srvError; |
| | | this.res1 = res1; |
| | | this.res2 = res2; |
| | | this.res3 = res3; |
| | | this.communicationTimeOut = communicationTimeOut; |
| | | this.parameterIncompleteError = parameterIncompleteError; |
| | | this.dataNotClear = dataNotClear; |
| | | this.setParameterError = setParameterError; |
| | | this.createTime = createTime; |
| | | this.inEnable = inEnable; |
| | | this.outEnable = outEnable; |
| | | this.dataError = dataError; |
| | | } |
| | | |
| | | // BasDevpErrorLog basDevpErrorLog = new BasDevpErrorLog( |
| | | // null, // 输送编号 |
| | | // null, // 物体进/出超时 |
| | | // null, // 有物体无数据 |
| | | // null, // 有数据无物体 |
| | | // null, // 线体电机热继报警 |
| | | // null, // 顶升报警 |
| | | // null, // 顶升电机热继报警 |
| | | // null, // 顶升横移电机热继报警 |
| | | // null, // 变频故障 |
| | | // null, // 伺服故障 |
| | | // null, // 预留1 |
| | | // null, // 预留2 |
| | | // null, // 预留3 |
| | | // null, // 与上位机通讯超时 |
| | | // null, // 信息参数不全 |
| | | // null, // 信息数据未清除 |
| | | // null, // 参数设置报警 |
| | | // null, // 创建时间 |
| | | // null, // |
| | | // null, // |
| | | // null // |
| | | // ); |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public class TaskAgvReportParam { |
| | | //WMS任务号 |
| | | private int taskNo; |
| | | private String reqCode; |
| | | //RGV任务号 |
| | | private Long timestamp; |
| | | // |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDevpErrorLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasDevpErrorLogMapper extends BaseMapper<BasDevpErrorLog> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDevpErrorLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface BasDevpErrorLogService extends IService<BasDevpErrorLog> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasDevpErrorLogMapper; |
| | | import com.zy.asrs.entity.BasDevpErrorLog; |
| | | import com.zy.asrs.service.BasDevpErrorLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDevpErrorLogService") |
| | | public class BasDevpErrorLogServiceImpl extends ServiceImpl<BasDevpErrorLogMapper, BasDevpErrorLog> implements BasDevpErrorLogService { |
| | | |
| | | } |
| | |
| | | generator.url="10.10.10.235:1433;databasename=jshdasrs"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="asr_bas_agv_mast"; |
| | | generator.table="asr_bas_devp_error_log"; |
| | | generator.packagePath="com.zy.asrs"; |
| | | generator.build(); |
| | | } |
| New file |
| | |
| | | <?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.zy.asrs.mapper.BasDevpErrorLogMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasDevpErrorLog"> |
| | | <result column="dev_no" property="devNo" /> |
| | | <result column="pass_time_out" property="passTimeOut" /> |
| | | <result column="object_no_id_error" property="objectNoIdError" /> |
| | | <result column="id_no_object_error" property="idNoObjectError" /> |
| | | <result column="lmfr_error" property="lmfrError" /> |
| | | <result column="lift_error" property="liftError" /> |
| | | <result column="dlfr_error" property="dlfrError" /> |
| | | <result column="dmfr_error" property="dmfrError" /> |
| | | <result column="vfd_error" property="vfdError" /> |
| | | <result column="srv_error" property="srvError" /> |
| | | <result column="res1" property="res1" /> |
| | | <result column="res2" property="res2" /> |
| | | <result column="res3" property="res3" /> |
| | | <result column="communication_time_out" property="communicationTimeOut" /> |
| | | <result column="parameter_incomplete_error" property="parameterIncompleteError" /> |
| | | <result column="data_not_clear" property="dataNotClear" /> |
| | | <result column="set_parameter_error" property="setParameterError" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="in_enable" property="inEnable" /> |
| | | <result column="out_enable" property="outEnable" /> |
| | | <result column="data_error" property="dataError" /> |
| | | <result column="id" property="id" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | // {type: 'checkbox'} |
| | | // , |
| | | {type: 'checkbox'} |
| | | , |
| | | {field: 'id', align: 'center',title: 'ID',hide: true} |
| | | ,{field: 'armNo', align: 'center',title: '机械臂编号',hide: false} |
| | | ,{field: 'orderNo', align: 'center',title: '订单号',hide: false} |
| | |
| | | ,{field: 'sku', align: 'center',title: 'sku',hide: false} |
| | | ,{field: 'po', align: 'center',title: 'po',hide: false} |
| | | ,{field: 'upc', align: 'center',title: 'upc',hide: false} |
| | | ,{field: 'anfme', align: 'center',title: '标记数量',hide: false} |
| | | ,{field: 'supplier', align: 'center',title: '货源',hide: true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#basDevpErrorLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basDevpErrorLog/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'devNo', align: 'center',title: '输送编号'} |
| | | ,{field: 'passTimeOut', align: 'center',title: '物体进/出超时'} |
| | | ,{field: 'objectNoIdError', align: 'center',title: '有物体无数据'} |
| | | ,{field: 'idNoObjectError', align: 'center',title: '有数据无物体'} |
| | | ,{field: 'lmfrError', align: 'center',title: '线体电机热继报警'} |
| | | ,{field: 'liftError', align: 'center',title: '顶升报警'} |
| | | ,{field: 'dlfrError', align: 'center',title: '顶升电机热继报警'} |
| | | ,{field: 'dmfrError', align: 'center',title: '顶升横移电机热继报警'} |
| | | ,{field: 'vfdError', align: 'center',title: '变频故障'} |
| | | ,{field: 'srvError', align: 'center',title: '伺服故障'} |
| | | ,{field: 'res1', align: 'center',title: '预留1',hide: true} |
| | | ,{field: 'res2', align: 'center',title: '预留2',hide: true} |
| | | ,{field: 'res3', align: 'center',title: '预留3',hide: true} |
| | | ,{field: 'communicationTimeOut', align: 'center',title: '与上位机通讯超时'} |
| | | ,{field: 'parameterIncompleteError', align: 'center',title: '信息参数不全'} |
| | | ,{field: 'dataNotClear', align: 'center',title: '信息数据未清除'} |
| | | ,{field: 'setParameterError', align: 'center',title: '参数设置报警'} |
| | | ,{field: 'inEnable', align: 'center',title: '',hide: true} |
| | | ,{field: 'outEnable', align: 'center',title: '',hide: true} |
| | | ,{field: 'dataError', align: 'center',title: '数据错误'} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120,hide: true} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(basDevpErrorLog)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(basDevpErrorLog)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'basDevpErrorLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basDevpErrorLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(basDevpErrorLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basDevpErrorLog/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basDevpErrorLog/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label layui-form-required">WMS任务号: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="taskNo" placeholder="请输入WMS任务号" lay-vertype="tips" lay-verify="required">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">WMS任务号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="taskNo" placeholder="请输入WMS任务号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">RGV任务号: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">任务类型: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="status"> |
| | | <select name="ioType"> |
| | | <option value="">请选择</option> |
| | | <option value="0">AGV库位==》输送站点</option> |
| | | <option value="1">AGV库位==》AGV库位</option> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="basDevpErrorLog" lay-filter="basDevpErrorLog"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDevpErrorLog/basDevpErrorLog.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">输送编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="devNo" placeholder="请输入输送编号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">物体进/出超时: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="passTimeOut" placeholder="请输入物体进/出超时"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">有物体无数据: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="objectNoIdError" placeholder="请输入有物体无数据"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">有数据无物体: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="idNoObjectError" placeholder="请输入有数据无物体"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">线体电机热继报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="lmfrError" placeholder="请输入线体电机热继报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">顶升报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="liftError" placeholder="请输入顶升报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">顶升电机热继报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dlfrError" placeholder="请输入顶升电机热继报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">顶升横移电机热继报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dmfrError" placeholder="请输入顶升横移电机热继报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">变频故障: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="vfdError" placeholder="请输入变频故障"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">伺服故障: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="srvError" placeholder="请输入伺服故障"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">预留1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="res1" placeholder="请输入预留1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">预留2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="res2" placeholder="请输入预留2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">预留3: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="res3" placeholder="请输入预留3"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">与上位机通讯超时: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="communicationTimeOut" placeholder="请输入与上位机通讯超时"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">信息参数不全: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="parameterIncompleteError" placeholder="请输入信息参数不全"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">信息数据未清除: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dataNotClear" placeholder="请输入信息数据未清除"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">参数设置报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="setParameterError" placeholder="请输入参数设置报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">创建时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入创建时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="inEnable" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="outEnable" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dataError" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |