219个文件已修改
11个文件已添加
1 文件已重命名
| | |
| | | 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.ApiConfig; |
| | | import com.zy.asrs.service.ApiConfigService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.ApiConfig; |
| | | import com.zy.asrs.service.ApiConfigService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @RequestMapping(value = "/apiConfig/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<ApiConfig> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(apiConfigService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/apiConfig/update/auth") |
| | | @ManagerAuth |
| | | public R update(ApiConfig apiConfig){ |
| | | if (Cools.isEmpty(apiConfig) || null==apiConfig.getId()){ |
| | | @RequestMapping(value = "/apiConfig/update/auth") |
| | | @ManagerAuth |
| | | public R update(ApiConfig apiConfig) { |
| | | if (Cools.isEmpty(apiConfig) || null == apiConfig.getId()) { |
| | | return R.error(); |
| | | } |
| | | apiConfig.setUpdateBy(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/apiConfig/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | apiConfigService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/apiConfig/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<ApiConfig> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("apiConfig")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<ApiConfig> page = apiConfigService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (ApiConfig apiConfig : page.getRecords()){ |
| | | for (ApiConfig apiConfig : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", apiConfig.getId()); |
| | | map.put("value", apiConfig.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<ApiConfig> wrapper = new EntityWrapper<ApiConfig>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != apiConfigService.selectOne(wrapper)){ |
| | | if (null != apiConfigService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(ApiConfig.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | 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.ApiLog; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.ApiLog; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @RequestMapping(value = "/apiLog/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<ApiLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | wrapper.orderDesc(Collections.singleton("create_time")); |
| | | return R.ok(apiLogService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/apiLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(ApiLog apiLog){ |
| | | if (Cools.isEmpty(apiLog) || null==apiLog.getId()){ |
| | | @RequestMapping(value = "/apiLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(ApiLog apiLog) { |
| | | if (Cools.isEmpty(apiLog) || null == apiLog.getId()) { |
| | | return R.error(); |
| | | } |
| | | apiLogService.updateById(apiLog); |
| | |
| | | |
| | | @RequestMapping(value = "/apiLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | apiLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/apiLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<ApiLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("apiLog")); |
| | |
| | | wrapper.like("uuid", condition); |
| | | Page<ApiLog> page = apiLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (ApiLog apiLog : page.getRecords()){ |
| | | for (ApiLog apiLog : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", apiLog.getId()); |
| | | map.put("value", apiLog.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<ApiLog> wrapper = new EntityWrapper<ApiLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != apiLogService.selectOne(wrapper)){ |
| | | if (null != apiLogService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(ApiLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basCrnError/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<BasCrnError> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basCrnErrorService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnError/add/auth") |
| | | @ManagerAuth(memo = "堆垛机异常码添加") |
| | | public R add(BasCrnError basCrnError) { |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnError/update/auth") |
| | | @RequestMapping(value = "/basCrnError/update/auth") |
| | | @ManagerAuth(memo = "堆垛机异常码修改") |
| | | public R update(BasCrnError basCrnError){ |
| | | if (Cools.isEmpty(basCrnError) || null==basCrnError.getErrorCode()){ |
| | | public R update(BasCrnError basCrnError) { |
| | | if (Cools.isEmpty(basCrnError) || null == basCrnError.getErrorCode()) { |
| | | return R.error(); |
| | | } |
| | | basCrnError.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/basCrnError/delete/auth") |
| | | @ManagerAuth(memo = "堆垛机异常码删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<BasCrnError> list = JSONArray.parseArray(param, BasCrnError.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (BasCrnError entity : list){ |
| | | for (BasCrnError entity : list) { |
| | | basCrnErrorService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basCrnError/export/auth") |
| | | @ManagerAuth(memo = "堆垛机异常码导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasCrnError> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basCrnError")); |
| | |
| | | wrapper.like("err_name", condition); |
| | | Page<BasCrnError> page = basCrnErrorService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasCrnError basCrnError : page.getRecords()){ |
| | | for (BasCrnError basCrnError : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basCrnError.getErrorCode()); |
| | | map.put("value", basCrnError.getErrName()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasCrnError> wrapper = new EntityWrapper<BasCrnError>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnErrorService.selectOne(wrapper)){ |
| | | if (null != basCrnErrorService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasCrnError.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basCrnStatus/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false, defaultValue = "stsNo")String orderByField, |
| | | @RequestParam(required = false, defaultValue = "asc")String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false, defaultValue = "stsNo") String orderByField, |
| | | @RequestParam(required = false, defaultValue = "asc") String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<BasCrnStatus> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } else { |
| | | wrapper.orderBy("sts_no", true); |
| | | } |
| | | return R.ok(basCrnStatusService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnStatus/update/auth") |
| | | @ManagerAuth(memo = "堆垛机状态修改") |
| | | public R update(BasCrnStatus basCrnStatus){ |
| | | if (Cools.isEmpty(basCrnStatus) || null==basCrnStatus.getStsNo()){ |
| | | @RequestMapping(value = "/basCrnStatus/update/auth") |
| | | @ManagerAuth(memo = "堆垛机状态修改") |
| | | public R update(BasCrnStatus basCrnStatus) { |
| | | if (Cools.isEmpty(basCrnStatus) || null == basCrnStatus.getStsNo()) { |
| | | return R.error(); |
| | | } |
| | | basCrnStatus.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/basCrnStatus/delete/auth") |
| | | @ManagerAuth(memo = "堆垛机状态删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<BasCrnStatus> list = JSONArray.parseArray(param, BasCrnStatus.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (BasCrnStatus entity : list){ |
| | | for (BasCrnStatus entity : list) { |
| | | basCrnStatusService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basCrnStatus/export/auth") |
| | | @ManagerAuth(memo = "堆垛机状态导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasCrnStatus> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basCrnStatus")); |
| | |
| | | wrapper.like("sts_desc", condition); |
| | | Page<BasCrnStatus> page = basCrnStatusService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasCrnStatus basCrnStatus : page.getRecords()){ |
| | | for (BasCrnStatus basCrnStatus : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basCrnStatus.getStsNo()); |
| | | map.put("value", basCrnStatus.getStsDesc()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasCrnStatus> wrapper = new EntityWrapper<BasCrnStatus>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnStatusService.selectOne(wrapper)){ |
| | | if (null != basCrnStatusService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasCrnStatus.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basCrnp/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<BasCrnp> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basCrnpService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basCrnp/update/auth") |
| | | @ManagerAuth(memo = "堆垛机修改") |
| | | public R update(BasCrnp basCrnp){ |
| | | if (Cools.isEmpty(basCrnp) || null==basCrnp.getCrnNo()){ |
| | | @RequestMapping(value = "/basCrnp/update/auth") |
| | | @ManagerAuth(memo = "堆垛机修改") |
| | | public R update(BasCrnp basCrnp) { |
| | | if (Cools.isEmpty(basCrnp) || null == basCrnp.getCrnNo()) { |
| | | return R.error(); |
| | | } |
| | | basCrnp.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/basCrnp/delete/auth") |
| | | @ManagerAuth(memo = "堆垛机删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<BasCrnp> list = JSONArray.parseArray(param, BasCrnp.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (BasCrnp entity : list){ |
| | | for (BasCrnp entity : list) { |
| | | basCrnpService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basCrnp/export/auth") |
| | | @ManagerAuth(memo = "堆垛机导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasCrnp> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basCrnp")); |
| | |
| | | wrapper.like("crn_no", condition); |
| | | Page<BasCrnp> page = basCrnpService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasCrnp basCrnp : page.getRecords()){ |
| | | for (BasCrnp basCrnp : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basCrnp.getCrnNo()); |
| | | map.put("value", basCrnp.getCrnNo()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasCrnp> wrapper = new EntityWrapper<BasCrnp>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basCrnpService.selectOne(wrapper)){ |
| | | if (null != basCrnpService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasCrnp.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basDevp/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<BasDevp> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basDevpService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basDevp/update/auth") |
| | | @ManagerAuth(memo = "站点修改") |
| | | public R update(BasDevp basDevp){ |
| | | if (Cools.isEmpty(basDevp) || null==basDevp.getDevNo()){ |
| | | @RequestMapping(value = "/basDevp/update/auth") |
| | | @ManagerAuth(memo = "站点修改") |
| | | public R update(BasDevp basDevp) { |
| | | if (Cools.isEmpty(basDevp) || null == basDevp.getDevNo()) { |
| | | return R.error(); |
| | | } |
| | | basDevp.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/basDevp/delete/auth") |
| | | @ManagerAuth(memo = "站点删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<BasDevp> list = JSONArray.parseArray(param, BasDevp.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (BasDevp entity : list){ |
| | | for (BasDevp entity : list) { |
| | | basDevpService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basDevp/export/auth") |
| | | @ManagerAuth(memo = "站点导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasDevp> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basDevp")); |
| | |
| | | wrapper.like("dev_no", condition); |
| | | Page<BasDevp> page = basDevpService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasDevp basDevp : page.getRecords()){ |
| | | for (BasDevp basDevp : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basDevp.getDevNo()); |
| | | map.put("value", basDevp.getDevNo()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasDevp> wrapper = new EntityWrapper<BasDevp>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basDevpService.selectOne(wrapper)){ |
| | | if (null != basDevpService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasDevp.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | @RequestMapping(value = "/basDevp/weigh/auth") |
| | | @ManagerAuth(memo = "站点称重查询") |
| | | public Double weigh(Integer dev_no) { |
| | | BasDevp basDevp=basDevpService.selectById(dev_no); |
| | | BasDevp basDevp = basDevpService.selectById(dev_no); |
| | | return basDevp.getGrossWt(); |
| | | } |
| | | |
| | |
| | | |
| | | @RequestMapping(value = "/basErrLog/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<BasErrLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } else { |
| | | wrapper.orderBy("create_time", false); |
| | |
| | | return R.ok(basErrLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basErrLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasErrLog basErrLog){ |
| | | if (Cools.isEmpty(basErrLog) || null==basErrLog.getId()){ |
| | | @RequestMapping(value = "/basErrLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasErrLog basErrLog) { |
| | | if (Cools.isEmpty(basErrLog) || null == basErrLog.getId()) { |
| | | return R.error(); |
| | | } |
| | | basErrLogService.updateById(basErrLog); |
| | |
| | | |
| | | @RequestMapping(value = "/basErrLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<BasErrLog> list = JSONArray.parseArray(param, BasErrLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (BasErrLog entity : list){ |
| | | for (BasErrLog entity : list) { |
| | | basErrLogService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basErrLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<BasErrLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basErrLog")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<BasErrLog> page = basErrLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasErrLog basErrLog : page.getRecords()){ |
| | | for (BasErrLog basErrLog : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basErrLog.getId()); |
| | | map.put("value", basErrLog.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasErrLog> wrapper = new EntityWrapper<BasErrLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basErrLogService.selectOne(wrapper)){ |
| | | if (null != basErrLogService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasErrLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basLocSts/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<BasLocSts> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basLocStsService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | @RequestMapping(value = "/basLocSts/edit/auth") |
| | | @ManagerAuth |
| | | public R edit(BasLocSts basLocSts) { |
| | | if (Cools.isEmpty(basLocSts)){ |
| | | if (Cools.isEmpty(basLocSts)) { |
| | | return R.error(); |
| | | } |
| | | if (null == basLocSts.getLocSts()){ |
| | | if (null == basLocSts.getLocSts()) { |
| | | basLocStsService.insert(basLocSts); |
| | | } else { |
| | | basLocStsService.updateById(basLocSts); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basLocSts/update/auth") |
| | | @RequestMapping(value = "/basLocSts/update/auth") |
| | | @ManagerAuth(memo = "库位状态修改") |
| | | public R update(BasLocSts basLocSts){ |
| | | if (Cools.isEmpty(basLocSts) || null==basLocSts.getLocSts()){ |
| | | public R update(BasLocSts basLocSts) { |
| | | if (Cools.isEmpty(basLocSts) || null == basLocSts.getLocSts()) { |
| | | return R.error(); |
| | | } |
| | | basLocSts.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/basLocSts/delete/auth") |
| | | @ManagerAuth(memo = "库位状态删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<BasLocSts> list = JSONArray.parseArray(param, BasLocSts.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (BasLocSts entity : list){ |
| | | for (BasLocSts entity : list) { |
| | | basLocStsService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basLocSts/export/auth") |
| | | @ManagerAuth(memo = "库位状态导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasLocSts> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basLocSts")); |
| | |
| | | wrapper.like("loc_desc", condition); |
| | | Page<BasLocSts> page = basLocStsService.selectPage(new Page<>(0, 32), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasLocSts basLocSts : page.getRecords()){ |
| | | for (BasLocSts basLocSts : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basLocSts.getLocSts()); |
| | | map.put("value", basLocSts.getLocDesc()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasLocSts> wrapper = new EntityWrapper<BasLocSts>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basLocStsService.selectOne(wrapper)){ |
| | | if (null != basLocStsService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasLocSts.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | 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.BasPlcerror; |
| | | import com.zy.asrs.service.BasPlcerrorService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.BasPlcerror; |
| | | import com.zy.asrs.service.BasPlcerrorService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class BasPlcerrorController extends BaseController { |
| | |
| | | |
| | | @RequestMapping(value = "/basPlcerror/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<BasPlcerror> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basPlcerrorService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basPlcerror/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasPlcerror basPlcerror){ |
| | | if (Cools.isEmpty(basPlcerror) || null==basPlcerror.getErrorCode()){ |
| | | @RequestMapping(value = "/basPlcerror/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasPlcerror basPlcerror) { |
| | | if (Cools.isEmpty(basPlcerror) || null == basPlcerror.getErrorCode()) { |
| | | return R.error(); |
| | | } |
| | | basPlcerror.setAppeUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/basPlcerror/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Integer[] ids) { |
| | | for (Integer id : ids) { |
| | | basPlcerrorService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basPlcerror/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<BasPlcerror> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basPlcerror")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<BasPlcerror> page = basPlcerrorService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasPlcerror basPlcerror : page.getRecords()){ |
| | | for (BasPlcerror basPlcerror : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basPlcerror.getErrorCode()); |
| | | map.put("value", basPlcerror.getErrorCode()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasPlcerror> wrapper = new EntityWrapper<BasPlcerror>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basPlcerrorService.selectOne(wrapper)){ |
| | | if (null != basPlcerrorService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasPlcerror.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | 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.BasPlcerrorLog; |
| | | import com.zy.asrs.service.BasPlcerrorLogService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.BasPlcerrorLog; |
| | | import com.zy.asrs.service.BasPlcerrorLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class BasPlcerrorLogController extends BaseController { |
| | |
| | | |
| | | @RequestMapping(value = "/basPlcerrorLog/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<BasPlcerrorLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basPlcerrorLogService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basPlcerrorLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasPlcerrorLog basPlcerrorLog){ |
| | | if (Cools.isEmpty(basPlcerrorLog) || null==basPlcerrorLog.getId()){ |
| | | @RequestMapping(value = "/basPlcerrorLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasPlcerrorLog basPlcerrorLog) { |
| | | if (Cools.isEmpty(basPlcerrorLog) || null == basPlcerrorLog.getId()) { |
| | | return R.error(); |
| | | } |
| | | basPlcerrorLogService.updateById(basPlcerrorLog); |
| | |
| | | |
| | | @RequestMapping(value = "/basPlcerrorLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | basPlcerrorLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basPlcerrorLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<BasPlcerrorLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basPlcerrorLog")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<BasPlcerrorLog> page = basPlcerrorLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasPlcerrorLog basPlcerrorLog : page.getRecords()){ |
| | | for (BasPlcerrorLog basPlcerrorLog : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basPlcerrorLog.getId()); |
| | | map.put("value", basPlcerrorLog.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasPlcerrorLog> wrapper = new EntityWrapper<BasPlcerrorLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basPlcerrorLogService.selectOne(wrapper)){ |
| | | if (null != basPlcerrorLogService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasPlcerrorLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basWrkIotype/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basWrkIotypeService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | @RequestMapping(value = "/basWrkIotype/edit/auth") |
| | | @ManagerAuth |
| | | public R edit(BasWrkIotype basWrkIotype) { |
| | | if (Cools.isEmpty(basWrkIotype)){ |
| | | if (Cools.isEmpty(basWrkIotype)) { |
| | | return R.error(); |
| | | } |
| | | if (null == basWrkIotype.getIoType()){ |
| | | if (null == basWrkIotype.getIoType()) { |
| | | basWrkIotypeService.insert(basWrkIotype); |
| | | } else { |
| | | basWrkIotypeService.updateById(basWrkIotype); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkIotype/update/auth") |
| | | @RequestMapping(value = "/basWrkIotype/update/auth") |
| | | @ManagerAuth(memo = "入出库类型修改") |
| | | public R update(BasWrkIotype basWrkIotype){ |
| | | if (Cools.isEmpty(basWrkIotype) || null==basWrkIotype.getIoType()){ |
| | | public R update(BasWrkIotype basWrkIotype) { |
| | | if (Cools.isEmpty(basWrkIotype) || null == basWrkIotype.getIoType()) { |
| | | return R.error(); |
| | | } |
| | | basWrkIotype.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/basWrkIotype/delete/auth") |
| | | @ManagerAuth(memo = "入出库类型删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<BasWrkIotype> list = JSONArray.parseArray(param, BasWrkIotype.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (BasWrkIotype entity : list){ |
| | | for (BasWrkIotype entity : list) { |
| | | basWrkIotypeService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basWrkIotype/export/auth") |
| | | @ManagerAuth(memo = "入出库类型导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basWrkIotype")); |
| | |
| | | wrapper.like("io_desc", condition); |
| | | Page<BasWrkIotype> page = basWrkIotypeService.selectPage(new Page<>(0, 20), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasWrkIotype basWrkIotype : page.getRecords()){ |
| | | for (BasWrkIotype basWrkIotype : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basWrkIotype.getIoType()); |
| | | map.put("value", basWrkIotype.getIoDesc()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasWrkIotype> wrapper = new EntityWrapper<BasWrkIotype>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basWrkIotypeService.selectOne(wrapper)){ |
| | | if (null != basWrkIotypeService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasWrkIotype.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basWrkStatus/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<BasWrkStatus> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basWrkStatusService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | @RequestMapping(value = "/basWrkStatus/edit/auth") |
| | | @ManagerAuth |
| | | public R edit(BasWrkStatus basWrkStatus) { |
| | | if (Cools.isEmpty(basWrkStatus)){ |
| | | if (Cools.isEmpty(basWrkStatus)) { |
| | | return R.error(); |
| | | } |
| | | if (null == basWrkStatus.getWrkSts()){ |
| | | if (null == basWrkStatus.getWrkSts()) { |
| | | basWrkStatusService.insert(basWrkStatus); |
| | | } else { |
| | | basWrkStatusService.updateById(basWrkStatus); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basWrkStatus/update/auth") |
| | | @RequestMapping(value = "/basWrkStatus/update/auth") |
| | | @ManagerAuth(memo = "工作状态修改") |
| | | public R update(BasWrkStatus basWrkStatus){ |
| | | if (Cools.isEmpty(basWrkStatus) || null==basWrkStatus.getWrkSts()){ |
| | | public R update(BasWrkStatus basWrkStatus) { |
| | | if (Cools.isEmpty(basWrkStatus) || null == basWrkStatus.getWrkSts()) { |
| | | return R.error(); |
| | | } |
| | | basWrkStatus.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/basWrkStatus/delete/auth") |
| | | @ManagerAuth(memo = "工作状态删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<BasWrkStatus> list = JSONArray.parseArray(param, BasWrkStatus.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (BasWrkStatus entity : list){ |
| | | for (BasWrkStatus entity : list) { |
| | | basWrkStatusService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basWrkStatus/export/auth") |
| | | @ManagerAuth(memo = "工作状态导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<BasWrkStatus> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basWrkStatus")); |
| | |
| | | wrapper.like("wrk_desc", condition); |
| | | Page<BasWrkStatus> page = basWrkStatusService.selectPage(new Page<>(0, 20), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasWrkStatus basWrkStatus : page.getRecords()){ |
| | | for (BasWrkStatus basWrkStatus : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basWrkStatus.getWrkSts()); |
| | | map.put("value", basWrkStatus.getWrkDesc()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasWrkStatus> wrapper = new EntityWrapper<BasWrkStatus>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basWrkStatusService.selectOne(wrapper)){ |
| | | if (null != basWrkStatusService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasWrkStatus.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | 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.CommandInfo; |
| | | import com.zy.asrs.service.CommandInfoService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import com.zy.asrs.service.CommandInfoService; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.enums.CommandStatusType; |
| | |
| | | |
| | | @RequestMapping(value = "/commandInfo/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<CommandInfo> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(commandInfoService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/commandInfo/listLog/auth") |
| | | @ManagerAuth |
| | | public R listLog(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R listLog(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<CommandInfo> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(commandInfoService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/commandInfo/update/auth") |
| | | @ManagerAuth |
| | | public R update(CommandInfo commandInfo){ |
| | | if (Cools.isEmpty(commandInfo) || null==commandInfo.getId()){ |
| | | @RequestMapping(value = "/commandInfo/update/auth") |
| | | @ManagerAuth |
| | | public R update(CommandInfo commandInfo) { |
| | | if (Cools.isEmpty(commandInfo) || null == commandInfo.getId()) { |
| | | return R.error(); |
| | | } |
| | | commandInfoService.updateById(commandInfo); |
| | |
| | | |
| | | @RequestMapping(value = "/commandInfo/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | commandInfoService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/commandInfo/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<CommandInfo> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("commandInfo")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<CommandInfo> page = commandInfoService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (CommandInfo commandInfo : page.getRecords()){ |
| | | for (CommandInfo commandInfo : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", commandInfo.getId()); |
| | | map.put("value", commandInfo.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<CommandInfo> wrapper = new EntityWrapper<CommandInfo>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != commandInfoService.selectOne(wrapper)){ |
| | | if (null != commandInfoService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(CommandInfo.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | 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.CommandInfo; |
| | | import com.zy.asrs.entity.CommandInfoLog; |
| | | import com.zy.asrs.service.CommandInfoLogService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.CommandInfoLog; |
| | | import com.zy.asrs.service.CommandInfoLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class CommandInfoLogController extends BaseController { |
| | |
| | | |
| | | @RequestMapping(value = "/commandInfoLog/listLog/auth") |
| | | @ManagerAuth |
| | | public R listLog(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R listLog(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<CommandInfoLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(commandInfoLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | |
| | | @RequestMapping(value = "/commandInfoLog/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<CommandInfoLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(commandInfoLogService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/commandInfoLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(CommandInfoLog commandInfoLog){ |
| | | if (Cools.isEmpty(commandInfoLog) || null==commandInfoLog.getId()){ |
| | | @RequestMapping(value = "/commandInfoLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(CommandInfoLog commandInfoLog) { |
| | | if (Cools.isEmpty(commandInfoLog) || null == commandInfoLog.getId()) { |
| | | return R.error(); |
| | | } |
| | | commandInfoLogService.updateById(commandInfoLog); |
| | |
| | | |
| | | @RequestMapping(value = "/commandInfoLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | commandInfoLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/commandInfoLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<CommandInfoLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("commandInfoLog")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<CommandInfoLog> page = commandInfoLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (CommandInfoLog commandInfoLog : page.getRecords()){ |
| | | for (CommandInfoLog commandInfoLog : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", commandInfoLog.getId()); |
| | | map.put("value", commandInfoLog.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<CommandInfoLog> wrapper = new EntityWrapper<CommandInfoLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != commandInfoLogService.selectOne(wrapper)){ |
| | | if (null != commandInfoLogService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(CommandInfoLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @PostMapping("/system/running/status") |
| | | @ManagerAuth(memo = "系统运行状态") |
| | | public R systemRunningStatus(){ |
| | | public R systemRunningStatus() { |
| | | return R.ok().add(Cools.add("status", SystemProperties.WCS_RUNNING_STATUS.get())); |
| | | } |
| | | |
| | | @PostMapping("/system/switch") |
| | | @ManagerAuth(memo = "系统运行开关操作") |
| | | public R systemSwitch(SystemSwitchParam param) throws InterruptedException { |
| | | if (Cools.isEmpty(param.getOperatorType())){ |
| | | if (Cools.isEmpty(param.getOperatorType())) { |
| | | return R.error(); |
| | | } |
| | | if (param.getOperatorType() == 0) { |
| | | if (Cools.isEmpty(param.getPassword())){ |
| | | if (Cools.isEmpty(param.getPassword())) { |
| | | return R.error("请输入口令"); |
| | | } |
| | | if (!param.getPassword().equals(SystemProperties.WCS_PASSWORD)){ |
| | | if (!param.getPassword().equals(SystemProperties.WCS_PASSWORD)) { |
| | | return R.error("口令错误"); |
| | | } |
| | | } |
| | | Thread.sleep(200L); |
| | | SystemProperties.WCS_RUNNING_STATUS.set(param.getOperatorType()==1?Boolean.TRUE:Boolean.FALSE); |
| | | SystemProperties.WCS_RUNNING_STATUS.set(param.getOperatorType() == 1 ? Boolean.TRUE : Boolean.FALSE); |
| | | return R.ok().add(Cools.add("status", SystemProperties.WCS_RUNNING_STATUS.get())); |
| | | } |
| | | |
| | |
| | | |
| | | @PostMapping("/latest/data/site") |
| | | @ManagerAuth(memo = "站点实时数据") |
| | | public R siteLatestData(){ |
| | | public R siteLatestData() { |
| | | List<SiteLatestDataVo> vos = new ArrayList<>(); |
| | | Map<Integer, StaProtocol> stations = new HashMap<>(); |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | |
| | | |
| | | @PostMapping("/latest/data/crn") |
| | | @ManagerAuth(memo = "堆垛机实时数据") |
| | | public R crnLatestData(){ |
| | | public R crnLatestData() { |
| | | List<CrnLatestDataVo> vos = new ArrayList<>(); |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | |
| | | if (crnProtocol.getAlarm1() > 0) { |
| | | vo.setCrnStatus(CrnStatusType.MACHINE_ERROR); |
| | | } else { |
| | | if (crnProtocol.getTaskNo()>0) { |
| | | if (crnProtocol.getTaskNo() > 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setCrnStatus(CrnStatusType.process(wrkMast.getIoType())); |
| | | } else { |
| | | vo.setCrnStatus(crnProtocol.modeType.equals(CrnModeType.AUTO)? CrnStatusType.MACHINE_AUTO: CrnStatusType.MACHINE_UN_AUTO); |
| | | vo.setCrnStatus(crnProtocol.modeType.equals(CrnModeType.AUTO) ? CrnStatusType.MACHINE_AUTO : CrnStatusType.MACHINE_UN_AUTO); |
| | | } |
| | | } else { |
| | | vo.setCrnStatus(crnProtocol.modeType.equals(CrnModeType.AUTO)? CrnStatusType.MACHINE_AUTO: CrnStatusType.MACHINE_UN_AUTO); |
| | | vo.setCrnStatus(crnProtocol.modeType.equals(CrnModeType.AUTO) ? CrnStatusType.MACHINE_AUTO : CrnStatusType.MACHINE_UN_AUTO); |
| | | } |
| | | } |
| | | vos.add(vo); |
| | |
| | | |
| | | @PostMapping("/latest/data/barcode") |
| | | @ManagerAuth(memo = "条码扫描仪实时数据") |
| | | public R barcodeLatestData(){ |
| | | public R barcodeLatestData() { |
| | | List<BarcodeDataVo> list = new ArrayList<>(); |
| | | for (Slave barcode : slaveProperties.getBarcode()) { |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, barcode.getId()); |
| | |
| | | |
| | | @PostMapping("/latest/data/scale") |
| | | @ManagerAuth(memo = "磅秤实时数据") |
| | | public R scaleLatestData(){ |
| | | public R scaleLatestData() { |
| | | List<ScaleDataVo> list = new ArrayList<>(); |
| | | for (Slave scale : slaveProperties.getScale()) { |
| | | ScaleThread scaleThread = (ScaleThread) SlaveConnection.get(SlaveType.Scale, scale.getId()); |
| | |
| | | |
| | | @PostMapping("/site/detail") |
| | | @ManagerAuth(memo = "输送设备数据详情") |
| | | public R siteDetail(@RequestParam Integer siteId){ |
| | | if (Cools.isEmpty(siteId)){ |
| | | public R siteDetail(@RequestParam Integer siteId) { |
| | | if (Cools.isEmpty(siteId)) { |
| | | return R.parse(CodeRes.EMPTY); |
| | | } |
| | | SiteDetailVo vo = new SiteDetailVo(); |
| | |
| | | } |
| | | } |
| | | |
| | | vo.setAutoing(staProtocol.isAutoing()?"Y":"N"); // 自动 |
| | | vo.setLoading(staProtocol.isLoading()?"Y":"N"); // 有物 |
| | | vo.setAutoing(staProtocol.isAutoing() ? "Y" : "N"); // 自动 |
| | | vo.setLoading(staProtocol.isLoading() ? "Y" : "N"); // 有物 |
| | | |
| | | vo.setCanining(basDevp.getCanining()); // 能入 |
| | | vo.setCanouting(basDevp.getCanouting()); // 能出 |
| | |
| | | |
| | | @PostMapping("/crn/detail") |
| | | @ManagerAuth(memo = "堆垛机设备数据详情") |
| | | public R crnDetail(@RequestParam Integer crnNo){ |
| | | if (Cools.isEmpty(crnNo)){ |
| | | public R crnDetail(@RequestParam Integer crnNo) { |
| | | if (Cools.isEmpty(crnNo)) { |
| | | return R.parse(CodeRes.EMPTY); |
| | | } |
| | | CrnDetailVo vo = new CrnDetailVo(); |
| | |
| | | @Deprecated |
| | | @PostMapping("/site/update") |
| | | @ManagerAuth(memo = "输送设备数据修改") |
| | | public R updateSite(){ |
| | | public R updateSite() { |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Deprecated |
| | | @PostMapping("/crn/update") |
| | | @ManagerAuth(memo = "堆垛机数据修改") |
| | | public R updateCrn(){ |
| | | public R updateCrn() { |
| | | return R.ok(); |
| | | } |
| | | |
| | | @GetMapping("/barcode/output/site") |
| | | public R crnOutput(){ |
| | | public R crnOutput() { |
| | | ArrayList<JSONObject> jsonObjects = new ArrayList<>(OutputQueue.SCALE); |
| | | jsonObjects.sort(new Comparator<JSONObject>() { |
| | | @Override |
| | |
| | | } |
| | | |
| | | @PostMapping("loc/pie/charts") |
| | | public R dsa(){ |
| | | Map<String,Object> map=new HashMap<String, Object>(); |
| | | List<ChartBean> list = new ArrayList<ChartBean>(); |
| | | public R dsa() { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | List<ChartBean> list = new ArrayList<ChartBean>(); |
| | | |
| | | LocChartPie locUseRate = reportQueryMapper.getLocUseRate(); |
| | | if(locUseRate!=null) { |
| | | if (locUseRate != null) { |
| | | ChartBean fqty = new ChartBean(); |
| | | fqty.setName("在库库位"); |
| | | fqty.setY(locUseRate.getFqty()); |
| | |
| | | xqty.setY(locUseRate.getXqty()); |
| | | list.add(xqty); |
| | | } |
| | | map.put("rows",list); |
| | | map.put("rows", list); |
| | | return R.ok(map); |
| | | } |
| | | |
| | | @PostMapping("locIo/line/charts") |
| | | public R locIoLineCharts(){ |
| | | Map<String,Object> map=new HashMap<String, Object>(); |
| | | public R locIoLineCharts() { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | List<AxisBean> list = new ArrayList<AxisBean>(); |
| | | |
| | | List<WorkChartAxis> listChart = reportQueryMapper.getChartAxis(); |
| | | |
| | | if(listChart!=null) { |
| | | if (listChart != null) { |
| | | ArrayList<Integer> data1 = new ArrayList<Integer>(); |
| | | ArrayList<Integer> data2 = new ArrayList<Integer>(); |
| | | |
| | | SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(Calendar.DATE, -12); |
| | | for(int i=0;i<12;i++) { |
| | | for (int i = 0; i < 12; i++) { |
| | | boolean flag = true; |
| | | calendar.add(Calendar.DATE, 1); |
| | | String str = sf.format(calendar.getTime()); |
| | | for(WorkChartAxis workChart : listChart) { |
| | | if(str.equals(workChart.getYmd())) { |
| | | for (WorkChartAxis workChart : listChart) { |
| | | if (str.equals(workChart.getYmd())) { |
| | | data1.add(workChart.getInqty()); |
| | | data2.add(workChart.getOutqty()); |
| | | flag = false; |
| | | break; |
| | | } |
| | | } |
| | | if(flag) { |
| | | if (flag) { |
| | | data1.add(0); |
| | | data2.add(0); |
| | | } |
| | |
| | | outqty.setData(data2.toArray(array2)); |
| | | list.add(outqty); |
| | | } |
| | | map.put("rows",list); |
| | | map.put("rows", list); |
| | | return R.ok(map); |
| | | } |
| | | |
| | |
| | | import com.zy.asrs.domain.vo.CrnListVo; |
| | | import com.zy.asrs.domain.vo.CrnMsgTableVo; |
| | | import com.zy.asrs.domain.vo.CrnStateTableVo; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.BasCrnError; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.BasCrnErrorMapper; |
| | | import com.zy.asrs.service.BasCrnpService; |
| | | import com.zy.asrs.service.LocMastService; |
| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | private String movePath; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | |
| | | |
| | | @ManagerAuth(memo = "进行中的命令") |
| | | @PostMapping("/crn/command/ongoing") |
| | | public R ongoingCommand(){ |
| | | public R ongoingCommand() { |
| | | List<CommandLogVo> list = new ArrayList<>(); |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | CommandLogVo vo = new CommandLogVo(); |
| | |
| | | vo.setStatus(1); // 状态 |
| | | Task task = MessageQueue.peek(SlaveType.Crn, crn.getId()); |
| | | if (task != null) { |
| | | vo.setCommand(JSON.toJSONString((CrnCommand)task.getData())); |
| | | vo.setCommand(JSON.toJSONString((CrnCommand) task.getData())); |
| | | } |
| | | } |
| | | return R.ok().add(list); |
| | |
| | | |
| | | @PostMapping("/crn/table/crn/state") |
| | | @ManagerAuth(memo = "堆垛机信息表") |
| | | public R crnStateTable(){ |
| | | public R crnStateTable() { |
| | | List<CrnStateTableVo> list = new ArrayList<>(); |
| | | List<BasCrnp> crnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().orderBy("crn_no")); |
| | | for (BasCrnp basCrnp : crnps) { |
| | |
| | | |
| | | vo.setForkOffset(crnProtocol.getForkPosType().desc); // 货叉位置 |
| | | vo.setLiftPos(crnProtocol.getLiftPosType().desc); |
| | | vo.setWalkPos(crnProtocol.getWalkPos()==1?"不在定位":"在定位"); |
| | | vo.setWalkPos(crnProtocol.getWalkPos() == 1 ? "不在定位" : "在定位"); |
| | | vo.setWarnCode(String.valueOf(crnProtocol.getAlarm1())); |
| | | if (crnProtocol.getAlarm() > 0) { |
| | | BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm()); |
| | | vo.setAlarm(crnError==null?"未知异常":crnError.getErrName()); |
| | | vo.setAlarm(crnError == null ? "未知异常" : crnError.getErrName()); |
| | | } |
| | | } |
| | | return R.ok().add(list); |
| | |
| | | |
| | | @PostMapping("/crn/table/crn/{id}/state") |
| | | @ManagerAuth(memo = "堆垛机信息表") |
| | | public R crnStateTable(@PathVariable("id") Integer id){ |
| | | public R crnStateTable(@PathVariable("id") Integer id) { |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", id).orderBy("crn_no")); |
| | | // 表格行 |
| | | CrnStateTableVo vo = new CrnStateTableVo(); |
| | |
| | | |
| | | vo.setForkOffset(crnProtocol.getForkPosType().desc); // 货叉位置 |
| | | vo.setLiftPos(crnProtocol.getLiftPosType().desc); |
| | | vo.setWalkPos(crnProtocol.getWalkPos()==1?"不在定位":"在定位"); |
| | | vo.setWalkPos(crnProtocol.getWalkPos() == 1 ? "不在定位" : "在定位"); |
| | | vo.setWarnCode(String.valueOf(crnProtocol.getAlarm1())); |
| | | if (crnProtocol.getAlarm1() > 0) { |
| | | BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm1()); |
| | | vo.setAlarm(crnError==null?"未知异常":crnError.getErrName()); |
| | | vo.setAlarm(crnError == null ? "未知异常" : crnError.getErrName()); |
| | | } |
| | | return R.ok().add(vo); |
| | | } |
| | | |
| | | @PostMapping("/crn/table/crn/msg") |
| | | @ManagerAuth(memo = "堆垛机数据表") |
| | | public R crnMsgTable(){ |
| | | public R crnMsgTable() { |
| | | List<CrnMsgTableVo> list = new ArrayList<>(); |
| | | List<BasCrnp> crnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().orderBy("crn_no")); |
| | | for (BasCrnp basCrnp : crnps) { |
| | |
| | | } |
| | | |
| | | vo.setWorkNo(crnProtocol.getTaskNo()); // 任务号 |
| | | if (crnProtocol.getTaskNo()>0) { |
| | | if (crnProtocol.getTaskNo() > 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setStatus(CrnStatusType.process(wrkMast.getIoType()).getDesc()); // 模式状态 |
| | |
| | | vo.setLocNo(wrkMast.getLocNo()); // 目标库位 |
| | | } |
| | | } else { |
| | | vo.setStatus(crnProtocol.modeType.equals(CrnModeType.AUTO)? CrnStatusType.MACHINE_AUTO.getDesc(): CrnStatusType.MACHINE_UN_AUTO.getDesc()); // 模式状态 |
| | | vo.setStatus(crnProtocol.modeType.equals(CrnModeType.AUTO) ? CrnStatusType.MACHINE_AUTO.getDesc() : CrnStatusType.MACHINE_UN_AUTO.getDesc()); // 模式状态 |
| | | } |
| | | vo.setXspeed(crnProtocol.getXSpeed()); // 走行速度(m/min) |
| | | vo.setYspeed(crnProtocol.getYSpeed()); // 升降速度(m/min) |
| | |
| | | |
| | | @PostMapping("/crn/table/crn/{id}/msg") |
| | | @ManagerAuth(memo = "堆垛机数据表") |
| | | public R crnMsgTable(@PathVariable("id") Integer id){ |
| | | public R crnMsgTable(@PathVariable("id") Integer id) { |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>().eq("crn_no", id).orderBy("crn_no")); |
| | | // 表格行 |
| | | CrnMsgTableVo vo = new CrnMsgTableVo(); |
| | |
| | | } |
| | | |
| | | vo.setWorkNo(crnProtocol.getTaskNo()); // 任务号 |
| | | if (crnProtocol.getTaskNo()>0) { |
| | | if (crnProtocol.getTaskNo() > 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setStatus(CrnStatusType.process(wrkMast.getIoType()).getDesc()); // 模式状态 |
| | |
| | | vo.setLocNo(wrkMast.getLocNo()); // 目标库位 |
| | | } |
| | | } else { |
| | | vo.setStatus(crnProtocol.modeType.equals(CrnModeType.AUTO)? CrnStatusType.MACHINE_AUTO.getDesc(): CrnStatusType.MACHINE_UN_AUTO.getDesc()); // 模式状态 |
| | | vo.setStatus(crnProtocol.modeType.equals(CrnModeType.AUTO) ? CrnStatusType.MACHINE_AUTO.getDesc() : CrnStatusType.MACHINE_UN_AUTO.getDesc()); // 模式状态 |
| | | } |
| | | vo.setXspeed(crnProtocol.getXSpeed()); // 走行速度(m/min) |
| | | vo.setYspeed(crnProtocol.getYSpeed()); // 升降速度(m/min) |
| | |
| | | |
| | | @GetMapping("/crn/list/auth") |
| | | @ManagerAuth(memo = "堆垛机数据表") |
| | | public R crnList(){ |
| | | public R crnList() { |
| | | List<CrnListVo> list = new ArrayList<>(); |
| | | List<BasCrnp> crnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().orderBy("crn_no")); |
| | | for (BasCrnp basCrnp : crnps) { |
| | |
| | | } |
| | | |
| | | vo.setWorkNo(crnProtocol.getTaskNo()); // 任务号 |
| | | if (crnProtocol.getTaskNo()>0) { |
| | | if (crnProtocol.getTaskNo() > 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(crnProtocol.getTaskNo()); |
| | | if (wrkMast != null) { |
| | | vo.setDeviceStatus(CrnStatusType.process(wrkMast.getIoType()).getDesc()); // 模式状态 |
| | |
| | | vo.setLocNo(wrkMast.getLocNo()); // 目标库位 |
| | | } |
| | | } else { |
| | | vo.setDeviceStatus(crnProtocol.modeType.equals(CrnModeType.AUTO)? CrnStatusType.MACHINE_AUTO.getDesc(): CrnStatusType.MACHINE_UN_AUTO.getDesc()); // 模式状态 |
| | | vo.setDeviceStatus(crnProtocol.modeType.equals(CrnModeType.AUTO) ? CrnStatusType.MACHINE_AUTO.getDesc() : CrnStatusType.MACHINE_UN_AUTO.getDesc()); // 模式状态 |
| | | } |
| | | vo.setXspeed(crnProtocol.getXSpeed()); // 走行速度(m/min) |
| | | vo.setYspeed(crnProtocol.getYSpeed()); // 升降速度(m/min) |
| | |
| | | |
| | | vo.setForkOffset(crnProtocol.getForkPosType().desc); // 货叉位置 |
| | | vo.setLiftPos(crnProtocol.getLiftPosType().desc); |
| | | vo.setWalkPos(crnProtocol.getWalkPos()==1?"不在定位":"在定位"); |
| | | vo.setWalkPos(crnProtocol.getWalkPos() == 1 ? "不在定位" : "在定位"); |
| | | vo.setWarnCode(String.valueOf(crnProtocol.getAlarm1())); |
| | | if (crnProtocol.getAlarm1() > 0) { |
| | | BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm1()); |
| | | vo.setAlarm(crnError==null?"未知异常":crnError.getErrName()); |
| | | vo.setAlarm(crnError == null ? "未知异常" : crnError.getErrName()); |
| | | } |
| | | vo.setInEnable(basCrnp.getInEnable()); |
| | | vo.setOutEnable(basCrnp.getOutEnable()); |
| | |
| | | |
| | | @PostMapping("/crn/output/site") |
| | | @ManagerAuth(memo = "堆垛机报文日志输出") |
| | | public R crnOutput(){ |
| | | public R crnOutput() { |
| | | StringBuilder str = new StringBuilder(); |
| | | String s; |
| | | int i = 0; |
| | | while((s = OutputQueue.CRN.poll()) != null && i <=10) { |
| | | while ((s = OutputQueue.CRN.poll()) != null && i <= 10) { |
| | | str.append("\n").append(s); |
| | | i++; |
| | | } |
| | |
| | | |
| | | |
| | | @GetMapping("/crn/demo/status") |
| | | public R demoStatus(){ |
| | | public R demoStatus() { |
| | | List<Map<String, Object>> res = new ArrayList<>(); |
| | | for (CrnSlave crnSlave : slaveProperties.getCrn()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | @PostMapping("/crn/demo/switch") |
| | | @ManagerAuth(memo = "堆垛机演示") |
| | | public R crnDemo(CrnDemoParam param) throws InterruptedException { |
| | | if (Cools.isEmpty(param.getCrnId())){ |
| | | if (Cools.isEmpty(param.getCrnId())) { |
| | | return R.error(); |
| | | } |
| | | if (Cools.isEmpty(param.getPassword())){ |
| | | if (Cools.isEmpty(param.getPassword())) { |
| | | return R.error("请输入口令"); |
| | | } |
| | | if (!param.getPassword().equals(SystemProperties.WCS_PASSWORD)){ |
| | | if (!param.getPassword().equals(SystemProperties.WCS_PASSWORD)) { |
| | | return R.error("口令错误"); |
| | | } |
| | | Thread.sleep(200L); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /****************************************************************/ |
| | | /************************** 手动操作 ******************************/ |
| | | /****************************************************************/ |
| | | |
| | | @ManagerAuth(memo = "入库") |
| | | @PostMapping("/crn/operator/put") |
| | | public R crnPut(CrnOperatorParam param){ |
| | | public R crnPut(CrnOperatorParam param) { |
| | | // // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | command.setDestinationPosX(param.getRow()); // 目标库位排 |
| | | command.setDestinationPosY(param.getBay()); // 目标库位列 |
| | | command.setDestinationPosZ(param.getLev()); // 目标库位层 |
| | | command.setCommand((short)1); |
| | | return crnControl(command)?R.ok():R.error(); |
| | | command.setCommand((short) 1); |
| | | return crnControl(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "出库") |
| | | @PostMapping("/crn/operator/take") |
| | | public R crnTake(CrnOperatorParam param){ |
| | | public R crnTake(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | command.setDestinationPosX(param.getRow()); // 目标库位排 |
| | | command.setDestinationPosY(param.getBay()); // 目标库位列 |
| | | command.setDestinationPosZ(param.getLev()); // 目标库位层 |
| | | command.setCommand((short)1); |
| | | return crnControl(command)?R.ok():R.error(); |
| | | command.setCommand((short) 1); |
| | | return crnControl(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "库位转移") |
| | | @PostMapping("/crn/operator/stockMove") |
| | | public R crnStockMove(CrnOperatorParam param){ |
| | | public R crnStockMove(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | command.setDestinationPosZ(param.getRow()); // 目标库位排 |
| | | command.setDestinationPosX(param.getBay()); // 目标库位列 |
| | | command.setDestinationPosY(param.getLev()); // 目标库位层 |
| | | command.setCommand((short)1); |
| | | command.setCommand((short) 1); |
| | | LocMast sourceLoc = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", command.getSourcePosX()) |
| | | .eq("bay1", command.getSourcePosY()).eq("lev1", command.getSourcePosZ())); |
| | | LocMast loc = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", command.getDestinationPosX()) |
| | | .eq("bay1", command.getDestinationPosY()).eq("lev1", command.getDestinationPosZ())); |
| | | VersionUtils.locMoveCheckLocType(sourceLoc, loc); |
| | | return crnControl(command)?R.ok():R.error(); |
| | | return crnControl(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "站到站") |
| | | @PostMapping("/crn/operator/siteMove") |
| | | public R crnSiteMove(CrnOperatorParam param){ |
| | | public R crnSiteMove(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | command.setDestinationPosX(param.getStaNo()); // 目标库位排 |
| | | command.setDestinationPosY((short) 0); // 目标库位列 |
| | | command.setDestinationPosZ((short) 1); // 目标库位层 |
| | | return crnControl(command)?R.ok():R.error(); |
| | | return crnControl(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "回原点") |
| | | @PostMapping("/crn/operator/bacOrigin") |
| | | public R crnBacOrigin(CrnOperatorParam param){ |
| | | public R crnBacOrigin(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | command.setDestinationPosX((short) 0); // 目标库位排 |
| | | command.setDestinationPosY((short) 0); // 目标库位列 |
| | | command.setDestinationPosZ((short) 0); // 目标库位层 |
| | | return crnControl(command)?R.ok():R.error(); |
| | | return crnControl(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "反原点") |
| | | @PostMapping("/crn/operator/reverseOrigin") |
| | | public R reverseOrigin(CrnOperatorParam param){ |
| | | public R reverseOrigin(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | command.setDestinationPosX((short) 0); // 目标库位排 |
| | | command.setDestinationPosY((short) 22); // 目标库位列 |
| | | command.setDestinationPosZ((short) 1); // 目标库位层 |
| | | return crnControl(command)?R.ok():R.error(); |
| | | return crnControl(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | // @ManagerAuth(memo = "坐标移动") |
| | |
| | | |
| | | @ManagerAuth(memo = "任务完成") |
| | | @PostMapping("/crn/operator/taskComplete") |
| | | public R crnTaskComplete(CrnOperatorParam param){ |
| | | public R crnTaskComplete(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | command.setDestinationPosX((short) 0); // 目标库位排 |
| | | command.setDestinationPosY((short) 0); // 目标库位列 |
| | | command.setDestinationPosZ((short) 0); // 目标库位层 |
| | | command.setCommand((short)0); |
| | | return crnControl(command)?R.ok():R.error(); |
| | | command.setCommand((short) 0); |
| | | return crnControl(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | // @ManagerAuth(memo = "暂停") |
| | |
| | | |
| | | @ManagerAuth(memo = "清除命令") |
| | | @PostMapping("/crn/operator/clearCommand") |
| | | public R crnClearCommand(CrnOperatorParam param){ |
| | | public R crnClearCommand(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | command.setDestinationPosX((short) 0); // 目标库位排 |
| | | command.setDestinationPosY((short) 0); // 目标库位列 |
| | | command.setDestinationPosZ((short) 0); // 目标库位层 |
| | | return crnControl(command)?R.ok():R.error(); |
| | | return crnControl(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "手动复位") |
| | |
| | | |
| | | @ManagerAuth(memo = "切换联机模式") |
| | | @PostMapping("/crn/operator/auto") |
| | | public R crnAuto(CrnOperatorParam param){ |
| | | public R crnAuto(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | | command.setAuto((short)1); |
| | | command.setAuto((short) 1); |
| | | |
| | | return crnControl2(command)?R.ok():R.error(); |
| | | return crnControl2(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "切换半手动模式") |
| | | @PostMapping("/crn/operator/semiAutomatic") |
| | | public R crnsemiAutomatic(CrnOperatorParam param){ |
| | | public R crnsemiAutomatic(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | | command.setAuto((short)2); |
| | | command.setAuto((short) 2); |
| | | |
| | | return crnControl2(command)?R.ok():R.error(); |
| | | return crnControl2(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "切换手动模式") |
| | | @PostMapping("/crn/operator/hand") |
| | | public R onlineWrk1(CrnOperatorParam param){ |
| | | public R onlineWrk1(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | | command.setAuto((short)3); |
| | | command.setAuto((short) 3); |
| | | |
| | | return crnControl2(command)?R.ok():R.error(); |
| | | return crnControl2(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "申请完成任务") |
| | | @PostMapping("/crn/operator/onlineWrk1") |
| | | public R onlineWrk2(CrnOperatorParam param){ |
| | | public R onlineWrk2(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | | command.setOnlineWrk1((short)1); |
| | | command.setOnlineWrk1((short) 1); |
| | | |
| | | return crnControl2(command)?R.ok():R.error(); |
| | | return crnControl2(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "申请取消任务") |
| | | @PostMapping("/crn/operator/onlineWrk2") |
| | | public R onlineWrk3(CrnOperatorParam param){ |
| | | public R onlineWrk3(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | | command.setOnlineWrk2((short)1); |
| | | command.setOnlineWrk2((short) 1); |
| | | |
| | | return crnControl2(command)?R.ok():R.error(); |
| | | return crnControl2(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "清除联机任务") |
| | | @PostMapping("/crn/operator/onlineWrk3") |
| | | public R onlineWrk4(CrnOperatorParam param){ |
| | | public R onlineWrk4(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | | command.setOnlineWrk3((short)1); |
| | | command.setOnlineWrk3((short) 1); |
| | | |
| | | return crnControl2(command)?R.ok():R.error(); |
| | | return crnControl2(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "恢复联机任务") |
| | | @PostMapping("/crn/operator/onlineWrk4") |
| | | public R crnHand(CrnOperatorParam param){ |
| | | public R crnHand(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | | command.setOnlineWrk4((short)1); |
| | | command.setOnlineWrk4((short) 1); |
| | | |
| | | return crnControl2(command)?R.ok():R.error(); |
| | | return crnControl2(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | @ManagerAuth(memo = "复位") |
| | | @PostMapping("/crn/operator/reset") |
| | | public R crnReset(CrnOperatorParam param){ |
| | | public R crnReset(CrnOperatorParam param) { |
| | | // 系统运行状态判断 |
| | | // if (SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | // return R.error("wcs系统状态为开启"); |
| | |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(param.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo((short) 0); // 工作号 |
| | | command.setReset((short)1); |
| | | command.setReset((short) 1); |
| | | |
| | | return crnControl2(command)?R.ok():R.error(); |
| | | return crnControl2(command) ? R.ok() : R.error(); |
| | | } |
| | | |
| | | |
| | | |
| | | private boolean crnControl2(CrnCommand command){ |
| | | private boolean crnControl2(CrnCommand command) { |
| | | if (command.getCrnNo() == null) { |
| | | throw new CoolException("请选择堆垛机"); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private boolean crnControl(CrnCommand command){ |
| | | private boolean crnControl(CrnCommand command) { |
| | | if (command.getCrnNo() == null) { |
| | | throw new CoolException("请选择堆垛机"); |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | private void staNoProcess(CrnOperatorParam param, CrnCommand command){ |
| | | if (param.getSourceStaNo()!=null) { |
| | | private void staNoProcess(CrnOperatorParam param, CrnCommand command) { |
| | | if (param.getSourceStaNo() != null) { |
| | | if (param.getSourceStaNo() == 5) { |
| | | command.setSourcePosX((short) 2); // 源库位排 |
| | | command.setSourcePosY((short) 0); // 源库位列 |
| | |
| | | command.setSourcePosZ((short) 1); // 源库位层 |
| | | } |
| | | } |
| | | if (param.getStaNo()!=null) { |
| | | if (param.getStaNo() != null) { |
| | | if (param.getStaNo() == 5) { |
| | | command.setDestinationPosX((short) 2); // 目标库位排 |
| | | command.setDestinationPosY((short) 0); // 目标库位列 |
| | |
| | | // /crn/list/auth |
| | | @RequestMapping(value = "/crnListQuery/auth") |
| | | @ManagerAuth |
| | | public R listQuery(String condition){ |
| | | public R listQuery(String condition) { |
| | | ArrayList<HashMap<String, Object>> list = new ArrayList<>(); |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | |
| | | 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.DataResource; |
| | | import com.zy.asrs.service.DataResourceService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.DataResource; |
| | | import com.zy.asrs.service.DataResourceService; |
| | | import com.zy.common.utils.YamlUtils; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class DataResourceController extends BaseController { |
| | |
| | | |
| | | @RequestMapping(value = "/dataResource/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<DataResource> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(dataResourceService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/dataResource/tree/auth") |
| | | @ManagerAuth |
| | | public R tree(){ |
| | | public R tree() { |
| | | return R.parse("0-操作成功").add(dataResourceService.selectAll()); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/dataResource/update/auth") |
| | | @ManagerAuth |
| | | public R update(DataResource dataResource){ |
| | | if (Cools.isEmpty(dataResource) || null==dataResource.getId()){ |
| | | @RequestMapping(value = "/dataResource/update/auth") |
| | | @ManagerAuth |
| | | public R update(DataResource dataResource) { |
| | | if (Cools.isEmpty(dataResource) || null == dataResource.getId()) { |
| | | return R.error(); |
| | | } |
| | | dataResourceService.updateById(dataResource); |
| | |
| | | |
| | | @RequestMapping(value = "/dataResource/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Integer[] ids) { |
| | | for (Integer id : ids) { |
| | | dataResourceService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/dataResource/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<DataResource> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("dataResource")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<DataResource> page = dataResourceService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DataResource dataResource : page.getRecords()){ |
| | | for (DataResource dataResource : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", dataResource.getId()); |
| | | map.put("value", dataResource.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<DataResource> wrapper = new EntityWrapper<DataResource>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != dataResourceService.selectOne(wrapper)){ |
| | | if (null != dataResourceService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(DataResource.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | 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.DeviceError; |
| | | import com.zy.asrs.service.DeviceErrorService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.DeviceError; |
| | | import com.zy.asrs.service.DeviceErrorService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @RequestMapping(value = "/deviceError/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<DeviceError> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(deviceErrorService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deviceError/update/auth") |
| | | @ManagerAuth |
| | | public R update(DeviceError deviceError){ |
| | | if (Cools.isEmpty(deviceError) || null==deviceError.getId()){ |
| | | @RequestMapping(value = "/deviceError/update/auth") |
| | | @ManagerAuth |
| | | public R update(DeviceError deviceError) { |
| | | if (Cools.isEmpty(deviceError) || null == deviceError.getId()) { |
| | | return R.error(); |
| | | } |
| | | deviceErrorService.updateById(deviceError); |
| | |
| | | |
| | | @RequestMapping(value = "/deviceError/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | deviceErrorService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/deviceError/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<DeviceError> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("deviceError")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<DeviceError> page = deviceErrorService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DeviceError deviceError : page.getRecords()){ |
| | | for (DeviceError deviceError : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", deviceError.getId()); |
| | | map.put("value", deviceError.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<DeviceError> wrapper = new EntityWrapper<DeviceError>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != deviceErrorService.selectOne(wrapper)){ |
| | | if (null != deviceErrorService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(DeviceError.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/locDetl/auth") |
| | | @ManagerAuth |
| | | public R stockOutList(@RequestParam(value = "locNos[]") List<String> locNos){ |
| | | public R stockOutList(@RequestParam(value = "locNos[]") List<String> locNos) { |
| | | if (!locNos.isEmpty()) { |
| | | List<LocDetl> res = new ArrayList<>(); |
| | | for (String locNo : new HashSet<>(locNos)) { |
| | |
| | | |
| | | @RequestMapping(value = "/locDetl/list/auth")// /locDetl/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){ |
| | | 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<LocDetl> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(LocDetl.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(locDetlService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/update/auth") |
| | | @ManagerAuth(memo = "库位明细修改") |
| | | public R update(LocDetl locDetl){ |
| | | if (Cools.isEmpty(locDetl) || null==locDetl.getMatnr()){ |
| | | @RequestMapping(value = "/locDetl/update/auth") |
| | | @ManagerAuth(memo = "库位明细修改") |
| | | public R update(LocDetl locDetl) { |
| | | if (Cools.isEmpty(locDetl) || null == locDetl.getMatnr()) { |
| | | return R.error(); |
| | | } |
| | | locDetl.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/locDetl/delete/auth") |
| | | @ManagerAuth(memo = "库位明细删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<LocDetl> list = JSONArray.parseArray(param, LocDetl.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (LocDetl entity : list){ |
| | | for (LocDetl entity : list) { |
| | | locDetlService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/locDetl/export/auth") |
| | | @ManagerAuth(memo = "库位明细导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("locDetl")); |
| | |
| | | if (chooseRow.length() == 1) { |
| | | row = "0" + chooseRow; |
| | | map.remove("row"); |
| | | }else { |
| | | } else { |
| | | row = chooseRow; |
| | | map.remove("row"); |
| | | } |
| | | } |
| | | convert(map, wrapper); |
| | | if (!row.equals("")){ |
| | | if (!row.equals("")) { |
| | | wrapper.and() |
| | | .where("loc_no like '" +row +"%'"); |
| | | .where("loc_no like '" + row + "%'"); |
| | | } |
| | | List<LocDetl> list = locDetlService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | |
| | | wrapper.like("matnr", condition); |
| | | Page<LocDetl> page = locDetlService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (LocDetl locDetl : page.getRecords()){ |
| | | for (LocDetl locDetl : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", locDetl.getMatnr()); |
| | | map.put("value", locDetl.getMatnr()); |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.param.LocMastInitParam; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.Shelves; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @RequestMapping(value = "/locMast/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper.eq("status",0))); |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper.eq("status", 0))); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | |
| | | @RequestMapping(value = "/locMast/delete/auth") |
| | | @ManagerAuth(memo = "库位删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<LocMast> list = JSONArray.parseArray(param, LocMast.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (LocMast entity : list){ |
| | | for (LocMast entity : list) { |
| | | locMastService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/locMast/export/auth") |
| | | @ManagerAuth(memo = "库位导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("locMast")); |
| | |
| | | wrapper.like("loc_no", condition); |
| | | Page<LocMast> page = locMastService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (LocMast locMast : page.getRecords()){ |
| | | for (LocMast locMast : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", locMast.getLocNo()); |
| | | map.put("value", locMast.getLocNo()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<LocMast> wrapper = new EntityWrapper<LocMast>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != locMastService.selectOne(wrapper)){ |
| | | if (null != locMastService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(LocMast.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/locMast/update/auth") |
| | | @ManagerAuth(memo = "库位修改") |
| | | public R update(LocMast locMast){ |
| | | if (Cools.isEmpty(locMast) || null==locMast.getLocNo()){ |
| | | public R update(LocMast locMast) { |
| | | if (Cools.isEmpty(locMast) || null == locMast.getLocNo()) { |
| | | return R.error(); |
| | | } |
| | | if (!Cools.isEmpty(locMast.getContainerCode())){ |
| | | if (!Cools.isEmpty(locMast.getContainerCode())) { |
| | | locMast.setBarcode(locMast.getContainerCode()); |
| | | } |
| | | |
| | | if (locMast.getEmptyContainer$().equals("N") ){ |
| | | if (locMast.getContainerCode().isEmpty() || locMast.getContainerTypeCode().isEmpty()){ |
| | | if (locMast.getEmptyContainer$().equals("N")) { |
| | | if (locMast.getContainerCode().isEmpty() || locMast.getContainerTypeCode().isEmpty()) { |
| | | return R.error("容器编码或容器类型有误"); |
| | | } |
| | | } |
| | | if (locMast.getLocSts().equals("O")){ |
| | | if (locMast.getLocSts().equals("O")) { |
| | | locMast.setBarcode(null); |
| | | } |
| | | locMast.setModiUser(getUserId()); |
| | |
| | | // @Transactional |
| | | public R init(LocMastInitParam param) { |
| | | List<LocMast> list = new ArrayList<>(); |
| | | for (int r=param.getStartRow(); r<=param.getEndRow(); r++){ |
| | | for (int b=param.getStartBay(); b<=param.getEndBay(); b++) { |
| | | for (int l=param.getStartLev(); l<=param.getEndLev(); l++) { |
| | | for (int r = param.getStartRow(); r <= param.getEndRow(); r++) { |
| | | for (int b = param.getStartBay(); b <= param.getEndBay(); b++) { |
| | | for (int l = param.getStartLev(); l <= param.getEndLev(); l++) { |
| | | // 获取库位号 |
| | | String locNo = String.format("%02d", r) + String.format("%03d", b) + String.format("%02d", l); |
| | | // 获取堆垛机号 |
| | |
| | | // break; |
| | | // } |
| | | // } |
| | | Date now = new Date(); |
| | | Date now = new Date(); |
| | | LocMast locMast = new LocMast(); |
| | | locMast.setLocNo(locNo); |
| | | locMast.setLocSts("O"); |
| | |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.io.*; |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | public class MapController extends BaseController { |
| | | |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | |
| | | private static final List<String> DISABLE_LOC_NO = new ArrayList<String>() {{ |
| | | }}; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | |
| | | @GetMapping("/map/getData/{lev}/auth") |
| | | @ManagerAuth |
| | |
| | | @RequestMapping("/monitor") |
| | | public class MonitorController { |
| | | |
| | | private static final String[] WEEK = {"星期日","星期一","星期二","星期三","星期四","星期五","星期六"}; |
| | | private static final String[] WEEK = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}; |
| | | |
| | | @Autowired |
| | | private ReportQueryMapper reportQueryMapper; |
| | |
| | | calendar.setTime(now); |
| | | return R.ok( |
| | | Cools.add("year", calendar.get(Calendar.YEAR)) |
| | | .add("month", CommonService.zerofill(String.valueOf(calendar.get(Calendar.MONTH)+1), 2)) |
| | | .add("day", CommonService.zerofill(String.valueOf(calendar.get(Calendar.DATE)), 2)) |
| | | .add("hour", CommonService.zerofill(String.valueOf(calendar.get(Calendar.HOUR_OF_DAY)), 2)) |
| | | .add("minute", CommonService.zerofill(String.valueOf(calendar.get(Calendar.MINUTE)), 2)) |
| | | .add("second", CommonService.zerofill(String.valueOf(calendar.get(Calendar.SECOND)) , 2)) |
| | | .add("week", WEEK[calendar.get(Calendar.DAY_OF_WEEK)-1]) |
| | | .add("month", CommonService.zerofill(String.valueOf(calendar.get(Calendar.MONTH) + 1), 2)) |
| | | .add("day", CommonService.zerofill(String.valueOf(calendar.get(Calendar.DATE)), 2)) |
| | | .add("hour", CommonService.zerofill(String.valueOf(calendar.get(Calendar.HOUR_OF_DAY)), 2)) |
| | | .add("minute", CommonService.zerofill(String.valueOf(calendar.get(Calendar.MINUTE)), 2)) |
| | | .add("second", CommonService.zerofill(String.valueOf(calendar.get(Calendar.SECOND)), 2)) |
| | | .add("week", WEEK[calendar.get(Calendar.DAY_OF_WEEK) - 1]) |
| | | ); |
| | | } |
| | | |
| | |
| | | |
| | | return R.ok( |
| | | Cools.add("xSpeed", Arith.multiplys(1, Math.abs(xSpeed), 1)) // 行走速度 |
| | | .add("ySpeed", Arith.multiplys(1, Math.abs(ySpeed), 1)) // 升降速度 |
| | | .add("zSpeed", Arith.multiplys(1, Math.abs(zSpeed), 1)) // 叉牙速度 |
| | | .add("forkPos", forkPos) // 叉牙速度 |
| | | .add("xDistance", Arith.multiplys(1, Math.abs(xDistance), 1)) // 累计走行距离km |
| | | .add("yDistance", Arith.multiplys(1, Math.abs(yDistance), 1)) // 累计升降距离km |
| | | .add("xDuration", Arith.multiplys(1, Math.abs(xDuration), 1)) // 累计走行时长h |
| | | .add("yDuration", Arith.multiplys(1, Math.abs(yDuration), 1)) // 累计升降时长h |
| | | .add("isShow", !Cools.isEmpty(ledContent)) // 是否显示内容 |
| | | .add("content", ledContent) // 显示内容 |
| | | .add("ySpeed", Arith.multiplys(1, Math.abs(ySpeed), 1)) // 升降速度 |
| | | .add("zSpeed", Arith.multiplys(1, Math.abs(zSpeed), 1)) // 叉牙速度 |
| | | .add("forkPos", forkPos) // 叉牙速度 |
| | | .add("xDistance", Arith.multiplys(1, Math.abs(xDistance), 1)) // 累计走行距离km |
| | | .add("yDistance", Arith.multiplys(1, Math.abs(yDistance), 1)) // 累计升降距离km |
| | | .add("xDuration", Arith.multiplys(1, Math.abs(xDuration), 1)) // 累计走行时长h |
| | | .add("yDuration", Arith.multiplys(1, Math.abs(yDuration), 1)) // 累计升降时长h |
| | | .add("isShow", !Cools.isEmpty(ledContent)) // 是否显示内容 |
| | | .add("content", ledContent) // 显示内容 |
| | | ); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RateLimit(2) |
| | | @GetMapping("/pakin/rep") |
| | | public R monitorPakinRep(){ |
| | | public R monitorPakinRep() { |
| | | // 入库 |
| | | List<Map<String, Object>> pakinRep = reportQueryMapper.queryPakinRep(); |
| | | for (Map<String, Object> map : pakinRep) { |
| | | if (map.get("node")!=null) { |
| | | if (map.get("node") != null) { |
| | | map.put("node", String.valueOf(map.get("node")).substring(5, 10)); |
| | | } |
| | | } |
| | |
| | | |
| | | @RateLimit(2) |
| | | @GetMapping("/line/charts") |
| | | public R locIoLineCharts(){ |
| | | Map<String,Object> map=new HashMap<String, Object>(); |
| | | public R locIoLineCharts() { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | List<AxisBean> list = new ArrayList<AxisBean>(); |
| | | |
| | | List<WorkChartAxis> listChart = reportQueryMapper.getChartAxis(); |
| | | |
| | | if(listChart!=null) { |
| | | if (listChart != null) { |
| | | ArrayList<Integer> data1 = new ArrayList<Integer>(); |
| | | ArrayList<Integer> data2 = new ArrayList<Integer>(); |
| | | |
| | | SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(Calendar.DATE, -12); |
| | | for(int i=0;i<12;i++) { |
| | | for (int i = 0; i < 12; i++) { |
| | | boolean flag = true; |
| | | calendar.add(Calendar.DATE, 1); |
| | | String str = sf.format(calendar.getTime()); |
| | | for(WorkChartAxis workChart : listChart) { |
| | | if(str.equals(workChart.getYmd())) { |
| | | for (WorkChartAxis workChart : listChart) { |
| | | if (str.equals(workChart.getYmd())) { |
| | | data1.add(workChart.getInqty()); |
| | | data2.add(workChart.getOutqty()); |
| | | flag = false; |
| | | break; |
| | | } |
| | | } |
| | | if(flag) { |
| | | if (flag) { |
| | | data1.add(0); |
| | | data2.add(0); |
| | | } |
| | |
| | | outqty.setData(data2.toArray(array2)); |
| | | list.add(outqty); |
| | | } |
| | | map.put("rows",list); |
| | | map.put("rows", list); |
| | | return R.ok(map); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RateLimit(2) |
| | | @GetMapping("/loc/rep") |
| | | public R monitorLocRep(){ |
| | | public R monitorLocRep() { |
| | | List<Map<String, Object>> pie = new ArrayList<>(); |
| | | |
| | | LocChartPie locUseRate = reportQueryMapper.getLocUseRate(); |
| | | if(locUseRate!=null) { |
| | | if (locUseRate != null) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("name", "在库"); |
| | | map.put("value", locUseRate.getFqty()); |
| | |
| | | |
| | | return R.ok( |
| | | Cools.add("pie", pie) |
| | | .add("stockCunt", locUseRate.getFqty()) |
| | | .add("emptyCount", locUseRate.getOqty()) |
| | | .add("noneCount", locUseRate.getXqty()) |
| | | .add("total", total) |
| | | .add("used", used) |
| | | .add("usedPr", usedPr) |
| | | .add("stockCunt", locUseRate.getFqty()) |
| | | .add("emptyCount", locUseRate.getOqty()) |
| | | .add("noneCount", locUseRate.getXqty()) |
| | | .add("total", total) |
| | | .add("used", used) |
| | | .add("usedPr", usedPr) |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 自动补零 |
| | | */ |
| | | private List<Map<String, Object>> fill(List<Map<String, Object>> list, int start, int end){ |
| | | for (int i = start ; i <= end; i++){ |
| | | private List<Map<String, Object>> fill(List<Map<String, Object>> list, int start, int end) { |
| | | for (int i = start; i <= end; i++) { |
| | | boolean exist = false; |
| | | for (Map seq : list){ |
| | | if (Integer.parseInt(String.valueOf(seq.get("node"))) == i){ |
| | | for (Map seq : list) { |
| | | if (Integer.parseInt(String.valueOf(seq.get("node"))) == i) { |
| | | exist = true; |
| | | } |
| | | } |
| | | if (!exist){ |
| | | if (!exist) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("node", i); |
| | | map.put("val", 0); |
| | |
| | | * x轴单位转换 |
| | | * @param dot y轴数值保留小数位 |
| | | */ |
| | | private List<Map<String, Object>> convert(List<Map<String, Object>> list, StatsType statsType, int dot){ |
| | | for (Map<String, Object> map : list){ |
| | | private List<Map<String, Object>> convert(List<Map<String, Object>> list, StatsType statsType, int dot) { |
| | | for (Map<String, Object> map : list) { |
| | | Object val = map.get("val"); |
| | | map.put("val", Arith.multiplys(dot, 1, (Number) val)); |
| | | Object node = map.get("node"); |
| | | switch (statsType){ |
| | | switch (statsType) { |
| | | case MONTH: |
| | | map.put("node", node + "号"); |
| | | break; |
| | |
| | | return list; |
| | | } |
| | | |
| | | enum StatsType{ |
| | | enum StatsType { |
| | | |
| | | YEAR(1,1, 12), |
| | | MONTH(2,1, 30), |
| | | YEAR(1, 1, 12), |
| | | MONTH(2, 1, 30), |
| | | ; |
| | | |
| | | int id; |
| | | int start; |
| | | int end; |
| | | |
| | | StatsType(int id, int start, int end) { |
| | | this.id = id; |
| | | this.start = start; |
| | |
| | | |
| | | static StatsType get(int id) { |
| | | StatsType[] values = StatsType.values(); |
| | | for (StatsType statsType : values){ |
| | | if (statsType.id == id){ |
| | | for (StatsType statsType : values) { |
| | | if (statsType.id == id) { |
| | | return statsType; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.service.*; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.IOException; |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | |
| | | import static org.apache.ibatis.ognl.OgnlRuntime.setFieldValue; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/open") |
| | | public class OpenController extends BaseController { |
| | | |
| | | public static final ArrayList<String> APP_KEY_LIST = new ArrayList<String>() {{ |
| | | add("ea1f0459efc02a79f046f982767939ae"); |
| | | }}; |
| | | private static final boolean auth = true; |
| | | @Autowired |
| | | private OpenService openService; |
| | | @Autowired |
| | |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private BasCrnErrorService basCrnErrorService; |
| | | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | |
| | | private static final boolean auth = true; |
| | | public static <T> List<T> convertListMapToListObject(List<HashMap<String, Object>> listMap, Class<T> clazz) throws Exception { |
| | | List<T> list = new ArrayList<>(); |
| | | |
| | | public static final ArrayList<String> APP_KEY_LIST = new ArrayList<String>() {{ |
| | | add("ea1f0459efc02a79f046f982767939ae"); |
| | | }}; |
| | | for (Map<String, Object> map : listMap) { |
| | | T obj = clazz.getDeclaredConstructor().newInstance(); |
| | | |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String key = entry.getKey(); |
| | | Object value = entry.getValue(); |
| | | |
| | | try { |
| | | Field field = clazz.getDeclaredField(key); |
| | | field.setAccessible(true); |
| | | setFieldValue(obj, field, value); |
| | | } catch (NoSuchFieldException e) { |
| | | System.out.println("No such field: " + key + " in class " + clazz.getName()); |
| | | } |
| | | } |
| | | |
| | | list.add(obj); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | private static void setFieldValue(Object obj, Field field, Object value) throws IllegalAccessException { |
| | | Class<?> fieldType = field.getType(); |
| | | |
| | | if (fieldType.isAssignableFrom(value.getClass())) { |
| | | field.set(obj, value); |
| | | } else if (fieldType == int.class || fieldType == Integer.class) { |
| | | field.set(obj, ((Number) value).intValue()); |
| | | } else if (fieldType == long.class || fieldType == Long.class) { |
| | | field.set(obj, ((Number) value).longValue()); |
| | | } else if (fieldType == double.class || fieldType == Double.class) { |
| | | field.set(obj, ((Number) value).doubleValue()); |
| | | } else if (fieldType == float.class || fieldType == Float.class) { |
| | | field.set(obj, ((Number) value).floatValue()); |
| | | } else if (fieldType == boolean.class || fieldType == Boolean.class) { |
| | | field.set(obj, (Boolean) value); |
| | | } else if (fieldType == String.class) { |
| | | field.set(obj, String.valueOf(value)); |
| | | } else { |
| | | System.out.println("Unsupported field type: " + fieldType.getName()); |
| | | } |
| | | } |
| | | |
| | | //agv任务完成 |
| | | @PostMapping("/toAgvTaskOver") |
| | | @AppAuth(memo = "agv任务完成接口") |
| | | public R getAgvTaskOver(@RequestHeader String appkey, |
| | | @RequestBody TaskOverParam param, |
| | | HttpServletRequest request){ |
| | | @RequestBody TaskOverParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | if (Cools.isEmpty(param.getWharfCode())){ |
| | | if (Cools.isEmpty(param.getWharfCode())) { |
| | | return R.error("码头[wharfCode]不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getStatus())){ |
| | | if (Cools.isEmpty(param.getStatus())) { |
| | | return R.error("完成标记[status]不能为空"); |
| | | } |
| | | openService.getAgvTaskOver(param); |
| | |
| | | @PostMapping("/taskCreate") |
| | | @Transactional |
| | | public R taskCreate(@RequestHeader String appkey, |
| | | @RequestBody List<TaskCreateParam> param1, |
| | | HttpServletRequest request) { |
| | | @RequestBody List<TaskCreateParam> param1, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param1, request); |
| | | try{ |
| | | try { |
| | | List<TaskCreateParam> paramList = new ArrayList<>(); |
| | | List<String> locNoList = new ArrayList<>(); |
| | | for (TaskCreateParam param : param1) { |
| | |
| | | if (Cools.isEmpty(param.getBarcode())) { |
| | | return R.error("条码[barcode]不能为空"); |
| | | } |
| | | String locNo=null; |
| | | if(param.getIoType()==1){ |
| | | locNo=param.getTargetPoint(); |
| | | }else{ |
| | | locNo=param.getStartPoint(); |
| | | String locNo = null; |
| | | if (param.getIoType() == 1) { |
| | | locNo = param.getTargetPoint(); |
| | | } else { |
| | | locNo = param.getStartPoint(); |
| | | } |
| | | try{ |
| | | try { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", locNo).ne("loc_sts","X")); |
| | | if (Cools.isEmpty(locMast)){ |
| | | log.error("库位号不存在"+locNo); |
| | | return R.error("库位号不存在"+locNo).add("库位号不存在"+locNo); |
| | | .eq("loc_no", locNo).ne("loc_sts", "X")); |
| | | if (Cools.isEmpty(locMast)) { |
| | | log.error("库位号不存在" + locNo); |
| | | return R.error("库位号不存在" + locNo).add("库位号不存在" + locNo); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("库位号检测程序异常==》异常信息"+e); |
| | | return R.error("库位号检测程序异常").add("库位号检测程序异常==》异常信息"+e); |
| | | } catch (Exception e) { |
| | | log.error("库位号检测程序异常==》异常信息" + e); |
| | | return R.error("库位号检测程序异常").add("库位号检测程序异常==》异常信息" + e); |
| | | } |
| | | LocMast locMast=locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts","F") |
| | | .eq("loc_no",locNo) |
| | | .eq("barcode",param.getBarcode())); |
| | | if(Cools.isEmpty(locMast)){ |
| | | return R.error("该库位不满足出库条件"+param.getTargetPoint()); |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "F") |
| | | .eq("loc_no", locNo) |
| | | .eq("barcode", param.getBarcode())); |
| | | if (Cools.isEmpty(locMast)) { |
| | | return R.error("该库位不满足出库条件" + param.getTargetPoint()); |
| | | } |
| | | if (!locNoList.contains(locMast.getLocNo())){ |
| | | if (!locNoList.contains(locMast.getLocNo())) { |
| | | locNoList.add(locMast.getLocNo()); |
| | | paramList.add(param); |
| | | }else { |
| | | return R.error("该库位不能同时下发两笔任务"+locMast.getLocNo()); |
| | | } else { |
| | | return R.error("该库位不能同时下发两笔任务" + locMast.getLocNo()); |
| | | } |
| | | } |
| | | for (TaskCreateParam param : paramList){ |
| | | for (TaskCreateParam param : paramList) { |
| | | openService.taskCreate(param); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("任务下发异常"+e); |
| | | } catch (Exception e) { |
| | | log.error("任务下发异常" + e); |
| | | return R.error(); |
| | | } |
| | | return R.ok(); |
| | |
| | | @PostMapping("/pick/and/place/v1") |
| | | @AppAuth(memo = "agv取放货申请") |
| | | public R getAgvPickAndPlaceV1(@RequestHeader String appkey, |
| | | @RequestBody TaskOverParam param, |
| | | HttpServletRequest request){ |
| | | @RequestBody TaskOverParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | if (Cools.isEmpty(param.getStaNo())){ |
| | | if (Cools.isEmpty(param.getStaNo())) { |
| | | return R.error("码头[staNo]不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getType())){ |
| | | if (Cools.isEmpty(param.getType())) { |
| | | return R.error("类型[type]不能为空"); |
| | | } |
| | | return openService.getAgvPickAndPlaceV1(param); |
| | |
| | | @AppAuth(memo = "agv取放货完成反馈") |
| | | public R getAgvPickAndPlaceV2(@RequestHeader String appkey, |
| | | @RequestBody TaskOverParam param, |
| | | HttpServletRequest request){ |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | if (Cools.isEmpty(param.getStaNo())){ |
| | | if (Cools.isEmpty(param.getStaNo())) { |
| | | return R.error("码头[staNo]不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getType())){ |
| | | if (Cools.isEmpty(param.getType())) { |
| | | return R.error("类型[type]不能为空"); |
| | | } |
| | | return openService.getAgvPickAndPlaceV2(param); |
| | |
| | | public R targetWharfApply(@RequestHeader String appkey, |
| | | @RequestBody WMSAndAGVInterfaceParam param, |
| | | HttpServletRequest request) throws IOException { |
| | | auth(appkey,param,request); |
| | | auth(appkey, param, request); |
| | | |
| | | if (Cools.isEmpty(param)){ |
| | | if (Cools.isEmpty(param)) { |
| | | return R.error("参数为空!"); |
| | | } else if (Cools.isEmpty(param.getTaskNo())){ |
| | | } else if (Cools.isEmpty(param.getTaskNo())) { |
| | | return R.error("工作号为空!"); |
| | | } else if (Cools.isEmpty(param.getContainerCode())){ |
| | | } else if (Cools.isEmpty(param.getContainerCode())) { |
| | | return R.error("托盘编码为空!"); |
| | | } else if (Cools.isEmpty(param.getWharfSource())){ |
| | | } else if (Cools.isEmpty(param.getWharfSource())) { |
| | | return R.error("源码头为空!"); |
| | | } else if (Cools.isEmpty(param.getFreeWharfs()) || param.getFreeWharfs().size()==0){ |
| | | } else if (Cools.isEmpty(param.getFreeWharfs()) || param.getFreeWharfs().size() == 0) { |
| | | return R.error("空闲的入库码头(AGV)为空!"); |
| | | } |
| | | R r = openService.AgvToWCSToWms(param); |
| | | apiLogService.save("AGV请求入库码头接口" |
| | | ,request.getRemoteAddr()+request.getRequestURI() |
| | | ,appkey |
| | | ,request.getRemoteAddr() |
| | | ,JSON.toJSONString(param) |
| | | ,r.toString() |
| | | ,true |
| | | , request.getRemoteAddr() + request.getRequestURI() |
| | | , appkey |
| | | , request.getRemoteAddr() |
| | | , JSON.toJSONString(param) |
| | | , r.toString() |
| | | , true |
| | | ); |
| | | return r; |
| | | } |
| | |
| | | @PostMapping("/agvTaskRequest") |
| | | @AppAuth(memo = "AGV请求动作接口") |
| | | public R agvTaskRequest(@RequestHeader String appkey, |
| | | @RequestBody WMSAndAGVInterfaceParam param, |
| | | HttpServletRequest request) { |
| | | @RequestBody WMSAndAGVInterfaceParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)){ |
| | | if (Cools.isEmpty(param)) { |
| | | return R.error("参数为空!"); |
| | | } else if (Cools.isEmpty(param.getRequestType())){ |
| | | } else if (Cools.isEmpty(param.getRequestType())) { |
| | | return R.error("请求类型为空!"); |
| | | } else if (Cools.isEmpty(param.getWharfCode())){ |
| | | } else if (Cools.isEmpty(param.getWharfCode())) { |
| | | return R.error("码头编号为空!"); |
| | | } |
| | | |
| | | Map<String,Integer> map = new HashMap<>(); |
| | | map.put("J-1102",102);map.put("J-1101",101); |
| | | map.put("J-1103",105);map.put("J-1104",106); |
| | | map.put("J-1105",109);map.put("J-1106",110); |
| | | map.put("J-1107",113);map.put("J-1108",114); |
| | | map.put("J-1109",117);map.put("J-1110",118); |
| | | map.put("J-1111",121);map.put("J-1112",122); |
| | | map.put("H-1102",300);map.put("H-1101",305); |
| | | map.put("G-1102",400);map.put("G-1101",405); |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | map.put("J-1102", 102); |
| | | map.put("J-1101", 101); |
| | | map.put("J-1103", 105); |
| | | map.put("J-1104", 106); |
| | | map.put("J-1105", 109); |
| | | map.put("J-1106", 110); |
| | | map.put("J-1107", 113); |
| | | map.put("J-1108", 114); |
| | | map.put("J-1109", 117); |
| | | map.put("J-1110", 118); |
| | | map.put("J-1111", 121); |
| | | map.put("J-1112", 122); |
| | | map.put("H-1102", 300); |
| | | map.put("H-1101", 305); |
| | | map.put("G-1102", 400); |
| | | map.put("G-1101", 405); |
| | | // StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | // .eq("stn_desc", param.getWharfCode())); |
| | | // |
| | | // if (Cools.isEmpty(staDesc)){ |
| | | // return R.error("程序报错,未查询到站点"); |
| | | // } |
| | | if (Cools.isEmpty(map.get(param.getWharfCode()))){ |
| | | if (Cools.isEmpty(map.get(param.getWharfCode()))) { |
| | | return R.error("未查询到站点"); |
| | | } |
| | | BasDevp basDevp = basDevpService.selectById(map.get(param.getWharfCode())); |
| | | // BasDevp basDevp = basDevpService.selectById(staDesc.getStnNo()); |
| | | if (basDevp.getAutoing().equals("Y") && (basDevp.getInEnable().equals("Y") || basDevp.getOutEnable().equals("Y"))){ |
| | | if (basDevp.getAutoing().equals("Y") && (basDevp.getInEnable().equals("Y") || basDevp.getOutEnable().equals("Y"))) { |
| | | apiLogService.save("AGV请求入库码头接口" |
| | | ,request.getRemoteAddr()+request.getRequestURI() |
| | | ,appkey |
| | | ,request.getRemoteAddr() |
| | | ,JSON.toJSONString(param) |
| | | ,R.ok().toString() |
| | | ,true |
| | | , request.getRemoteAddr() + request.getRequestURI() |
| | | , appkey |
| | | , request.getRemoteAddr() |
| | | , JSON.toJSONString(param) |
| | | , R.ok().toString() |
| | | , true |
| | | ); |
| | | return R.ok("可入"); |
| | | }else { |
| | | } else { |
| | | apiLogService.save("AGV请求入库码头接口" |
| | | ,request.getRemoteAddr()+request.getRequestURI() |
| | | ,appkey |
| | | ,request.getRemoteAddr() |
| | | ,JSON.toJSONString(param) |
| | | ,R.error("站点状态不可入").toString() |
| | | ,true |
| | | , request.getRemoteAddr() + request.getRequestURI() |
| | | , appkey |
| | | , request.getRemoteAddr() |
| | | , JSON.toJSONString(param) |
| | | , R.error("站点状态不可入").toString() |
| | | , true |
| | | ); |
| | | return R.error("站点状态不可入"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | //任务下发接口 |
| | | @PostMapping("/outboundTaskSend") |
| | | @Transactional |
| | | public HashMap<String, Object> outboundTaskSend(@RequestBody HashMap<String,Object> hashMap) { |
| | | public HashMap<String, Object> outboundTaskSend(@RequestBody HashMap<String, Object> hashMap) { |
| | | String jsonString = JSON.toJSONString(hashMap.get("TaskList")); |
| | | List<CarryParam> params= JSONObject.parseArray(jsonString,CarryParam.class); |
| | | List<CarryParam> params = JSONObject.parseArray(jsonString, CarryParam.class); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<WMSAndAGVInterfaceParam> params1 =new ArrayList<>(); |
| | | for (CarryParam param:params){ |
| | | if (Cools.isEmpty(param)){ |
| | | map.put("Code","0"); |
| | | map.put("Msg","参数为空!"); |
| | | List<WMSAndAGVInterfaceParam> params1 = new ArrayList<>(); |
| | | for (CarryParam param : params) { |
| | | if (Cools.isEmpty(param)) { |
| | | map.put("Code", "0"); |
| | | map.put("Msg", "参数为空!"); |
| | | return map; |
| | | } else if (Cools.isEmpty(param.getTaskNo())){ |
| | | map.put("Code","0"); |
| | | map.put("Msg","任务号为空!"); |
| | | } else if (Cools.isEmpty(param.getTaskNo())) { |
| | | map.put("Code", "0"); |
| | | map.put("Msg", "任务号为空!"); |
| | | return map; |
| | | } else if (Cools.isEmpty(param.getStereoscopicTaskType())){ |
| | | map.put("Code","0"); |
| | | map.put("Msg","任务类型为空!"); |
| | | } else if (Cools.isEmpty(param.getStereoscopicTaskType())) { |
| | | map.put("Code", "0"); |
| | | map.put("Msg", "任务类型为空!"); |
| | | return map; |
| | | } |
| | | String fusion = Utils.Fusion(param.getOriginalRowNo(), param.getOriginalFloorNo(), param.getOriginalColumnNo()); |
| | | param.setStartPoint(fusion); |
| | | LocMast locMast = locMastService.selectByLocNo(param.getStartPoint()); |
| | | if(Cools.isEmpty(locMast)){ |
| | | map.put("Code","0"); |
| | | map.put("Msg","初始库位无法找到!"); |
| | | if (Cools.isEmpty(locMast)) { |
| | | map.put("Code", "0"); |
| | | map.put("Msg", "初始库位无法找到!"); |
| | | return map; |
| | | } |
| | | |
| | | HashMap<String,Object> r = new HashMap<>(); |
| | | HashMap<String, Object> r = new HashMap<>(); |
| | | |
| | | if(param.getStereoscopicTaskType() == 2){ |
| | | if (param.getStereoscopicTaskType() == 2) { |
| | | //出库任务创建 |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("type_no",2) |
| | | .eq("crn_no",locMast.getCrnNo()) |
| | | .eq("stn_no",param.getTerminalNo())); |
| | | if(Cools.isEmpty(staDesc)){ |
| | | map.put("Code","0"); |
| | | map.put("Msg","出库路劲不存在!"); |
| | | .eq("type_no", 2) |
| | | .eq("crn_no", locMast.getCrnNo()) |
| | | .eq("stn_no", param.getTerminalNo())); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | map.put("Code", "0"); |
| | | map.put("Msg", "出库路劲不存在!"); |
| | | return map; |
| | | } |
| | | r = openService.taskCreate(new TaskCreateParam(param,staDesc.getCrnNo())); |
| | | if(r.get("Code").equals("0")){ |
| | | r = openService.taskCreate(new TaskCreateParam(param, staDesc.getCrnNo())); |
| | | if (r.get("Code").equals("0")) { |
| | | return r; |
| | | } |
| | | }else if (param.getStereoscopicTaskType() == 3){ |
| | | } else if (param.getStereoscopicTaskType() == 3) { |
| | | String fusion1 = Utils.Fusion(param.getGoalRowNo(), param.getGoalFloorNo(), param.getGoalColumnNo()); |
| | | param.setTerminalNo(fusion1); |
| | | //移库任务创建 |
| | | r = openService.taskCreate(new TaskCreateParam(param,locMast.getCrnNo())); |
| | | if(r.get("Code").equals("0")){ |
| | | r = openService.taskCreate(new TaskCreateParam(param, locMast.getCrnNo())); |
| | | if (r.get("Code").equals("0")) { |
| | | return r; |
| | | } |
| | | } |
| | | apiLogService.save("Wms任务下发接口" |
| | | ,request.getRemoteAddr()+request.getRequestURI() |
| | | ,"" |
| | | ,request.getRemoteAddr() |
| | | ,JSON.toJSONString(param) |
| | | ,r.toString() |
| | | ,true |
| | | , request.getRemoteAddr() + request.getRequestURI() |
| | | , "" |
| | | , request.getRemoteAddr() |
| | | , JSON.toJSONString(param) |
| | | , r.toString() |
| | | , true |
| | | ); |
| | | } |
| | | map.put("Code","1"); |
| | | map.put("Msg","ok"); |
| | | map.put("Code", "1"); |
| | | map.put("Msg", "ok"); |
| | | return map; |
| | | } |
| | | |
| | | //任务取消接口 |
| | | @PostMapping("/taskCancel") |
| | | public R taskCancel(@RequestHeader String appkey, |
| | | @RequestBody WMSAndAGVInterfaceParam param, |
| | | HttpServletRequest request) { |
| | | @RequestBody WMSAndAGVInterfaceParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)){ |
| | | if (Cools.isEmpty(param)) { |
| | | return R.error("参数为空!"); |
| | | } else if (Cools.isEmpty(param.getTaskNo())){ |
| | | } else if (Cools.isEmpty(param.getTaskNo())) { |
| | | return R.error("工作号为空!"); |
| | | } else if (Cools.isEmpty(param.getIoType())){ |
| | | } else if (Cools.isEmpty(param.getIoType())) { |
| | | return R.error("操作类型为空!"); |
| | | } else if (Cools.isEmpty(param.getBarcode())){ |
| | | } else if (Cools.isEmpty(param.getBarcode())) { |
| | | return R.error("托盘码不能为空!"); |
| | | } |
| | | |
| | | TaskWrk taskWrk = taskWrkService.selectOne(new EntityWrapper<TaskWrk>() |
| | | .eq("task_no", param.getTaskNo()) |
| | | .eq("io_type",param.getIoType()) |
| | | .eq("barcode",param.getBarcode())); |
| | | if (Cools.isEmpty(taskWrk)){ |
| | | return R.error("未查到当前任务---"+param); |
| | | .eq("io_type", param.getIoType()) |
| | | .eq("barcode", param.getBarcode())); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | return R.error("未查到当前任务---" + param); |
| | | } |
| | | boolean sign =false; |
| | | switch (param.getTaskStatus()){ |
| | | boolean sign = false; |
| | | switch (param.getTaskStatus()) { |
| | | case 1://正常取消 |
| | | if (taskWrk.getStatus()>1){ |
| | | if (taskWrk.getStatus() > 1) { |
| | | return R.error("任务已开始执行"); |
| | | } |
| | | break; |
| | | case 2://正常完成 |
| | | if (taskWrk.getStatus()>1){ |
| | | if (taskWrk.getStatus() > 1) { |
| | | return R.error("任务已开始执行"); |
| | | } |
| | | sign=true; |
| | | sign = true; |
| | | break; |
| | | default: |
| | | return R.error("未知操作"); |
| | | } |
| | | return taskWrkOperate(taskWrk,sign); |
| | | return taskWrkOperate(taskWrk, sign); |
| | | } |
| | | |
| | | //任务操作 |
| | | private R taskWrkOperate(TaskWrk taskWrk,boolean sign){ |
| | | try{ |
| | | if (sign){//完成 |
| | | private R taskWrkOperate(TaskWrk taskWrk, boolean sign) { |
| | | try { |
| | | if (sign) {//完成 |
| | | return taskWrkController.complete(taskWrk.getTaskNo()); |
| | | }else {//取消 |
| | | } else {//取消 |
| | | return taskWrkController.cancel(taskWrk.getTaskNo()); |
| | | } |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | return R.error(); |
| | | } |
| | | } |
| | |
| | | @GetMapping("/deviceStatus") |
| | | @Transactional |
| | | public R deviceStatus() { |
| | | List<CrnStatusParam> crnStatusParams=new ArrayList<>(); |
| | | List<CrnStatusParam> crnStatusParams = new ArrayList<>(); |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | for (BasCrnp basCrnp:basCrnps){ |
| | | CrnStatusParam crnStatusParam=new CrnStatusParam(); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | CrnStatusParam crnStatusParam = new CrnStatusParam(); |
| | | crnStatusParam.setCrnNo(basCrnp.getCrnNo()); |
| | | crnStatusParam.setCrnSts(basCrnp.getCrnSts()); |
| | | crnStatusParam.setErrorCode(basCrnp.getCrnErr()); |
| | | BasCrnError error=basCrnErrorService.selectOne(new EntityWrapper<BasCrnError>().eq("error_code",basCrnp.getCrnErr())); |
| | | if(Cools.isEmpty(error)){ |
| | | BasCrnError error = basCrnErrorService.selectOne(new EntityWrapper<BasCrnError>().eq("error_code", basCrnp.getCrnErr())); |
| | | if (Cools.isEmpty(error)) { |
| | | crnStatusParam.setErrorMsg(""); |
| | | }else { |
| | | } else { |
| | | crnStatusParam.setErrorMsg(error.getErrName()); |
| | | } |
| | | crnStatusParams.add(crnStatusParam); |
| | | } |
| | | return R.ok(crnStatusParams); |
| | | } |
| | | |
| | | public static <T> List<T> convertListMapToListObject(List<HashMap<String, Object>> listMap, Class<T> clazz) throws Exception { |
| | | List<T> list = new ArrayList<>(); |
| | | |
| | | for (Map<String, Object> map : listMap) { |
| | | T obj = clazz.getDeclaredConstructor().newInstance(); |
| | | |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String key = entry.getKey(); |
| | | Object value = entry.getValue(); |
| | | |
| | | try { |
| | | Field field = clazz.getDeclaredField(key); |
| | | field.setAccessible(true); |
| | | setFieldValue(obj, field, value); |
| | | } catch (NoSuchFieldException e) { |
| | | System.out.println("No such field: " + key + " in class " + clazz.getName()); |
| | | } |
| | | } |
| | | |
| | | list.add(obj); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | private static void setFieldValue(Object obj, Field field, Object value) throws IllegalAccessException { |
| | | Class<?> fieldType = field.getType(); |
| | | |
| | | if (fieldType.isAssignableFrom(value.getClass())) { |
| | | field.set(obj, value); |
| | | } else if (fieldType == int.class || fieldType == Integer.class) { |
| | | field.set(obj, ((Number) value).intValue()); |
| | | } else if (fieldType == long.class || fieldType == Long.class) { |
| | | field.set(obj, ((Number) value).longValue()); |
| | | } else if (fieldType == double.class || fieldType == Double.class) { |
| | | field.set(obj, ((Number) value).doubleValue()); |
| | | } else if (fieldType == float.class || fieldType == Float.class) { |
| | | field.set(obj, ((Number) value).floatValue()); |
| | | } else if (fieldType == boolean.class || fieldType == Boolean.class) { |
| | | field.set(obj, (Boolean) value); |
| | | } else if (fieldType == String.class) { |
| | | field.set(obj, String.valueOf(value)); |
| | | } else { |
| | | System.out.println("Unsupported field type: " + fieldType.getName()); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | @RequestMapping("/report") |
| | | public class ReportQueryController extends BaseController { |
| | | |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private ReportQueryMapper reportQueryMapper; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private ReportQueryMapper reportQueryMapper; |
| | | |
| | | //------------------库位使用统计-------------------------------------- |
| | | @RequestMapping("/viewStockUseList.action") |
| | | public R queryViewStockUseListByPages(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | ViewStockUseBean bean = new ViewStockUseBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | List<ViewStockUseBean> list= reportQueryMapper.queryViewStockUseList(bean); |
| | | int count = reportQueryMapper.getViewStockUseCount(bean); |
| | | Page<ViewStockUseBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | //------------------库位使用统计-------------------------------------- |
| | | @RequestMapping("/viewStockUseList.action") |
| | | public R queryViewStockUseListByPages(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | ViewStockUseBean bean = new ViewStockUseBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | List<ViewStockUseBean> list = reportQueryMapper.queryViewStockUseList(bean); |
| | | int count = reportQueryMapper.getViewStockUseCount(bean); |
| | | Page<ViewStockUseBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStockUseExport.action") |
| | | @ManagerAuth(memo = "库位使用统计导出") |
| | | public R viewStockUseExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewStockUseBean> list = reportQueryMapper.getViewStockUseAll(new ViewStockUseBean()); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStockUseExport.action") |
| | | @ManagerAuth(memo = "库位使用统计导出") |
| | | public R viewStockUseExport(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewStockUseBean> list = reportQueryMapper.getViewStockUseAll(new ViewStockUseBean()); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | //------------------库存滞留统计-------------------------------------- |
| | | @RequestMapping("/viewStayTimeList.action") |
| | | public Map<String,Object> queryViewStayTimeListByPages(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | ViewStayTimeBean bean = new ViewStayTimeBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | String locNo = String.valueOf(param.get("loc_no")); |
| | | if (!Cools.isEmpty(locNo) && !locNo.equals("null")) { |
| | | bean.setLoc_no(locNo); |
| | | } |
| | | List<ViewStayTimeBean> list = reportQueryMapper.queryViewStayTimeList(bean); |
| | | int count = reportQueryMapper.getViewStayTimeCount(bean); |
| | | Page<ViewStayTimeBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | //------------------库存滞留统计-------------------------------------- |
| | | @RequestMapping("/viewStayTimeList.action") |
| | | public Map<String, Object> queryViewStayTimeListByPages(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | ViewStayTimeBean bean = new ViewStayTimeBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | String locNo = String.valueOf(param.get("loc_no")); |
| | | if (!Cools.isEmpty(locNo) && !locNo.equals("null")) { |
| | | bean.setLoc_no(locNo); |
| | | } |
| | | List<ViewStayTimeBean> list = reportQueryMapper.queryViewStayTimeList(bean); |
| | | int count = reportQueryMapper.getViewStayTimeCount(bean); |
| | | Page<ViewStayTimeBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStayTimeExport.action") |
| | | @ManagerAuth(memo = "库存滞留统计导出") |
| | | public R viewStayTimeExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewStayTimeBean> list = reportQueryMapper.getViewStayTimeAll(new ViewStayTimeBean()); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStayTimeExport.action") |
| | | @ManagerAuth(memo = "库存滞留统计导出") |
| | | public R viewStayTimeExport(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewStayTimeBean> list = reportQueryMapper.getViewStayTimeAll(new ViewStayTimeBean()); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | //-----------------库存MAP图-------------------------------------- |
| | | @RequestMapping("/viewLocMapList/rows.action") |
| | | public R queryViewLocMapRows(){ |
| | | return R.ok().add(reportQueryMapper.getViewLocRowTotal()); |
| | | } |
| | | //-----------------库存MAP图-------------------------------------- |
| | | @RequestMapping("/viewLocMapList/rows.action") |
| | | public R queryViewLocMapRows() { |
| | | return R.ok().add(reportQueryMapper.getViewLocRowTotal()); |
| | | } |
| | | |
| | | @RequestMapping("/viewLocMapList.action") |
| | | public R queryViewLocMapListByPages(@RequestParam(defaultValue = "1")Integer row){ |
| | | // 获取排级数据 |
| | | // 表格标题:列 ===>> 升序 |
| | | List<String> bays = reportQueryMapper.getViewLocBayCount(row); |
| | | // !表格第一列放层级数 |
| | | bays.add(0, ""); |
| | | // 表格行:层 ====>> 倒序 |
| | | List<String> levs = reportQueryMapper.getViewLocLevCount(row); |
| | | List<Map<String, Object>> body = new ArrayList<>(); |
| | | for (String lev : levs){ |
| | | // 获取层级数据 |
| | | List<ViewLocMapDto> dtos = reportQueryMapper.getViewLocBays(row, Integer.parseInt(lev)); |
| | | // !表格第一列放层级数 |
| | | dtos.add(0, new ViewLocMapDto(null ,null, lev)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("loc", dtos); |
| | | body.add(map); |
| | | } |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("title", bays); |
| | | result.put("body", body); |
| | | return R.ok(result); |
| | | } |
| | | @RequestMapping("/viewLocMapList.action") |
| | | public R queryViewLocMapListByPages(@RequestParam(defaultValue = "1") Integer row) { |
| | | // 获取排级数据 |
| | | // 表格标题:列 ===>> 升序 |
| | | List<String> bays = reportQueryMapper.getViewLocBayCount(row); |
| | | // !表格第一列放层级数 |
| | | bays.add(0, ""); |
| | | // 表格行:层 ====>> 倒序 |
| | | List<String> levs = reportQueryMapper.getViewLocLevCount(row); |
| | | List<Map<String, Object>> body = new ArrayList<>(); |
| | | for (String lev : levs) { |
| | | // 获取层级数据 |
| | | List<ViewLocMapDto> dtos = reportQueryMapper.getViewLocBays(row, Integer.parseInt(lev)); |
| | | // !表格第一列放层级数 |
| | | dtos.add(0, new ViewLocMapDto(null, null, lev)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("loc", dtos); |
| | | body.add(map); |
| | | } |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("title", bays); |
| | | result.put("body", body); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | |
| | | //------------------站点日入出库次数统计-------------------------------------- |
| | | @RequestMapping("/viewInOutList.action") |
| | | public Map<String,Object> viewInOutList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | ViewInOutBean bean = new ViewInOutBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | List<ViewInOutBean> list = reportQueryMapper.queryViewInOutList(bean); |
| | | int count = reportQueryMapper.getViewInOutCount(bean); |
| | | Page<ViewInOutBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | //------------------站点日入出库次数统计-------------------------------------- |
| | | @RequestMapping("/viewInOutList.action") |
| | | public Map<String, Object> viewInOutList(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | ViewInOutBean bean = new ViewInOutBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | List<ViewInOutBean> list = reportQueryMapper.queryViewInOutList(bean); |
| | | int count = reportQueryMapper.getViewInOutCount(bean); |
| | | Page<ViewInOutBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/viewInOutExport.action") |
| | | @ManagerAuth(memo = "站点日入出库次数统计导出") |
| | | public R viewInOutExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewInOutBean> list = reportQueryMapper.getViewInOutAll(new ViewInOutBean()); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | //excel导出 |
| | | @RequestMapping("/viewInOutExport.action") |
| | | @ManagerAuth(memo = "站点日入出库次数统计导出") |
| | | public R viewInOutExport(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewInOutBean> list = reportQueryMapper.getViewInOutAll(new ViewInOutBean()); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | //------------------日入库明细统计-------------------------------------- |
| | | @RequestMapping("/viewWorkInList.action") |
| | | public Map<String,Object> viewWorkInList(ViewWorkInBean bean){ |
| | | List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkInList(bean); |
| | | int count = reportQueryMapper.getViewWorkInCount(bean); |
| | | Page<ViewWorkInBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | //------------------日入库明细统计-------------------------------------- |
| | | @RequestMapping("/viewWorkInList.action") |
| | | public Map<String, Object> viewWorkInList(ViewWorkInBean bean) { |
| | | List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkInList(bean); |
| | | int count = reportQueryMapper.getViewWorkInCount(bean); |
| | | Page<ViewWorkInBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | /** |
| | | * 日入库汇总查询 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/viewWorkCountInList.action") |
| | | public R viewWorkCountInList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | String startTime = "1970.1.2"; |
| | | String endTime = "2099.1.2"; |
| | | if (!Cools.isEmpty(param.get("query_date"))) { |
| | | String queryDate = (String) param.get("query_date"); |
| | | String[] split = queryDate.split(" - "); |
| | | startTime= split[0].split(" ")[0].replace("-","."); |
| | | endTime = split[1].split(" ")[0].replace("-","."); |
| | | } |
| | | List<ViewWorkCountInView> allCountIn = reportQueryMapper.selectWorkCountIn(Integer.valueOf((String) param.get("pageNumber")), Integer.valueOf((String) param.get("pageSize")), (String) param.get("matnr"), startTime,endTime); |
| | | Integer total = reportQueryMapper.selectWorkCountInTotal((String) param.get("matnr"), startTime,endTime); |
| | | Page<ViewWorkCountInView> page = new Page<>(); |
| | | page.setRecords(allCountIn); |
| | | page.setTotal(total); |
| | | Integer sum = reportQueryMapper.selectWorkCountInSum((String) param.get("matnr"), startTime,endTime); |
| | | HashMap<String, Object> result = new HashMap<>(); |
| | | result.put("page",page); |
| | | result.put("sum",sum); |
| | | return R.ok(result); |
| | | } |
| | | /** |
| | | * 日入库汇总查询 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/viewWorkCountInList.action") |
| | | public R viewWorkCountInList(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | String startTime = "1970.1.2"; |
| | | String endTime = "2099.1.2"; |
| | | if (!Cools.isEmpty(param.get("query_date"))) { |
| | | String queryDate = (String) param.get("query_date"); |
| | | String[] split = queryDate.split(" - "); |
| | | startTime = split[0].split(" ")[0].replace("-", "."); |
| | | endTime = split[1].split(" ")[0].replace("-", "."); |
| | | } |
| | | List<ViewWorkCountInView> allCountIn = reportQueryMapper.selectWorkCountIn(Integer.valueOf((String) param.get("pageNumber")), Integer.valueOf((String) param.get("pageSize")), (String) param.get("matnr"), startTime, endTime); |
| | | Integer total = reportQueryMapper.selectWorkCountInTotal((String) param.get("matnr"), startTime, endTime); |
| | | Page<ViewWorkCountInView> page = new Page<>(); |
| | | page.setRecords(allCountIn); |
| | | page.setTotal(total); |
| | | Integer sum = reportQueryMapper.selectWorkCountInSum((String) param.get("matnr"), startTime, endTime); |
| | | HashMap<String, Object> result = new HashMap<>(); |
| | | result.put("page", page); |
| | | result.put("sum", sum); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | /** |
| | | * 日出库汇总 |
| | | */ |
| | | @RequestMapping("/viewWorkCountOutList.action") |
| | | public R viewWorkCountOutList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | String startTime = "1970.1.2"; |
| | | String endTime = "2099.1.2"; |
| | | if (!Cools.isEmpty(param.get("query_date"))) { |
| | | String queryDate = (String) param.get("query_date"); |
| | | String[] split = queryDate.split(" - "); |
| | | startTime= split[0].split(" ")[0].replace("-","."); |
| | | endTime = split[1].split(" ")[0].replace("-","."); |
| | | } |
| | | List<ViewWorkCountInView> allCountIn = reportQueryMapper.selectWorkCountOut(Integer.valueOf((String) param.get("pageNumber")), Integer.valueOf((String) param.get("pageSize")), (String) param.get("matnr"), startTime,endTime); |
| | | Integer total = reportQueryMapper.selectWorkCountOutTotal((String) param.get("matnr"), startTime,endTime); |
| | | Page<ViewWorkCountInView> page = new Page<>(); |
| | | page.setRecords(allCountIn); |
| | | page.setTotal(total); |
| | | Integer sum = reportQueryMapper.selectWorkCountOutSum((String) param.get("matnr"), startTime,endTime); |
| | | HashMap<String, Object> result = new HashMap<>(); |
| | | result.put("page",page); |
| | | result.put("sum",sum); |
| | | return R.ok(result); |
| | | } |
| | | /** |
| | | * 日出库汇总 |
| | | */ |
| | | @RequestMapping("/viewWorkCountOutList.action") |
| | | public R viewWorkCountOutList(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | String startTime = "1970.1.2"; |
| | | String endTime = "2099.1.2"; |
| | | if (!Cools.isEmpty(param.get("query_date"))) { |
| | | String queryDate = (String) param.get("query_date"); |
| | | String[] split = queryDate.split(" - "); |
| | | startTime = split[0].split(" ")[0].replace("-", "."); |
| | | endTime = split[1].split(" ")[0].replace("-", "."); |
| | | } |
| | | List<ViewWorkCountInView> allCountIn = reportQueryMapper.selectWorkCountOut(Integer.valueOf((String) param.get("pageNumber")), Integer.valueOf((String) param.get("pageSize")), (String) param.get("matnr"), startTime, endTime); |
| | | Integer total = reportQueryMapper.selectWorkCountOutTotal((String) param.get("matnr"), startTime, endTime); |
| | | Page<ViewWorkCountInView> page = new Page<>(); |
| | | page.setRecords(allCountIn); |
| | | page.setTotal(total); |
| | | Integer sum = reportQueryMapper.selectWorkCountOutSum((String) param.get("matnr"), startTime, endTime); |
| | | HashMap<String, Object> result = new HashMap<>(); |
| | | result.put("page", page); |
| | | result.put("sum", sum); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkInExport.action") |
| | | @ManagerAuth(memo = "日入库明细统计导出") |
| | | public R viewWorkInExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); |
| | | bean.setQuery_date(bean.getQuery_date()); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkInAll(bean); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkInExport.action") |
| | | @ManagerAuth(memo = "日入库明细统计导出") |
| | | public R viewWorkInExport(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); |
| | | bean.setQuery_date(bean.getQuery_date()); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkInAll(bean); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | //------------------日出库明细统计-------------------------------------- |
| | | @RequestMapping("/viewWorkOutList.action") |
| | | public R viewWorkOutList(ViewWorkInBean bean){ |
| | | List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkOutList(bean); |
| | | int count = reportQueryMapper.getViewWorkOutCount(bean); |
| | | Page<ViewWorkInBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | //------------------日出库明细统计-------------------------------------- |
| | | @RequestMapping("/viewWorkOutList.action") |
| | | public R viewWorkOutList(ViewWorkInBean bean) { |
| | | List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkOutList(bean); |
| | | int count = reportQueryMapper.getViewWorkOutCount(bean); |
| | | Page<ViewWorkInBean> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(count); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkOutExport.action") |
| | | @ManagerAuth(memo = "日出库明细统计导出") |
| | | public R viewWorkOutExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); |
| | | bean.setQuery_date(bean.getQuery_date()); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkOutAll(bean); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkOutExport.action") |
| | | @ManagerAuth(memo = "日出库明细统计导出") |
| | | public R viewWorkOutExport(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); |
| | | bean.setQuery_date(bean.getQuery_date()); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkOutAll(bean); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.utils.CommandUtils; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.SlaveType; |
| | |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 输送设备接口 |
| | |
| | | |
| | | @GetMapping("/io/mode/info/site") |
| | | @ManagerAuth(memo = "入出库模式") |
| | | public R ioMode(){ |
| | | public R ioMode() { |
| | | List<Map<String, Object>> res = new ArrayList<>(); |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | |
| | | |
| | | @PostMapping("/table/site") |
| | | @ManagerAuth(memo = "站点信息表") |
| | | public R siteTable(){ |
| | | public R siteTable() { |
| | | List<SiteTableVo> list = new ArrayList<>(); |
| | | // 内存数据 |
| | | Map<Integer, StaProtocol> station = new HashMap<>(); |
| | |
| | | vo.setDevNo(devp.getDevNo()); // 站点编号 |
| | | list.add(vo); |
| | | StaProtocol staProtocol = station.get(devp.getDevNo()); |
| | | if (null == staProtocol) { continue; } |
| | | if (null == staProtocol) { |
| | | continue; |
| | | } |
| | | vo.setWorkNo(staProtocol.getWorkNo()); // 工作号 |
| | | vo.setAutoing(staProtocol.isAutoing()?"Y":"N"); // 自动 |
| | | vo.setLoading(staProtocol.isLoading()?"Y":"N"); // 有物 |
| | | vo.setInEnable(staProtocol.isInEnable()?"Y":"N"); // 可入 |
| | | vo.setOutEnable(staProtocol.isOutEnable()?"Y":"N"); // 可出 |
| | | vo.setPakMk(staProtocol.isPakMk()?"Y":"N"); // 入库标记 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N"); // 空板信号 |
| | | vo.setAutoing(staProtocol.isAutoing() ? "Y" : "N"); // 自动 |
| | | vo.setLoading(staProtocol.isLoading() ? "Y" : "N"); // 有物 |
| | | vo.setInEnable(staProtocol.isInEnable() ? "Y" : "N"); // 可入 |
| | | vo.setOutEnable(staProtocol.isOutEnable() ? "Y" : "N"); // 可出 |
| | | vo.setPakMk(staProtocol.isPakMk() ? "Y" : "N"); // 入库标记 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk() ? "Y" : "N"); // 空板信号 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | // vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | vo.setLocType1(devp.getDevNo()==102 ? "高" : "低"); |
| | | vo.setLocType1(devp.getDevNo() == 102 ? "高" : "低"); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | @GetMapping("/list/auth") |
| | | @ManagerAuth(memo = "站点信息表") |
| | | public R crnList(){ |
| | | public R crnList() { |
| | | List<SiteTableVo> list = new ArrayList<>(); |
| | | // 内存数据 |
| | | Map<Integer, StaProtocol> station = new HashMap<>(); |
| | |
| | | vo.setDevNo(devp.getDevNo()); // 站点编号 |
| | | list.add(vo); |
| | | StaProtocol staProtocol = station.get(devp.getDevNo()); |
| | | if (null == staProtocol) { continue; } |
| | | if (null == staProtocol) { |
| | | continue; |
| | | } |
| | | vo.setWorkNo(staProtocol.getWorkNo()); // 工作号 |
| | | vo.setAutoing(staProtocol.isAutoing()?"Y":"N"); // 自动 |
| | | vo.setLoading(staProtocol.isLoading()?"Y":"N"); // 有物 |
| | | vo.setInEnable(staProtocol.isInEnable()?"Y":"N"); // 可入 |
| | | vo.setOutEnable(staProtocol.isOutEnable()?"Y":"N"); // 可出 |
| | | vo.setPakMk(staProtocol.isPakMk()?"Y":"N"); // 入库标记 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N"); // 空板信号 |
| | | vo.setAutoing(staProtocol.isAutoing() ? "Y" : "N"); // 自动 |
| | | vo.setLoading(staProtocol.isLoading() ? "Y" : "N"); // 有物 |
| | | vo.setInEnable(staProtocol.isInEnable() ? "Y" : "N"); // 可入 |
| | | vo.setOutEnable(staProtocol.isOutEnable() ? "Y" : "N"); // 可出 |
| | | vo.setPakMk(staProtocol.isPakMk() ? "Y" : "N"); // 入库标记 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk() ? "Y" : "N"); // 空板信号 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | // vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | vo.setLocType1(devp.getDevNo()==102 ? "高" : "低"); |
| | | vo.setLocType1(devp.getDevNo() == 102 ? "高" : "低"); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | @PostMapping("/table/plc/errors") |
| | | @ManagerAuth(memo = "输送设备plc异常信息表") |
| | | public R plcErrorTable(){ |
| | | public R plcErrorTable() { |
| | | List<PlcErrorTableVo> list = new ArrayList<>(); |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | Map<Integer, StaProtocol> station = devpThread.getStation(); |
| | | |
| | | for(Map.Entry<Integer, StaProtocol> entry : station.entrySet()) { |
| | | if (!Cools.isEmpty(staPlcErr(entry))){ |
| | | list.add(staPlcErr(entry).get(0)) ; |
| | | for (Map.Entry<Integer, StaProtocol> entry : station.entrySet()) { |
| | | if (!Cools.isEmpty(staPlcErr(entry))) { |
| | | list.add(staPlcErr(entry).get(0)); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PostMapping("/output/site") |
| | | @ManagerAuth(memo = "站点设备报文日志输出") |
| | | public R siteOutput(){ |
| | | public R siteOutput() { |
| | | StringBuilder str = new StringBuilder(); |
| | | String s; |
| | | int i = 0; |
| | | while((s = OutputQueue.DEVP.poll()) != null && i <=10) { |
| | | while ((s = OutputQueue.DEVP.poll()) != null && i <= 10) { |
| | | str.append("\n").append(s); |
| | | i++; |
| | | } |
| | |
| | | /****************************************************************/ |
| | | |
| | | @GetMapping("/detl/{siteId}") |
| | | public R siteDetl(@PathVariable("siteId") Integer siteId){ |
| | | public R siteDetl(@PathVariable("siteId") Integer siteId) { |
| | | SiteTableVo vo = new SiteTableVo(); |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | |
| | | StaProtocol staProtocol = entry.getValue(); |
| | | vo.setDevNo(entry.getKey()); // 站点编号 |
| | | vo.setWorkNo(staProtocol.getWorkNo()); // 工作号 |
| | | vo.setAutoing(staProtocol.isAutoing()?"Y":"N"); // 自动 |
| | | vo.setLoading(staProtocol.isLoading()?"Y":"N"); // 有物 |
| | | vo.setInEnable(staProtocol.isInEnable()?"Y":"N"); // 可入 |
| | | vo.setOutEnable(staProtocol.isOutEnable()?"Y":"N"); // 可出 |
| | | vo.setPakMk(staProtocol.isPakMk()?"Y":"N"); // 需求1 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N"); // 空板信号 |
| | | vo.setAutoing(staProtocol.isAutoing() ? "Y" : "N"); // 自动 |
| | | vo.setLoading(staProtocol.isLoading() ? "Y" : "N"); // 有物 |
| | | vo.setInEnable(staProtocol.isInEnable() ? "Y" : "N"); // 可入 |
| | | vo.setOutEnable(staProtocol.isOutEnable() ? "Y" : "N"); // 可出 |
| | | vo.setPakMk(staProtocol.isPakMk() ? "Y" : "N"); // 需求1 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk() ? "Y" : "N"); // 空板信号 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | vo.setCar(staProtocol.isCar() ? "有": "无"); |
| | | vo.setCar(staProtocol.isCar() ? "有" : "无"); |
| | | return R.ok().add(vo); |
| | | } |
| | | } |
| | |
| | | } |
| | | return R.error("更新失败"); |
| | | } |
| | | |
| | | @PostMapping("/detl/out") |
| | | @ManagerAuth(memo = "修改站点数据") |
| | | public R siteDetlout(@RequestParam Integer devNo, |
| | | @RequestParam Short workNo, |
| | | @RequestParam Short staNo, |
| | | @RequestParam(required = false) String pakMk, |
| | | @RequestParam(required = false) Boolean inEnable, |
| | | @RequestParam(required = false) Boolean outEnable |
| | | @RequestParam Short workNo, |
| | | @RequestParam Short staNo, |
| | | @RequestParam(required = false) String pakMk, |
| | | @RequestParam(required = false) Boolean inEnable, |
| | | @RequestParam(required = false) Boolean outEnable |
| | | ) { |
| | | BasDevp basDevp = basDevpService.selectById(devNo); |
| | | if (basDevp == null) { |
| | |
| | | } |
| | | return R.error("更新失败"); |
| | | } |
| | | |
| | | @PostMapping("/detl/in") |
| | | @ManagerAuth(memo = "修改站点数据") |
| | | public R siteDetlint(@RequestParam Integer devNo, |
| | |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历入库口 |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | if (!devNo.equals(inSta.getBackSta()) ){ |
| | | if (!devNo.equals(inSta.getBackSta())) { |
| | | continue; |
| | | } |
| | | // 获取入库站信息 |
| | |
| | | return R.error("更新失败"); |
| | | } |
| | | |
| | | public List<PlcErrorTableVo> staPlcErr(Map.Entry<Integer, StaProtocol> entry){ |
| | | public List<PlcErrorTableVo> staPlcErr(Map.Entry<Integer, StaProtocol> entry) { |
| | | List<PlcErrorTableVo> list = new ArrayList<>(); |
| | | StaProtocol staProtocol = entry.getValue(); |
| | | if (staProtocol.getBreakerErr()){ |
| | | if (staProtocol.getBreakerErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("断路器故障"); |
| | | vo.setError("断路器故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getInfraredErr()){ |
| | | if (staProtocol.getInfraredErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("光电异常"); |
| | | vo.setError("光电异常"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getOutTimeErr()){ |
| | | if (staProtocol.getOutTimeErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | |
| | | vo.setError("运行超时"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getSeizeSeatErr()){ |
| | | if (staProtocol.getSeizeSeatErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | |
| | | vo.setError("占位超时"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getWrkYgoodsN()){ |
| | | if (staProtocol.getWrkYgoodsN()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | |
| | | vo.setError("有任务无货故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getInverterErr()){ |
| | | if (staProtocol.getInverterErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | |
| | | vo.setError("变频器故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getContactErr()){ |
| | | if (staProtocol.getContactErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | |
| | | vo.setError("电机接触器故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.getUpcontactErr()){ |
| | | if (staProtocol.getUpcontactErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | |
| | |
| | | vo.setError("顶升电机接触器故障"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.isFrontErr()){ |
| | | if (staProtocol.isFrontErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("前超限"); |
| | | vo.setError("前超限"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.isBackErr()){ |
| | | if (staProtocol.isBackErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("后超限"); |
| | | vo.setError("后超限"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.isHighErr()){ |
| | | if (staProtocol.isHighErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("高超限"); |
| | | vo.setError("高超限"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.isLeftErr()){ |
| | | if (staProtocol.isLeftErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("左超限"); |
| | | vo.setError("左超限"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.isRightErr()){ |
| | | if (staProtocol.isRightErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("右超限"); |
| | | vo.setError("右超限"); |
| | | list.add(vo); |
| | | } |
| | | if (staProtocol.isBarcodeErr()){ |
| | | if (staProtocol.isBarcodeErr()) { |
| | | PlcErrorTableVo vo = new PlcErrorTableVo(); |
| | | vo.setNo(entry.getKey()); // 序号 |
| | | vo.setPlcDesc("扫码失败"); |
| | |
| | | |
| | | @RequestMapping(value = "/staDesc/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<StaDesc> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | wrapper.orderAsc(Collections.singleton("crn_no")); |
| | | return R.ok(staDescService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/staDesc/update/auth") |
| | | @ManagerAuth(memo = "站点路径修改") |
| | | public R update(StaDesc staDesc){ |
| | | if (Cools.isEmpty(staDesc) || null==staDesc.getTypeId()){ |
| | | @RequestMapping(value = "/staDesc/update/auth") |
| | | @ManagerAuth(memo = "站点路径修改") |
| | | public R update(StaDesc staDesc) { |
| | | if (Cools.isEmpty(staDesc) || null == staDesc.getTypeId()) { |
| | | return R.error(); |
| | | } |
| | | staDesc.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/staDesc/delete/auth") |
| | | @ManagerAuth(memo = "站点路径删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<StaDesc> list = JSONArray.parseArray(param, StaDesc.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (StaDesc entity : list){ |
| | | for (StaDesc entity : list) { |
| | | staDescService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/staDesc/export/auth") |
| | | @ManagerAuth(memo = "站点路径导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<StaDesc> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("staDesc")); |
| | |
| | | wrapper.like("crn_no", condition); |
| | | Page<StaDesc> page = staDescService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (StaDesc staDesc : page.getRecords()){ |
| | | for (StaDesc staDesc : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", staDesc.getCrnNo()); |
| | | map.put("value", staDesc.getCrnNo()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != staDescService.selectOne(wrapper)){ |
| | | if (null != staDescService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(StaDesc.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.TaskWrk; |
| | | import com.zy.asrs.entity.param.TaskOverToWms; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.CommandInfoService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.TaskWrkService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | |
| | | public static String getTaskType(Integer paramIoType) { |
| | | switch (paramIoType) { |
| | | case 1: |
| | | return "RK"; |
| | | case 2: |
| | | return "CK"; |
| | | case 3: |
| | | return "YK"; |
| | | default: |
| | | return "未知"; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/taskWrk/{wrkNo}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("wrkNo") Integer wrkNo) { |
| | |
| | | |
| | | @RequestMapping(value = "/taskWrk/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<TaskWrk> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(taskWrkService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/taskWrk/update/auth") |
| | | @ManagerAuth |
| | | public R update(TaskWrk taskWrk){ |
| | | @RequestMapping(value = "/taskWrk/update/auth") |
| | | @ManagerAuth |
| | | public R update(TaskWrk taskWrk) { |
| | | if (Cools.isEmpty(taskWrk) || null == taskWrk.getTaskNo()) { |
| | | return R.error(); |
| | | } |
| | |
| | | |
| | | @RequestMapping(value = "/taskWrk/updatePoint/auth") |
| | | @ManagerAuth |
| | | public R updatePoint(TaskWrk taskWrk){ |
| | | public R updatePoint(TaskWrk taskWrk) { |
| | | if (Cools.isEmpty(taskWrk) || null == taskWrk.getTaskNo()) { |
| | | return R.error(); |
| | | } |
| | |
| | | |
| | | @RequestMapping(value = "/taskWrk/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | taskWrkService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/taskWrk/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<TaskWrk> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("taskWrk")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<TaskWrk> page = taskWrkService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (TaskWrk taskWrk : page.getRecords()){ |
| | | for (TaskWrk taskWrk : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", taskWrk.getTaskNo()); |
| | | map.put("value", taskWrk.getTaskNo()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<TaskWrk> wrapper = new EntityWrapper<TaskWrk>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != taskWrkService.selectOne(wrapper)){ |
| | | if (null != taskWrkService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(TaskWrk.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | @ManagerAuth(memo = "手动完成任务") |
| | | public R complete(@RequestParam String taskNo) { |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(taskNo); |
| | | if (Cools.isEmpty(taskWrk) || taskWrk.getStatus()>=3){ |
| | | return R.error("已完结或已取消") ; |
| | | if (Cools.isEmpty(taskWrk) || taskWrk.getStatus() >= 3) { |
| | | return R.error("已完结或已取消"); |
| | | } |
| | | LocMast locMast=new LocMast(); |
| | | if(taskWrk.getIoType()==1){//入库任务完成库位为F |
| | | locMast=locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | if(Cools.isEmpty(locMast)){ |
| | | R.error("没有找到该库位") ; |
| | | LocMast locMast = new LocMast(); |
| | | if (taskWrk.getIoType() == 1) {//入库任务完成库位为F |
| | | locMast = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | if (Cools.isEmpty(locMast)) { |
| | | R.error("没有找到该库位"); |
| | | } |
| | | locMast.setLocSts("F"); |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setBarcode(taskWrk.getBarcode()); |
| | | }else if(taskWrk.getIoType()==2){//出库任务完成库位为O |
| | | locMast=locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | if(Cools.isEmpty(locMast)){ |
| | | R.error("没有找到该库位") ; |
| | | } else if (taskWrk.getIoType() == 2) {//出库任务完成库位为O |
| | | locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | if (Cools.isEmpty(locMast)) { |
| | | R.error("没有找到该库位"); |
| | | } |
| | | locMast.setLocSts("O"); |
| | | locMast.setModiTime(new Date()); |
| | | }else if(taskWrk.getIoType()==3){ |
| | | locMast=locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | if(Cools.isEmpty(locMast)){ |
| | | R.error("没有找到该库位") ; |
| | | } else if (taskWrk.getIoType() == 3) { |
| | | locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | if (Cools.isEmpty(locMast)) { |
| | | R.error("没有找到该库位"); |
| | | } |
| | | locMast.setLocSts("O"); |
| | | locMast.setModiTime(new Date()); |
| | | locMastService.updateById(locMast); |
| | | locMast=locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | if(Cools.isEmpty(locMast)){ |
| | | R.error("没有找到该库位") ; |
| | | locMast = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | if (Cools.isEmpty(locMast)) { |
| | | R.error("没有找到该库位"); |
| | | } |
| | | locMast.setLocSts("F"); |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setBarcode(taskWrk.getBarcode()); |
| | | |
| | | } |
| | | String response=""; |
| | | try{ |
| | | String response = ""; |
| | | try { |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("TaskNo",taskWrk.getTaskNo()); |
| | | headParam.put("Result",1); |
| | | headParam.put("TaskNo", taskWrk.getTaskNo()); |
| | | headParam.put("Result", 1); |
| | | // headParam.put("reportTime",new Date()); |
| | | log.info("wcs手动完成任务上报wms={}", taskWrk); |
| | | response = new HttpHandler.Builder() |
| | |
| | | |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | apiLogService.save("wcs手动完成任务上报wms" |
| | | ,wmsUrl+TaskExecCallback |
| | | ,null |
| | | ,"127.0.0.1" |
| | | ,JSON.toJSONString(headParam) |
| | | ,response |
| | | ,true |
| | | , wmsUrl + TaskExecCallback |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(headParam) |
| | | , response |
| | | , true |
| | | ); |
| | | }catch (Exception e){ |
| | | log.error("wcs手动完成任务上报wms失{},返回值={}", taskWrk,response); |
| | | } catch (Exception e) { |
| | | log.error("wcs手动完成任务上报wms失{},返回值={}", taskWrk, response); |
| | | // throw new CoolException(e); |
| | | } |
| | | locMastService.updateById(locMast); |
| | |
| | | @ManagerAuth(memo = "重新给堆垛机下发任务") |
| | | public R returnWorkingCondition(@RequestParam String taskNo) { |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(taskNo); |
| | | if (!Cools.isEmpty(taskWrk) && taskWrk.getWrkSts()==12){ |
| | | if (!Cools.isEmpty(taskWrk) && taskWrk.getWrkSts() == 12) { |
| | | taskWrk.setWrkSts(11); |
| | | if(!taskWrkService.updateById(taskWrk)){ |
| | | if (!taskWrkService.updateById(taskWrk)) { |
| | | return R.error("更新任务状态失败"); |
| | | } |
| | | return R.ok(); |
| | | } else if (!Cools.isEmpty(taskWrk) && taskWrk.getWrkSts()==3) { |
| | | } else if (!Cools.isEmpty(taskWrk) && taskWrk.getWrkSts() == 3) { |
| | | taskWrk.setWrkSts(2); |
| | | taskWrkService.updateById(taskWrk); |
| | | if(!taskWrkService.updateById(taskWrk)){ |
| | | if (!taskWrkService.updateById(taskWrk)) { |
| | | return R.error("更新任务状态失败"); |
| | | } |
| | | return R.ok(); |
| | | }else{ |
| | | } else { |
| | | return R.error("任务状态不对无法重新给堆垛机下发任务"); |
| | | } |
| | | |
| | |
| | | Date now = new Date(); |
| | | taskWrk.setStatus(TaskStatusType.CANCEL.id); |
| | | taskWrk.setModiTime(now);//操作时间 |
| | | try{ |
| | | try { |
| | | taskWrk.setModiUser(getUserId());//操作员 |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | taskWrk.setModiUser(9999L);//操作员 |
| | | } |
| | | String response=""; |
| | | try{ |
| | | String response = ""; |
| | | try { |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("TaskNo",taskWrk.getTaskNo()); |
| | | headParam.put("Result",0); |
| | | headParam.put("TaskNo", taskWrk.getTaskNo()); |
| | | headParam.put("Result", 0); |
| | | // headParam.put("reportTime",new Date()); |
| | | |
| | | log.info("wcs手动取消任务上报wm={}", taskWrk); |
| | |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | apiLogService.save("wcs手动取消任务上报wms" |
| | | ,wmsUrl+TaskExecCallback |
| | | ,null |
| | | ,"127.0.0.1" |
| | | ,JSON.toJSONString(headParam) |
| | | ,response |
| | | ,true |
| | | , wmsUrl + TaskExecCallback |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(headParam) |
| | | , response |
| | | , true |
| | | ); |
| | | }catch (Exception e){ |
| | | log.error("wcs手动取消任务上报wms失败={},返回值={}", taskWrk,response); |
| | | } catch (Exception e) { |
| | | log.error("wcs手动取消任务上报wms失败={},返回值={}", taskWrk, response); |
| | | // throw new CoolException(e); |
| | | } |
| | | taskWrk.setCompleteTime(now);//完结时间 |
| | |
| | | taskWrk.setModiUser(getUserId());//操作员 |
| | | taskWrkService.updateById(taskWrk); |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static String getTaskType(Integer paramIoType){ |
| | | switch (paramIoType){ |
| | | case 1: |
| | | return "RK"; |
| | | case 2: |
| | | return "CK"; |
| | | case 3: |
| | | return "YK"; |
| | | default: |
| | | return "未知"; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | 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.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.entity.TaskWrkLog; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.TaskWrkLogService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | public class TaskWrkLogController extends BaseController { |
| | |
| | | |
| | | @RequestMapping(value = "/taskWrkLog/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<TaskWrkLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | wrapper.orderDesc(Collections.singleton("create_time")); |
| | | return R.ok(taskWrkLogService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/taskWrkLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(TaskWrkLog taskWrkLog){ |
| | | if (Cools.isEmpty(taskWrkLog)){ |
| | | @RequestMapping(value = "/taskWrkLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(TaskWrkLog taskWrkLog) { |
| | | if (Cools.isEmpty(taskWrkLog)) { |
| | | return R.error(); |
| | | } |
| | | taskWrkLogService.updateById(taskWrkLog); |
| | |
| | | |
| | | @RequestMapping(value = "/taskWrkLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | taskWrkLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/taskWrkLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<TaskWrkLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("taskWrkLog")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<TaskWrkLog> page = taskWrkLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (TaskWrkLog taskWrkLog : page.getRecords()){ |
| | | for (TaskWrkLog taskWrkLog : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", taskWrkLog.getTaskNo()); |
| | | map.put("value", taskWrkLog.getTaskNo()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<TaskWrkLog> wrapper = new EntityWrapper<TaskWrkLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != taskWrkLogService.selectOne(wrapper)){ |
| | | if (null != taskWrkLogService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(TaskWrkLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/taskWrkLog/resubmitTheTask/auth") |
| | | @ManagerAuth(memo = "重新上报任务完结") |
| | | public R resubmitTheTask(@RequestParam String taskNo){ |
| | | public R resubmitTheTask(@RequestParam String taskNo) { |
| | | TaskWrkLog taskWrk = taskWrkLogService.selectOne(new EntityWrapper<TaskWrkLog>().eq("task_no", taskNo)); |
| | | if(!Cools.isEmpty(taskWrk)){ |
| | | if (!Cools.isEmpty(taskWrk)) { |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | if (taskWrk.getStatus().equals(TaskStatusType.OVER.id)) {//完成 |
| | | headParam.put("Result", 1); |
| | |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | |
| | | if(jsonObject.get("ReturnStatus").equals(0)){ |
| | | if (jsonObject.get("ReturnStatus").equals(0)) { |
| | | bool = true; |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("重新上报任务完结失败{},返回值={}", taskWrk, response); |
| | | }finally { |
| | | } finally { |
| | | apiLogService.save("重新上报任务完结" |
| | | , wmsUrl + TaskExecCallback |
| | | , null |
| | |
| | | @RequestMapping("/hand/control/wrkMast") |
| | | @ManagerAuth(memo = "手动处理工作档") |
| | | public R handControlWrkMast(@RequestParam String workNo, |
| | | @RequestParam Integer type){ |
| | | @RequestParam Integer type) { |
| | | if (type == 1) { |
| | | workService.completeWrkMast(workNo, getUserId()); |
| | | return R.ok("任务已完成"); |
| | |
| | | return R.ok(wrkDetlService.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()){ |
| | | 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)){ |
| | | 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 { |
| | | if (entry.getKey().equals("io_time")) { |
| | | wrapper.eq("io_time", DateUtils.convert(val, DateUtils.yyyyMMddHHmmsssss_F)); |
| | | }else { |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | |
| | | |
| | | @RequestMapping(value = "/wrkDetl/delete/auth") |
| | | @ManagerAuth(memo = "工作档明细删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<WrkDetl> list = JSONArray.parseArray(param, WrkDetl.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (WrkDetl entity : list){ |
| | | for (WrkDetl entity : list) { |
| | | wrkDetlService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkDetl/export/auth") |
| | | @ManagerAuth(memo = "工作档明细导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkDetl> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkDetl")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<WrkDetl> page = wrkDetlService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkDetl wrkDetl : page.getRecords()){ |
| | | for (WrkDetl wrkDetl : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkDetl.getWrkNo()); |
| | | map.put("value", wrkDetl.getWrkNo()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkDetl> wrapper = new EntityWrapper<WrkDetl>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkDetlService.selectOne(wrapper)){ |
| | | if (null != wrkDetlService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkDetl.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | */ |
| | | @RequestMapping(value = "/wrkDetlLogByMast/list/auth") |
| | | @ManagerAuth |
| | | public R list1(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | public R list1(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Integer wrk_no, |
| | | @RequestParam String ioTime){ |
| | | @RequestParam String ioTime) { |
| | | EntityWrapper<WrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | if(!Cools.isEmpty(wrk_no) && wrk_no != 0){ |
| | | wrapper.eq("wrk_no",wrk_no); |
| | | if (!Cools.isEmpty(wrk_no) && wrk_no != 0) { |
| | | wrapper.eq("wrk_no", wrk_no); |
| | | } |
| | | if(!Cools.isEmpty(ioTime)){ |
| | | if (!Cools.isEmpty(ioTime)) { |
| | | wrapper.eq("io_time", DateUtils.convert(ioTime, DateUtils.yyyyMMddHHmmsssss_F)); |
| | | } |
| | | return R.ok(wrkDetlLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<WrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | else { |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } else { |
| | | wrapper.orderBy("modi_time", false); |
| | | } |
| | | return R.ok(wrkDetlLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(WrkDetlLog wrkDetlLog){ |
| | | if (Cools.isEmpty(wrkDetlLog) || null==wrkDetlLog.getWrkNo()){ |
| | | @RequestMapping(value = "/wrkDetlLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(WrkDetlLog wrkDetlLog) { |
| | | if (Cools.isEmpty(wrkDetlLog) || null == wrkDetlLog.getWrkNo()) { |
| | | return R.error(); |
| | | } |
| | | wrkDetlLogService.updateById(wrkDetlLog); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<WrkDetlLog> list = JSONArray.parseArray(param, WrkDetlLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (WrkDetlLog entity : list){ |
| | | for (WrkDetlLog entity : list) { |
| | | wrkDetlLogService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkDetlLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<WrkDetlLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkDetlLog")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<WrkDetlLog> page = wrkDetlLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkDetlLog wrkDetlLog : page.getRecords()){ |
| | | for (WrkDetlLog wrkDetlLog : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkDetlLog.getWrkNo()); |
| | | map.put("value", wrkDetlLog.getWrkNo()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkDetlLog> wrapper = new EntityWrapper<WrkDetlLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkDetlLogService.selectOne(wrapper)){ |
| | | if (null != wrkDetlLogService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkDetlLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkLastno/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 Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<WrkLastno> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(wrkLastnoService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkLastno/update/auth") |
| | | @ManagerAuth(memo = "工作序号修改") |
| | | public R update(WrkLastno wrkLastno){ |
| | | if (Cools.isEmpty(wrkLastno) || null==wrkLastno.getWrkMk()){ |
| | | @RequestMapping(value = "/wrkLastno/update/auth") |
| | | @ManagerAuth(memo = "工作序号修改") |
| | | public R update(WrkLastno wrkLastno) { |
| | | if (Cools.isEmpty(wrkLastno) || null == wrkLastno.getWrkMk()) { |
| | | return R.error(); |
| | | } |
| | | wrkLastno.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkLastno/delete/auth") |
| | | @ManagerAuth(memo = "工作序号删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<WrkLastno> list = JSONArray.parseArray(param, WrkLastno.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (WrkLastno entity : list){ |
| | | for (WrkLastno entity : list) { |
| | | wrkLastnoService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkLastno/export/auth") |
| | | @ManagerAuth(memo = "工作序号导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkLastno> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkLastno")); |
| | |
| | | wrapper.like("wrk_mk", condition); |
| | | Page<WrkLastno> page = wrkLastnoService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkLastno wrkLastno : page.getRecords()){ |
| | | for (WrkLastno wrkLastno : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkLastno.getWrkMk()); |
| | | map.put("value", wrkLastno.getWrkMk()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkLastno> wrapper = new EntityWrapper<WrkLastno>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkLastnoService.selectOne(wrapper)){ |
| | | if (null != wrkLastnoService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkLastno.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkMast/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){ |
| | | 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) { |
| | | excludeTrash(param); |
| | | EntityWrapper<WrkMast> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | allLike(WrkMast.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | if (orderByField.endsWith("$")){ |
| | | orderByField = orderByField.substring(0, orderByField.length()-1); |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | if (orderByField.endsWith("$")) { |
| | | orderByField = orderByField.substring(0, orderByField.length() - 1); |
| | | } |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | }else { |
| | | } else { |
| | | wrapper.orderBy("io_time", false); |
| | | } |
| | | return R.ok(wrkMastService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMast/update/auth") |
| | | @ManagerAuth(memo = "工作档修改") |
| | | public R update(WrkMast wrkMast){ |
| | | if (Cools.isEmpty(wrkMast) || null==wrkMast.getWrkNo()){ |
| | | @RequestMapping(value = "/wrkMast/update/auth") |
| | | @ManagerAuth(memo = "工作档修改") |
| | | public R update(WrkMast wrkMast) { |
| | | if (Cools.isEmpty(wrkMast) || null == wrkMast.getWrkNo()) { |
| | | return R.error(); |
| | | } |
| | | wrkMast.setModiUser(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkMast/delete/auth") |
| | | @ManagerAuth(memo = "工作档删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<WrkMast> list = JSONArray.parseArray(param, WrkMast.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (WrkMast entity : list){ |
| | | for (WrkMast entity : list) { |
| | | wrkMastService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkMast/export/auth") |
| | | @ManagerAuth(memo = "工作档导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkMast> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkMast")); |
| | |
| | | wrapper.like("wrk_no", condition); |
| | | Page<WrkMast> page = wrkMastService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkMast wrkMast : page.getRecords()){ |
| | | for (WrkMast wrkMast : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkMast.getWrkNo()); |
| | | map.put("value", wrkMast.getWrkNo()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkMast> wrapper = new EntityWrapper<WrkMast>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkMastService.selectOne(wrapper)){ |
| | | if (null != wrkMastService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkMast.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | if (list.isEmpty()) { |
| | | return R.error("请至少选择一行数据"); |
| | | } |
| | | for (WrkMast entity : list){ |
| | | entity.setIoPri(entity.getIoPri() + 1); |
| | | for (WrkMast entity : list) { |
| | | entity.setIoPri(entity.getIoPri() + 1); |
| | | } |
| | | wrkMastService.updateBatchById(list); |
| | | return R.ok(); |
| | |
| | | if (list.isEmpty()) { |
| | | return R.error("请至少选择一行数据"); |
| | | } |
| | | for (WrkMast entity : list){ |
| | | for (WrkMast entity : list) { |
| | | entity.setIoPri(entity.getIoPri() - 1); |
| | | } |
| | | wrkMastService.updateBatchById(list); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/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){ |
| | | 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) { |
| | | excludeTrash(param); |
| | | EntityWrapper<WrkMastLog> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | allLike(WrkMastLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | if (orderByField.endsWith("$")){ |
| | | orderByField = orderByField.substring(0, orderByField.length()-1); |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | if (orderByField.endsWith("$")) { |
| | | orderByField = orderByField.substring(0, orderByField.length() - 1); |
| | | } |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | }else { |
| | | } else { |
| | | wrapper.orderBy("modi_time", false); |
| | | } |
| | | return R.ok(wrkMastLogService.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()){ |
| | | 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)){ |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/update/auth") |
| | | @ManagerAuth(memo = "工作历史档修改") |
| | | public R update(WrkMastLog wrkMastLog){ |
| | | if (Cools.isEmpty(wrkMastLog) || null==wrkMastLog.getId()){ |
| | | @RequestMapping(value = "/wrkMastLog/update/auth") |
| | | @ManagerAuth(memo = "工作历史档修改") |
| | | public R update(WrkMastLog wrkMastLog) { |
| | | if (Cools.isEmpty(wrkMastLog) || null == wrkMastLog.getId()) { |
| | | return R.error(); |
| | | } |
| | | wrkMastLogService.updateById(wrkMastLog); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/delete/auth") |
| | | @ManagerAuth(memo = "工作历史档删除") |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<WrkMastLog> list = JSONArray.parseArray(param, WrkMastLog.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (WrkMastLog entity : list){ |
| | | for (WrkMastLog entity : list) { |
| | | wrkMastLogService.delete(new EntityWrapper<>(entity)); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/wrkMastLog/export/auth") |
| | | @ManagerAuth(memo = "工作历史档导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<WrkMastLog> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkMastLog")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<WrkMastLog> page = wrkMastLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkMastLog wrkMastLog : page.getRecords()){ |
| | | for (WrkMastLog wrkMastLog : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkMastLog.getId()); |
| | | map.put("value", wrkMastLog.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkMastLog> wrapper = new EntityWrapper<WrkMastLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkMastLogService.selectOne(wrapper)){ |
| | | if (null != wrkMastLogService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkMastLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | * |
| | | */ |
| | | public class AxisBean { |
| | | private String name; |
| | | private Integer[] data; |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | public Integer[] getData() { |
| | | return data; |
| | | } |
| | | public void setData(Integer[] data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | private String name; |
| | | private Integer[] data; |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer[] getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(Integer[] data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | } |
| | |
| | | * @date 2018年12月12日 |
| | | */ |
| | | public class WorkChartAxis { |
| | | private String ymd; |
| | | private String ymd; |
| | | private int inqty; |
| | | private int outqty; |
| | | |
| | | public String getYmd() { |
| | | return ymd; |
| | | } |
| | | public void setYmd(String ymd) { |
| | | this.ymd = ymd; |
| | | } |
| | | public int getInqty() { |
| | | return inqty; |
| | | } |
| | | public void setInqty(int inqty) { |
| | | this.inqty = inqty; |
| | | } |
| | | public int getOutqty() { |
| | | return outqty; |
| | | } |
| | | public void setOutqty(int outqty) { |
| | | this.outqty = outqty; |
| | | } |
| | | |
| | | public String getYmd() { |
| | | return ymd; |
| | | } |
| | | |
| | | public void setYmd(String ymd) { |
| | | this.ymd = ymd; |
| | | } |
| | | |
| | | public int getInqty() { |
| | | return inqty; |
| | | } |
| | | |
| | | public void setInqty(int inqty) { |
| | | this.inqty = inqty; |
| | | } |
| | | |
| | | public int getOutqty() { |
| | | return outqty; |
| | | } |
| | | |
| | | public void setOutqty(int outqty) { |
| | | this.outqty = outqty; |
| | | } |
| | | } |
| | |
| | | ; |
| | | |
| | | private String desc; |
| | | CrnStatusType(String desc){ |
| | | |
| | | CrnStatusType(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static CrnStatusType process(Integer ioType){ |
| | | if (ioType>100) { |
| | | public static CrnStatusType process(Integer ioType) { |
| | | if (ioType > 100) { |
| | | return MACHINE_PAKOUT; |
| | | } else if (ioType < 100 && ioType!=3 && ioType!=6 && ioType!=11) { |
| | | } else if (ioType < 100 && ioType != 3 && ioType != 6 && ioType != 11) { |
| | | return MACHINE_PAKIN; |
| | | } else if (ioType == 3) { |
| | | return MACHINE_SITE_MOVE; |
| | |
| | | } |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | ; |
| | | |
| | | public static SiteStatusType process(StaProtocol staProtocol){ |
| | | public static SiteStatusType process(StaProtocol staProtocol) { |
| | | if (staProtocol == null) { |
| | | return null; |
| | | } |
| | |
| | | |
| | | public enum TaskStatusType { |
| | | |
| | | RECEIVE(1,"接收"), |
| | | DISTRIBUTE(2,"派发"), |
| | | COMPLETE(3,"命令完成"), |
| | | CANCEL(4,"取消"), |
| | | OVER(5,"完结") |
| | | ; |
| | | RECEIVE(1, "接收"), |
| | | DISTRIBUTE(2, "派发"), |
| | | COMPLETE(3, "命令完成"), |
| | | CANCEL(4, "取消"), |
| | | OVER(5, "完结"); |
| | | |
| | | public Integer id; |
| | | public String desc; |
| | | |
| | | TaskStatusType(Integer id, String desc){ |
| | | TaskStatusType(Integer id, String desc) { |
| | | this.id = id; |
| | | this.desc = desc; |
| | | } |
| | |
| | | |
| | | private CrnStatusType crnStatus; |
| | | |
| | | public String getCrnStatus(){ |
| | | public String getCrnStatus() { |
| | | return crnStatus.toString().toLowerCase().replaceAll("_", "-"); |
| | | } |
| | | |
| | |
| | | private int oqty; |
| | | private int uqty; |
| | | private int xqty; |
| | | public int getFqty() { |
| | | return fqty; |
| | | } |
| | | public void setFqty(int fqty) { |
| | | this.fqty = fqty; |
| | | } |
| | | public int getOqty() { |
| | | return oqty; |
| | | } |
| | | public void setOqty(int oqty) { |
| | | this.oqty = oqty; |
| | | } |
| | | public int getUqty() { |
| | | return uqty; |
| | | } |
| | | public void setUqty(int uqty) { |
| | | this.uqty = uqty; |
| | | } |
| | | public int getXqty() { |
| | | return xqty; |
| | | } |
| | | public void setXqty(int xqty) { |
| | | this.xqty = xqty; |
| | | } |
| | | |
| | | public int getFqty() { |
| | | return fqty; |
| | | } |
| | | |
| | | public void setFqty(int fqty) { |
| | | this.fqty = fqty; |
| | | } |
| | | |
| | | public int getOqty() { |
| | | return oqty; |
| | | } |
| | | |
| | | public void setOqty(int oqty) { |
| | | this.oqty = oqty; |
| | | } |
| | | |
| | | public int getUqty() { |
| | | return uqty; |
| | | } |
| | | |
| | | public void setUqty(int uqty) { |
| | | this.uqty = uqty; |
| | | } |
| | | |
| | | public int getXqty() { |
| | | return xqty; |
| | | } |
| | | |
| | | public void setXqty(int xqty) { |
| | | this.xqty = xqty; |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | 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 org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wcs_api_config") |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * api地址 |
| | | */ |
| | | @ApiModelProperty(value= "api地址") |
| | | @ApiModelProperty(value = "api地址") |
| | | private String url; |
| | | |
| | | /** |
| | | * 状态 0: 正常 1: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 0: 正常 1: 禁用 ") |
| | | @ApiModelProperty(value = "状态 0: 正常 1: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value= "创建时间") |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value= "更新时间") |
| | | @ApiModelProperty(value = "更新时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @ApiModelProperty(value = "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | public ApiConfig() {} |
| | | public ApiConfig() { |
| | | } |
| | | |
| | | public ApiConfig(String url,Integer status,String memo,Date createTime,Date updateTime,Long createBy,Long updateBy) { |
| | | public ApiConfig(String url, Integer status, String memo, Date createTime, Date updateTime, Long createBy, Long updateBy) { |
| | | this.url = url; |
| | | this.status = status; |
| | | this.memo = memo; |
| | |
| | | // null // 修改人员 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public String getStatus$() { |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status) { |
| | | case 0: |
| | | return "正常"; |
| | | case 1: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | 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)){ |
| | | public String getUpdateTime$() { |
| | | if (Cools.isEmpty(this.updateTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | public String getCreateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | public String getUpdateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | |
| | | 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.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_api_log") |
| | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @ApiModelProperty(value = "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 日志编号 |
| | | */ |
| | | @ApiModelProperty(value= "日志编号") |
| | | @ApiModelProperty(value = "日志编号") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 名称空间 |
| | | */ |
| | | @ApiModelProperty(value= "名称空间") |
| | | @ApiModelProperty(value = "名称空间") |
| | | private String namespace; |
| | | |
| | | /** |
| | | * 接口地址 |
| | | */ |
| | | @ApiModelProperty(value= "接口地址") |
| | | @ApiModelProperty(value = "接口地址") |
| | | private String url; |
| | | |
| | | /** |
| | | * 平台密钥 |
| | | */ |
| | | @ApiModelProperty(value= "平台密钥") |
| | | @ApiModelProperty(value = "平台密钥") |
| | | private String appkey; |
| | | |
| | | /** |
| | | * 时间戳 |
| | | */ |
| | | @ApiModelProperty(value= "时间戳") |
| | | @ApiModelProperty(value = "时间戳") |
| | | private String timestamp; |
| | | |
| | | /** |
| | | * 客户端IP |
| | | */ |
| | | @ApiModelProperty(value= "客户端IP") |
| | | @ApiModelProperty(value = "客户端IP") |
| | | @TableField("client_ip") |
| | | private String clientIp; |
| | | |
| | | /** |
| | | * 请求内容 |
| | | */ |
| | | @ApiModelProperty(value= "请求内容") |
| | | @ApiModelProperty(value = "请求内容") |
| | | private String request; |
| | | |
| | | /** |
| | | * 响应内容 |
| | | */ |
| | | @ApiModelProperty(value= "响应内容") |
| | | @ApiModelProperty(value = "响应内容") |
| | | private String response; |
| | | |
| | | /** |
| | | * 异常内容 |
| | | */ |
| | | @ApiModelProperty(value= "异常内容") |
| | | @ApiModelProperty(value = "异常内容") |
| | | private String err; |
| | | |
| | | /** |
| | | * 结果 1: 成功 0: 失败 |
| | | */ |
| | | @ApiModelProperty(value= "结果 1: 成功 0: 失败 ") |
| | | @ApiModelProperty(value = "结果 1: 成功 0: 失败 ") |
| | | private Integer result; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | @ApiModelProperty(value = "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public ApiLog() {} |
| | | public ApiLog() { |
| | | } |
| | | |
| | | public ApiLog(String uuid,String namespace,String url,String appkey,String timestamp,String clientIp,String request,String response,String err,Integer result,Integer status,Date createTime,Date updateTime,String memo) { |
| | | public ApiLog(String uuid, String namespace, String url, String appkey, String timestamp, String clientIp, String request, String response, String err, Integer result, Integer status, Date createTime, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.namespace = namespace; |
| | | this.url = url; |
| | |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getResult$(){ |
| | | if (null == this.result){ return null; } |
| | | switch (this.result){ |
| | | public String getResult$() { |
| | | if (null == this.result) { |
| | | return null; |
| | | } |
| | | switch (this.result) { |
| | | case 1: |
| | | return "成功"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public String getStatus$() { |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status) { |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | 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)){ |
| | | public String getUpdateTime$() { |
| | | if (Cools.isEmpty(this.updateTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | |
| | | /** |
| | | * 异常代号 |
| | | */ |
| | | @ApiModelProperty(value= "异常代号") |
| | | @ApiModelProperty(value = "异常代号") |
| | | @TableId(value = "error_code", type = IdType.AUTO) |
| | | @TableField("error_code") |
| | | private Long errorCode; |
| | |
| | | /** |
| | | * 异常描述 |
| | | */ |
| | | @ApiModelProperty(value= "异常描述") |
| | | @ApiModelProperty(value = "异常描述") |
| | | @TableField("err_name") |
| | | private String errName; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | public BasCrnError() {} |
| | | public BasCrnError() { |
| | | } |
| | | |
| | | public BasCrnError(String errName, Long modiUser, Date modiTime, Long appeUser, Date appeTime) { |
| | | this.errName = errName; |
| | |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @ApiModelProperty(value = "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @ApiModelProperty(value = "任务号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 堆垛机 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机") |
| | | @ApiModelProperty(value = "堆垛机") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 下发时间 |
| | | */ |
| | | @ApiModelProperty(value= "下发时间") |
| | | @ApiModelProperty(value = "下发时间") |
| | | @TableField("send_time") |
| | | private Date sendTime; |
| | | |
| | | /** |
| | | * 模式 |
| | | */ |
| | | @ApiModelProperty(value= "模式") |
| | | @ApiModelProperty(value = "模式") |
| | | private String mode; |
| | | |
| | | /** |
| | | * 源排 |
| | | */ |
| | | @ApiModelProperty(value= "源排") |
| | | @ApiModelProperty(value = "源排") |
| | | @TableField("source_row") |
| | | private Integer sourceRow; |
| | | |
| | | /** |
| | | * 源列 |
| | | */ |
| | | @ApiModelProperty(value= "源列") |
| | | @ApiModelProperty(value = "源列") |
| | | @TableField("source_bay") |
| | | private Integer sourceBay; |
| | | |
| | | /** |
| | | * 源层 |
| | | */ |
| | | @ApiModelProperty(value= "源层") |
| | | @ApiModelProperty(value = "源层") |
| | | @TableField("source_lev") |
| | | private Integer sourceLev; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @ApiModelProperty(value = "源站") |
| | | @TableField("source_sta") |
| | | private Integer sourceSta; |
| | | |
| | | /** |
| | | * 目标排 |
| | | */ |
| | | @ApiModelProperty(value= "目标排") |
| | | @ApiModelProperty(value = "目标排") |
| | | @TableField("pos_row") |
| | | private Integer posRow; |
| | | |
| | | /** |
| | | * 目标列 |
| | | */ |
| | | @ApiModelProperty(value= "目标列") |
| | | @ApiModelProperty(value = "目标列") |
| | | @TableField("pos_bay") |
| | | private Integer posBay; |
| | | |
| | | /** |
| | | * 目标层 |
| | | */ |
| | | @ApiModelProperty(value= "目标层") |
| | | @ApiModelProperty(value = "目标层") |
| | | @TableField("pos_lev") |
| | | private Integer posLev; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @ApiModelProperty(value = "目标站") |
| | | @TableField("pos_sta") |
| | | private Integer posSta; |
| | | |
| | | /** |
| | | * 响应结果 1: 正常 0: 失败 |
| | | */ |
| | | @ApiModelProperty(value= "响应结果 1: 正常 0: 失败 ") |
| | | @ApiModelProperty(value = "响应结果 1: 正常 0: 失败 ") |
| | | private Integer response; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("update_time") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | public BasCrnOpt() {} |
| | | public BasCrnOpt() { |
| | | } |
| | | |
| | | public BasCrnOpt(Integer wrkNo,Integer crnNo,Date sendTime,String mode,Integer sourceRow,Integer sourceBay,Integer sourceLev,Integer sourceSta,Integer posRow,Integer posBay,Integer posLev,Integer posSta,Integer response,Date updateTime,Long updateBy) { |
| | | public BasCrnOpt(Integer wrkNo, Integer crnNo, Date sendTime, String mode, Integer sourceRow, Integer sourceBay, Integer sourceLev, Integer sourceSta, Integer posRow, Integer posBay, Integer posLev, Integer posSta, Integer response, Date updateTime, Long updateBy) { |
| | | this.wrkNo = wrkNo; |
| | | this.crnNo = crnNo; |
| | | this.sendTime = sendTime; |
| | |
| | | return sendTime; |
| | | } |
| | | |
| | | public String getSendTime$(){ |
| | | if (Cools.isEmpty(this.sendTime)){ |
| | | public void setSendTime(Date sendTime) { |
| | | this.sendTime = sendTime; |
| | | } |
| | | |
| | | public String getSendTime$() { |
| | | if (Cools.isEmpty(this.sendTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.sendTime); |
| | | } |
| | | |
| | | public void setSendTime(Date sendTime) { |
| | | this.sendTime = sendTime; |
| | | } |
| | | |
| | | public String getMode() { |
| | |
| | | return response; |
| | | } |
| | | |
| | | public String getResponse$(){ |
| | | if (null == this.response){ return null; } |
| | | switch (this.response){ |
| | | public void setResponse(Integer response) { |
| | | this.response = response; |
| | | } |
| | | |
| | | public String getResponse$() { |
| | | if (null == this.response) { |
| | | return null; |
| | | } |
| | | switch (this.response) { |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public void setResponse(Integer response) { |
| | | this.response = response; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getUpdateTime$() { |
| | | if (Cools.isEmpty(this.updateTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public Long getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | public void setUpdateBy(Long updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public String getUpdateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setUpdateBy(Long updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * 工作代号 |
| | | */ |
| | | @ApiModelProperty(value= "状态代号") |
| | | @ApiModelProperty(value = "状态代号") |
| | | @TableId(value = "sts_no", type = IdType.INPUT) |
| | | @TableField("sts_no") |
| | | private String stsNo; |
| | |
| | | /** |
| | | * 状态描述 |
| | | */ |
| | | @ApiModelProperty(value= "状态描述") |
| | | @ApiModelProperty(value = "状态描述") |
| | | @TableField("sts_desc") |
| | | private String stsDesc; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | public BasCrnStatus() {} |
| | | public BasCrnStatus() { |
| | | } |
| | | |
| | | public BasCrnStatus(String stsDesc, Long modiUser, Date modiTime, Long appeUser, Date appeTime) { |
| | | this.stsDesc = stsDesc; |
| | |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @ApiModelProperty(value = "编号") |
| | | @TableId(value = "crn_no", type = IdType.INPUT) |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | |
| | | /** |
| | | * 可入 |
| | | */ |
| | | @ApiModelProperty(value= "可入") |
| | | @ApiModelProperty(value = "可入") |
| | | @TableField("in_enable") |
| | | private String inEnable; |
| | | |
| | | /** |
| | | * 可出 |
| | | */ |
| | | @ApiModelProperty(value= "可出") |
| | | @ApiModelProperty(value = "可出") |
| | | @TableField("out_enable") |
| | | private String outEnable; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value= "状态") |
| | | @ApiModelProperty(value = "状态") |
| | | @TableField("crn_sts") |
| | | private Integer crnSts; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | @ApiModelProperty(value= "异常码") |
| | | @ApiModelProperty(value = "异常码") |
| | | @TableField("crn_err") |
| | | private Long crnErr; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @ApiModelProperty(value = "源库位") |
| | | @TableField("frm_locno") |
| | | private String frmLocno; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @ApiModelProperty(value = "源站") |
| | | @TableField("frm_sta") |
| | | private Integer frmSta; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @ApiModelProperty(value = "目标站") |
| | | @TableField("to_sta") |
| | | private Integer toSta; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @ApiModelProperty(value = "目标库位") |
| | | @TableField("to_locno") |
| | | private String toLocno; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value= "创建时间") |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("hp_mk") |
| | | private String hpMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("retrieve_mk") |
| | | private String retrieveMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctl_hp") |
| | | private String ctlHp; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctl_rest") |
| | | private String ctlRest; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("emp_in") |
| | | private String empIn; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("tank_qty") |
| | | private Integer tankQty; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("tank_qty1") |
| | | private Integer tankQty1; |
| | | |
| | | public BasCrnp() {} |
| | | public BasCrnp() { |
| | | } |
| | | |
| | | public BasCrnp(String inEnable,String outEnable,Integer crnSts,Integer wrkNo,Long crnErr,String frmLocno,Integer frmSta,Integer toSta,String toLocno,Long appeUser,Date appeTime,Long modiUser,Date modiTime,String hpMk,String retrieveMk,String ctlHp,String ctlRest,String empIn,Integer tankQty,Integer tankQty1) { |
| | | public BasCrnp(String inEnable, String outEnable, Integer crnSts, Integer wrkNo, Long crnErr, String frmLocno, Integer frmSta, Integer toSta, String toLocno, Long appeUser, Date appeTime, Long modiUser, Date modiTime, String hpMk, String retrieveMk, String ctlHp, String ctlRest, String empIn, Integer tankQty, Integer tankQty1) { |
| | | this.inEnable = inEnable; |
| | | this.outEnable = outEnable; |
| | | this.crnSts = crnSts; |
| | |
| | | // null // |
| | | // ); |
| | | |
| | | public String getcrnSts$(){ |
| | | if(this.crnSts==1){ |
| | | public String getcrnSts$() { |
| | | if (this.crnSts == 1) { |
| | | return "单机"; |
| | | }else if(this.crnSts==2){ |
| | | } else if (this.crnSts == 2) { |
| | | return "手动"; |
| | | }else if(this.crnSts==3){ |
| | | } else if (this.crnSts == 3) { |
| | | return "联机"; |
| | | }else { |
| | | } else { |
| | | return "未知"; |
| | | } |
| | | } |
| | | |
| | | public Integer getCrnNo() { |
| | | return crnNo; |
| | | } |
| | |
| | | return frmLocno; |
| | | } |
| | | |
| | | public String getFrmLocno$(){ |
| | | public void setFrmLocno(String frmLocno) { |
| | | this.frmLocno = frmLocno; |
| | | } |
| | | |
| | | public String getFrmLocno$() { |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.frmLocno); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setFrmLocno(String frmLocno) { |
| | | this.frmLocno = frmLocno; |
| | | } |
| | | |
| | | public Integer getFrmSta() { |
| | | return frmSta; |
| | | } |
| | | |
| | | public String getFrmSta$(){ |
| | | public void setFrmSta(Integer frmSta) { |
| | | this.frmSta = frmSta; |
| | | } |
| | | |
| | | public String getFrmSta$() { |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.frmSta); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | if (!Cools.isEmpty(basDevp)) { |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setFrmSta(Integer frmSta) { |
| | | this.frmSta = frmSta; |
| | | } |
| | | |
| | | public Integer getToSta() { |
| | | return toSta; |
| | | } |
| | | |
| | | public String getToSta$(){ |
| | | public void setToSta(Integer toSta) { |
| | | this.toSta = toSta; |
| | | } |
| | | |
| | | public String getToSta$() { |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.toSta); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | if (!Cools.isEmpty(basDevp)) { |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setToSta(Integer toSta) { |
| | | this.toSta = toSta; |
| | | } |
| | | |
| | | public String getToLocno() { |
| | | return toLocno; |
| | | } |
| | | |
| | | public String getToLocno$(){ |
| | | public void setToLocno(String toLocno) { |
| | | this.toLocno = toLocno; |
| | | } |
| | | |
| | | public String getToLocno$() { |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.toLocno); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setToLocno(String toLocno) { |
| | | this.toLocno = toLocno; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public Long getModiUser() { |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getHpMk() { |
| | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @ApiModelProperty(value = "编号") |
| | | @TableId(value = "dev_no", type = IdType.INPUT) |
| | | @TableField("dev_no") |
| | | private Integer devNo; |
| | |
| | | /** |
| | | * 设备描述 |
| | | */ |
| | | @ApiModelProperty(value= "设备描述") |
| | | @ApiModelProperty(value = "设备描述") |
| | | @TableField("dec_desc") |
| | | private String decDesc; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("dev_mk") |
| | | private String devMk; |
| | | |
| | | /** |
| | | * 可入 |
| | | */ |
| | | @ApiModelProperty(value= "可入") |
| | | @ApiModelProperty(value = "可入") |
| | | @TableField("in_enable") |
| | | private String inEnable; |
| | | |
| | | /** |
| | | * 可出 |
| | | */ |
| | | @ApiModelProperty(value= "可出") |
| | | @ApiModelProperty(value = "可出") |
| | | @TableField("out_enable") |
| | | private String outEnable; |
| | | |
| | | /** |
| | | * 自动 |
| | | */ |
| | | @ApiModelProperty(value= "自动") |
| | | @ApiModelProperty(value = "自动") |
| | | private String autoing; |
| | | |
| | | /** |
| | | * 有物 |
| | | */ |
| | | @ApiModelProperty(value= "有物") |
| | | @ApiModelProperty(value = "有物") |
| | | private String loading; |
| | | |
| | | /** |
| | | * 能入 |
| | | */ |
| | | @ApiModelProperty(value= "能入") |
| | | @ApiModelProperty(value = "能入") |
| | | private String canining; |
| | | |
| | | /** |
| | | * 能出 |
| | | */ |
| | | @ApiModelProperty(value= "能出") |
| | | @ApiModelProperty(value = "能出") |
| | | private String canouting; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String fronting; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String rearing; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String uping; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String downing; |
| | | |
| | | /** |
| | | * 需求1 |
| | | */ |
| | | @ApiModelProperty(value= "需求1") |
| | | @ApiModelProperty(value = "需求1") |
| | | private String inreq1; |
| | | |
| | | /** |
| | | * 需求2 |
| | | */ |
| | | @ApiModelProperty(value= "需求2") |
| | | @ApiModelProperty(value = "需求2") |
| | | private String inreq2; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("wrk_no1") |
| | | private Integer wrkNo1; |
| | | |
| | | /** |
| | | * 容器类型 |
| | | */ |
| | | @ApiModelProperty(value= "容器类型") |
| | | @ApiModelProperty(value = "容器类型") |
| | | @TableField("ctn_type") |
| | | private Integer ctnType; |
| | | |
| | | /** |
| | | * 条形码 |
| | | */ |
| | | @ApiModelProperty(value= "条形码") |
| | | @ApiModelProperty(value = "条形码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty(value= "入库暂存数") |
| | | @ApiModelProperty(value = "入库暂存数") |
| | | @TableField("in_qty") |
| | | private Integer inQty; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Integer row1; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String area; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("in_ok") |
| | | private String inOk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("out_ok") |
| | | private String outOk; |
| | | |
| | | @ApiModelProperty(value= "高低类型{0:未知,1:低库位,2:高库位}") |
| | | @ApiModelProperty(value = "高低类型{0:未知,1:低库位,2:高库位}") |
| | | @TableField("loc_type1") |
| | | private Short locType1; |
| | | |
| | | @ApiModelProperty(value= "宽窄类型{0:未知,1:窄库位,2:宽库位}") |
| | | @ApiModelProperty(value = "宽窄类型{0:未知,1:窄库位,2:宽库位}") |
| | | @TableField("loc_type2") |
| | | private Short locType2; |
| | | |
| | | @ApiModelProperty(value= "轻重类型{0:未知,1:轻库位,2:重库位}") |
| | | @ApiModelProperty(value = "轻重类型{0:未知,1:轻库位,2:重库位}") |
| | | @TableField("loc_type3") |
| | | private Short locType3; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("std_qty") |
| | | private Double stdQty; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("min_wt") |
| | | private Double minWt; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("max_wt") |
| | | private Double maxWt; |
| | | |
| | | /** |
| | | * 重量 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | @ApiModelProperty(value = "重量") |
| | | @TableField("gross_wt") |
| | | private Double grossWt; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("cart_pos") |
| | | private Integer cartPos; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("agv_start_pick") |
| | | private Integer agvStartPick; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("agv_target_pick") |
| | | private Integer agvTargetPick; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("agv_start_place") |
| | | private Integer agvStartPlace; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("agv_target_place") |
| | | private Integer agvTargetPlace; |
| | | |
| | | @ApiModelProperty(value= "异常码") |
| | | @ApiModelProperty(value = "异常码") |
| | | @TableField("sta_err") |
| | | private Integer staErr; |
| | | |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | public String getIoTime$() { |
| | | if (Cools.isEmpty(this.ioTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getLocType1$() { |
| | | if (null == this.locType1){ return null; } |
| | | switch (this.locType1){ |
| | | if (null == this.locType1) { |
| | | return null; |
| | | } |
| | | switch (this.locType1) { |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | |
| | | } |
| | | |
| | | public String getLocType2$() { |
| | | if (null == this.locType2){ return null; } |
| | | switch (this.locType2){ |
| | | if (null == this.locType2) { |
| | | return null; |
| | | } |
| | | switch (this.locType2) { |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | |
| | | } |
| | | |
| | | public String getLocType3$() { |
| | | if (null == this.locType3){ return null; } |
| | | switch (this.locType3){ |
| | | if (null == this.locType3) { |
| | | return null; |
| | | } |
| | | switch (this.locType3) { |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @ApiModelProperty(value = "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @ApiModelProperty(value = "编号") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 发生时间 |
| | | */ |
| | | @ApiModelProperty(value= "发生时间") |
| | | @ApiModelProperty(value = "发生时间") |
| | | @TableField("start_time") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @ApiModelProperty(value = "结束时间") |
| | | @TableField("end_time") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @ApiModelProperty(value = "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @ApiModelProperty(value = "入出库类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 堆垛机 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机") |
| | | @ApiModelProperty(value = "堆垛机") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * plc |
| | | */ |
| | | @ApiModelProperty(value= "plc") |
| | | @ApiModelProperty(value = "plc") |
| | | @TableField("plc_no") |
| | | private Integer plcNo; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @ApiModelProperty(value = "目标库位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @ApiModelProperty(value = "目标站") |
| | | @TableField("sta_no") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @ApiModelProperty(value = "源站") |
| | | @TableField("source_sta_no") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @ApiModelProperty(value = "源库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | @ApiModelProperty(value= "异常码") |
| | | @ApiModelProperty(value = "异常码") |
| | | @TableField("err_code") |
| | | private Integer errCode; |
| | | |
| | | /** |
| | | * 异常 |
| | | */ |
| | | @ApiModelProperty(value= "异常") |
| | | @ApiModelProperty(value = "异常") |
| | | private String error; |
| | | |
| | | /** |
| | | * 异常情况 1: 未处理 2: 已修复 |
| | | */ |
| | | @ApiModelProperty(value= "异常情况 1: 未处理 2: 已修复 ") |
| | | @ApiModelProperty(value = "异常情况 1: 未处理 2: 已修复 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @ApiModelProperty(value = "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("update_time") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public BasErrLog() {} |
| | | public BasErrLog() { |
| | | } |
| | | |
| | | public BasErrLog(String uuid,Integer wrkNo,Date startTime,Date endTime,Long wrkSts,Integer ioType,Integer crnNo,Integer plcNo,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) { |
| | | public BasErrLog(String uuid, Integer wrkNo, Date startTime, Date endTime, Long wrkSts, Integer ioType, Integer crnNo, Integer plcNo, 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) { |
| | | this.uuid = uuid; |
| | | this.wrkNo = wrkNo; |
| | | this.startTime = startTime; |
| | |
| | | return startTime; |
| | | } |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public String getStartTime$() { |
| | | if (Cools.isEmpty(this.startTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public String getEndTime$() { |
| | | if (Cools.isEmpty(this.endTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | | } |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public Long getWrkSts() { |
| | |
| | | return status; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus$() { |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status) { |
| | | case 1: |
| | | return "未处理"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Long getCreateBy() { |
| | | return createBy; |
| | | 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.getUsername()); |
| | | } |
| | | return null; |
| | | public Long getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(Long createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | public String getCreateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getUpdateTime$() { |
| | | if (Cools.isEmpty(this.updateTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public Long getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | public void setUpdateBy(Long updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public String getUpdateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setUpdateBy(Long updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public String getMemo() { |
| | |
| | | /** |
| | | * 库位状态代号 |
| | | */ |
| | | @ApiModelProperty(value= "库位状态代号") |
| | | @ApiModelProperty(value = "库位状态代号") |
| | | @TableId(value = "loc_sts", type = IdType.INPUT) |
| | | @TableField("loc_sts") |
| | | private String locSts; |
| | |
| | | /** |
| | | * 库位状态描述 |
| | | */ |
| | | @ApiModelProperty(value= "库位状态描述") |
| | | @ApiModelProperty(value = "库位状态描述") |
| | | @TableField("loc_desc") |
| | | private String locDesc; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | public BasLocSts() {} |
| | | public BasLocSts() { |
| | | } |
| | | |
| | | public BasLocSts(String locDesc, Long modiUser, Date modiTime, Long appeUser, Date appeTime) { |
| | | this.locDesc = locDesc; |
| | |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * 异常编号 |
| | | */ |
| | | @ApiModelProperty(value= "异常编号") |
| | | @ApiModelProperty(value = "异常编号") |
| | | @TableId(value = "error_code", type = IdType.INPUT) |
| | | @TableField("error_code") |
| | | private Integer errorCode; |
| | |
| | | /** |
| | | * 异常描述 |
| | | */ |
| | | @ApiModelProperty(value= "异常描述") |
| | | @ApiModelProperty(value = "异常描述") |
| | | @TableField("error_desc") |
| | | private String errorDesc; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | public BasPlcerror() {} |
| | | public BasPlcerror() { |
| | | } |
| | | |
| | | public BasPlcerror(Integer errorCode, String errorDesc, Date modiTime, Long modiUser, Date appeTime, Long appeUser) { |
| | | this.errorDesc = errorDesc; |
| | |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getModiUser() { |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | |
| | |
| | | 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.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | 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.asrs.service.BasWrkStatusService; |
| | | 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 org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_plcerror_log") |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value= "开始时间") |
| | | @ApiModelProperty(value = "开始时间") |
| | | @TableField("start_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @ApiModelProperty(value = "结束时间") |
| | | @TableField("end_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @ApiModelProperty(value = "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @ApiModelProperty(value = "入出库类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * plc |
| | | */ |
| | | @ApiModelProperty(value= "plc") |
| | | @ApiModelProperty(value = "plc") |
| | | @TableField("plc_no") |
| | | private Integer plcNo; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @ApiModelProperty(value = "目标库位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @ApiModelProperty(value = "目标站") |
| | | @TableField("sta_no") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @ApiModelProperty(value = "源站") |
| | | @TableField("source_sta_no") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @ApiModelProperty(value = "源库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 异常编号 |
| | | */ |
| | | @ApiModelProperty(value= "异常编号") |
| | | @ApiModelProperty(value = "异常编号") |
| | | @TableField("err_code") |
| | | private Integer errCode; |
| | | |
| | | /** |
| | | * 异常描述 |
| | | */ |
| | | @ApiModelProperty(value= "异常描述") |
| | | @ApiModelProperty(value = "异常描述") |
| | | private String err; |
| | | |
| | | /** |
| | | * 异常情况 1: 未处理 2: 已修复 |
| | | */ |
| | | @ApiModelProperty(value= "异常情况 1: 未处理 2: 已修复 ") |
| | | @ApiModelProperty(value = "异常情况 1: 未处理 2: 已修复 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @ApiModelProperty(value = "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public BasPlcerrorLog() {} |
| | | public BasPlcerrorLog() { |
| | | } |
| | | |
| | | public BasPlcerrorLog(Integer wrkNo,Date startTime,Date endTime,Long wrkSts,Integer ioType,Integer plcNo,String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String barcode,Integer errCode,String err,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) { |
| | | public BasPlcerrorLog(Integer wrkNo, Date startTime, Date endTime, Long wrkSts, Integer ioType, Integer plcNo, String locNo, Integer staNo, Integer sourceStaNo, String sourceLocNo, String barcode, Integer errCode, String err, Integer status, Date createTime, Long createBy, Date updateTime, Long updateBy, String memo) { |
| | | this.wrkNo = wrkNo; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | 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)){ |
| | | public String getEndTime$() { |
| | | if (Cools.isEmpty(this.endTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | | } |
| | | |
| | | public String getWrkSts$(){ |
| | | public String getWrkSts$() { |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | if (!Cools.isEmpty(basWrkStatus)) { |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | public String getIoType$() { |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | if (!Cools.isEmpty(basWrkIotype)) { |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public String getStatus$() { |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status) { |
| | | case 1: |
| | | return "未处理"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | public String getCreateTime$() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | public String getCreateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | public String getUpdateTime$() { |
| | | if (Cools.isEmpty(this.updateTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | public String getUpdateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | |
| | | /** |
| | | * 入出类型代号 |
| | | */ |
| | | @ApiModelProperty(value= "入出类型代号") |
| | | @ApiModelProperty(value = "入出类型代号") |
| | | @TableId(value = "io_type", type = IdType.INPUT) |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | |
| | | /** |
| | | * 主要 |
| | | */ |
| | | @ApiModelProperty(value= "主要") |
| | | @ApiModelProperty(value = "主要") |
| | | @TableField("io_pri") |
| | | private String ioPri; |
| | | |
| | | /** |
| | | * 入出类型描述 |
| | | */ |
| | | @ApiModelProperty(value= "入出类型描述") |
| | | @ApiModelProperty(value = "入出类型描述") |
| | | @TableField("io_desc") |
| | | private String ioDesc; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | public BasWrkIotype() {} |
| | | public BasWrkIotype() { |
| | | } |
| | | |
| | | public BasWrkIotype(String ioPri,String ioDesc,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | public BasWrkIotype(String ioPri, String ioDesc, Long modiUser, Date modiTime, Long appeUser, Date appeTime) { |
| | | this.ioPri = ioPri; |
| | | this.ioDesc = ioDesc; |
| | | this.modiUser = modiUser; |
| | |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * 代号 |
| | | */ |
| | | @ApiModelProperty(value= "代号") |
| | | @ApiModelProperty(value = "代号") |
| | | @TableId(value = "wrk_sts", type = IdType.INPUT) |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | |
| | | /** |
| | | * 状态描述 |
| | | */ |
| | | @ApiModelProperty(value= "状态描述") |
| | | @ApiModelProperty(value = "状态描述") |
| | | @TableField("wrk_desc") |
| | | private String wrkDesc; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | public BasWrkStatus() {} |
| | | public BasWrkStatus() { |
| | | } |
| | | |
| | | public BasWrkStatus(String wrkDesc,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | public BasWrkStatus(String wrkDesc, Long modiUser, Date modiTime, Long appeUser, Date appeTime) { |
| | | this.wrkDesc = wrkDesc; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | public class ChartBean { |
| | | private String name; |
| | | private double y; |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | public double getY() { |
| | | return y; |
| | | } |
| | | public void setY(double y) { |
| | | this.y = y; |
| | | } |
| | | |
| | | private String name; |
| | | private double y; |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public double getY() { |
| | | return y; |
| | | } |
| | | |
| | | public void setY(double y) { |
| | | this.y = y; |
| | | } |
| | | |
| | | } |
| | |
| | | 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 com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.zy.core.enums.CommandType; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wcs_command_info") |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * WMS任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @ApiModelProperty(value = "任务号") |
| | | @TableField("task_no") |
| | | private String taskNo; |
| | | |
| | | /** |
| | | * 指令类型{1:创建,2:执行,3:完成} |
| | | */ |
| | | @ApiModelProperty(value= "指令状态") |
| | | @ApiModelProperty(value = "指令状态") |
| | | @TableField("command_status") |
| | | private Integer commandStatus; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value= "开始时间") |
| | | @ApiModelProperty(value = "开始时间") |
| | | @TableField("start_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 指令类型 |
| | | */ |
| | | @ApiModelProperty(value= "指令类型") |
| | | @ApiModelProperty(value = "指令类型") |
| | | @TableField("command_type") |
| | | private Integer commandType; |
| | | |
| | | /** |
| | | * 设备 |
| | | */ |
| | | @ApiModelProperty(value= "设备") |
| | | @ApiModelProperty(value = "设备") |
| | | private String device; |
| | | |
| | | /** |
| | | * 设备执行信息 |
| | | */ |
| | | @ApiModelProperty(value= "设备执行信息") |
| | | @ApiModelProperty(value = "设备执行信息") |
| | | @TableField("device_log") |
| | | private String deviceLog; |
| | | |
| | | /** |
| | | * 命令描述 |
| | | */ |
| | | @ApiModelProperty(value= "命令描述") |
| | | @ApiModelProperty(value = "命令描述") |
| | | @TableField("command_desc") |
| | | private String commandDesc; |
| | | |
| | | /** |
| | | * 命令JSON |
| | | */ |
| | | @ApiModelProperty(value= "命令JSON") |
| | | @ApiModelProperty(value = "命令JSON") |
| | | @TableField("command") |
| | | private String command; |
| | | |
| | | /** |
| | | * 执行时间 |
| | | */ |
| | | @ApiModelProperty(value= "执行时间") |
| | | @ApiModelProperty(value = "执行时间") |
| | | @TableField("execute_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date executeTime; |
| | | |
| | | /** |
| | | * 完成时间 |
| | | */ |
| | | @ApiModelProperty(value= "完成时间") |
| | | @ApiModelProperty(value = "完成时间") |
| | | @TableField("complete_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date completeTime; |
| | | |
| | | public CommandInfo() {} |
| | | public CommandInfo() { |
| | | } |
| | | |
| | | public CommandInfo(Integer id, Integer wrkNo, String taskNo, Integer commandStatus, Date startTime, Integer commandType, String device, String deviceLog, String commandDesc, String command, Date executeTime, Date completeTime) { |
| | | this.id = id; |
| | |
| | | this.completeTime = completeTime; |
| | | } |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | public String getStartTime$() { |
| | | if (Cools.isEmpty(this.startTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public String getExecuteTime$(){ |
| | | if (Cools.isEmpty(this.executeTime)){ |
| | | public String getExecuteTime$() { |
| | | if (Cools.isEmpty(this.executeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.executeTime); |
| | | } |
| | | |
| | | public String getCompleteTime$(){ |
| | | if (Cools.isEmpty(this.completeTime)){ |
| | | public String getCompleteTime$() { |
| | | if (Cools.isEmpty(this.completeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.completeTime); |
| | |
| | | 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 com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.zy.core.enums.CommandType; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wcs_command_info_log") |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 起点位置 |
| | | */ |
| | | @ApiModelProperty(value= "起点位置") |
| | | @ApiModelProperty(value = "起点位置") |
| | | @TableField("start_pos") |
| | | private String startPos; |
| | | |
| | | /** |
| | | * 终点位置 |
| | | */ |
| | | @ApiModelProperty(value= "终点位置") |
| | | @ApiModelProperty(value = "终点位置") |
| | | @TableField("end_pos") |
| | | private String endPos; |
| | | |
| | | /** |
| | | * 指令状态 1: 创建 2: 执行 3: 完成 |
| | | */ |
| | | @ApiModelProperty(value= "指令状态 1: 创建 2: 执行 3: 完成 ") |
| | | @ApiModelProperty(value = "指令状态 1: 创建 2: 执行 3: 完成 ") |
| | | @TableField("command_status") |
| | | private Integer commandStatus; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value= "创建时间") |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("start_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 指令类型 |
| | | */ |
| | | @ApiModelProperty(value= "指令类型") |
| | | @ApiModelProperty(value = "指令类型") |
| | | @TableField("command_type") |
| | | private Integer commandType; |
| | | |
| | | /** |
| | | * 设备 |
| | | */ |
| | | @ApiModelProperty(value= "设备") |
| | | @ApiModelProperty(value = "设备") |
| | | private String device; |
| | | |
| | | /** |
| | | * 设备执行信息 |
| | | */ |
| | | @ApiModelProperty(value= "设备执行信息") |
| | | @ApiModelProperty(value = "设备执行信息") |
| | | @TableField("device_log") |
| | | private String deviceLog; |
| | | |
| | | /** |
| | | * 命令描述 |
| | | */ |
| | | @ApiModelProperty(value= "命令描述") |
| | | @ApiModelProperty(value = "命令描述") |
| | | @TableField("command_desc") |
| | | private String commandDesc; |
| | | |
| | | /** |
| | | * 命令JSON |
| | | */ |
| | | @ApiModelProperty(value= "命令JSON") |
| | | @ApiModelProperty(value = "命令JSON") |
| | | private String command; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @ApiModelProperty(value = "任务号") |
| | | @TableField("task_no") |
| | | private String taskNo; |
| | | |
| | | /** |
| | | * 执行时间 |
| | | */ |
| | | @ApiModelProperty(value= "执行时间") |
| | | @ApiModelProperty(value = "执行时间") |
| | | @TableField("execute_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date executeTime; |
| | | |
| | | /** |
| | | * 完成时间 |
| | | */ |
| | | @ApiModelProperty(value= "完成时间") |
| | | @ApiModelProperty(value = "完成时间") |
| | | @TableField("complete_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date completeTime; |
| | | |
| | | public CommandInfoLog() {} |
| | | public CommandInfoLog() { |
| | | } |
| | | |
| | | public CommandInfoLog(Integer wrkNo,String startPos,String endPos,Integer commandStatus,Date startTime,Integer commandType,String device,String deviceLog,String commandDesc,String command,String taskNo,Date executeTime,Date completeTime) { |
| | | public CommandInfoLog(Integer wrkNo, String startPos, String endPos, Integer commandStatus, Date startTime, Integer commandType, String device, String deviceLog, String commandDesc, String command, String taskNo, Date executeTime, Date completeTime) { |
| | | this.wrkNo = wrkNo; |
| | | this.startPos = startPos; |
| | | this.endPos = endPos; |
| | |
| | | // null // 完成时间 |
| | | // ); |
| | | |
| | | public String getCommandStatus$(){ |
| | | if (null == this.commandStatus){ return null; } |
| | | switch (this.commandStatus){ |
| | | public String getCommandStatus$() { |
| | | if (null == this.commandStatus) { |
| | | return null; |
| | | } |
| | | switch (this.commandStatus) { |
| | | case 1: |
| | | return "创建"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | public String getStartTime$() { |
| | | if (Cools.isEmpty(this.startTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public String getExecuteTime$(){ |
| | | if (Cools.isEmpty(this.executeTime)){ |
| | | public String getExecuteTime$() { |
| | | if (Cools.isEmpty(this.executeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.executeTime); |
| | | } |
| | | |
| | | public String getCompleteTime$(){ |
| | | if (Cools.isEmpty(this.completeTime)){ |
| | | public String getCompleteTime$() { |
| | | if (Cools.isEmpty(this.completeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.completeTime); |
| | |
| | | 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 com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wcs_data_resource") |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String data; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("resource_id") |
| | | private Integer resourceId; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public DataResource() {} |
| | | public DataResource() { |
| | | } |
| | | |
| | | public DataResource(String data,String name,Integer resourceId,Date createTime,String memo) { |
| | | public DataResource(String data, String name, Integer resourceId, Date createTime, String memo) { |
| | | this.data = data; |
| | | this.name = name; |
| | | this.resourceId = resourceId; |
| | |
| | | // null // |
| | | // ); |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | public String getCreateTime$() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | |
| | | 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 com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wcs_device_error") |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设备 |
| | | */ |
| | | @ApiModelProperty(value= "设备") |
| | | @ApiModelProperty(value = "设备") |
| | | private String device; |
| | | |
| | | /** |
| | | * 设备ID |
| | | */ |
| | | @ApiModelProperty(value= "设备ID") |
| | | @ApiModelProperty(value = "设备ID") |
| | | @TableField("device_id") |
| | | private Integer deviceId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value= "创建时间") |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 异常信息 |
| | | */ |
| | | @ApiModelProperty(value= "异常信息") |
| | | @ApiModelProperty(value = "异常信息") |
| | | private String msg; |
| | | |
| | | public DeviceError() {} |
| | | public DeviceError() { |
| | | } |
| | | |
| | | public DeviceError(String device,Integer deviceId,Date createTime,String msg) { |
| | | public DeviceError(String device, Integer deviceId, Date createTime, String msg) { |
| | | this.device = device; |
| | | this.deviceId = deviceId; |
| | | this.createTime = createTime; |
| | |
| | | // null // 异常信息 |
| | | // ); |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | public String getCreateTime$() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "库位号") |
| | | @ApiModelProperty(value = "库位号") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | @ApiModelProperty(value= "托盘条码") |
| | | @ApiModelProperty(value = "托盘条码") |
| | | private String zpallet; |
| | | |
| | | @ApiModelProperty(value= "数量") |
| | | @ApiModelProperty(value = "数量") |
| | | @ExcelProperty("数量") |
| | | private Double anfme; |
| | | |
| | | @ApiModelProperty(value= "商品编号") |
| | | @ApiModelProperty(value = "商品编号") |
| | | @ExcelProperty("商品编号") |
| | | private String matnr; |
| | | |
| | | @ApiModelProperty(value= "商品名称") |
| | | @ApiModelProperty(value = "商品名称") |
| | | @ExcelProperty("商品名称") |
| | | private String maktx; |
| | | |
| | | @ApiModelProperty(value= "批号") |
| | | @ApiModelProperty(value = "批号") |
| | | @ExcelProperty("批号") |
| | | private String batch; |
| | | |
| | | @ApiModelProperty(value= "单据编号") |
| | | @ApiModelProperty(value = "单据编号") |
| | | @ExcelProperty("单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value= "规格") |
| | | @ApiModelProperty(value = "规格") |
| | | private String specs; |
| | | |
| | | @ApiModelProperty(value= "型号") |
| | | @ApiModelProperty(value = "型号") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(value= "颜色") |
| | | @ApiModelProperty(value = "颜色") |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value= "品牌") |
| | | @ApiModelProperty(value = "品牌") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value= "单位") |
| | | @ApiModelProperty(value = "单位") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty(value= "单价") |
| | | @ApiModelProperty(value = "单价") |
| | | private Double price; |
| | | |
| | | @ApiModelProperty(value= "sku") |
| | | @ApiModelProperty(value = "sku") |
| | | private String sku; |
| | | |
| | | @ApiModelProperty(value= "单位量") |
| | | @ApiModelProperty(value = "单位量") |
| | | private Double units; |
| | | |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty(value= "产地") |
| | | @ApiModelProperty(value = "产地") |
| | | private String origin; |
| | | |
| | | @ApiModelProperty(value= "厂家") |
| | | @ApiModelProperty(value = "厂家") |
| | | private String manu; |
| | | |
| | | @ApiModelProperty(value= "生产日期") |
| | | @ApiModelProperty(value = "生产日期") |
| | | @TableField("manu_date") |
| | | private String manuDate; |
| | | |
| | | @ApiModelProperty(value= "品项数") |
| | | @ApiModelProperty(value = "品项数") |
| | | @TableField("item_num") |
| | | private String itemNum; |
| | | |
| | | @ApiModelProperty(value= "安全库存量") |
| | | @ApiModelProperty(value = "安全库存量") |
| | | @TableField("safe_qty") |
| | | private Double safeQty; |
| | | |
| | | @ApiModelProperty(value= "重量") |
| | | @ApiModelProperty(value = "重量") |
| | | private Double weight; |
| | | |
| | | @ApiModelProperty(value= "长度") |
| | | @ApiModelProperty(value = "长度") |
| | | private Double length; |
| | | |
| | | @ApiModelProperty(value= "体积") |
| | | @ApiModelProperty(value = "体积") |
| | | private Double volume; |
| | | |
| | | @ApiModelProperty(value= "三方编码") |
| | | @ApiModelProperty(value = "三方编码") |
| | | @TableField("three_code") |
| | | private String threeCode; |
| | | |
| | | @ApiModelProperty(value= "供应商") |
| | | @ApiModelProperty(value = "供应商") |
| | | private String supp; |
| | | |
| | | @ApiModelProperty(value= "供应商编码") |
| | | @ApiModelProperty(value = "供应商编码") |
| | | @TableField("supp_code") |
| | | private String suppCode; |
| | | |
| | | @ApiModelProperty(value= "是否批次 1: 是 0: 否 ") |
| | | @ApiModelProperty(value = "是否批次 1: 是 0: 否 ") |
| | | @TableField("be_batch") |
| | | private Integer beBatch; |
| | | |
| | | @ApiModelProperty(value= "保质期") |
| | | @ApiModelProperty(value = "保质期") |
| | | @TableField("dead_time") |
| | | private String deadTime; |
| | | |
| | | @ApiModelProperty(value= "预警天数") |
| | | @ApiModelProperty(value = "预警天数") |
| | | @TableField("dead_warn") |
| | | private Integer deadWarn; |
| | | |
| | | @ApiModelProperty(value= "制购 1: 制造 2: 采购 3: 外协 ") |
| | | @ApiModelProperty(value = "制购 1: 制造 2: 采购 3: 外协 ") |
| | | private Integer source; |
| | | |
| | | @ApiModelProperty(value= "要求检验 1: 是 0: 否 ") |
| | | @ApiModelProperty(value = "要求检验 1: 是 0: 否 ") |
| | | private Integer inspect; |
| | | |
| | | @ApiModelProperty(value= "危险品 1: 是 0: 否 ") |
| | | @ApiModelProperty(value = "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public String getLocNo$(){ |
| | | public String getLocNo$() { |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | | switch (this.beBatch){ |
| | | public String getBeBatch$() { |
| | | if (null == this.beBatch) { |
| | | return null; |
| | | } |
| | | switch (this.beBatch) { |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getSource$(){ |
| | | if (null == this.source){ return null; } |
| | | switch (this.source){ |
| | | public String getSource$() { |
| | | if (null == this.source) { |
| | | return null; |
| | | } |
| | | switch (this.source) { |
| | | case 1: |
| | | return "制造"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getInspect$(){ |
| | | if (null == this.inspect){ return null; } |
| | | switch (this.inspect){ |
| | | public String getInspect$() { |
| | | if (null == this.inspect) { |
| | | return null; |
| | | } |
| | | switch (this.inspect) { |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getDanger$(){ |
| | | if (null == this.danger){ return null; } |
| | | switch (this.danger){ |
| | | public String getDanger$() { |
| | | if (null == this.danger) { |
| | | return null; |
| | | } |
| | | switch (this.danger) { |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | |
| | | /** |
| | | * 库位号 |
| | | */ |
| | | @ApiModelProperty(value= "库位号") |
| | | @ApiModelProperty(value = "库位号") |
| | | @TableId(value = "loc_no", type = IdType.INPUT) |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | |
| | | /** |
| | | * 库位类型 |
| | | */ |
| | | @ApiModelProperty(value= "库位类型") |
| | | @ApiModelProperty(value = "库位类型") |
| | | @TableField("whs_type") |
| | | private Long whsType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("plt_type") |
| | | private Integer pltType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctn_type") |
| | | private Integer ctnType; |
| | | |
| | | @ApiModelProperty(value= "库位状态") |
| | | @ApiModelProperty(value = "库位状态") |
| | | @TableField("loc_sts") |
| | | private String locSts; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("sheet_no") |
| | | private String sheetNo; |
| | | |
| | | /** |
| | | * 堆垛机号(asr_bas_crnp) |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @ApiModelProperty(value = "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 排 |
| | | */ |
| | | @ApiModelProperty(value= "排") |
| | | @ApiModelProperty(value = "排") |
| | | private Integer row1; |
| | | |
| | | /** |
| | | * 列 |
| | | */ |
| | | @ApiModelProperty(value= "列") |
| | | @ApiModelProperty(value = "列") |
| | | private Integer bay1; |
| | | |
| | | /** |
| | | * 层 |
| | | */ |
| | | @ApiModelProperty(value= "层") |
| | | @ApiModelProperty(value = "层") |
| | | private Integer lev1; |
| | | |
| | | /** |
| | | * 满板 |
| | | */ |
| | | @ApiModelProperty(value= "满板") |
| | | @ApiModelProperty(value = "满板") |
| | | @TableField("full_plt") |
| | | private String fullPlt; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("loc_type") |
| | | private String locType; |
| | | |
| | | @ApiModelProperty(value= "高低类型{0:未知,1:低库位,2:高库位}") |
| | | @ApiModelProperty(value = "高低类型{0:未知,1:低库位,2:高库位}") |
| | | @TableField("loc_type1") |
| | | private Short locType1; |
| | | |
| | | @ApiModelProperty(value= "宽窄类型{0:未知,1:窄库位,2:宽库位}") |
| | | @ApiModelProperty(value = "宽窄类型{0:未知,1:窄库位,2:宽库位}") |
| | | @TableField("loc_type2") |
| | | private Short locType2; |
| | | |
| | | @ApiModelProperty(value= "轻重类型{0:未知,1:轻库位,2:重库位}") |
| | | @ApiModelProperty(value = "轻重类型{0:未知,1:轻库位,2:重库位}") |
| | | @TableField("loc_type3") |
| | | private Short locType3; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("out_enable") |
| | | private String outEnable; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("first_time") |
| | | private Date firstTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("error_time") |
| | | private Date errorTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("error_memo") |
| | | private String errorMemo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctn_kind") |
| | | private Integer ctnKind; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("sc_weight") |
| | | private Double scWeight; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("inv_wh") |
| | | private String invWh; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String mk; |
| | | |
| | | /** |
| | | * 托盘码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘码") |
| | | @ApiModelProperty(value = "托盘码") |
| | | @TableField("barcode") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Pdc_type") |
| | | private String PdcType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctn_no") |
| | | private String ctnNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String status; |
| | | |
| | | @TableField(exist = false) |
| | |
| | | @TableField(exist = false) |
| | | private String emptyContainer; |
| | | |
| | | public String getEmptyContainer$(){ |
| | | if (Cools.isEmpty(this.emptyContainer)){ |
| | | public String getEmptyContainer$() { |
| | | if (Cools.isEmpty(this.emptyContainer)) { |
| | | return ""; |
| | | } |
| | | if (this.emptyContainer.equals("1")){ |
| | | if (this.emptyContainer.equals("1")) { |
| | | return "Y"; |
| | | }else { |
| | | } else { |
| | | return "N"; |
| | | } |
| | | } |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | |
| | | public String getIoTime$() { |
| | | if (Cools.isEmpty(this.ioTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getFirstTime$(){ |
| | | if (Cools.isEmpty(this.firstTime)){ |
| | | public String getFirstTime$() { |
| | | if (Cools.isEmpty(this.firstTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.firstTime); |
| | | } |
| | | |
| | | public String getLocType1$() { |
| | | if (null == this.locType1){ return null; } |
| | | switch (this.locType1){ |
| | | if (null == this.locType1) { |
| | | return null; |
| | | } |
| | | switch (this.locType1) { |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | |
| | | } |
| | | |
| | | public String getLocType2$() { |
| | | if (null == this.locType2){ return null; } |
| | | switch (this.locType2){ |
| | | if (null == this.locType2) { |
| | | return null; |
| | | } |
| | | switch (this.locType2) { |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | |
| | | } |
| | | |
| | | public String getLocType3$() { |
| | | if (null == this.locType3){ return null; } |
| | | switch (this.locType3){ |
| | | if (null == this.locType3) { |
| | | return null; |
| | | } |
| | | switch (this.locType3) { |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public String getErrorTime$(){ |
| | | if (Cools.isEmpty(this.errorTime)){ |
| | | public String getErrorTime$() { |
| | | if (Cools.isEmpty(this.errorTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime); |
| | | } |
| | | |
| | | public String getLocSts$(){ |
| | | public String getLocSts$() { |
| | | BasLocStsService service = SpringUtils.getBean(BasLocStsService.class); |
| | | BasLocSts basLocSts = service.selectById(this.locSts); |
| | | if (!Cools.isEmpty(basLocSts)){ |
| | | if (!Cools.isEmpty(basLocSts)) { |
| | | return String.valueOf(basLocSts.getLocDesc()); |
| | | } |
| | | return null; |
| | |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | @ApiModelProperty(value= "商品编号") |
| | | @ApiModelProperty(value = "商品编号") |
| | | @TableId(value = "mat_no", type = IdType.INPUT) |
| | | @TableField("mat_no") |
| | | private String matNo; |
| | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条形码") |
| | | @ApiModelProperty(value = "条形码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | @ApiModelProperty(value= "商品名称") |
| | | @ApiModelProperty(value = "商品名称") |
| | | @TableField("mat_name") |
| | | private String matName; |
| | | |
| | | /** |
| | | * 物料单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | @ApiModelProperty(value = "单位") |
| | | private String str1; |
| | | |
| | | @ApiModelProperty(value= "规格") |
| | | @ApiModelProperty(value = "规格") |
| | | private String str2; |
| | | |
| | | @ApiModelProperty(value= "品项数") |
| | | @ApiModelProperty(value = "品项数") |
| | | private String str3; |
| | | |
| | | @ApiModelProperty(value= "客户名称") |
| | | @ApiModelProperty(value = "客户名称") |
| | | private String str4; |
| | | |
| | | @ApiModelProperty(value= "型号") |
| | | @ApiModelProperty(value = "型号") |
| | | private String str5; |
| | | |
| | | @ApiModelProperty(value= "批号") |
| | | @ApiModelProperty(value = "批号") |
| | | private String str6; |
| | | |
| | | @ApiModelProperty(value= "单据编号") |
| | | @ApiModelProperty(value = "单据编号") |
| | | private String str7; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str8; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str9; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str10; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str11; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str12; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str13; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str14; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str15; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str16; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str17; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str18; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str19; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str20; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str21; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str22; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String str23; |
| | | |
| | | @ApiModelProperty(value= "重量") |
| | | @ApiModelProperty(value = "重量") |
| | | private Double num1; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Double num2; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Double num3; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Double num4; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Double num5; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Double num6; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Date date1; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Short status; |
| | | |
| | | public MatCode() {} |
| | | public MatCode() { |
| | | } |
| | | |
| | | public MatCode(String barcode,String matName,String str1,String str2,String str3,String str4,String str5,String str6,String str7,String str8,String str9,String str10,String str11,String str12,String str13,String str14,String str15,String str16,String str17,String str18,String str19,String str20,String str21,String str22,String str23,Double num1,Double num2,Double num3,Double num4,Double num5,Double num6,Date date1,Long appeUser,Date appeTime,Long modiUser,Date modiTime,Short status) { |
| | | public MatCode(String barcode, String matName, String str1, String str2, String str3, String str4, String str5, String str6, String str7, String str8, String str9, String str10, String str11, String str12, String str13, String str14, String str15, String str16, String str17, String str18, String str19, String str20, String str21, String str22, String str23, Double num1, Double num2, Double num3, Double num4, Double num5, Double num6, Date date1, Long appeUser, Date appeTime, Long modiUser, Date modiTime, Short status) { |
| | | this.barcode = barcode; |
| | | this.matName = matName; |
| | | this.str1 = str1; |
| | |
| | | return date1; |
| | | } |
| | | |
| | | public String getDate1$(){ |
| | | if (Cools.isEmpty(this.date1)){ |
| | | public void setDate1(Date date1) { |
| | | this.date1 = date1; |
| | | } |
| | | |
| | | public String getDate1$() { |
| | | if (Cools.isEmpty(this.date1)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.date1); |
| | | } |
| | | |
| | | public void setDate1(Date date1) { |
| | | this.date1 = date1; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public Long getModiUser() { |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Short getStatus() { |
| | |
| | | /** |
| | | * 类别 |
| | | */ |
| | | @ApiModelProperty(value= "类别") |
| | | @ApiModelProperty(value = "类别") |
| | | @TableId(value = "whs_type", type = IdType.INPUT) |
| | | @TableField("whs_type") |
| | | private Integer whsType; |
| | |
| | | /** |
| | | * 当前工作号 |
| | | */ |
| | | @ApiModelProperty(value= "当前工作号") |
| | | @ApiModelProperty(value = "当前工作号") |
| | | @TableField("wrk_mk") |
| | | private String wrkMk; |
| | | |
| | | /** |
| | | * 当前排号 |
| | | */ |
| | | @ApiModelProperty(value= "当前排号") |
| | | @ApiModelProperty(value = "当前排号") |
| | | @TableField("current_row") |
| | | private Integer currentRow; |
| | | |
| | | /** |
| | | * 起始排号 |
| | | */ |
| | | @ApiModelProperty(value= "起始排号") |
| | | @ApiModelProperty(value = "起始排号") |
| | | @TableField("s_row") |
| | | private Integer sRow; |
| | | |
| | | /** |
| | | * 终止排号 |
| | | */ |
| | | @ApiModelProperty(value= "终止排号") |
| | | @ApiModelProperty(value = "终止排号") |
| | | @TableField("e_row") |
| | | private Integer eRow; |
| | | |
| | | /** |
| | | * 堆垛机数量 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机数量") |
| | | @ApiModelProperty(value = "堆垛机数量") |
| | | @TableField("crn_qty") |
| | | private Integer crnQty; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("limint_loc") |
| | | private Integer limintLoc; |
| | | |
| | | public RowLastno() {} |
| | | public RowLastno() { |
| | | } |
| | | |
| | | public RowLastno(String wrkMk,Integer currentRow,Integer sRow,Integer eRow,Integer crnQty,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Integer limintLoc) { |
| | | public RowLastno(String wrkMk, Integer currentRow, Integer sRow, Integer eRow, Integer crnQty, String memo, Long modiUser, Date modiTime, Long appeUser, Date appeTime, Integer limintLoc) { |
| | | this.wrkMk = wrkMk; |
| | | this.currentRow = currentRow; |
| | | this.sRow = sRow; |
| | |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public Integer getLimintLoc() { |
| | |
| | | /** |
| | | * 路径ID |
| | | */ |
| | | @ApiModelProperty(value= "路径ID") |
| | | @ApiModelProperty(value = "路径ID") |
| | | @TableId(value = "type_id", type = IdType.AUTO) |
| | | @TableField("type_id") |
| | | private Long typeId; |
| | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @ApiModelProperty(value = "入出库类型") |
| | | @TableId(value = "type_no", type = IdType.INPUT) |
| | | @TableField("type_no") |
| | | private Integer typeNo; |
| | |
| | | /** |
| | | * 作业类型 |
| | | */ |
| | | @ApiModelProperty(value= "作业类型") |
| | | @ApiModelProperty(value = "作业类型") |
| | | @TableField("type_desc") |
| | | private String typeDesc; |
| | | |
| | | /** |
| | | * 作业站点 |
| | | */ |
| | | @ApiModelProperty(value= "作业站点") |
| | | @ApiModelProperty(value = "作业站点") |
| | | @TableId(value = "stn_no", type = IdType.INPUT) |
| | | @TableField("stn_no") |
| | | private Integer stnNo; |
| | |
| | | /** |
| | | * 站点名称 |
| | | */ |
| | | @ApiModelProperty(value= "站点名称") |
| | | @ApiModelProperty(value = "站点名称") |
| | | @TableField("stn_desc") |
| | | private String stnDesc; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @ApiModelProperty(value = "堆垛机号") |
| | | @TableId(value = "crn_no", type = IdType.INPUT) |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | |
| | | /** |
| | | * 堆垛机站点 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机站点") |
| | | @ApiModelProperty(value = "堆垛机站点") |
| | | @TableField("crn_stn") |
| | | private Integer crnStn; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | public StaDesc() {} |
| | | public StaDesc() { |
| | | } |
| | | |
| | | public StaDesc(String typeDesc,String stnDesc,Integer crnStn,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { |
| | | public StaDesc(String typeDesc, String stnDesc, Integer crnStn, String memo, Long modiUser, Date modiTime, Long appeUser, Date appeTime) { |
| | | this.typeDesc = typeDesc; |
| | | this.stnDesc = stnDesc; |
| | | this.crnStn = crnStn; |
| | |
| | | return stnNo; |
| | | } |
| | | |
| | | public String getStnNo$(){ |
| | | public void setStnNo(Integer stnNo) { |
| | | this.stnNo = stnNo; |
| | | } |
| | | |
| | | public String getStnNo$() { |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.stnNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | if (!Cools.isEmpty(basDevp)) { |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setStnNo(Integer stnNo) { |
| | | this.stnNo = stnNo; |
| | | } |
| | | |
| | | public String getStnDesc() { |
| | |
| | | return crnNo; |
| | | } |
| | | |
| | | public String getCrnNo$(){ |
| | | public void setCrnNo(Integer crnNo) { |
| | | this.crnNo = crnNo; |
| | | } |
| | | |
| | | public String getCrnNo$() { |
| | | BasCrnpService service = SpringUtils.getBean(BasCrnpService.class); |
| | | BasCrnp basCrnp = service.selectById(this.crnNo); |
| | | if (!Cools.isEmpty(basCrnp)){ |
| | | if (!Cools.isEmpty(basCrnp)) { |
| | | return String.valueOf(basCrnp.getCrnNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setCrnNo(Integer crnNo) { |
| | | this.crnNo = crnNo; |
| | | } |
| | | |
| | | public Integer getCrnStn() { |
| | | return crnStn; |
| | | } |
| | | |
| | | public String getCrnStn$(){ |
| | | public void setCrnStn(Integer crnStn) { |
| | | this.crnStn = crnStn; |
| | | } |
| | | |
| | | public String getCrnStn$() { |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.crnStn); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | if (!Cools.isEmpty(basDevp)) { |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setCrnStn(Integer crnStn) { |
| | | this.crnStn = crnStn; |
| | | } |
| | | |
| | | public String getMemo() { |
| | |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getTypeNo$() { |
| | | if (Cools.isEmpty(this.typeNo)){ |
| | | if (Cools.isEmpty(this.typeNo)) { |
| | | return ""; |
| | | } |
| | | BasWrkIotypeService basWrkIotypeService = SpringUtils.getBean(BasWrkIotypeService.class); |
| | |
| | | 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 io.swagger.models.auth.In; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkIotypeService; |
| | | import com.zy.asrs.entity.BasWrkIotype; |
| | | 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 java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | 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.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wcs_task_wrk") |
| | |
| | | /** |
| | | * wms任务号 |
| | | */ |
| | | @ApiModelProperty(value= "wms任务号") |
| | | @ApiModelProperty(value = "wms任务号") |
| | | @TableId(value = "task_no", type = IdType.INPUT) |
| | | @TableField("task_no") |
| | | private String taskNo; |
| | |
| | | /** |
| | | * 任务状态 1: 接收 2: 派发 3: 完结 4: 取消 |
| | | */ |
| | | @ApiModelProperty(value= "任务状态 1: 接收 2: 派发 5: 完结 4: 取消 ") |
| | | @ApiModelProperty(value = "任务状态 1: 接收 2: 派发 5: 完结 4: 取消 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @ApiModelProperty(value = "任务号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 任务时间(接收时间) |
| | | */ |
| | | @ApiModelProperty(value= "任务时间(接收时间)") |
| | | @ApiModelProperty(value = "任务时间(接收时间)") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value= "任务类型") |
| | | @ApiModelProperty(value = "任务类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | @ApiModelProperty(value = "优先级") |
| | | @TableField("io_pri") |
| | | private Integer ioPri; |
| | | |
| | | /** |
| | | * 起点 |
| | | */ |
| | | @ApiModelProperty(value= "起点") |
| | | @ApiModelProperty(value = "起点") |
| | | @TableField("start_point") |
| | | private String startPoint; |
| | | |
| | | /** |
| | | * 终点 |
| | | */ |
| | | @ApiModelProperty(value= "终点") |
| | | @ApiModelProperty(value = "终点") |
| | | @TableField("target_point") |
| | | private String targetPoint; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 派发时间 |
| | | */ |
| | | @ApiModelProperty(value= "派发时间") |
| | | @ApiModelProperty(value = "派发时间") |
| | | @TableField("assign_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date assignTime; |
| | | |
| | | /** |
| | | * 执行时间 |
| | | */ |
| | | @ApiModelProperty(value= "执行时间") |
| | | @ApiModelProperty(value = "执行时间") |
| | | @TableField("execute_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date executeTime; |
| | | |
| | | /** |
| | | * 完结时间 |
| | | */ |
| | | @ApiModelProperty(value= "完结时间") |
| | | @ApiModelProperty(value = "完结时间") |
| | | @TableField("complete_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date completeTime; |
| | | |
| | | /** |
| | | * 取消时间 |
| | | */ |
| | | @ApiModelProperty(value= "取消时间") |
| | | @ApiModelProperty(value = "取消时间") |
| | | @TableField("cancel_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @ApiModelProperty(value = "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Integer wrkSts; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @ApiModelProperty(value = "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 指令执行步序 |
| | | */ |
| | | @ApiModelProperty(value= "指令执行步序") |
| | | @ApiModelProperty(value = "指令执行步序") |
| | | @TableField("command_step") |
| | | private Integer commandStep = 0; |
| | | |
| | |
| | | @TableField("mark_start") |
| | | private Integer markStart; |
| | | |
| | | public TaskWrk() {} |
| | | public TaskWrk() { |
| | | } |
| | | |
| | | public TaskWrk(String taskNo,Integer status,Integer wrkNo,Date createTime,Integer ioType,Integer ioPri,String startPoint,String targetPoint,Long modiUser,Date modiTime,String memo,String barcode,Date assignTime,Date executeTime,Date completeTime,Date cancelTime,Integer wrkSts) { |
| | | public TaskWrk(String taskNo, Integer status, Integer wrkNo, Date createTime, Integer ioType, Integer ioPri, String startPoint, String targetPoint, Long modiUser, Date modiTime, String memo, String barcode, Date assignTime, Date executeTime, Date completeTime, Date cancelTime, Integer wrkSts) { |
| | | this.taskNo = taskNo; |
| | | this.status = status; |
| | | this.wrkNo = wrkNo; |
| | |
| | | // null // 工作状态 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public String getStatus$() { |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status) { |
| | | case 1: |
| | | return "接收"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | public String getCreateTime$() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | public String getIoType$() { |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | if (!Cools.isEmpty(basWrkIotype)) { |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAssignTime$(){ |
| | | if (Cools.isEmpty(this.assignTime)){ |
| | | public String getAssignTime$() { |
| | | if (Cools.isEmpty(this.assignTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.assignTime); |
| | | } |
| | | |
| | | public String getExecuteTime$(){ |
| | | if (Cools.isEmpty(this.executeTime)){ |
| | | public String getExecuteTime$() { |
| | | if (Cools.isEmpty(this.executeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.executeTime); |
| | | } |
| | | |
| | | public String getCompleteTime$(){ |
| | | if (Cools.isEmpty(this.completeTime)){ |
| | | public String getCompleteTime$() { |
| | | if (Cools.isEmpty(this.completeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.completeTime); |
| | | } |
| | | |
| | | public String getCancelTime$(){ |
| | | if (Cools.isEmpty(this.cancelTime)){ |
| | | public String getCancelTime$() { |
| | | if (Cools.isEmpty(this.cancelTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.cancelTime); |
| | | } |
| | | |
| | | public String getWrkSts$(){ |
| | | public String getWrkSts$() { |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | if (!Cools.isEmpty(basWrkStatus)) { |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkIotypeService; |
| | | import com.zy.asrs.entity.BasWrkIotype; |
| | | 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 java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | 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.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wcs_task_wrk_log") |
| | |
| | | /** |
| | | * wms任务号 |
| | | */ |
| | | @ApiModelProperty(value= "wms任务号") |
| | | @ApiModelProperty(value = "wms任务号") |
| | | @TableField("task_no") |
| | | private String taskNo; |
| | | |
| | | /** |
| | | * 任务状态 1: 接收 2: 派发 3: 完结 4: 取消 |
| | | */ |
| | | @ApiModelProperty(value= "任务状态 1: 接收 2: 派发 3: 完结 4: 取消 ") |
| | | @ApiModelProperty(value = "任务状态 1: 接收 2: 派发 3: 完结 4: 取消 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @ApiModelProperty(value = "任务号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 任务时间(接收时间) |
| | | */ |
| | | @ApiModelProperty(value= "任务时间(接收时间)") |
| | | @ApiModelProperty(value = "任务时间(接收时间)") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value= "任务类型") |
| | | @ApiModelProperty(value = "任务类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | @ApiModelProperty(value = "优先级") |
| | | @TableField("io_pri") |
| | | private Double ioPri; |
| | | |
| | | /** |
| | | * 起点 |
| | | */ |
| | | @ApiModelProperty(value= "起点") |
| | | @ApiModelProperty(value = "起点") |
| | | @TableField("start_point") |
| | | private String startPoint; |
| | | |
| | | /** |
| | | * 终点 |
| | | */ |
| | | @ApiModelProperty(value= "终点") |
| | | @ApiModelProperty(value = "终点") |
| | | @TableField("target_point") |
| | | private String targetPoint; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 派发时间 |
| | | */ |
| | | @ApiModelProperty(value= "派发时间") |
| | | @ApiModelProperty(value = "派发时间") |
| | | @TableField("assign_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date assignTime; |
| | | |
| | | /** |
| | | * 执行时间 |
| | | */ |
| | | @ApiModelProperty(value= "执行时间") |
| | | @ApiModelProperty(value = "执行时间") |
| | | @TableField("execute_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date executeTime; |
| | | |
| | | /** |
| | | * 完结时间 |
| | | */ |
| | | @ApiModelProperty(value= "完结时间") |
| | | @ApiModelProperty(value = "完结时间") |
| | | @TableField("complete_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date completeTime; |
| | | |
| | | /** |
| | | * 取消时间 |
| | | */ |
| | | @ApiModelProperty(value= "取消时间") |
| | | @ApiModelProperty(value = "取消时间") |
| | | @TableField("cancel_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @ApiModelProperty(value = "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Integer wrkSts; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @ApiModelProperty(value = "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 指令执行步序 |
| | | */ |
| | | @ApiModelProperty(value= "指令执行步序") |
| | | @ApiModelProperty(value = "指令执行步序") |
| | | @TableField("command_step") |
| | | private Integer commandStep; |
| | | |
| | |
| | | @TableField("transfer_mark") |
| | | private Integer transferMark; |
| | | |
| | | public TaskWrkLog() {} |
| | | public TaskWrkLog() { |
| | | } |
| | | |
| | | public TaskWrkLog(String taskNo,Integer status,Integer wrkNo,Date createTime,Integer ioType,Double ioPri,String startPoint,String targetPoint,Long modiUser,Date modiTime,String memo,String barcode,Date assignTime,Date executeTime,Date completeTime,Date cancelTime,Integer wrkSts,Integer crnNo,Integer commandStep) { |
| | | public TaskWrkLog(String taskNo, Integer status, Integer wrkNo, Date createTime, Integer ioType, Double ioPri, String startPoint, String targetPoint, Long modiUser, Date modiTime, String memo, String barcode, Date assignTime, Date executeTime, Date completeTime, Date cancelTime, Integer wrkSts, Integer crnNo, Integer commandStep) { |
| | | this.taskNo = taskNo; |
| | | this.status = status; |
| | | this.wrkNo = wrkNo; |
| | |
| | | this.crnNo = crnNo; |
| | | this.commandStep = commandStep; |
| | | } |
| | | |
| | | public TaskWrkLog(TaskWrk taskWrk) { |
| | | this.taskNo = taskWrk.getTaskNo(); |
| | | this.status = taskWrk.getStatus(); |
| | | this.wrkNo = taskWrk.getWrkNo(); |
| | | this.createTime = taskWrk.getCreateTime(); |
| | | this.ioType = taskWrk.getIoType(); |
| | | if (Cools.isEmpty(taskWrk.getIoPri())){ |
| | | if (Cools.isEmpty(taskWrk.getIoPri())) { |
| | | taskWrk.setIoPri(1); |
| | | } |
| | | this.ioPri = (double)taskWrk.getIoPri(); |
| | | this.ioPri = (double) taskWrk.getIoPri(); |
| | | this.startPoint = taskWrk.getStartPoint(); |
| | | this.targetPoint = taskWrk.getTargetPoint(); |
| | | this.modiUser = taskWrk.getModiUser(); |
| | |
| | | |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public String getStatus$() { |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status) { |
| | | case 1: |
| | | return "接收"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | public String getCreateTime$() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | public String getIoType$() { |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | if (!Cools.isEmpty(basWrkIotype)) { |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAssignTime$(){ |
| | | if (Cools.isEmpty(this.assignTime)){ |
| | | public String getAssignTime$() { |
| | | if (Cools.isEmpty(this.assignTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.assignTime); |
| | | } |
| | | |
| | | public String getExecuteTime$(){ |
| | | if (Cools.isEmpty(this.executeTime)){ |
| | | public String getExecuteTime$() { |
| | | if (Cools.isEmpty(this.executeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.executeTime); |
| | | } |
| | | |
| | | public String getCompleteTime$(){ |
| | | if (Cools.isEmpty(this.completeTime)){ |
| | | public String getCompleteTime$() { |
| | | if (Cools.isEmpty(this.completeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.completeTime); |
| | | } |
| | | |
| | | public String getCancelTime$(){ |
| | | if (Cools.isEmpty(this.cancelTime)){ |
| | | public String getCancelTime$() { |
| | | if (Cools.isEmpty(this.cancelTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.cancelTime); |
| | | } |
| | | |
| | | public String getWrkSts$(){ |
| | | public String getWrkSts$() { |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | if (!Cools.isEmpty(basWrkStatus)) { |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkIotypeService; |
| | | import com.zy.asrs.service.BasWrkStatusService; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wcs_task_wrk_report") |
| | | public class TaskWrkReport implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * wms任务号 |
| | | */ |
| | | @ApiModelProperty(value = "wms任务号") |
| | | @TableId(value = "task_no", type = IdType.INPUT) |
| | | @TableField("task_no") |
| | | private String taskNo; |
| | | |
| | | /** |
| | | * 任务状态 1: 接收 2: 派发 3: 完结 4: 取消 |
| | | */ |
| | | @ApiModelProperty(value = "任务状态 1: 接收 2: 派发 5: 完结 4: 取消 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value = "任务号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 任务时间(接收时间) |
| | | */ |
| | | @ApiModelProperty(value = "任务时间(接收时间)") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value = "任务类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value = "优先级") |
| | | @TableField("io_pri") |
| | | private Integer ioPri; |
| | | |
| | | /** |
| | | * 起点 |
| | | */ |
| | | @ApiModelProperty(value = "起点") |
| | | @TableField("start_point") |
| | | private String startPoint; |
| | | |
| | | /** |
| | | * 终点 |
| | | */ |
| | | @ApiModelProperty(value = "终点") |
| | | @TableField("target_point") |
| | | private String targetPoint; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @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 = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 派发时间 |
| | | */ |
| | | @ApiModelProperty(value = "派发时间") |
| | | @TableField("assign_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date assignTime; |
| | | |
| | | /** |
| | | * 执行时间 |
| | | */ |
| | | @ApiModelProperty(value = "执行时间") |
| | | @TableField("execute_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date executeTime; |
| | | |
| | | /** |
| | | * 完结时间 |
| | | */ |
| | | @ApiModelProperty(value = "完结时间") |
| | | @TableField("complete_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date completeTime; |
| | | |
| | | /** |
| | | * 取消时间 |
| | | */ |
| | | @ApiModelProperty(value = "取消时间") |
| | | @TableField("cancel_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value = "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Integer wrkSts; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value = "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 指令执行步序 |
| | | */ |
| | | @ApiModelProperty(value = "指令执行步序") |
| | | @TableField("command_step") |
| | | private Integer commandStep = 0; |
| | | |
| | | @ApiModelProperty(value = "移库标记") |
| | | @TableField("transfer_mark") |
| | | private Integer transferMark; |
| | | |
| | | @ApiModelProperty(value = "原始起点") |
| | | @TableField("origin_start_point") |
| | | private String originStartPoint; |
| | | |
| | | @ApiModelProperty(value = "原始起点") |
| | | @TableField("origin_target_point") |
| | | private String originTargetPoint; |
| | | |
| | | @ApiModelProperty(value = "开始任务标记") |
| | | @TableField("mark_start") |
| | | private Integer markStart; |
| | | |
| | | public TaskWrkReport() { |
| | | } |
| | | |
| | | public TaskWrkReport(String taskNo, Integer status, Integer wrkNo, Date createTime, Integer ioType, Integer ioPri, String startPoint, String targetPoint, Long modiUser, Date modiTime, String memo, String barcode, Date assignTime, Date executeTime, Date completeTime, Date cancelTime, Integer wrkSts) { |
| | | this.taskNo = taskNo; |
| | | this.status = status; |
| | | this.wrkNo = wrkNo; |
| | | this.createTime = createTime; |
| | | this.ioType = ioType; |
| | | this.ioPri = ioPri; |
| | | this.startPoint = startPoint; |
| | | this.targetPoint = targetPoint; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.memo = memo; |
| | | this.barcode = barcode; |
| | | this.assignTime = assignTime; |
| | | this.executeTime = executeTime; |
| | | this.completeTime = completeTime; |
| | | this.cancelTime = cancelTime; |
| | | this.wrkSts = wrkSts; |
| | | } |
| | | |
| | | // TaskWrk taskWrk = new TaskWrk( |
| | | // null, // wms任务号[非空] |
| | | // null, // 任务状态 |
| | | // null, // 任务号 |
| | | // null, // 任务时间(接收时间) |
| | | // null, // 任务类型 |
| | | // null, // 优先级 |
| | | // 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 2: |
| | | return "派发"; |
| | | case 3: |
| | | return "步序完成"; |
| | | case 4: |
| | | return "取消"; |
| | | case 5: |
| | | 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 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 getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | 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 getAssignTime$() { |
| | | if (Cools.isEmpty(this.assignTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.assignTime); |
| | | } |
| | | |
| | | public String getExecuteTime$() { |
| | | if (Cools.isEmpty(this.executeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.executeTime); |
| | | } |
| | | |
| | | public String getCompleteTime$() { |
| | | if (Cools.isEmpty(this.completeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.completeTime); |
| | | } |
| | | |
| | | public String getCancelTime$() { |
| | | if (Cools.isEmpty(this.cancelTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.cancelTime); |
| | | } |
| | | |
| | | 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 getDurationTime() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | |
| | | Date endDate = new Date(); |
| | | if (!Cools.isEmpty(this.assignTime)) { |
| | | endDate = this.assignTime; |
| | | } |
| | | |
| | | //用来获取两个时间相差的毫秒数 |
| | | long l = this.createTime.getTime() - endDate.getTime(); |
| | | |
| | | //分别计算相差的天、小时、分、秒 |
| | | long day = l / (24 * 60 * 60 * 1000); |
| | | long hour = (l / (60 * 60 * 1000) - day * 24); |
| | | long min = ((l / (60 * 1000)) - day * 24 * 60 - hour * 60); |
| | | long s = (l / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60); |
| | | |
| | | return Math.abs(day) + "天" + Math.abs(hour) + "小时" + Math.abs(min) + "分" + Math.abs(s) + "秒"; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkIotypeService; |
| | | import com.zy.asrs.service.BasWrkStatusService; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("wcs_task_wrk_report_log") |
| | | public class TaskWrkReportLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * wms任务号 |
| | | */ |
| | | @ApiModelProperty(value = "wms任务号") |
| | | @TableId(value = "task_no", type = IdType.INPUT) |
| | | @TableField("task_no") |
| | | private String taskNo; |
| | | |
| | | /** |
| | | * 任务状态 1: 接收 2: 派发 3: 完结 4: 取消 |
| | | */ |
| | | @ApiModelProperty(value = "任务状态 1: 接收 2: 派发 5: 完结 4: 取消 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value = "任务号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 任务时间(接收时间) |
| | | */ |
| | | @ApiModelProperty(value = "任务时间(接收时间)") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value = "任务类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value = "优先级") |
| | | @TableField("io_pri") |
| | | private Integer ioPri; |
| | | |
| | | /** |
| | | * 起点 |
| | | */ |
| | | @ApiModelProperty(value = "起点") |
| | | @TableField("start_point") |
| | | private String startPoint; |
| | | |
| | | /** |
| | | * 终点 |
| | | */ |
| | | @ApiModelProperty(value = "终点") |
| | | @TableField("target_point") |
| | | private String targetPoint; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @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 = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 派发时间 |
| | | */ |
| | | @ApiModelProperty(value = "派发时间") |
| | | @TableField("assign_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date assignTime; |
| | | |
| | | /** |
| | | * 执行时间 |
| | | */ |
| | | @ApiModelProperty(value = "执行时间") |
| | | @TableField("execute_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date executeTime; |
| | | |
| | | /** |
| | | * 完结时间 |
| | | */ |
| | | @ApiModelProperty(value = "完结时间") |
| | | @TableField("complete_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date completeTime; |
| | | |
| | | /** |
| | | * 取消时间 |
| | | */ |
| | | @ApiModelProperty(value = "取消时间") |
| | | @TableField("cancel_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value = "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Integer wrkSts; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value = "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 指令执行步序 |
| | | */ |
| | | @ApiModelProperty(value = "指令执行步序") |
| | | @TableField("command_step") |
| | | private Integer commandStep = 0; |
| | | |
| | | @ApiModelProperty(value = "移库标记") |
| | | @TableField("transfer_mark") |
| | | private Integer transferMark; |
| | | |
| | | @ApiModelProperty(value = "原始起点") |
| | | @TableField("origin_start_point") |
| | | private String originStartPoint; |
| | | |
| | | @ApiModelProperty(value = "原始起点") |
| | | @TableField("origin_target_point") |
| | | private String originTargetPoint; |
| | | |
| | | @ApiModelProperty(value = "开始任务标记") |
| | | @TableField("mark_start") |
| | | private Integer markStart; |
| | | |
| | | public TaskWrkReportLog() { |
| | | } |
| | | |
| | | public TaskWrkReportLog(String taskNo, Integer status, Integer wrkNo, Date createTime, Integer ioType, Integer ioPri, String startPoint, String targetPoint, Long modiUser, Date modiTime, String memo, String barcode, Date assignTime, Date executeTime, Date completeTime, Date cancelTime, Integer wrkSts) { |
| | | this.taskNo = taskNo; |
| | | this.status = status; |
| | | this.wrkNo = wrkNo; |
| | | this.createTime = createTime; |
| | | this.ioType = ioType; |
| | | this.ioPri = ioPri; |
| | | this.startPoint = startPoint; |
| | | this.targetPoint = targetPoint; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.memo = memo; |
| | | this.barcode = barcode; |
| | | this.assignTime = assignTime; |
| | | this.executeTime = executeTime; |
| | | this.completeTime = completeTime; |
| | | this.cancelTime = cancelTime; |
| | | this.wrkSts = wrkSts; |
| | | } |
| | | |
| | | // TaskWrk taskWrk = new TaskWrk( |
| | | // null, // wms任务号[非空] |
| | | // null, // 任务状态 |
| | | // null, // 任务号 |
| | | // null, // 任务时间(接收时间) |
| | | // null, // 任务类型 |
| | | // null, // 优先级 |
| | | // 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 2: |
| | | return "派发"; |
| | | case 3: |
| | | return "步序完成"; |
| | | case 4: |
| | | return "取消"; |
| | | case 5: |
| | | 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 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 getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | 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 getAssignTime$() { |
| | | if (Cools.isEmpty(this.assignTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.assignTime); |
| | | } |
| | | |
| | | public String getExecuteTime$() { |
| | | if (Cools.isEmpty(this.executeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.executeTime); |
| | | } |
| | | |
| | | public String getCompleteTime$() { |
| | | if (Cools.isEmpty(this.completeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.completeTime); |
| | | } |
| | | |
| | | public String getCancelTime$() { |
| | | if (Cools.isEmpty(this.cancelTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.cancelTime); |
| | | } |
| | | |
| | | 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 getDurationTime() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | |
| | | Date endDate = new Date(); |
| | | if (!Cools.isEmpty(this.assignTime)) { |
| | | endDate = this.assignTime; |
| | | } |
| | | |
| | | //用来获取两个时间相差的毫秒数 |
| | | long l = this.createTime.getTime() - endDate.getTime(); |
| | | |
| | | //分别计算相差的天、小时、分、秒 |
| | | long day = l / (24 * 60 * 60 * 1000); |
| | | long hour = (l / (60 * 60 * 1000) - day * 24); |
| | | long min = ((l / (60 * 1000)) - day * 24 * 60 - hour * 60); |
| | | long s = (l / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60); |
| | | |
| | | return Math.abs(day) + "天" + Math.abs(hour) + "小时" + Math.abs(min) + "分" + Math.abs(s) + "秒"; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | //库位类型 |
| | | private Integer locType; |
| | | |
| | | public ToWmsDTO(String barcode, Integer stationCode, Integer locType){ |
| | | public ToWmsDTO(String barcode, Integer stationCode, Integer locType) { |
| | | this.BoxNo = barcode; |
| | | this.stationCode = stationCode; |
| | | this.locType = locType; |
| | | } |
| | | |
| | | public ToWmsDTO(){ |
| | | public ToWmsDTO() { |
| | | |
| | | } |
| | | } |
| | |
| | | * @date 2018年11月24日 |
| | | */ |
| | | public class ViewInOutBean { |
| | | private String ymd; |
| | | private String ymd; |
| | | private String source_sta_no; |
| | | private Long sto_qty; |
| | | private Long ret_qty; |
| | |
| | | private int pageSize; |
| | | private String begin_date; //查询开始日期 |
| | | private String end_date; //查询截止日期 |
| | | |
| | | public String getYmd() { |
| | | return ymd; |
| | | } |
| | | public void setYmd(String ymd) { |
| | | this.ymd = ymd; |
| | | } |
| | | public String getSource_sta_no() { |
| | | return source_sta_no; |
| | | } |
| | | public void setSource_sta_no(String source_sta_no) { |
| | | this.source_sta_no = source_sta_no; |
| | | } |
| | | public Long getSto_qty() { |
| | | return sto_qty; |
| | | } |
| | | public void setSto_qty(Long sto_qty) { |
| | | this.sto_qty = sto_qty; |
| | | } |
| | | public Long getRet_qty() { |
| | | return ret_qty; |
| | | } |
| | | public void setRet_qty(Long ret_qty) { |
| | | this.ret_qty = ret_qty; |
| | | } |
| | | public Long getTotal_qty() { |
| | | return total_qty; |
| | | } |
| | | public void setTotal_qty(Long total_qty) { |
| | | this.total_qty = total_qty; |
| | | } |
| | | public int getPageNumber() { |
| | | return pageNumber; |
| | | } |
| | | public void setPageNumber(int pageNumber) { |
| | | this.pageNumber = pageNumber; |
| | | } |
| | | public int getPageSize() { |
| | | return pageSize; |
| | | } |
| | | public void setPageSize(int pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | public String getBegin_date() { |
| | | return begin_date; |
| | | } |
| | | public void setBegin_date(String begin_date) { |
| | | this.begin_date = begin_date; |
| | | } |
| | | public String getEnd_date() { |
| | | return end_date; |
| | | } |
| | | public void setEnd_date(String end_date) { |
| | | this.end_date = end_date; |
| | | } |
| | | |
| | | public String getYmd() { |
| | | return ymd; |
| | | } |
| | | |
| | | public void setYmd(String ymd) { |
| | | this.ymd = ymd; |
| | | } |
| | | |
| | | public String getSource_sta_no() { |
| | | return source_sta_no; |
| | | } |
| | | |
| | | public void setSource_sta_no(String source_sta_no) { |
| | | this.source_sta_no = source_sta_no; |
| | | } |
| | | |
| | | public Long getSto_qty() { |
| | | return sto_qty; |
| | | } |
| | | |
| | | public void setSto_qty(Long sto_qty) { |
| | | this.sto_qty = sto_qty; |
| | | } |
| | | |
| | | public Long getRet_qty() { |
| | | return ret_qty; |
| | | } |
| | | |
| | | public void setRet_qty(Long ret_qty) { |
| | | this.ret_qty = ret_qty; |
| | | } |
| | | |
| | | public Long getTotal_qty() { |
| | | return total_qty; |
| | | } |
| | | |
| | | public void setTotal_qty(Long total_qty) { |
| | | this.total_qty = total_qty; |
| | | } |
| | | |
| | | public int getPageNumber() { |
| | | return pageNumber; |
| | | } |
| | | |
| | | public void setPageNumber(int pageNumber) { |
| | | this.pageNumber = pageNumber; |
| | | } |
| | | |
| | | public int getPageSize() { |
| | | return pageSize; |
| | | } |
| | | |
| | | public void setPageSize(int pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | |
| | | public String getBegin_date() { |
| | | return begin_date; |
| | | } |
| | | |
| | | public void setBegin_date(String begin_date) { |
| | | this.begin_date = begin_date; |
| | | } |
| | | |
| | | public String getEnd_date() { |
| | | return end_date; |
| | | } |
| | | |
| | | public void setEnd_date(String end_date) { |
| | | this.end_date = end_date; |
| | | } |
| | | } |
| | |
| | | |
| | | public void setLocSts(String locSts) { |
| | | this.locSts = locSts; |
| | | switch (locSts){ |
| | | switch (locSts) { |
| | | case "D": |
| | | this.bgc = "#00B271"; |
| | | this.color = "#fff"; |
| | |
| | | @Data |
| | | public class ViewStayTimeBean { |
| | | |
| | | private int pageNumber; |
| | | private int pageSize; |
| | | private int pageNumber; |
| | | private int pageSize; |
| | | |
| | | private int stay_time; |
| | | private int stay_time; |
| | | |
| | | private String begin_date; |
| | | private String end_date; |
| | | private String begin_date; |
| | | private String end_date; |
| | | |
| | | private Integer row; |
| | | private Integer row; |
| | | |
| | | @ApiModelProperty(value= "库位号") |
| | | private String loc_no; |
| | | @ApiModelProperty(value = "库位号") |
| | | private String loc_no; |
| | | |
| | | @ApiModelProperty(value= "托盘条码") |
| | | private String zpallet; |
| | | @ApiModelProperty(value = "托盘条码") |
| | | private String zpallet; |
| | | |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | @ApiModelProperty(value = "数量") |
| | | private Double anfme; |
| | | |
| | | @ApiModelProperty(value= "商品编号") |
| | | private String matnr; |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String matnr; |
| | | |
| | | @ApiModelProperty(value= "商品名称") |
| | | private String maktx; |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String maktx; |
| | | |
| | | @ApiModelProperty(value= "批号") |
| | | private String batch; |
| | | @ApiModelProperty(value = "批号") |
| | | private String batch; |
| | | |
| | | @ApiModelProperty(value= "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | @ApiModelProperty(value = "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value= "规格") |
| | | private String specs; |
| | | @ApiModelProperty(value = "规格") |
| | | private String specs; |
| | | |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | @ApiModelProperty(value = "型号") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(value= "颜色") |
| | | private String color; |
| | | @ApiModelProperty(value = "颜色") |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value= "品牌") |
| | | private String brand; |
| | | @ApiModelProperty(value = "品牌") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value= "单位") |
| | | private String unit; |
| | | @ApiModelProperty(value = "单位") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty(value= "单价") |
| | | private Double price; |
| | | @ApiModelProperty(value = "单价") |
| | | private Double price; |
| | | |
| | | @ApiModelProperty(value= "sku") |
| | | private String sku; |
| | | @ApiModelProperty(value = "sku") |
| | | private String sku; |
| | | |
| | | @ApiModelProperty(value= "单位量") |
| | | private Double units; |
| | | @ApiModelProperty(value = "单位量") |
| | | private Double units; |
| | | |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty(value= "产地") |
| | | private String origin; |
| | | @ApiModelProperty(value = "产地") |
| | | private String origin; |
| | | |
| | | @ApiModelProperty(value= "厂家") |
| | | private String manu; |
| | | @ApiModelProperty(value = "厂家") |
| | | private String manu; |
| | | |
| | | @ApiModelProperty(value= "生产日期") |
| | | private String manu_date; |
| | | @ApiModelProperty(value = "生产日期") |
| | | private String manu_date; |
| | | |
| | | @ApiModelProperty(value= "品项数") |
| | | private String item_num; |
| | | @ApiModelProperty(value = "品项数") |
| | | private String item_num; |
| | | |
| | | @ApiModelProperty(value= "安全库存量") |
| | | private Double safe_qty; |
| | | @ApiModelProperty(value = "安全库存量") |
| | | private Double safe_qty; |
| | | |
| | | @ApiModelProperty(value= "重量") |
| | | private Double weight; |
| | | @ApiModelProperty(value = "重量") |
| | | private Double weight; |
| | | |
| | | @ApiModelProperty(value= "长度") |
| | | private Double length; |
| | | @ApiModelProperty(value = "长度") |
| | | private Double length; |
| | | |
| | | @ApiModelProperty(value= "体积") |
| | | private Double volume; |
| | | @ApiModelProperty(value = "体积") |
| | | private Double volume; |
| | | |
| | | @ApiModelProperty(value= "三方编码") |
| | | private String three_code; |
| | | @ApiModelProperty(value = "三方编码") |
| | | private String three_code; |
| | | |
| | | @ApiModelProperty(value= "供应商") |
| | | private String supp; |
| | | @ApiModelProperty(value = "供应商") |
| | | private String supp; |
| | | |
| | | @ApiModelProperty(value= "供应商编码") |
| | | private String supp_code; |
| | | @ApiModelProperty(value = "供应商编码") |
| | | private String supp_code; |
| | | |
| | | @ApiModelProperty(value= "是否批次 1: 是 0: 否 ") |
| | | private Integer be_batch; |
| | | @ApiModelProperty(value = "是否批次 1: 是 0: 否 ") |
| | | private Integer be_batch; |
| | | |
| | | @ApiModelProperty(value= "保质期") |
| | | private String dead_time; |
| | | @ApiModelProperty(value = "保质期") |
| | | private String dead_time; |
| | | |
| | | @ApiModelProperty(value= "预警天数") |
| | | private Integer dead_warn; |
| | | @ApiModelProperty(value = "预警天数") |
| | | private Integer dead_warn; |
| | | |
| | | @ApiModelProperty(value= "制购 1: 制造 2: 采购 3: 外协 ") |
| | | private Integer source; |
| | | @ApiModelProperty(value = "制购 1: 制造 2: 采购 3: 外协 ") |
| | | private Integer source; |
| | | |
| | | @ApiModelProperty(value= "要求检验 1: 是 0: 否 ") |
| | | private Integer inspect; |
| | | @ApiModelProperty(value = "要求检验 1: 是 0: 否 ") |
| | | private Integer inspect; |
| | | |
| | | @ApiModelProperty(value= "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | @ApiModelProperty(value = "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long modi_user; |
| | | @ApiModelProperty(value = "修改人员") |
| | | private Long modi_user; |
| | | |
| | | @ApiModelProperty(value= "修改时间") |
| | | private Date modi_time; |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date modi_time; |
| | | |
| | | @ApiModelProperty(value= "创建者") |
| | | private Long appe_user; |
| | | @ApiModelProperty(value = "创建者") |
| | | private Long appe_user; |
| | | |
| | | @ApiModelProperty(value= "添加时间") |
| | | private Date appe_time; |
| | | @ApiModelProperty(value = "添加时间") |
| | | private Date appe_time; |
| | | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modi_user); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modi_user); |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modi_time)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modi_time); |
| | | } |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modi_time)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modi_time); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appe_user); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appe_user); |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appe_time)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appe_time); |
| | | } |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appe_time)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appe_time); |
| | | } |
| | | |
| | | } |
| | |
| | | * @date 2018年11月23日 |
| | | */ |
| | | public class ViewStockUseBean { |
| | | private String row1; //钢架号 |
| | | private Long total_qty; //库位总数 |
| | | private Long full_qty; //在库数量 |
| | | private Long null_qty; //空库位 |
| | | private String row1; //钢架号 |
| | | private Long total_qty; //库位总数 |
| | | private Long full_qty; //在库数量 |
| | | private Long null_qty; //空库位 |
| | | private Long forbid_qty; //禁用库位 |
| | | private Long empty_qty; //空容器 |
| | | private Long empty_qty; //空容器 |
| | | private String full_rate; //在库率 |
| | | private String occ_rate; //使用率 |
| | | private int pageNumber; |
| | | private int pageSize; |
| | | |
| | | public String getRow1() { |
| | | return row1; |
| | | } |
| | | public void setRow1(String row1) { |
| | | this.row1 = row1; |
| | | } |
| | | public Long getTotal_qty() { |
| | | return total_qty; |
| | | } |
| | | public void setTotal_qty(Long total_qty) { |
| | | this.total_qty = total_qty; |
| | | } |
| | | public Long getFull_qty() { |
| | | return full_qty; |
| | | } |
| | | public void setFull_qty(Long full_qty) { |
| | | this.full_qty = full_qty; |
| | | } |
| | | public Long getNull_qty() { |
| | | return null_qty; |
| | | } |
| | | public void setNull_qty(Long null_qty) { |
| | | this.null_qty = null_qty; |
| | | } |
| | | public Long getForbid_qty() { |
| | | return forbid_qty; |
| | | } |
| | | public void setForbid_qty(Long forbid_qty) { |
| | | this.forbid_qty = forbid_qty; |
| | | } |
| | | public Long getEmpty_qty() { |
| | | return empty_qty; |
| | | } |
| | | public void setEmpty_qty(Long empty_qty) { |
| | | this.empty_qty = empty_qty; |
| | | } |
| | | public String getFull_rate() { |
| | | return full_rate; |
| | | } |
| | | public void setFull_rate(String full_rate) { |
| | | this.full_rate = full_rate; |
| | | } |
| | | public String getOcc_rate() { |
| | | return occ_rate; |
| | | } |
| | | public void setOcc_rate(String occ_rate) { |
| | | this.occ_rate = occ_rate; |
| | | } |
| | | public int getPageNumber() { |
| | | return pageNumber; |
| | | } |
| | | public void setPageNumber(int pageNumber) { |
| | | this.pageNumber = pageNumber; |
| | | } |
| | | public int getPageSize() { |
| | | return pageSize; |
| | | } |
| | | public void setPageSize(int pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | |
| | | public String getRow1() { |
| | | return row1; |
| | | } |
| | | |
| | | public void setRow1(String row1) { |
| | | this.row1 = row1; |
| | | } |
| | | |
| | | public Long getTotal_qty() { |
| | | return total_qty; |
| | | } |
| | | |
| | | public void setTotal_qty(Long total_qty) { |
| | | this.total_qty = total_qty; |
| | | } |
| | | |
| | | public Long getFull_qty() { |
| | | return full_qty; |
| | | } |
| | | |
| | | public void setFull_qty(Long full_qty) { |
| | | this.full_qty = full_qty; |
| | | } |
| | | |
| | | public Long getNull_qty() { |
| | | return null_qty; |
| | | } |
| | | |
| | | public void setNull_qty(Long null_qty) { |
| | | this.null_qty = null_qty; |
| | | } |
| | | |
| | | public Long getForbid_qty() { |
| | | return forbid_qty; |
| | | } |
| | | |
| | | public void setForbid_qty(Long forbid_qty) { |
| | | this.forbid_qty = forbid_qty; |
| | | } |
| | | |
| | | public Long getEmpty_qty() { |
| | | return empty_qty; |
| | | } |
| | | |
| | | public void setEmpty_qty(Long empty_qty) { |
| | | this.empty_qty = empty_qty; |
| | | } |
| | | |
| | | public String getFull_rate() { |
| | | return full_rate; |
| | | } |
| | | |
| | | public void setFull_rate(String full_rate) { |
| | | this.full_rate = full_rate; |
| | | } |
| | | |
| | | public String getOcc_rate() { |
| | | return occ_rate; |
| | | } |
| | | |
| | | public void setOcc_rate(String occ_rate) { |
| | | this.occ_rate = occ_rate; |
| | | } |
| | | |
| | | public int getPageNumber() { |
| | | return pageNumber; |
| | | } |
| | | |
| | | public void setPageNumber(int pageNumber) { |
| | | this.pageNumber = pageNumber; |
| | | } |
| | | |
| | | public int getPageSize() { |
| | | return pageSize; |
| | | } |
| | | |
| | | public void setPageSize(int pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | |
| | | } |
| | |
| | | public class ViewWorkInBean { |
| | | |
| | | |
| | | private int pageNumber; |
| | | private int pageSize; |
| | | private int pageNumber; |
| | | private int pageSize; |
| | | |
| | | private int stay_time; |
| | | private int stay_time; |
| | | |
| | | private String begin_date; |
| | | private String end_date; |
| | | private String query_date; |
| | | private String begin_date; |
| | | private String end_date; |
| | | private String query_date; |
| | | |
| | | private Integer row; |
| | | private Integer row; |
| | | |
| | | private String crn_str_time; |
| | | private String crn_end_time; |
| | | private String crn_str_time; |
| | | private String crn_end_time; |
| | | |
| | | @ApiModelProperty(value= "工作号") |
| | | private Integer wrk_no; |
| | | @ApiModelProperty(value = "工作号") |
| | | private Integer wrk_no; |
| | | |
| | | @ApiModelProperty(value= "工作时间") |
| | | private Date io_time; |
| | | @ApiModelProperty(value = "工作时间") |
| | | private Date io_time; |
| | | |
| | | @ApiModelProperty(value= "库位号") |
| | | private String loc_no; |
| | | @ApiModelProperty(value = "库位号") |
| | | private String loc_no; |
| | | |
| | | @ApiModelProperty(value= "托盘条码") |
| | | private String zpallet; |
| | | @ApiModelProperty(value = "托盘条码") |
| | | private String zpallet; |
| | | |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | @ApiModelProperty(value = "数量") |
| | | private Double anfme; |
| | | |
| | | @ApiModelProperty(value= "商品编号") |
| | | private String matnr; |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String matnr; |
| | | |
| | | @ApiModelProperty(value= "商品名称") |
| | | private String maktx; |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String maktx; |
| | | |
| | | @ApiModelProperty(value= "批号") |
| | | private String batch; |
| | | @ApiModelProperty(value = "批号") |
| | | private String batch; |
| | | |
| | | @ApiModelProperty(value= "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | @ApiModelProperty(value = "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value= "规格") |
| | | private String specs; |
| | | @ApiModelProperty(value = "规格") |
| | | private String specs; |
| | | |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | @ApiModelProperty(value = "型号") |
| | | private String model; |
| | | |
| | | @ApiModelProperty(value= "颜色") |
| | | private String color; |
| | | @ApiModelProperty(value = "颜色") |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value= "品牌") |
| | | private String brand; |
| | | @ApiModelProperty(value = "品牌") |
| | | private String brand; |
| | | |
| | | @ApiModelProperty(value= "单位") |
| | | private String unit; |
| | | @ApiModelProperty(value = "单位") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty(value= "单价") |
| | | private Double price; |
| | | @ApiModelProperty(value = "单价") |
| | | private Double price; |
| | | |
| | | @ApiModelProperty(value= "sku") |
| | | private String sku; |
| | | @ApiModelProperty(value = "sku") |
| | | private String sku; |
| | | |
| | | @ApiModelProperty(value= "单位量") |
| | | private Double units; |
| | | @ApiModelProperty(value = "单位量") |
| | | private Double units; |
| | | |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty(value= "产地") |
| | | private String origin; |
| | | @ApiModelProperty(value = "产地") |
| | | private String origin; |
| | | |
| | | @ApiModelProperty(value= "厂家") |
| | | private String manu; |
| | | @ApiModelProperty(value = "厂家") |
| | | private String manu; |
| | | |
| | | @ApiModelProperty(value= "生产日期") |
| | | private String manu_date; |
| | | @ApiModelProperty(value = "生产日期") |
| | | private String manu_date; |
| | | |
| | | @ApiModelProperty(value= "品项数") |
| | | private String item_num; |
| | | @ApiModelProperty(value = "品项数") |
| | | private String item_num; |
| | | |
| | | @ApiModelProperty(value= "安全库存量") |
| | | private Double safe_qty; |
| | | @ApiModelProperty(value = "安全库存量") |
| | | private Double safe_qty; |
| | | |
| | | @ApiModelProperty(value= "重量") |
| | | private Double weight; |
| | | @ApiModelProperty(value = "重量") |
| | | private Double weight; |
| | | |
| | | @ApiModelProperty(value= "长度") |
| | | private Double length; |
| | | @ApiModelProperty(value = "长度") |
| | | private Double length; |
| | | |
| | | @ApiModelProperty(value= "体积") |
| | | private Double volume; |
| | | @ApiModelProperty(value = "体积") |
| | | private Double volume; |
| | | |
| | | @ApiModelProperty(value= "三方编码") |
| | | private String three_code; |
| | | @ApiModelProperty(value = "三方编码") |
| | | private String three_code; |
| | | |
| | | @ApiModelProperty(value= "供应商") |
| | | private String supp; |
| | | @ApiModelProperty(value = "供应商") |
| | | private String supp; |
| | | |
| | | @ApiModelProperty(value= "供应商编码") |
| | | private String supp_code; |
| | | @ApiModelProperty(value = "供应商编码") |
| | | private String supp_code; |
| | | |
| | | @ApiModelProperty(value= "是否批次 1: 是 0: 否 ") |
| | | private Integer be_batch; |
| | | @ApiModelProperty(value = "是否批次 1: 是 0: 否 ") |
| | | private Integer be_batch; |
| | | |
| | | @ApiModelProperty(value= "保质期") |
| | | private String dead_time; |
| | | @ApiModelProperty(value = "保质期") |
| | | private String dead_time; |
| | | |
| | | @ApiModelProperty(value= "预警天数") |
| | | private Integer dead_warn; |
| | | @ApiModelProperty(value = "预警天数") |
| | | private Integer dead_warn; |
| | | |
| | | @ApiModelProperty(value= "制购 1: 制造 2: 采购 3: 外协 ") |
| | | private Integer source; |
| | | @ApiModelProperty(value = "制购 1: 制造 2: 采购 3: 外协 ") |
| | | private Integer source; |
| | | |
| | | @ApiModelProperty(value= "要求检验 1: 是 0: 否 ") |
| | | private Integer inspect; |
| | | @ApiModelProperty(value = "要求检验 1: 是 0: 否 ") |
| | | private Integer inspect; |
| | | |
| | | @ApiModelProperty(value= "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | @ApiModelProperty(value = "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long modi_user; |
| | | @ApiModelProperty(value = "修改人员") |
| | | private Long modi_user; |
| | | |
| | | @ApiModelProperty(value= "修改时间") |
| | | private Object modi_time; |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Object modi_time; |
| | | |
| | | @ApiModelProperty(value= "创建者") |
| | | private Long appe_user; |
| | | @ApiModelProperty(value = "创建者") |
| | | private Long appe_user; |
| | | |
| | | @ApiModelProperty(value= "添加时间") |
| | | private Object appe_time; |
| | | @ApiModelProperty(value = "添加时间") |
| | | private Object appe_time; |
| | | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modi_user); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modi_user); |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appe_user); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appe_user); |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.io_time)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.io_time); |
| | | } |
| | | public String getIoTime$() { |
| | | if (Cools.isEmpty(this.io_time)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.io_time); |
| | | } |
| | | |
| | | public void setQuery_date(String query_date) { |
| | | this.query_date = query_date; |
| | | if (query_date.contains(" - ")) { |
| | | String[] dates = query_date.split(" - "); |
| | | this.begin_date = dates[0]; |
| | | this.end_date = dates[1]; |
| | | public void setQuery_date(String query_date) { |
| | | this.query_date = query_date; |
| | | if (query_date.contains(" - ")) { |
| | | String[] dates = query_date.split(" - "); |
| | | this.begin_date = dates[0]; |
| | | this.end_date = dates[1]; |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * 物料 |
| | | */ |
| | | @ApiModelProperty(value= "商品编号") |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 物料描述 |
| | | */ |
| | | @ApiModelProperty(value= "商品名称") |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String maktx; |
| | | |
| | | |
| | | /** |
| | | * 仓库号 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | @ApiModelProperty(value = "规格") |
| | | private String lgnum; |
| | | |
| | | /** |
| | | * 仓库号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | @ApiModelProperty(value = "型号") |
| | | private String type; |
| | | |
| | | /** |
| | | * 仓库号 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String color; |
| | | |
| | | /** |
| | | * 仓库号 |
| | | */ |
| | | @ApiModelProperty(value= "批号") |
| | | @ApiModelProperty(value = "批号") |
| | | private String supplier; |
| | | |
| | | /** |
| | | * 仓库号 |
| | | */ |
| | | @ApiModelProperty(value= "单据编号") |
| | | @ApiModelProperty(value = "单据编号") |
| | | private String warehouse; |
| | | |
| | | /** |
| | | * 仓库号 |
| | | */ |
| | | @ApiModelProperty(value= "品项数") |
| | | @ApiModelProperty(value = "品项数") |
| | | private String brand; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | @ApiModelProperty(value = "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | @ApiModelProperty(value = "单位") |
| | | private String altme; |
| | | |
| | | /** |
| | | * 托盘条码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘条码") |
| | | @ApiModelProperty(value = "托盘条码") |
| | | private String zpallet; |
| | | |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @ApiModelProperty(value= "客户名称") |
| | | @ApiModelProperty(value = "客户名称") |
| | | private String bname; |
| | | |
| | | @ApiModelProperty(value= "库位号") |
| | | @ApiModelProperty(value = "库位号") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | @ApiModelProperty(value= "状态") |
| | | @ApiModelProperty(value = "状态") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value= "入出状态") |
| | | @ApiModelProperty(value = "入出状态") |
| | | @TableField("io_status") |
| | | private String ioStatus; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | @ApiModelProperty(value= "单据编号") |
| | | @ApiModelProperty(value = "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value= "批号") |
| | | @ApiModelProperty(value = "批号") |
| | | private String batch; |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @ApiModelProperty(value = "工作时间") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | @ApiModelProperty(value = "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 托盘条码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘条码") |
| | | @ApiModelProperty(value = "托盘条码") |
| | | private String zpallet; |
| | | |
| | | /** |
| | | * 物料 |
| | | */ |
| | | @ApiModelProperty(value= "商品编号") |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 物料描述 |
| | | */ |
| | | @ApiModelProperty(value= "商品名称") |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 批号 |
| | | */ |
| | | @ApiModelProperty(value= "批号") |
| | | @ApiModelProperty(value = "批号") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 单据编号 |
| | | */ |
| | | @ApiModelProperty(value= "单据编号") |
| | | @ApiModelProperty(value = "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | @ApiModelProperty(value = "规格") |
| | | private String specs; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | @ApiModelProperty(value = "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @ApiModelProperty(value= "颜色") |
| | | @ApiModelProperty(value = "颜色") |
| | | private String color; |
| | | |
| | | /** |
| | | * 品牌 |
| | | */ |
| | | @ApiModelProperty(value= "品牌") |
| | | @ApiModelProperty(value = "品牌") |
| | | private String brand; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | @ApiModelProperty(value = "单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 单价 |
| | | */ |
| | | @ApiModelProperty(value= "单价") |
| | | @ApiModelProperty(value = "单价") |
| | | private Double price; |
| | | |
| | | /** |
| | | * sku |
| | | */ |
| | | @ApiModelProperty(value= "sku") |
| | | @ApiModelProperty(value = "sku") |
| | | private String sku; |
| | | |
| | | /** |
| | | * 单位量 |
| | | */ |
| | | @ApiModelProperty(value= "单位量") |
| | | @ApiModelProperty(value = "单位量") |
| | | private Double units; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 产地 |
| | | */ |
| | | @ApiModelProperty(value= "产地") |
| | | @ApiModelProperty(value = "产地") |
| | | private String origin; |
| | | |
| | | /** |
| | | * 厂家 |
| | | */ |
| | | @ApiModelProperty(value= "厂家") |
| | | @ApiModelProperty(value = "厂家") |
| | | private String manu; |
| | | |
| | | /** |
| | | * 生产日期 |
| | | */ |
| | | @ApiModelProperty(value= "生产日期") |
| | | @ApiModelProperty(value = "生产日期") |
| | | @TableField("manu_date") |
| | | private String manuDate; |
| | | |
| | | /** |
| | | * 安全库存量 |
| | | */ |
| | | @ApiModelProperty(value= "安全库存量") |
| | | @ApiModelProperty(value = "安全库存量") |
| | | @TableField("safe_qty") |
| | | private Double safeQty; |
| | | |
| | | /** |
| | | * 重量 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | @ApiModelProperty(value = "重量") |
| | | private Double weight; |
| | | |
| | | /** |
| | | * 长度 |
| | | */ |
| | | @ApiModelProperty(value= "长度") |
| | | @ApiModelProperty(value = "长度") |
| | | private Double length; |
| | | |
| | | /** |
| | | * 体积 |
| | | */ |
| | | @ApiModelProperty(value= "体积") |
| | | @ApiModelProperty(value = "体积") |
| | | private Double volume; |
| | | |
| | | /** |
| | | * 三方编码 |
| | | */ |
| | | @ApiModelProperty(value= "三方编码") |
| | | @ApiModelProperty(value = "三方编码") |
| | | @TableField("three_code") |
| | | private String threeCode; |
| | | |
| | | /** |
| | | * 供应商 |
| | | */ |
| | | @ApiModelProperty(value= "供应商") |
| | | @ApiModelProperty(value = "供应商") |
| | | private String supp; |
| | | |
| | | /** |
| | | * 供应商编码 |
| | | */ |
| | | @ApiModelProperty(value= "供应商编码") |
| | | @ApiModelProperty(value = "供应商编码") |
| | | @TableField("supp_code") |
| | | private String suppCode; |
| | | |
| | | /** |
| | | * 是否批次 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否批次 1: 是 0: 否 ") |
| | | @ApiModelProperty(value = "是否批次 1: 是 0: 否 ") |
| | | @TableField("be_batch") |
| | | private Integer beBatch; |
| | | |
| | | /** |
| | | * 保质期 |
| | | */ |
| | | @ApiModelProperty(value= "保质期") |
| | | @ApiModelProperty(value = "保质期") |
| | | @TableField("dead_time") |
| | | private String deadTime; |
| | | |
| | | /** |
| | | * 预警天数 |
| | | */ |
| | | @ApiModelProperty(value= "预警天数") |
| | | @ApiModelProperty(value = "预警天数") |
| | | @TableField("dead_warn") |
| | | private Integer deadWarn; |
| | | |
| | | /** |
| | | * 制购 1: 制造 2: 采购 3: 外协 |
| | | */ |
| | | @ApiModelProperty(value= "制购 1: 制造 2: 采购 3: 外协 ") |
| | | @ApiModelProperty(value = "制购 1: 制造 2: 采购 3: 外协 ") |
| | | private Integer source; |
| | | |
| | | /** |
| | | * 要求检验 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "要求检验 1: 是 0: 否 ") |
| | | @ApiModelProperty(value = "要求检验 1: 是 0: 否 ") |
| | | private Integer inspect; |
| | | |
| | | /** |
| | | * 危险品 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "危险品 1: 是 0: 否 ") |
| | | @ApiModelProperty(value = "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | public String getIoTime$() { |
| | | if (Cools.isEmpty(this.ioTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | | switch (this.beBatch){ |
| | | public String getBeBatch$() { |
| | | if (null == this.beBatch) { |
| | | return null; |
| | | } |
| | | switch (this.beBatch) { |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getSource$(){ |
| | | if (null == this.source){ return null; } |
| | | switch (this.source){ |
| | | public String getSource$() { |
| | | if (null == this.source) { |
| | | return null; |
| | | } |
| | | switch (this.source) { |
| | | case 1: |
| | | return "制造"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getInspect$(){ |
| | | if (null == this.inspect){ return null; } |
| | | switch (this.inspect){ |
| | | public String getInspect$() { |
| | | if (null == this.inspect) { |
| | | return null; |
| | | } |
| | | switch (this.inspect) { |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getDanger$(){ |
| | | if (null == this.danger){ return null; } |
| | | switch (this.danger){ |
| | | public String getDanger$() { |
| | | if (null == this.danger) { |
| | | return null; |
| | | } |
| | | switch (this.danger) { |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @ApiModelProperty(value = "工作时间") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | @ApiModelProperty(value = "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 托盘条码 |
| | | */ |
| | | @ApiModelProperty(value= "托盘条码") |
| | | @ApiModelProperty(value = "托盘条码") |
| | | private String zpallet; |
| | | |
| | | /** |
| | | * 物料 |
| | | */ |
| | | @ApiModelProperty(value= "商品编号") |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 物料描述 |
| | | */ |
| | | @ApiModelProperty(value= "商品名称") |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 批号 |
| | | */ |
| | | @ApiModelProperty(value= "批号") |
| | | @ApiModelProperty(value = "批号") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 单据编号 |
| | | */ |
| | | @ApiModelProperty(value= "单据编号") |
| | | @ApiModelProperty(value = "单据编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | @ApiModelProperty(value = "规格") |
| | | private String specs; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | @ApiModelProperty(value = "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @ApiModelProperty(value= "颜色") |
| | | @ApiModelProperty(value = "颜色") |
| | | private String color; |
| | | |
| | | /** |
| | | * 品牌 |
| | | */ |
| | | @ApiModelProperty(value= "品牌") |
| | | @ApiModelProperty(value = "品牌") |
| | | private String brand; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | @ApiModelProperty(value= "单位") |
| | | @ApiModelProperty(value = "单位") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 单价 |
| | | */ |
| | | @ApiModelProperty(value= "单价") |
| | | @ApiModelProperty(value = "单价") |
| | | private Double price; |
| | | |
| | | /** |
| | | * sku |
| | | */ |
| | | @ApiModelProperty(value= "sku") |
| | | @ApiModelProperty(value = "sku") |
| | | private String sku; |
| | | |
| | | /** |
| | | * 单位量 |
| | | */ |
| | | @ApiModelProperty(value= "单位量") |
| | | @ApiModelProperty(value = "单位量") |
| | | private Double units; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 产地 |
| | | */ |
| | | @ApiModelProperty(value= "产地") |
| | | @ApiModelProperty(value = "产地") |
| | | private String origin; |
| | | |
| | | /** |
| | | * 安全库存量 |
| | | */ |
| | | @ApiModelProperty(value= "安全库存量") |
| | | @ApiModelProperty(value = "安全库存量") |
| | | @TableField("safe_qty") |
| | | private Double safeQty; |
| | | |
| | | /** |
| | | * 重量 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | @ApiModelProperty(value = "重量") |
| | | private Double weight; |
| | | |
| | | /** |
| | | * 长度 |
| | | */ |
| | | @ApiModelProperty(value= "长度") |
| | | @ApiModelProperty(value = "长度") |
| | | private Double length; |
| | | |
| | | /** |
| | | * 体积 |
| | | */ |
| | | @ApiModelProperty(value= "体积") |
| | | @ApiModelProperty(value = "体积") |
| | | private Double volume; |
| | | |
| | | /** |
| | | * 三方编码 |
| | | */ |
| | | @ApiModelProperty(value= "三方编码") |
| | | @ApiModelProperty(value = "三方编码") |
| | | @TableField("three_code") |
| | | private String threeCode; |
| | | |
| | | /** |
| | | * 供应商 |
| | | */ |
| | | @ApiModelProperty(value= "供应商") |
| | | @ApiModelProperty(value = "供应商") |
| | | private String supp; |
| | | |
| | | /** |
| | | * 供应商编码 |
| | | */ |
| | | @ApiModelProperty(value= "供应商编码") |
| | | @ApiModelProperty(value = "供应商编码") |
| | | @TableField("supp_code") |
| | | private String suppCode; |
| | | |
| | | /** |
| | | * 危险品 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "危险品 1: 是 0: 否 ") |
| | | @ApiModelProperty(value = "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | public String getIoTime$() { |
| | | if (Cools.isEmpty(this.ioTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getDanger$(){ |
| | | if (null == this.danger){ return null; } |
| | | switch (this.danger){ |
| | | public String getDanger$() { |
| | | if (null == this.danger) { |
| | | return null; |
| | | } |
| | | switch (this.danger) { |
| | | case 1: |
| | | return "是"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | |
| | | /** |
| | | * 类型 |
| | | */ |
| | | @ApiModelProperty(value= "类型") |
| | | @ApiModelProperty(value = "类型") |
| | | @TableId(value = "wrk_mk", type = IdType.INPUT) |
| | | @TableField("wrk_mk") |
| | | private Integer wrkMk; |
| | |
| | | /** |
| | | * 当前ID |
| | | */ |
| | | @ApiModelProperty(value= "当前ID") |
| | | @ApiModelProperty(value = "当前ID") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 起始ID |
| | | */ |
| | | @ApiModelProperty(value= "起始ID") |
| | | @ApiModelProperty(value = "起始ID") |
| | | @TableField("s_no") |
| | | private Integer sNo; |
| | | |
| | | /** |
| | | * 终止ID |
| | | */ |
| | | @ApiModelProperty(value= "终止ID") |
| | | @ApiModelProperty(value = "终止ID") |
| | | @TableField("e_no") |
| | | private Integer eNo; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("memo_m") |
| | | private String memoM; |
| | | |
| | | public WrkLastno() {} |
| | | public WrkLastno() { |
| | | } |
| | | |
| | | public WrkLastno(Integer wrkNo,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Integer sNo,Integer eNo,String memoM) { |
| | | public WrkLastno(Integer wrkNo, Long modiUser, Date modiTime, Long appeUser, Date appeTime, Integer sNo, Integer eNo, String memoM) { |
| | | this.wrkNo = wrkNo; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | |
| | | return modiUser; |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setModiUser(Long modiUser) { |
| | | this.modiUser = modiUser; |
| | | } |
| | | |
| | | public Date getModiTime() { |
| | | return modiTime; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public void setModiTime(Date modiTime) { |
| | | this.modiTime = modiTime; |
| | | } |
| | | |
| | | public Long getAppeUser() { |
| | | return appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setAppeUser(Long appeUser) { |
| | | this.appeUser = appeUser; |
| | | } |
| | | |
| | | public Date getAppeTime() { |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public void setAppeTime(Date appeTime) { |
| | | this.appeTime = appeTime; |
| | | } |
| | | |
| | | public Integer getSNo() { |
| | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.mapper.BasWrkIotypeMapper; |
| | | import com.zy.asrs.mapper.BasWrkStatusMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.service.BasCrnpService; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableId(value = "wrk_no", type = IdType.INPUT) |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("inv_wh") |
| | | private String invWh; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Date ymd; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String mk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("whs_type") |
| | | private Integer whsType; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @ApiModelProperty(value = "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @ApiModelProperty(value = "入出库类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 堆垛机 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机") |
| | | @ApiModelProperty(value = "堆垛机") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("sheet_no") |
| | | private String sheetNo; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | @ApiModelProperty(value = "优先级") |
| | | @TableField("io_pri") |
| | | private Double ioPri; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("wrk_date") |
| | | private Date wrkDate; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @ApiModelProperty(value = "目标库位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @ApiModelProperty(value = "目标站") |
| | | @TableField("sta_no") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @ApiModelProperty(value = "源站") |
| | | @TableField("source_sta_no") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @ApiModelProperty(value = "源库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("loc_sts") |
| | | private String locSts; |
| | | |
| | | /** |
| | | * 拣料 |
| | | */ |
| | | @ApiModelProperty(value= "拣料") |
| | | @ApiModelProperty(value = "拣料") |
| | | private String picking; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("link_mis") |
| | | private String linkMis; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("online_yn") |
| | | private String onlineYn; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("upd_mk") |
| | | private String updMk; |
| | | |
| | | /** |
| | | * 退出 |
| | | */ |
| | | @ApiModelProperty(value= "退出") |
| | | @ApiModelProperty(value = "退出") |
| | | @TableField("exit_mk") |
| | | private String exitMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("plt_type") |
| | | private Integer pltType; |
| | | |
| | | /** |
| | | * 空板 |
| | | */ |
| | | @ApiModelProperty(value= "空板") |
| | | @ApiModelProperty(value = "空板") |
| | | @TableField("empty_mk") |
| | | private String emptyMk; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @ApiModelProperty(value = "工作时间") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctn_type") |
| | | private Integer ctnType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String packed; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ove_mk") |
| | | private String oveMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("mtn_type") |
| | | private Double mtnType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("user_no") |
| | | private String userNo; |
| | | |
| | | /** |
| | | * 堆垛机启动时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机启动时间") |
| | | @ApiModelProperty(value = "堆垛机启动时间") |
| | | @TableField("crn_str_time") |
| | | private Date crnStrTime; |
| | | |
| | | /** |
| | | * 堆垛机停止时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机停止时间") |
| | | @ApiModelProperty(value = "堆垛机停止时间") |
| | | @TableField("crn_end_time") |
| | | private Date crnEndTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("plc_str_time") |
| | | private Date plcStrTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("crn_pos_time") |
| | | private Date crnPosTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("load_time") |
| | | private Double loadTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("exp_time") |
| | | private Double expTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ref_wrkno") |
| | | private Double refWrkno; |
| | | |
| | | /** |
| | | * 拣料时间 |
| | | */ |
| | | @ApiModelProperty(value= "拣料时间") |
| | | @ApiModelProperty(value = "拣料时间") |
| | | @TableField("ref_iotime") |
| | | private Date refIotime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("pause_mk") |
| | | private String pauseMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("error_time") |
| | | private Date errorTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("error_memo") |
| | | private String errorMemo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctn_kind") |
| | | private Integer ctnKind; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("manu_type") |
| | | private String manuType; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("sc_weight") |
| | | private Double scWeight; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("log_mk") |
| | | private String logMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("log_err_time") |
| | | private Date logErrTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("log_err_memo") |
| | | private String logErrMemo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Pdc_type") |
| | | private String PdcType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctn_no") |
| | | private String ctnNo; |
| | | |
| | | /** |
| | | * 满板 |
| | | */ |
| | | @ApiModelProperty(value= "满板") |
| | | @ApiModelProperty(value = "满板") |
| | | @TableField("full_plt") |
| | | private String fullPlt; |
| | | |
| | | /** |
| | | * wms任务号 |
| | | */ |
| | | @ApiModelProperty(value= "wms任务号") |
| | | @ApiModelProperty(value = "wms任务号") |
| | | @TableField("wms_wrk_no") |
| | | private String taskNo; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @ApiModelProperty(value = "结束时间") |
| | | @TableField("end_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | //命令list |
| | | @TableField(exist = false) |
| | | private List<CommandInfo> children; |
| | | |
| | | public String getWrkSts$(){ |
| | | public String getWrkSts$() { |
| | | BasWrkStatusMapper mapper = SpringUtils.getBean(BasWrkStatusMapper.class); |
| | | BasWrkStatus entity = mapper.selectById(this.wrkSts); |
| | | if (entity != null) { |
| | |
| | | return null; |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | public String getIoType$() { |
| | | BasWrkIotypeMapper mapper = SpringUtils.getBean(BasWrkIotypeMapper.class); |
| | | BasWrkIotype entity = mapper.selectById(this.ioType); |
| | | if (entity != null) { |
| | |
| | | return null; |
| | | } |
| | | |
| | | public String getYmd$(){ |
| | | if (Cools.isEmpty(this.ymd)){ |
| | | public String getYmd$() { |
| | | if (Cools.isEmpty(this.ymd)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ymd); |
| | | } |
| | | |
| | | public String getCrnNo$(){ |
| | | public String getCrnNo$() { |
| | | BasCrnpService service = SpringUtils.getBean(BasCrnpService.class); |
| | | BasCrnp basCrnp = service.selectById(this.crnNo); |
| | | if (!Cools.isEmpty(basCrnp)){ |
| | | if (!Cools.isEmpty(basCrnp)) { |
| | | return String.valueOf(basCrnp.getCrnNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getWrkDate$(){ |
| | | if (Cools.isEmpty(this.wrkDate)){ |
| | | public String getWrkDate$() { |
| | | if (Cools.isEmpty(this.wrkDate)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.wrkDate); |
| | | } |
| | | |
| | | public String getLocNo$(){ |
| | | public String getLocNo$() { |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStaNo$(){ |
| | | public String getStaNo$() { |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.staNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | if (!Cools.isEmpty(basDevp)) { |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceStaNo$(){ |
| | | public String getSourceStaNo$() { |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.sourceStaNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | if (!Cools.isEmpty(basDevp)) { |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceLocNo$(){ |
| | | public String getSourceLocNo$() { |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.sourceLocNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | public String getIoTime$() { |
| | | if (Cools.isEmpty(this.ioTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getCrnStrTime$(){ |
| | | if (Cools.isEmpty(this.crnStrTime)){ |
| | | public String getCrnStrTime$() { |
| | | if (Cools.isEmpty(this.crnStrTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnStrTime); |
| | | } |
| | | |
| | | public String getCrnEndTime$(){ |
| | | if (Cools.isEmpty(this.crnEndTime)){ |
| | | public String getCrnEndTime$() { |
| | | if (Cools.isEmpty(this.crnEndTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnEndTime); |
| | | } |
| | | |
| | | public String getPlcStrTime$(){ |
| | | if (Cools.isEmpty(this.plcStrTime)){ |
| | | public String getPlcStrTime$() { |
| | | if (Cools.isEmpty(this.plcStrTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.plcStrTime); |
| | | } |
| | | |
| | | public String getCrnPosTime$(){ |
| | | if (Cools.isEmpty(this.crnPosTime)){ |
| | | public String getCrnPosTime$() { |
| | | if (Cools.isEmpty(this.crnPosTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnPosTime); |
| | | } |
| | | |
| | | public String getRefIotime$(){ |
| | | if (Cools.isEmpty(this.refIotime)){ |
| | | public String getRefIotime$() { |
| | | if (Cools.isEmpty(this.refIotime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.refIotime); |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | |
| | | return appeTime; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public String getErrorTime$(){ |
| | | if (Cools.isEmpty(this.errorTime)){ |
| | | public String getErrorTime$() { |
| | | if (Cools.isEmpty(this.errorTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime); |
| | |
| | | this.errorMemo = errorMemo; |
| | | } |
| | | |
| | | public String getLogErrTime$(){ |
| | | if (Cools.isEmpty(this.logErrTime)){ |
| | | public String getLogErrTime$() { |
| | | if (Cools.isEmpty(this.logErrTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.logErrTime); |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | public String getEndTime$() { |
| | | if (Cools.isEmpty(this.endTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @ApiModelProperty(value = "编号") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("inv_wh") |
| | | private String invWh; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private Date ymd; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String mk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("whs_type") |
| | | private Integer whsType; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @ApiModelProperty(value = "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @ApiModelProperty(value = "入出库类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @ApiModelProperty(value = "堆垛机号") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("sheet_no") |
| | | private String sheetNo; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | @ApiModelProperty(value = "优先级") |
| | | @TableField("io_pri") |
| | | private Double ioPri; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("wrk_date") |
| | | private Date wrkDate; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @ApiModelProperty(value = "目标库位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @ApiModelProperty(value = "目标站") |
| | | @TableField("sta_no") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @ApiModelProperty(value = "源站") |
| | | @TableField("source_sta_no") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @ApiModelProperty(value = "源库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("loc_sts") |
| | | private String locSts; |
| | | |
| | | /** |
| | | * 拣料 |
| | | */ |
| | | @ApiModelProperty(value= "拣料") |
| | | @ApiModelProperty(value = "拣料") |
| | | private String picking; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("link_mis") |
| | | private String linkMis; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("online_yn") |
| | | private String onlineYn; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("upd_mk") |
| | | private String updMk; |
| | | |
| | | /** |
| | | * 退出 |
| | | */ |
| | | @ApiModelProperty(value= "退出") |
| | | @ApiModelProperty(value = "退出") |
| | | @TableField("exit_mk") |
| | | private String exitMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("plt_type") |
| | | private Integer pltType; |
| | | |
| | | /** |
| | | * 空板 |
| | | */ |
| | | @ApiModelProperty(value= "空板") |
| | | @ApiModelProperty(value = "空板") |
| | | @TableField("empty_mk") |
| | | private String emptyMk; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @ApiModelProperty(value = "工作时间") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctn_type") |
| | | private Integer ctnType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | private String packed; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ove_mk") |
| | | private String oveMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("mtn_type") |
| | | private Double mtnType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("user_no") |
| | | private String userNo; |
| | | |
| | | /** |
| | | * 堆垛机启动时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机启动时间") |
| | | @ApiModelProperty(value = "堆垛机启动时间") |
| | | @TableField("crn_str_time") |
| | | private Date crnStrTime; |
| | | |
| | | /** |
| | | * 堆垛机停止时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机停止时间") |
| | | @ApiModelProperty(value = "堆垛机停止时间") |
| | | @TableField("crn_end_time") |
| | | private Date crnEndTime; |
| | | |
| | | /** |
| | | * 拣料时间 |
| | | */ |
| | | @ApiModelProperty(value= "拣料时间") |
| | | @ApiModelProperty(value = "拣料时间") |
| | | @TableField("plc_str_time") |
| | | private Date plcStrTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("crn_pos_time") |
| | | private Date crnPosTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("load_time") |
| | | private Double loadTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("exp_time") |
| | | private Double expTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ref_wrkno") |
| | | private Double refWrkno; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ref_iotime") |
| | | private Date refIotime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("pause_mk") |
| | | private String pauseMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("error_time") |
| | | private Date errorTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("error_memo") |
| | | private String errorMemo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctn_kind") |
| | | private Integer ctnKind; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("manu_type") |
| | | private String manuType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("memo") |
| | | private String memo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("sc_weight") |
| | | private Double scWeight; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("log_mk") |
| | | private String logMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("log_err_time") |
| | | private Date logErrTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("log_err_memo") |
| | | private String logErrMemo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @ApiModelProperty(value = "条码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Pdc_type") |
| | | private String PdcType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ctn_no") |
| | | private String ctnNo; |
| | | |
| | | /** |
| | | * 满板 |
| | | */ |
| | | @ApiModelProperty(value= "满板") |
| | | @ApiModelProperty(value = "满板") |
| | | @TableField("full_plt") |
| | | private String fullPlt; |
| | | |
| | | /** |
| | | * 穿梭车 |
| | | */ |
| | | @ApiModelProperty(value= "两向穿梭车") |
| | | @ApiModelProperty(value = "两向穿梭车") |
| | | @TableField("ste_no") |
| | | private Integer steNo; |
| | | |
| | | /** |
| | | * 穿梭车 |
| | | */ |
| | | @ApiModelProperty(value= "四向穿梭车") |
| | | @ApiModelProperty(value = "四向穿梭车") |
| | | @TableField("shuttle_no") |
| | | private Integer shuttleNo; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @ApiModelProperty(value = "结束时间") |
| | | @TableField("end_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | public WrkMastLog() {} |
| | | public WrkMastLog() { |
| | | } |
| | | |
| | | public String getWrkNo$(){ |
| | | public String getWrkNo$() { |
| | | WrkMastService service = SpringUtils.getBean(WrkMastService.class); |
| | | WrkMast wrkMast = service.selectById(this.wrkNo); |
| | | if (!Cools.isEmpty(wrkMast)){ |
| | | if (!Cools.isEmpty(wrkMast)) { |
| | | return String.valueOf(wrkMast.getWrkNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getYmd$(){ |
| | | if (Cools.isEmpty(this.ymd)){ |
| | | public String getYmd$() { |
| | | if (Cools.isEmpty(this.ymd)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ymd); |
| | | } |
| | | |
| | | public String getWrkSts$(){ |
| | | public String getWrkSts$() { |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | if (!Cools.isEmpty(basWrkStatus)) { |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | public String getIoType$() { |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | if (!Cools.isEmpty(basWrkIotype)) { |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCrnNo$(){ |
| | | public String getCrnNo$() { |
| | | BasCrnpService service = SpringUtils.getBean(BasCrnpService.class); |
| | | BasCrnp basCrnp = service.selectById(this.crnNo); |
| | | if (!Cools.isEmpty(basCrnp)){ |
| | | if (!Cools.isEmpty(basCrnp)) { |
| | | return String.valueOf(basCrnp.getCrnNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getWrkDate$(){ |
| | | if (Cools.isEmpty(this.wrkDate)){ |
| | | public String getWrkDate$() { |
| | | if (Cools.isEmpty(this.wrkDate)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.wrkDate); |
| | | } |
| | | |
| | | public String getLocNo$(){ |
| | | public String getLocNo$() { |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStaNo$(){ |
| | | public String getStaNo$() { |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.staNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | if (!Cools.isEmpty(basDevp)) { |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceStaNo$(){ |
| | | public String getSourceStaNo$() { |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.sourceStaNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | if (!Cools.isEmpty(basDevp)) { |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceLocNo$(){ |
| | | public String getSourceLocNo$() { |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.sourceLocNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | public String getIoTime$() { |
| | | if (Cools.isEmpty(this.ioTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getCrnStrTime$(){ |
| | | if (Cools.isEmpty(this.crnStrTime)){ |
| | | public String getCrnStrTime$() { |
| | | if (Cools.isEmpty(this.crnStrTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnStrTime); |
| | | } |
| | | |
| | | public String getCrnEndTime$(){ |
| | | if (Cools.isEmpty(this.crnEndTime)){ |
| | | public String getCrnEndTime$() { |
| | | if (Cools.isEmpty(this.crnEndTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnEndTime); |
| | | } |
| | | |
| | | public String getPlcStrTime$(){ |
| | | if (Cools.isEmpty(this.plcStrTime)){ |
| | | public String getPlcStrTime$() { |
| | | if (Cools.isEmpty(this.plcStrTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.plcStrTime); |
| | | } |
| | | |
| | | public String getCrnPosTime$(){ |
| | | if (Cools.isEmpty(this.crnPosTime)){ |
| | | public String getCrnPosTime$() { |
| | | if (Cools.isEmpty(this.crnPosTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnPosTime); |
| | | } |
| | | |
| | | |
| | | public String getRefIotime$(){ |
| | | if (Cools.isEmpty(this.refIotime)){ |
| | | public String getRefIotime$() { |
| | | if (Cools.isEmpty(this.refIotime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.refIotime); |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | public String getModiUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | public String getAppeUser$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | public String getAppeTime$() { |
| | | if (Cools.isEmpty(this.appeTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public String getErrorTime$(){ |
| | | if (Cools.isEmpty(this.errorTime)){ |
| | | public String getErrorTime$() { |
| | | if (Cools.isEmpty(this.errorTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime); |
| | | } |
| | | |
| | | public String getLogErrTime$(){ |
| | | if (Cools.isEmpty(this.logErrTime)){ |
| | | public String getLogErrTime$() { |
| | | if (Cools.isEmpty(this.logErrTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.logErrTime); |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | public String getEndTime$() { |
| | | if (Cools.isEmpty(this.endTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | |
| | | //托盘码 |
| | | private String BoxNo; |
| | | //执行状态 0:成功 1:失败 |
| | | private Integer WCSStatus=0; |
| | | private Integer WCSStatus = 0; |
| | | //错误信息 具体的错误信息(超高,超重等) |
| | | private String WCSErrorMessage=""; |
| | | private String WCSErrorMessage = ""; |
| | | } |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | |
| | | //堆垛机 |
| | | private Integer crn; |
| | | |
| | | public TaskCreateParam(){}; |
| | | public TaskCreateParam() { |
| | | } |
| | | |
| | | public TaskCreateParam(WMSAndAGVInterfaceParam param){ |
| | | ; |
| | | |
| | | public TaskCreateParam(WMSAndAGVInterfaceParam param) { |
| | | this.taskNo = param.getTaskNo(); |
| | | this.ioType = convertParamIoType(param.getTaskType()); |
| | | this.barcode = param.getContainerCode(); |
| | |
| | | this.targetPoint = param.getTargetLocationCode(); |
| | | this.emptyContainer = param.getEmptyContainer(); |
| | | this.crn = param.getTaskTunnel(); |
| | | }; |
| | | } |
| | | |
| | | public TaskCreateParam(CarryParam param, Integer crn){ |
| | | ; |
| | | |
| | | public TaskCreateParam(CarryParam param, Integer crn) { |
| | | this.taskNo = param.getTaskNo(); |
| | | this.ioType = param.getStereoscopicTaskType(); |
| | | this.barcode = param.getBoxNo(); |
| | |
| | | this.targetPoint = param.getTerminalNo(); |
| | | this.emptyContainer = "N"; |
| | | this.crn = crn; |
| | | }; |
| | | } |
| | | |
| | | ; |
| | | |
| | | |
| | | public static Integer convertParamIoType(String paramIoType){ |
| | | switch (paramIoType){ |
| | | public static Integer convertParamIoType(String paramIoType) { |
| | | switch (paramIoType) { |
| | | case "RK": |
| | | return 1; |
| | | case "CK": |
| | |
| | | * */ |
| | | |
| | | |
| | | |
| | | //任务取消接口 |
| | | /*操作类型: |
| | | * 1.正常取消--只能取消未执行的任务,货物处在未执行任务状态 |
| | | * 2.强制取消--可取消已执行未完成的任务,货物处在未执行任务状态 |
| | | * 3.正常完成--只能完成未执行的任务,货物处于任务执行完成状态 |
| | | * 4.强制完成--可完成已执行未完成的任务,货物处于任务执行完成状态 |
| | | * */ |
| | | * 1.正常取消--只能取消未执行的任务,货物处在未执行任务状态 |
| | | * 2.强制取消--可取消已执行未完成的任务,货物处在未执行任务状态 |
| | | * 3.正常完成--只能完成未执行的任务,货物处于任务执行完成状态 |
| | | * 4.强制完成--可完成已执行未完成的任务,货物处于任务执行完成状态 |
| | | * */ |
| | | private String taskStatus; //操作类型 |
| | | private String wharfSource; //源码头 |
| | | private List<String> freeWharfs; |
| | | private String requestType; //请求类型: 1=取货;2=放货 |
| | | private String wharfCode; //码头编号 |
| | | |
| | | public TaskStatusFeedbackParam(){} |
| | | public TaskStatusFeedbackParam() { |
| | | } |
| | | |
| | | public TaskStatusFeedbackParam(TaskWrk taskWrk){ |
| | | public TaskStatusFeedbackParam(TaskWrk taskWrk) { |
| | | this.taskNo = taskWrk.getTaskNo(); |
| | | this.feedbackFrom = "WCS"; |
| | | this.warehouseId = "1688469798893297665"; |
| | |
| | | this.targetLocationCode = taskWrk.getTargetPoint(); |
| | | } |
| | | |
| | | public static String getTaskType(Integer paramIoType){ |
| | | switch (paramIoType){ |
| | | public static String getTaskType(Integer paramIoType) { |
| | | switch (paramIoType) { |
| | | case 1: |
| | | return "RK"; |
| | | case 2: |
| | |
| | | return "未知"; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | //任务取消接口 |
| | | /*操作类型: |
| | | * 1.正常取消--只能取消未执行的任务,货物处在未执行任务状态 |
| | | * 2.强制取消--可取消已执行未完成的任务,货物处在未执行任务状态 |
| | | * 3.正常完成--只能完成未执行的任务,货物处于任务执行完成状态 |
| | | * 4.强制完成--可完成已执行未完成的任务,货物处于任务执行完成状态 |
| | | * */ |
| | | * 1.正常取消--只能取消未执行的任务,货物处在未执行任务状态 |
| | | * 2.强制取消--可取消已执行未完成的任务,货物处在未执行任务状态 |
| | | * 3.正常完成--只能完成未执行的任务,货物处于任务执行完成状态 |
| | | * 4.强制完成--可完成已执行未完成的任务,货物处于任务执行完成状态 |
| | | * */ |
| | | private Integer taskStatus; //操作类型 |
| | | |
| | | //AGV请求入库码头接口 |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.ApiConfig; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.ApiConfig; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.ApiLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.ApiLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasCrnOpt; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasCrnOpt; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasErrLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasErrLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasPlcerrorLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasPlcerrorLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.CommandInfoLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.CommandInfoLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.DataResource; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.DataResource; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.DeviceError; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.DeviceError; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | @Repository |
| | | public interface LocMastMapper extends BaseMapper<LocMast> { |
| | | |
| | | // @Select("select distinct row1 from asr_loc_mast where crn_no = #{crnNo}") |
| | | // @Select("select distinct row1 from asr_loc_mast where crn_no = #{crnNo}") |
| | | @Select("select row1 from ( select distinct row1 from asr_loc_mast where crn_no = #{crnNo} ) a " + |
| | | "order by case row1 when 1 then 1 when 2 then 0 when 3 then 0 when 4 then 1 " + |
| | | "when 5 then 1 when 6 then 0 when 7 then 0 when 8 then 1 when 9 then 1 when 10 then 0 " + |
| | | "when 11 then 0 when 12 then 1 when 13 then 1 when 14 then 0 when 15 then 0 when 16 then 1 end desc,newid()") |
| | | List<Integer> queryDistinctRow(@Param("crnNo")Integer crnNo); |
| | | "order by case row1 when 1 then 1 when 2 then 0 when 3 then 0 when 4 then 1 " + |
| | | "when 5 then 1 when 6 then 0 when 7 then 0 when 8 then 1 when 9 then 1 when 10 then 0 " + |
| | | "when 11 then 0 when 12 then 1 when 13 then 1 when 14 then 0 when 15 then 0 when 16 then 1 end desc,newid()") |
| | | List<Integer> queryDistinctRow(@Param("crnNo") Integer crnNo); |
| | | |
| | | LocMast queryFreeLocMast(@Param("row") Integer row, @Param("locType1") Short locType1); |
| | | |
| | |
| | | |
| | | LocMast selectByLocNo(String locNo); |
| | | |
| | | List<LocMast> selectLocByLev(@Param("lev")Integer lev); |
| | | List<LocMast> selectLocByLev(@Param("lev") Integer lev); |
| | | |
| | | } |
| | |
| | | |
| | | //分页查询库存滞留时间 |
| | | public List<ViewStayTimeBean> queryViewStayTimeList(ViewStayTimeBean viewStayTime); |
| | | |
| | | public int getViewStayTimeCount(ViewStayTimeBean viewStayTime); |
| | | |
| | | //不分页查询所有信息,用于excel导出 |
| | | public List<ViewStayTimeBean> getViewStayTimeAll(ViewStayTimeBean viewStayTime); |
| | | |
| | |
| | | |
| | | //分页查询日入库记录 |
| | | public List<ViewWorkInBean> queryViewWorkInList(ViewWorkInBean viewWorkIn); |
| | | |
| | | public int getViewWorkInCount(ViewWorkInBean viewWorkIn); |
| | | |
| | | //不分页查询所有信息,用于excel导出 |
| | | public List<ViewWorkInBean> getViewWorkInAll(ViewWorkInBean viewWorkIn); |
| | | |
| | | List<ViewWorkCountInView> selectWorkCountIn(@Param("curr") Integer curr, @Param("limit") Integer limit, @Param("matnr")String matnr, @Param("start") String startTime, @Param("end") String endTime); |
| | | List<ViewWorkCountInView> selectWorkCountIn(@Param("curr") Integer curr, @Param("limit") Integer limit, @Param("matnr") String matnr, @Param("start") String startTime, @Param("end") String endTime); |
| | | |
| | | Integer selectWorkCountInTotal(String matnr, @Param("start") String startTime, @Param("end") String endTime); |
| | | |
| | |
| | | |
| | | //分页查询日出库记录 |
| | | public List<ViewWorkInBean> queryViewWorkOutList(ViewWorkInBean viewWorkOut); |
| | | |
| | | public int getViewWorkOutCount(ViewWorkInBean viewWorkOut); |
| | | |
| | | //不分页查询所有信息,用于excel导出 |
| | | public List<ViewWorkInBean> getViewWorkOutAll(ViewWorkInBean viewWorkOut); |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.TaskWrkLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.TaskWrkLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.TaskWrk; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.TaskWrk; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | public interface TaskWrkMapper extends BaseMapper<TaskWrk> { |
| | | |
| | | TaskWrk selectByTaskNo(String taskNo); |
| | | |
| | | TaskWrk selectByStartPoint(@Param("startPoint") String startPoint); |
| | | |
| | | TaskWrk selectByWrkNo(Integer wrkNo); |
| | |
| | | |
| | | TaskWrk selectCrnStaWorking(@Param("crnNo") Integer crnNo, @Param("targetPoint") String targetPoint); |
| | | |
| | | TaskWrk selectCrnNoInWorking(@Param("crnNo") Integer crnNo,@Param("workNo") Integer workNo); |
| | | TaskWrk selectCrnNoInWorking(@Param("crnNo") Integer crnNo, @Param("workNo") Integer workNo); |
| | | |
| | | List<TaskWrk> selectToBeHistoryData(); |
| | | |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.TaskWrkReportLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskWrkReportLogMapper extends BaseMapper<TaskWrkReportLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.TaskWrkReport; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskWrkReportMapper extends BaseMapper<TaskWrkReport> { |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import org.apache.ibatis.annotations.*; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | WrkMast selectByLocNo1(@Param("sourceLocNo") String sourceLocNo); |
| | | |
| | | // @Select("select * from asr_wrk_mast where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type <> 103 and io_type <> 104 and io_type <> 107 ) or (wrk_sts = 2 and io_type=6) order by upd_mk,io_time,wrk_no") |
| | | // @Select("select * from asr_wrk_mast where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type <> 103 and io_type <> 104 and io_type <> 107 ) or (wrk_sts = 2 and io_type=6) order by upd_mk,io_time,wrk_no") |
| | | List<WrkMast> selectToBeCompleteData(); |
| | | |
| | | List<WrkMast> selectToBeHistoryData(); |
| | |
| | | // wcs --------------------------------------------- |
| | | // 入库第一步,扫码仪获取条码信息时查询 |
| | | // @Select("select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC") |
| | | WrkMast selectPakInStep1(@Param("sourceStaNo")Integer sourceStaNo, @Param("barcode")String barcode); |
| | | WrkMast selectPakInStep1(@Param("sourceStaNo") Integer sourceStaNo, @Param("barcode") String barcode); |
| | | |
| | | WrkMast selectPakInStep11(@Param("sourceStaNo")Integer sourceStaNo); |
| | | WrkMast selectPakInStep11(@Param("sourceStaNo") Integer sourceStaNo); |
| | | |
| | | // 入库第二步,当托盘物料在堆垛机入库站时时查询 |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC") |
| | | WrkMast selectPakInStep2(@Param("crnNo")Integer crnNo, @Param("workNo")Integer workNo, @Param("staNo")Integer staNo); |
| | | WrkMast selectPakInStep2(@Param("crnNo") Integer crnNo, @Param("workNo") Integer workNo, @Param("staNo") Integer staNo); |
| | | |
| | | // 入库第三步,当堆垛机把货放入库位时 |
| | | // @Select("select top 1 from dbo.asr_wrk_mast where wrk_no=#{workNo}") |
| | | WrkMast selectPakInStep3(@Param("workNo")Integer workNo); |
| | | WrkMast selectPakInStep3(@Param("workNo") Integer workNo); |
| | | |
| | | // 拣料再入库时,站点有物且需求时查询 |
| | | // @Select("select top 1 * from asr_wrk_mast where wrk_no=#{workNo} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)") |
| | | WrkMast selectPickStep(@Param("barcode")String barcode); |
| | | WrkMast selectPickStep(@Param("barcode") String barcode); |
| | | |
| | | // 出库第一步,从库位到堆垛机出库站 |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc") |
| | | WrkMast selectPakOutStep1(@Param("crnNo")Integer crnNO, @Param("sourceStaNo")Integer sourceStaNo); |
| | | WrkMast selectPakOutStep1(@Param("crnNo") Integer crnNO, @Param("sourceStaNo") Integer sourceStaNo); |
| | | |
| | | // 出库第二步,从堆垛机出库站到目标出库站,堆垛机出库站有物时执行 |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC") |
| | | WrkMast selectPakOutStep2(@Param("sourceStaNo")Integer sourceStaNo); |
| | | WrkMast selectPakOutStep2(@Param("sourceStaNo") Integer sourceStaNo); |
| | | |
| | | // 库位移转工作档,在进行一次入出库作业后紧跟库位移转 |
| | | // @Select("select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and (io_type=11 or io_type=110) and crn_no=#{crnNo} order by io_time,wrk_no") |
| | | WrkMast selectLocMove(@Param("crnNo")Integer crnNo); |
| | | WrkMast selectLocMove(@Param("crnNo") Integer crnNo); |
| | | |
| | | WrkMast selectLocMoving(@Param("crnNo")Integer crnNo); |
| | | WrkMast selectLocMoving(@Param("crnNo") Integer crnNo); |
| | | |
| | | WrkMast selectWorking(@Param("crnNo")Integer crnNo); |
| | | WrkMast selectWorking(@Param("crnNo") Integer crnNo); |
| | | |
| | | // work log ------------------------------------------------------- |
| | | @Insert("insert into asr_wrk_mast_log select * from asr_wrk_mast where wrk_no=#{workNo}") |
| | |
| | | * @param crnNo |
| | | * @return |
| | | */ |
| | | WrkMast selectCrnWorking(@Param("crnNo")Integer crnNo); |
| | | WrkMast selectCrnWorking(@Param("crnNo") Integer crnNo); |
| | | |
| | | /** |
| | | * 输送线是否存在入库任务 |
| | | * @param crnNo |
| | | * @return |
| | | */ |
| | | WrkMast selectDevWorking(@Param("crnNo")Integer crnNo); |
| | | WrkMast selectDevWorking(@Param("crnNo") Integer crnNo); |
| | | |
| | | |
| | | List<WrkMast> selectPick(); |
| | |
| | | * @param sourceStaNo |
| | | * @return |
| | | */ |
| | | List<WrkMast> selectPakOutStep11(@Param("crnNo")Integer crnNO, @Param("sourceStaNo")Integer sourceStaNo); |
| | | List<WrkMast> selectPakOutStep11(@Param("crnNo") Integer crnNO, @Param("sourceStaNo") Integer sourceStaNo); |
| | | |
| | | WrkMast selectWorkingPakin(@Param("sourceStaNo")Integer sourceStaNo); |
| | | WrkMast selectWorkingPakout(@Param("sourceStaNo")Integer sourceStaNo); |
| | | WrkMast selectWorkingPakin(@Param("sourceStaNo") Integer sourceStaNo); |
| | | |
| | | WrkMast selectWorkingPakout(@Param("sourceStaNo") Integer sourceStaNo); |
| | | } |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.ApiLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.ApiLog; |
| | | |
| | | public interface ApiLogService extends IService<ApiLog> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasPlcerrorLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.BasPlcerrorLog; |
| | | |
| | | public interface BasPlcerrorLogService extends IService<BasPlcerrorLog> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasPlcerror; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.BasPlcerror; |
| | | |
| | | public interface BasPlcerrorService extends IService<BasPlcerror> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.CommandInfoLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.CommandInfoLog; |
| | | |
| | | public interface CommandInfoLogService extends IService<CommandInfoLog> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.DataResource; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.DataResource; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.DeviceError; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.DeviceError; |
| | | |
| | | public interface DeviceErrorService extends IService<DeviceError> { |
| | | |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.param.TaskCreateParam; |
| | | import com.zy.asrs.entity.param.TaskOverParam; |
| | | import com.zy.asrs.entity.param.WMSAndAGVInterfaceParam; |
| | | import com.zy.asrs.entity.param.TaskCreateParam; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | |
| | | public interface OpenService { |
| | | |
| | | //创建任务 |
| | | HashMap<String,Object> taskCreate(TaskCreateParam param); |
| | | HashMap<String, Object> taskCreate(TaskCreateParam param); |
| | | |
| | | R AgvToWCSToWms(WMSAndAGVInterfaceParam param) throws IOException; |
| | | |
| | | void getAgvTaskOver(TaskOverParam param); |
| | | |
| | | R getAgvPickAndPlaceV1(TaskOverParam param); |
| | | |
| | | R getAgvPickAndPlaceV2(TaskOverParam param); |
| | | } |
| | |
| | | |
| | | StaDesc queryCrnStn(Integer typeNo, Integer crnNo, Integer stnNo); |
| | | |
| | | StaDesc queryCrn(Integer typeNo, Integer stnNo,Integer crnNo); |
| | | StaDesc queryCrn(Integer typeNo, Integer stnNo, Integer crnNo); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.TaskWrkReportLog; |
| | | |
| | | public interface TaskWrkReportLogService extends IService<TaskWrkReportLog> { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.TaskWrkReport; |
| | | |
| | | public interface TaskWrkReportService extends IService<TaskWrkReport> { |
| | | |
| | | |
| | | } |
| | |
| | | public interface TaskWrkService extends IService<TaskWrk> { |
| | | |
| | | TaskWrk selectByTaskNo(String taskNo); |
| | | |
| | | TaskWrk selectByStartPoint(String taskNo); |
| | | |
| | | TaskWrk selectByWrkNo(Integer wrkNo); |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.ApiConfigMapper; |
| | | import com.zy.asrs.entity.ApiConfig; |
| | | import com.zy.asrs.service.ApiConfigService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.ApiConfig; |
| | | import com.zy.asrs.mapper.ApiConfigMapper; |
| | | import com.zy.asrs.service.ApiConfigService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("apiConfigService") |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.zy.asrs.mapper.ApiLogMapper; |
| | | import com.zy.asrs.entity.ApiLog; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.zy.asrs.entity.ApiLog; |
| | | import com.zy.asrs.mapper.ApiLogMapper; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | | @Service("apiLogService") |
| | | public class ApiLogServiceImpl extends ServiceImpl<ApiLogMapper, ApiLog> implements ApiLogService { |
| | |
| | | request, // 请求内容 |
| | | response, |
| | | null, // 异常内容 |
| | | success?1:0 , // 结果 |
| | | success ? 1 : 0, // 结果 |
| | | 1, // 状态 |
| | | now, // 添加时间 |
| | | now, // 修改时间 |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasCrnOptMapper; |
| | | import com.zy.asrs.entity.BasCrnOpt; |
| | | import com.zy.asrs.service.BasCrnOptService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasCrnOpt; |
| | | import com.zy.asrs.mapper.BasCrnOptMapper; |
| | | import com.zy.asrs.service.BasCrnOptService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basCrnOptService") |
| | |
| | | @Override |
| | | public BasDevp checkSiteStatus(Integer devpNo, boolean put) { |
| | | BasDevp station = selectById(devpNo); |
| | | if (station == null){ |
| | | throw new CoolException(devpNo+"站点不存在"); |
| | | if (station == null) { |
| | | throw new CoolException(devpNo + "站点不存在"); |
| | | } |
| | | if (put) { |
| | | if(station.getAutoing()==null || !station.getAutoing().equals("Y")) { |
| | | throw new CoolException(devpNo+"站点不是自动状态"); |
| | | if (station.getAutoing() == null || !station.getAutoing().equals("Y")) { |
| | | throw new CoolException(devpNo + "站点不是自动状态"); |
| | | } |
| | | if(station.getLoading()==null || !station.getLoading().equals("Y")) { |
| | | throw new CoolException(devpNo+"站点无物"); |
| | | if (station.getLoading() == null || !station.getLoading().equals("Y")) { |
| | | throw new CoolException(devpNo + "站点无物"); |
| | | } |
| | | if(station.getWrkNo()!=null && station.getWrkNo()>0) { |
| | | throw new CoolException(devpNo+"站点已有工作号"); |
| | | if (station.getWrkNo() != null && station.getWrkNo() > 0) { |
| | | throw new CoolException(devpNo + "站点已有工作号"); |
| | | } |
| | | if(wrkMastService.getWorkingMast(devpNo)>0){ |
| | | throw new CoolException(devpNo+"站点不能同时生成两笔入库工作档"); |
| | | if (wrkMastService.getWorkingMast(devpNo) > 0) { |
| | | throw new CoolException(devpNo + "站点不能同时生成两笔入库工作档"); |
| | | } |
| | | } |
| | | return station; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.mapper.BasErrLogMapper; |
| | | import com.zy.asrs.entity.BasErrLog; |
| | | import com.zy.asrs.service.BasErrLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasErrLog; |
| | | import com.zy.asrs.mapper.BasErrLogMapper; |
| | | import com.zy.asrs.service.BasErrLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasPlcerrorLogMapper; |
| | | import com.zy.asrs.entity.BasPlcerrorLog; |
| | | import com.zy.asrs.service.BasPlcerrorLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasPlcerrorLog; |
| | | import com.zy.asrs.mapper.BasPlcerrorLogMapper; |
| | | import com.zy.asrs.service.BasPlcerrorLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basPlcerrorLogService") |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasPlcerrorMapper; |
| | | import com.zy.asrs.entity.BasPlcerror; |
| | | import com.zy.asrs.service.BasPlcerrorService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasPlcerror; |
| | | import com.zy.asrs.mapper.BasPlcerrorMapper; |
| | | import com.zy.asrs.service.BasPlcerrorService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basPlcerrorService") |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.CommandInfoLogMapper; |
| | | import com.zy.asrs.entity.CommandInfoLog; |
| | | import com.zy.asrs.service.CommandInfoLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.CommandInfoLog; |
| | | import com.zy.asrs.mapper.CommandInfoLogMapper; |
| | | import com.zy.asrs.service.CommandInfoLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("commandInfoLogService") |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import com.zy.asrs.entity.CommandInfoLog; |
| | | import com.zy.asrs.mapper.CommandInfoMapper; |
| | | import com.zy.asrs.entity.CommandInfo; |
| | | import com.zy.asrs.service.CommandInfoLogService; |
| | | import com.zy.asrs.service.CommandInfoService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.controller.CrnController; |
| | | import com.zy.asrs.controller.SiteController; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.domain.enums.WorkNoType; |
| | | import com.zy.asrs.domain.param.CrnOperatorParam; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.Result; |
| | | import com.zy.asrs.entity.param.StorageEscalationParam; |
| | | import com.zy.asrs.entity.param.TaskOverToWms; |
| | | import com.zy.asrs.mapper.BasCrnErrorMapper; |
| | | import com.zy.asrs.mapper.StaDescMapper; |
| | | import com.zy.asrs.mapper.TaskWrkMapper; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.CommandUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.core.CrnThread; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.*; |
| | | import com.zy.core.model.CrnSlave; |
| | | import com.zy.core.model.DevpSlave; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.command.CrnCommand; |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 立体仓库WCS系统主流程业务 |
| | | * Created by vincent on 2020/8/6 |
| | | */ |
| | | @Slf4j |
| | | @Service("commonService") |
| | | @Transactional |
| | | public class CommonServiceImpl { |
| | | |
| | | public static final long COMMAND_TIMEOUT = 5 * 1000; |
| | | |
| | | @Autowired |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private WrkMastMapper wrkMastMapper; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private BasCrnpService basCrnpService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private BasErrLogService basErrLogService; |
| | | @Autowired |
| | | private BasCrnErrorMapper basCrnErrorMapper; |
| | | @Autowired |
| | | private TaskWrkMapper taskWrkMapper; |
| | | @Autowired |
| | | private TaskWrkService taskWrkService; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | @Autowired |
| | | private StaDescMapper staDescMapper; |
| | | @Autowired |
| | | private CommandInfoService commandInfoService; |
| | | |
| | | @Autowired |
| | | private OpenServiceImpl openServiceImpl; |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private CommonService commonService; |
| | | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | @Value("${wms.inboundTaskApplyPath}") |
| | | private String inboundTaskApplyPath; |
| | | @Value("${wms.TaskExecCallback}") |
| | | private String TaskExecCallback; |
| | | @Value("${wms.taskStatusFeedbackPath}") |
| | | private String taskStatusFeedbackPath; |
| | | @Autowired |
| | | private CrnController crnController; |
| | | @Autowired |
| | | private SiteController siteController; |
| | | |
| | | public StorageEscalationParam getErrorMsg(StaProtocol staProtocol) { |
| | | StorageEscalationParam storageEscalationParam = new StorageEscalationParam(); |
| | | if (staProtocol.isFrontErr()) { |
| | | storageEscalationParam.setWCSErrorMessage("前超限"); |
| | | storageEscalationParam.setWCSStatus(1); |
| | | } |
| | | if (staProtocol.isBackErr()) { |
| | | storageEscalationParam.setWCSErrorMessage(storageEscalationParam.getWCSErrorMessage() + "后超限"); |
| | | storageEscalationParam.setWCSStatus(1); |
| | | } |
| | | if (staProtocol.isHighErr()) { |
| | | storageEscalationParam.setWCSErrorMessage(storageEscalationParam.getWCSErrorMessage() + "高超限"); |
| | | storageEscalationParam.setWCSStatus(1); |
| | | } |
| | | if (staProtocol.isLeftErr()) { |
| | | storageEscalationParam.setWCSErrorMessage(storageEscalationParam.getWCSErrorMessage() + "左超限"); |
| | | storageEscalationParam.setWCSStatus(1); |
| | | } |
| | | if (staProtocol.isRightErr()) { |
| | | storageEscalationParam.setWCSErrorMessage(storageEscalationParam.getWCSErrorMessage() + "右超限"); |
| | | storageEscalationParam.setWCSStatus(1); |
| | | } |
| | | if (staProtocol.isWeightErr()) { |
| | | storageEscalationParam.setWCSErrorMessage(storageEscalationParam.getWCSErrorMessage() + "超重"); |
| | | storageEscalationParam.setWCSStatus(1); |
| | | } |
| | | if (staProtocol.isBarcodeErr()) { |
| | | storageEscalationParam.setWCSErrorMessage(storageEscalationParam.getWCSErrorMessage() + "扫码失败"); |
| | | storageEscalationParam.setWCSStatus(1); |
| | | } |
| | | return storageEscalationParam; |
| | | } |
| | | |
| | | public void generateStoreWrkFile1() throws IOException, InterruptedException { |
| | | try { |
| | | // 根据输送线plc遍历 |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历入库口 |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | StorageEscalationParam storageEscalationParam = new StorageEscalationParam(); |
| | | // 获取入库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | Short workNo = staProtocol.getWorkNo(); |
| | | Short stano = staProtocol.getStaNo(); |
| | | |
| | | // 尺寸检测异常 |
| | | boolean back = false; |
| | | String errMsg = ""; |
| | | |
| | | // 判断是否满足入库条件 |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() && workNo >= 9790 |
| | | && staProtocol.isPakMk()) { |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | String BoxNo = barcodeThread.getBarcode(); |
| | | TaskWrk taskWrk1 = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("barcode", BoxNo)); |
| | | if (!Cools.isEmpty(taskWrk1)) { |
| | | log.info("托盘码:" + BoxNo + "任务档存在"); |
| | | if (taskWrk1.getIoType() == 1 && taskWrk1.getStartPoint().equals(staProtocol.getSiteId().toString())) { |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no", taskWrk1.getCrnNo()).eq("type_no", 1).eq("stn_no", staProtocol.getSiteId())); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | return; |
| | | } else { |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | if (back) { |
| | | storageEscalationParam.setWCSStatus(1); |
| | | storageEscalationParam.setWCSErrorMessage(storageEscalationParam.getWCSErrorMessage() + errMsg); |
| | | } |
| | | log.info("组托入库={}", storageEscalationParam); |
| | | storageEscalationParam.setBoxNo(BoxNo); |
| | | String response = ""; |
| | | Boolean success = false; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath(inboundTaskApplyPath) |
| | | .setJson(JSON.toJSONString(storageEscalationParam)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (back) { |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } else { |
| | | if (!Cools.isEmpty(response) && !Cools.isEmpty(jsonObject.get("ReturnStatus")) && jsonObject.get("ReturnStatus").equals(0) && !Cools.isEmpty(jsonObject.get("Result").toString())) { |
| | | Result result = JSON.parseObject(jsonObject.get("Result").toString(), Result.class); |
| | | // 创新一个入库工作档 |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(result.getTaskNo()); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | taskWrk = createTask1(result, BoxNo); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | log.error("库位异常,库位号:={}", taskWrk.getOriginTargetPoint()); |
| | | } else { |
| | | taskWrkService.insert(taskWrk); |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no", taskWrk.getCrnNo()).eq("type_no", 1).eq("stn_no", staProtocol.getSiteId())); |
| | | staProtocol.setWorkNo(taskWrk.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(staDesc.getCrnStn().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("TaskNo", taskWrk.getTaskNo()); |
| | | try { |
| | | //开始上报,任务开始时,WCS回调WMS |
| | | response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath(taskStatusFeedbackPath) |
| | | .setJson(JSON.toJSONString(hashMap)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject1 = JSON.parseObject(response); |
| | | Boolean bool = false; |
| | | if (jsonObject1.get("ReturnStatus").equals(0)) { |
| | | bool = true; |
| | | } |
| | | apiLogService.save("wcs开始入库任务上报wms" |
| | | , wmsUrl + TaskExecCallback |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(hashMap) |
| | | , response |
| | | , bool |
| | | ); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } |
| | | } else { |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | |
| | | } else { |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("请求入库调用接口失败"); |
| | | log.error("异常信息打印:" + e); |
| | | try { |
| | | BasDevp basDevp = basDevpService.selectById(inSta.getStaNo()); |
| | | if (Cools.isEmpty(basDevp)) { |
| | | log.error("站点号异常" + inSta.getStaNo()); |
| | | } else if (basDevp.getStaErr() != 0) { |
| | | basDevp.setStaErr(2); |
| | | basDevpService.updateById(basDevp); |
| | | } |
| | | } catch (Exception e1) { |
| | | // 退回 |
| | | log.error("扫码检测程序异常" + inSta.getStaNo() + "异常信息" + e1); |
| | | } |
| | | } finally { |
| | | apiLogService.save("wms请求入库货位接口" |
| | | , wmsUrl + inboundTaskApplyPath |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(storageEscalationParam) |
| | | , response |
| | | , success |
| | | ); |
| | | } |
| | | log.info("入库请求参数=" + JSON.toJSONString(BoxNo)); |
| | | log.info("入库请求返回参数=" + JSON.toJSONString(response)); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("generateStoreWrkFile e", e); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | } |
| | | } |
| | | |
| | | public void generateStoreWrkFile() throws IOException, InterruptedException { |
| | | try { |
| | | // 根据输送线plc遍历 |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历入库口 |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | // 获取入库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | Short workNo = staProtocol.getWorkNo(); |
| | | Short stano = staProtocol.getStaNo(); |
| | | |
| | | // 尺寸检测异常 |
| | | boolean back = false; |
| | | String errMsg = ""; |
| | | if (staProtocol.isFrontErr()) { |
| | | errMsg = "前超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBackErr()) { |
| | | errMsg = "后超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isHighErr()) { |
| | | errMsg = "高超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isLeftErr()) { |
| | | errMsg = "左超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isRightErr()) { |
| | | errMsg = "右超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isWeightErr()) { |
| | | errMsg = "超重"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBarcodeErr()) { |
| | | errMsg = "扫码失败"; |
| | | back = true; |
| | | } |
| | | // 退回 |
| | | if (back) { |
| | | if (stano == inSta.getBackSta().shortValue()) { |
| | | continue; |
| | | } |
| | | if (workNo == 0 && stano == 0) { |
| | | continue; |
| | | } |
| | | if (!staProtocol.isPakMk()) { |
| | | continue; |
| | | } |
| | | // News.warn("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | | staProtocol.setWorkNo(workNo); |
| | | staProtocol.setStaNo(inSta.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo)); |
| | | if (taskWrk != null) { |
| | | taskWrk.setMemo(errMsg);//将错误码存入备注字段进行展示 |
| | | taskWrkMapper.updateById(taskWrk); |
| | | } |
| | | continue; |
| | | } |
| | | // 判断是否满足入库条件 |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() && (workNo >= 9899) |
| | | && staProtocol.isPakMk()) { |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if (!Cools.isEmpty(barcode) && !barcode.equals("99999999")) { |
| | | // 请求wms接口,获取工作号和目标库位 |
| | | ToWmsDTO toWmsDTO = new ToWmsDTO(barcode, staProtocol.getSiteId(), staProtocol.isHigh() ? 2 : 1); |
| | | TaskWrk taskWrk1 = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("barcode", barcode)); |
| | | if (!Cools.isEmpty(taskWrk1)) { |
| | | log.info("托盘码:" + barcode + "任务档存在"); |
| | | if (taskWrk1.getIoType() == 1 && taskWrk1.getStartPoint().equals(staProtocol.getSiteId().toString())) { |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no", taskWrk1.getCrnNo()).eq("type_no", 1).eq("stn_no", staProtocol.getSiteId())); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | log.info("托盘码:" + barcode + "任务档存在"); |
| | | return; |
| | | } else { |
| | | staProtocol.setWorkNo(taskWrk1.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(staDesc.getCrnStn().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | } |
| | | return; |
| | | } |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("Content-Type", "application/json"); |
| | | System.out.println(JSON.toJSONString(toWmsDTO)); |
| | | String response; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | // .setHeaders(headParam) |
| | | .setUri(wmsUrl) |
| | | .setPath(inboundTaskApplyPath) |
| | | .setJson(JSON.toJSONString(toWmsDTO)) |
| | | .build() |
| | | .doPost(); |
| | | } catch (Exception e) { |
| | | log.error("请求入库调用接口失败"); |
| | | log.error("异常信息打印:" + e); |
| | | try { |
| | | BasDevp basDevp = basDevpService.selectById(inSta.getStaNo()); |
| | | if (Cools.isEmpty(basDevp)) { |
| | | log.error("站点号异常" + inSta.getStaNo()); |
| | | } else if (basDevp.getStaErr() != 0) { |
| | | basDevp.setStaErr(2); |
| | | basDevpService.updateById(basDevp); |
| | | } |
| | | } catch (Exception e1) { |
| | | // 退回 |
| | | log.error("扫码检测程序异常" + inSta.getStaNo() + "异常信息" + e1); |
| | | } |
| | | staProtocol.setWorkNo((short) 9999); |
| | | staProtocol.setStaNo(inSta.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | // TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo)); |
| | | // if (taskWrk != null) { |
| | | // taskWrk.setMemo(errMsg);//将错误码存入备注字段进行展示 |
| | | // taskWrkMapper.updateById(taskWrk); |
| | | // } |
| | | continue; |
| | | } |
| | | |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | log.info("入库请求参数{}" + JSON.toJSONString(toWmsDTO)); |
| | | log.info("入库请求返回参数{}" + JSON.toJSONString(response)); |
| | | if (jsonObject.getInteger("code").equals(200) && !Cools.isEmpty(jsonObject.get("data").toString())) { |
| | | GetWmsDto getWmsDto = JSON.parseObject(jsonObject.get("data").toString(), GetWmsDto.class); |
| | | try { |
| | | BasDevp basDevp = basDevpService.selectById(inSta.getStaNo()); |
| | | if (Cools.isEmpty(basDevp)) { |
| | | log.error("站点号异常1" + inSta.getStaNo()); |
| | | throw new CoolException("站点号异常1,未查询到站点信息" + inSta.getStaNo()); |
| | | } |
| | | Integer staNoCrnNo = Utils.StaNoCrnNo(inSta.getStaNo()); |
| | | if (staNoCrnNo == 0) { |
| | | basDevp.setStaErr(1); |
| | | basDevpService.updateById(basDevp); |
| | | log.error("站点号异常2" + inSta.getStaNo()); |
| | | throw new CoolException("站点号异常2,站点号不存在" + inSta.getStaNo()); |
| | | } else { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("crn_no", staNoCrnNo.longValue()) |
| | | .eq("loc_no", getWmsDto.getLocNo())); |
| | | if (Cools.isEmpty(locMast)) { |
| | | basDevp.setStaErr(1); |
| | | basDevpService.updateById(basDevp); |
| | | log.error("站点号异常3" + inSta.getStaNo()); |
| | | throw new CoolException("站点号异常3:此巷道不存在目标库位" + inSta.getStaNo()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | // log.error("扫码检测程序异常"+inSta.getStaNo()+"异常信息"+e); |
| | | // 退回 |
| | | log.error("扫码检测程序异常" + inSta.getStaNo() + errMsg); |
| | | log.error("扫码检测程序异常,异常信息" + e); |
| | | |
| | | staProtocol.setWorkNo((short) 9999); |
| | | staProtocol.setStaNo(inSta.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | // TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo)); |
| | | // if (taskWrk != null) { |
| | | // taskWrk.setMemo(errMsg);//将错误码存入备注字段进行展示 |
| | | // taskWrkMapper.updateById(taskWrk); |
| | | // } |
| | | continue; |
| | | } |
| | | //查看该库位是否为空库位 |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "O") |
| | | .eq("loc_no", getWmsDto.getLocNo())); |
| | | if (Cools.isEmpty(locMast)) { |
| | | try { |
| | | HashMap<String, Object> headParam1 = new HashMap<>(); |
| | | headParam1.put("taskNo", getWmsDto.getTaskNo()); |
| | | headParam1.put("status", 6); |
| | | headParam1.put("ioType", 1); |
| | | headParam1.put("barcode", barcode); |
| | | String response2; |
| | | response2 = new HttpHandler.Builder() |
| | | // .setHeaders(headParam) |
| | | .setUri(wmsUrl) |
| | | .setPath(taskStatusFeedbackPath) |
| | | .setJson(JSON.toJSONString(headParam1)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject1 = JSON.parseObject(response2); |
| | | apiLogService.save("wcs派发库位==》不为空《==上报wms" |
| | | , wmsUrl + taskStatusFeedbackPath |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(headParam1) |
| | | , response |
| | | , true |
| | | ); |
| | | } catch (Exception e) { |
| | | log.error("wcs派发库位==》不为空《==上报wms", getWmsDto.getWrkNo()); |
| | | throw new CoolException("wcs派发入库任务上报wms失败,派发库位==》不为空《==,异常信息:" + e); |
| | | } |
| | | } |
| | | |
| | | // 创新一个入库工作档 |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(getWmsDto.getWrkNo()); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | taskWrk = createTask(getWmsDto, barcode); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | log.error("库位异常,库位号:{}", getWmsDto.getTargetLocationCode()); |
| | | } else { |
| | | taskWrkService.insert(taskWrk); |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no", taskWrk.getCrnNo()).eq("type_no", 1).eq("stn_no", staProtocol.getSiteId())); |
| | | staProtocol.setWorkNo(taskWrk.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(staDesc.getCrnStn().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | continue; |
| | | } |
| | | apiLogService.save("wms请求入库货位接口" |
| | | , wmsUrl + inboundTaskApplyPath |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(toWmsDTO) |
| | | , response |
| | | , true |
| | | ); |
| | | |
| | | } else { |
| | | // 退回 |
| | | log.error("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | | |
| | | staProtocol.setWorkNo((short) 9999); |
| | | staProtocol.setStaNo(inSta.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo)); |
| | | if (taskWrk != null) { |
| | | taskWrk.setMemo(errMsg);//将错误码存入备注字段进行展示 |
| | | taskWrkMapper.updateById(taskWrk); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("generateStoreWrkFile e", e); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 堆垛机站出库到出库站 |
| | | */ |
| | | public void crnStnToOutStn() { |
| | | for (CrnSlave crnSlave : slaveProperties.getCrn()) { |
| | | // 遍历堆垛机出库站 |
| | | for (CrnSlave.CrnStn crnStn : crnSlave.getCrnOutStn()) { |
| | | List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("crn_no", crnSlave.getId()).eq("crn_stn", crnStn.getStaNo())); |
| | | for (StaDesc staDesc : staDescs) { |
| | | try { |
| | | // 获取堆垛机出库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == 0)) { |
| | | // 查询工作档 |
| | | TaskWrk taskWrk = taskWrkMapper.selectCrnStaWorking(crnSlave.getId(), staDesc.getStnNo().toString()); |
| | | if (taskWrk == null) { |
| | | continue; |
| | | } |
| | | log.info("下发输送线任务:taskWrk:" + JSON.toJSONString(taskWrk)); |
| | | // R r = siteController.siteDetlUpdate(Integer.valueOf(taskWrk.getTargetPoint()), taskWrk.getWrkNo().shortValue(), (short) 0, "Y", false, false); |
| | | staProtocol.setWorkNo(taskWrk.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(staDesc.getStnNo().shortValue()); |
| | | boolean offer = false; |
| | | try { |
| | | offer = MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol)); |
| | | } catch (Exception e) { |
| | | log.error("下发输送线任务失败:异常:" + e); |
| | | log.error("下发输送线任务失败:异常:offer:" + offer); |
| | | } |
| | | // JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(r)); |
| | | if (offer) { |
| | | log.info("下发输送线任务成功:taskWrk:" + JSON.toJSONString(taskWrk)); |
| | | taskWrk.setStatus(5); |
| | | taskWrk.setWrkSts(14); |
| | | taskWrkService.updateById(taskWrk); |
| | | |
| | | } else { |
| | | log.error("下发输送线任务失败:taskWrk:" + JSON.toJSONString(taskWrk)); |
| | | // log.error("下发输送线任务失败:异常信息:"+JSON.toJSONString(r)); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("出库到出库站异常:异常信息:" + e); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 入出库 ===>> 堆垛机入出库作业下发 |
| | | */ |
| | | public synchronized void crnIoExecute() throws IOException { |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | if (crnProtocol == null) { |
| | | continue; |
| | | } |
| | | BasCrnp basCrnp = basCrnpService.selectById(crn.getId()); |
| | | if (basCrnp == null) { |
| | | log.error("{}号堆垛机尚未在数据库进行维护!", crn.getId()); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | // 只有当堆垛机空闲 并且 无任务时才继续执行 |
| | | if (crnProtocol.getStatusType() == CrnStatusType.IDLE && crnProtocol.getTaskNo() == 0 && crnProtocol.getModeType() == CrnModeType.AUTO |
| | | && crnProtocol.getLoaded() == 0 && crnProtocol.getForkPos() == 0) { |
| | | // 如果最近一次是入库模式 |
| | | if (crnProtocol.getLastIo().equals("I")) { |
| | | if (basCrnp.getInEnable().equals("Y")) { |
| | | this.crnStnToLoc(crn, crnProtocol); // 入库 |
| | | crnProtocol.setLastIo("O"); |
| | | } else if (basCrnp.getOutEnable().equals("Y")) { |
| | | this.locToCrnStn(crn, crnProtocol); // 出库 |
| | | crnProtocol.setLastIo("I"); |
| | | } |
| | | } |
| | | // 如果最近一次是出库模式 |
| | | else if (crnProtocol.getLastIo().equals("O")) { |
| | | if (basCrnp.getOutEnable().equals("Y")) { |
| | | this.locToCrnStn(crn, crnProtocol); // 出库 |
| | | crnProtocol.setLastIo("I"); |
| | | } else if (basCrnp.getInEnable().equals("Y")) { |
| | | this.crnStnToLoc(crn, crnProtocol); // 入库 |
| | | crnProtocol.setLastIo("O"); |
| | | } |
| | | } |
| | | |
| | | // 库位移转 |
| | | this.locToLoc(crn, crnProtocol); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 入库 ===>> 堆垛机站到库位 |
| | | */ |
| | | public void crnStnToLoc(CrnSlave slave, CrnProtocol crnProtocol) throws IOException { |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnInStn()) { |
| | | List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("crn_no", slave.getId()).eq("crn_stn", crnStn.getStaNo())); |
| | | for (StaDesc staDesc : staDescs) { |
| | | boolean flag = false; |
| | | // 获取堆垛机入库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | // 查询站点详细信息 |
| | | BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo()); |
| | | if (staDetl == null) { |
| | | log.error("入库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo()); |
| | | continue; |
| | | } |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable() |
| | | && staDetl.getCanining() != null && staDetl.getCanining().equals("Y")) { |
| | | flag = true; |
| | | } |
| | | if (!flag) { |
| | | continue; |
| | | } |
| | | |
| | | // 获取工作状态为2(设备上走)的入库工作档 |
| | | TaskWrk taskWrk = taskWrkMapper.selectPakIn(slave.getId(), staProtocol.getWorkNo().intValue(), staDesc.getStnNo().toString()); |
| | | if (null == taskWrk) { |
| | | continue; |
| | | } |
| | | |
| | | // 堆垛机控制过滤 |
| | | if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) { |
| | | continue; |
| | | } |
| | | |
| | | // 已经存在吊车执行任务时,则过滤 |
| | | if (taskWrkMapper.selectCrnWorking(slave.getId()) != null) { |
| | | continue; |
| | | } |
| | | |
| | | // int workNo = commonService.getWorkNo(WorkNoType.PAKIN.type);//获取入库工作号 |
| | | // taskWrk.setWrkNo(workNo);//工作号 |
| | | taskWrk.setStatus(TaskStatusType.DISTRIBUTE.id);//派发状态 |
| | | taskWrk.setAssignTime(new Date());//派发时间 |
| | | taskWrk.setWrkSts(3);//工作状态 3.吊车入库 |
| | | taskWrk.setCrnNo(staDesc.getCrnNo());//堆垛机号 |
| | | taskWrk.setModiTime(new Date()); |
| | | taskWrk.setModiUser(9988L); |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | | crnCommand.setCrnNo(staDesc.getCrnNo()); // 堆垛机编号 |
| | | crnCommand.setTaskNo(taskWrk.getWrkNo().shortValue()); // 工作号 |
| | | crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | | crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 任务模式: 库位移转 |
| | | crnCommand.setSourcePosX(crnStn.getRow().shortValue()); // 源库位列 |
| | | crnCommand.setSourcePosY(crnStn.getBay().shortValue()); // 源库位层 |
| | | crnCommand.setSourcePosZ(crnStn.getLev().shortValue()); // 源库位排 |
| | | crnCommand.setDestinationPosX(Utils.getRowShort(taskWrk.getTargetPoint())); // 目标库位列 |
| | | crnCommand.setDestinationPosY(Utils.getBayShort(taskWrk.getTargetPoint())); // 目标库位层 |
| | | crnCommand.setDestinationPosZ(Utils.getLevShort(taskWrk.getTargetPoint())); // 目标库位排 |
| | | crnCommand.setCommand((short) 1); |
| | | log.info("堆垛机入库任务下发={}", crnCommand); |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(2, crnCommand), false)) { |
| | | log.error("堆垛机命令生成失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | throw new CoolException("堆垛机命令生成失败"); |
| | | } else { |
| | | try { |
| | | taskWrkService.updateById(taskWrk); |
| | | } catch (Exception e) { |
| | | log.error("修改工作档状态 2.设备上走 => 3.吊车入库中 失败!!,工作号={}", taskWrk.getWrkNo()); |
| | | log.error("修改工作档状态 2.设备上走 => 3.吊车入库中 失败!!,异常:" + e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 出库 ===>> 库位到堆垛机站 |
| | | * 2022-06-09 TQS修改,查询工作档LIST,遍历下发,防止第一个任务堵塞出库 |
| | | */ |
| | | public void locToCrnStn(CrnSlave slave, CrnProtocol crnProtocol) { |
| | | List<TaskWrk> taskWrksInitial = taskWrkMapper.selectPakOut(slave.getId(), null); |
| | | if (taskWrksInitial.size() == 0) { |
| | | return; |
| | | } |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("crn_no", slave.getId()).eq("crn_stn", crnStn.getStaNo())); |
| | | for (StaDesc staDesc : staDescs) { |
| | | // 获取工作状态为11(生成出库ID)的出库工作档 |
| | | List<TaskWrk> taskWrks = taskWrkMapper.selectPakOut(slave.getId(), staDesc.getStnNo().toString()); |
| | | for (TaskWrk taskWrk : taskWrks) { |
| | | if (taskWrk == null) { |
| | | continue; |
| | | } |
| | | // 工作档状态判断 |
| | | if (taskWrk.getIoType() != 2 || taskWrk.getTargetPoint() == null || taskWrk.getStartPoint() == null) { |
| | | log.error("查询工作档数据不符合条件--入出类型/站点, 工作号={},源库位={},入出类型={}", taskWrk.getWrkNo(), taskWrk.getStartPoint(), taskWrk.getIoType()); |
| | | continue; |
| | | } |
| | | |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | //判断其库位是否为深库位,如果为深库位找其浅库位是都有货 |
| | | if (locMast.getRow1() == 1 || locMast.getRow1() == 5) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1() + 1)) |
| | | .eq("bay1", locMast.getBay1()) |
| | | .eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | continue; |
| | | } |
| | | } else if (locMast.getRow1() == 4 || locMast.getRow1() == 8) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1() - 1)) |
| | | .eq("bay1", locMast.getBay1()) |
| | | .eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 获取堆垛机出库站信息 |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); |
| | | if (staProtocol == null) { |
| | | break; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | |
| | | // 查询站点详细信息 |
| | | BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo()); |
| | | if (staDetl == null) { |
| | | log.error("出库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo()); |
| | | break; |
| | | } |
| | | |
| | | // 判断堆垛机出库站状态 |
| | | if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) { |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | |
| | | // 堆垛机控制过滤 |
| | | if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) { |
| | | break; |
| | | } |
| | | |
| | | // 已经存在吊车执行任务时,则过滤 |
| | | if (taskWrkMapper.selectCrnWorking(slave.getId()) != null) { |
| | | break; |
| | | } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(taskWrk.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo(taskWrk.getWrkNo().shortValue()); // 工作号 |
| | | command.setAckFinish((short) 0); // 任务完成确认位 |
| | | command.setTaskMode(CrnTaskModeType.PAKIN); // 任务模式 |
| | | command.setSourcePosX(Utils.getRowShort(taskWrk.getStartPoint())); // 源库位排 |
| | | command.setSourcePosY(Utils.getBayShort(taskWrk.getStartPoint())); // 源库位列 |
| | | command.setSourcePosZ(Utils.getLevShort(taskWrk.getStartPoint())); // 源库位层 |
| | | command.setDestinationPosX(crnStn.getRow().shortValue()); // 目标库位排 |
| | | command.setDestinationPosY(crnStn.getBay().shortValue()); // 目标库位列 |
| | | command.setDestinationPosZ(crnStn.getLev().shortValue()); // 目标库位层 |
| | | command.setCommand((short) 1); |
| | | |
| | | if (Cools.isEmpty(taskWrk.getMarkStart()) || taskWrk.getMarkStart() == 0) { |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("TaskNo", taskWrk.getTaskNo()); |
| | | String response = ""; |
| | | try { |
| | | //开始上报,出库任务开始时,WCS回调WMS |
| | | response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath(taskStatusFeedbackPath) |
| | | .setJson(JSON.toJSONString(hashMap)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | Boolean bool = false; |
| | | if (jsonObject.get("ReturnStatus").equals(0)) { |
| | | bool = true; |
| | | taskWrk.setMarkStart(1); |
| | | } |
| | | apiLogService.save("wcs开始任务上报wms" |
| | | , wmsUrl + TaskExecCallback |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(hashMap) |
| | | , response |
| | | , bool |
| | | ); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(2, command), false)) { |
| | | log.error("堆垛机命令生成失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(command)); |
| | | throw new CoolException("堆垛机命令生成失败"); |
| | | } else { |
| | | try { |
| | | // 修改工作档状态 11.生成出库ID => 12.吊车出库中 |
| | | Date now = new Date(); |
| | | taskWrk.setWrkSts(12); |
| | | taskWrk.setStatus(2); |
| | | taskWrk.setModiTime(now); |
| | | if (taskWrkMapper.updateById(taskWrk) == 0) { |
| | | log.error("修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,工作号={}", taskWrk.getWrkNo()); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,工作号={}", taskWrk.getWrkNo()); |
| | | log.error("修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,异常:" + e); |
| | | } |
| | | // try { |
| | | // HashMap<String, Object> headParam = new HashMap<>(); |
| | | // headParam.put("taskNo", taskWrk.getTaskNo()); |
| | | // headParam.put("status", taskWrk.getStatus()); |
| | | // headParam.put("ioType", taskWrk.getIoType()); |
| | | // headParam.put("barcode", taskWrk.getBarcode()); |
| | | // String response; |
| | | // response = new HttpHandler.Builder() |
| | | // // .setHeaders(headParam) |
| | | // .setUri(wmsUrl) |
| | | // .setPath(taskStatusFeedbackPath) |
| | | // .setJson(JSON.toJSONString(headParam)) |
| | | // .build() |
| | | // .doPost(); |
| | | // JSONObject jsonObject = JSON.parseObject(response); |
| | | // apiLogService.save("wcs派发出库任务上报wms" |
| | | // , wmsUrl + taskStatusFeedbackPath |
| | | // , null |
| | | // , "127.0.0.1" |
| | | // , JSON.toJSONString(headParam) |
| | | // , response |
| | | // , true |
| | | // ); |
| | | // } catch (Exception e) { |
| | | // log.error("wcs派发出库任务上报wms失败", JSON.toJSONString(taskWrk)); |
| | | //// throw new CoolException("wcs派发入库任务上报wms失败"); |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 库位移转 |
| | | */ |
| | | public void locToLoc(CrnSlave slave, CrnProtocol crnProtocol) { |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | // 获取工作状态为11(生成出库ID)的移库工作档 |
| | | List<TaskWrk> taskWrks = taskWrkMapper.selectList(new EntityWrapper<TaskWrk>() |
| | | .eq("crn_no", slave.getId()) |
| | | .eq("wrk_sts", 11) |
| | | .eq("io_type", 3) |
| | | .orderBy("io_pri", false)); |
| | | for (TaskWrk taskWrk : taskWrks) { |
| | | |
| | | // 双深库位且浅库位有货,则需先对浅库位进行库位移转 |
| | | // if (Utils.isDeepLoc(slaveProperties, taskWrk.getStartPoint())) { |
| | | // String shallowLocNo = Utils.getShallowLoc(slaveProperties, taskWrk.getStartPoint()); |
| | | // TaskWrk hallowLocNoTask = taskWrkMapper.selectByStartPoint(shallowLocNo); |
| | | // if (!Cools.isEmpty(hallowLocNoTask)){ |
| | | // continue; |
| | | // } |
| | | // } |
| | | // 堆垛机控制过滤 |
| | | if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) { |
| | | continue; |
| | | } |
| | | |
| | | // 已经存在吊车执行任务时,则过滤 |
| | | if (taskWrkMapper.selectCrnWorking(slave.getId()) != null) { |
| | | continue; |
| | | } |
| | | |
| | | if (taskWrk == null || Cools.isEmpty(taskWrk.getTargetPoint()) || taskWrk.getTargetPoint().equals("") || taskWrk.getWrkNo() == null) { |
| | | continue; |
| | | } |
| | | // 工作档状态判断 |
| | | if (taskWrk.getIoType() != 3 || taskWrk.getTargetPoint() == null) { |
| | | log.error("查询工作档数据不符合条件--入出类型/目标库位号, 工作号={},源库位={},入出类型={}", taskWrk.getWrkNo(), taskWrk.getTargetPoint(), taskWrk.getIoType()); |
| | | continue; |
| | | } |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | |
| | | |
| | | // 1.堆垛机开始移动 |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | | crnCommand.setCrnNo(slave.getId()); // 堆垛机编号 |
| | | crnCommand.setTaskNo(taskWrk.getWrkNo().shortValue()); // 工作号 |
| | | crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | | crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 任务模式: 库位移转 |
| | | crnCommand.setSourcePosX(Utils.getRowShort(taskWrk.getStartPoint())); // 源库位排 |
| | | crnCommand.setSourcePosY(Utils.getBayShort(taskWrk.getStartPoint())); // 源库位列 |
| | | crnCommand.setSourcePosZ(Utils.getLevShort(taskWrk.getStartPoint())); // 源库位层 |
| | | crnCommand.setDestinationPosX(Utils.getRowShort(taskWrk.getTargetPoint())); // 目标库位排 |
| | | crnCommand.setDestinationPosY(Utils.getBayShort(taskWrk.getTargetPoint())); // 目标库位列 |
| | | crnCommand.setDestinationPosZ(Utils.getLevShort(taskWrk.getTargetPoint())); // 目标库位层 |
| | | crnCommand.setCommand((short) 1); |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(2, crnCommand), false)) { |
| | | log.error("堆垛机命令下发失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | } else { |
| | | // 修改工作档状态 11.生成出库ID => 12.吊车出库中 |
| | | Date now = new Date(); |
| | | taskWrk.setWrkSts(12); |
| | | taskWrk.setStatus(2); |
| | | taskWrk.setModiTime(now); |
| | | if (taskWrkMapper.updateById(taskWrk) == 0) { |
| | | log.error("修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,工作号={}", taskWrk.getWrkNo()); |
| | | } |
| | | try { |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("TaskNo", taskWrk.getTaskNo()); |
| | | String response; |
| | | response = new HttpHandler.Builder() |
| | | // .setHeaders(headParam) |
| | | .setUri(wmsUrl) |
| | | .setPath(taskStatusFeedbackPath) |
| | | .setJson(JSON.toJSONString(headParam)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | apiLogService.save("wcs派发移库任务上报wms" |
| | | , wmsUrl + taskStatusFeedbackPath |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(headParam) |
| | | , response |
| | | , true |
| | | ); |
| | | } catch (Exception e) { |
| | | log.error("wcs派发移库库任务上报wms失败", taskWrk); |
| | | // throw new CoolException("wcs派发移库库任务上报wms失败"); |
| | | } |
| | | |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 执行对工作档的完成操作 |
| | | */ |
| | | // public void storeFinished() { |
| | | // for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // // 获取堆垛机信息 |
| | | // CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | // CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | // if (crnProtocol == null) { continue; } |
| | | // |
| | | // // 状态:等待确认 并且 任务完成位 = 1 |
| | | // if (crnProtocol.getTaskFinish() == 0 && crnProtocol.statusType == CrnStatusType.HANDLING_COMPLETED && crnProtocol.getTaskNo() != 0) { |
| | | // //获取入库待确认工作档 |
| | | // TaskWrk taskWrk = taskWrkMapper.selectCrnNoInWorking(crn.getId(),crnProtocol.getTaskNo().intValue()); |
| | | // if (Cools.isEmpty(taskWrk)) { |
| | | //// log.error("堆垛机处于等待确认且任务完成状态,但未找到工作档。堆垛机号={},工作号={}", crn.getId(), crnProtocol.getTaskNo()); |
| | | // continue; |
| | | // } |
| | | // |
| | | // //获取指令ID |
| | | // Integer commandId = crnProtocol.getCommandId(); |
| | | // CommandInfo commandInfo = new CommandInfo(); |
| | | // if (Cools.isEmpty(commandId)){ |
| | | // commandInfo = commandInfoService.selectOne(new EntityWrapper<CommandInfo>() |
| | | // .eq("wrk_no",crnProtocol.getTaskNo()) |
| | | // .eq("device","Crn")); |
| | | // }else { |
| | | // commandInfo = commandInfoService.selectById(commandId); |
| | | // } |
| | | // |
| | | // |
| | | // if (commandInfo == null) { |
| | | // //指令不存在 |
| | | // continue; |
| | | // } |
| | | // if (commandInfo.getCommandStatus() == 3){ |
| | | // continue; |
| | | // } |
| | | // commandInfo.setCommandStatus(CommandStatusType.COMPLETE.id);//指令完成 |
| | | // commandInfo.setCompleteTime(new Date());//指令完成时间 |
| | | // if (commandInfoService.updateById(commandInfo)) {//修改成功后复位堆垛机 |
| | | // // 堆垛机复位 |
| | | // crnThread.setResetFlag(true); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * 执行对工作档的完成操作 |
| | | */ |
| | | public void storeFinished() throws InterruptedException { |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | if (crnProtocol == null) { |
| | | continue; |
| | | } |
| | | |
| | | // 状态:等待确认 并且 任务完成位 = 1 |
| | | if (crnProtocol.getTaskFinish() == 0 && crnProtocol.statusType == CrnStatusType.HANDLING_COMPLETED && crnProtocol.getTaskNo() != 0) { |
| | | //获取入库待确认工作档 |
| | | TaskWrk taskWrk = taskWrkMapper.selectCrnNoInWorking(crn.getId(), crnProtocol.getTaskNo().intValue()); |
| | | if (Cools.isEmpty(taskWrk) && crnProtocol.getTaskNo() != 999) { |
| | | log.error("堆垛机处于等待确认且任务完成状态,但未找到工作档。堆垛机号={},工作号={}", crn.getId(), crnProtocol.getTaskNo()); |
| | | continue; |
| | | } |
| | | //确认完成信号 |
| | | CrnOperatorParam crnOperatorParam = new CrnOperatorParam(); |
| | | crnOperatorParam.setCrnNo(crn.getId()); |
| | | R r = crnController.crnTaskComplete(crnOperatorParam); |
| | | Thread.sleep(1000); |
| | | if (!r.get("code").equals(200)) { |
| | | return; |
| | | } |
| | | if (!Cools.isEmpty(taskWrk)) { |
| | | if (taskWrk.getIoType() == 1 && taskWrk.getWrkSts() == 3) { |
| | | taskWrk.setWrkSts(4);//入库完成 |
| | | taskWrk.setStatus(5);//完结 |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | locMast.setLocSts("F");//F.在库 |
| | | locMast.setBarcode(taskWrk.getBarcode());//托盘码 |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | } else if (taskWrk.getIoType() == 2 && taskWrk.getWrkSts() == 12) { |
| | | taskWrk.setWrkSts(13);//出库完成 |
| | | taskWrk.setStatus(5);//完结 |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | locMast.setLocSts("O");//O.空库位 |
| | | locMast.setBarcode("");//托盘码 |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | } else if (taskWrk.getIoType() == 3 && taskWrk.getWrkSts() == 12) { |
| | | taskWrk.setWrkSts(4);//入库完成 |
| | | taskWrk.setStatus(5);//完结 |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | locMast.setLocSts("F");//F.在库 |
| | | locMast.setBarcode(taskWrk.getBarcode());//托盘码 |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | |
| | | LocMast locMast1 = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | locMast1.setLocSts("O");//O.空库位 |
| | | locMast1.setBarcode("");//托盘码 |
| | | locMast1.setModiTime(new Date()); |
| | | locMast1.setModiUser(9999L); |
| | | locMastService.updateById(locMast1); |
| | | } |
| | | taskWrkService.updateById(taskWrk); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 堆垛机异常信息记录 |
| | | */ |
| | | public void recCrnErr() { |
| | | Date now = new Date(); |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | if (crnProtocol == null) { |
| | | continue; |
| | | } |
| | | if (false) { |
| | | // if (crnProtocol.getModeType() != CrnModeType.STOP) { |
| | | // 有任务 |
| | | if (crnProtocol.getTaskNo() != 0) { |
| | | BasErrLog latest = basErrLogService.findLatestByTaskNo(crn.getId(), crnProtocol.getTaskNo().intValue()); |
| | | // 有异常 |
| | | if (latest == null) { |
| | | if (crnProtocol.getAlarm() != null && crnProtocol.getAlarm() > 0) { |
| | | WrkMast wrkMast = wrkMastMapper.selectById(crnProtocol.getTaskNo()); |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm()); |
| | | String errName = crnError == null ? String.valueOf(crnProtocol.getAlarm()) : crnError.getErrName(); |
| | | BasErrLog basErrLog = new BasErrLog( |
| | | null, // 编号 |
| | | wrkMast.getWrkNo(), // 工作号 |
| | | now, // 发生时间 |
| | | null, // 结束时间 |
| | | wrkMast.getWrkSts(), // 工作状态 |
| | | wrkMast.getIoType(), // 入出库类型 |
| | | crn.getId(), // 堆垛机 |
| | | null, // plc |
| | | wrkMast.getLocNo(), // 目标库位 |
| | | wrkMast.getStaNo(), // 目标站 |
| | | wrkMast.getSourceStaNo(), // 源站 |
| | | wrkMast.getSourceLocNo(), // 源库位 |
| | | wrkMast.getBarcode(), // 条码 |
| | | (int) crnProtocol.getAlarm1(), // 异常码 |
| | | errName, // 异常 |
| | | 1, // 异常情况 |
| | | now, // 添加时间 |
| | | null, // 添加人员 |
| | | now, // 修改时间 |
| | | null, // 修改人员 |
| | | "任务中异常" // 备注 |
| | | ); |
| | | if (!basErrLogService.insert(basErrLog)) { |
| | | log.error("堆垛机plc异常记录失败 ===>> [id:{}] [error:{}]", crn.getId(), errName); |
| | | } |
| | | } |
| | | } else { |
| | | // 异常修复 |
| | | if (crnProtocol.getAlarm1() == null || crnProtocol.getAlarm1() == 0) { |
| | | latest.setEndTime(now); |
| | | latest.setUpdateTime(now); |
| | | latest.setStatus(2); |
| | | if (!basErrLogService.updateById(latest)) { |
| | | log.error("堆垛机plc异常记录修复失败 ===>> [id:{}] [errLogId:{}]", crn.getId(), latest.getId()); |
| | | } |
| | | } |
| | | } |
| | | // 无任务 |
| | | } else { |
| | | BasErrLog latest = basErrLogService.findLatest(crn.getId()); |
| | | // 有异常 |
| | | if (crnProtocol.getAlarm1() != null && crnProtocol.getAlarm() > 0) { |
| | | // 记录新异常 |
| | | if (latest == null || (latest.getErrCode() != crnProtocol.getAlarm().intValue())) { |
| | | BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm()); |
| | | String errName = crnError == null ? String.valueOf(crnProtocol.getAlarm()) : crnError.getErrName(); |
| | | BasErrLog basErrLog = new BasErrLog( |
| | | null, // 编号 |
| | | null, // 工作号 |
| | | now, // 发生时间 |
| | | null, // 结束时间 |
| | | null, // 工作状态 |
| | | null, // 入出库类型 |
| | | crn.getId(), // 堆垛机 |
| | | null, // plc |
| | | null, // 目标库位 |
| | | null, // 目标站 |
| | | null, // 源站 |
| | | null, // 源库位 |
| | | null, // 条码 |
| | | (int) crnProtocol.getAlarm1(), // 异常码 |
| | | errName, // 异常 |
| | | 1, // 异常情况 |
| | | now, // 添加时间 |
| | | null, // 添加人员 |
| | | now, // 修改时间 |
| | | null, // 修改人员 |
| | | "无任务异常" // 备注 |
| | | ); |
| | | if (!basErrLogService.insert(basErrLog)) { |
| | | log.error("堆垛机plc异常记录失败 ===>> [id:{}] [error:{}]", crn.getId(), errName); |
| | | } |
| | | } |
| | | // 无异常 |
| | | } else { |
| | | // 异常修复 |
| | | if (latest != null && latest.getStatus() == 1) { |
| | | latest.setEndTime(now); |
| | | latest.setUpdateTime(now); |
| | | latest.setStatus(2); |
| | | if (!basErrLogService.updateById(latest)) { |
| | | log.error("堆垛机plc异常记录修复失败 ===>> [id:{}] [errLogId:{}]", crn.getId(), latest.getId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | //自动派发任务 |
| | | public void autoDistribute() { |
| | | Config config = configService.selectByCode("autoDistribute"); |
| | | if (config == null) { |
| | | return; |
| | | } |
| | | |
| | | if (config.getValue().equals("false")) {//判断是否开启自动派发任务 |
| | | return; |
| | | } |
| | | |
| | | for (TaskWrk taskWrk : taskWrkService.selectReceive()) { |
| | | |
| | | try { |
| | | taskWrkService.distribute(taskWrk.getTaskNo(), 9527L); |
| | | } catch (CoolException e) { |
| | | log.info(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //agv取放货任务完成 |
| | | public synchronized void autoCompleteAGV() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | try { |
| | | Thread.sleep(500); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | |
| | | for (BasDevp basDevp : basDevps) { |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | StaProtocol staProtocol = devpThread.getStation().get(basDevp.getDevNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if (basDevp.getWrkNo() != 0) { |
| | | if (basDevp.getAgvTargetPick() != 0) {//取货 |
| | | staProtocol.setAgvTypeSign((short) 0); |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } |
| | | boolean sign = true; |
| | | if (basDevp.getAgvTargetPlace() != 0) { |
| | | sign = false; |
| | | basDevp.setAgvTargetPlace(0); |
| | | basDevpService.updateById(basDevp); |
| | | staProtocol.setAgvTypeSign((short) 3);//1 |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } |
| | | } else { |
| | | if (basDevp.getAgvTargetPlace() != 0) { |
| | | if (basDevp.getLoading().equals("Y")) { |
| | | staProtocol.setAgvTypeSign((short) 1); |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } else { |
| | | log.error("AGV放货完成但输送线无物,复位信号 ===>> [staNo:{}] [basDevp:{}]", basDevp.getDevNo(), basDevp); |
| | | basDevp.setAgvTargetPlace(0); |
| | | basDevpService.updateById(basDevp); |
| | | staProtocol.setAgvTypeSign((short) 3);//1 |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } |
| | | |
| | | } |
| | | if (basDevp.getAgvTargetPick() != 0) { |
| | | basDevp.setAgvTargetPick(0); |
| | | basDevpService.updateById(basDevp); |
| | | staProtocol.setAgvTypeSign((short) 2);//0 |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public synchronized void autoCompleteTask() { |
| | | List<TaskWrk> taskWrks = taskWrkMapper.selectWorkingTask(); |
| | | for (TaskWrk taskWrk : taskWrks) { |
| | | //获取命令集合 |
| | | List<CommandInfo> commandInfos = commandInfoService.selectByTaskNo(taskWrk.getTaskNo()); |
| | | if (taskWrk.getCommandStep() < commandInfos.size()) { |
| | | continue;//当前步序没有到达最后一条命令 |
| | | } |
| | | |
| | | //判断末端命令是否执行完成 |
| | | CommandInfo commandInfo = commandInfos.get(commandInfos.size() - 1); |
| | | if (commandInfo.getCommandStatus() != CommandStatusType.COMPLETE.id) { |
| | | continue;//指令未完成 |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | //指令已完成,更新任务 |
| | | if (taskWrk.getIoType() == 1) { |
| | | //入库任务 |
| | | taskWrk.setWrkSts(4);//3.吊车入库中 => 4.入库完成 |
| | | //taskWrk.setStatus(TaskStatusType.COMPLETE.id); |
| | | taskWrk.setModiTime(now); |
| | | taskWrkService.updateById(taskWrk); |
| | | |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | locMast.setLocSts("F");//F.在库 |
| | | locMast.setBarcode(taskWrk.getBarcode());//托盘码 |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | } else if (taskWrk.getIoType() == 2) { |
| | | //出库任务 |
| | | taskWrk.setWrkSts(14);//12.吊车出库中 => 14.出库完成 |
| | | // taskWrk.setStatus(TaskStatusType.COMPLETE.id); |
| | | taskWrk.setModiTime(now); |
| | | taskWrkService.updateById(taskWrk); |
| | | |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | locMast.setLocSts("O");//O.空库位 |
| | | locMast.setBarcode("");//托盘码 |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public synchronized String CrnStartRunning(TaskWrk taskWrk) { |
| | | String tasktype = null; |
| | | switch (taskWrk.getIoType()) { |
| | | case 1: |
| | | tasktype = "RK"; |
| | | break; |
| | | case 2: |
| | | tasktype = "CK"; |
| | | break; |
| | | case 3: |
| | | tasktype = "YK"; |
| | | break; |
| | | default: |
| | | tasktype = "未知"; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("x-api-key", "7a15b5db-29b6-552c-8cff-0cfec3756da2"); |
| | | TaskOverToWms taskOverToWms = new TaskOverToWms(); |
| | | taskOverToWms.setFeedbackFrom("WCS"); //来源 |
| | | taskOverToWms.setWarehouseId("1688469798893297665"); //仓库标识 |
| | | taskOverToWms.setTaskNo(taskWrk.getTaskNo()); //任务号 |
| | | taskOverToWms.setTaskType(tasktype); // 任务类型 |
| | | taskOverToWms.setContainerCode(taskWrk.getBarcode()); // 容器编码 |
| | | if (taskWrk.getIoType() == 1 || taskWrk.getIoType() == 3) { |
| | | taskOverToWms.setEquipmentCode(String.valueOf(taskWrk.getCrnNo())); //设备编码 |
| | | taskOverToWms.setTargetLocationCode(taskWrk.getOriginTargetPoint()); //目标库位 |
| | | } else if (taskWrk.getIoType() == 2) { |
| | | Map<Integer, String> map1 = new HashMap<>(); |
| | | map1.put(102, "J-1101"); |
| | | map1.put(106, "J-1103"); |
| | | map1.put(110, "J-1105"); |
| | | map1.put(114, "J-1107"); |
| | | map1.put(118, "J-1109"); |
| | | map1.put(122, "J-1111"); |
| | | map1.put(305, "H-1101"); |
| | | map1.put(405, "G-1101"); |
| | | taskOverToWms.setEquipmentCode(map1.get(taskWrk.getTargetPoint())); //设备编码 |
| | | taskOverToWms.setSourceLocationCode(taskWrk.getOriginStartPoint()); //源库位 |
| | | } |
| | | |
| | | taskOverToWms.setTaskStatus("executing"); //任务状态 |
| | | String response = null; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setHeaders(map) |
| | | .setUri(wmsUrl) |
| | | .setPath("wcsManager/wcsInterface/taskStatusFeedback") |
| | | .setJson(JSON.toJSONString(taskOverToWms)) |
| | | .build() |
| | | .doPost(); |
| | | } catch (Exception e) { |
| | | log.error("堆垛机任务完成,请求wms任务完成接口失败"); |
| | | } |
| | | apiLogService.save("堆垛机开始运行" |
| | | , wmsUrl + "wcsManager/wcsInterface/taskStatusFeedback" |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(taskOverToWms) |
| | | , response |
| | | , true |
| | | ); |
| | | return response; |
| | | } |
| | | |
| | | private TaskWrk createTask1(Result result, String barcode) { |
| | | String locNo = Utils.Fusion(result.getRow(), result.getFloor(), result.getColumn()); |
| | | |
| | | |
| | | Date now = new Date(); |
| | | TaskWrk taskWrk = new TaskWrk(); |
| | | int workNo1 = commonService.getWorkNo(WorkNoType.PAKIN.type);//获取入库工作号 |
| | | taskWrk.setTaskNo(result.getTaskNo());//任务号 |
| | | taskWrk.setWrkNo(workNo1); |
| | | taskWrk.setStatus(TaskStatusType.DISTRIBUTE.id);//任务状态:派发 |
| | | taskWrk.setCreateTime(now); |
| | | taskWrk.setIoType(1);//任务类型 |
| | | taskWrk.setIoPri(13);//优先级 |
| | | taskWrk.setBarcode(barcode);//条码 |
| | | LocMast locMast = locMastService.selectByLocNo(locNo); |
| | | taskWrk.setCrnNo(locMast.getCrnNo()); |
| | | taskWrk.setTargetPoint(locNo); |
| | | taskWrk.setStartPoint("116"); |
| | | if (result.getAlley().equals("1")) { |
| | | taskWrk.setCrnNo(1); |
| | | } else { |
| | | taskWrk.setCrnNo(2); |
| | | } |
| | | if (taskWrk.getIoType() == 1) { |
| | | taskWrk.setWrkSts(2); |
| | | if (!Cools.isEmpty(taskWrk.getTargetPoint())) { |
| | | taskWrk.setOriginTargetPoint(taskWrk.getTargetPoint()); |
| | | } |
| | | } |
| | | return taskWrk; |
| | | } |
| | | |
| | | private TaskWrk createTask(GetWmsDto dto, String barcode) { |
| | | String wcsLocNo = dto.getLocNo(); |
| | | if (Cools.isEmpty(wcsLocNo)) { |
| | | return null; |
| | | } |
| | | Date now = new Date(); |
| | | TaskWrk taskWrk = new TaskWrk(); |
| | | int workNo1 = commonService.getWorkNo(WorkNoType.PAKIN.type);//获取入库工作号 |
| | | taskWrk.setTaskNo(dto.getWrkNo());//任务号 |
| | | taskWrk.setWrkNo(workNo1); |
| | | taskWrk.setStatus(TaskStatusType.RECEIVE.id);//任务状态:接收 |
| | | taskWrk.setCreateTime(now); |
| | | taskWrk.setIoType(1);//任务类型 |
| | | taskWrk.setIoPri(Cools.isEmpty(dto.getTaskPriority()) ? 300 : Integer.parseInt(dto.getTaskPriority()));//优先级 |
| | | taskWrk.setBarcode(barcode);//条码 |
| | | LocMast locMast = locMastService.selectByLocNo(wcsLocNo); |
| | | taskWrk.setCrnNo(locMast.getCrnNo()); |
| | | taskWrk.setTargetPoint(wcsLocNo); |
| | | taskWrk.setStartPoint(dto.getStaNo().toString()); |
| | | if (taskWrk.getIoType() == 1) { |
| | | taskWrk.setWrkSts(2); |
| | | if (!Cools.isEmpty(taskWrk.getTargetPoint())) { |
| | | taskWrk.setOriginTargetPoint(taskWrk.getTargetPoint()); |
| | | } |
| | | |
| | | // } else if (param.getIoType() == 2) { |
| | | // taskWrk.setWrkSts(11); |
| | | // if (!Cools.isEmpty(param.getStartPoint())) { |
| | | // taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//起点 |
| | | // taskWrk.setOriginStartPoint(param.getStartPoint()); |
| | | // } |
| | | // taskWrk.setTargetPoint(param.getTargetPoint()); |
| | | // }else if (param.getIoType() == 3){ |
| | | // taskWrk.setWrkSts(11); |
| | | // if (!Cools.isEmpty(param.getStartPoint())) { |
| | | // taskWrk.setStartPoint(param.getStartPoint());//起点 |
| | | // taskWrk.setOriginStartPoint(param.getStartPoint()); |
| | | // } |
| | | } |
| | | return taskWrk; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.DataResourceMapper; |
| | | import com.zy.asrs.entity.DataResource; |
| | | import com.zy.asrs.service.DataResourceService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.DataResource; |
| | | import com.zy.asrs.mapper.DataResourceMapper; |
| | | import com.zy.asrs.service.DataResourceService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | for (DataResource dataResource : dataResources) {//将普通数据和有孩子节点数据进行分割 |
| | | if (this.hasChild(dataResource.getId())) { |
| | | listChild.add(dataResource); |
| | | }else { |
| | | } else { |
| | | list.add(dataResource); |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.DeviceErrorMapper; |
| | | import com.zy.asrs.entity.DeviceError; |
| | | import com.zy.asrs.service.DeviceErrorService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.asrs.entity.DeviceError; |
| | | import com.zy.asrs.mapper.DeviceErrorMapper; |
| | | import com.zy.asrs.service.DeviceErrorService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | |
| | | @Service("deviceErrorService") |
| | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.WmsLocStatus; |
| | | import com.zy.asrs.entity.param.TaskOverToWms; |
| | | import com.zy.asrs.entity.param.WMSAndAGVInterfaceParam; |
| | | import com.zy.asrs.mapper.LocMastMapper; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.LocMastService; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @Service("locMastService") |
| | | public class LocMastServiceImpl extends ServiceImpl<LocMastMapper, LocMast> implements LocMastService { |
| | |
| | | |
| | | @Override |
| | | public LocMast selectByLocNo(String locNo) { |
| | | return this.selectOne(new EntityWrapper<LocMast>().eq("loc_no",locNo)); |
| | | return this.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locNo)); |
| | | |
| | | //return this.baseMapper.selectByLocNo(locNo); |
| | | } |
| | |
| | | public R toWmsLocStatus(LocMast locMast) { |
| | | String response = null; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("x-api-key","7a15b5db-29b6-552c-8cff-0cfec3756da2"); |
| | | map.put("x-api-key", "7a15b5db-29b6-552c-8cff-0cfec3756da2"); |
| | | WmsLocStatus param = new WmsLocStatus(); |
| | | param.setWarehouseId("1688469798893297665"); |
| | | param.setLocationCode(Utils.getWmsLocNo(locMast.getLocNo())); |
| | | param.setEmptyContainer(locMast.getEmptyContainer$()); |
| | | if (locMast.getLocSts().equals("Z")){ |
| | | if (locMast.getLocSts().equals("Z")) { |
| | | param.setStatus("JY"); |
| | | }else { |
| | | } else { |
| | | param.setStatus("QY"); |
| | | } |
| | | if (Cools.isEmpty(locMast.getBarcode()) || locMast.getLocSts().equals("O")){ |
| | | if (Cools.isEmpty(locMast.getBarcode()) || locMast.getLocSts().equals("O")) { |
| | | param.setContainerCode(""); |
| | | param.setContainerTypeCode(""); |
| | | }else { |
| | | } else { |
| | | param.setContainerCode(locMast.getBarcode()); |
| | | param.setContainerTypeCode(locMast.getContainerTypeCode()); |
| | | } |
| | |
| | | .setJson(JSON.toJSONString(param)) |
| | | .build() |
| | | .doPost(); |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | log.error("堆垛机任务完成,请求wms任务完成接口失败"); |
| | | } |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | |
| | | |
| | | apiLogService.save("Wms变更货位状态" |
| | | ,wmsUrl+"wcsManager/wcsInterface/inboundTaskApply" |
| | | ,null |
| | | ,"127.0.0.1" |
| | | ,JSON.toJSONString(param) |
| | | ,response |
| | | ,true |
| | | , wmsUrl + "wcsManager/wcsInterface/inboundTaskApply" |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(param) |
| | | , response |
| | | , true |
| | | ); |
| | | |
| | | return null; |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.controller.CrnController; |
| | | import com.zy.asrs.controller.SiteController; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.domain.enums.WorkNoType; |
| | | import com.zy.asrs.domain.param.CrnOperatorParam; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.Result; |
| | | import com.zy.asrs.entity.param.StorageEscalationParam; |
| | | import com.zy.asrs.entity.param.TaskOverToWms; |
| | | import com.zy.asrs.mapper.BasCrnErrorMapper; |
| | | import com.zy.asrs.mapper.StaDescMapper; |
| | | import com.zy.asrs.mapper.TaskWrkMapper; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.CommandUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.core.CrnThread; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.*; |
| | | import com.zy.core.model.CrnSlave; |
| | | import com.zy.core.model.DevpSlave; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.command.CrnCommand; |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 立体仓库WCS系统主流程业务 |
| | | * Created by vincent on 2020/8/6 |
| | | */ |
| | | @Slf4j |
| | | @Service("mainService") |
| | | @Transactional |
| | | public class MainCpServiceImpl { |
| | | |
| | | public static final long COMMAND_TIMEOUT = 5 * 1000; |
| | | |
| | | @Autowired |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private WrkMastMapper wrkMastMapper; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private BasCrnpService basCrnpService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private BasErrLogService basErrLogService; |
| | | @Autowired |
| | | private BasCrnErrorMapper basCrnErrorMapper; |
| | | @Autowired |
| | | private TaskWrkMapper taskWrkMapper; |
| | | @Autowired |
| | | private TaskWrkService taskWrkService; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | @Autowired |
| | | private StaDescMapper staDescMapper; |
| | | @Autowired |
| | | private CommandInfoService commandInfoService; |
| | | |
| | | @Autowired |
| | | private OpenServiceImpl openServiceImpl; |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private CommonService commonService; |
| | | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | @Value("${wms.inboundTaskApplyPath}") |
| | | private String inboundTaskApplyPath; |
| | | @Value("${wms.TaskExecCallback}") |
| | | private String TaskExecCallback; |
| | | @Value("${wms.taskStatusFeedbackPath}") |
| | | private String taskStatusFeedbackPath; |
| | | @Autowired |
| | | private CrnController crnController; |
| | | @Autowired |
| | | private SiteController siteController; |
| | | |
| | | |
| | | public void generateStoreWrkFile1() throws IOException, InterruptedException { |
| | | try { |
| | | // 根据输送线plc遍历 |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历入库口 |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | StorageEscalationParam storageEscalationParam = new StorageEscalationParam(); |
| | | // 获取入库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | Short workNo = staProtocol.getWorkNo(); |
| | | Short stano = staProtocol.getStaNo(); |
| | | |
| | | // 尺寸检测异常 |
| | | boolean back = false; |
| | | String errMsg = ""; |
| | | if (staProtocol.isFrontErr()) { |
| | | errMsg = "前超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBackErr()) { |
| | | errMsg = "后超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isHighErr()) { |
| | | errMsg = "高超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isLeftErr()) { |
| | | errMsg = "左超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isRightErr()) { |
| | | errMsg = "右超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isWeightErr()) { |
| | | errMsg = "超重"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBarcodeErr()) { |
| | | errMsg = "扫码失败"; |
| | | back = true; |
| | | } |
| | | // 判断是否满足入库条件 |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() && workNo >= 9790 |
| | | && staProtocol.isPakMk()) { |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | String BoxNo = barcodeThread.getBarcode(); |
| | | TaskWrk taskWrk1 = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("barcode", BoxNo)); |
| | | if (!Cools.isEmpty(taskWrk1)) { |
| | | log.info("托盘码:" + BoxNo + "任务档存在"); |
| | | if (taskWrk1.getIoType() == 1 && taskWrk1.getStartPoint().equals(staProtocol.getSiteId().toString())) { |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no", taskWrk1.getCrnNo()).eq("type_no", 1).eq("stn_no", staProtocol.getSiteId())); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | return; |
| | | } else { |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | if (back) { |
| | | storageEscalationParam.setWCSStatus(1); |
| | | storageEscalationParam.setWCSErrorMessage(storageEscalationParam.getWCSErrorMessage() + errMsg); |
| | | } |
| | | log.info("组托入库={}", storageEscalationParam); |
| | | storageEscalationParam.setBoxNo(BoxNo); |
| | | String response = ""; |
| | | Boolean success = false; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath(inboundTaskApplyPath) |
| | | .setJson(JSON.toJSONString(storageEscalationParam)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (back) { |
| | | if (staProtocol.getWorkNo() >= 9801 && staProtocol.getWorkNo() <= 9825) { |
| | | staProtocol.setStaNo((short) 105); |
| | | } else if (staProtocol.getWorkNo() >= 9826 && staProtocol.getWorkNo() <= 9850) { |
| | | staProtocol.setStaNo((short) 107); |
| | | } else if (staProtocol.getWorkNo() >= 9851 && staProtocol.getWorkNo() <= 9875) { |
| | | staProtocol.setStaNo((short) 109); |
| | | } else { |
| | | staProtocol.setStaNo((short) 110); |
| | | } |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } else { |
| | | if (!Cools.isEmpty(response) && !Cools.isEmpty(jsonObject.get("ReturnStatus")) && jsonObject.get("ReturnStatus").equals(0) && !Cools.isEmpty(jsonObject.get("Result").toString())) { |
| | | Result result = JSON.parseObject(jsonObject.get("Result").toString(), Result.class); |
| | | // 创新一个入库工作档 |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(result.getTaskNo()); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | taskWrk = createTask1(result, BoxNo); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | log.error("库位异常,库位号:={}", taskWrk.getOriginTargetPoint()); |
| | | } else { |
| | | taskWrkService.insert(taskWrk); |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no", taskWrk.getCrnNo()).eq("type_no", 1).eq("stn_no", staProtocol.getSiteId())); |
| | | staProtocol.setWorkNo(taskWrk.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(staDesc.getCrnStn().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("TaskNo", taskWrk.getTaskNo()); |
| | | try { |
| | | //开始上报,任务开始时,WCS回调WMS |
| | | response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath(taskStatusFeedbackPath) |
| | | .setJson(JSON.toJSONString(hashMap)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject1 = JSON.parseObject(response); |
| | | Boolean bool = false; |
| | | if (jsonObject1.get("ReturnStatus").equals(0)) { |
| | | bool = true; |
| | | } |
| | | apiLogService.save("wcs开始入库任务上报wms" |
| | | , wmsUrl + TaskExecCallback |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(hashMap) |
| | | , response |
| | | , bool |
| | | ); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } |
| | | } else { |
| | | // staProtocol.setWorkNo((short) 9991); |
| | | if (staProtocol.getWorkNo() >= 9801 && staProtocol.getWorkNo() <= 9825) { |
| | | staProtocol.setStaNo((short) 105); |
| | | } else if (staProtocol.getWorkNo() >= 9826 && staProtocol.getWorkNo() <= 9850) { |
| | | staProtocol.setStaNo((short) 107); |
| | | } else if (staProtocol.getWorkNo() >= 9851 && staProtocol.getWorkNo() <= 9875) { |
| | | staProtocol.setStaNo((short) 109); |
| | | } else { |
| | | staProtocol.setStaNo((short) 110); |
| | | } |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | |
| | | } else { |
| | | // staProtocol.setWorkNo((short) 9991); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("请求入库调用接口失败"); |
| | | log.error("异常信息打印:" + e); |
| | | try { |
| | | BasDevp basDevp = basDevpService.selectById(inSta.getStaNo()); |
| | | if (Cools.isEmpty(basDevp)) { |
| | | log.error("站点号异常" + inSta.getStaNo()); |
| | | } else if (basDevp.getStaErr() != 0) { |
| | | basDevp.setStaErr(2); |
| | | basDevpService.updateById(basDevp); |
| | | } |
| | | } catch (Exception e1) { |
| | | // 退回 |
| | | log.error("扫码检测程序异常" + inSta.getStaNo() + "异常信息" + e1); |
| | | } |
| | | } finally { |
| | | apiLogService.save("wms请求入库货位接口" |
| | | , wmsUrl + inboundTaskApplyPath |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(storageEscalationParam) |
| | | , response |
| | | , success |
| | | ); |
| | | } |
| | | log.info("入库请求参数=" + JSON.toJSONString(BoxNo)); |
| | | log.info("入库请求返回参数=" + JSON.toJSONString(response)); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("generateStoreWrkFile e", e); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | } |
| | | } |
| | | |
| | | public void generateStoreWrkFile() throws IOException, InterruptedException { |
| | | try { |
| | | // 根据输送线plc遍历 |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历入库口 |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | // 获取入库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | Short workNo = staProtocol.getWorkNo(); |
| | | Short stano = staProtocol.getStaNo(); |
| | | |
| | | // 尺寸检测异常 |
| | | boolean back = false; |
| | | String errMsg = ""; |
| | | if (staProtocol.isFrontErr()) { |
| | | errMsg = "前超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBackErr()) { |
| | | errMsg = "后超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isHighErr()) { |
| | | errMsg = "高超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isLeftErr()) { |
| | | errMsg = "左超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isRightErr()) { |
| | | errMsg = "右超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isWeightErr()) { |
| | | errMsg = "超重"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBarcodeErr()) { |
| | | errMsg = "扫码失败"; |
| | | back = true; |
| | | } |
| | | // 退回 |
| | | if (back) { |
| | | if (stano == inSta.getBackSta().shortValue()) { |
| | | continue; |
| | | } |
| | | if (workNo == 0 && stano == 0) { |
| | | continue; |
| | | } |
| | | if (!staProtocol.isPakMk()) { |
| | | continue; |
| | | } |
| | | // News.warn("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | | staProtocol.setWorkNo(workNo); |
| | | staProtocol.setStaNo(inSta.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo)); |
| | | if (taskWrk != null) { |
| | | taskWrk.setMemo(errMsg);//将错误码存入备注字段进行展示 |
| | | taskWrkMapper.updateById(taskWrk); |
| | | } |
| | | continue; |
| | | } |
| | | // 判断是否满足入库条件 |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() && (workNo >= 9899) |
| | | && staProtocol.isPakMk()) { |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if (!Cools.isEmpty(barcode) && !barcode.equals("99999999")) { |
| | | // 请求wms接口,获取工作号和目标库位 |
| | | ToWmsDTO toWmsDTO = new ToWmsDTO(barcode, staProtocol.getSiteId(), staProtocol.isHigh() ? 2 : 1); |
| | | TaskWrk taskWrk1 = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("barcode", barcode)); |
| | | if (!Cools.isEmpty(taskWrk1)) { |
| | | log.info("托盘码:" + barcode + "任务档存在"); |
| | | if (taskWrk1.getIoType() == 1 && taskWrk1.getStartPoint().equals(staProtocol.getSiteId().toString())) { |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no", taskWrk1.getCrnNo()).eq("type_no", 1).eq("stn_no", staProtocol.getSiteId())); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | log.info("托盘码:" + barcode + "任务档存在"); |
| | | return; |
| | | } else { |
| | | staProtocol.setWorkNo(taskWrk1.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(staDesc.getCrnStn().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | } |
| | | return; |
| | | } |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("Content-Type", "application/json"); |
| | | System.out.println(JSON.toJSONString(toWmsDTO)); |
| | | String response; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | // .setHeaders(headParam) |
| | | .setUri(wmsUrl) |
| | | .setPath(inboundTaskApplyPath) |
| | | .setJson(JSON.toJSONString(toWmsDTO)) |
| | | .build() |
| | | .doPost(); |
| | | } catch (Exception e) { |
| | | log.error("请求入库调用接口失败"); |
| | | log.error("异常信息打印:" + e); |
| | | try { |
| | | BasDevp basDevp = basDevpService.selectById(inSta.getStaNo()); |
| | | if (Cools.isEmpty(basDevp)) { |
| | | log.error("站点号异常" + inSta.getStaNo()); |
| | | } else if (basDevp.getStaErr() != 0) { |
| | | basDevp.setStaErr(2); |
| | | basDevpService.updateById(basDevp); |
| | | } |
| | | } catch (Exception e1) { |
| | | // 退回 |
| | | log.error("扫码检测程序异常" + inSta.getStaNo() + "异常信息" + e1); |
| | | } |
| | | staProtocol.setWorkNo((short) 9999); |
| | | staProtocol.setStaNo(inSta.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | // TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo)); |
| | | // if (taskWrk != null) { |
| | | // taskWrk.setMemo(errMsg);//将错误码存入备注字段进行展示 |
| | | // taskWrkMapper.updateById(taskWrk); |
| | | // } |
| | | continue; |
| | | } |
| | | |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | log.info("入库请求参数{}" + JSON.toJSONString(toWmsDTO)); |
| | | log.info("入库请求返回参数{}" + JSON.toJSONString(response)); |
| | | if (jsonObject.getInteger("code").equals(200) && !Cools.isEmpty(jsonObject.get("data").toString())) { |
| | | GetWmsDto getWmsDto = JSON.parseObject(jsonObject.get("data").toString(), GetWmsDto.class); |
| | | try { |
| | | BasDevp basDevp = basDevpService.selectById(inSta.getStaNo()); |
| | | if (Cools.isEmpty(basDevp)) { |
| | | log.error("站点号异常1" + inSta.getStaNo()); |
| | | throw new CoolException("站点号异常1,未查询到站点信息" + inSta.getStaNo()); |
| | | } |
| | | Integer staNoCrnNo = Utils.StaNoCrnNo(inSta.getStaNo()); |
| | | if (staNoCrnNo == 0) { |
| | | basDevp.setStaErr(1); |
| | | basDevpService.updateById(basDevp); |
| | | log.error("站点号异常2" + inSta.getStaNo()); |
| | | throw new CoolException("站点号异常2,站点号不存在" + inSta.getStaNo()); |
| | | } else { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("crn_no", staNoCrnNo.longValue()) |
| | | .eq("loc_no", getWmsDto.getLocNo())); |
| | | if (Cools.isEmpty(locMast)) { |
| | | basDevp.setStaErr(1); |
| | | basDevpService.updateById(basDevp); |
| | | log.error("站点号异常3" + inSta.getStaNo()); |
| | | throw new CoolException("站点号异常3:此巷道不存在目标库位" + inSta.getStaNo()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | // log.error("扫码检测程序异常"+inSta.getStaNo()+"异常信息"+e); |
| | | // 退回 |
| | | log.error("扫码检测程序异常" + inSta.getStaNo() + errMsg); |
| | | log.error("扫码检测程序异常,异常信息" + e); |
| | | |
| | | staProtocol.setWorkNo((short) 9999); |
| | | staProtocol.setStaNo(inSta.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | // TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo)); |
| | | // if (taskWrk != null) { |
| | | // taskWrk.setMemo(errMsg);//将错误码存入备注字段进行展示 |
| | | // taskWrkMapper.updateById(taskWrk); |
| | | // } |
| | | continue; |
| | | } |
| | | //查看该库位是否为空库位 |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "O") |
| | | .eq("loc_no", getWmsDto.getLocNo())); |
| | | if (Cools.isEmpty(locMast)) { |
| | | try { |
| | | HashMap<String, Object> headParam1 = new HashMap<>(); |
| | | headParam1.put("taskNo", getWmsDto.getTaskNo()); |
| | | headParam1.put("status", 6); |
| | | headParam1.put("ioType", 1); |
| | | headParam1.put("barcode", barcode); |
| | | String response2; |
| | | response2 = new HttpHandler.Builder() |
| | | // .setHeaders(headParam) |
| | | .setUri(wmsUrl) |
| | | .setPath(taskStatusFeedbackPath) |
| | | .setJson(JSON.toJSONString(headParam1)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject1 = JSON.parseObject(response2); |
| | | apiLogService.save("wcs派发库位==》不为空《==上报wms" |
| | | , wmsUrl + taskStatusFeedbackPath |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(headParam1) |
| | | , response |
| | | , true |
| | | ); |
| | | } catch (Exception e) { |
| | | log.error("wcs派发库位==》不为空《==上报wms", getWmsDto.getWrkNo()); |
| | | throw new CoolException("wcs派发入库任务上报wms失败,派发库位==》不为空《==,异常信息:" + e); |
| | | } |
| | | } |
| | | |
| | | // 创新一个入库工作档 |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(getWmsDto.getWrkNo()); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | taskWrk = createTask(getWmsDto, barcode); |
| | | if (Cools.isEmpty(taskWrk)) { |
| | | log.error("库位异常,库位号:{}", getWmsDto.getTargetLocationCode()); |
| | | } else { |
| | | taskWrkService.insert(taskWrk); |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no", taskWrk.getCrnNo()).eq("type_no", 1).eq("stn_no", staProtocol.getSiteId())); |
| | | staProtocol.setWorkNo(taskWrk.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(staDesc.getCrnStn().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | continue; |
| | | } |
| | | apiLogService.save("wms请求入库货位接口" |
| | | , wmsUrl + inboundTaskApplyPath |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(toWmsDTO) |
| | | , response |
| | | , true |
| | | ); |
| | | |
| | | } else { |
| | | // 退回 |
| | | log.error("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | | |
| | | staProtocol.setWorkNo((short) 9999); |
| | | staProtocol.setStaNo(inSta.getStaNo().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | TaskWrk taskWrk = taskWrkMapper.selectByWrkNo(Integer.valueOf(workNo)); |
| | | if (taskWrk != null) { |
| | | taskWrk.setMemo(errMsg);//将错误码存入备注字段进行展示 |
| | | taskWrkMapper.updateById(taskWrk); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("generateStoreWrkFile e", e); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 堆垛机站出库到出库站 |
| | | */ |
| | | public void crnStnToOutStn() { |
| | | for (CrnSlave crnSlave : slaveProperties.getCrn()) { |
| | | // 遍历堆垛机出库站 |
| | | for (CrnSlave.CrnStn crnStn : crnSlave.getCrnOutStn()) { |
| | | List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("crn_no", crnSlave.getId()).eq("crn_stn", crnStn.getStaNo())); |
| | | for (StaDesc staDesc : staDescs) { |
| | | try { |
| | | // 获取堆垛机出库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == 0)) { |
| | | // 查询工作档 |
| | | TaskWrk taskWrk = taskWrkMapper.selectCrnStaWorking(crnSlave.getId(), staDesc.getStnNo().toString()); |
| | | if (taskWrk == null) { |
| | | continue; |
| | | } |
| | | log.info("下发输送线任务:taskWrk:" + JSON.toJSONString(taskWrk)); |
| | | // R r = siteController.siteDetlUpdate(Integer.valueOf(taskWrk.getTargetPoint()), taskWrk.getWrkNo().shortValue(), (short) 0, "Y", false, false); |
| | | staProtocol.setWorkNo(taskWrk.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(staDesc.getStnNo().shortValue()); |
| | | boolean offer = false; |
| | | try { |
| | | offer = MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol)); |
| | | } catch (Exception e) { |
| | | log.error("下发输送线任务失败:异常:" + e); |
| | | log.error("下发输送线任务失败:异常:offer:" + offer); |
| | | } |
| | | // JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(r)); |
| | | if (offer) { |
| | | log.info("下发输送线任务成功:taskWrk:" + JSON.toJSONString(taskWrk)); |
| | | taskWrk.setStatus(5); |
| | | taskWrk.setWrkSts(14); |
| | | taskWrkService.updateById(taskWrk); |
| | | |
| | | } else { |
| | | log.error("下发输送线任务失败:taskWrk:" + JSON.toJSONString(taskWrk)); |
| | | // log.error("下发输送线任务失败:异常信息:"+JSON.toJSONString(r)); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("出库到出库站异常:异常信息:" + e); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 入出库 ===>> 堆垛机入出库作业下发 |
| | | */ |
| | | public synchronized void crnIoExecute() throws IOException { |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | if (crnProtocol == null) { |
| | | continue; |
| | | } |
| | | BasCrnp basCrnp = basCrnpService.selectById(crn.getId()); |
| | | if (basCrnp == null) { |
| | | log.error("{}号堆垛机尚未在数据库进行维护!", crn.getId()); |
| | | continue; |
| | | } |
| | | |
| | | |
| | | // 只有当堆垛机空闲 并且 无任务时才继续执行 |
| | | if (crnProtocol.getStatusType() == CrnStatusType.IDLE && crnProtocol.getTaskNo() == 0 && crnProtocol.getModeType() == CrnModeType.AUTO |
| | | && crnProtocol.getLoaded() == 0 && crnProtocol.getForkPos() == 0) { |
| | | // 如果最近一次是入库模式 |
| | | if (crnProtocol.getLastIo().equals("I")) { |
| | | if (basCrnp.getInEnable().equals("Y")) { |
| | | this.crnStnToLoc(crn, crnProtocol); // 入库 |
| | | crnProtocol.setLastIo("O"); |
| | | } else if (basCrnp.getOutEnable().equals("Y")) { |
| | | this.locToCrnStn(crn, crnProtocol); // 出库 |
| | | crnProtocol.setLastIo("I"); |
| | | } |
| | | } |
| | | // 如果最近一次是出库模式 |
| | | else if (crnProtocol.getLastIo().equals("O")) { |
| | | if (basCrnp.getOutEnable().equals("Y")) { |
| | | this.locToCrnStn(crn, crnProtocol); // 出库 |
| | | crnProtocol.setLastIo("I"); |
| | | } else if (basCrnp.getInEnable().equals("Y")) { |
| | | this.crnStnToLoc(crn, crnProtocol); // 入库 |
| | | crnProtocol.setLastIo("O"); |
| | | } |
| | | } |
| | | |
| | | // 库位移转 |
| | | this.locToLoc(crn, crnProtocol); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 入库 ===>> 堆垛机站到库位 |
| | | */ |
| | | public void crnStnToLoc(CrnSlave slave, CrnProtocol crnProtocol) throws IOException { |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnInStn()) { |
| | | List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("crn_no", slave.getId()).eq("crn_stn", crnStn.getStaNo())); |
| | | for (StaDesc staDesc : staDescs) { |
| | | boolean flag = false; |
| | | // 获取堆垛机入库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | // 查询站点详细信息 |
| | | BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo()); |
| | | if (staDetl == null) { |
| | | log.error("入库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo()); |
| | | continue; |
| | | } |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable() |
| | | && staDetl.getCanining() != null && staDetl.getCanining().equals("Y")) { |
| | | flag = true; |
| | | } |
| | | if (!flag) { |
| | | continue; |
| | | } |
| | | |
| | | // 获取工作状态为2(设备上走)的入库工作档 |
| | | TaskWrk taskWrk = taskWrkMapper.selectPakIn(slave.getId(), staProtocol.getWorkNo().intValue(), staDesc.getStnNo().toString()); |
| | | if (null == taskWrk) { |
| | | continue; |
| | | } |
| | | |
| | | // 堆垛机控制过滤 |
| | | if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) { |
| | | continue; |
| | | } |
| | | |
| | | // 已经存在吊车执行任务时,则过滤 |
| | | if (taskWrkMapper.selectCrnWorking(slave.getId()) != null) { |
| | | continue; |
| | | } |
| | | |
| | | // int workNo = commonService.getWorkNo(WorkNoType.PAKIN.type);//获取入库工作号 |
| | | // taskWrk.setWrkNo(workNo);//工作号 |
| | | taskWrk.setStatus(TaskStatusType.DISTRIBUTE.id);//派发状态 |
| | | taskWrk.setAssignTime(new Date());//派发时间 |
| | | taskWrk.setWrkSts(3);//工作状态 3.吊车入库 |
| | | taskWrk.setCrnNo(staDesc.getCrnNo());//堆垛机号 |
| | | taskWrk.setModiTime(new Date()); |
| | | taskWrk.setModiUser(9988L); |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | | crnCommand.setCrnNo(staDesc.getCrnNo()); // 堆垛机编号 |
| | | crnCommand.setTaskNo(taskWrk.getWrkNo().shortValue()); // 工作号 |
| | | crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | | crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 任务模式: 库位移转 |
| | | crnCommand.setSourcePosX(crnStn.getRow().shortValue()); // 源库位列 |
| | | crnCommand.setSourcePosY(crnStn.getBay().shortValue()); // 源库位层 |
| | | crnCommand.setSourcePosZ(crnStn.getLev().shortValue()); // 源库位排 |
| | | crnCommand.setDestinationPosX(Utils.getRowShort(taskWrk.getTargetPoint())); // 目标库位列 |
| | | crnCommand.setDestinationPosY(Utils.getBayShort(taskWrk.getTargetPoint())); // 目标库位层 |
| | | crnCommand.setDestinationPosZ(Utils.getLevShort(taskWrk.getTargetPoint())); // 目标库位排 |
| | | crnCommand.setCommand((short) 1); |
| | | log.info("堆垛机入库任务下发={}", crnCommand); |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(2, crnCommand), false)) { |
| | | log.error("堆垛机命令生成失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | throw new CoolException("堆垛机命令生成失败"); |
| | | } else { |
| | | try { |
| | | taskWrkService.updateById(taskWrk); |
| | | } catch (Exception e) { |
| | | log.error("修改工作档状态 2.设备上走 => 3.吊车入库中 失败!!,工作号={}", taskWrk.getWrkNo()); |
| | | log.error("修改工作档状态 2.设备上走 => 3.吊车入库中 失败!!,异常:" + e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 出库 ===>> 库位到堆垛机站 |
| | | * 2022-06-09 TQS修改,查询工作档LIST,遍历下发,防止第一个任务堵塞出库 |
| | | */ |
| | | public void locToCrnStn(CrnSlave slave, CrnProtocol crnProtocol) { |
| | | List<TaskWrk> taskWrksInitial = taskWrkMapper.selectPakOut(slave.getId(), null); |
| | | if (taskWrksInitial.size() == 0) { |
| | | return; |
| | | } |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | List<StaDesc> staDescs = staDescMapper.selectList(new EntityWrapper<StaDesc>().eq("crn_no", slave.getId()).eq("crn_stn", crnStn.getStaNo())); |
| | | for (StaDesc staDesc : staDescs) { |
| | | // 获取工作状态为11(生成出库ID)的出库工作档 |
| | | List<TaskWrk> taskWrks = taskWrkMapper.selectPakOut(slave.getId(), staDesc.getStnNo().toString()); |
| | | for (TaskWrk taskWrk : taskWrks) { |
| | | if (taskWrk == null) { |
| | | continue; |
| | | } |
| | | // 工作档状态判断 |
| | | if (taskWrk.getIoType() != 2 || taskWrk.getTargetPoint() == null || taskWrk.getStartPoint() == null) { |
| | | log.error("查询工作档数据不符合条件--入出类型/站点, 工作号={},源库位={},入出类型={}", taskWrk.getWrkNo(), taskWrk.getStartPoint(), taskWrk.getIoType()); |
| | | continue; |
| | | } |
| | | |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | //判断其库位是否为深库位,如果为深库位找其浅库位是都有货 |
| | | if (locMast.getRow1() == 1 || locMast.getRow1() == 5) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1() + 1)) |
| | | .eq("bay1", locMast.getBay1()) |
| | | .eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | continue; |
| | | } |
| | | } else if (locMast.getRow1() == 4 || locMast.getRow1() == 8) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1() - 1)) |
| | | .eq("bay1", locMast.getBay1()) |
| | | .eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 获取堆垛机出库站信息 |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); |
| | | if (staProtocol == null) { |
| | | break; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | |
| | | // 查询站点详细信息 |
| | | BasDevp staDetl = basDevpService.selectById(crnStn.getStaNo()); |
| | | if (staDetl == null) { |
| | | log.error("出库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo()); |
| | | break; |
| | | } |
| | | |
| | | // 判断堆垛机出库站状态 |
| | | if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) { |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | |
| | | // 堆垛机控制过滤 |
| | | if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) { |
| | | break; |
| | | } |
| | | |
| | | // 已经存在吊车执行任务时,则过滤 |
| | | if (taskWrkMapper.selectCrnWorking(slave.getId()) != null) { |
| | | break; |
| | | } |
| | | CrnCommand command = new CrnCommand(); |
| | | command.setCrnNo(taskWrk.getCrnNo()); // 堆垛机编号 |
| | | command.setTaskNo(taskWrk.getWrkNo().shortValue()); // 工作号 |
| | | command.setAckFinish((short) 0); // 任务完成确认位 |
| | | command.setTaskMode(CrnTaskModeType.PAKIN); // 任务模式 |
| | | command.setSourcePosX(Utils.getRowShort(taskWrk.getStartPoint())); // 源库位排 |
| | | command.setSourcePosY(Utils.getBayShort(taskWrk.getStartPoint())); // 源库位列 |
| | | command.setSourcePosZ(Utils.getLevShort(taskWrk.getStartPoint())); // 源库位层 |
| | | command.setDestinationPosX(crnStn.getRow().shortValue()); // 目标库位排 |
| | | command.setDestinationPosY(crnStn.getBay().shortValue()); // 目标库位列 |
| | | command.setDestinationPosZ(crnStn.getLev().shortValue()); // 目标库位层 |
| | | command.setCommand((short) 1); |
| | | |
| | | if (Cools.isEmpty(taskWrk.getMarkStart()) || taskWrk.getMarkStart() == 0) { |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("TaskNo", taskWrk.getTaskNo()); |
| | | String response = ""; |
| | | try { |
| | | //开始上报,出库任务开始时,WCS回调WMS |
| | | response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath(taskStatusFeedbackPath) |
| | | .setJson(JSON.toJSONString(hashMap)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | Boolean bool = false; |
| | | if (jsonObject.get("ReturnStatus").equals(0)) { |
| | | bool = true; |
| | | taskWrk.setMarkStart(1); |
| | | } |
| | | apiLogService.save("wcs开始任务上报wms" |
| | | , wmsUrl + TaskExecCallback |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(hashMap) |
| | | , response |
| | | , bool |
| | | ); |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(2, command), false)) { |
| | | log.error("堆垛机命令生成失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(command)); |
| | | throw new CoolException("堆垛机命令生成失败"); |
| | | } else { |
| | | try { |
| | | // 修改工作档状态 11.生成出库ID => 12.吊车出库中 |
| | | Date now = new Date(); |
| | | taskWrk.setWrkSts(12); |
| | | taskWrk.setStatus(2); |
| | | taskWrk.setModiTime(now); |
| | | if (taskWrkMapper.updateById(taskWrk) == 0) { |
| | | log.error("修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,工作号={}", taskWrk.getWrkNo()); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,工作号={}", taskWrk.getWrkNo()); |
| | | log.error("修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,异常:" + e); |
| | | } |
| | | // try { |
| | | // HashMap<String, Object> headParam = new HashMap<>(); |
| | | // headParam.put("taskNo", taskWrk.getTaskNo()); |
| | | // headParam.put("status", taskWrk.getStatus()); |
| | | // headParam.put("ioType", taskWrk.getIoType()); |
| | | // headParam.put("barcode", taskWrk.getBarcode()); |
| | | // String response; |
| | | // response = new HttpHandler.Builder() |
| | | // // .setHeaders(headParam) |
| | | // .setUri(wmsUrl) |
| | | // .setPath(taskStatusFeedbackPath) |
| | | // .setJson(JSON.toJSONString(headParam)) |
| | | // .build() |
| | | // .doPost(); |
| | | // JSONObject jsonObject = JSON.parseObject(response); |
| | | // apiLogService.save("wcs派发出库任务上报wms" |
| | | // , wmsUrl + taskStatusFeedbackPath |
| | | // , null |
| | | // , "127.0.0.1" |
| | | // , JSON.toJSONString(headParam) |
| | | // , response |
| | | // , true |
| | | // ); |
| | | // } catch (Exception e) { |
| | | // log.error("wcs派发出库任务上报wms失败", JSON.toJSONString(taskWrk)); |
| | | //// throw new CoolException("wcs派发入库任务上报wms失败"); |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 库位移转 |
| | | */ |
| | | public void locToLoc(CrnSlave slave, CrnProtocol crnProtocol) { |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | // 获取工作状态为11(生成出库ID)的移库工作档 |
| | | List<TaskWrk> taskWrks = taskWrkMapper.selectList(new EntityWrapper<TaskWrk>() |
| | | .eq("crn_no", slave.getId()) |
| | | .eq("wrk_sts", 11) |
| | | .eq("io_type", 3) |
| | | .orderBy("io_pri", false)); |
| | | for (TaskWrk taskWrk : taskWrks) { |
| | | |
| | | // 双深库位且浅库位有货,则需先对浅库位进行库位移转 |
| | | // if (Utils.isDeepLoc(slaveProperties, taskWrk.getStartPoint())) { |
| | | // String shallowLocNo = Utils.getShallowLoc(slaveProperties, taskWrk.getStartPoint()); |
| | | // TaskWrk hallowLocNoTask = taskWrkMapper.selectByStartPoint(shallowLocNo); |
| | | // if (!Cools.isEmpty(hallowLocNoTask)){ |
| | | // continue; |
| | | // } |
| | | // } |
| | | // 堆垛机控制过滤 |
| | | if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) { |
| | | continue; |
| | | } |
| | | |
| | | // 已经存在吊车执行任务时,则过滤 |
| | | if (taskWrkMapper.selectCrnWorking(slave.getId()) != null) { |
| | | continue; |
| | | } |
| | | |
| | | if (taskWrk == null || Cools.isEmpty(taskWrk.getTargetPoint()) || taskWrk.getTargetPoint().equals("") || taskWrk.getWrkNo() == null) { |
| | | continue; |
| | | } |
| | | // 工作档状态判断 |
| | | if (taskWrk.getIoType() != 3 || taskWrk.getTargetPoint() == null) { |
| | | log.error("查询工作档数据不符合条件--入出类型/目标库位号, 工作号={},源库位={},入出类型={}", taskWrk.getWrkNo(), taskWrk.getTargetPoint(), taskWrk.getIoType()); |
| | | continue; |
| | | } |
| | | |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | |
| | | |
| | | // 1.堆垛机开始移动 |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | | crnCommand.setCrnNo(slave.getId()); // 堆垛机编号 |
| | | crnCommand.setTaskNo(taskWrk.getWrkNo().shortValue()); // 工作号 |
| | | crnCommand.setAckFinish((short) 0); // 任务完成确认位 |
| | | crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 任务模式: 库位移转 |
| | | crnCommand.setSourcePosX(Utils.getRowShort(taskWrk.getStartPoint())); // 源库位排 |
| | | crnCommand.setSourcePosY(Utils.getBayShort(taskWrk.getStartPoint())); // 源库位列 |
| | | crnCommand.setSourcePosZ(Utils.getLevShort(taskWrk.getStartPoint())); // 源库位层 |
| | | crnCommand.setDestinationPosX(Utils.getRowShort(taskWrk.getTargetPoint())); // 目标库位排 |
| | | crnCommand.setDestinationPosY(Utils.getBayShort(taskWrk.getTargetPoint())); // 目标库位列 |
| | | crnCommand.setDestinationPosZ(Utils.getLevShort(taskWrk.getTargetPoint())); // 目标库位层 |
| | | crnCommand.setCommand((short) 1); |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(2, crnCommand), false)) { |
| | | log.error("堆垛机命令下发失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | } else { |
| | | // 修改工作档状态 11.生成出库ID => 12.吊车出库中 |
| | | Date now = new Date(); |
| | | taskWrk.setWrkSts(12); |
| | | taskWrk.setStatus(2); |
| | | taskWrk.setModiTime(now); |
| | | if (taskWrkMapper.updateById(taskWrk) == 0) { |
| | | log.error("修改工作档状态 11.生成出库ID => 12.吊车出库中 失败!!,工作号={}", taskWrk.getWrkNo()); |
| | | } |
| | | try { |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("TaskNo", taskWrk.getTaskNo()); |
| | | String response; |
| | | response = new HttpHandler.Builder() |
| | | // .setHeaders(headParam) |
| | | .setUri(wmsUrl) |
| | | .setPath(taskStatusFeedbackPath) |
| | | .setJson(JSON.toJSONString(headParam)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | apiLogService.save("wcs派发移库任务上报wms" |
| | | , wmsUrl + taskStatusFeedbackPath |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(headParam) |
| | | , response |
| | | , true |
| | | ); |
| | | } catch (Exception e) { |
| | | log.error("wcs派发移库库任务上报wms失败", taskWrk); |
| | | // throw new CoolException("wcs派发移库库任务上报wms失败"); |
| | | } |
| | | |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 执行对工作档的完成操作 |
| | | */ |
| | | // public void storeFinished() { |
| | | // for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // // 获取堆垛机信息 |
| | | // CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | // CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | // if (crnProtocol == null) { continue; } |
| | | // |
| | | // // 状态:等待确认 并且 任务完成位 = 1 |
| | | // if (crnProtocol.getTaskFinish() == 0 && crnProtocol.statusType == CrnStatusType.HANDLING_COMPLETED && crnProtocol.getTaskNo() != 0) { |
| | | // //获取入库待确认工作档 |
| | | // TaskWrk taskWrk = taskWrkMapper.selectCrnNoInWorking(crn.getId(),crnProtocol.getTaskNo().intValue()); |
| | | // if (Cools.isEmpty(taskWrk)) { |
| | | //// log.error("堆垛机处于等待确认且任务完成状态,但未找到工作档。堆垛机号={},工作号={}", crn.getId(), crnProtocol.getTaskNo()); |
| | | // continue; |
| | | // } |
| | | // |
| | | // //获取指令ID |
| | | // Integer commandId = crnProtocol.getCommandId(); |
| | | // CommandInfo commandInfo = new CommandInfo(); |
| | | // if (Cools.isEmpty(commandId)){ |
| | | // commandInfo = commandInfoService.selectOne(new EntityWrapper<CommandInfo>() |
| | | // .eq("wrk_no",crnProtocol.getTaskNo()) |
| | | // .eq("device","Crn")); |
| | | // }else { |
| | | // commandInfo = commandInfoService.selectById(commandId); |
| | | // } |
| | | // |
| | | // |
| | | // if (commandInfo == null) { |
| | | // //指令不存在 |
| | | // continue; |
| | | // } |
| | | // if (commandInfo.getCommandStatus() == 3){ |
| | | // continue; |
| | | // } |
| | | // commandInfo.setCommandStatus(CommandStatusType.COMPLETE.id);//指令完成 |
| | | // commandInfo.setCompleteTime(new Date());//指令完成时间 |
| | | // if (commandInfoService.updateById(commandInfo)) {//修改成功后复位堆垛机 |
| | | // // 堆垛机复位 |
| | | // crnThread.setResetFlag(true); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * 执行对工作档的完成操作 |
| | | */ |
| | | public void storeFinished() throws InterruptedException { |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | if (crnProtocol == null) { |
| | | continue; |
| | | } |
| | | |
| | | // 状态:等待确认 并且 任务完成位 = 1 |
| | | if (crnProtocol.getTaskFinish() == 0 && crnProtocol.statusType == CrnStatusType.HANDLING_COMPLETED && crnProtocol.getTaskNo() != 0) { |
| | | //获取入库待确认工作档 |
| | | TaskWrk taskWrk = taskWrkMapper.selectCrnNoInWorking(crn.getId(), crnProtocol.getTaskNo().intValue()); |
| | | if (Cools.isEmpty(taskWrk) && crnProtocol.getTaskNo() != 999) { |
| | | log.error("堆垛机处于等待确认且任务完成状态,但未找到工作档。堆垛机号={},工作号={}", crn.getId(), crnProtocol.getTaskNo()); |
| | | continue; |
| | | } |
| | | //确认完成信号 |
| | | CrnOperatorParam crnOperatorParam = new CrnOperatorParam(); |
| | | crnOperatorParam.setCrnNo(crn.getId()); |
| | | R r = crnController.crnTaskComplete(crnOperatorParam); |
| | | Thread.sleep(1000); |
| | | if (!r.get("code").equals(200)) { |
| | | return; |
| | | } |
| | | if (!Cools.isEmpty(taskWrk)) { |
| | | if (taskWrk.getIoType() == 1 && taskWrk.getWrkSts() == 3) { |
| | | taskWrk.setWrkSts(4);//入库完成 |
| | | taskWrk.setStatus(5);//完结 |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | locMast.setLocSts("F");//F.在库 |
| | | locMast.setBarcode(taskWrk.getBarcode());//托盘码 |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | } else if (taskWrk.getIoType() == 2 && taskWrk.getWrkSts() == 12) { |
| | | taskWrk.setWrkSts(13);//出库完成 |
| | | taskWrk.setStatus(5);//完结 |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | locMast.setLocSts("O");//O.空库位 |
| | | locMast.setBarcode("");//托盘码 |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | } else if (taskWrk.getIoType() == 3 && taskWrk.getWrkSts() == 12) { |
| | | taskWrk.setWrkSts(4);//入库完成 |
| | | taskWrk.setStatus(5);//完结 |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | locMast.setLocSts("F");//F.在库 |
| | | locMast.setBarcode(taskWrk.getBarcode());//托盘码 |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | |
| | | LocMast locMast1 = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | locMast1.setLocSts("O");//O.空库位 |
| | | locMast1.setBarcode("");//托盘码 |
| | | locMast1.setModiTime(new Date()); |
| | | locMast1.setModiUser(9999L); |
| | | locMastService.updateById(locMast1); |
| | | } |
| | | taskWrkService.updateById(taskWrk); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 堆垛机异常信息记录 |
| | | */ |
| | | public void recCrnErr() { |
| | | Date now = new Date(); |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | if (crnProtocol == null) { |
| | | continue; |
| | | } |
| | | if (false) { |
| | | // if (crnProtocol.getModeType() != CrnModeType.STOP) { |
| | | // 有任务 |
| | | if (crnProtocol.getTaskNo() != 0) { |
| | | BasErrLog latest = basErrLogService.findLatestByTaskNo(crn.getId(), crnProtocol.getTaskNo().intValue()); |
| | | // 有异常 |
| | | if (latest == null) { |
| | | if (crnProtocol.getAlarm() != null && crnProtocol.getAlarm() > 0) { |
| | | WrkMast wrkMast = wrkMastMapper.selectById(crnProtocol.getTaskNo()); |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm()); |
| | | String errName = crnError == null ? String.valueOf(crnProtocol.getAlarm()) : crnError.getErrName(); |
| | | BasErrLog basErrLog = new BasErrLog( |
| | | null, // 编号 |
| | | wrkMast.getWrkNo(), // 工作号 |
| | | now, // 发生时间 |
| | | null, // 结束时间 |
| | | wrkMast.getWrkSts(), // 工作状态 |
| | | wrkMast.getIoType(), // 入出库类型 |
| | | crn.getId(), // 堆垛机 |
| | | null, // plc |
| | | wrkMast.getLocNo(), // 目标库位 |
| | | wrkMast.getStaNo(), // 目标站 |
| | | wrkMast.getSourceStaNo(), // 源站 |
| | | wrkMast.getSourceLocNo(), // 源库位 |
| | | wrkMast.getBarcode(), // 条码 |
| | | (int) crnProtocol.getAlarm1(), // 异常码 |
| | | errName, // 异常 |
| | | 1, // 异常情况 |
| | | now, // 添加时间 |
| | | null, // 添加人员 |
| | | now, // 修改时间 |
| | | null, // 修改人员 |
| | | "任务中异常" // 备注 |
| | | ); |
| | | if (!basErrLogService.insert(basErrLog)) { |
| | | log.error("堆垛机plc异常记录失败 ===>> [id:{}] [error:{}]", crn.getId(), errName); |
| | | } |
| | | } |
| | | } else { |
| | | // 异常修复 |
| | | if (crnProtocol.getAlarm1() == null || crnProtocol.getAlarm1() == 0) { |
| | | latest.setEndTime(now); |
| | | latest.setUpdateTime(now); |
| | | latest.setStatus(2); |
| | | if (!basErrLogService.updateById(latest)) { |
| | | log.error("堆垛机plc异常记录修复失败 ===>> [id:{}] [errLogId:{}]", crn.getId(), latest.getId()); |
| | | } |
| | | } |
| | | } |
| | | // 无任务 |
| | | } else { |
| | | BasErrLog latest = basErrLogService.findLatest(crn.getId()); |
| | | // 有异常 |
| | | if (crnProtocol.getAlarm1() != null && crnProtocol.getAlarm() > 0) { |
| | | // 记录新异常 |
| | | if (latest == null || (latest.getErrCode() != crnProtocol.getAlarm().intValue())) { |
| | | BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm()); |
| | | String errName = crnError == null ? String.valueOf(crnProtocol.getAlarm()) : crnError.getErrName(); |
| | | BasErrLog basErrLog = new BasErrLog( |
| | | null, // 编号 |
| | | null, // 工作号 |
| | | now, // 发生时间 |
| | | null, // 结束时间 |
| | | null, // 工作状态 |
| | | null, // 入出库类型 |
| | | crn.getId(), // 堆垛机 |
| | | null, // plc |
| | | null, // 目标库位 |
| | | null, // 目标站 |
| | | null, // 源站 |
| | | null, // 源库位 |
| | | null, // 条码 |
| | | (int) crnProtocol.getAlarm1(), // 异常码 |
| | | errName, // 异常 |
| | | 1, // 异常情况 |
| | | now, // 添加时间 |
| | | null, // 添加人员 |
| | | now, // 修改时间 |
| | | null, // 修改人员 |
| | | "无任务异常" // 备注 |
| | | ); |
| | | if (!basErrLogService.insert(basErrLog)) { |
| | | log.error("堆垛机plc异常记录失败 ===>> [id:{}] [error:{}]", crn.getId(), errName); |
| | | } |
| | | } |
| | | // 无异常 |
| | | } else { |
| | | // 异常修复 |
| | | if (latest != null && latest.getStatus() == 1) { |
| | | latest.setEndTime(now); |
| | | latest.setUpdateTime(now); |
| | | latest.setStatus(2); |
| | | if (!basErrLogService.updateById(latest)) { |
| | | log.error("堆垛机plc异常记录修复失败 ===>> [id:{}] [errLogId:{}]", crn.getId(), latest.getId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | //自动派发任务 |
| | | public void autoDistribute() { |
| | | Config config = configService.selectByCode("autoDistribute"); |
| | | if (config == null) { |
| | | return; |
| | | } |
| | | |
| | | if (config.getValue().equals("false")) {//判断是否开启自动派发任务 |
| | | return; |
| | | } |
| | | |
| | | for (TaskWrk taskWrk : taskWrkService.selectReceive()) { |
| | | |
| | | try { |
| | | taskWrkService.distribute(taskWrk.getTaskNo(), 9527L); |
| | | } catch (CoolException e) { |
| | | log.info(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //agv取放货任务完成 |
| | | public synchronized void autoCompleteAGV() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | try { |
| | | Thread.sleep(500); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | |
| | | for (BasDevp basDevp : basDevps) { |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | StaProtocol staProtocol = devpThread.getStation().get(basDevp.getDevNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if (basDevp.getWrkNo() != 0) { |
| | | if (basDevp.getAgvTargetPick() != 0) {//取货 |
| | | staProtocol.setAgvTypeSign((short) 0); |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } |
| | | boolean sign = true; |
| | | if (basDevp.getAgvTargetPlace() != 0) { |
| | | sign = false; |
| | | basDevp.setAgvTargetPlace(0); |
| | | basDevpService.updateById(basDevp); |
| | | staProtocol.setAgvTypeSign((short) 3);//1 |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } |
| | | } else { |
| | | if (basDevp.getAgvTargetPlace() != 0) { |
| | | if (basDevp.getLoading().equals("Y")) { |
| | | staProtocol.setAgvTypeSign((short) 1); |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } else { |
| | | log.error("AGV放货完成但输送线无物,复位信号 ===>> [staNo:{}] [basDevp:{}]", basDevp.getDevNo(), basDevp); |
| | | basDevp.setAgvTargetPlace(0); |
| | | basDevpService.updateById(basDevp); |
| | | staProtocol.setAgvTypeSign((short) 3);//1 |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } |
| | | |
| | | } |
| | | if (basDevp.getAgvTargetPick() != 0) { |
| | | basDevp.setAgvTargetPick(0); |
| | | basDevpService.updateById(basDevp); |
| | | staProtocol.setAgvTypeSign((short) 2);//0 |
| | | staProtocol.setStaNo(basDevp.getDevNo().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(4, staProtocol)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public synchronized void autoCompleteTask() { |
| | | List<TaskWrk> taskWrks = taskWrkMapper.selectWorkingTask(); |
| | | for (TaskWrk taskWrk : taskWrks) { |
| | | //获取命令集合 |
| | | List<CommandInfo> commandInfos = commandInfoService.selectByTaskNo(taskWrk.getTaskNo()); |
| | | if (taskWrk.getCommandStep() < commandInfos.size()) { |
| | | continue;//当前步序没有到达最后一条命令 |
| | | } |
| | | |
| | | //判断末端命令是否执行完成 |
| | | CommandInfo commandInfo = commandInfos.get(commandInfos.size() - 1); |
| | | if (commandInfo.getCommandStatus() != CommandStatusType.COMPLETE.id) { |
| | | continue;//指令未完成 |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | //指令已完成,更新任务 |
| | | if (taskWrk.getIoType() == 1) { |
| | | //入库任务 |
| | | taskWrk.setWrkSts(4);//3.吊车入库中 => 4.入库完成 |
| | | //taskWrk.setStatus(TaskStatusType.COMPLETE.id); |
| | | taskWrk.setModiTime(now); |
| | | taskWrkService.updateById(taskWrk); |
| | | |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getTargetPoint()); |
| | | locMast.setLocSts("F");//F.在库 |
| | | locMast.setBarcode(taskWrk.getBarcode());//托盘码 |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | } else if (taskWrk.getIoType() == 2) { |
| | | //出库任务 |
| | | taskWrk.setWrkSts(14);//12.吊车出库中 => 14.出库完成 |
| | | // taskWrk.setStatus(TaskStatusType.COMPLETE.id); |
| | | taskWrk.setModiTime(now); |
| | | taskWrkService.updateById(taskWrk); |
| | | |
| | | //更新库位状态 |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | locMast.setLocSts("O");//O.空库位 |
| | | locMast.setBarcode("");//托盘码 |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(9999L); |
| | | locMastService.updateById(locMast); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public synchronized String CrnStartRunning(TaskWrk taskWrk) { |
| | | String tasktype = null; |
| | | switch (taskWrk.getIoType()) { |
| | | case 1: |
| | | tasktype = "RK"; |
| | | break; |
| | | case 2: |
| | | tasktype = "CK"; |
| | | break; |
| | | case 3: |
| | | tasktype = "YK"; |
| | | break; |
| | | default: |
| | | tasktype = "未知"; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("x-api-key", "7a15b5db-29b6-552c-8cff-0cfec3756da2"); |
| | | TaskOverToWms taskOverToWms = new TaskOverToWms(); |
| | | taskOverToWms.setFeedbackFrom("WCS"); //来源 |
| | | taskOverToWms.setWarehouseId("1688469798893297665"); //仓库标识 |
| | | taskOverToWms.setTaskNo(taskWrk.getTaskNo()); //任务号 |
| | | taskOverToWms.setTaskType(tasktype); // 任务类型 |
| | | taskOverToWms.setContainerCode(taskWrk.getBarcode()); // 容器编码 |
| | | if (taskWrk.getIoType() == 1 || taskWrk.getIoType() == 3) { |
| | | taskOverToWms.setEquipmentCode(String.valueOf(taskWrk.getCrnNo())); //设备编码 |
| | | taskOverToWms.setTargetLocationCode(taskWrk.getOriginTargetPoint()); //目标库位 |
| | | } else if (taskWrk.getIoType() == 2) { |
| | | Map<Integer, String> map1 = new HashMap<>(); |
| | | map1.put(102, "J-1101"); |
| | | map1.put(106, "J-1103"); |
| | | map1.put(110, "J-1105"); |
| | | map1.put(114, "J-1107"); |
| | | map1.put(118, "J-1109"); |
| | | map1.put(122, "J-1111"); |
| | | map1.put(305, "H-1101"); |
| | | map1.put(405, "G-1101"); |
| | | taskOverToWms.setEquipmentCode(map1.get(taskWrk.getTargetPoint())); //设备编码 |
| | | taskOverToWms.setSourceLocationCode(taskWrk.getOriginStartPoint()); //源库位 |
| | | } |
| | | |
| | | taskOverToWms.setTaskStatus("executing"); //任务状态 |
| | | String response = null; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setHeaders(map) |
| | | .setUri(wmsUrl) |
| | | .setPath("wcsManager/wcsInterface/taskStatusFeedback") |
| | | .setJson(JSON.toJSONString(taskOverToWms)) |
| | | .build() |
| | | .doPost(); |
| | | } catch (Exception e) { |
| | | log.error("堆垛机任务完成,请求wms任务完成接口失败"); |
| | | } |
| | | apiLogService.save("堆垛机开始运行" |
| | | , wmsUrl + "wcsManager/wcsInterface/taskStatusFeedback" |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(taskOverToWms) |
| | | , response |
| | | , true |
| | | ); |
| | | return response; |
| | | } |
| | | |
| | | private TaskWrk createTask1(Result result, String barcode) { |
| | | String locNo = Utils.Fusion(result.getRow(), result.getFloor(), result.getColumn()); |
| | | |
| | | |
| | | Date now = new Date(); |
| | | TaskWrk taskWrk = new TaskWrk(); |
| | | int workNo1 = commonService.getWorkNo(WorkNoType.PAKIN.type);//获取入库工作号 |
| | | taskWrk.setTaskNo(result.getTaskNo());//任务号 |
| | | taskWrk.setWrkNo(workNo1); |
| | | taskWrk.setStatus(TaskStatusType.DISTRIBUTE.id);//任务状态:派发 |
| | | taskWrk.setCreateTime(now); |
| | | taskWrk.setIoType(1);//任务类型 |
| | | taskWrk.setIoPri(13);//优先级 |
| | | taskWrk.setBarcode(barcode);//条码 |
| | | LocMast locMast = locMastService.selectByLocNo(locNo); |
| | | taskWrk.setCrnNo(locMast.getCrnNo()); |
| | | taskWrk.setTargetPoint(locNo); |
| | | taskWrk.setStartPoint("116"); |
| | | if (result.getAlley().equals("1")) { |
| | | taskWrk.setCrnNo(1); |
| | | } else { |
| | | taskWrk.setCrnNo(2); |
| | | } |
| | | if (taskWrk.getIoType() == 1) { |
| | | taskWrk.setWrkSts(2); |
| | | if (!Cools.isEmpty(taskWrk.getTargetPoint())) { |
| | | taskWrk.setOriginTargetPoint(taskWrk.getTargetPoint()); |
| | | } |
| | | } |
| | | return taskWrk; |
| | | } |
| | | |
| | | private TaskWrk createTask(GetWmsDto dto, String barcode) { |
| | | String wcsLocNo = dto.getLocNo(); |
| | | if (Cools.isEmpty(wcsLocNo)) { |
| | | return null; |
| | | } |
| | | Date now = new Date(); |
| | | TaskWrk taskWrk = new TaskWrk(); |
| | | int workNo1 = commonService.getWorkNo(WorkNoType.PAKIN.type);//获取入库工作号 |
| | | taskWrk.setTaskNo(dto.getWrkNo());//任务号 |
| | | taskWrk.setWrkNo(workNo1); |
| | | taskWrk.setStatus(TaskStatusType.RECEIVE.id);//任务状态:接收 |
| | | taskWrk.setCreateTime(now); |
| | | taskWrk.setIoType(1);//任务类型 |
| | | taskWrk.setIoPri(Cools.isEmpty(dto.getTaskPriority()) ? 300 : Integer.parseInt(dto.getTaskPriority()));//优先级 |
| | | taskWrk.setBarcode(barcode);//条码 |
| | | LocMast locMast = locMastService.selectByLocNo(wcsLocNo); |
| | | taskWrk.setCrnNo(locMast.getCrnNo()); |
| | | taskWrk.setTargetPoint(wcsLocNo); |
| | | taskWrk.setStartPoint(dto.getStaNo().toString()); |
| | | if (taskWrk.getIoType() == 1) { |
| | | taskWrk.setWrkSts(2); |
| | | if (!Cools.isEmpty(taskWrk.getTargetPoint())) { |
| | | taskWrk.setOriginTargetPoint(taskWrk.getTargetPoint()); |
| | | } |
| | | |
| | | // } else if (param.getIoType() == 2) { |
| | | // taskWrk.setWrkSts(11); |
| | | // if (!Cools.isEmpty(param.getStartPoint())) { |
| | | // taskWrk.setStartPoint(Utils.getWcsLocNo(param.getStartPoint()));//起点 |
| | | // taskWrk.setOriginStartPoint(param.getStartPoint()); |
| | | // } |
| | | // taskWrk.setTargetPoint(param.getTargetPoint()); |
| | | // }else if (param.getIoType() == 3){ |
| | | // taskWrk.setWrkSts(11); |
| | | // if (!Cools.isEmpty(param.getStartPoint())) { |
| | | // taskWrk.setStartPoint(param.getStartPoint());//起点 |
| | | // taskWrk.setOriginStartPoint(param.getStartPoint()); |
| | | // } |
| | | } |
| | | return taskWrk; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.controller.CrnController; |
| | | import com.zy.asrs.controller.OpenController; |
| | | import com.zy.asrs.controller.SiteController; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.domain.enums.WorkNoType; |
| | |
| | | import com.zy.asrs.entity.param.Result; |
| | | import com.zy.asrs.entity.param.StorageEscalationParam; |
| | | import com.zy.asrs.entity.param.TaskOverToWms; |
| | | import com.zy.asrs.mapper.*; |
| | | import com.zy.asrs.mapper.BasCrnErrorMapper; |
| | | import com.zy.asrs.mapper.StaDescMapper; |
| | | import com.zy.asrs.mapper.TaskWrkMapper; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.CommandUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | |
| | | import com.zy.core.model.CrnSlave; |
| | | import com.zy.core.model.DevpSlave; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.command.CommandPackage; |
| | | import com.zy.core.model.command.CrnCommand; |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 立体仓库WCS系统主流程业务 |
| | |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if(back){ |
| | | if(staProtocol.getWorkNo()>=9801&&staProtocol.getWorkNo()<=9825){ |
| | | staProtocol.setStaNo((short)105); |
| | | } else if (staProtocol.getWorkNo()>=9826&&staProtocol.getWorkNo()<=9850) { |
| | | staProtocol.setStaNo((short)107); |
| | | }else if (staProtocol.getWorkNo()>=9851&&staProtocol.getWorkNo()<=9875) { |
| | | staProtocol.setStaNo((short)109); |
| | | }else{ |
| | | staProtocol.setStaNo((short)110); |
| | | } |
| | | if (back) { |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | }else{ |
| | | if (!Cools.isEmpty(response)&&!Cools.isEmpty(jsonObject.get("ReturnStatus"))&&jsonObject.get("ReturnStatus").equals(0) && !Cools.isEmpty(jsonObject.get("Result").toString())) { |
| | | } else { |
| | | if (!Cools.isEmpty(response) && !Cools.isEmpty(jsonObject.get("ReturnStatus")) && jsonObject.get("ReturnStatus").equals(0) && !Cools.isEmpty(jsonObject.get("Result").toString())) { |
| | | Result result = JSON.parseObject(jsonObject.get("Result").toString(), Result.class); |
| | | // 创新一个入库工作档 |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(result.getTaskNo()); |
| | |
| | | staProtocol.setStaNo(staDesc.getCrnStn().shortValue()); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("TaskNo",taskWrk.getTaskNo()); |
| | | hashMap.put("TaskNo", taskWrk.getTaskNo()); |
| | | try { |
| | | //开始上报,任务开始时,WCS回调WMS |
| | | response = new HttpHandler.Builder() |
| | |
| | | .doPost(); |
| | | JSONObject jsonObject1 = JSON.parseObject(response); |
| | | Boolean bool = false; |
| | | if(jsonObject1.get("ReturnStatus").equals(0)){ |
| | | if (jsonObject1.get("ReturnStatus").equals(0)) { |
| | | bool = true; |
| | | } |
| | | apiLogService.save("wcs开始入库任务上报wms" |
| | |
| | | } |
| | | } |
| | | } else { |
| | | // staProtocol.setWorkNo((short) 9991); |
| | | if(staProtocol.getWorkNo()>=9801&&staProtocol.getWorkNo()<=9825){ |
| | | staProtocol.setStaNo((short)105); |
| | | } else if (staProtocol.getWorkNo()>=9826&&staProtocol.getWorkNo()<=9850) { |
| | | staProtocol.setStaNo((short)107); |
| | | }else if (staProtocol.getWorkNo()>=9851&&staProtocol.getWorkNo()<=9875) { |
| | | staProtocol.setStaNo((short)109); |
| | | }else{ |
| | | staProtocol.setStaNo((short)110); |
| | | } |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | |
| | | } else { |
| | | // staProtocol.setWorkNo((short) 9991); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | crnCommand.setDestinationPosY(Utils.getBayShort(taskWrk.getTargetPoint())); // 目标库位层 |
| | | crnCommand.setDestinationPosZ(Utils.getLevShort(taskWrk.getTargetPoint())); // 目标库位排 |
| | | crnCommand.setCommand((short) 1); |
| | | log.info("堆垛机入库任务下发={}",crnCommand); |
| | | log.info("堆垛机入库任务下发={}", crnCommand); |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(2, crnCommand), false)) { |
| | | log.error("堆垛机命令生成失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | throw new CoolException("堆垛机命令生成失败"); |
| | |
| | | continue; |
| | | } |
| | | |
| | | LocMast locMast=locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | //判断其库位是否为深库位,如果为深库位找其浅库位是都有货 |
| | | if(locMast.getRow1()==1||locMast.getRow1()==5){ |
| | | LocMast locMast1=locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1()+1)) |
| | | .eq("bay1",locMast.getBay1()) |
| | | .eq("lev1",locMast.getLev1()).eq("loc_sts","F")); |
| | | if (!Cools.isEmpty(locMast1)){ |
| | | log.info(locMast.getLocNo()+"出深库位,浅库位有货"); |
| | | if (locMast.getRow1() == 1 || locMast.getRow1() == 5) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1() + 1)) |
| | | .eq("bay1", locMast.getBay1()) |
| | | .eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | continue; |
| | | } |
| | | }else if(locMast.getRow1()==4||locMast.getRow1()==8){ |
| | | LocMast locMast1=locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1()-1)) |
| | | .eq("bay1",locMast.getBay1()) |
| | | .eq("lev1",locMast.getLev1()).eq("loc_sts","F")); |
| | | if (!Cools.isEmpty(locMast1)){ |
| | | log.info(locMast.getLocNo()+"出深库位,浅库位有货"); |
| | | } else if (locMast.getRow1() == 4 || locMast.getRow1() == 8) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1() - 1)) |
| | | .eq("bay1", locMast.getBay1()) |
| | | .eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | continue; |
| | | } |
| | | } |
| | |
| | | command.setDestinationPosZ(crnStn.getLev().shortValue()); // 目标库位层 |
| | | command.setCommand((short) 1); |
| | | |
| | | if(Cools.isEmpty(taskWrk.getMarkStart())||taskWrk.getMarkStart()==0){ |
| | | if (Cools.isEmpty(taskWrk.getMarkStart()) || taskWrk.getMarkStart() == 0) { |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("TaskNo",taskWrk.getTaskNo()); |
| | | hashMap.put("TaskNo", taskWrk.getTaskNo()); |
| | | String response = ""; |
| | | try { |
| | | //开始上报,出库任务开始时,WCS回调WMS |
| | |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | Boolean bool = false; |
| | | if(jsonObject.get("ReturnStatus").equals(0)){ |
| | | if (jsonObject.get("ReturnStatus").equals(0)) { |
| | | bool = true; |
| | | taskWrk.setMarkStart(1); |
| | | } |
| | |
| | | crnOperatorParam.setCrnNo(crn.getId()); |
| | | R r = crnController.crnTaskComplete(crnOperatorParam); |
| | | Thread.sleep(1000); |
| | | if(!r.get("code").equals(200)){ |
| | | if (!r.get("code").equals(200)) { |
| | | return; |
| | | } |
| | | if (!Cools.isEmpty(taskWrk)) { |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.domain.enums.WorkNoType; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.TaskCreateParam; |
| | | import com.zy.asrs.entity.param.TaskOverParam; |
| | | import com.zy.asrs.entity.param.WMSAndAGVInterfaceParam; |
| | | import com.zy.asrs.entity.param.TaskCreateParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.service.CommonService; |
| | |
| | | @Service |
| | | public class OpenServiceImpl implements OpenService { |
| | | |
| | | @Autowired |
| | | private TaskWrkService taskWrkService; |
| | | @Autowired |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | @Autowired |
| | | private CommonService commonService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | |
| | | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | public ArrayList<String> wharfCode1 = new ArrayList<String>() {{ |
| | | add("J-1101"); |
| | | add("J-1103"); |
| | |
| | | add("H-1101"); |
| | | add("G-1101"); |
| | | }}; |
| | | |
| | | @Autowired |
| | | private TaskWrkService taskWrkService; |
| | | @Autowired |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | @Autowired |
| | | private CommonService commonService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | |
| | | @Override |
| | | public HashMap<String, Object> taskCreate(TaskCreateParam param) { |
| | | HashMap<String,Object> map=new HashMap<>(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | TaskWrk taskWrk = taskWrkService.selectByTaskNo(param.getTaskNo()); |
| | | if (taskWrk != null) { |
| | | map.put("Code","0"); |
| | | map.put("Msg",param.getTaskNo()+"任务已经生成!"); |
| | | map.put("Code", "0"); |
| | | map.put("Msg", param.getTaskNo() + "任务已经生成!"); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if (!taskWrkService.insert(taskWrk)) { |
| | | map.put("Code","0"); |
| | | map.put("Msg",param.getTaskNo()+"创建任务失败!"); |
| | | map.put("Code", "0"); |
| | | map.put("Msg", param.getTaskNo() + "创建任务失败!"); |
| | | return map; |
| | | } |
| | | map.put("Code","1"); |
| | | map.put("Msg","ok"); |
| | | map.put("Code", "1"); |
| | | map.put("Msg", "ok"); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public StaDesc queryCrn(Integer typeNo, Integer stnNo,Integer crnNo) { |
| | | public StaDesc queryCrn(Integer typeNo, Integer stnNo, Integer crnNo) { |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", typeNo) |
| | | .eq("stn_no", stnNo) |
| | | .eq("crn_no",crnNo); |
| | | .eq("crn_no", crnNo); |
| | | StaDesc staDesc = this.selectOne(wrapper); |
| | | if (staDesc == null) { |
| | | return null; |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.TaskWrkLogMapper; |
| | | import com.zy.asrs.entity.TaskWrkLog; |
| | | import com.zy.asrs.service.TaskWrkLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.TaskWrkLog; |
| | | import com.zy.asrs.mapper.TaskWrkLogMapper; |
| | | import com.zy.asrs.service.TaskWrkLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("taskWrkLogService") |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.domain.enums.WorkNoType; |
| | | import com.zy.asrs.entity.StaDesc; |
| | | import com.zy.asrs.mapper.TaskWrkMapper; |
| | | import com.zy.asrs.entity.TaskWrk; |
| | | import com.zy.asrs.mapper.TaskWrkMapper; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.StaDescService; |
| | | import com.zy.asrs.service.TaskWrkService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.utils.CommandUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.service.CommonService; |
| | |
| | | throw new CoolException("未接收到起点和终点,不进行派发"); |
| | | } |
| | | startup(taskWrk, userId); |
| | | }else if(taskWrk.getIoType() == 2){ |
| | | } else if (taskWrk.getIoType() == 2) { |
| | | //2.出库 |
| | | stockOut(taskWrk, userId); |
| | | } else if (taskWrk.getIoType() == 3) { |
| | |
| | | crnCommand.setDestinationPosX(Utils.getRowShort(taskWrk.getTargetPoint())); // 目标库位列 |
| | | crnCommand.setDestinationPosY(Utils.getBayShort(taskWrk.getTargetPoint())); // 目标库位层 |
| | | crnCommand.setDestinationPosZ(Utils.getLevShort(taskWrk.getTargetPoint())); // 目标库位排 |
| | | crnCommand.setCommand((short)1); |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(5, crnCommand),false)) { |
| | | crnCommand.setCommand((short) 1); |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(5, crnCommand), false)) { |
| | | log.error("堆垛机命令生成失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | throw new CoolException("堆垛机命令生成失败"); |
| | | }else{ |
| | | try{ |
| | | } else { |
| | | try { |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("taskNo",taskWrk.getTaskNo()); |
| | | headParam.put("status",taskWrk.getStatus()); |
| | | headParam.put("ioType",taskWrk.getIoType()); |
| | | headParam.put("barcode",taskWrk.getBarcode()); |
| | | headParam.put("taskNo", taskWrk.getTaskNo()); |
| | | headParam.put("status", taskWrk.getStatus()); |
| | | headParam.put("ioType", taskWrk.getIoType()); |
| | | headParam.put("barcode", taskWrk.getBarcode()); |
| | | // headParam.put("reportTime",new Date()); |
| | | String response; |
| | | response = new HttpHandler.Builder() |
| | |
| | | |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | apiLogService.save("wcs派发入库任务上报wms" |
| | | ,wmsUrl+taskStatusFeedbackPath |
| | | ,null |
| | | ,"127.0.0.1" |
| | | ,JSON.toJSONString(headParam) |
| | | ,response |
| | | ,true |
| | | , wmsUrl + taskStatusFeedbackPath |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(headParam) |
| | | , response |
| | | , true |
| | | ); |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | log.error("wcs派发入库任务上报wms失败", taskWrk); |
| | | // throw new CoolException("wcs派发入库任务上报wms失败"); |
| | | } |
| | |
| | | crnCommand.setDestinationPosX(crnStn.getBay().shortValue()); // 目标库位排 |
| | | crnCommand.setDestinationPosY(crnStn.getLev().shortValue()); // 目标库位列 |
| | | crnCommand.setDestinationPosZ(crnStn.getRow().shortValue()); // 目标库位层 |
| | | crnCommand.setCommand((short)1); |
| | | crnCommand.setCommand((short) 1); |
| | | if (!CommandUtils.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(5, crnCommand))) { |
| | | log.error("堆垛机命令生成失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | throw new CoolException("堆垛机命令生成失败"); |
| | |
| | | @Override |
| | | public void locMove(TaskWrk taskWrk, Long userId) { |
| | | //库格移载任务派发 |
| | | if (Cools.isEmpty(taskWrk.getTargetPoint())){ |
| | | return; |
| | | } |
| | | if (Cools.isEmpty(taskWrk.getTargetPoint())) { |
| | | return; |
| | | } |
| | | int workNo = commonService.getWorkNo(WorkNoType.OTHER.type);//获取工作号 |
| | | taskWrk.setWrkNo(workNo);//工作号 |
| | | taskWrk.setStatus(TaskStatusType.DISTRIBUTE.id);//派发状态 |
| | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class WorkServiceImpl implements WorkService { |
| | |
| | | throw new CoolException("修改工作档失败"); |
| | | } |
| | | |
| | | HashMap<String,Object> headParam = new HashMap<>(); |
| | | headParam.put("TaskNo",wrkMast.getTaskNo()); |
| | | headParam.put("Result",0);//完成 |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("TaskNo", wrkMast.getTaskNo()); |
| | | headParam.put("Result", 0);//完成 |
| | | |
| | | try { |
| | | String response; |
| | |
| | | if (!wrkMastRes || !locMastRes) { |
| | | throw new CoolException("保存数据失败"); |
| | | } |
| | | HashMap<String,Object> headParam = new HashMap<>(); |
| | | headParam.put("TaskNo",wrkMast.getTaskNo()); |
| | | headParam.put("Result",1);//取消 |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("TaskNo", wrkMast.getTaskNo()); |
| | | headParam.put("Result", 1);//取消 |
| | | |
| | | try { |
| | | String response; |
| | |
| | | |
| | | @Override |
| | | public boolean save(Integer workNo) { |
| | | return this.baseMapper.save(workNo)>0; |
| | | return this.baseMapper.save(workNo) > 0; |
| | | } |
| | | } |
| | |
| | | @Override |
| | | @Transactional |
| | | public void createWorkDetail(Integer workNo, List<WaitPakin> waitPakins, String barcode) { |
| | | if (waitPakins.isEmpty()){ |
| | | if (waitPakins.isEmpty()) { |
| | | return; |
| | | } |
| | | for (WaitPakin waitPakin : waitPakins) { |
| | | MatCode matCode = matCodeService.selectById(waitPakin.getMatnr()); |
| | | if (Cools.isEmpty(matCode)){ |
| | | if (Cools.isEmpty(matCode)) { |
| | | throw new CoolException("物料条码数据为空"); |
| | | } |
| | | // 保持工作档明细 |
| | |
| | | |
| | | @Override |
| | | public int getOutToStn182(Integer devpNo) { |
| | | return selectCount(new EntityWrapper<WrkMast>().eq("sta_no", devpNo).in("wrk_sts",11,12)); |
| | | return selectCount(new EntityWrapper<WrkMast>().eq("sta_no", devpNo).in("wrk_sts", 11, 12)); |
| | | } |
| | | } |
| | |
| | | |
| | | // protected abstract ReturnT<T> start(); |
| | | |
| | | protected void exceptionHandle(String errorMsg){ |
| | | protected void exceptionHandle(String errorMsg) { |
| | | log.error(errorMsg); |
| | | exceptionHandle(errorMsg, (Object) null); |
| | | } |
| | | |
| | | protected void exceptionHandle(String errorMsg, Object... args){ |
| | | protected void exceptionHandle(String errorMsg, Object... args) { |
| | | log.error(errorMsg); |
| | | throw new CoolException(MessageFormat.format(errorMsg, args)); |
| | | } |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.TaskOverToWms; |
| | | import com.zy.asrs.entity.param.TaskStatusFeedbackParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.entity.TaskWrk; |
| | | import com.zy.asrs.entity.TaskWrkLog; |
| | | import com.zy.asrs.entity.TaskWrkReport; |
| | | import com.zy.asrs.service.TaskWrkReportService; |
| | | import com.zy.asrs.service.TaskWrkService; |
| | | import com.zy.asrs.service.impl.TaskWrkLogServiceImpl; |
| | | import com.zy.asrs.utils.PostMesDataUtils; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.utils.Synchro; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 定时将任务(完成、取消)转成日志 |
| | |
| | | |
| | | @Autowired |
| | | private TaskWrkService taskWrkService; |
| | | @Autowired |
| | | private CommandInfoService commandInfoService; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private TaskWrkLogServiceImpl wrkLogService; |
| | | |
| | | |
| | | @Autowired |
| | | private TaskWrkReportService taskWrkReportService; |
| | | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | @Value("${wms.movePath}") |
| | | private String movePath; |
| | | @Value("${wms.inboundTaskApplyPath}") |
| | | private String inboundTaskApplyPath; |
| | | |
| | | @Value("${wms.TaskExecCallback}") |
| | | private String TaskExecCallback; |
| | | @Value("${wms.taskStatusFeedbackPath}") |
| | | private String taskStatusFeedbackPath; |
| | | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public void execute() throws IOException { |
| | | |
| | | for (TaskWrk taskWrk : taskWrkService.selectToBeHistoryData()) { |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | if (taskWrk.getStatus().equals(TaskStatusType.OVER.id) || taskWrk.getStatus() == 7) {//完成 |
| | | headParam.put("Result", 1); |
| | | } else if (taskWrk.getStatus().equals(TaskStatusType.CANCEL.id)) { |
| | | headParam.put("Result", 2); |
| | | switch (taskWrk.getStatus()) { |
| | | case 4: |
| | | break; |
| | | case 5: |
| | | break; |
| | | } |
| | | String response = ""; |
| | | Boolean bool = false; |
| | | try { |
| | | headParam.put("TaskNo", taskWrk.getTaskNo()); |
| | | log.info("wcs手动完成任务上报wms={}", taskWrk); |
| | | response = new HttpHandler.Builder() |
| | | // .setHeaders(headParam) |
| | | .setUri(wmsUrl) |
| | | .setPath(TaskExecCallback) |
| | | .setJson(JSON.toJSONString(headParam)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | TaskWrkLog taskWrkLog = new TaskWrkLog(taskWrk); |
| | | if (!wrkLogService.insert(taskWrkLog)) { |
| | | throw new CoolException("转历史档失败" + taskWrkLog); |
| | | } |
| | | if (!taskWrkService.deleteById(taskWrk)) { |
| | | throw new CoolException("任务档删除失败" + taskWrkLog); |
| | | } |
| | | bool = true; |
| | | } catch (Exception e) { |
| | | log.error("wcs手动完成任务上报wms失败{},返回值={}", taskWrk, response); |
| | | } finally { |
| | | apiLogService.save("wcs完成或者取消任务上报wms" |
| | | , wmsUrl + TaskExecCallback |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(headParam) |
| | | , response |
| | | , bool |
| | | ); |
| | | TaskWrkReport taskWrkReport = new TaskWrkReport(); |
| | | TaskWrkLog taskWrkLog = new TaskWrkLog(); |
| | | Synchro.Copy(taskWrk, taskWrkReport); |
| | | Synchro.Copy(taskWrk, taskWrkLog); |
| | | if (!taskWrkReportService.insert(taskWrkReport)) { |
| | | throw new CoolException("转移至上报表" + taskWrk); |
| | | } |
| | | if (!wrkLogService.insert(taskWrkLog)) { |
| | | throw new CoolException("转历史档失败" + taskWrk); |
| | | } |
| | | if (!taskWrkService.deleteById(taskWrk)) { |
| | | throw new CoolException("任务档删除失败" + taskWrk); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.entity.TaskWrkReport; |
| | | import com.zy.asrs.entity.TaskWrkReportLog; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.TaskWrkReportLogService; |
| | | import com.zy.asrs.service.TaskWrkReportService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.utils.Synchro; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * 定时将任务(完成、取消)转成日志 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class TaskReportScheduler { |
| | | |
| | | @Autowired |
| | | private TaskWrkReportService taskWrkReportService; |
| | | |
| | | @Autowired |
| | | private TaskWrkReportLogService taskWrkReportLogService; |
| | | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | |
| | | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | |
| | | @Value("${wms.TaskExecCallback}") |
| | | private String TaskExecCallback; |
| | | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | public void execute() throws IOException { |
| | | Page<TaskWrkReport> taskWrkReportPage = taskWrkReportService.selectPage(new Page<>(0, 10)); |
| | | if (taskWrkReportPage.getRecords() != null) { |
| | | for (TaskWrkReport taskWrk : taskWrkReportPage.getRecords()) { |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | if (taskWrk.getStatus().equals(TaskStatusType.OVER.id) || taskWrk.getStatus() == 7) {//完成 |
| | | headParam.put("Result", 1); |
| | | } else if (taskWrk.getStatus().equals(TaskStatusType.CANCEL.id)) { |
| | | headParam.put("Result", 2); |
| | | } |
| | | String response = ""; |
| | | Boolean bool = false; |
| | | try { |
| | | headParam.put("TaskNo", taskWrk.getTaskNo()); |
| | | log.info("wcs手动完成任务上报wms={}", taskWrk); |
| | | response = new HttpHandler.Builder() |
| | | // .setHeaders(headParam) |
| | | .setUri(wmsUrl) |
| | | .setPath(TaskExecCallback) |
| | | .setJson(JSON.toJSONString(headParam)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | TaskWrkReportLog taskWrkLog = new TaskWrkReportLog(); |
| | | Synchro.Copy(taskWrk, taskWrkLog); |
| | | if (!taskWrkReportLogService.insert(taskWrkLog)) { |
| | | throw new CoolException("转历史档失败" + taskWrkLog); |
| | | } |
| | | if (!taskWrkReportService.deleteById(taskWrk)) { |
| | | throw new CoolException("任务档删除失败" + taskWrkLog); |
| | | } |
| | | bool = true; |
| | | } catch (Exception e) { |
| | | log.error("wcs手动完成任务上报wms失败{},返回值={}", taskWrk, response); |
| | | } finally { |
| | | apiLogService.save("wcs完成或者取消任务上报wms" |
| | | , wmsUrl + TaskExecCallback |
| | | , null |
| | | , "127.0.0.1" |
| | | , JSON.toJSONString(headParam) |
| | | , response |
| | | , bool |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | this.content = content; |
| | | } |
| | | |
| | | public boolean isSuccess(){ |
| | | public boolean isSuccess() { |
| | | return this.code == 200; |
| | | } |
| | | |
| | |
| | | private ConfigService configService; |
| | | |
| | | @PostConstruct |
| | | private void start(){ |
| | | private void start() { |
| | | thread = new Thread(() -> { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | |
| | | } |
| | | |
| | | @PreDestroy |
| | | public void shutDown(){ |
| | | public void shutDown() { |
| | | if (thread != null) |
| | | thread.interrupt(); |
| | | log.info("任务中心调度器已停止......"); |
| | |
| | | import com.zy.core.enums.CommandType; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.command.CrnCommand; |
| | | import com.zy.core.model.command.CommandPackage; |
| | | import com.zy.core.model.command.CrnCommand; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | |
| | | import java.util.Date; |
| | |
| | | commandInfo.setCommandStatus(CommandStatusType.CREATE.id); |
| | | commandInfo.setStartTime(new Date()); |
| | | commandInfo.setDevice(SlaveType.Crn.toString()); |
| | | commandInfo.setCommandType(auto? CommandType.AUTO.id : CommandType.MANUAL.id); |
| | | commandInfo.setCommandType(auto ? CommandType.AUTO.id : CommandType.MANUAL.id); |
| | | |
| | | commandInfoService.insert(commandInfo);//插入指令 |
| | | |
| | |
| | | commandInfo.setCommandStatus(CommandStatusType.CREATE.id); |
| | | commandInfo.setStartTime(new Date()); |
| | | commandInfo.setDevice(SlaveType.Devp.toString()); |
| | | commandInfo.setCommandType(auto? CommandType.AUTO.id : CommandType.MANUAL.id); |
| | | commandInfo.setCommandType(auto ? CommandType.AUTO.id : CommandType.MANUAL.id); |
| | | |
| | | commandInfoService.insert(commandInfo);//插入指令 |
| | | |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | |
| | | |
| | | |
| | | /* |
| | | * url: eg: 192.168.4.15:1433 |
| | | * path: eg: api/InterFace/get_InterFace_TestStorage |
| | | * combParam:参数 |
| | | * */ |
| | | public ReturnT<String> postMesData(String name,String URL,String mesPath, Object combParam){ |
| | | * url: eg: 192.168.4.15:1433 |
| | | * path: eg: api/InterFace/get_InterFace_TestStorage |
| | | * combParam:参数 |
| | | * */ |
| | | public ReturnT<String> postMesData(String name, String URL, String mesPath, Object combParam) { |
| | | // if (true){ |
| | | // System.out.println("name:"+name+",URL:"+URL+",mesPath:"+mesPath+",combParam:"+combParam); |
| | | // return SUCCESS; |
| | | // } |
| | | if(combParam != null){ |
| | | if (combParam != null) { |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | |
| | | .setJson(JSON.toJSONString(combParam)) |
| | | .build() |
| | | .doPost(); |
| | | System.out.println("response:"+response); |
| | | System.out.println("response:" + response); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | success = true; |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", URL+"/"+mesPath, JSON.toJSONString(combParam), response); |
| | | throw new CoolException("上报"+name); |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", URL + "/" + mesPath, JSON.toJSONString(combParam), response); |
| | | throw new CoolException("上报" + name); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", URL+"/"+mesPath, JSON.toJSONString(combParam), response); |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", URL + "/" + mesPath, JSON.toJSONString(combParam), response); |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } finally { |
| | | try { |
| | | |
| | | } catch (Exception e) { |
| | | log.error("", e); } |
| | | log.error("", e); |
| | | } |
| | | } |
| | | } |
| | | return SUCCESS; |
| | |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.core.model.CrnSlave; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | |
| | |
| | | public static String getWmsLocNo(String locNo) { |
| | | String loc = null; |
| | | int row = Integer.parseInt(locNo.substring(0, 2)); |
| | | int bay = Integer.parseInt(locNo.substring(2, 5))-1; |
| | | int bay = Integer.parseInt(locNo.substring(2, 5)) - 1; |
| | | int lev = Integer.parseInt(locNo.substring(5, 7)); |
| | | Integer sssc = getRowZ(row); |
| | | Integer fz = getFZ(row, sssc); |
| | | Integer fz1 = getFZ1(row, sssc); |
| | | |
| | | //System.out.println(sssc + "-" + bay + "-" + lev + "-" + fz + "-" + fz1); |
| | | loc = String.format("%02d",sssc) + "-" + String.format("%02d",bay) + "-" + String.format("%02d",lev) + "-" + String.format("%02d",fz) + "-" + String.format("%02d",fz1); |
| | | loc = String.format("%02d", sssc) + "-" + String.format("%02d", bay) + "-" + String.format("%02d", lev) + "-" + String.format("%02d", fz) + "-" + String.format("%02d", fz1); |
| | | return loc; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //转换wms传输的库位号 |
| | | public static String getWcsLocNo(String locNo){ |
| | | public static String getWcsLocNo(String locNo) { |
| | | String[] split = locNo.split("-"); |
| | | int[] wcsRow = getWcsRow(split[0]); |
| | | int[] ints = null; |
| | | if (split[3].equals("01")){ |
| | | ints = Arrays.copyOfRange(wcsRow, 0, (wcsRow.length+2-1) / 2); |
| | | if (split[4].equals("01")){ |
| | | if (ints.length<2){ |
| | | if (split[3].equals("01")) { |
| | | ints = Arrays.copyOfRange(wcsRow, 0, (wcsRow.length + 2 - 1) / 2); |
| | | if (split[4].equals("01")) { |
| | | if (ints.length < 2) { |
| | | |
| | | }else { |
| | | } else { |
| | | ints = Arrays.copyOfRange(ints, ints.length / 2, ints.length); |
| | | } |
| | | }else { |
| | | if (ints.length<2){ |
| | | } else { |
| | | if (ints.length < 2) { |
| | | |
| | | }else { |
| | | ints = Arrays.copyOfRange(ints, ints.length / 2-1,ints.length-1); |
| | | } else { |
| | | ints = Arrays.copyOfRange(ints, ints.length / 2 - 1, ints.length - 1); |
| | | } |
| | | } |
| | | }else { |
| | | ints = Arrays.copyOfRange(wcsRow, (wcsRow.length+2-1) / 2,wcsRow.length ); |
| | | if (split[4].equals("01")){ |
| | | if (ints.length<2){ |
| | | } else { |
| | | ints = Arrays.copyOfRange(wcsRow, (wcsRow.length + 2 - 1) / 2, wcsRow.length); |
| | | if (split[4].equals("01")) { |
| | | if (ints.length < 2) { |
| | | |
| | | }else { |
| | | ints = Arrays.copyOfRange(ints, ints.length / 2-1,ints.length-1); |
| | | } else { |
| | | ints = Arrays.copyOfRange(ints, ints.length / 2 - 1, ints.length - 1); |
| | | } |
| | | }else { |
| | | if (ints.length<2){ |
| | | } else { |
| | | if (ints.length < 2) { |
| | | |
| | | }else { |
| | | } else { |
| | | ints = Arrays.copyOfRange(ints, ints.length / 2, ints.length); |
| | | } |
| | | |
| | |
| | | } |
| | | int i = ints[0]; |
| | | String wcsLocNo = ""; |
| | | Integer bay = Integer.parseInt(split[1])+1; |
| | | Integer bay = Integer.parseInt(split[1]) + 1; |
| | | String bay2 = ""; |
| | | if (bay>9){ |
| | | if (bay > 9) { |
| | | bay2 = bay.toString(); |
| | | }else { |
| | | bay2 = "0"+bay; |
| | | } else { |
| | | bay2 = "0" + bay; |
| | | } |
| | | if (i>9){ |
| | | wcsLocNo = i+"0"+bay2+split[2]; |
| | | }else { |
| | | wcsLocNo = "0"+i+"0"+bay2+split[2]; |
| | | if (i > 9) { |
| | | wcsLocNo = i + "0" + bay2 + split[2]; |
| | | } else { |
| | | wcsLocNo = "0" + i + "0" + bay2 + split[2]; |
| | | } |
| | | |
| | | |
| | | |
| | | return wcsLocNo; |
| | | } |
| | | public static int[] getWcsRow(String row){ |
| | | |
| | | public static int[] getWcsRow(String row) { |
| | | int[] array = null; |
| | | switch (row){ |
| | | switch (row) { |
| | | case "01": |
| | | array= new int[]{1, 2, 3, 4}; |
| | | array = new int[]{1, 2, 3, 4}; |
| | | break; |
| | | case "02": |
| | | array= new int[]{5,6}; |
| | | array = new int[]{5, 6}; |
| | | break; |
| | | case "03": |
| | | array= new int[]{7,8,9,10}; |
| | | array = new int[]{7, 8, 9, 10}; |
| | | break; |
| | | case "04": |
| | | array= new int[]{11,12,13,14}; |
| | | array = new int[]{11, 12, 13, 14}; |
| | | break; |
| | | case "05": |
| | | array= new int[]{15,16,17,18}; |
| | | array = new int[]{15, 16, 17, 18}; |
| | | break; |
| | | case "06": |
| | | array= new int[]{19,20,21}; |
| | | array = new int[]{19, 20, 21}; |
| | | break; |
| | | default: |
| | | |
| | |
| | | return array; |
| | | } |
| | | |
| | | public static float scale(Float f){ |
| | | public static float scale(Float f) { |
| | | if (f == null || f == 0f || Float.isNaN(f)) { |
| | | return 0f; |
| | | } |
| | |
| | | } |
| | | |
| | | //站点号转换 |
| | | public static String getEquipmentCode(String targetPoint){ |
| | | return "J-1"+targetPoint; |
| | | public static String getEquipmentCode(String targetPoint) { |
| | | return "J-1" + targetPoint; |
| | | } |
| | | |
| | | public static String zerofill(String msg, Integer count){ |
| | | if (msg.length() == count){ |
| | | public static String zerofill(String msg, Integer count) { |
| | | if (msg.length() == count) { |
| | | return msg; |
| | | } else if (msg.length() > count){ |
| | | } else if (msg.length() > count) { |
| | | return msg.substring(0, 16); |
| | | } else { |
| | | StringBuilder msgBuilder = new StringBuilder(msg); |
| | | for (int i = 0; i<count-msg.length(); i++){ |
| | | msgBuilder.insert(0,"0"); |
| | | for (int i = 0; i < count - msg.length(); i++) { |
| | | msgBuilder.insert(0, "0"); |
| | | } |
| | | return msgBuilder.toString(); |
| | | } |
| | |
| | | /** |
| | | * 判断是否为深库位 |
| | | */ |
| | | public static boolean isDeepLoc(SlaveProperties slaveProperties, String locNo){ |
| | | public static boolean isDeepLoc(SlaveProperties slaveProperties, String locNo) { |
| | | if (slaveProperties.isDoubleDeep()) { |
| | | int row = getRow(locNo); |
| | | return slaveProperties.getDoubleLocs().contains(row); |
| | |
| | | /** |
| | | * 判断是否为深库位 |
| | | */ |
| | | public static boolean isDeepLoc(SlaveProperties slaveProperties, Integer row){ |
| | | public static boolean isDeepLoc(SlaveProperties slaveProperties, Integer row) { |
| | | if (slaveProperties.isDoubleDeep()) { |
| | | return slaveProperties.getDoubleLocs().contains(row); |
| | | } else { |
| | |
| | | /** |
| | | * 判断是否为浅库位 |
| | | */ |
| | | public static boolean isShallowLoc(SlaveProperties slaveProperties, String locNo){ |
| | | public static boolean isShallowLoc(SlaveProperties slaveProperties, String locNo) { |
| | | if (slaveProperties.isDoubleDeep()) { |
| | | int row = getRow(locNo); |
| | | return !slaveProperties.getDoubleLocs().contains(row); |
| | |
| | | /** |
| | | * 判断是否为浅库位 |
| | | */ |
| | | public static boolean isShallowLoc(SlaveProperties slaveProperties, Integer row){ |
| | | public static boolean isShallowLoc(SlaveProperties slaveProperties, Integer row) { |
| | | if (slaveProperties.isDoubleDeep()) { |
| | | return !slaveProperties.getDoubleLocs().contains(row); |
| | | } else { |
| | |
| | | public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) { |
| | | int row = getRow(deepLoc); |
| | | // int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); |
| | | int shallowRow = getShallowRow(row); |
| | | int shallowRow = getShallowRow(row); |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | | public static int getShallowRow(Integer row){ |
| | | |
| | | public static int getShallowRow(Integer row) { |
| | | Map<Integer, Integer> map = new HashMap<>(); |
| | | map.put(1,2);map.put(4,3); |
| | | map.put(7,8);map.put(10,9); |
| | | map.put(11,12);map.put(14,13); |
| | | map.put(15,16);map.put(18,17); |
| | | map.put(19,20); |
| | | map.put(1, 2); |
| | | map.put(4, 3); |
| | | map.put(7, 8); |
| | | map.put(10, 9); |
| | | map.put(11, 12); |
| | | map.put(14, 13); |
| | | map.put(15, 16); |
| | | map.put(18, 17); |
| | | map.put(19, 20); |
| | | return map.get(row); |
| | | } |
| | | |
| | |
| | | List<CrnSlave.CrnStn> crnInStn = null; |
| | | if (pakIn) { |
| | | crnInStn = crn.getCrnInStn(); |
| | | }else { |
| | | } else { |
| | | crnInStn = crn.getCrnOutStn(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public static Integer StaNoCrnNo(Integer staNo) { |
| | | switch (staNo){ |
| | | switch (staNo) { |
| | | case 100: |
| | | case 101: |
| | | return 1; |
| | |
| | | } |
| | | |
| | | public static boolean locNoRowBoolean(Integer row) { |
| | | switch (row){ |
| | | switch (row) { |
| | | case 1: |
| | | case 2: |
| | | case 4: |
| | |
| | | } |
| | | } |
| | | |
| | | public static String Fusion(int x, int y, int z){ |
| | | String locNo="0"+x; |
| | | if(z>=10){ |
| | | locNo=locNo+"0"+z; |
| | | }else{ |
| | | locNo=locNo+"00"+z; |
| | | public static String Fusion(int x, int y, int z) { |
| | | String locNo = "0" + x; |
| | | if (z >= 10) { |
| | | locNo = locNo + "0" + z; |
| | | } else { |
| | | locNo = locNo + "00" + z; |
| | | } |
| | | if(y>=10){ |
| | | locNo=locNo+y; |
| | | }else { |
| | | locNo=locNo+"0"+y; |
| | | if (y >= 10) { |
| | | locNo = locNo + y; |
| | | } else { |
| | | locNo = locNo + "0" + y; |
| | | } |
| | | |
| | | return locNo; |
src/main/java/com/zy/asrs/utils/VersionUtils.java
src/main/java/com/zy/common/CodeBuilder.java
src/main/java/com/zy/common/Main.java
src/main/java/com/zy/common/config/AdminInterceptor.java
src/main/java/com/zy/common/config/WebConfig.java
src/main/java/com/zy/common/entity/Parameter.java
src/main/java/com/zy/common/model/PageParam.java
src/main/java/com/zy/common/model/Shelves.java
src/main/java/com/zy/common/model/annotations/bit.java
src/main/java/com/zy/common/model/annotations/expr.java
src/main/java/com/zy/common/model/annotations/flag.java
src/main/java/com/zy/common/model/annotations/little.java
src/main/java/com/zy/common/model/annotations/size.java
src/main/java/com/zy/common/service/CommonService.java
src/main/java/com/zy/common/utils/CollectionUtils.java
src/main/java/com/zy/common/utils/CommonUtils.java
src/main/java/com/zy/common/utils/Http.java
src/main/java/com/zy/common/utils/HttpHandler.java
src/main/java/com/zy/common/utils/QrCode.java
src/main/java/com/zy/common/utils/RandomValidateCodeUtil.java
src/main/java/com/zy/common/utils/RedisUtil.java
src/main/java/com/zy/common/utils/ReflectUtils.java
src/main/java/com/zy/common/utils/Struct.java
src/main/java/com/zy/common/utils/Synchro.java
src/main/java/com/zy/common/utils/YamlUtils.java
src/main/java/com/zy/common/utils/excel/ExcelUtils.java
src/main/java/com/zy/common/web/AuthController.java
src/main/java/com/zy/common/web/BaseController.java
src/main/java/com/zy/common/web/RouterController.java
src/main/java/com/zy/core/DevpThread.java
src/main/java/com/zy/core/MainCpProcess.java
src/main/java/com/zy/core/ServerBootstrap.java
src/main/java/com/zy/core/cache/MessageQueue.java
src/main/java/com/zy/core/cache/SlaveConnection.java
src/main/java/com/zy/core/enums/CrnFingerPosType.java
src/main/java/com/zy/core/enums/CrnForkPosType.java
src/main/java/com/zy/core/enums/CrnLiftPosType.java
src/main/java/com/zy/core/enums/CrnModeType.java
src/main/java/com/zy/core/enums/CrnStatusType.java
src/main/java/com/zy/core/enums/CrnTaskModeType.java
src/main/java/com/zy/core/enums/SlaveType.java
src/main/java/com/zy/core/model/command/CommandPackage.java
src/main/java/com/zy/core/model/command/CrnCommand.java
src/main/java/com/zy/core/model/protocol/CrnProtocol.java
src/main/java/com/zy/core/model/protocol/StaProtocol.java
src/main/java/com/zy/core/netty/AbstractInboundHandler.java
src/main/java/com/zy/core/netty/HandlerInitializer.java
src/main/java/com/zy/core/netty/OnlineServer.java
src/main/java/com/zy/core/netty/cache/ChannelCache.java
src/main/java/com/zy/core/netty/handle/PackageServerHandler.java
src/main/java/com/zy/core/netty/handle/ProtectorHandler.java
src/main/java/com/zy/core/netty/handle/ProtocolDecoder.java
src/main/java/com/zy/core/netty/handle/ProtocolEncoder.java
src/main/java/com/zy/core/thread/BarcodeThread.java
src/main/java/com/zy/core/thread/LedThread.java
src/main/java/com/zy/core/thread/ScaleThread.java
src/main/java/com/zy/core/thread/SiemensCrnThread.java
src/main/java/com/zy/core/thread/SiemensDevpThread.java
src/main/java/com/zy/system/controller/ApiController.java
src/main/java/com/zy/system/controller/ConfigController.java
src/main/java/com/zy/system/controller/HomeController.java
src/main/java/com/zy/system/controller/HostController.java
src/main/java/com/zy/system/controller/LicenseCreatorController.java
src/main/java/com/zy/system/controller/OperateLogController.java
src/main/java/com/zy/system/controller/PermissionController.java
src/main/java/com/zy/system/controller/ResourceController.java
src/main/java/com/zy/system/controller/RoleController.java
src/main/java/com/zy/system/controller/UserController.java
src/main/java/com/zy/system/controller/UserLoginController.java
src/main/java/com/zy/system/entity/Api.java
src/main/java/com/zy/system/entity/Config.java
src/main/java/com/zy/system/entity/Host.java
src/main/java/com/zy/system/entity/OperateLog.java
src/main/java/com/zy/system/entity/Permission.java
src/main/java/com/zy/system/entity/Resource.java
src/main/java/com/zy/system/entity/Role.java
src/main/java/com/zy/system/entity/RolePermission.java
src/main/java/com/zy/system/entity/User.java
src/main/java/com/zy/system/entity/UserLogin.java
src/main/java/com/zy/system/entity/license/AbstractServerInfos.java
src/main/java/com/zy/system/entity/license/CustomLicenseManager.java
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
src/main/java/com/zy/system/entity/license/LicenseCreator.java
src/main/java/com/zy/system/entity/license/LicenseVerify.java
src/main/java/com/zy/system/entity/license/WindowsServerInfos.java
src/main/resources/application-prod.yml
src/main/resources/mapper/TaskWrkReportLogMapper.xml
src/main/resources/mapper/TaskWrkReportMapper.xml |