| 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.BasDualCrnp; |
| | | import com.zy.asrs.service.BasDualCrnpService; |
| | | 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 BasDualCrnpController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasDualCrnpService basDualCrnpService; |
| | | |
| | | @RequestMapping(value = "/basDualCrnp/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDualCrnpService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnp/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<BasDualCrnp> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDualCrnp.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basDualCrnpService.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 = "/basDualCrnp/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDualCrnp basDualCrnp) { |
| | | basDualCrnpService.insert(basDualCrnp); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnp/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasDualCrnp basDualCrnp){ |
| | | if (Cools.isEmpty(basDualCrnp) || null==basDualCrnp.getCrnNo()){ |
| | | return R.error(); |
| | | } |
| | | basDualCrnpService.updateById(basDualCrnp); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnp/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basDualCrnpService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnp/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDualCrnp> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDualCrnp")); |
| | | convert(map, wrapper); |
| | | List<BasDualCrnp> list = basDualCrnpService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDualCrnp> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("crn_no", condition); |
| | | Page<BasDualCrnp> page = basDualCrnpService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDualCrnp basDualCrnp : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basDualCrnp.getCrnNo()); |
| | | map.put("value", basDualCrnp.getCrnNo()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnp/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDualCrnp> wrapper = new EntityWrapper<BasDualCrnp>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDualCrnp.class, String.valueOf(param.get("key")))); |
| | | } |
| | | 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.BasDualCrnpErr; |
| | | import com.zy.asrs.service.BasDualCrnpErrService; |
| | | 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 BasDualCrnpErrController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasDualCrnpErrService basDualCrnpErrService; |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErr/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDualCrnpErrService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErr/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<BasDualCrnpErr> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDualCrnpErr.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basDualCrnpErrService.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 = "/basDualCrnpErr/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDualCrnpErr basDualCrnpErr) { |
| | | basDualCrnpErrService.insert(basDualCrnpErr); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErr/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasDualCrnpErr basDualCrnpErr){ |
| | | if (Cools.isEmpty(basDualCrnpErr) || null==basDualCrnpErr.getId()){ |
| | | return R.error(); |
| | | } |
| | | basDualCrnpErrService.updateById(basDualCrnpErr); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErr/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basDualCrnpErrService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErr/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDualCrnpErr> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDualCrnpErr")); |
| | | convert(map, wrapper); |
| | | List<BasDualCrnpErr> list = basDualCrnpErrService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDualCrnpErr> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasDualCrnpErr> page = basDualCrnpErrService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDualCrnpErr basDualCrnpErr : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basDualCrnpErr.getId()); |
| | | map.put("value", basDualCrnpErr.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErr/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDualCrnpErr> wrapper = new EntityWrapper<BasDualCrnpErr>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpErrService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDualCrnpErr.class, String.valueOf(param.get("key")))); |
| | | } |
| | | 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.BasDualCrnpErrLog; |
| | | import com.zy.asrs.service.BasDualCrnpErrLogService; |
| | | 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 BasDualCrnpErrLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasDualCrnpErrLogService basDualCrnpErrLogService; |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDualCrnpErrLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/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<BasDualCrnpErrLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDualCrnpErrLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basDualCrnpErrLogService.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 = "/basDualCrnpErrLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDualCrnpErrLog basDualCrnpErrLog) { |
| | | basDualCrnpErrLogService.insert(basDualCrnpErrLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasDualCrnpErrLog basDualCrnpErrLog){ |
| | | if (Cools.isEmpty(basDualCrnpErrLog) || null==basDualCrnpErrLog.getId()){ |
| | | return R.error(); |
| | | } |
| | | basDualCrnpErrLogService.updateById(basDualCrnpErrLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basDualCrnpErrLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDualCrnpErrLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDualCrnpErrLog")); |
| | | convert(map, wrapper); |
| | | List<BasDualCrnpErrLog> list = basDualCrnpErrLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDualCrnpErrLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasDualCrnpErrLog> page = basDualCrnpErrLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDualCrnpErrLog basDualCrnpErrLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basDualCrnpErrLog.getId()); |
| | | map.put("value", basDualCrnpErrLog.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpErrLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDualCrnpErrLog> wrapper = new EntityWrapper<BasDualCrnpErrLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpErrLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDualCrnpErrLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | 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.BasDualCrnpOpt; |
| | | import com.zy.asrs.service.BasDualCrnpOptService; |
| | | 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 BasDualCrnpOptController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasDualCrnpOptService basDualCrnpOptService; |
| | | |
| | | @RequestMapping(value = "/basDualCrnpOpt/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basDualCrnpOptService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpOpt/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<BasDualCrnpOpt> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasDualCrnpOpt.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basDualCrnpOptService.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 = "/basDualCrnpOpt/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasDualCrnpOpt basDualCrnpOpt) { |
| | | basDualCrnpOptService.insert(basDualCrnpOpt); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpOpt/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasDualCrnpOpt basDualCrnpOpt){ |
| | | if (Cools.isEmpty(basDualCrnpOpt) || null==basDualCrnpOpt.getId()){ |
| | | return R.error(); |
| | | } |
| | | basDualCrnpOptService.updateById(basDualCrnpOpt); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpOpt/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basDualCrnpOptService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpOpt/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasDualCrnpOpt> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDualCrnpOpt")); |
| | | convert(map, wrapper); |
| | | List<BasDualCrnpOpt> list = basDualCrnpOptService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpOptQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasDualCrnpOpt> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasDualCrnpOpt> page = basDualCrnpOptService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDualCrnpOpt basDualCrnpOpt : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basDualCrnpOpt.getId()); |
| | | map.put("value", basDualCrnpOpt.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDualCrnpOpt/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDualCrnpOpt> wrapper = new EntityWrapper<BasDualCrnpOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDualCrnpOptService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDualCrnpOpt.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_dual_crnp") |
| | | public class BasDualCrnp implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "crn_no", type = IdType.INPUT) |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 可入(checkBox) |
| | | */ |
| | | @ApiModelProperty(value= "可入(checkBox)") |
| | | @TableField("in_enable") |
| | | private String inEnable; |
| | | |
| | | /** |
| | | * 可出(checkBox) |
| | | */ |
| | | @ApiModelProperty(value= "可出(checkBox)") |
| | | @TableField("out_enable") |
| | | private String outEnable; |
| | | |
| | | /** |
| | | * 创建人员 |
| | | */ |
| | | @ApiModelProperty(value= "创建人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value= "创建时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 控制库位排号 |
| | | */ |
| | | @ApiModelProperty(value= "控制库位排号") |
| | | @TableField("control_rows") |
| | | private String controlRows; |
| | | |
| | | /** |
| | | * 深库位排号 |
| | | */ |
| | | @ApiModelProperty(value= "深库位排号") |
| | | @TableField("deep_rows") |
| | | private String deepRows; |
| | | |
| | | /** |
| | | * 入库站点 |
| | | */ |
| | | @ApiModelProperty(value= "入库站点") |
| | | @TableField("in_station_list") |
| | | private String inStationList; |
| | | |
| | | /** |
| | | * 出库站点 |
| | | */ |
| | | @ApiModelProperty(value= "出库站点") |
| | | @TableField("out_station_list") |
| | | private String outStationList; |
| | | |
| | | /** |
| | | * 最大入库任务数 |
| | | */ |
| | | @ApiModelProperty(value= "最大入库任务数") |
| | | @TableField("max_in_task") |
| | | private Integer maxInTask; |
| | | |
| | | /** |
| | | * 最大出库任务数 |
| | | */ |
| | | @ApiModelProperty(value= "最大出库任务数") |
| | | @TableField("max_out_task") |
| | | private Integer maxOutTask; |
| | | |
| | | public BasDualCrnp() {} |
| | | |
| | | public BasDualCrnp(Integer status,Integer wrkNo,String inEnable,String outEnable,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,String controlRows,String deepRows,String inStationList,String outStationList,Integer maxInTask,Integer maxOutTask) { |
| | | this.status = status; |
| | | this.wrkNo = wrkNo; |
| | | this.inEnable = inEnable; |
| | | this.outEnable = outEnable; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | this.controlRows = controlRows; |
| | | this.deepRows = deepRows; |
| | | this.inStationList = inStationList; |
| | | this.outStationList = outStationList; |
| | | this.maxInTask = maxInTask; |
| | | this.maxOutTask = maxOutTask; |
| | | } |
| | | |
| | | // BasDualCrnp basDualCrnp = new BasDualCrnp( |
| | | // null, // 状态 |
| | | // null, // 工作号 |
| | | // null, // 可入(checkBox) |
| | | // null, // 可出(checkBox) |
| | | // null, // 创建人员 |
| | | // null, // 创建时间 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null, // 备注 |
| | | // null, // 控制库位排号 |
| | | // null, // 深库位排号 |
| | | // null, // 入库站点 |
| | | // null, // 出库站点 |
| | | // null, // 最大入库任务数 |
| | | // null // 最大出库任务数 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_dual_crnp_err") |
| | | public class BasDualCrnpErr implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | @ApiModelProperty(value= "异常码") |
| | | @TableField("error_code") |
| | | private Long errorCode; |
| | | |
| | | /** |
| | | * 异常 |
| | | */ |
| | | @ApiModelProperty(value= "异常") |
| | | @TableField("err_name") |
| | | private String errName; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date appeTime; |
| | | |
| | | public BasDualCrnpErr() {} |
| | | |
| | | public BasDualCrnpErr(Long errorCode,String errName,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | this.errorCode = errorCode; |
| | | this.errName = errName; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.appeUser = appeUser; |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | // BasDualCrnpErr basDualCrnpErr = new BasDualCrnpErr( |
| | | // null, // 异常码 |
| | | // null, // 异常 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null, // 添加人员 |
| | | // null // 添加时间 |
| | | // ); |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkStatusService; |
| | | import com.zy.asrs.entity.BasWrkStatus; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkIotypeService; |
| | | import com.zy.asrs.entity.BasWrkIotype; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_dual_crnp_err_log") |
| | | public class BasDualCrnpErrLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 发生时间 |
| | | */ |
| | | @ApiModelProperty(value= "发生时间") |
| | | @TableField("start_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @TableField("end_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @TableField("sta_no") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @TableField("source_sta_no") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | @ApiModelProperty(value= "异常码") |
| | | @TableField("err_code") |
| | | private Integer errCode; |
| | | |
| | | /** |
| | | * 异常 |
| | | */ |
| | | @ApiModelProperty(value= "异常") |
| | | private String error; |
| | | |
| | | /** |
| | | * 异常情况 1: 未处理 2: 已修复 |
| | | */ |
| | | @ApiModelProperty(value= "异常情况 1: 未处理 2: 已修复 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 系统状态数据 |
| | | */ |
| | | @ApiModelProperty(value= "系统状态数据") |
| | | @TableField("system_status") |
| | | private String systemStatus; |
| | | |
| | | public BasDualCrnpErrLog() {} |
| | | |
| | | public BasDualCrnpErrLog(Integer wrkNo,Date startTime,Date endTime,Long wrkSts,Integer ioType,Integer crnNo,String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String barcode,Integer errCode,String error,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo,String systemStatus) { |
| | | this.wrkNo = wrkNo; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.wrkSts = wrkSts; |
| | | this.ioType = ioType; |
| | | this.crnNo = crnNo; |
| | | this.locNo = locNo; |
| | | this.staNo = staNo; |
| | | this.sourceStaNo = sourceStaNo; |
| | | this.sourceLocNo = sourceLocNo; |
| | | this.barcode = barcode; |
| | | this.errCode = errCode; |
| | | this.error = error; |
| | | this.status = status; |
| | | this.createTime = createTime; |
| | | this.createBy = createBy; |
| | | this.updateTime = updateTime; |
| | | this.updateBy = updateBy; |
| | | this.memo = memo; |
| | | this.systemStatus = systemStatus; |
| | | } |
| | | |
| | | // BasDualCrnpErrLog basDualCrnpErrLog = new BasDualCrnpErrLog( |
| | | // null, // 工作号 |
| | | // null, // 发生时间 |
| | | // null, // 结束时间 |
| | | // null, // 工作状态 |
| | | // null, // 入出库类型 |
| | | // null, // 堆垛机号 |
| | | // null, // 目标库位 |
| | | // null, // 目标站 |
| | | // null, // 源站 |
| | | // null, // 源库位 |
| | | // null, // 条码 |
| | | // null, // 异常码 |
| | | // null, // 异常 |
| | | // null, // 异常情况 |
| | | // null, // 添加时间 |
| | | // null, // 添加人员 |
| | | // null, // 修改时间 |
| | | // null, // 修改人员 |
| | | // null, // 备注 |
| | | // null // 系统状态数据 |
| | | // ); |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | | } |
| | | |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "未处理"; |
| | | case 2: |
| | | return "已修复"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_dual_crnp_opt") |
| | | public class BasDualCrnpOpt implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 下发时间 |
| | | */ |
| | | @ApiModelProperty(value= "下发时间") |
| | | @TableField("send_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date sendTime; |
| | | |
| | | /** |
| | | * 作业 |
| | | */ |
| | | @ApiModelProperty(value= "作业") |
| | | private String mode; |
| | | |
| | | /** |
| | | * 起点库位 |
| | | */ |
| | | @ApiModelProperty(value= "起点库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @TableField("target_loc_no") |
| | | private String targetLocNo; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 命令 |
| | | */ |
| | | @ApiModelProperty(value= "命令") |
| | | private String command; |
| | | |
| | | /** |
| | | * 系统状态 |
| | | */ |
| | | @ApiModelProperty(value= "系统状态") |
| | | @TableField("system_status") |
| | | private String systemStatus; |
| | | |
| | | /** |
| | | * 下发状态 0: 未下发 1: 已下发 |
| | | */ |
| | | @ApiModelProperty(value= "下发状态 0: 未下发 1: 已下发 ") |
| | | private Integer send; |
| | | |
| | | /** |
| | | * 请求响应 |
| | | */ |
| | | @ApiModelProperty(value= "请求响应") |
| | | private String response; |
| | | |
| | | public BasDualCrnpOpt() {} |
| | | |
| | | public BasDualCrnpOpt(Integer wrkNo,Integer crnNo,Date sendTime,String mode,String sourceLocNo,String targetLocNo,Date updateTime,Long updateBy,String memo,String command,String systemStatus,Integer send,String response) { |
| | | this.wrkNo = wrkNo; |
| | | this.crnNo = crnNo; |
| | | this.sendTime = sendTime; |
| | | this.mode = mode; |
| | | this.sourceLocNo = sourceLocNo; |
| | | this.targetLocNo = targetLocNo; |
| | | this.updateTime = updateTime; |
| | | this.updateBy = updateBy; |
| | | this.memo = memo; |
| | | this.command = command; |
| | | this.systemStatus = systemStatus; |
| | | this.send = send; |
| | | this.response = response; |
| | | } |
| | | |
| | | // BasDualCrnpOpt basDualCrnpOpt = new BasDualCrnpOpt( |
| | | // null, // 工作号 |
| | | // null, // 堆垛机号 |
| | | // null, // 下发时间 |
| | | // null, // 作业 |
| | | // null, // 起点库位 |
| | | // null, // 目标库位 |
| | | // null, // 修改时间 |
| | | // null, // 修改人员 |
| | | // null, // 备注 |
| | | // null, // 命令 |
| | | // null, // 系统状态 |
| | | // null, // 下发状态 |
| | | // null // 请求响应 |
| | | // ); |
| | | |
| | | public String getSendTime$(){ |
| | | if (Cools.isEmpty(this.sendTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.sendTime); |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getId()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSend$(){ |
| | | if (null == this.send){ return null; } |
| | | switch (this.send){ |
| | | case 0: |
| | | return "未下发"; |
| | | case 1: |
| | | return "已下发"; |
| | | default: |
| | | return String.valueOf(this.send); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpErrLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasDualCrnpErrLogMapper extends BaseMapper<BasDualCrnpErrLog> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpErr; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasDualCrnpErrMapper extends BaseMapper<BasDualCrnpErr> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnp; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasDualCrnpMapper extends BaseMapper<BasDualCrnp> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpOpt; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasDualCrnpOptMapper extends BaseMapper<BasDualCrnpOpt> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpErrLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface BasDualCrnpErrLogService extends IService<BasDualCrnpErrLog> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpErr; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface BasDualCrnpErrService extends IService<BasDualCrnpErr> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnpOpt; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface BasDualCrnpOptService extends IService<BasDualCrnpOpt> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasDualCrnp; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface BasDualCrnpService extends IService<BasDualCrnp> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasDualCrnpErrLogMapper; |
| | | import com.zy.asrs.entity.BasDualCrnpErrLog; |
| | | import com.zy.asrs.service.BasDualCrnpErrLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDualCrnpErrLogService") |
| | | public class BasDualCrnpErrLogServiceImpl extends ServiceImpl<BasDualCrnpErrLogMapper, BasDualCrnpErrLog> implements BasDualCrnpErrLogService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasDualCrnpErrMapper; |
| | | import com.zy.asrs.entity.BasDualCrnpErr; |
| | | import com.zy.asrs.service.BasDualCrnpErrService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDualCrnpErrService") |
| | | public class BasDualCrnpErrServiceImpl extends ServiceImpl<BasDualCrnpErrMapper, BasDualCrnpErr> implements BasDualCrnpErrService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasDualCrnpOptMapper; |
| | | import com.zy.asrs.entity.BasDualCrnpOpt; |
| | | import com.zy.asrs.service.BasDualCrnpOptService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDualCrnpOptService") |
| | | public class BasDualCrnpOptServiceImpl extends ServiceImpl<BasDualCrnpOptMapper, BasDualCrnpOpt> implements BasDualCrnpOptService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasDualCrnpMapper; |
| | | import com.zy.asrs.entity.BasDualCrnp; |
| | | import com.zy.asrs.service.BasDualCrnpService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basDualCrnpService") |
| | | public class BasDualCrnpServiceImpl extends ServiceImpl<BasDualCrnpMapper, BasDualCrnp> implements BasDualCrnpService { |
| | | |
| | | } |
| | |
| | | generator.url="127.0.0.1:3306/wcs"; |
| | | generator.username="root"; |
| | | generator.password="root"; |
| | | generator.table="asr_bas_station"; |
| | | generator.table="asr_bas_dual_crnp_opt"; |
| | | // sqlserver |
| | | // generator.sqlOsType = SqlOsType.SQL_SERVER; |
| | | // generator.url="127.0.0.1:1433;databasename=tzskasrs"; |
| | |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.thread.impl.ZySiemensCrnThread; |
| | | import com.zy.core.thread.impl.ZySiemensDualCrnThread; |
| | | import com.zy.core.thread.impl.ZyStationThread; |
| | | import com.zy.core.thread.impl.ZyRgvThread; |
| | | |
| | |
| | | @Async |
| | | public void init() throws InterruptedException { |
| | | News.info("核心控制层开始初始化..............................................."); |
| | | Thread.sleep(2000); |
| | | // 初始化消息队列 |
| | | initMq(); |
| | | // 初始化下位机线程 |
| | |
| | | .eq("device_type", String.valueOf(SlaveType.Crn))); |
| | | for (DeviceConfig crn : crnList) { |
| | | MessageQueue.init(SlaveType.Crn, crn.getDeviceNo()); |
| | | } |
| | | // 初始化双工位堆垛机mq |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.DualCrn))); |
| | | for (DeviceConfig crn : dualCrnList) { |
| | | MessageQueue.init(SlaveType.DualCrn, crn.getDeviceNo()); |
| | | } |
| | | // 初始化Rgv小车mq |
| | | List<DeviceConfig> rgvList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | |
| | | } |
| | | |
| | | private void initThread(){ |
| | | News.info("初始化堆垛机........................................................"); |
| | | List<DeviceConfig> crnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Crn))); |
| | | for (DeviceConfig deviceConfig : crnList) { |
| | | ThreadHandler thread = null; |
| | | if (deviceConfig.getThreadImpl().equals("ZySiemensCrnThread")) { |
| | | thread = new ZySiemensCrnThread(deviceConfig, redisUtil); |
| | | } else { |
| | | throw new CoolException("未知的线程实现"); |
| | | } |
| | | if(!crnList.isEmpty()) { |
| | | News.info("初始化堆垛机........................................................"); |
| | | for (DeviceConfig deviceConfig : crnList) { |
| | | ThreadHandler thread = null; |
| | | if (deviceConfig.getThreadImpl().equals("ZySiemensCrnThread")) { |
| | | thread = new ZySiemensCrnThread(deviceConfig, redisUtil); |
| | | } else { |
| | | throw new CoolException("未知的线程实现"); |
| | | } |
| | | |
| | | Thread t = new Thread(thread); |
| | | t.setName("CrnThread-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | t.start(); |
| | | SlaveConnection.put(SlaveType.Crn, deviceConfig.getDeviceNo(), thread); |
| | | Thread t = new Thread(thread); |
| | | t.setName("CrnThread-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | t.start(); |
| | | SlaveConnection.put(SlaveType.Crn, deviceConfig.getDeviceNo(), thread); |
| | | } |
| | | } |
| | | |
| | | News.info("初始化输送站........................................................"); |
| | | List<DeviceConfig> dualCrnList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.DualCrn))); |
| | | if(!dualCrnList.isEmpty()) { |
| | | News.info("初始化双工位堆垛机........................................................"); |
| | | for (DeviceConfig deviceConfig : dualCrnList) { |
| | | ThreadHandler thread = null; |
| | | if (deviceConfig.getThreadImpl().equals("ZySiemensDualCrnThread")) { |
| | | thread = new ZySiemensDualCrnThread(deviceConfig, redisUtil); |
| | | } else { |
| | | throw new CoolException("未知的线程实现"); |
| | | } |
| | | |
| | | Thread t = new Thread(thread); |
| | | t.setName("DualCrnThread-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | t.start(); |
| | | SlaveConnection.put(SlaveType.DualCrn, deviceConfig.getDeviceNo(), thread); |
| | | } |
| | | } |
| | | |
| | | List<DeviceConfig> devpList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Devp))); |
| | | for (DeviceConfig deviceConfig : devpList) { |
| | | ThreadHandler thread = null; |
| | | if (deviceConfig.getThreadImpl().equals("ZyStationThread")) { |
| | | thread = new ZyStationThread(deviceConfig, redisUtil); |
| | | } else { |
| | | throw new CoolException("未知的线程实现"); |
| | | } |
| | | if(!devpList.isEmpty()) { |
| | | News.info("初始化输送站........................................................"); |
| | | for (DeviceConfig deviceConfig : devpList) { |
| | | ThreadHandler thread = null; |
| | | if (deviceConfig.getThreadImpl().equals("ZyStationThread")) { |
| | | thread = new ZyStationThread(deviceConfig, redisUtil); |
| | | } else { |
| | | throw new CoolException("未知的线程实现"); |
| | | } |
| | | |
| | | Thread t = new Thread(thread); |
| | | t.setName("DevpThread-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | t.start(); |
| | | SlaveConnection.put(SlaveType.Devp, deviceConfig.getDeviceNo(), thread); |
| | | Thread t = new Thread(thread); |
| | | t.setName("DevpThread-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | t.start(); |
| | | SlaveConnection.put(SlaveType.Devp, deviceConfig.getDeviceNo(), thread); |
| | | } |
| | | } |
| | | |
| | | News.info("初始化RGV........................................................"); |
| | | List<DeviceConfig> rgvList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>() |
| | | .eq("device_type", String.valueOf(SlaveType.Rgv))); |
| | | for (DeviceConfig deviceConfig : rgvList) { |
| | | ThreadHandler thread = null; |
| | | if (deviceConfig.getThreadImpl().equals("ZyRgvThread")) { |
| | | thread = new ZyRgvThread(deviceConfig, redisUtil); |
| | | } else { |
| | | throw new CoolException("未知的线程实现"); |
| | | } |
| | | if(!rgvList.isEmpty()) { |
| | | News.info("初始化RGV........................................................"); |
| | | for (DeviceConfig deviceConfig : rgvList) { |
| | | ThreadHandler thread = null; |
| | | if (deviceConfig.getThreadImpl().equals("ZyRgvThread")) { |
| | | thread = new ZyRgvThread(deviceConfig, redisUtil); |
| | | } else { |
| | | throw new CoolException("未知的线程实现"); |
| | | } |
| | | |
| | | Thread t = new Thread(thread); |
| | | t.setName("RgvThread-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | t.start(); |
| | | SlaveConnection.put(SlaveType.Rgv, deviceConfig.getDeviceNo(), thread); |
| | | Thread t = new Thread(thread); |
| | | t.setName("RgvThread-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | t.start(); |
| | | SlaveConnection.put(SlaveType.Rgv, deviceConfig.getDeviceNo(), thread); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | // 堆垛机输出日志 |
| | | public static ArrayBlockingQueue<String> CRN = new ArrayBlockingQueue<>(32); |
| | | // 双工位堆垛机输出日志 |
| | | public static ArrayBlockingQueue<String> DUAL_CRN = new ArrayBlockingQueue<>(32); |
| | | // 输送线输出日志 |
| | | public static ArrayBlockingQueue<String> DEVP = new ArrayBlockingQueue<>(32); |
| | | // 条码器输出日志 |
| | |
| | | public enum SlaveType { |
| | | |
| | | Crn, |
| | | DualCrn, |
| | | Devp, |
| | | Barcode, |
| | | Led, |
| New file |
| | |
| | | package com.zy.core.model.command; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 双工位堆垛机命令报文 |
| | | */ |
| | | @Data |
| | | public class DualCrnCommand { |
| | | |
| | | // 堆垛机号 |
| | | private Integer crnNo = 0; |
| | | |
| | | // 任务完成确认位 |
| | | private Short ackFinish = 0; |
| | | |
| | | // 任务号 |
| | | private Short taskNo = 0; |
| | | |
| | | /** |
| | | * 任务模式: |
| | | * 0 = 无 |
| | | * 1 = 入库 源和目标都发 |
| | | * 2 = 出库 源和目标都发 |
| | | * 3 = 库位移转 源和目标都发 |
| | | * 4 = 站位移转 源和目标都发 |
| | | * 5 = 回原点 不用发 |
| | | * 6 = 去反原点 目标发 |
| | | * 7 = 坐标移行 取货发 |
| | | * 90 = 设置时间 |
| | | * 99 = 取消当前任务 |
| | | */ |
| | | private Short taskMode = 0; |
| | | |
| | | // 源位置排号 |
| | | private Short sourcePosX = 0; |
| | | |
| | | // 源位置列号 |
| | | private Short sourcePosY = 0; |
| | | |
| | | // 源位置层号 |
| | | private Short sourcePosZ = 0; |
| | | |
| | | // 目标位置排号 |
| | | private Short destinationPosX = 0; |
| | | |
| | | // 目标位置列号 |
| | | private Short destinationPosY = 0; |
| | | |
| | | // 目标位置层号 |
| | | private Short destinationPosZ = 0; |
| | | |
| | | // 任务确认 0:未确认 1:已确认 |
| | | private Short command = 0; |
| | | |
| | | //工位 |
| | | private Short station; |
| | | |
| | | } |
| | |
| | | import com.zy.core.enums.CrnStatusType; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/8/7 |
| | | */ |
| | | @Data |
| | | public class CrnProtocol { |
| | | |
| New file |
| | |
| | | package com.zy.core.model.protocol; |
| | | |
| | | import com.zy.core.enums.CrnForkPosType; |
| | | import com.zy.core.enums.CrnLiftPosType; |
| | | import com.zy.core.enums.CrnModeType; |
| | | import com.zy.core.enums.CrnStatusType; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DualCrnProtocol { |
| | | |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 1 = 手动模式 |
| | | * 2 = 自动模式 |
| | | * 3 = 电脑模式 |
| | | */ |
| | | public Integer mode; |
| | | |
| | | public CrnModeType modeType; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | public Integer alarm; |
| | | |
| | | /** |
| | | * 工位1任务号 |
| | | */ |
| | | public Integer taskNo = 0; |
| | | |
| | | /** |
| | | * 工位2任务号 |
| | | */ |
| | | public Integer taskNoTwo = 0; |
| | | |
| | | /** |
| | | * 工位1当前状态 |
| | | * 0:空闲,无任务 |
| | | * 1:取货定位中 |
| | | * 2:取货中 |
| | | * 3:取货完成,放货定位中 |
| | | * 4:放货中 |
| | | * 5:回原点中 |
| | | * 6:反原点 |
| | | * 7:库位移位 |
| | | * 90:任务完成等待WCS确认 |
| | | * 99:报警 |
| | | */ |
| | | public Integer status; |
| | | |
| | | /** |
| | | * 工位2当前状态 |
| | | */ |
| | | public Integer statusTwo; |
| | | |
| | | /** |
| | | * 工位1状态枚举 |
| | | */ |
| | | public CrnStatusType statusType; |
| | | |
| | | /** |
| | | * 工位2状态枚举 |
| | | */ |
| | | public CrnStatusType statusTypeTwo; |
| | | |
| | | /** |
| | | * 工位1堆垛机当前列号 |
| | | */ |
| | | public Integer bay; |
| | | |
| | | /** |
| | | * 工位2堆垛机当前列号 |
| | | */ |
| | | public Integer bayTwo; |
| | | |
| | | /** |
| | | * 工位1堆垛机当前层号 |
| | | */ |
| | | public Integer level; |
| | | |
| | | /** |
| | | * 工位2堆垛机当前层号 |
| | | */ |
| | | public Integer levelTwo; |
| | | |
| | | /** |
| | | * 工位1当前货叉位置 |
| | | * 0 = 货叉原位 |
| | | * 1 = 货叉在左侧 |
| | | * 2 = 货叉在右侧 |
| | | */ |
| | | public Integer forkPos; |
| | | |
| | | /** |
| | | * 工位2当前货叉位置 |
| | | * 0 = 货叉原位 |
| | | * 1 = 货叉在左侧 |
| | | * 2 = 货叉在右侧 |
| | | */ |
| | | public Integer forkPosTwo; |
| | | |
| | | public CrnForkPosType forkPosType; |
| | | |
| | | public CrnForkPosType forkPosTypeTwo; |
| | | |
| | | /** |
| | | * 当前载货台位置 |
| | | * 0 = 下定位 |
| | | * 1 = 上定位 |
| | | */ |
| | | public Integer liftPos; |
| | | |
| | | public Integer liftPosTwo; |
| | | |
| | | public CrnLiftPosType liftPosType; |
| | | |
| | | public CrnLiftPosType liftPosTypeTwo; |
| | | |
| | | /** |
| | | * 走行在定位 |
| | | * 0 = 在定位 |
| | | * 1 = 不在定位 |
| | | */ |
| | | public Integer walkPos; |
| | | |
| | | public Integer walkPosTwo; |
| | | |
| | | /** |
| | | * 载货台有物 |
| | | */ |
| | | public Integer loaded; |
| | | |
| | | public Integer loadedTwo; |
| | | |
| | | private Integer temp1; |
| | | |
| | | private Integer temp2; |
| | | |
| | | private Integer temp3; |
| | | |
| | | private Integer temp4; |
| | | |
| | | /** |
| | | * X行走线速度m/min |
| | | */ |
| | | private Integer xSpeed; |
| | | |
| | | /** |
| | | * Y行走线速度m/min |
| | | */ |
| | | private Integer ySpeed; |
| | | |
| | | /** |
| | | * Z行走线速度m/min |
| | | */ |
| | | private Integer zSpeed; |
| | | |
| | | /** |
| | | * 堆垛机累计走行距离km |
| | | */ |
| | | public Integer xDistance; |
| | | |
| | | /** |
| | | * 堆垛机累计升降距离km |
| | | */ |
| | | public Integer yDistance; |
| | | |
| | | /** |
| | | * 堆垛机累计走行时长h |
| | | */ |
| | | public Integer xDuration; |
| | | |
| | | /** |
| | | * 堆垛机累计升降时长h |
| | | */ |
| | | public Integer yDuration; |
| | | |
| | | /** |
| | | * 最近一次入出库类型 |
| | | * I:入库 |
| | | * O:出库 |
| | | */ |
| | | private String lastIo = "I"; |
| | | |
| | | /** |
| | | * 堆垛机所在巷道 |
| | | */ |
| | | private Integer crnLane = 1; |
| | | |
| | | /** |
| | | * 日志采集时间 |
| | | */ |
| | | private Long deviceDataLog = System.currentTimeMillis(); |
| | | |
| | | /** |
| | | * 上一次指令下发时间 |
| | | */ |
| | | private Long lastCommandTime = System.currentTimeMillis(); |
| | | |
| | | public void setMode(Integer mode) { |
| | | this.mode = mode; |
| | | this.modeType = CrnModeType.get(mode); |
| | | } |
| | | |
| | | public void setMode(CrnModeType type) { |
| | | this.modeType = type; |
| | | this.mode = CrnModeType.get(type).id; |
| | | } |
| | | |
| | | public void setForkPos(Integer forkPos) { |
| | | this.forkPos = forkPos; |
| | | this.forkPosType = CrnForkPosType.get(forkPos); |
| | | } |
| | | |
| | | public void setForkPos(CrnForkPosType type) { |
| | | this.forkPosType = type; |
| | | this.forkPos = CrnForkPosType.get(type).id; |
| | | } |
| | | |
| | | public void setLiftPos(Integer liftPos) { |
| | | this.liftPos = liftPos; |
| | | this.liftPosType = CrnLiftPosType.get(liftPos); |
| | | } |
| | | |
| | | public void setLiftPos(CrnLiftPosType type) { |
| | | this.liftPosType = type; |
| | | this.liftPos = CrnLiftPosType.get(type).id; |
| | | } |
| | | |
| | | public void setStatus(Integer status){ |
| | | this.status = status; |
| | | this.statusType = CrnStatusType.get(status); |
| | | } |
| | | |
| | | public void setStatus(CrnStatusType type){ |
| | | this.statusType = type; |
| | | this.status = CrnStatusType.get(type).id; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.core.network; |
| | | |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.core.ThreadHandler; |
| | | import com.zy.core.model.CommandResponse; |
| | | import com.zy.core.model.command.DualCrnCommand; |
| | | import com.zy.core.network.api.ZyDualCrnConnectApi; |
| | | import com.zy.core.network.entity.ZyDualCrnStatusEntity; |
| | | import com.zy.core.network.fake.ZyDualCrnFakeConnect; |
| | | import com.zy.core.network.real.ZyDualCrnRealConnect; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.concurrent.Executors; |
| | | import java.util.concurrent.ScheduledExecutorService; |
| | | import java.util.concurrent.ThreadFactory; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * 连接驱动 |
| | | */ |
| | | @Slf4j |
| | | public class ZyDualCrnConnectDriver implements ThreadHandler{ |
| | | |
| | | private boolean connected = false; |
| | | private DeviceConfig deviceConfig; |
| | | private ZyDualCrnConnectApi zyDualCrnConnectApi; |
| | | private volatile boolean closed = false; |
| | | private ScheduledExecutorService executor; |
| | | |
| | | public ZyDualCrnConnectDriver(DeviceConfig deviceConfig) { |
| | | this.deviceConfig = deviceConfig; |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public boolean connect() { |
| | | if (deviceConfig.getFake() == 0) { |
| | | zyDualCrnConnectApi = new ZyDualCrnRealConnect(deviceConfig); |
| | | }else { |
| | | zyDualCrnConnectApi = new ZyDualCrnFakeConnect(deviceConfig); |
| | | } |
| | | |
| | | boolean connect = zyDualCrnConnectApi.connect(); |
| | | connected = connect; |
| | | return connect; |
| | | } |
| | | |
| | | @Override |
| | | public void close() { |
| | | closed = true; |
| | | ScheduledExecutorService ex = executor; |
| | | if (ex != null) { |
| | | try { ex.shutdownNow(); } catch (Exception ignore) {} |
| | | } |
| | | if (zyDualCrnConnectApi != null) { |
| | | zyDualCrnConnectApi.disconnect(); |
| | | zyDualCrnConnectApi = null; |
| | | } |
| | | connected = false; |
| | | } |
| | | |
| | | public void start() { |
| | | executor = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() { |
| | | @Override |
| | | public Thread newThread(Runnable r) { |
| | | Thread t = new Thread(r); |
| | | t.setName("CrnConnect-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | return t; |
| | | } |
| | | }); |
| | | executor.scheduleAtFixedRate(() -> { |
| | | if (closed || Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | try { |
| | | if (!connected) { |
| | | connect(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }, 0, 1000, TimeUnit.MILLISECONDS); |
| | | } |
| | | |
| | | public ZyDualCrnStatusEntity getStatus() { |
| | | if (zyDualCrnConnectApi == null) { |
| | | return null; |
| | | } |
| | | return zyDualCrnConnectApi.getStatus(); |
| | | } |
| | | |
| | | public CommandResponse sendCommand(DualCrnCommand command) { |
| | | return zyDualCrnConnectApi.sendCommand(command); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.core.network.api; |
| | | |
| | | import com.zy.core.model.CommandResponse; |
| | | import com.zy.core.model.command.DualCrnCommand; |
| | | import com.zy.core.network.entity.ZyDualCrnStatusEntity; |
| | | |
| | | public interface ZyDualCrnConnectApi { |
| | | |
| | | boolean connect(); |
| | | |
| | | boolean disconnect(); |
| | | |
| | | ZyDualCrnStatusEntity getStatus();//设备状态 |
| | | |
| | | CommandResponse sendCommand(DualCrnCommand command);//下发命令 |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.core.network.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ZyDualCrnStatusEntity { |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 1 = 手动模式 |
| | | * 2 = 自动模式 |
| | | * 3 = 电脑模式 |
| | | */ |
| | | public Integer mode; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | public Integer alarm; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | public Integer taskNo = 0; |
| | | |
| | | public Integer taskNoTwo = 0; |
| | | |
| | | /** |
| | | * 堆垛机当前状态 |
| | | * 0:空闲,无任务 |
| | | * 1:取货定位中 |
| | | * 2:取货中 |
| | | * 3:取货完成,放货定位中 |
| | | * 4:放货中 |
| | | * 5:回原点中 |
| | | * 6:反原点 |
| | | * 7:库位移位 |
| | | * 90:任务完成等待WCS确认 |
| | | * 99:报警 |
| | | */ |
| | | public Integer status; |
| | | |
| | | public Integer statusTwo; |
| | | |
| | | /** |
| | | * 堆垛机当前列号 |
| | | */ |
| | | public Integer bay; |
| | | |
| | | public Integer bayTwo; |
| | | |
| | | /** |
| | | * 堆垛机当前层号 |
| | | */ |
| | | public Integer level; |
| | | |
| | | public Integer levelTwo; |
| | | |
| | | /** |
| | | * 当前货叉位置 |
| | | * 0 = 货叉原位 |
| | | * 1 = 货叉在左侧 |
| | | * 2 = 货叉在右侧 |
| | | */ |
| | | public Integer forkPos; |
| | | |
| | | public Integer forkPosTwo; |
| | | |
| | | /** |
| | | * 当前载货台位置 |
| | | * 0 = 下定位 |
| | | * 1 = 上定位 |
| | | */ |
| | | public Integer liftPos; |
| | | |
| | | public Integer liftPosTwo; |
| | | |
| | | /** |
| | | * 走行在定位 |
| | | * 0 = 在定位 |
| | | * 1 = 不在定位 |
| | | */ |
| | | public Integer walkPos; |
| | | |
| | | public Integer walkPosTwo; |
| | | |
| | | /** |
| | | * 载货台有物 |
| | | */ |
| | | public Integer loaded; |
| | | |
| | | public Integer loadedTwo; |
| | | |
| | | /** |
| | | * X行走线速度m/min |
| | | */ |
| | | private Integer xSpeed; |
| | | |
| | | /** |
| | | * Y行走线速度m/min |
| | | */ |
| | | private Integer ySpeed; |
| | | |
| | | /** |
| | | * Z行走线速度m/min |
| | | */ |
| | | private Integer zSpeed; |
| | | |
| | | /** |
| | | * 堆垛机累计走行距离km |
| | | */ |
| | | public Integer xDistance; |
| | | |
| | | /** |
| | | * 堆垛机累计升降距离km |
| | | */ |
| | | public Integer yDistance; |
| | | |
| | | /** |
| | | * 堆垛机累计走行时长h |
| | | */ |
| | | public Integer xDuration; |
| | | |
| | | /** |
| | | * 堆垛机累计升降时长h |
| | | */ |
| | | public Integer yDuration; |
| | | |
| | | private Integer temp1; |
| | | |
| | | private Integer temp2; |
| | | |
| | | private Integer temp3; |
| | | |
| | | private Integer temp4; |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.core.network.fake; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.core.enums.CrnStatusType; |
| | | import com.zy.core.enums.CrnTaskModeType; |
| | | import com.zy.core.model.CommandResponse; |
| | | import com.zy.core.model.command.DualCrnCommand; |
| | | import com.zy.core.network.api.ZyDualCrnConnectApi; |
| | | import com.zy.core.network.entity.ZyDualCrnStatusEntity; |
| | | |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | | |
| | | public class ZyDualCrnFakeConnect implements ZyDualCrnConnectApi { |
| | | |
| | | private ZyDualCrnStatusEntity crnStatus; |
| | | private DeviceConfig deviceConfig; |
| | | private final ExecutorService executor = Executors.newSingleThreadExecutor(); |
| | | |
| | | public ZyDualCrnFakeConnect(DeviceConfig deviceConfig) { |
| | | this.deviceConfig = deviceConfig; |
| | | this.crnStatus = JSON.parseObject(deviceConfig.getFakeInitStatus(), ZyDualCrnStatusEntity.class); |
| | | } |
| | | |
| | | @Override |
| | | public boolean connect() { |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public boolean disconnect() { |
| | | try { executor.shutdownNow(); } catch (Exception ignore) {} |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public ZyDualCrnStatusEntity getStatus() { |
| | | return this.crnStatus; |
| | | } |
| | | |
| | | @Override |
| | | public CommandResponse sendCommand(DualCrnCommand command) { |
| | | CommandResponse response = new CommandResponse(false); |
| | | if (command.getTaskMode().intValue() == CrnTaskModeType.LOC_MOVE.id) { |
| | | //取放货 |
| | | executor.submit(() -> commandTake(command)); |
| | | } else if (command.getTaskMode().intValue() == CrnTaskModeType.CRN_MOVE.id) { |
| | | //移动 |
| | | executor.submit(() -> commandMove(command)); |
| | | } else if (command.getTaskMode().intValue() == CrnTaskModeType.NONE.id) { |
| | | //复位 |
| | | executor.submit(() -> commandTaskComplete(command)); |
| | | } |
| | | response.setResult(true); |
| | | return response; |
| | | } |
| | | |
| | | private void commandTaskComplete(DualCrnCommand command) { |
| | | this.crnStatus.setTaskNo(0); |
| | | this.crnStatus.setStatus(CrnStatusType.IDLE.id); |
| | | } |
| | | |
| | | private void commandMove(DualCrnCommand command) { |
| | | int destinationPosX = command.getDestinationPosX().intValue(); |
| | | int destinationPosY = command.getDestinationPosY().intValue(); |
| | | int destinationPosZ = command.getDestinationPosZ().intValue(); |
| | | int taskMode = command.getTaskMode().intValue(); |
| | | int taskNo = command.getTaskNo().intValue(); |
| | | |
| | | if(command.getStation() == 1) { |
| | | this.crnStatus.setTaskNo(taskNo); |
| | | this.crnStatus.setStatus(CrnStatusType.MOVING.id); |
| | | moveY(this.crnStatus.getBay(), destinationPosY, command.getStation().intValue()); |
| | | moveZ(this.crnStatus.getLevel(), destinationPosZ, command.getStation().intValue()); |
| | | this.crnStatus.setStatus(CrnStatusType.WAITING.id); |
| | | }else { |
| | | this.crnStatus.setTaskNoTwo(taskNo); |
| | | this.crnStatus.setStatusTwo(CrnStatusType.MOVING.id); |
| | | moveY(this.crnStatus.getBayTwo(), destinationPosY, command.getStation().intValue()); |
| | | moveZ(this.crnStatus.getLevelTwo(), destinationPosZ, command.getStation().intValue()); |
| | | this.crnStatus.setStatusTwo(CrnStatusType.WAITING.id); |
| | | } |
| | | } |
| | | |
| | | private void commandTake(DualCrnCommand command) { |
| | | int sourcePosX = command.getSourcePosX().intValue(); |
| | | int sourcePosY = command.getSourcePosY().intValue(); |
| | | int sourcePosZ = command.getSourcePosZ().intValue(); |
| | | int destinationPosX = command.getDestinationPosX().intValue(); |
| | | int destinationPosY = command.getDestinationPosY().intValue(); |
| | | int destinationPosZ = command.getDestinationPosZ().intValue(); |
| | | int taskMode = command.getTaskMode().intValue(); |
| | | int taskNo = command.getTaskNo().intValue(); |
| | | |
| | | this.crnStatus.setMode(taskMode); |
| | | if(command.getStation() == 1) { |
| | | this.crnStatus.setTaskNo(taskNo); |
| | | this.crnStatus.setStatus(CrnStatusType.FETCH_MOVING.id); |
| | | |
| | | moveY(this.crnStatus.getBay(), sourcePosY, command.getStation().intValue()); |
| | | moveZ(this.crnStatus.getLevel(), sourcePosZ, command.getStation().intValue()); |
| | | this.crnStatus.setStatus(CrnStatusType.FETCHING.id); |
| | | sleep(2000); |
| | | if (Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | |
| | | this.crnStatus.setLoaded(1); |
| | | this.crnStatus.setStatus(CrnStatusType.PUT_MOVING.id); |
| | | moveY(this.crnStatus.getBay(), destinationPosY, command.getStation().intValue()); |
| | | moveZ(this.crnStatus.getLevel(), destinationPosZ, command.getStation().intValue()); |
| | | this.crnStatus.setStatus(CrnStatusType.PUTTING.id); |
| | | sleep(2000); |
| | | if (Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | this.crnStatus.setLoaded(0); |
| | | this.crnStatus.setStatus(CrnStatusType.WAITING.id); |
| | | }else { |
| | | this.crnStatus.setTaskNoTwo(taskNo); |
| | | this.crnStatus.setStatusTwo(CrnStatusType.FETCH_MOVING.id); |
| | | |
| | | moveY(this.crnStatus.getBayTwo(), sourcePosY, command.getStation().intValue()); |
| | | moveZ(this.crnStatus.getLevelTwo(), sourcePosZ, command.getStation().intValue()); |
| | | this.crnStatus.setStatusTwo(CrnStatusType.FETCHING.id); |
| | | sleep(2000); |
| | | if (Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | |
| | | this.crnStatus.setLoadedTwo(1); |
| | | this.crnStatus.setStatusTwo(CrnStatusType.PUT_MOVING.id); |
| | | moveY(this.crnStatus.getBayTwo(), destinationPosY, command.getStation().intValue()); |
| | | moveZ(this.crnStatus.getLevelTwo(), destinationPosZ, command.getStation().intValue()); |
| | | this.crnStatus.setStatusTwo(CrnStatusType.PUTTING.id); |
| | | sleep(2000); |
| | | if (Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | this.crnStatus.setLoadedTwo(0); |
| | | this.crnStatus.setStatusTwo(CrnStatusType.WAITING.id); |
| | | } |
| | | } |
| | | |
| | | private void moveZ(int sourcePosZ, int destinationPosZ, int station) { |
| | | if(destinationPosZ - sourcePosZ > 0) { |
| | | int moveLength = destinationPosZ - sourcePosZ; |
| | | int initSourcePosZ = sourcePosZ; |
| | | for(int i = 0; i < moveLength; i++) { |
| | | initSourcePosZ++; |
| | | if(station == 1) { |
| | | this.crnStatus.setLevel(initSourcePosZ); |
| | | }else { |
| | | this.crnStatus.setLevelTwo(initSourcePosZ); |
| | | } |
| | | sleep(1000); |
| | | if (Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | } |
| | | }else { |
| | | int moveLength = sourcePosZ - destinationPosZ; |
| | | int initSourcePosZ = sourcePosZ; |
| | | for(int i = 0; i < moveLength; i++) { |
| | | initSourcePosZ--; |
| | | if(station == 1) { |
| | | this.crnStatus.setLevel(initSourcePosZ); |
| | | }else { |
| | | this.crnStatus.setLevelTwo(initSourcePosZ); |
| | | } |
| | | this.crnStatus.setLevel(initSourcePosZ); |
| | | sleep(1000); |
| | | if (Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void moveY(int sourcePosY, int destinationPosY, int station) { |
| | | if(destinationPosY - sourcePosY > 0) { |
| | | int moveLength = destinationPosY - sourcePosY; |
| | | int initSourcePosY = sourcePosY; |
| | | for(int i = 0; i < moveLength; i++) { |
| | | initSourcePosY++; |
| | | if(station == 1) { |
| | | this.crnStatus.setBay(initSourcePosY); |
| | | }else { |
| | | this.crnStatus.setBayTwo(initSourcePosY); |
| | | } |
| | | sleep(1000); |
| | | if (Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | } |
| | | }else { |
| | | int moveLength = sourcePosY - destinationPosY; |
| | | int initSourcePosY = sourcePosY; |
| | | for(int i = 0; i < moveLength; i++) { |
| | | initSourcePosY--; |
| | | if(station == 1) { |
| | | this.crnStatus.setBay(initSourcePosY); |
| | | }else { |
| | | this.crnStatus.setBayTwo(initSourcePosY); |
| | | } |
| | | sleep(1000); |
| | | if (Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void sleep(long ms) { |
| | | try { |
| | | Thread.sleep(ms); |
| | | } catch (InterruptedException e) { |
| | | Thread.currentThread().interrupt(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.core.network.real; |
| | | |
| | | import HslCommunication.Core.Types.OperateResult; |
| | | import HslCommunication.Core.Types.OperateResultExOne; |
| | | import HslCommunication.Profinet.Siemens.SiemensPLCS; |
| | | import HslCommunication.Profinet.Siemens.SiemensS7Net; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasCrnpOpt; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.asrs.service.BasCrnpOptService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.core.News; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.model.CommandResponse; |
| | | import com.zy.core.model.command.DualCrnCommand; |
| | | import com.zy.core.network.api.ZyDualCrnConnectApi; |
| | | import com.zy.core.network.entity.ZyDualCrnStatusEntity; |
| | | |
| | | import java.text.MessageFormat; |
| | | import java.util.Date; |
| | | |
| | | public class ZyDualCrnRealConnect implements ZyDualCrnConnectApi { |
| | | |
| | | private SiemensS7Net siemensNet; |
| | | private DeviceConfig deviceConfig; |
| | | |
| | | public ZyDualCrnRealConnect(DeviceConfig deviceConfig) { |
| | | this.deviceConfig = deviceConfig; |
| | | } |
| | | |
| | | public boolean connect() { |
| | | boolean connected = false; |
| | | siemensNet = new SiemensS7Net(SiemensPLCS.S1200, deviceConfig.getIp()); |
| | | OperateResult connect = siemensNet.ConnectServer(); |
| | | if(connect.IsSuccess){ |
| | | connected = true; |
| | | OutputQueue.CRN.offer(MessageFormat.format( "【{0}双工位堆垛机plc连接成功 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort())); |
| | | News.info("SiemensDualCrn 双工位堆垛机plc连接成功 ===>> [id:{}] [ip:{}] [port:{}]", deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort()); |
| | | } else { |
| | | OutputQueue.CRN.offer(MessageFormat.format("【{0}双工位堆垛机plc连接失败!!! ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort())); |
| | | News.error("SiemensDualCrn 双工位堆垛机plc连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort()); |
| | | } |
| | | // siemensNet.ConnectClose(); |
| | | return connected; |
| | | } |
| | | |
| | | @Override |
| | | public boolean disconnect() { |
| | | siemensNet.ConnectClose(); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public ZyDualCrnStatusEntity getStatus() { |
| | | try { |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB101.0", (short) 66); |
| | | if (result.IsSuccess) { |
| | | ZyDualCrnStatusEntity crnStatus = new ZyDualCrnStatusEntity(); |
| | | crnStatus.setCrnNo(deviceConfig.getDeviceNo()); |
| | | crnStatus.setMode((int) siemensNet.getByteTransform().TransInt16(result.Content, 0)); |
| | | |
| | | //工位1 |
| | | crnStatus.setTaskNo((int) siemensNet.getByteTransform().TransInt16(result.Content, 2)); |
| | | crnStatus.setStatus((int) siemensNet.getByteTransform().TransInt16(result.Content, 4)); |
| | | crnStatus.setBay((int) siemensNet.getByteTransform().TransInt16(result.Content, 6)); |
| | | crnStatus.setLevel((int) siemensNet.getByteTransform().TransInt16(result.Content, 8)); |
| | | crnStatus.setForkPos((int) siemensNet.getByteTransform().TransInt16(result.Content, 10)); |
| | | crnStatus.setLoaded((int) siemensNet.getByteTransform().TransInt16(result.Content, 12)); |
| | | crnStatus.setWalkPos((int) siemensNet.getByteTransform().TransInt16(result.Content, 26)); |
| | | |
| | | //工位2 |
| | | crnStatus.setTaskNoTwo((int) siemensNet.getByteTransform().TransInt16(result.Content, 14)); |
| | | crnStatus.setStatusTwo((int) siemensNet.getByteTransform().TransInt16(result.Content, 16)); |
| | | crnStatus.setBayTwo((int) siemensNet.getByteTransform().TransInt16(result.Content, 18)); |
| | | crnStatus.setLevelTwo((int) siemensNet.getByteTransform().TransInt16(result.Content, 20)); |
| | | crnStatus.setForkPosTwo((int) siemensNet.getByteTransform().TransInt16(result.Content, 22)); |
| | | crnStatus.setLoadedTwo((int) siemensNet.getByteTransform().TransInt16(result.Content, 24)); |
| | | crnStatus.setWalkPosTwo((int) siemensNet.getByteTransform().TransInt16(result.Content, 28)); |
| | | |
| | | crnStatus.setAlarm((int) siemensNet.getByteTransform().TransInt16(result.Content, 18)); |
| | | crnStatus.setTemp1((int) siemensNet.getByteTransform().TransInt16(result.Content, 20)); |
| | | crnStatus.setTemp2((int) siemensNet.getByteTransform().TransInt16(result.Content, 22)); |
| | | crnStatus.setTemp3((int) siemensNet.getByteTransform().TransInt16(result.Content, 24)); |
| | | crnStatus.setTemp4((int) siemensNet.getByteTransform().TransInt16(result.Content, 26)); |
| | | crnStatus.setXSpeed((int) siemensNet.getByteTransform().TransInt16(result.Content, 28)); |
| | | crnStatus.setYSpeed((int) siemensNet.getByteTransform().TransInt16(result.Content, 32)); |
| | | crnStatus.setZSpeed((int) siemensNet.getByteTransform().TransInt16(result.Content, 36)); |
| | | crnStatus.setXDistance((int) siemensNet.getByteTransform().TransInt16(result.Content, 40)); |
| | | crnStatus.setYDistance((int) siemensNet.getByteTransform().TransInt16(result.Content, 44)); |
| | | crnStatus.setXDuration((int) siemensNet.getByteTransform().TransInt16(result.Content, 48)); |
| | | crnStatus.setYDuration((int) siemensNet.getByteTransform().TransInt16(result.Content, 52)); |
| | | |
| | | return crnStatus; |
| | | } else { |
| | | OutputQueue.CRN.offer(MessageFormat.format("【{0}】读取双工位堆垛机plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort())); |
| | | News.error("SiemensCrn 读取双工位堆垛机plc状态信息失败 ===>> [id:{}] [ip:{}] [port:{}]", deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | OutputQueue.CRN.offer(MessageFormat.format("【{0}】读取双工位堆垛机plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort())); |
| | | News.error("SiemensCrn 读取双工位堆垛机plc状态信息失败 ===>> [id:{}] [ip:{}] [port:{}]", deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public CommandResponse sendCommand(DualCrnCommand command) { |
| | | CommandResponse response = new CommandResponse(false); |
| | | try { |
| | | if (null == command) { |
| | | News.error("双工位堆垛机写入命令为空"); |
| | | response.setMessage("双工位堆垛机写入命令为空"); |
| | | return response; |
| | | } |
| | | |
| | | String address = "DB100.0"; |
| | | if (command.getStation() == 1) { |
| | | //工位1 |
| | | address = "DB100.0"; |
| | | }else { |
| | | //工位2 |
| | | address = "DB100.20"; |
| | | } |
| | | |
| | | int writeAck = 0; |
| | | boolean ackResult = false; |
| | | do { |
| | | OperateResult resultAck = siemensNet.Write(address, (short) 0); |
| | | if (resultAck.IsSuccess) { |
| | | Thread.sleep(200); |
| | | OperateResultExOne<byte[]> resultRead = siemensNet.Read(address, (short) 2); |
| | | short ack = siemensNet.getByteTransform().TransInt16(resultRead.Content, 0); |
| | | if (ack != 0) { |
| | | writeAck++; |
| | | } else { |
| | | News.info("双工位堆垛机命令下发[id:{}] >>>>> {}", command.getCrnNo(), "ack复位完成"); |
| | | ackResult = true; |
| | | break; |
| | | } |
| | | } |
| | | } while (writeAck < 5); |
| | | |
| | | if (!ackResult) { |
| | | response.setMessage("双工位堆垛机命令下发[id:{}] >>>>> {}" + command.getCrnNo() + "ack复位失败"); |
| | | return response; |
| | | } |
| | | |
| | | short[] array = new short[10]; |
| | | array[0] = command.getAckFinish(); |
| | | array[1] = command.getTaskNo(); |
| | | array[2] = command.getTaskMode(); |
| | | array[3] = command.getSourcePosX(); |
| | | array[4] = command.getSourcePosY(); |
| | | array[5] = command.getSourcePosZ(); |
| | | array[6] = command.getDestinationPosX(); |
| | | array[7] = command.getDestinationPosY(); |
| | | array[8] = command.getDestinationPosZ(); |
| | | array[9] = command.getCommand(); |
| | | |
| | | OperateResult result = null; |
| | | int idx = 0; |
| | | do { |
| | | OperateResultExOne<byte[]> resultRead = siemensNet.Read(address, (short) 20); |
| | | if (resultRead.IsSuccess) { |
| | | if (command.getAckFinish() == 0) { |
| | | short taskNo = siemensNet.getByteTransform().TransInt16(resultRead.Content, 2); |
| | | short taskMode = siemensNet.getByteTransform().TransInt16(resultRead.Content, 4); |
| | | short sourcePosX = siemensNet.getByteTransform().TransInt16(resultRead.Content, 6); |
| | | short sourcePosY = siemensNet.getByteTransform().TransInt16(resultRead.Content, 8); |
| | | short sourcePosZ = siemensNet.getByteTransform().TransInt16(resultRead.Content, 10); |
| | | short destinationPosX = siemensNet.getByteTransform().TransInt16(resultRead.Content, 12); |
| | | short destinationPosY = siemensNet.getByteTransform().TransInt16(resultRead.Content, 14); |
| | | short destinationPosZ = siemensNet.getByteTransform().TransInt16(resultRead.Content, 16); |
| | | if (taskNo == 0 || taskMode == 0 || sourcePosX == 0 || sourcePosY == 0 || sourcePosZ == 0 || destinationPosX == 0 || destinationPosY == 0 || destinationPosZ == 0) { |
| | | result = siemensNet.Write(address, array); |
| | | } else { |
| | | break; |
| | | } |
| | | } else { |
| | | short ackFinish = siemensNet.getByteTransform().TransInt16(resultRead.Content, 0); |
| | | if (ackFinish != command.getAckFinish()) { |
| | | result = siemensNet.Write(address, array); |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | idx++; |
| | | Thread.sleep(500); |
| | | } while (idx < 5); |
| | | |
| | | if (command.getAckFinish() == 0) { |
| | | short commandFinish = 1; |
| | | int i = 0; |
| | | do { |
| | | OperateResultExOne<byte[]> resultRead = siemensNet.Read(address, (short) 4); |
| | | OperateResultExOne<byte[]> resultReadConfirm = siemensNet.Read(address + 18, (short) 2); |
| | | if (resultRead.IsSuccess && resultReadConfirm.IsSuccess) { |
| | | short taskNo = siemensNet.getByteTransform().TransInt16(resultRead.Content, 2); |
| | | short confirm = siemensNet.getByteTransform().TransInt16(resultReadConfirm.Content, 0); |
| | | if (taskNo != 0 && confirm == 0) { |
| | | result = siemensNet.Write(address + 18, commandFinish); |
| | | } |
| | | } |
| | | i++; |
| | | Thread.sleep(500); |
| | | } while (i < 5); |
| | | } |
| | | |
| | | if (result != null && result.IsSuccess) { |
| | | News.info("SiemensDualCrn 双工位堆垛机命令下发[id:{}] >>>>> {}", command.getCrnNo(), JSON.toJSON(command)); |
| | | OutputQueue.CRN.offer(MessageFormat.format("【{0}】[id:{1}] >>>>> 命令下发: {2}", DateUtils.convert(new Date()), command.getCrnNo(), JSON.toJSON(command))); |
| | | response.setResult(true); |
| | | response.setMessage("命令下发成功"); |
| | | } else { |
| | | News.error("SiemensDualCrn 双工位堆垛机写入堆垛机plc数据失败 ===>> [id:{}]", command.getCrnNo()); |
| | | OutputQueue.CRN.offer(MessageFormat.format("【{0}】写入堆垛机plc数据失败 ===>> [id:{1}]", DateUtils.convert(new Date()), command.getCrnNo())); |
| | | response.setResult(false); |
| | | response.setMessage("命令下发失败"); |
| | | } |
| | | |
| | | return response; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | }finally { |
| | | String sourceLocNo = Utils.getLocNo(command.getSourcePosX(), command.getSourcePosY(), command.getSourcePosZ()); |
| | | String targetLocNo = Utils.getLocNo(command.getDestinationPosX(), command.getDestinationPosY(), command.getDestinationPosZ()); |
| | | |
| | | // 日志记录 |
| | | BasCrnpOptService bean = SpringUtils.getBean(BasCrnpOptService.class); |
| | | BasCrnpOpt basCrnpOpt = new BasCrnpOpt( |
| | | command.getTaskNo().intValue(), // 任务号 |
| | | command.getCrnNo(), // 堆垛机[非空] |
| | | new Date(), // 下发时间 |
| | | String.valueOf(command.getTaskMode()), // 模式 |
| | | sourceLocNo, //源库位 |
| | | targetLocNo, //目标库位 |
| | | null, // 修改时间 |
| | | null, // 修改人员 |
| | | null, // 备注 |
| | | JSON.toJSONString(command), // 指令 |
| | | JSON.toJSONString(getStatus()), // 系统状态 |
| | | 1, // 下发状态{0:未下发,1:已下发} |
| | | JSON.toJSONString(response) // 响应 |
| | | ); |
| | | bean.insert(basCrnpOpt); |
| | | } |
| | | return response; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.core.thread; |
| | | |
| | | import com.zy.core.ThreadHandler; |
| | | import com.zy.core.model.CommandResponse; |
| | | import com.zy.core.model.command.DualCrnCommand; |
| | | import com.zy.core.model.protocol.DualCrnProtocol; |
| | | |
| | | public interface DualCrnThread extends ThreadHandler { |
| | | |
| | | DualCrnProtocol getStatus(); |
| | | |
| | | DualCrnCommand getPickAndPutCommand(String sourceLocNo, String targetLocNo, Integer taskNo, Integer crnNo, Integer station);//取放货 |
| | | |
| | | DualCrnCommand getMoveCommand(String targetLocNo, Integer taskNo, Integer crnNo);//移动 |
| | | |
| | | DualCrnCommand getResetCommand(Integer crnNo, Integer station);//复位 |
| | | |
| | | CommandResponse sendCommand(DualCrnCommand command);//下发命令 |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.core.thread.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasDualCrnp; |
| | | import com.zy.asrs.entity.BasDualCrnpOpt; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.asrs.entity.DeviceDataLog; |
| | | import com.zy.asrs.service.BasDualCrnpOptService; |
| | | import com.zy.asrs.service.BasDualCrnpService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.enums.CrnTaskModeType; |
| | | import com.zy.core.enums.RedisKeyType; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.CommandResponse; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.command.DualCrnCommand; |
| | | import com.zy.core.model.protocol.DualCrnProtocol; |
| | | import com.zy.core.network.DeviceConnectPool; |
| | | import com.zy.core.network.ZyDualCrnConnectDriver; |
| | | import com.zy.core.network.entity.ZyDualCrnStatusEntity; |
| | | import com.zy.core.thread.DualCrnThread; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.text.MessageFormat; |
| | | import java.util.Date; |
| | | import java.util.concurrent.Executors; |
| | | import java.util.concurrent.ScheduledExecutorService; |
| | | import java.util.concurrent.ThreadFactory; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * 双工位堆垛机线程 |
| | | */ |
| | | @Data |
| | | @Slf4j |
| | | public class ZySiemensDualCrnThread implements Runnable, DualCrnThread { |
| | | |
| | | private DeviceConfig deviceConfig; |
| | | private RedisUtil redisUtil; |
| | | private ZyDualCrnConnectDriver zyDualCrnConnectDriver; |
| | | private DualCrnProtocol crnProtocol; |
| | | private int deviceLogCollectTime = 200; |
| | | private boolean resetFlag = false; |
| | | private volatile boolean closed = false; |
| | | private ScheduledExecutorService readExecutor; |
| | | private ScheduledExecutorService processExecutor; |
| | | |
| | | public ZySiemensDualCrnThread(DeviceConfig deviceConfig, RedisUtil redisUtil) { |
| | | this.deviceConfig = deviceConfig; |
| | | this.redisUtil = redisUtil; |
| | | } |
| | | |
| | | @Override |
| | | @SuppressWarnings("InfiniteLoopStatement") |
| | | public void run() { |
| | | this.connect(); |
| | | this.initCrn(); |
| | | readExecutor = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() { |
| | | @Override |
| | | public Thread newThread(Runnable r) { |
| | | Thread t = new Thread(r); |
| | | t.setName("DualCrnReader-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | return t; |
| | | } |
| | | }); |
| | | readExecutor.scheduleAtFixedRate(() -> { |
| | | if (closed || Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | try { |
| | | deviceLogCollectTime = Utils.getDeviceLogCollectTime(); |
| | | readStatus(); |
| | | } catch (Exception e) { |
| | | log.error("DualCrnThread Fail", e); |
| | | } |
| | | }, 0, 200, TimeUnit.MILLISECONDS); |
| | | |
| | | processExecutor = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() { |
| | | @Override |
| | | public Thread newThread(Runnable r) { |
| | | Thread t = new Thread(r); |
| | | t.setName("DualCrnWriter-" + deviceConfig.getDeviceNo()); |
| | | t.setDaemon(true); |
| | | return t; |
| | | } |
| | | }); |
| | | processExecutor.scheduleAtFixedRate(() -> { |
| | | if (closed || Thread.currentThread().isInterrupted()) { |
| | | return; |
| | | } |
| | | try { |
| | | int step = 1; |
| | | Task task = MessageQueue.poll(SlaveType.DualCrn, deviceConfig.getDeviceNo()); |
| | | if (task != null) { |
| | | step = task.getStep(); |
| | | } |
| | | if (step == 2 && task != null) { |
| | | sendCommand((DualCrnCommand) task.getData()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }, 0, 200, TimeUnit.MILLISECONDS); |
| | | } |
| | | |
| | | /** |
| | | * 初始化堆垛机状态 |
| | | */ |
| | | private void initCrn() { |
| | | if (null == crnProtocol) { |
| | | crnProtocol = new DualCrnProtocol(); |
| | | crnProtocol.setCrnNo(deviceConfig.getDeviceNo()); |
| | | } |
| | | crnProtocol.setMode(-1); |
| | | |
| | | //工位1 |
| | | crnProtocol.setTaskNo(0); |
| | | crnProtocol.setStatus(-1); |
| | | crnProtocol.setBay(0); |
| | | crnProtocol.setLevel(0); |
| | | crnProtocol.setForkPos(-1); |
| | | crnProtocol.setLoaded(0); |
| | | crnProtocol.setWalkPos(0); |
| | | |
| | | //工位2 |
| | | crnProtocol.setTaskNoTwo(0); |
| | | crnProtocol.setStatusTwo(-1); |
| | | crnProtocol.setBayTwo(0); |
| | | crnProtocol.setLevelTwo(0); |
| | | crnProtocol.setForkPosTwo(-1); |
| | | crnProtocol.setLoadedTwo(0); |
| | | crnProtocol.setWalkPosTwo(0); |
| | | |
| | | crnProtocol.setAlarm(0); |
| | | crnProtocol.setXSpeed(0); |
| | | crnProtocol.setYSpeed(0); |
| | | crnProtocol.setZSpeed(0); |
| | | crnProtocol.setXDistance(0); |
| | | crnProtocol.setYDistance(0); |
| | | crnProtocol.setXDuration(0); |
| | | crnProtocol.setYDuration(0); |
| | | } |
| | | |
| | | @Override |
| | | public boolean connect() { |
| | | zyDualCrnConnectDriver = new ZyDualCrnConnectDriver(deviceConfig); |
| | | zyDualCrnConnectDriver.start(); |
| | | DeviceConnectPool.put(SlaveType.Crn, deviceConfig.getDeviceNo(), zyDualCrnConnectDriver); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 读取状态 |
| | | */ |
| | | private void readStatus(){ |
| | | ZyDualCrnStatusEntity crnStatus = zyDualCrnConnectDriver.getStatus(); |
| | | if (crnStatus == null) { |
| | | OutputQueue.DUAL_CRN.offer(MessageFormat.format("【{0}】读取双工位堆垛机plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort())); |
| | | return; |
| | | } |
| | | |
| | | crnProtocol.setMode(crnStatus.getMode()); |
| | | |
| | | //工位1 |
| | | crnProtocol.setTaskNo(crnStatus.getTaskNo()); |
| | | crnProtocol.setStatus(crnStatus.getStatus()); |
| | | crnProtocol.setBay(crnStatus.getBay()); |
| | | crnProtocol.setLevel(crnStatus.getLevel()); |
| | | crnProtocol.setForkPos(crnStatus.getForkPos()); |
| | | crnProtocol.setLoaded(crnStatus.getLoaded()); |
| | | crnProtocol.setWalkPos(crnStatus.getWalkPos()); |
| | | |
| | | //工位2 |
| | | crnProtocol.setTaskNoTwo(crnStatus.getTaskNoTwo()); |
| | | crnProtocol.setStatusTwo(crnStatus.getStatusTwo()); |
| | | crnProtocol.setBayTwo(crnStatus.getBayTwo()); |
| | | crnProtocol.setLevelTwo(crnStatus.getLevelTwo()); |
| | | crnProtocol.setForkPosTwo(crnStatus.getForkPosTwo()); |
| | | crnProtocol.setLoadedTwo(crnStatus.getLoadedTwo()); |
| | | crnProtocol.setWalkPosTwo(crnStatus.getWalkPosTwo()); |
| | | |
| | | crnProtocol.setAlarm(crnStatus.getAlarm()); |
| | | crnProtocol.setTemp1(crnStatus.getTemp1()); |
| | | crnProtocol.setTemp2(crnStatus.getTemp2()); |
| | | crnProtocol.setTemp3(crnStatus.getTemp3()); |
| | | crnProtocol.setTemp4(crnStatus.getTemp4()); |
| | | crnProtocol.setXSpeed(crnStatus.getXSpeed()); |
| | | crnProtocol.setYSpeed(crnStatus.getYSpeed()); |
| | | crnProtocol.setZSpeed(crnStatus.getZSpeed()); |
| | | crnProtocol.setXDistance(crnStatus.getXDistance()); |
| | | crnProtocol.setYDistance(crnStatus.getYDistance()); |
| | | crnProtocol.setXDuration(crnStatus.getXDuration()); |
| | | crnProtocol.setYDuration(crnStatus.getYDuration()); |
| | | |
| | | OutputQueue.DUAL_CRN.offer(MessageFormat.format("【{0}】[id:{1}] <<<<< 实时数据更新成功",DateUtils.convert(new Date()), deviceConfig.getDeviceNo())); |
| | | |
| | | if (crnProtocol.getAlarm() > 0) { |
| | | crnProtocol.setLastCommandTime(-1L); |
| | | } |
| | | |
| | | if (crnProtocol.getAlarm() == 0 && crnProtocol.getLastCommandTime() == -1) { |
| | | crnProtocol.setLastCommandTime(System.currentTimeMillis()); |
| | | } |
| | | |
| | | if (System.currentTimeMillis() - crnProtocol.getDeviceDataLog() > deviceLogCollectTime) { |
| | | //保存数据记录 |
| | | DeviceDataLog deviceDataLog = new DeviceDataLog(); |
| | | deviceDataLog.setOriginData(JSON.toJSONString(crnStatus)); |
| | | deviceDataLog.setWcsData(JSON.toJSONString(crnProtocol)); |
| | | deviceDataLog.setType(String.valueOf(SlaveType.DualCrn)); |
| | | deviceDataLog.setDeviceNo(crnProtocol.getCrnNo()); |
| | | deviceDataLog.setCreateTime(new Date()); |
| | | |
| | | redisUtil.set(RedisKeyType.DEVICE_LOG_KEY.key + System.currentTimeMillis(), deviceDataLog, 60 * 60 * 24); |
| | | //更新采集时间 |
| | | crnProtocol.setDeviceDataLog(System.currentTimeMillis()); |
| | | } |
| | | |
| | | BasDualCrnpService basDualCrnpService = null; |
| | | try { |
| | | basDualCrnpService = SpringUtils.getBean(BasDualCrnpService.class); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | if (basDualCrnpService != null) { |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.selectOne(new EntityWrapper<BasDualCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | if(basDualCrnp == null) { |
| | | basDualCrnp = new BasDualCrnp(); |
| | | basDualCrnp.setCrnNo(deviceConfig.getDeviceNo()); |
| | | basDualCrnp.setStatus(1); |
| | | basDualCrnp.setInEnable("N"); |
| | | basDualCrnp.setOutEnable("N"); |
| | | basDualCrnp.setMaxInTask(5); |
| | | basDualCrnp.setMaxOutTask(5); |
| | | basDualCrnp.setCreateTime(new Date()); |
| | | basDualCrnpService.insert(basDualCrnp); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void close() { |
| | | closed = true; |
| | | ScheduledExecutorService ex = readExecutor; |
| | | if (ex != null) { |
| | | try { ex.shutdownNow(); } catch (Exception ignore) {} |
| | | } |
| | | ScheduledExecutorService px = processExecutor; |
| | | if (px != null) { |
| | | try { px.shutdownNow(); } catch (Exception ignore) {} |
| | | } |
| | | if (zyDualCrnConnectDriver != null) { |
| | | zyDualCrnConnectDriver.close(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public DualCrnProtocol getStatus() { |
| | | return this.crnProtocol; |
| | | } |
| | | |
| | | @Override |
| | | public DualCrnCommand getPickAndPutCommand(String sourceLocNo, String targetLocNo, Integer taskNo, Integer crnNo, Integer station) { |
| | | DualCrnCommand crnCommand = new DualCrnCommand(); |
| | | crnCommand.setCrnNo(crnNo); // 堆垛机编号 |
| | | crnCommand.setTaskNo(taskNo.shortValue()); // 工作号 |
| | | crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE.id.shortValue()); // 任务模式: 库位移转 |
| | | crnCommand.setSourcePosX((short) Utils.getRow(sourceLocNo)); // 源库位排 |
| | | crnCommand.setSourcePosY((short) Utils.getBay(sourceLocNo)); // 源库位列 |
| | | crnCommand.setSourcePosZ((short) Utils.getLev(sourceLocNo)); // 源库位层 |
| | | crnCommand.setDestinationPosX((short) Utils.getRow(targetLocNo)); // 目标库位排 |
| | | crnCommand.setDestinationPosY((short) Utils.getBay(targetLocNo)); // 目标库位列 |
| | | crnCommand.setDestinationPosZ((short) Utils.getLev(targetLocNo)); // 目标库位层 |
| | | crnCommand.setStation(station.shortValue());//工位 |
| | | crnCommand.setCommand((short) 1); // 任务确认 |
| | | return crnCommand; |
| | | } |
| | | |
| | | @Override |
| | | public DualCrnCommand getMoveCommand(String targetLocNo, Integer taskNo, Integer crnNo) { |
| | | DualCrnCommand crnCommand = new DualCrnCommand(); |
| | | crnCommand.setCrnNo(crnNo); // 堆垛机编号 |
| | | crnCommand.setTaskNo(taskNo.shortValue()); // 工作号 |
| | | crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | | crnCommand.setTaskMode(CrnTaskModeType.CRN_MOVE.id.shortValue()); // 任务模式: 堆垛机移动 |
| | | crnCommand.setDestinationPosX((short) Utils.getRow(targetLocNo)); // 目标库位排 |
| | | crnCommand.setDestinationPosY((short) Utils.getBay(targetLocNo)); // 目标库位列 |
| | | crnCommand.setDestinationPosZ((short) Utils.getLev(targetLocNo)); // 目标库位层 |
| | | crnCommand.setCommand((short) 1); // 任务确认 |
| | | return crnCommand; |
| | | } |
| | | |
| | | @Override |
| | | public DualCrnCommand getResetCommand(Integer crnNo, Integer station) { |
| | | DualCrnCommand crnCommand = new DualCrnCommand(); |
| | | crnCommand.setCrnNo(crnNo); // 堆垛机编号 |
| | | crnCommand.setTaskNo((short) 0); // 工作号 |
| | | crnCommand.setAckFinish((short) 1); // 任务完成确认位 |
| | | crnCommand.setTaskMode(CrnTaskModeType.NONE.id.shortValue()); // 任务模式 |
| | | crnCommand.setSourcePosX((short)0); // 源库位排 |
| | | crnCommand.setSourcePosY((short)0); // 源库位列 |
| | | crnCommand.setSourcePosZ((short)0); // 源库位层 |
| | | crnCommand.setDestinationPosX((short)0); // 目标库位排 |
| | | crnCommand.setDestinationPosY((short)0); // 目标库位列 |
| | | crnCommand.setDestinationPosZ((short)0); // 目标库位层 |
| | | crnCommand.setStation(station.shortValue());//工位 |
| | | crnCommand.setCommand((short) 1); // 任务确认 |
| | | return crnCommand; |
| | | } |
| | | |
| | | @Override |
| | | public synchronized CommandResponse sendCommand(DualCrnCommand command) { |
| | | this.crnProtocol.setLastCommandTime(System.currentTimeMillis()); |
| | | CommandResponse response = null; |
| | | try { |
| | | response = zyDualCrnConnectDriver.sendCommand(command); |
| | | return response; |
| | | } finally { |
| | | String sourceLocNo = Utils.getLocNo(command.getSourcePosX(), command.getSourcePosY(), command.getSourcePosZ()); |
| | | String targetLocNo = Utils.getLocNo(command.getDestinationPosX(), command.getDestinationPosY(), command.getDestinationPosZ()); |
| | | BasDualCrnpOptService bean = SpringUtils.getBean(BasDualCrnpOptService.class); |
| | | ZyDualCrnStatusEntity statusEntity = zyDualCrnConnectDriver.getStatus(); |
| | | BasDualCrnpOpt basDualCrnpOpt = new BasDualCrnpOpt( |
| | | command.getTaskNo().intValue(), |
| | | command.getCrnNo(), |
| | | new Date(), |
| | | String.valueOf(command.getTaskMode()), |
| | | sourceLocNo, |
| | | targetLocNo, |
| | | null, |
| | | null, |
| | | null, |
| | | JSON.toJSONString(command), |
| | | JSON.toJSONString(statusEntity), |
| | | 1, |
| | | JSON.toJSONString(response) |
| | | ); |
| | | if (bean != null) { |
| | | bean.insert(basDualCrnpOpt); |
| | | } |
| | | } |
| | | } |
| | | } |
| 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.BasDualCrnpErrLogMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasDualCrnpErrLog"> |
| | | <id column="id" property="id" /> |
| | | <result column="wrk_no" property="wrkNo" /> |
| | | <result column="start_time" property="startTime" /> |
| | | <result column="end_time" property="endTime" /> |
| | | <result column="wrk_sts" property="wrkSts" /> |
| | | <result column="io_type" property="ioType" /> |
| | | <result column="crn_no" property="crnNo" /> |
| | | <result column="loc_no" property="locNo" /> |
| | | <result column="sta_no" property="staNo" /> |
| | | <result column="source_sta_no" property="sourceStaNo" /> |
| | | <result column="source_loc_no" property="sourceLocNo" /> |
| | | <result column="barcode" property="barcode" /> |
| | | <result column="err_code" property="errCode" /> |
| | | <result column="error" property="error" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="system_status" property="systemStatus" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| 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.BasDualCrnpErrMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasDualCrnpErr"> |
| | | <id column="id" property="id" /> |
| | | <result column="error_code" property="errorCode" /> |
| | | <result column="err_name" property="errName" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| 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.BasDualCrnpMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasDualCrnp"> |
| | | <id column="crn_no" property="crnNo" /> |
| | | <result column="status" property="status" /> |
| | | <result column="wrk_no" property="wrkNo" /> |
| | | <result column="in_enable" property="inEnable" /> |
| | | <result column="out_enable" property="outEnable" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="control_rows" property="controlRows" /> |
| | | <result column="deep_rows" property="deepRows" /> |
| | | <result column="in_station_list" property="inStationList" /> |
| | | <result column="out_station_list" property="outStationList" /> |
| | | <result column="max_in_task" property="maxInTask" /> |
| | | <result column="max_out_task" property="maxOutTask" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| 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.BasDualCrnpOptMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasDualCrnpOpt"> |
| | | <id column="id" property="id" /> |
| | | <result column="wrk_no" property="wrkNo" /> |
| | | <result column="crn_no" property="crnNo" /> |
| | | <result column="send_time" property="sendTime" /> |
| | | <result column="mode" property="mode" /> |
| | | <result column="source_loc_no" property="sourceLocNo" /> |
| | | <result column="target_loc_no" property="targetLocNo" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="command" property="command" /> |
| | | <result column="system_status" property="systemStatus" /> |
| | | <result column="send" property="send" /> |
| | | <result column="response" property="response" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| 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: '#basDualCrnp', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basDualCrnp/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'crnNo', align: 'center',title: '编号'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'inEnable', align: 'center',title: '可入(checkBox)'} |
| | | ,{field: 'outEnable', align: 'center',title: '可出(checkBox)'} |
| | | // ,{field: 'createBy', align: 'center',title: '创建人员'} |
| | | // ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | // ,{field: 'updateBy', align: 'center',title: '修改人员'} |
| | | // ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'controlRows', align: 'center',title: '控制库位排号'} |
| | | ,{field: 'deepRows', align: 'center',title: '深库位排号'} |
| | | ,{field: 'inStationList', align: 'center',title: '入库站点'} |
| | | ,{field: 'outStationList', align: 'center',title: '出库站点'} |
| | | ,{field: 'maxInTask', align: 'center',title: '最大入库任务数'} |
| | | ,{field: 'maxOutTask', align: 'center',title: '最大出库任务数'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | 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(basDualCrnp)', 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(basDualCrnp)', 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.crnNo; |
| | | })); |
| | | 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 = { |
| | | 'basDualCrnp': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basDualCrnp/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(basDualCrnp)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.crnNo]); |
| | | 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+"/basDualCrnp/"+(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+"/basDualCrnp/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 |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']: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} |
| | | }); |
| | | } |
| 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: '#basDualCrnpErr', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basDualCrnpErr/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: '编号'} |
| | | ,{field: 'errorCode', align: 'center',title: '异常码'} |
| | | ,{field: 'errName', align: 'center',title: '异常'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员'} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'appeUser$', align: 'center',title: '添加人员'} |
| | | ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | 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(basDualCrnpErr)', 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(basDualCrnpErr)', 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 = { |
| | | 'basDualCrnpErr': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basDualCrnpErr/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(basDualCrnpErr)', 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+"/basDualCrnpErr/"+(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+"/basDualCrnpErr/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: '#modiTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['modiTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['appeTime\\$']: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} |
| | | }); |
| | | } |
| 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: '#basDualCrnpErrLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basDualCrnpErrLog/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: '编号'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'startTime$', align: 'center',title: '发生时间'} |
| | | ,{field: 'endTime$', align: 'center',title: '结束时间'} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'crnNo', align: 'center',title: '堆垛机号'} |
| | | ,{field: 'locNo', align: 'center',title: '目标库位'} |
| | | ,{field: 'staNo', align: 'center',title: '目标站'} |
| | | ,{field: 'sourceStaNo', align: 'center',title: '源站'} |
| | | ,{field: 'sourceLocNo', align: 'center',title: '源库位'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'errCode', align: 'center',title: '异常码'} |
| | | ,{field: 'error', align: 'center',title: '异常'} |
| | | ,{field: 'status$', align: 'center',title: '异常情况'} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'systemStatus', align: 'center',title: '系统状态数据'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | 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(basDualCrnpErrLog)', 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(basDualCrnpErrLog)', 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 = { |
| | | 'basDualCrnpErrLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basDualCrnpErrLog/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(basDualCrnpErrLog)', 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+"/basDualCrnpErrLog/"+(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+"/basDualCrnpErrLog/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: '#startTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['startTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#endTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['endTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']: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} |
| | | }); |
| | | } |
| 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: '#basDualCrnpOpt', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basDualCrnpOpt/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: '编号'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'crnNo', align: 'center',title: '堆垛机号'} |
| | | ,{field: 'sendTime$', align: 'center',title: '下发时间'} |
| | | ,{field: 'mode', align: 'center',title: '作业'} |
| | | ,{field: 'sourceLocNo', align: 'center',title: '起点库位'} |
| | | ,{field: 'targetLocNo', align: 'center',title: '目标库位'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'command', align: 'center',title: '命令'} |
| | | ,{field: 'systemStatus', align: 'center',title: '系统状态'} |
| | | ,{field: 'send$', align: 'center',title: '下发状态'} |
| | | ,{field: 'response', align: 'center',title: '请求响应'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | 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(basDualCrnpOpt)', 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(basDualCrnpOpt)', 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 = { |
| | | 'basDualCrnpOpt': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basDualCrnpOpt/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(basDualCrnpOpt)', 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+"/basDualCrnpOpt/"+(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+"/basDualCrnpOpt/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: '#sendTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['sendTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']: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} |
| | | }); |
| | | } |
| 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="basDualCrnp" lay-filter="basDualCrnp"></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/basDualCrnp/basDualCrnp.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"> |
| | | <select name="status"> |
| | | <option value="">请选择状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">禁用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">工作号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo" placeholder="请输入工作号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">可入(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="inEnable" placeholder="请输入可入(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">可出(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="outEnable" placeholder="请输入可出(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">创建人员: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="createBy" 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="updateBy" placeholder="请输入修改人员">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">修改时间: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="updateTime" id="updateTime$" placeholder="请输入修改时间">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">控制库位排号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="controlRows" placeholder="请输入控制库位排号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">深库位排号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="deepRows" placeholder="请输入深库位排号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">入库站点: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="inStationList" placeholder="请输入入库站点"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">出库站点: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="outStationList" placeholder="请输入出库站点"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">最大入库任务数: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="maxInTask" placeholder="请输入最大入库任务数"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">最大出库任务数: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="maxOutTask" 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> |
| | | |
| 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/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <!-- |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" placeholder="编号"> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnNo" class="layui-input" type="text" onkeyup="check(this.id, 'basDualCrnp')" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">状 态:</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="status"> |
| | | <option value="" style="display: none"></option> |
| | | <option value="1">正常</option> |
| | | <option value="0">禁用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工 作 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">可入(checkBox):</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="inEnable" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">可出(checkBox):</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="outEnable" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">创建人员:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="createBy" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">创建时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="createTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改人员:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="updateBy" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="updateTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">备 注:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="memo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">控制库位排号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="controlRows" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">深库位排号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="deepRows" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">入库站点:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="inStationList" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">出库站点:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="outStationList" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">最大入库任务数:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="maxInTask" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">最大出库任务数:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="maxOutTask" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <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/basDualCrnp/basDualCrnp.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| 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="basDualCrnpErr" lay-filter="basDualCrnpErr"></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/basDualCrnpErr/basDualCrnpErr.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="errorCode" placeholder="请输入异常码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">异常: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="errName" placeholder="请输入异常"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="modiUser" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="modiUser$" name="modiUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="modiTime" id="modiTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="appeUser" placeholder="请输入添加人员" style="display: none"> |
| | | <input id="appeUser$" name="appeUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入添加人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="appeTime" id="appeTime$" 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> |
| | | |
| 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/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <!-- |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" placeholder="编号"> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" onkeyup="check(this.id, 'basDualCrnpErr')" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">异 常 码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="errorCode" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">异 常:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="errName" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="modiUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="modiUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="modiTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">添加人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="appeUser" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="appeUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">添加时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="appeTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <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/basDualCrnpErr/basDualCrnpErr.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| 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="basDualCrnpErrLog" lay-filter="basDualCrnpErrLog"></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/basDualCrnpErrLog/basDualCrnpErrLog.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="wrkNo" placeholder="请输入工作号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">发生时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="startTime" id="startTime$" placeholder="请输入发生时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">结束时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="endTime" id="endTime$" placeholder="请输入结束时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">工作状态: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="wrkSts" placeholder="请输入工作状态" style="display: none"> |
| | | <input id="wrkSts$" name="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入工作状态" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">入出库类型: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="ioType" placeholder="请输入入出库类型" style="display: none"> |
| | | <input id="ioType$" name="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入入出库类型" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkIotypeQueryByioTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">堆垛机号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="crnNo" placeholder="请输入堆垛机号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标库位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="locNo" placeholder="请输入目标库位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标站: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="staNo" placeholder="请输入目标站"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源站: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sourceStaNo" placeholder="请输入源站"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源库位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sourceLocNo" placeholder="请输入源库位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">条码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">异常码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="errCode" placeholder="请输入异常码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">异常: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="error" placeholder="请输入异常"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">异常情况: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="status"> |
| | | <option value="">请选择异常情况</option> |
| | | <option value="1">未处理</option> |
| | | <option value="2">已修复</option> |
| | | </select> |
| | | </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 cool-auto-complete"> |
| | | <input class="layui-input" name="createBy" placeholder="请输入添加人员" style="display: none"> |
| | | <input id="createBy$" name="createBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入添加人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="updateTime" id="updateTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="updateBy" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="updateBy$" name="updateBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">系统状态数据: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="systemStatus" 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> |
| | | |
| 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/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <!-- |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" placeholder="编号"> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" onkeyup="check(this.id, 'basDualCrnpErrLog')" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工 作 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">发生时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="startTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">结束时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="endTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工作状态:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="wrkSts" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">入出库类型:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="ioType" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkIotypeQueryByioTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">堆垛机号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnNo" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">目标库位:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="locNo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">目 标 站:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="staNo" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">源 站:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="sourceStaNo" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">源 库 位:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="sourceLocNo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">条 码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="barcode" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">异 常 码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="errCode" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">异 常:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="error" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">异常情况:</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="status"> |
| | | <option value="" style="display: none"></option> |
| | | <option value="1">未处理</option> |
| | | <option value="2">已修复</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">添加时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="createTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">添加人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="createBy" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="createBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="updateTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="updateBy" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="updateBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">备 注:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="memo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">系统状态数据:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="systemStatus" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <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/basDualCrnpErrLog/basDualCrnpErrLog.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| 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="basDualCrnpOpt" lay-filter="basDualCrnpOpt"></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/basDualCrnpOpt/basDualCrnpOpt.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="wrkNo" placeholder="请输入工作号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">堆垛机号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="crnNo" placeholder="请输入堆垛机号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">下发时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sendTime" id="sendTime$" placeholder="请输入下发时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">作业: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="mode" placeholder="请输入作业"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">起点库位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sourceLocNo" placeholder="请输入起点库位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标库位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="targetLocNo" placeholder="请输入目标库位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="updateTime" id="updateTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="updateBy" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="updateBy$" name="updateBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">命令: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="command" placeholder="请输入命令"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">系统状态: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="systemStatus" placeholder="请输入系统状态"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">下发状态: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="send"> |
| | | <option value="">请选择下发状态</option> |
| | | <option value="0">未下发</option> |
| | | <option value="1">已下发</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">请求响应: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="response" 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> |
| | | |
| 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/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <!-- |
| | | <div class="layui-inline" style="display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" placeholder="编号"> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" onkeyup="check(this.id, 'basDualCrnpOpt')" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工 作 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">堆垛机号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnNo" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">下发时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="sendTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">作 业:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="mode" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">起点库位:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="sourceLocNo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">目标库位:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="targetLocNo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="updateTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">修改人员:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="updateBy" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="updateBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">备 注:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="memo" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">命 令:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="command" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">系统状态:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="systemStatus" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">下发状态:</label> |
| | | <div class="layui-input-inline"> |
| | | <select id="send"> |
| | | <option value="" style="display: none"></option> |
| | | <option value="0">未下发</option> |
| | | <option value="1">已下发</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">请求响应:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="response" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <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/basDualCrnpOpt/basDualCrnpOpt.js" charset="utf-8"></script> |
| | | </html> |
| | | |