| | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <finalName>gtSxkWms</finalName> |
| | | <finalName>wms</finalName> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | 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.common.R; |
| | | import com.zy.asrs.entity.BasRgv; |
| | | import com.zy.asrs.service.BasRgvService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class BasRgvController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasRgvService basRgvService; |
| | | |
| | | @RequestMapping(value = "/basRgv/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basRgvService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgv/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasRgv> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasRgv.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basRgvService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgv/add/auth") |
| | | @ManagerAuth(memo = "新增RGV") |
| | | public R add(BasRgv basRgv) { |
| | | basRgvService.insert(basRgv); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgv/update/auth") |
| | | @ManagerAuth(memo = "修改RGV") |
| | | public R update(BasRgv basRgv){ |
| | | if (Cools.isEmpty(basRgv) || null==basRgv.getRgvNo()){ |
| | | return R.error(); |
| | | } |
| | | basRgvService.updateById(basRgv); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgv/delete/auth") |
| | | @ManagerAuth(memo = "删除RGV") |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basRgvService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgv/export/auth") |
| | | @ManagerAuth(memo = "导出RGV基础信息") |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasRgv> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basRgv")); |
| | | convert(map, wrapper); |
| | | List<BasRgv> list = basRgvService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasRgv> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("rgv_no", condition); |
| | | Page<BasRgv> page = basRgvService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasRgv basRgv : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basRgv.getRgvNo()); |
| | | map.put("value", basRgv.getRgvNo()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgv/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasRgv> wrapper = new EntityWrapper<BasRgv>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasRgv.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | 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.common.R; |
| | | import com.zy.asrs.entity.BasRgvErrorLog; |
| | | import com.zy.asrs.service.BasRgvErrorLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class BasRgvErrorLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasRgvErrorLogService basRgvErrorLogService; |
| | | |
| | | @RequestMapping(value = "/basRgvErrorLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basRgvErrorLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrorLog/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<BasRgvErrorLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasRgvErrorLog.class, param.keySet(), wrapper, condition); |
| | | |
| | | if (Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy("create_time", false); |
| | | } else { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | |
| | | return R.ok(basRgvErrorLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | /** |
| | | * 根据精确的 createTime 查询 |
| | | */ |
| | | @RequestMapping(value = "/basRgvErrorLog/listByUuid/auth") |
| | | @ManagerAuth |
| | | public R listByUuid(@RequestParam String uuid, |
| | | @RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit) { |
| | | |
| | | EntityWrapper<BasRgvErrorLog> wrapper = new EntityWrapper<>(); |
| | | // 精确匹配当天的数据,或者某个具体时间 |
| | | wrapper.eq("id", uuid); // 如果希望精确到秒 |
| | | |
| | | Page<BasRgvErrorLog> page = basRgvErrorLogService.selectPage(new Page<>(curr, limit), wrapper); |
| | | return R.ok(page); |
| | | } |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrorLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasRgvErrorLog basRgvErrorLog) { |
| | | basRgvErrorLogService.insert(basRgvErrorLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrorLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasRgvErrorLog basRgvErrorLog){ |
| | | if (Cools.isEmpty(basRgvErrorLog) || null==basRgvErrorLog.getId()){ |
| | | return R.error(); |
| | | } |
| | | basRgvErrorLogService.updateById(basRgvErrorLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrorLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basRgvErrorLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrorLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasRgvErrorLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basRgvErrorLog")); |
| | | convert(map, wrapper); |
| | | List<BasRgvErrorLog> list = basRgvErrorLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrorLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasRgvErrorLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("rgv_no", condition); |
| | | Page<BasRgvErrorLog> page = basRgvErrorLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasRgvErrorLog basRgvErrorLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basRgvErrorLog.getId()); |
| | | map.put("value", basRgvErrorLog.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvErrorLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasRgvErrorLog> wrapper = new EntityWrapper<BasRgvErrorLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvErrorLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasRgvErrorLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | 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.common.R; |
| | | import com.zy.asrs.entity.BasRgvMap; |
| | | import com.zy.asrs.service.BasRgvMapService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class BasRgvMapController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasRgvMapService basRgvMapService; |
| | | |
| | | @RequestMapping(value = "/basRgvMap/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basRgvMapService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvMap/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasRgvMap> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasRgvMap.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basRgvMapService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvMap/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasRgvMap basRgvMap) { |
| | | basRgvMapService.insert(basRgvMap); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvMap/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasRgvMap basRgvMap){ |
| | | if (Cools.isEmpty(basRgvMap) || null==basRgvMap.getRgvNo()){ |
| | | return R.error(); |
| | | } |
| | | basRgvMapService.updateById(basRgvMap); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvMap/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | basRgvMapService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvMap/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasRgvMap> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basRgvMap")); |
| | | convert(map, wrapper); |
| | | List<BasRgvMap> list = basRgvMapService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvMapQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasRgvMap> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("rgv_no", condition); |
| | | Page<BasRgvMap> page = basRgvMapService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasRgvMap basRgvMap : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basRgvMap.getRgvNo()); |
| | | map.put("value", basRgvMap.getRgvNo()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvMap/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasRgvMap> wrapper = new EntityWrapper<BasRgvMap>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvMapService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasRgvMap.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | 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.common.R; |
| | | import com.zy.asrs.entity.BasRgvOpt; |
| | | import com.zy.asrs.service.BasRgvOptService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class BasRgvOptController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasRgvOptService basRgvOptService; |
| | | |
| | | @RequestMapping(value = "/basRgvOpt/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basRgvOptService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvOpt/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasRgvOpt> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasRgvOpt.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("send_time", false); |
| | | } |
| | | return R.ok(basRgvOptService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvOpt/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasRgvOpt basRgvOpt) { |
| | | basRgvOptService.insert(basRgvOpt); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvOpt/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasRgvOpt basRgvOpt){ |
| | | if (Cools.isEmpty(basRgvOpt) || null==basRgvOpt.getId()){ |
| | | return R.error(); |
| | | } |
| | | basRgvOptService.updateById(basRgvOpt); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvOpt/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basRgvOptService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvOpt/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasRgvOpt> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basRgvOpt")); |
| | | convert(map, wrapper); |
| | | List<BasRgvOpt> list = basRgvOptService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvOptQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasRgvOpt> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasRgvOpt> page = basRgvOptService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasRgvOpt basRgvOpt : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basRgvOpt.getId()); |
| | | map.put("value", basRgvOpt.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvOpt/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasRgvOpt> wrapper = new EntityWrapper<BasRgvOpt>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvOptService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasRgvOpt.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | 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.common.R; |
| | | import com.zy.asrs.entity.BasRgvPath; |
| | | import com.zy.asrs.service.BasRgvPathService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class BasRgvPathController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasRgvPathService basRgvPathService; |
| | | |
| | | @RequestMapping(value = "/basRgvPath/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basRgvPathService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvPath/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BasRgvPath> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasRgvPath.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basRgvPathService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvPath/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasRgvPath basRgvPath) { |
| | | basRgvPathService.insert(basRgvPath); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvPath/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasRgvPath basRgvPath){ |
| | | if (Cools.isEmpty(basRgvPath) || null==basRgvPath.getRgvNo()){ |
| | | return R.error(); |
| | | } |
| | | basRgvPathService.updateById(basRgvPath); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvPath/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basRgvPathService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvPath/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasRgvPath> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basRgvPath")); |
| | | convert(map, wrapper); |
| | | List<BasRgvPath> list = basRgvPathService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvPathQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasRgvPath> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("rgv_no", condition); |
| | | Page<BasRgvPath> page = basRgvPathService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasRgvPath basRgvPath : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basRgvPath.getRgvNo()); |
| | | map.put("value", basRgvPath.getRgvNo()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basRgvPath/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasRgvPath> wrapper = new EntityWrapper<BasRgvPath>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basRgvPathService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasRgvPath.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | return R.ok(outPage); |
| | | } |
| | | |
| | | // @RequestMapping(value = "/manLocDetl/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){ |
| | | Long hostId = getHostId(); |
| | | if (hostId != null) { |
| | | param.put("host_id", hostId); |
| | | } |
| | | Object nodeId = param.get("node_id"); |
| | | if (Cools.isEmpty(nodeId)) { |
| | | nodeId = getOriginNode().getId(); |
| | | param.put("node_id", String.valueOf(nodeId)); |
| | | } |
| | | Object tagId = param.get("tag_id"); |
| | | if (Cools.isEmpty(tagId)) { |
| | | tagId = getOriginTag().getId(); |
| | | param.put("tag_id", String.valueOf(tagId)); |
| | | } |
| | | if (!Cools.isEmpty(param.get("update_time"))){ |
| | | String val = String.valueOf(param.get("update_time")); |
| | | if (val.contains(RANGE_TIME_LINK)) { |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | param.put("startTime", DateUtils.convert(dates[0])); |
| | | param.put("endTime", DateUtils.convert(dates[1])); |
| | | param.remove("update_time"); |
| | | } |
| | | } |
| | | return R.ok(manLocDetlService.getPage(toPage(curr, limit, param, ManLocDetl.class))); |
| | | } |
| | | |
| | | @RequestMapping("/manLocDetl/adjust/start") |
| | | @ManagerAuth(memo = "库存调整") |
| | | public R locDetlAdjustStart(@RequestBody LocDetlAdjustParam param) { |
| | |
| | | return R.ok("库存调整成功"); |
| | | } |
| | | |
| | | // @RequestMapping(value = "/manLocDetl/asrsAndSaas/list") |
| | | // @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){ |
| | | // |
| | | // Page<ManLocDetl> manLocDetlPage = toPage(curr, limit, param, ManLocDetl.class); |
| | | // Page<ManLocDetl> all = manLocDetlService.selectAllPage(manLocDetlPage); |
| | | // return R.ok().add(all); |
| | | // } |
| | | @RequestMapping(value = "/manLocDetl/asrsAndSaas/list") |
| | | @ManagerAuth |
| | | public R listAsrs(@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){ |
| | | |
| | | Page<ManLocDetl> manLocDetlPage = toPage(curr, limit, param, ManLocDetl.class); |
| | | Page<ManLocDetl> all = manLocDetlService.selectAllPage(manLocDetlPage); |
| | | return R.ok().add(all); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | 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()); |
| | |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | if (entry.getKey().equals("locNo")) { |
| | | if (entry.getKey().equals("loc_no")) { |
| | | wrapper.eq("loc_no", String.valueOf(entry.getValue())); |
| | | } else { |
| | | wrapper.like(entry.getKey(), String.valueOf(entry.getValue())); |
| | | // wrapper.like(entry.getKey(), String.valueOf(entry.getValue())); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.vo.QueryLocVo; |
| | | import com.zy.asrs.mapper.ReportQueryMapper; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.WaitPakinService; |
| | | import com.zy.asrs.service.WrkDetlService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/open/asrs") |
| | | public class MonitorController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private ReportQueryMapper reportQueryMapper; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | /** |
| | | * WMS任务查询接口 |
| | | * @param taskNo |
| | | * @return |
| | | */ |
| | | @PostMapping("queryTask") |
| | | public R queryTask(@RequestParam("taskNo") String taskNo) { |
| | | if (Cools.isEmpty(taskNo)) { |
| | | return R.error("参数为空"); |
| | | } |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", taskNo)); |
| | | return R.ok(wrkDetls); |
| | | } |
| | | |
| | | /** |
| | | * WMS入库任务查询接口 |
| | | * @param barcode |
| | | * @return |
| | | */ |
| | | @PostMapping("/queryComb") |
| | | public R queryComb(@RequestParam("combNo") String barcode) { |
| | | if (Cools.isEmpty(barcode)) { |
| | | return R.error("参数为空"); |
| | | } |
| | | List<WaitPakin> waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", barcode)); |
| | | return R.ok(waitPakins); |
| | | } |
| | | |
| | | /** |
| | | * WMS库存数据查询 |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryLoc") |
| | | public R queryLoc() { |
| | | QueryLocVo queryLocVo = new QueryLocVo(); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | int emptyCount = locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_sts", "O")); |
| | | int disableCount = locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_sts", "X")); |
| | | int total = locMastService.selectCount(new EntityWrapper<>()); |
| | | int stockCount = locMastService.selectCount(new EntityWrapper<LocMast>().eq("loc_sts", "F")); |
| | | int used = locMastService.selectCount(new EntityWrapper<LocMast>().ne("loc_sts", "O")); |
| | | map.put("在库", stockCount); |
| | | map.put("空库", emptyCount); |
| | | map.put("使用", used); |
| | | map.put("禁用", disableCount); |
| | | list.add(map); |
| | | queryLocVo.setEmptyCount(emptyCount); // 空库位 |
| | | queryLocVo.setDisableCount(disableCount); // 禁用 |
| | | queryLocVo.setTotal(total); // 总数 |
| | | queryLocVo.setStockCount(stockCount); // 在库 |
| | | queryLocVo.setUsed(used); // 库位使用 |
| | | queryLocVo.setPie(list); |
| | | queryLocVo.setUsedPr((double) used / total * 100); // 使用率 |
| | | return R.ok(queryLocVo); |
| | | |
| | | |
| | | |
| | | |
| | | // Map<String,Object> map=new HashMap<String, Object>(); |
| | | // List<ChartBean> list = new ArrayList<ChartBean>(); |
| | | // |
| | | // LocChartPie locUseRate = reportQueryMapper.getLocUseRate(); |
| | | // if(locUseRate!=null) { |
| | | // ChartBean fqty = new ChartBean(); |
| | | // fqty.setName("在库库位"); |
| | | // fqty.setY(locUseRate.getFqty()); |
| | | // list.add(fqty); |
| | | // |
| | | // ChartBean oqty = new ChartBean(); |
| | | // oqty.setName("空库位"); |
| | | // oqty.setY(locUseRate.getOqty()); |
| | | // list.add(oqty); |
| | | // |
| | | // ChartBean uqty = new ChartBean(); |
| | | // uqty.setName("使用库位"); |
| | | // uqty.setY(locUseRate.getUqty()); |
| | | // list.add(uqty); |
| | | // |
| | | // ChartBean xqty = new ChartBean(); |
| | | // xqty.setName("禁用库位"); |
| | | // xqty.setY(locUseRate.getXqty()); |
| | | // list.add(xqty); |
| | | // } |
| | | // map.put("rows",list); |
| | | // return R.ok(map); |
| | | } |
| | | |
| | | /** |
| | | * WMS入出库折线图 |
| | | * @return |
| | | */ |
| | | @GetMapping("/line/charts") |
| | | public R lineCharts() { |
| | | Map<String,Object> map=new HashMap<String, Object>(); |
| | | List<AxisBean> list = new ArrayList<AxisBean>(); |
| | | |
| | | List<WorkChartAxis> listChart = reportQueryMapper.getChartAxis(); |
| | | |
| | | 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++) { |
| | | boolean flag = true; |
| | | calendar.add(Calendar.DATE, 1); |
| | | String str = sf.format(calendar.getTime()); |
| | | for(WorkChartAxis workChart : listChart) { |
| | | if(str.equals(workChart.getYmd())) { |
| | | data1.add(workChart.getInqty()); |
| | | data2.add(workChart.getOutqty()); |
| | | flag = false; |
| | | break; |
| | | } |
| | | } |
| | | if(flag) { |
| | | data1.add(0); |
| | | data2.add(0); |
| | | } |
| | | } |
| | | AxisBean inqty = new AxisBean(); |
| | | inqty.setName("入库数量"); |
| | | Integer[] array1 = new Integer[data1.size()]; |
| | | inqty.setData(data1.toArray(array1)); |
| | | list.add(inqty); |
| | | AxisBean outqty = new AxisBean(); |
| | | outqty.setName("出库数量"); |
| | | Integer[] array2 = new Integer[data2.size()]; |
| | | outqty.setData(data2.toArray(array2)); |
| | | list.add(outqty); |
| | | } |
| | | map.put("rows",list); |
| | | return R.ok(map); |
| | | } |
| | | |
| | | @GetMapping("/locDetl/statistics") |
| | | public R locDetlStatistics() { |
| | | List<LocDetl> list = locDetlService.query20(); |
| | | return R.ok(list); |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.annotations.AppAuth; |
| | | import com.core.common.*; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.entity.vo.OpenInventoryVo; |
| | | import com.zy.asrs.entity.vo.TokenVo; |
| | | import com.zy.asrs.mapper.LocDetlMapper; |
| | | import com.zy.asrs.service.OpenService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.service.wms.Result; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Created by vincent on 2022/4/8 |
| | |
| | | private OpenService openService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Value("${open-asrs.auth.app-id:wms_8f7c3d126a944e3ab5c89d21f4a7c6b2}") |
| | | private String openAppId; |
| | | |
| | | @Value("${open-asrs.auth.app-secret:D9f3A7xP1kLm8Q2tW5zH0sY6vR4bNcE7FjK3uM9pT2aL8qX6}") |
| | | private String openAppSecret; |
| | | |
| | | @Value("${open-asrs.auth.token-valid-minutes:30}") |
| | | private Integer tokenValidMinutes; |
| | | |
| | | private static final Map<String, TokenVo> TOKEN_CACHE = new ConcurrentHashMap<>(); |
| | | |
| | | @Autowired |
| | | private LocDetlMapper locDetlMapper; |
| | | |
| | | @GetMapping("/order/delete/v1") |
| | | @AppAuth(memo = "订单信息删除") |
| | |
| | | } |
| | | |
| | | |
| | | /*=============================================NEW===================================================*/ |
| | | private void authNew(String appkey, Object obj, HttpServletRequest request, String url) { |
| | | log.info("{}接口被访问;appkey:{};请求数据:{}", url, appkey, JSON.toJSONString(obj)); |
| | | request.setAttribute("cache", obj); |
| | | if (!auth) { |
| | | return; |
| | | } |
| | | String authorization = request.getHeader("Authorization"); |
| | | if (Cools.isEmpty(authorization)) { |
| | | authorization = request.getHeader("authorization"); |
| | | } |
| | | if (!Cools.isEmpty(authorization)) { |
| | | String val = authorization.trim(); |
| | | if (val.toLowerCase().startsWith("bearer")) { |
| | | int idx = val.indexOf(' '); |
| | | authorization = idx > -1 ? val.substring(idx + 1).trim() : ""; |
| | | }else { |
| | | authorization = val; |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(authorization)) { |
| | | if (validToken(authorization)) { |
| | | return; |
| | | } |
| | | throw new CoolException("认证失败,请确认Authorization无误!"); |
| | | } |
| | | throw new CoolException("认证失败,请确认Authorization无误!"); |
| | | } |
| | | |
| | | public static boolean validToken(String authorization) { |
| | | if (Cools.isEmpty(authorization)) { |
| | | return false; |
| | | } |
| | | TokenVo tokenInfo = TOKEN_CACHE.get(authorization); |
| | | if (tokenInfo == null) { |
| | | return false; |
| | | } |
| | | if (System.currentTimeMillis() > tokenInfo.getValidTime()) { |
| | | TOKEN_CACHE.remove(authorization); |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 获取Token |
| | | * @param appkey |
| | | * @param param |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/getToken") |
| | | public synchronized R getToken(@RequestHeader(required = false) String appkey, |
| | | @RequestBody(required = false) TokenParam param, |
| | | HttpServletRequest request){ |
| | | // authNew(appkey, param, request, "获取Token:/getToken"); |
| | | log.info("获取Token:/getToken接口被访问,appkey={},请求数据={}", appkey, JSON.toJSONString(param)); |
| | | if (Cools.isEmpty(param)){ |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | |
| | | String appId = param.getAppId(); |
| | | String appSecret = param.getAppSecret(); |
| | | if (Cools.isEmpty(appId)){ |
| | | return R.error("参数[appId]不能为空"); |
| | | } |
| | | if (Cools.isEmpty(appSecret)){ |
| | | return R.error("参数[appSecret]不能为空"); |
| | | } |
| | | if (Cools.isEmpty(openAppId) || Cools.isEmpty(openAppSecret)){ |
| | | throw new CoolException("系统未配置open-asrs.auth.app-id或open-asrs.auth.app-secret"); |
| | | } |
| | | if (!openAppId.equals(appId) || !openAppSecret.equals(appSecret)){ |
| | | throw new CoolException("认证失败,请确认appId或appSecret无误!"); |
| | | } |
| | | |
| | | String token = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | long expireAt = System.currentTimeMillis() + tokenValidMinutes * 60L *1000L; |
| | | TOKEN_CACHE.put(token, new TokenVo(appId, expireAt)); |
| | | |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("token", token); |
| | | result.put("expireAt", tokenValidMinutes); |
| | | return R.ok().add(result); |
| | | } |
| | | |
| | | /** |
| | | *物料基础信息同步 |
| | | * @param appKey |
| | | * @param param |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/erp/mat/sync") |
| | | public synchronized R syncMatInfoV2(@RequestHeader(required = false) String appKey, |
| | | @RequestBody(required = false) List<MatSyncParam.MatParam> param, |
| | | HttpServletRequest request){ |
| | | authNew(appKey, param, request, "物料基础信息同步:/erp/mat/sync"); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | MatSyncParam matSyncParam = new MatSyncParam(); |
| | | List<MatSyncParam.MatParam> objects = new ArrayList<>(); |
| | | objects = param; |
| | | matSyncParam.matDetails = objects; |
| | | |
| | | openService.syncMat(matSyncParam); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 入/出库通知单下发 |
| | | * @param appKey |
| | | * @param param |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/erp/order/add") |
| | | public synchronized R addOrder(@RequestHeader(required = false) String appKey, |
| | | @RequestBody OpenOrderParam param, |
| | | HttpServletRequest request){ |
| | | authNew(appKey, param, request, "入/出库通知单下发:/erp/order/add"); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | if (Cools.isEmpty(param.getOrderNo())){ |
| | | return R.error("单据编号[orderNo]不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getOrderType())){ |
| | | return R.error("单据类型[orderType]不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getWkType())){ |
| | | return R.error("业务类型[wkType]不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getOrderItems())){ |
| | | return R.error("订单明细[orderItems]不能为空"); |
| | | } |
| | | openService.orderCreate(param); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 库存明细查询 |
| | | * @param appKey |
| | | * @param param |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/erp/inventory/details") |
| | | public synchronized Result inventory(@RequestHeader(required = false) String appKey, |
| | | @RequestBody JSONObject param, |
| | | HttpServletRequest request){ |
| | | authNew(appKey, param, request, "库存明细查询:/erp/inventory/details"); |
| | | try { |
| | | String wareHouseId = param == null ? null : param.getString("wareHouseId"); |
| | | String locId = param == null ? null : param.getString("locId"); |
| | | String matNr = param == null ? null : param.getString("matNr"); |
| | | String orderNo = param == null ? null : param.getString("orderNo"); |
| | | String batch = param == null ? null : param.getString("batch"); |
| | | return new Result(200, "操作成功", locDetlMapper.inventory(wareHouseId, locId, matNr, orderNo, batch)); |
| | | }catch (Exception e){ |
| | | return new Result(500, e.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 库存汇总查询 |
| | | * @param appKey |
| | | * @param param |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/erp/inventory/summary") |
| | | public synchronized Result invSummary(@RequestHeader(required = false) String appKey, |
| | | @RequestBody JSONObject param, |
| | | HttpServletRequest request){ |
| | | authNew(appKey, param, request, "库存汇总查询:/erp/inventory/summary"); |
| | | try { |
| | | String wareHouseId = param == null ? null : param.getString("wareHouseId"); |
| | | String matNr = param == null ? null : param.getString("matNr"); |
| | | Collection<String> matNrs = null; |
| | | if (!Cools.isEmpty(matNr)){ |
| | | matNrs = Arrays.stream(matNr.split(",")) |
| | | .map(String::trim) |
| | | .filter(s -> !s.isEmpty()) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | return new Result(200, "操作成功", locDetlMapper.invSummary(wareHouseId, matNrs)); |
| | | }catch (Exception e){ |
| | | return new Result(500, e.getMessage(), null); |
| | | } |
| | | } |
| | | } |
| | |
| | | EntityWrapper<Order> wrapper = new EntityWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | // wrapper.like("matnr", condition).or().like("maktx", condition); |
| | | wrapper.like("order_no", condition); |
| | | wrapper.eq("order_no", condition); |
| | | } |
| | | wrapper.orderBy("create_time", false); |
| | | List<Order> mats = orderService.selectList(wrapper); |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.ExistDto; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.TaskDto; |
| | |
| | | LocDto locDto = new LocDto(locDetl1.getLocNo(), locDetl1.getMatnr(), locDetl1.getMaktx(), locDetl1.getBatch(), orderDetl.getOrderNo(), |
| | | issued >= locDetl1.getAnfme() ? locDetl1.getAnfme() : issued); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl1.getLocNo(), issued >= locDetl1.getAnfme() ? 101 : 103); |
| | | List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | for (Integer staNo : staNos) { |
| | | LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | staListDto.setStaNo(staNo); |
| | | staListDto.setStaName(Utils.getStaName(staNo)); |
| | | maps.add(staListDto); |
| | | } |
| | | locDto.setStaNos(maps); |
| | | // List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | // for (Integer staNo : staNos) { |
| | | // LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | // staListDto.setStaNo(staNo); |
| | | // staListDto.setStaName(Utils.getStaName(staNo)); |
| | | // maps.add(staListDto); |
| | | // } |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | // 剩余待出数量递减 |
| | | issued = issued - locDetl.getAnfme(); |
| | |
| | | LocDto locDto = new LocDto(locDetl1.getLocNo(), locDetl1.getMatnr(), locDetl1.getMaktx(), locDetl1.getBatch(), orderDetl.getOrderNo(), |
| | | issued >= locDetl1.getAnfme() ? locDetl1.getAnfme() : issued); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl1.getLocNo(), issued >= locDetl1.getAnfme() ? 101 : 103); |
| | | List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | for (Integer staNo : staNos) { |
| | | LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | staListDto.setStaNo(staNo); |
| | | staListDto.setStaName(Utils.getStaName(staNo)); |
| | | maps.add(staListDto); |
| | | } |
| | | locDto.setStaNos(maps); |
| | | // List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | // for (Integer staNo : staNos) { |
| | | // LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | // staListDto.setStaNo(staNo); |
| | | // staListDto.setStaName(Utils.getStaName(staNo)); |
| | | // maps.add(staListDto); |
| | | // } |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | // 剩余待出数量递减 |
| | | issued = issued - locDetl.getAnfme(); |
| | |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() && locDetlList.size() ==1? 101 : 103); |
| | | List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | for (Integer staNo : staNos) { |
| | | LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | staListDto.setStaNo(staNo); |
| | | staListDto.setStaName(Utils.getStaName(staNo)); |
| | | maps.add(staListDto); |
| | | } |
| | | locDto.setStaNos(maps); |
| | | // List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | // for (Integer staNo : staNos) { |
| | | // LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | // staListDto.setStaNo(staNo); |
| | | // staListDto.setStaName(Utils.getStaName(staNo)); |
| | | // maps.add(staListDto); |
| | | // } |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | // 剩余待出数量递减 |
| | | issued = issued - locDetl.getAnfme(); |
| | |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() && locDetlList.size() ==1? 101 : 103); |
| | | List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | for (Integer staNo : staNos) { |
| | | LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | staListDto.setStaNo(staNo); |
| | | staListDto.setStaName(Utils.getStaName(staNo)); |
| | | maps.add(staListDto); |
| | | } |
| | | locDto.setStaNos(maps); |
| | | // List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | // for (Integer staNo : staNos) { |
| | | // LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | // staListDto.setStaNo(staNo); |
| | | // staListDto.setStaName(Utils.getStaName(staNo)); |
| | | // maps.add(staListDto); |
| | | // } |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | // 剩余待出数量递减 |
| | | issued = issued - locDetl.getAnfme(); |
| | |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() && locDetlList.size() ==1? 101 : 103); |
| | | List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | for (Integer staNo : staNos) { |
| | | LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | staListDto.setStaNo(staNo); |
| | | staListDto.setStaName(Utils.getStaName(staNo)); |
| | | maps.add(staListDto); |
| | | } |
| | | locDto.setStaNos(maps); |
| | | // List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | // for (Integer staNo : staNos) { |
| | | // LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | // staListDto.setStaNo(staNo); |
| | | // staListDto.setStaName(Utils.getStaName(staNo)); |
| | | // maps.add(staListDto); |
| | | // } |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | // 剩余待出数量递减 |
| | | issued = issued - locDetl.getAnfme(); |
| | |
| | | } |
| | | for (LocDto locDto : locDtos){ |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDto.getLocNo(),Judge101or103(locDto,locDtos)? 101 : 103); |
| | | List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | for (Integer staNo : staNos) { |
| | | LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | staListDto.setStaNo(staNo); |
| | | staListDto.setStaName(Utils.getStaName(staNo)); |
| | | maps.add(staListDto); |
| | | } |
| | | locDto.setStaNos(maps); |
| | | // List<LocDto.staListDto> maps = new ArrayList<>(); |
| | | // for (Integer staNo : staNos) { |
| | | // LocDto.staListDto staListDto = new LocDto.staListDto(); |
| | | // staListDto.setStaNo(staNo); |
| | | // staListDto.setStaName(Utils.getStaName(staNo)); |
| | | // maps.add(staListDto); |
| | | // } |
| | | locDto.setStaNos(staNos); |
| | | } |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/inventoryFlow/list/auth") |
| | | // @ManagerAuth(memo = "库存移动流水记录") |
| | | public R inventoryFlowList(@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); |
| | | if (Cools.isEmpty(param.get("io_time"))) { |
| | | param.put("startTime",""); |
| | | param.put("endTime",""); |
| | | } else { |
| | | String ioTime = (String) param.get("io_time"); |
| | | if (ioTime.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = ioTime.split(RANGE_TIME_LINK); |
| | | param.put("startTime",dates[0]); |
| | | param.put("endTime",dates[1]); |
| | | } |
| | | } |
| | | return wrkMastLogService.inventoryFlowList(curr,limit,param); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | 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.common.R; |
| | | import com.zy.asrs.entity.WrkMastSta; |
| | | import com.zy.asrs.service.WrkMastStaService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class WrkMastStaController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WrkMastStaService wrkMastStaService; |
| | | |
| | | @RequestMapping(value = "/wrkMastSta/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(wrkMastStaService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastSta/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<WrkMastSta> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(WrkMastSta.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("update_time", false); |
| | | return R.ok(wrkMastStaService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastSta/add/auth") |
| | | @ManagerAuth(memo = "RGV任务添加") |
| | | public R add(WrkMastSta wrkMastSta) { |
| | | wrkMastStaService.insert(wrkMastSta); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastSta/update/auth") |
| | | @ManagerAuth(memo = "RGV任务修改") |
| | | public R update(WrkMastSta wrkMastSta){ |
| | | if (Cools.isEmpty(wrkMastSta) || null==wrkMastSta.getId()){ |
| | | return R.error(); |
| | | } |
| | | wrkMastStaService.updateById(wrkMastSta); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastSta/delete/auth") |
| | | @ManagerAuth(memo = "RGV任务删除") |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | wrkMastStaService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastSta/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<WrkMastSta> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkMastSta")); |
| | | convert(map, wrapper); |
| | | List<WrkMastSta> list = wrkMastStaService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastStaQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<WrkMastSta> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<WrkMastSta> page = wrkMastStaService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkMastSta wrkMastSta : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkMastSta.getId()); |
| | | map.put("value", wrkMastSta.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastSta/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkMastSta> wrapper = new EntityWrapper<WrkMastSta>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkMastStaService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkMastSta.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | 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.common.R; |
| | | import com.zy.asrs.entity.WrkMastStaLog; |
| | | import com.zy.asrs.service.WrkMastStaLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class WrkMastStaLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WrkMastStaLogService wrkMastStaLogService; |
| | | |
| | | @RequestMapping(value = "/wrkMastStaLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(wrkMastStaLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastStaLog/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<WrkMastStaLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(WrkMastStaLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("update_time", false); |
| | | return R.ok(wrkMastStaLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastStaLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(WrkMastStaLog wrkMastStaLog) { |
| | | wrkMastStaLogService.insert(wrkMastStaLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastStaLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(WrkMastStaLog wrkMastStaLog){ |
| | | if (Cools.isEmpty(wrkMastStaLog) || null==wrkMastStaLog.getId()){ |
| | | return R.error(); |
| | | } |
| | | wrkMastStaLogService.updateById(wrkMastStaLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastStaLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | wrkMastStaLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastStaLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<WrkMastStaLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkMastStaLog")); |
| | | convert(map, wrapper); |
| | | List<WrkMastStaLog> list = wrkMastStaLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastStaLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<WrkMastStaLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<WrkMastStaLog> page = wrkMastStaLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkMastStaLog wrkMastStaLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkMastStaLog.getId()); |
| | | map.put("value", wrkMastStaLog.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkMastStaLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkMastStaLog> wrapper = new EntityWrapper<WrkMastStaLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkMastStaLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkMastStaLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| 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.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("asr_bas_rgv") |
| | | public class BasRgv implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * RGV编号 |
| | | */ |
| | | @ApiModelProperty(value= "RGV编号") |
| | | @TableId(value = "rgv_no", type = IdType.INPUT) |
| | | @TableField("rgv_no") |
| | | private Integer rgvNo; |
| | | |
| | | /** |
| | | * 可入 |
| | | */ |
| | | @ApiModelProperty(value= "可入") |
| | | @TableField("in_enable") |
| | | private String inEnable; |
| | | |
| | | /** |
| | | * 可出 |
| | | */ |
| | | @ApiModelProperty(value= "可出") |
| | | @TableField("out_enable") |
| | | private String outEnable; |
| | | |
| | | /** |
| | | * 作业态 |
| | | */ |
| | | @ApiModelProperty(value= "作业态") |
| | | @TableField("rgv_sts") |
| | | private Integer rgvSts; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @TableField("wrk_no1") |
| | | private Integer wrkNo1; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @TableField("wrk_no2") |
| | | private Integer wrkNo2; |
| | | |
| | | /** |
| | | * 错误码 |
| | | */ |
| | | @ApiModelProperty(value= "错误码") |
| | | @TableField("rgv_err") |
| | | private Long rgvErr; |
| | | |
| | | /** |
| | | * 标记 |
| | | */ |
| | | @ApiModelProperty(value= "标记") |
| | | @TableField("pak_mk") |
| | | private String pakMk; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 是否有物 1: 有物 0: 无物 |
| | | */ |
| | | @ApiModelProperty(value= "是否有物 1: 有物 0: 无物 ") |
| | | private Integer loaded2; |
| | | |
| | | public BasRgv() {} |
| | | |
| | | public BasRgv(Integer rgvNo, String inEnable, String outEnable, Integer rgvSts, Integer wrkNo1, Integer wrkNo2, Long rgvErr, String pakMk, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo, Integer loaded2) { |
| | | this.rgvNo = rgvNo; |
| | | this.inEnable = inEnable; |
| | | this.outEnable = outEnable; |
| | | this.rgvSts = rgvSts; |
| | | this.wrkNo1 = wrkNo1; |
| | | this.wrkNo2 = wrkNo2; |
| | | this.rgvErr = rgvErr; |
| | | this.pakMk = pakMk; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | this.loaded2 = loaded2; |
| | | } |
| | | |
| | | // BasRgv basRgv = new BasRgv( |
| | | // null, // RGV编号[非空] |
| | | // 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 0: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getLoaded2$(){ |
| | | if (null == this.loaded2){ return null; } |
| | | switch (this.loaded2){ |
| | | case 1: |
| | | return "有物"; |
| | | case 0: |
| | | return "无物"; |
| | | default: |
| | | return String.valueOf(this.loaded2); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| 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 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("asr_bas_rgv_error_log") |
| | | public class BasRgvErrorLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableField("rgv_no") |
| | | private Integer rgvNo; |
| | | |
| | | /** |
| | | * 急停触发 |
| | | */ |
| | | @ApiModelProperty(value= "急停触发") |
| | | @TableField("emergency_stop") |
| | | private String emergencyStop; |
| | | |
| | | /** |
| | | * 1号位有物无资料 |
| | | */ |
| | | @ApiModelProperty(value= "1号位有物无资料") |
| | | @TableField("slot_1_empty_no_data") |
| | | private String slot1EmptyNoData; |
| | | |
| | | /** |
| | | * 2号位有物无资料 |
| | | */ |
| | | @ApiModelProperty(value= "2号位有物无资料") |
| | | @TableField("slot_2_empty_no_data") |
| | | private String slot2EmptyNoData; |
| | | |
| | | /** |
| | | * 命令错误走链条冲突 |
| | | */ |
| | | @ApiModelProperty(value= "命令错误走链条冲突") |
| | | @TableField("command_error_chain_conflict") |
| | | private String commandErrorChainConflict; |
| | | |
| | | /** |
| | | * 目标位下发错误 |
| | | */ |
| | | @ApiModelProperty(value= "目标位下发错误") |
| | | @TableField("target_position_issue") |
| | | private String targetPositionIssue; |
| | | |
| | | /** |
| | | * 走行变频器异常 |
| | | */ |
| | | @ApiModelProperty(value= "走行变频器异常") |
| | | @TableField("travel_inverter_error") |
| | | private String travelInverterError; |
| | | |
| | | /** |
| | | * 1号光电异常 |
| | | */ |
| | | @ApiModelProperty(value= "1号光电异常") |
| | | @TableField("photoelectric_1_error") |
| | | private String photoelectric1Error; |
| | | |
| | | /** |
| | | * 2号光电异常 |
| | | */ |
| | | @ApiModelProperty(value= "2号光电异常") |
| | | @TableField("photoelectric_2_error") |
| | | private String photoelectric2Error; |
| | | |
| | | /** |
| | | * 与输线时接超时 |
| | | */ |
| | | @ApiModelProperty(value= "与输线时接超时") |
| | | @TableField("timeout_connection_with_line") |
| | | private String timeoutConnectionWithLine; |
| | | |
| | | /** |
| | | * 左侧滚筒运行超时 |
| | | */ |
| | | @ApiModelProperty(value= "左侧滚筒运行超时") |
| | | @TableField("left_roller_timeout") |
| | | private String leftRollerTimeout; |
| | | |
| | | /** |
| | | * 右侧滚筒运行超时 |
| | | */ |
| | | @ApiModelProperty(value= "右侧滚筒运行超时") |
| | | @TableField("right_roller_timeout") |
| | | private String rightRollerTimeout; |
| | | |
| | | /** |
| | | * rgv运行超时 |
| | | */ |
| | | @ApiModelProperty(value= "rgv运行超时") |
| | | @TableField("rgv_run_timeout") |
| | | private String rgvRunTimeout; |
| | | |
| | | /** |
| | | * 1号工位链条变频器异常 |
| | | */ |
| | | @ApiModelProperty(value= "1号工位链条变频器异常") |
| | | @TableField("position_1_chain_inverter_error") |
| | | private String position1ChainInverterError; |
| | | |
| | | /** |
| | | * 2号工位链条变频器异常 |
| | | */ |
| | | @ApiModelProperty(value= "2号工位链条变频器异常") |
| | | @TableField("position_2_chain_inverter_error") |
| | | private String position2ChainInverterError; |
| | | |
| | | /** |
| | | * 前后极限位 |
| | | */ |
| | | @ApiModelProperty(value= "前后极限位") |
| | | @TableField("front_rear_limit") |
| | | private String frontRearLimit; |
| | | |
| | | /** |
| | | * 急停按钮 |
| | | */ |
| | | @ApiModelProperty(value= "急停按钮") |
| | | @TableField("emergency_button") |
| | | private String emergencyButton; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value= "创建时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 急停按钮 |
| | | */ |
| | | @ApiModelProperty(value= "急停按钮") |
| | | @TableField("forward_button") |
| | | private String forwardButton; |
| | | |
| | | /** |
| | | * 后退按钮 |
| | | */ |
| | | @ApiModelProperty(value= "后退按钮") |
| | | @TableField("reverse_button") |
| | | private String reverseButton; |
| | | |
| | | /** |
| | | * 本地/远程 |
| | | */ |
| | | @ApiModelProperty(value= "本地/远程") |
| | | @TableField("local_remote") |
| | | private String localRemote; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 复位 |
| | | */ |
| | | @ApiModelProperty(value= "复位") |
| | | private String reset; |
| | | |
| | | /** |
| | | * 走行抱闸开关钮 |
| | | */ |
| | | @ApiModelProperty(value= "走行抱闸开关钮") |
| | | @TableField("travel_brake_switch") |
| | | private String travelBrakeSwitch; |
| | | |
| | | /** |
| | | * 走行强制减速光电 |
| | | */ |
| | | @ApiModelProperty(value= "走行强制减速光电") |
| | | @TableField("travel_speed_limit_photoelectric") |
| | | private String travelSpeedLimitPhotoelectric; |
| | | |
| | | /** |
| | | * 左超限 1 |
| | | */ |
| | | @ApiModelProperty(value= "左超限 1") |
| | | @TableField("left_overlimit_1") |
| | | private String leftOverlimit1; |
| | | |
| | | /** |
| | | * 右超限 1 |
| | | */ |
| | | @ApiModelProperty(value= "右超限 1") |
| | | @TableField("right_overlimit_1") |
| | | private String rightOverlimit1; |
| | | |
| | | /** |
| | | * 左到位 1 |
| | | */ |
| | | @ApiModelProperty(value= "左到位 1") |
| | | @TableField("left_at_position_1") |
| | | private String leftAtPosition1; |
| | | |
| | | /** |
| | | * 右到位 1 |
| | | */ |
| | | @ApiModelProperty(value= "右到位 1") |
| | | @TableField("right_at_position_1") |
| | | private String rightAtPosition1; |
| | | |
| | | /** |
| | | * 链条前进 1 |
| | | */ |
| | | @ApiModelProperty(value= "链条前进 1") |
| | | @TableField("chain_forward_1") |
| | | private String chainForward1; |
| | | |
| | | /** |
| | | * 链条后退 1 |
| | | */ |
| | | @ApiModelProperty(value= "链条后退 1") |
| | | @TableField("chain_reverse_1") |
| | | private String chainReverse1; |
| | | |
| | | /** |
| | | * 变频器报警 |
| | | */ |
| | | @ApiModelProperty(value= "变频器报警") |
| | | @TableField("inverter_alarm") |
| | | private String inverterAlarm; |
| | | |
| | | /** |
| | | * 左超限 2 |
| | | */ |
| | | @ApiModelProperty(value= "左超限 2") |
| | | @TableField("left_overlimit_2") |
| | | private String leftOverlimit2; |
| | | |
| | | /** |
| | | * 右超限 2 |
| | | */ |
| | | @ApiModelProperty(value= "右超限 2") |
| | | @TableField("right_overlimit_2") |
| | | private String rightOverlimit2; |
| | | |
| | | /** |
| | | * 左到位 2 |
| | | */ |
| | | @ApiModelProperty(value= "左到位 2") |
| | | @TableField("left_at_position_2") |
| | | private String leftAtPosition2; |
| | | |
| | | /** |
| | | * 右到位 2 |
| | | */ |
| | | @ApiModelProperty(value= "右到位 2") |
| | | @TableField("right_at_position_2") |
| | | private String rightAtPosition2; |
| | | |
| | | /** |
| | | * 货物减速 |
| | | */ |
| | | @ApiModelProperty(value= "货物减速") |
| | | @TableField("cargo_speed_reduction") |
| | | private String cargoSpeedReduction; |
| | | |
| | | /** |
| | | * 输送变频器报警 2 |
| | | */ |
| | | @ApiModelProperty(value= "输送变频器报警 2") |
| | | @TableField("conveyor_inverter_alarm_2") |
| | | private String conveyorInverterAlarm2; |
| | | |
| | | /** |
| | | * 左输送 2 |
| | | */ |
| | | @ApiModelProperty(value= "左输送 2") |
| | | @TableField("left_conveyor_2") |
| | | private String leftConveyor2; |
| | | |
| | | /** |
| | | * 右输送 2 |
| | | */ |
| | | @ApiModelProperty(value= "右输送 2") |
| | | @TableField("right_conveyor_2") |
| | | private String rightConveyor2; |
| | | |
| | | public BasRgvErrorLog() {} |
| | | |
| | | public BasRgvErrorLog(Integer rgvNo, String emergencyStop, String slot1EmptyNoData, String slot2EmptyNoData, String commandErrorChainConflict, String targetPositionIssue, String travelInverterError, String photoelectric1Error, String photoelectric2Error, String timeoutConnectionWithLine, String leftRollerTimeout, String rightRollerTimeout, String rgvRunTimeout, String position1ChainInverterError, String position2ChainInverterError, String frontRearLimit, String emergencyButton, Date createTime, String forwardButton, String reverseButton, String localRemote, String reset, String travelBrakeSwitch, String travelSpeedLimitPhotoelectric, String leftOverlimit1, String rightOverlimit1, String leftAtPosition1, String rightAtPosition1, String chainForward1, String chainReverse1, String inverterAlarm, String leftOverlimit2, String rightOverlimit2, String leftAtPosition2, String rightAtPosition2, String cargoSpeedReduction, String conveyorInverterAlarm2, String leftConveyor2, String rightConveyor2) { |
| | | this.rgvNo = rgvNo; |
| | | this.emergencyStop = emergencyStop; |
| | | this.slot1EmptyNoData = slot1EmptyNoData; |
| | | this.slot2EmptyNoData = slot2EmptyNoData; |
| | | this.commandErrorChainConflict = commandErrorChainConflict; |
| | | this.targetPositionIssue = targetPositionIssue; |
| | | this.travelInverterError = travelInverterError; |
| | | this.photoelectric1Error = photoelectric1Error; |
| | | this.photoelectric2Error = photoelectric2Error; |
| | | this.timeoutConnectionWithLine = timeoutConnectionWithLine; |
| | | this.leftRollerTimeout = leftRollerTimeout; |
| | | this.rightRollerTimeout = rightRollerTimeout; |
| | | this.rgvRunTimeout = rgvRunTimeout; |
| | | this.position1ChainInverterError = position1ChainInverterError; |
| | | this.position2ChainInverterError = position2ChainInverterError; |
| | | this.frontRearLimit = frontRearLimit; |
| | | this.emergencyButton = emergencyButton; |
| | | this.createTime = createTime; |
| | | this.forwardButton = forwardButton; |
| | | this.reverseButton = reverseButton; |
| | | this.localRemote = localRemote; |
| | | this.reset = reset; |
| | | this.travelBrakeSwitch = travelBrakeSwitch; |
| | | this.travelSpeedLimitPhotoelectric = travelSpeedLimitPhotoelectric; |
| | | this.leftOverlimit1 = leftOverlimit1; |
| | | this.rightOverlimit1 = rightOverlimit1; |
| | | this.leftAtPosition1 = leftAtPosition1; |
| | | this.rightAtPosition1 = rightAtPosition1; |
| | | this.chainForward1 = chainForward1; |
| | | this.chainReverse1 = chainReverse1; |
| | | this.inverterAlarm = inverterAlarm; |
| | | this.leftOverlimit2 = leftOverlimit2; |
| | | this.rightOverlimit2 = rightOverlimit2; |
| | | this.leftAtPosition2 = leftAtPosition2; |
| | | this.rightAtPosition2 = rightAtPosition2; |
| | | this.cargoSpeedReduction = cargoSpeedReduction; |
| | | this.conveyorInverterAlarm2 = conveyorInverterAlarm2; |
| | | this.leftConveyor2 = leftConveyor2; |
| | | this.rightConveyor2 = rightConveyor2; |
| | | } |
| | | |
| | | // BasRgvErrorLog basRgvErrorLog = new BasRgvErrorLog( |
| | | // null, // 编号 |
| | | // null, // 急停触发 |
| | | // null, // 1号位有物无资料 |
| | | // null, // 2号位有物无资料 |
| | | // null, // 命令错误走链条冲突 |
| | | // null, // 目标位下发错误 |
| | | // null, // 走行变频器异常 |
| | | // null, // 1号光电异常 |
| | | // null, // 2号光电异常 |
| | | // null, // 与输线时接超时 |
| | | // null, // 左侧滚筒运行超时 |
| | | // null, // 右侧滚筒运行超时 |
| | | // null, // rgv运行超时 |
| | | // null, // 1号工位链条变频器异常 |
| | | // null, // 2号工位链条变频器异常 |
| | | // null, // 前后极限位 |
| | | // null, // 急停按钮 |
| | | // null, // 创建时间 |
| | | // null, // 急停按钮 |
| | | // null, // 后退按钮 |
| | | // null, // 本地/远程 |
| | | // null, // 复位 |
| | | // null, // 走行抱闸开关钮 |
| | | // null, // 走行强制减速光电 |
| | | // null, // 左超限 1 |
| | | // null, // 右超限 1 |
| | | // null, // 左到位 1 |
| | | // null, // 右到位 1 |
| | | // null, // 链条前进 1 |
| | | // null, // 链条后退 1 |
| | | // null, // 变频器报警 |
| | | // null, // 左超限 2 |
| | | // null, // 右超限 2 |
| | | // null, // 左到位 2 |
| | | // null, // 右到位 2 |
| | | // null, // 货物减速 |
| | | // null, // 输送变频器报警 2 |
| | | // null, // 左输送 2 |
| | | // null // 右输送 2 |
| | | // ); |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | |
| | | } |
| 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 io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_rgv_map") |
| | | public class BasRgvMap implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * RGV编号 |
| | | */ |
| | | @ApiModelProperty(value= "RGV编号") |
| | | @TableId(value = "rgv_no", type = IdType.INPUT) |
| | | @TableField("rgv_no") |
| | | private Integer rgvNo; |
| | | |
| | | /** |
| | | * 开始范围 |
| | | */ |
| | | @ApiModelProperty(value= "开始范围") |
| | | @TableField("start_route") |
| | | private Integer startRoute; |
| | | |
| | | /** |
| | | * 结束范围 |
| | | */ |
| | | @ApiModelProperty(value= "结束范围") |
| | | @TableField("end_route") |
| | | private Integer endRoute; |
| | | |
| | | /** |
| | | * 当前位置 |
| | | */ |
| | | @ApiModelProperty(value= "当前位置") |
| | | @TableField("now_route") |
| | | private Integer nowRoute; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value= "状态") |
| | | @TableField("rgv_status") |
| | | private Integer rgvStatus; |
| | | |
| | | /** |
| | | * 锁-开始-位置 |
| | | */ |
| | | @ApiModelProperty(value= "锁-开始-位置") |
| | | @TableField("lock_start_route") |
| | | private Integer lockStartRoute; |
| | | |
| | | /** |
| | | * 锁-结束-位置 |
| | | */ |
| | | @ApiModelProperty(value= "锁-结束-位置") |
| | | @TableField("lock_end_route") |
| | | private Integer lockEndRoute; |
| | | |
| | | public BasRgvMap() {} |
| | | |
| | | public BasRgvMap(Integer rgvNo, Integer startRoute, Integer endRoute, Integer nowRoute, Integer rgvStatus, Integer lockStartRoute, Integer lockEndRoute) { |
| | | this.rgvNo = rgvNo; |
| | | this.startRoute = startRoute; |
| | | this.endRoute = endRoute; |
| | | this.nowRoute = nowRoute; |
| | | this.rgvStatus = rgvStatus; |
| | | this.lockStartRoute = lockStartRoute; |
| | | this.lockEndRoute = lockEndRoute; |
| | | } |
| | | |
| | | // BasRgvMap basRgvMap = new BasRgvMap( |
| | | // null, // RGV编号[非空] |
| | | // null, // 开始范围 |
| | | // null, // 结束范围 |
| | | // null, // 当前位置 |
| | | // null, // 状态 |
| | | // null, // 锁-开始-位置 |
| | | // 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.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("asr_bas_rgv_opt") |
| | | public class BasRgvOpt implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @TableField("wrk_no1") |
| | | private Integer wrkNo1; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("wrk_no2") |
| | | private Integer wrkNo2; |
| | | |
| | | /** |
| | | * 穿梭车 |
| | | */ |
| | | @ApiModelProperty(value= "穿梭车") |
| | | @TableField("rgv_no") |
| | | private Integer rgvNo; |
| | | |
| | | /** |
| | | * 下发时间 |
| | | */ |
| | | @ApiModelProperty(value= "下发时间") |
| | | @TableField("send_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date sendTime; |
| | | |
| | | /** |
| | | * 作业 |
| | | */ |
| | | @ApiModelProperty(value= "作业") |
| | | private String mode; |
| | | |
| | | /** |
| | | * 源排 |
| | | */ |
| | | @ApiModelProperty(value= "源排") |
| | | @TableField("source_row") |
| | | private Integer sourceRow; |
| | | |
| | | /** |
| | | * 源列 |
| | | */ |
| | | @ApiModelProperty(value= "源列") |
| | | @TableField("source_bay") |
| | | private Integer sourceBay; |
| | | |
| | | /** |
| | | * 源层 |
| | | */ |
| | | @ApiModelProperty(value= "源层") |
| | | @TableField("source_lev") |
| | | private Integer sourceLev; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @TableField("source_sta") |
| | | private Integer sourceSta; |
| | | |
| | | /** |
| | | * 目标排 |
| | | */ |
| | | @ApiModelProperty(value= "目标排") |
| | | @TableField("pos_row") |
| | | private Integer posRow; |
| | | |
| | | /** |
| | | * 目标列 |
| | | */ |
| | | @ApiModelProperty(value= "目标列") |
| | | @TableField("pos_bay") |
| | | private Integer posBay; |
| | | |
| | | /** |
| | | * 目标层 |
| | | */ |
| | | @ApiModelProperty(value= "目标层") |
| | | @TableField("pos_lev") |
| | | private Integer posLev; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @TableField("pos_sta") |
| | | private Integer posSta; |
| | | |
| | | /** |
| | | * 响应结果 1: 正常 0: 失败 |
| | | */ |
| | | @ApiModelProperty(value= "响应结果 1: 正常 0: 失败 ") |
| | | private Integer response; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | public BasRgvOpt() {} |
| | | |
| | | public BasRgvOpt(Integer wrkNo1, Integer wrkNo2, Integer rgvNo, 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, String memo) { |
| | | this.wrkNo1 = wrkNo1; |
| | | this.wrkNo2 = wrkNo2; |
| | | this.rgvNo = rgvNo; |
| | | this.sendTime = sendTime; |
| | | this.mode = mode; |
| | | this.sourceRow = sourceRow; |
| | | this.sourceBay = sourceBay; |
| | | this.sourceLev = sourceLev; |
| | | this.sourceSta = sourceSta; |
| | | this.posRow = posRow; |
| | | this.posBay = posBay; |
| | | this.posLev = posLev; |
| | | this.posSta = posSta; |
| | | this.response = response; |
| | | this.updateTime = updateTime; |
| | | this.updateBy = updateBy; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // BasRgvOpt basRgvOpt = new BasRgvOpt( |
| | | // null, // 任务号 |
| | | // null, // |
| | | // null, // 穿梭车 |
| | | // null, // 下发时间 |
| | | // null, // 作业 |
| | | // null, // 源排 |
| | | // null, // 源列 |
| | | // null, // 源层 |
| | | // null, // 源站 |
| | | // null, // 目标排 |
| | | // null, // 目标列 |
| | | // null, // 目标层 |
| | | // null, // 目标站 |
| | | // null, // 响应结果 |
| | | // null, // 修改时间 |
| | | // null, // 修改人员 |
| | | // null, // 备注 |
| | | |
| | | // ); |
| | | |
| | | public String getSendTime$(){ |
| | | if (Cools.isEmpty(this.sendTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.sendTime); |
| | | } |
| | | |
| | | public String getResponse$(){ |
| | | if (null == this.response){ return null; } |
| | | switch (this.response){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "失败"; |
| | | default: |
| | | return String.valueOf(this.response); |
| | | } |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | 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.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("asr_bas_rgv_path") |
| | | public class BasRgvPath implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * RGV编号 |
| | | */ |
| | | @ApiModelProperty(value= "RGV编号") |
| | | @TableId(value = "rgv_no", type = IdType.INPUT) |
| | | @TableField("rgv_no") |
| | | private Integer rgvNo; |
| | | |
| | | /** |
| | | * RGV运行路径 |
| | | */ |
| | | @ApiModelProperty(value= "RGV运行路径") |
| | | private String path; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public BasRgvPath() {} |
| | | |
| | | public BasRgvPath(Integer rgvNo, String path, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.rgvNo = rgvNo; |
| | | this.path = path; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // BasRgvPath basRgvPath = new BasRgvPath( |
| | | // null, // RGV编号[非空] |
| | | // null, // RGV运行路径 |
| | | // null, // 状态 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkIotypeService; |
| | | import com.zy.asrs.service.BasWrkStatusService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import lombok.Data; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author pang.jiabao |
| | | * @description 库存移动流水dto |
| | | * @createDate 2025/1/3 13:59 |
| | | */ |
| | | @Data |
| | | public class InventoryFlowDto { |
| | | |
| | | private Integer wrkNo; |
| | | private Date ioTime; |
| | | private Integer ioType; |
| | | private Integer wrkSts; |
| | | private String sourceLocNo; |
| | | private String locNo; |
| | | private String orderNo; |
| | | private String matnr; |
| | | private String maktx; |
| | | private String batch; |
| | | private Double anfme; |
| | | private String zpallet; |
| | | private Long modiUser; |
| | | private Date modiTime; |
| | | |
| | | 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 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 getLocNo$() { |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceLocNo$() { |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.sourceLocNo); |
| | | if (!Cools.isEmpty(locMast)) { |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoTime$() { |
| | | if (Cools.isEmpty(this.ioTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getModiTime$() { |
| | | if (Cools.isEmpty(this.modiTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 是否冻结 |
| | | */ |
| | | @ApiModelProperty(value= "是否冻结,0.未冻结,1.已冻结") |
| | | private Integer frozen; |
| | | |
| | | @ApiModelProperty(value= "预留1") |
| | | private String temp1; |
| | | @ApiModelProperty(value= "预留1") |
| | |
| | | @TableField("ctn_no") |
| | | private String ctnNo; |
| | | |
| | | /** |
| | | * 是否冻结 |
| | | */ |
| | | @ApiModelProperty(value= "是否冻结,0.未冻结,1.已冻结") |
| | | private Integer frozen; |
| | | |
| | | |
| | | public String getWhsType$(){ |
| | | BasWhsService service = SpringUtils.getBean(BasWhsService.class); |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @ApiModelProperty |
| | | @TableField("owner") |
| | | private String owner = "4933"; |
| | | |
| | | @ApiModelProperty(value = "预留1") |
| | | private String temp1; |
| | | @ApiModelProperty(value = "预留2") |
| | |
| | | */ |
| | | @ApiModelProperty(value= "长度") |
| | | @ExcelProperty(value = "长度") |
| | | @TableField("man_length") |
| | | private Double length; |
| | | |
| | | /** |
| | |
| | | @TableField("move_status") |
| | | private Integer moveStatus; |
| | | |
| | | /** |
| | | * 状态 1: 进行中 0: 初始 2:已完成 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型(0:未知,1:入库,2:出库)") |
| | | @TableField("pakin_pakout_status") |
| | | private Integer pakinPakoutStatus; |
| | | |
| | | @ApiModelProperty(value = "订单类型 (1:出库单 2:入库单 3:调拨单)") |
| | | @TableField("order_type") |
| | | private Long orderType; |
| | | |
| | | public Order() {} |
| | | |
| | | public Order(String uuid,String orderNo,String orderTime,Long docType,Long itemId,String itemName,Long allotItemId,String defNumber,String number,Long cstmr,String cstmrName,String tel,String operMemb,Double totalFee,Double discount,Double discountFee,Double otherFee,Double actFee,Integer payType,String salesman,Integer accountDay,Integer postFeeType,Double postFee,Date payTime,Date sendTime,String shipName,String shipCode,Long settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public Order(String uuid,String orderNo,String orderTime,Long docType,Long itemId,String itemName,Long allotItemId,String defNumber,String number,Long cstmr,String cstmrName,String tel,String operMemb,Double totalFee,Double discount,Double discountFee,Double otherFee,Double actFee,Integer payType,String salesman,Integer accountDay,Integer postFeeType,Double postFee,Date payTime,Date sendTime,String shipName,String shipCode,Long settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Integer pakinPakoutStatus, Long orderType) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | | this.docType = docType; |
| | | this.itemId = itemId; |
| | | this.itemName = itemName; |
| | | this.allotItemId = allotItemId; |
| | | this.defNumber = defNumber; |
| | | this.number = number; |
| | | this.cstmr = cstmr; |
| | | this.cstmrName = cstmrName; |
| | | this.tel = tel; |
| | | this.operMemb = operMemb; |
| | | this.totalFee = totalFee; |
| | | this.discount = discount; |
| | | this.discountFee = discountFee; |
| | | this.otherFee = otherFee; |
| | | this.actFee = actFee; |
| | | this.payType = payType; |
| | | this.salesman = salesman; |
| | | this.accountDay = accountDay; |
| | | this.postFeeType = postFeeType; |
| | | this.postFee = postFee; |
| | | this.payTime = payTime; |
| | | this.sendTime = sendTime; |
| | | this.shipName = shipName; |
| | | this.shipCode = shipCode; |
| | | this.settle = settle; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | this.pakinPakoutStatus = pakinPakoutStatus; |
| | | this.orderType = orderType; |
| | | } |
| | | |
| | | // Order order = new Order( |
| | | // null, // 编号[非空] |
| | | // null, // 订单编号 |
| | |
| | | * 长度 |
| | | */ |
| | | @ApiModelProperty(value= "长度") |
| | | @TableField("man_length") |
| | | private Double length; |
| | | |
| | | /** |
| | |
| | | private String temp3; |
| | | @ApiModelProperty(value= "预留1") |
| | | private String temp4; |
| | | private String Standby1; |
| | | private String Standby2; |
| | | private String Standby3; |
| | | private String BoxType1; |
| | | private String BoxType2; |
| | | private String BoxType3; |
| | | |
| | | public OrderDetl() {} |
| | | |
| | |
| | | private Double weight; |
| | | |
| | | @ApiModelProperty(value= "长度") |
| | | @TableField("man_length") |
| | | private Double length; |
| | | |
| | | @ApiModelProperty(value= "体积") |
| | |
| | | private String temp3; |
| | | @ApiModelProperty(value= "预留1") |
| | | private String temp4; |
| | | private String Standby1; |
| | | private String Standby2; |
| | | private String Standby3; |
| | | private String BoxType1; |
| | | private String BoxType2; |
| | | private String BoxType3; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | |
| | | * 长度 |
| | | */ |
| | | @ApiModelProperty(value= "长度") |
| | | @TableField("length") |
| | | private Double length; |
| | | |
| | | /** |
| 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 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("asr_wrk_mast_sta") |
| | | public class WrkMastSta implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value = "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value = "工作号") |
| | | @TableField("wrk_no") |
| | | private Long wrkNo; |
| | | |
| | | /** |
| | | * rvg号 |
| | | */ |
| | | @ApiModelProperty(value = "RGV编号") |
| | | @TableField("rgv_no") |
| | | private Integer rgvNo; |
| | | |
| | | /** |
| | | * 工位号 |
| | | */ |
| | | @ApiModelProperty(value = "工位号") |
| | | @TableField("work_sta") |
| | | private Integer workSta; |
| | | |
| | | /** |
| | | * 工作档开始位置 |
| | | */ |
| | | @ApiModelProperty(value = "工作档开始位置") |
| | | @TableField("wrk_start") |
| | | private Integer wrkStart; |
| | | |
| | | /** |
| | | * 工作档结束位置 |
| | | */ |
| | | @ApiModelProperty(value = "工作档结束位置") |
| | | @TableField("wrk_end") |
| | | private Integer wrkEnd; |
| | | |
| | | /** |
| | | * 小车接货位置 |
| | | */ |
| | | @ApiModelProperty(value = "小车接货位置") |
| | | @TableField("sta_start") |
| | | private Integer staStart; |
| | | |
| | | /** |
| | | * 小车放货位置 |
| | | */ |
| | | @ApiModelProperty(value = "小车放货位置") |
| | | @TableField("sta_end") |
| | | private Integer staEnd; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 类型 1:非空 2:空板 |
| | | */ |
| | | @ApiModelProperty(value = "类型 1:非空 2:空板") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成 |
| | | */ |
| | | @ApiModelProperty(value = "工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成") |
| | | @TableField("wrk_sts") |
| | | private Integer wrkSts; |
| | | |
| | | /** |
| | | * 行号 |
| | | */ |
| | | @ApiModelProperty(value = "行号") |
| | | @TableField("line_number") |
| | | private Integer lineNumber; |
| | | |
| | | /** |
| | | * 工作类型 1:取(叠盘) 2:拆盘 3:取放 5:满取 6:满放 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value = "工作类型 1:取(叠盘) 2:拆盘 3:取放 5:满取 6:满放") |
| | | @TableField("wrk_type") |
| | | private Integer wrkType; |
| | | |
| | | /** |
| | | * 标记时间 |
| | | */ |
| | | @ApiModelProperty(value = "标记时间") |
| | | @TableField("bign_time") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date bignTime; |
| | | |
| | | private Integer mk; |
| | | |
| | | public WrkMastSta() { |
| | | } |
| | | |
| | | public WrkMastSta(WrkMast wrkMast, Date now, BasDevp basDevp) { |
| | | this.wrkNo = wrkMast.getWrkNo().longValue(); |
| | | this.wrkStart = wrkMast.getSourceStaNo(); |
| | | this.wrkEnd = wrkMast.getStaNo(); |
| | | this.staStart = getStaSta(basDevp.getDevNo()); |
| | | this.staEnd = getStaEnd(wrkMast.getStaNo()); |
| | | this.createTime = now; |
| | | this.updateTime = now; |
| | | this.wrkSts = 0; |
| | | this.bignTime = now; |
| | | this.mk = 0; |
| | | } |
| | | |
| | | public WrkMastSta(Date now, Integer staStart) { |
| | | this.wrkNo = staStart.longValue()+19999L; |
| | | this.wrkStart = staStart; |
| | | this.wrkEnd = staStart; |
| | | this.staStart = staStart; |
| | | this.staEnd = staStart; |
| | | this.createTime = now; |
| | | this.updateTime = now; |
| | | this.wrkSts = 0; |
| | | this.bignTime = now; |
| | | } |
| | | |
| | | public WrkMastSta(Long wrkNo, Integer wrkStart, Integer wrkEnd, Integer staStart, Integer staEnd, Date createTime, Date updateTime, Integer type, Integer wrkSts, Integer lineNumber, Integer wrkType, Date bignTime) { |
| | | this.wrkNo = wrkNo; |
| | | this.wrkStart = wrkStart; |
| | | this.wrkEnd = wrkEnd; |
| | | this.staStart = staStart; |
| | | this.staEnd = staEnd; |
| | | this.createTime = createTime; |
| | | this.updateTime = updateTime; |
| | | this.type = type; |
| | | this.wrkSts = wrkSts; |
| | | this.lineNumber = lineNumber; |
| | | this.wrkType = wrkType; |
| | | this.bignTime = bignTime; |
| | | } |
| | | |
| | | // WrkMastSta wrkMastSta = new WrkMastSta( |
| | | // null, // 工作号[非空] |
| | | // null, // 工作档开始位置[非空] |
| | | // null, // 工作档结束位置[非空] |
| | | // null, // 小车接货位置[非空] |
| | | // null, // 小车放货位置[非空] |
| | | // null, // 添加时间 |
| | | // null, // 修改时间 |
| | | // null, // 类型 0:非空 1:空板[非空] |
| | | // null, // 工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成[非空] |
| | | // null, // 行号[非空] |
| | | // null, // 工作类型[非空] |
| | | // null // 标记时间 |
| | | // ); |
| | | |
| | | public String getCreateTime$() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateTime$() { |
| | | if (Cools.isEmpty(this.updateTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getBignTime$() { |
| | | if (Cools.isEmpty(this.bignTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.bignTime); |
| | | } |
| | | |
| | | public Integer getStaEnd(Integer souSta) { |
| | | switch (souSta) { |
| | | case 2010: return 2012; |
| | | case 2004: return 2006; |
| | | case 2016: return 2018; |
| | | case 2022: return 2024; |
| | | case 2028: return 2030; |
| | | case 115: |
| | | return souSta + 1; |
| | | default: |
| | | return souSta; |
| | | } |
| | | } |
| | | |
| | | public Integer getStaSta(Integer souSta) { |
| | | switch (souSta) { |
| | | case 1043: return 1042; |
| | | case 1104: return 1105; |
| | | case 1005: return 1007; |
| | | case 1008: return 1010; |
| | | case 1019: return 1021; |
| | | case 1022: return 1024; |
| | | case 1029: return 1031; |
| | | case 2001: return 2003; |
| | | case 2007: return 2009; |
| | | case 2013: return 2015; |
| | | case 2019: return 2021; |
| | | case 2025: return 2027; |
| | | default: |
| | | return souSta; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public String getType$() { |
| | | if (Cools.isEmpty(this.type)) { |
| | | return ""; |
| | | } |
| | | switch (this.type) { |
| | | case 1: |
| | | return "非空"; |
| | | case 2: |
| | | return "空板"; |
| | | default: |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成 |
| | | */ |
| | | public String getWrkSts$() { |
| | | if (Cools.isEmpty(this.wrkSts)) { |
| | | try { |
| | | if (this.wrkSts==0){ |
| | | return "初始"; |
| | | } |
| | | }catch (Exception e){ |
| | | return ""; |
| | | } |
| | | return ""; |
| | | } |
| | | switch (this.wrkSts) { |
| | | case 0: |
| | | return "初始"; |
| | | case 1: |
| | | return "等待小车取"; |
| | | case 2: |
| | | return "等待小车放"; |
| | | case 3: |
| | | return "完成"; |
| | | default: |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 工作类型 1:取(叠盘) 2:拆盘 3:取放 5:满取 6:满放 |
| | | */ |
| | | public String getWrkType$() { |
| | | if (Cools.isEmpty(this.wrkType)) { |
| | | return ""; |
| | | } |
| | | switch (this.wrkType) { |
| | | case 1: |
| | | return "叠盘"; |
| | | case 2: |
| | | return "拆盘"; |
| | | case 3: |
| | | return "取放"; |
| | | case 4: |
| | | return "行走"; |
| | | case 5: |
| | | return "满取"; |
| | | case 6: |
| | | return "满放"; |
| | | default: |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| 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.zy.common.utils.Synchro; |
| | | 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("asr_wrk_mast_sta_log") |
| | | public class WrkMastStaLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | private Long wrkNo; |
| | | |
| | | /** |
| | | * rvg号 |
| | | */ |
| | | @ApiModelProperty(value = "RGV编号") |
| | | @TableField("rgv_no") |
| | | private Integer rgvNo; |
| | | |
| | | /** |
| | | * 工位号 |
| | | */ |
| | | @ApiModelProperty(value = "工位号") |
| | | @TableField("work_sta") |
| | | private Integer workSta; |
| | | |
| | | /** |
| | | * 工作档开始位置 |
| | | */ |
| | | @ApiModelProperty(value= "工作档开始位置") |
| | | @TableField("wrk_start") |
| | | private Integer wrkStart; |
| | | |
| | | /** |
| | | * 工作档结束位置 |
| | | */ |
| | | @ApiModelProperty(value= "工作档结束位置") |
| | | @TableField("wrk_end") |
| | | private Integer wrkEnd; |
| | | |
| | | /** |
| | | * 小车接货位置 |
| | | */ |
| | | @ApiModelProperty(value= "小车接货位置") |
| | | @TableField("sta_start") |
| | | private Integer staStart; |
| | | |
| | | /** |
| | | * 小车放货位置 |
| | | */ |
| | | @ApiModelProperty(value= "小车放货位置") |
| | | @TableField("sta_end") |
| | | private Integer staEnd; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 类型 0:满版 1:空板 |
| | | */ |
| | | @ApiModelProperty(value= "类型 0:满版 1:空板") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成") |
| | | @TableField("wrk_sts") |
| | | private Integer wrkSts; |
| | | |
| | | /** |
| | | * 行号 |
| | | */ |
| | | @ApiModelProperty(value= "行号") |
| | | @TableField("line_number") |
| | | private Integer lineNumber; |
| | | |
| | | /** |
| | | * 工作类型 类型 1:取(叠盘) 2:放 3:取放 4:拆盘 |
| | | */ |
| | | @ApiModelProperty(value= "工作类型 类型 1:取(叠盘) 2:放 3:取放 4:拆盘") |
| | | @TableField("wrk_type") |
| | | private Integer wrkType; |
| | | |
| | | /** |
| | | * 标记时间 |
| | | */ |
| | | @ApiModelProperty(value= "标记时间") |
| | | @TableField("bign_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date bignTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("wrk_crn") |
| | | private Integer wrkCrn; |
| | | |
| | | public WrkMastStaLog() {} |
| | | |
| | | public WrkMastStaLog(Long wrkNo, Integer wrkStart, Integer wrkEnd, Integer staStart, Integer staEnd, Date createTime, Date updateTime, Integer type, Integer wrkSts, Integer lineNumber, Integer wrkType, Date bignTime, Integer wrkCrn) { |
| | | this.wrkNo = wrkNo; |
| | | this.wrkStart = wrkStart; |
| | | this.wrkEnd = wrkEnd; |
| | | this.staStart = staStart; |
| | | this.staEnd = staEnd; |
| | | this.createTime = createTime; |
| | | this.updateTime = updateTime; |
| | | this.type = type; |
| | | this.wrkSts = wrkSts; |
| | | this.lineNumber = lineNumber; |
| | | this.wrkType = wrkType; |
| | | this.bignTime = bignTime; |
| | | this.wrkCrn = wrkCrn; |
| | | } |
| | | |
| | | // WrkMastStaLog wrkMastStaLog = new WrkMastStaLog( |
| | | // null, // 工作号[非空] |
| | | // null, // 工作档开始位置[非空] |
| | | // null, // 工作档结束位置[非空] |
| | | // null, // 小车接货位置[非空] |
| | | // null, // 小车放货位置[非空] |
| | | // null, // 添加时间 |
| | | // null, // 修改时间 |
| | | // null, // 类型 0:满版 1:空板[非空] |
| | | // null, // 工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成[非空] |
| | | // null, // 行号[非空] |
| | | // null, // 工作类型 类型 1:取(叠盘) 2:放 3:取放 4:拆盘[非空] |
| | | // null, // 标记时间 |
| | | // null // |
| | | // ); |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getBignTime$(){ |
| | | if (Cools.isEmpty(this.bignTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.bignTime); |
| | | } |
| | | |
| | | public void sync(Object source) { |
| | | Synchro.Copy(source, this); |
| | | } |
| | | |
| | | public Integer getStaEnd(Integer souSta) { |
| | | switch (souSta) { |
| | | case 100: |
| | | case 103: |
| | | case 106: |
| | | case 109: |
| | | case 112: |
| | | case 115: |
| | | return souSta + 1; |
| | | default: |
| | | return souSta; |
| | | } |
| | | } |
| | | |
| | | public String getType$() { |
| | | if (Cools.isEmpty(this.type)) { |
| | | return "未知"; |
| | | } |
| | | switch (this.type) { |
| | | case 1: |
| | | return "非空"; |
| | | case 2: |
| | | return "空板"; |
| | | default: |
| | | return "未知"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成 |
| | | */ |
| | | public String getWrkSts$() { |
| | | if (Cools.isEmpty(this.wrkSts)) { |
| | | try { |
| | | if (this.wrkSts==0){ |
| | | return "初始"; |
| | | } |
| | | }catch (Exception e){ |
| | | return "未知"; |
| | | } |
| | | return "未知"; |
| | | } |
| | | switch (this.wrkSts) { |
| | | case 0: |
| | | return "初始"; |
| | | case 1: |
| | | return "等待小车取"; |
| | | case 2: |
| | | return "等待小车放"; |
| | | case 3: |
| | | return "完成"; |
| | | default: |
| | | return "未知"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 工作类型 1:取(叠盘) 2:拆盘 3:取放 5:满取 6:满放 |
| | | */ |
| | | public String getWrkType$() { |
| | | if (Cools.isEmpty(this.wrkType)) { |
| | | return "未知"; |
| | | } |
| | | switch (this.wrkType) { |
| | | case 1: |
| | | return "叠盘"; |
| | | case 2: |
| | | return "拆盘"; |
| | | case 3: |
| | | return "取放"; |
| | | case 4: |
| | | return "行走"; |
| | | case 5: |
| | | return "满取"; |
| | | case 6: |
| | | return "满放"; |
| | | default: |
| | | return "未知"; |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.enums; |
| | | |
| | | import com.core.exception.CoolException; |
| | | |
| | | public enum WKType { |
| | | MAT_INFO(1,"物料档案"), |
| | | SUPPLIER(2,"供应商"), |
| | | IN_WK(3,"收料单"), |
| | | PRO_IN_WK_UP(4,"采购入库单"), |
| | | PRO_OUT_MAT_WK(5,"采购退料单"), |
| | | PUR_OUT_WK_UP(6,"采购退货单"), |
| | | SALES_OUT_WK(7,"销售出库单"), |
| | | SALES_OUT_WK_UP(8,"销售出库单"), |
| | | SALES_PUR_OUT_WK(9,"销售退货通知单"), |
| | | PRO_MAT_PICK_WK(10,"生产领料单"), |
| | | PRO_MAT_PICK_WK_UP(11,"生产领料单"), |
| | | PRO_MAT_RETURN_WK(12,"生产退料单"), |
| | | PRO_MAT_RETURN_WK_UP(13,"生产退料单"), |
| | | PRO_SUP_ARY_MAT_WK(14,"生产补料单"), |
| | | PRO_SUP_ARY_MAT_UP_WK(15,"生产补料单"), |
| | | PRO_REP_WK(16,"生产汇报单"), |
| | | PRO_WAR_WK(17,"产品入库单"), |
| | | OTHER_WAR_WK(18,"其他入库单"), |
| | | OTHER_OUT_WK(19,"其他出库单"), |
| | | CHECK_WK_WK(20,"检验单"); |
| | | |
| | | public long wkType; |
| | | public String desc; |
| | | |
| | | |
| | | WKType(long wkType, String desc) { |
| | | this.wkType = wkType; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static WKType query(String desc){ |
| | | for(WKType wkType1 : WKType.values()){ |
| | | if(wkType1.desc.equals(desc)){ |
| | | return wkType1; |
| | | } |
| | | } |
| | | throw new CoolException("WKType Error"); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ErpReportParam { |
| | | |
| | | /** |
| | | * 订单编码 |
| | | */ |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 计划跟踪号 |
| | | */ |
| | | private String planNo; |
| | | |
| | | /** |
| | | * 行内码 |
| | | */ |
| | | private String lineId; |
| | | |
| | | /** |
| | | * 仓库编码 |
| | | */ |
| | | private String wareHouseId; |
| | | |
| | | /** |
| | | * 库位号 |
| | | */ |
| | | private String locId; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | private String matNr; |
| | | |
| | | /** |
| | | * 本次出/入数量 |
| | | */ |
| | | private String qty; |
| | | |
| | | /** |
| | | * 托盘号 |
| | | */ |
| | | private String palletId; |
| | | |
| | | /** |
| | | * 批次 |
| | | */ |
| | | private String batch; |
| | | } |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private String createTime; |
| | | public String createTime; |
| | | |
| | | private List<MatParam> matDetails; |
| | | public List<MatParam> matDetails; |
| | | |
| | | @Data |
| | | public static class MatParam{ |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | @JsonProperty("matNr") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | @JsonProperty("makTx") |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 商品分类 |
| | | */ |
| | | @JsonProperty("groupId") |
| | | private String groupCode; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @JsonProperty("spec") |
| | | private String specs; |
| | | |
| | | /** |
| | |
| | | private Integer danger; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | * 状态 1: 新增(默认) 2: 修改 3:禁用 4:启用 |
| | | */ |
| | | @JsonProperty("operateType") |
| | | private Integer status; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @JsonProperty("describle") |
| | | private String memo; |
| | | } |
| | | |
| | |
| | | private String department; //部门 |
| | | private String businessType; //业务类型 |
| | | private String user; //制单人 |
| | | private String orderTime; |
| | | |
| | | |
| | | private List<DetlDto> orderDetails; //物料列表 |
| | |
| | | private String department; //部门 |
| | | private String businessType; //业务类型 |
| | | private String user; //制单人 |
| | | private String orderTime; |
| | | |
| | | private List<DetlDto> orderDetails; |
| | | |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import com.core.common.Cools; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class OpenOrderParam { |
| | | |
| | | /** |
| | | * 订单编码 |
| | | */ |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 单据内码 唯一标识 若没有可以补充订单编码 |
| | | */ |
| | | private String orderInternalCode; |
| | | |
| | | /** |
| | | * 订单类型 1 出库单 2 入库单 3 调拨单 |
| | | */ |
| | | private long orderType; |
| | | |
| | | /** |
| | | * 业务类型 枚举类型 采购入库单 销售退货单 销售出库单 调拨申请单 |
| | | */ |
| | | private String wkType; |
| | | |
| | | /** |
| | | * 业务日期 时间戳 精确到秒 |
| | | */ |
| | | private Date businessTime; |
| | | |
| | | /** |
| | | * 创建日期 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 订单明细 |
| | | */ |
| | | private List<OrderItem> orderItems; |
| | | |
| | | /** |
| | | * 入/出库接驳站点 (出库时将物料出库后运输至该站点 入库时从该站点将物料运回库中) 需要则补充 否则不用补充 |
| | | */ |
| | | private String stationId; |
| | | |
| | | /** |
| | | * 操作类型 1 新增(默认) 2 修改 3 取消 |
| | | */ |
| | | private Integer operateType; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | public static class OrderItem { |
| | | /** |
| | | * 行内码 唯一标识 |
| | | */ |
| | | private String lineId; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | private String matNr; |
| | | |
| | | /** |
| | | * 物料名称 |
| | | */ |
| | | private String makTx; |
| | | |
| | | /** |
| | | * 数量 小数点默认4位 |
| | | */ |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | private String spec; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | private String model; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | private String unit; |
| | | |
| | | /** |
| | | * 批次号 |
| | | */ |
| | | private String batch; |
| | | |
| | | /** |
| | | * 托盘码 若订单类型为出库单时 则指定该托盘出库 |
| | | */ |
| | | private String palletId; |
| | | |
| | | /** |
| | | * 计划跟踪号 |
| | | */ |
| | | private String planNo; |
| | | |
| | | /** |
| | | * 建议入库仓库 |
| | | */ |
| | | private String targetWareHouseId; |
| | | |
| | | /** |
| | | * 建议出库仓库 |
| | | */ |
| | | private String sourceWareHouseId; |
| | | |
| | | public static boolean hasLineNumber(List<OrderItem> list, OrderItem orderItem) { |
| | | for (OrderItem item : list) { |
| | | if (item.getLineId().equals(orderItem.getLineId()) && item.getMatNr().equals(orderItem.getMatNr()) && Cools.eq(item.getModel(),orderItem.getModel()) && |
| | | Cools.eq(item.getBatch(),orderItem.getBatch()) && Cools.eq(item.getPalletId(),orderItem.getPalletId()) && Cools.eq(item.getPlanNo(),orderItem.getPlanNo()) && |
| | | Cools.eq(item.getSourceWareHouseId(),orderItem.getSourceWareHouseId()) && Cools.eq(item.getSpec(),orderItem.getSpec()) && Cools.eq(item.getUnit(),orderItem.getUnit()) && |
| | | Cools.eq(item.getTargetWareHouseId(),orderItem.getTargetWareHouseId())){ |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public static OrderItem findLineNumber(List<OrderItem> list, String lineId, String matNr, String makTx, Double anfme, String spec, String model, String unit, String batch, String palletId, String planNo, String targetWarehouseId, String sourceWarehouseId) { |
| | | for (OrderItem orderItem : list) { |
| | | if (orderItem.getLineId().equals(lineId) && orderItem.getMatNr().equals(matNr) && Cools.eq(orderItem.getModel(),model) && |
| | | Cools.eq(orderItem.getBatch(),batch) && Cools.eq(orderItem.getPalletId(),palletId) && Cools.eq(orderItem.getPlanNo(),planNo) && |
| | | Cools.eq(orderItem.getSourceWareHouseId(),sourceWarehouseId) && Cools.eq(orderItem.getSpec(),spec) && Cools.eq(orderItem.getUnit(),unit) && |
| | | Cools.eq(orderItem.getTargetWareHouseId(),targetWarehouseId)){ |
| | | return orderItem; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class TokenParam { |
| | | |
| | | private String appId; |
| | | |
| | | private String appSecret; |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.vo; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | public class OpenInventoryVo { |
| | | |
| | | private List<InventoryVo> list; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | public static class InventoryVo{ |
| | | |
| | | /** |
| | | * 库位编码 |
| | | */ |
| | | private String locId; |
| | | |
| | | /** |
| | | * 仓库编码 |
| | | */ |
| | | private String wareHouseId; |
| | | |
| | | /** |
| | | * 仓库名称 |
| | | */ |
| | | private String wareHouseName; |
| | | |
| | | /** |
| | | * 托盘码 |
| | | */ |
| | | private String palletId; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | private String matNr; |
| | | |
| | | /** |
| | | * 物料名称 |
| | | */ |
| | | private String makTx; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | private String unit; |
| | | |
| | | /** |
| | | * 库存状态 1 正常 2 冻结 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 绑定的订单类型 1 出库单 2 入库单 3 备料单 4 调拨单 |
| | | */ |
| | | private Integer orderType; |
| | | |
| | | /** |
| | | * 订单号、备料单号 |
| | | */ |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 计划跟踪号 |
| | | */ |
| | | private String planNo; |
| | | |
| | | /** |
| | | * 批次号 |
| | | */ |
| | | private String batch; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | public class QueryLocVo { |
| | | |
| | | private Integer emptyCount; |
| | | |
| | | private Integer disableCount; |
| | | |
| | | private Integer total; |
| | | |
| | | private Integer stockCount; |
| | | |
| | | private Double usedPr; |
| | | |
| | | private Integer used; |
| | | |
| | | private List<Map<String, Object>> pie; |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.vo; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | @AllArgsConstructor |
| | | @Data |
| | | public class TokenVo { |
| | | |
| | | private String token; |
| | | |
| | | private long validTime; |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasRgvErrorLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasRgvErrorLogMapper extends BaseMapper<BasRgvErrorLog> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasRgvMap; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasRgvMapMapper extends BaseMapper<BasRgvMap> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasRgv; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasRgvMapper extends BaseMapper<BasRgv> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasRgvOpt; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasRgvOptMapper extends BaseMapper<BasRgvOpt> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.BasRgvPath; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasRgvPathMapper extends BaseMapper<BasRgvPath> { |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | |
| | | |
| | | // ------------------------------------------------- |
| | | |
| | | List<LocDetl> queryStock1(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos); |
| | | List<LocDetl> queryStock(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos, @Param("supp")String supp, @Param("temp1")String temp1, @Param("temp2")String temp2); |
| | | List<LocDetl> queryStockCrn(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos, @Param("supp")String supp, @Param("temp1")String temp1, @Param("temp2")String temp2); |
| | | List<LocDetl> queryStockFour(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos, @Param("supp")String supp, @Param("temp1")String temp1, @Param("temp2")String temp2); |
| | |
| | | List<LocDetl> selectLocDetlUnilateralMoveShuttleY(@Param("matnr")String matnr,@Param("batch")String batch,@Param("grade")String grade); |
| | | List<LocDetl> selectLocDetlUnilateralMoveShuttleN(@Param("matnr")String matnr,@Param("batch")String batch,@Param("grade")String grade); |
| | | |
| | | @Select("select top 20 * from asr_loc_detl order by modi_time desc ") |
| | | List<LocDetl> query20(); |
| | | |
| | | List<LocDetl> queryStockAll(@Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos, @Param("matnr")String matnr, @Param("batch")String batch, |
| | | @Param("brand")String brand,@Param("standby1")String standby1,@Param("standby2")String standby2, |
| | | @Param("standby3")String standby3,@Param("boxType1")String boxType1,@Param("boxType2")String boxType2); |
| | | |
| | | List<LocDetl> queryStockMatnr(@Param("matnr")String matnr); |
| | | |
| | | List<LocDetl> queryStockAll123(@Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos, @Param("matnr")String matnr, @Param("boxType3")String boxType3); |
| | | |
| | | List<Map<String, Object>> inventory(@Param("wareHouseId") String wareHouseId,@Param("locId") String locId,@Param("matNr") String matNr,@Param("orderNo") String orderNo,@Param("batch") String batch); |
| | | |
| | | List<Map<String, Object>> invSummary(@Param("wareHouseId") String wareHouseId,@Param("matNrs") Collection<String> matNrs); |
| | | } |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.InventoryFlowDto; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | @Repository |
| | |
| | | @Insert("insert into asr_wrk_mast_log select * from asr_wrk_mast where wrk_no=#{workNo}") |
| | | int save(Integer workNo); |
| | | |
| | | /** |
| | | * 查询库存移动流水记录 |
| | | */ |
| | | List<InventoryFlowDto> inventoryFlowList(@Param("curr") Integer curr, @Param("limit") Integer limit, @Param("param") Map<String, Object> param); |
| | | |
| | | /** |
| | | * 统计库存移动流水记录数 |
| | | */ |
| | | int inventoryFlowListCount(@Param("param") Map<String, Object> param); |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMastStaLog; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WrkMastStaLogMapper extends BaseMapper<WrkMastStaLog> { |
| | | @Insert("insert into asr_wrk_mast_sta_log select * from asr_wrk_mast_sta where wrk_no= #{workNo}") |
| | | int save(Long workNo); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMastSta; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WrkMastStaMapper extends BaseMapper<WrkMastSta> { |
| | | Integer wrkCount1(); |
| | | Integer wrkCount2(); |
| | | List<WrkMastSta> selectToBeHistoryData(); |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.BasRgvErrorLog; |
| | | |
| | | public interface BasRgvErrorLogService extends IService<BasRgvErrorLog> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.BasRgvMap; |
| | | |
| | | public interface BasRgvMapService extends IService<BasRgvMap> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.BasRgvOpt; |
| | | |
| | | public interface BasRgvOptService extends IService<BasRgvOpt> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.BasRgvPath; |
| | | |
| | | public interface BasRgvPathService extends IService<BasRgvPath> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.BasRgv; |
| | | |
| | | public interface BasRgvService extends IService<BasRgv> { |
| | | |
| | | } |
| | |
| | | |
| | | Page<LocDetl> getStockOut(Page<LocDetl> page); |
| | | |
| | | List<LocDetl> queryStock1(String matnr, String batch, String orderNo, Set<String> locNos); |
| | | |
| | | /** |
| | | * 修改库存明细数量,如果数量为0,则删除记录 |
| | | */ |
| | |
| | | List<Map<String, Object>> selectLocDetlUnilateralMoveShuttleMap(Integer crnNo); |
| | | |
| | | List<LocDetl> selectLocDetlUnilateralMoveShuttle(String matnr,String batch,String grade,Integer crnNo); |
| | | |
| | | List<LocDetl> query20(); |
| | | } |
| | |
| | | |
| | | Node selectByUuid(String uuid, Long hostId, Integer type, Long parentId); |
| | | |
| | | R stockPakin(PakinParam number, Long userId, Long hostId); |
| | | R stockPakin(PakinParam number, Long userId, Long hostId); |
| | | |
| | | R initPakout(List<InitPakoutParam> params, Long userId, Long hostId); |
| | | |
| | | void locMove(String sourceLocNo, String targetLocNo, Long userId); |
| | | void locMove(String sourceLocNo, String targetLocNo, Long userId); |
| | | } |
| | |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.entity.result.OpenOrderCompeteResult; |
| | | import com.zy.asrs.entity.result.StockVo; |
| | | import com.zy.asrs.entity.vo.OpenInventoryVo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | void syncTag(List<TagParam> param); |
| | | |
| | | void orderDelete(String orderNo); |
| | | |
| | | void orderCreate(OpenOrderParam param); |
| | | } |
| | |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.model.TaskDto; |
| | | import com.zy.common.model.enums.IoWorkType; |
| | | import com.zy.common.web.param.ReportParam; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * sxk并板出库 |
| | | */ |
| | | void locMergeOutSxk(StockOutParam param, Long userId); |
| | | |
| | | void reportHandler(ReportParam param); |
| | | } |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface WrkMastLogService extends IService<WrkMastLog> { |
| | | |
| | | boolean save(Integer workNo); |
| | | |
| | | R inventoryFlowList(Integer curr, Integer limit, Map<String, Object> param); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.common.web.param.ReportParam; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | |
| | | import java.util.List; |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.WrkMastStaLog; |
| | | |
| | | public interface WrkMastStaLogService extends IService<WrkMastStaLog> { |
| | | boolean save(Long workNo); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.WrkMastSta; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface WrkMastStaService extends IService<WrkMastSta> { |
| | | List<WrkMastSta> selectToBeHistoryData(); |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasRgvErrorLog; |
| | | import com.zy.asrs.mapper.BasRgvErrorLogMapper; |
| | | import com.zy.asrs.service.BasRgvErrorLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basRgvErrorLogService") |
| | | public class BasRgvErrorLogServiceImpl extends ServiceImpl<BasRgvErrorLogMapper, BasRgvErrorLog> implements BasRgvErrorLogService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasRgvMap; |
| | | import com.zy.asrs.mapper.BasRgvMapMapper; |
| | | import com.zy.asrs.service.BasRgvMapService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basRgvMapService") |
| | | public class BasRgvMapServiceImpl extends ServiceImpl<BasRgvMapMapper, BasRgvMap> implements BasRgvMapService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasRgvOpt; |
| | | import com.zy.asrs.mapper.BasRgvOptMapper; |
| | | import com.zy.asrs.service.BasRgvOptService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basRgvOptService") |
| | | public class BasRgvOptServiceImpl extends ServiceImpl<BasRgvOptMapper, BasRgvOpt> implements BasRgvOptService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasRgvPath; |
| | | import com.zy.asrs.mapper.BasRgvPathMapper; |
| | | import com.zy.asrs.service.BasRgvPathService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basRgvPathService") |
| | | public class BasRgvPathServiceImpl extends ServiceImpl<BasRgvPathMapper, BasRgvPath> implements BasRgvPathService { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.BasRgv; |
| | | import com.zy.asrs.mapper.BasRgvMapper; |
| | | import com.zy.asrs.service.BasRgvService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basRgvService") |
| | | public class BasRgvServiceImpl extends ServiceImpl<BasRgvMapper, BasRgv> implements BasRgvService { |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | |
| | | page.setRecords(baseMapper.getStockOutPage(page.getCondition())); |
| | | page.setTotal(baseMapper.getStockOutPageCount(page.getCondition())); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public List<LocDetl> queryStock1(String matnr, String batch, String orderNo, Set<String> locNos) { |
| | | return this.baseMapper.queryStock1(matnr, batch, orderNo, locNos); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | return this.baseMapper.selectLocDetlUnilateralMoveShuttleN(matnr,batch,grade); |
| | | } |
| | | |
| | | @Override |
| | | public List<LocDetl> query20() { |
| | | return this.baseMapper.query20(); |
| | | } |
| | | } |
| | |
| | | } |
| | | }); |
| | | |
| | | if(param.getBarcode().length()!=9){ |
| | | throw new CoolException("条码长度不是9位===>>" + param.getBarcode()); |
| | | if(param.getBarcode().length()!=8){ |
| | | throw new CoolException("条码长度不是8位===>>" + param.getBarcode()); |
| | | } |
| | | |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode())); |
| | |
| | | throw new CoolException("物料数据错误,请联系管理员"); |
| | | } |
| | | ManLocDetl check = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", node.getUuid()) |
| | | .eq("loc_no", node.getName()) |
| | | .eq("matnr", dto.getMatnr())); |
| | | if (check == null) { |
| | | ManLocDetl manLocDetl = new ManLocDetl(); |
| | | manLocDetl.setLocNo(node.getUuid()); |
| | | manLocDetl.setLocNo(node.getName()); |
| | | manLocDetl.setNodeId(node.getId()); |
| | | manLocDetl.setZpallet(mat.getBarcode()); |
| | | manLocDetl.setAnfme(dto.getCount()); |
| | |
| | | }else { |
| | | check.setAnfme(dto.getCount() + check.getAnfme()); |
| | | manLocDetlService.update(check,new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", node.getUuid()) |
| | | .eq("loc_no", node.getName()) |
| | | .eq("matnr", dto.getMatnr())); |
| | | } |
| | | |
| | |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.enums.WKType; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.entity.result.OpenOrderCompeteResult; |
| | | import com.zy.asrs.entity.result.StockVo; |
| | | import com.zy.asrs.entity.vo.OpenInventoryVo; |
| | | import com.zy.asrs.mapper.TagMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.MatUtils; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Created by vincent on 2022/4/9 |
| | |
| | | @Transactional |
| | | public void pakinOrderCreate(OpenOrderPakinParam param) { |
| | | Order order = orderService.selectByNo(param.getOrderNo()); |
| | | if (!Cools.isEmpty(order) && order.getSettle() !=1) { |
| | | if (!Cools.isEmpty(order) && order.getSettle() != 1) { |
| | | throw new CoolException(param.getOrderNo() + "单据已有工作任务"); |
| | | } |
| | | if (!Cools.isEmpty(order)) { |
| | |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | List<DetlDto> orderDetails = param.getOrderDetails(); |
| | | for (DetlDto detail : orderDetails) { |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme(),detail.getFromOrderNo() |
| | | , detail.getMark(),detail.getCustomer(),detail.getSuppName(),detail.getTemp1(),detail.getTemp2(),detail.getTemp3(),detail.getTemp4()); |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme(), detail.getFromOrderNo() |
| | | , detail.getMark(), detail.getCustomer(), detail.getSuppName(), detail.getTemp1(), detail.getTemp2(), detail.getTemp3(), detail.getTemp4()); |
| | | if (DetlDto.has(list, dto)) { |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch()); |
| | | assert detlDto != null; |
| | |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | List<DetlDto> orderDetails = param.getOrderDetails(); |
| | | for (DetlDto detail : orderDetails) { |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme(),detail.getFromOrderNo() |
| | | , detail.getMark(),detail.getCustomer(),detail.getSuppName(),detail.getTemp1(),detail.getTemp2(),detail.getTemp3(),detail.getTemp4()); |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme(), detail.getFromOrderNo() |
| | | , detail.getMark(), detail.getCustomer(), detail.getSuppName(), detail.getTemp1(), detail.getTemp2(), detail.getTemp3(), detail.getTemp4()); |
| | | if (DetlDto.has(list, dto)) { |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch()); |
| | | assert detlDto != null; |
| | |
| | | @Override |
| | | @Transactional |
| | | public void syncMat(MatSyncParam param) { |
| | | if (Cools.isEmpty(param.getMatDetails()) || param.getMatDetails().size() <=0 ) { |
| | | if (Cools.isEmpty(param.getMatDetails()) || param.getMatDetails().size() <= 0) { |
| | | throw new CoolException("商品数据为空"); |
| | | } |
| | | |
| | | for(MatSyncParam.MatParam matParam : param.getMatDetails()){ |
| | | if(Cools.isEmpty(matParam.getMatnr())){ |
| | | for (MatSyncParam.MatParam matParam : param.getMatDetails()) { |
| | | if (Cools.isEmpty(matParam.getMatnr())) { |
| | | throw new CoolException("商品编码不能为空"); |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | Mat mat = matService.selectByMatnr(matParam.getMatnr()); |
| | | // 分类 |
| | | Long tagId; |
| | | // 一级分类 |
| | | Tag tag = tagService.selectOne(new EntityWrapper<Tag>().eq("memo", matParam.getGroupCode())); |
| | | if (tag == null) { |
| | | throw new CoolException("出错,未找到分类"); |
| | | } |
| | | if (mat == null) { |
| | | mat = new Mat(); |
| | | // 分类 |
| | | Long tagId; |
| | | // 一级分类 |
| | | if (!Cools.isEmpty(matParam.getGroupCode()) && !Cools.isEmpty(matParam.getGroupName())) { |
| | | Tag priTag = tagService.selectByName(matParam.getGroupCode(), 2); |
| | | if (priTag == null) { |
| | | Tag top = tagService.getTop(); |
| | | NodeUtils nodeUtils = new NodeUtils(); |
| | | nodeUtils.executePath(top.getId()); |
| | | priTag = new Tag( |
| | | null, // 编号 |
| | | matParam.getGroupCode(), // 名称 |
| | | top.getId(), // 父级 |
| | | top.getName(), // 父级名称 |
| | | nodeUtils.path.toString(), // 关联路径 |
| | | nodeUtils.pathName.toString(), // 关联路径名 |
| | | 0, // 类型 |
| | | null, // 负责人 |
| | | null, // 图片 |
| | | null, // 简要描述 |
| | | null, // 数量 |
| | | 2, // 等级 |
| | | null, // 排序 |
| | | 1, // 状态 |
| | | now, // 添加时间 |
| | | null, // 添加人员 |
| | | now, // 修改时间 |
| | | null, // 修改人员 |
| | | null // 备注 |
| | | ); |
| | | if (tagMapper.insert(priTag) == 0) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } |
| | | // 二级分类 |
| | | Tag secTag = tagService.selectByName(matParam.getGroupName(), 3); |
| | | if (secTag == null) { |
| | | NodeUtils nodeUtils = new NodeUtils(); |
| | | nodeUtils.executePath(priTag.getId()); |
| | | secTag = new Tag( |
| | | null, // 编号 |
| | | matParam.getGroupName(), // 名称 |
| | | priTag.getId(), // 父级 |
| | | priTag.getName(), // 父级名称 |
| | | nodeUtils.path.toString(), // 关联路径 |
| | | nodeUtils.pathName.toString(), // 关联路径名 |
| | | 0, // 类型 |
| | | null, // 负责人 |
| | | null, // 图片 |
| | | null, // 简要描述 |
| | | null, // 数量 |
| | | 3, // 等级 |
| | | null, // 排序 |
| | | 1, // 状态 |
| | | now, // 添加时间 |
| | | null, // 添加人员 |
| | | now, // 修改时间 |
| | | null, // 修改人员 |
| | | null // 备注 |
| | | ); |
| | | if (tagMapper.insert(secTag) == 0) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } |
| | | tagId = secTag.getId(); |
| | | } else { |
| | | tagId = tagService.getTop().getId(); |
| | | } |
| | | mat.sync(matParam); |
| | | // mat.setMatnr(param.getMatnr()); |
| | | // mat.setMaktx(param.getMaktx()); |
| | | // mat.setSpecs(param.getSpecs()); |
| | | // mat.setModel(param.getModel()); |
| | | |
| | | mat.setTagId(tag.getId()); |
| | | mat.setTagId(tagId); |
| | | mat.setStatus(1); |
| | | mat.setCreateTime(now); |
| | | mat.setUpdateTime(now); |
| | |
| | | } |
| | | } else { |
| | | mat.sync(matParam); |
| | | mat.setTagId(tag.getId()); |
| | | if (!matService.update(mat, new EntityWrapper<Mat>().eq("matnr",matParam.getMatnr()))) { |
| | | if (!matService.update(mat, new EntityWrapper<Mat>().eq("matnr", matParam.getMatnr()))) { |
| | | throw new CoolException("更新已存在商品信息失败,请联系管理员"); |
| | | } |
| | | } |
| | |
| | | public List<LocDetlByTimeDTO> selectTimeLocDetl(TimeSelectParam param) { |
| | | ArrayList<LocDetlByTimeDTO> locDetlByTimeDTOS = new ArrayList<>(); |
| | | EntityWrapper<WrkMastLog> wrkMastLogEntityWrapper = new EntityWrapper<>(); |
| | | wrkMastLogEntityWrapper.ge("modi_time",param.getStartTime()); |
| | | wrkMastLogEntityWrapper.le("modi_time",param.getEndTime()); |
| | | wrkMastLogEntityWrapper.ge("modi_time", param.getStartTime()); |
| | | wrkMastLogEntityWrapper.le("modi_time", param.getEndTime()); |
| | | // wrkMastLogEntityWrapper.isNotNull("sheet_no"); |
| | | wrkMastLogService.selectList(wrkMastLogEntityWrapper).forEach(wrkMastLog -> { |
| | | if (wrkMastLog.getWrkSts() == 5 || wrkMastLog.getWrkSts() == 15) { |
| | | EntityWrapper<WrkDetlLog> wrkDetlLogEntityWrapper = new EntityWrapper<>(); |
| | | wrkDetlLogEntityWrapper.eq("wrk_no", wrkMastLog.getWrkNo()); |
| | | if (wrkMastLog.getIoType() != 300 && wrkMastLog.getIoType() != 301){ |
| | | if (wrkMastLog.getIoType() != 300 && wrkMastLog.getIoType() != 301) { |
| | | wrkDetlLogEntityWrapper.eq("zpallet", wrkMastLog.getBarcode()); |
| | | } |
| | | List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectList(wrkDetlLogEntityWrapper); |
| | | wrkDetlLogs.forEach(wrkDetlLog -> { |
| | | if (wrkDetlLog.getOrderNo() != null && !wrkDetlLog.getOrderNo().isEmpty()) { |
| | | LocDetlByTimeDTO locDetlByTimeDTO = new LocDetlByTimeDTO(); |
| | | if (!Cools.isEmpty(wrkDetlLog.getOrderNo())){ |
| | | if (!Cools.isEmpty(wrkDetlLog.getOrderNo())) { |
| | | Order order = orderService.selectByNo(wrkDetlLog.getOrderNo()); |
| | | if (!Cools.isEmpty(order)) { |
| | | locDetlByTimeDTO.setDate(order.getOrderTime()); |
| | |
| | | locDetlByTimeDTO.setOrderType(order.getDocType$()); |
| | | } |
| | | locDetlByTimeDTO.setMatnr(wrkDetlLog.getMatnr()); |
| | | locDetlByTimeDTO.setLocNo(wrkMastLog.getIoType() <100? wrkMastLog.getLocNo(): wrkMastLog.getSourceLocNo()); |
| | | locDetlByTimeDTO.setLocNo(wrkMastLog.getIoType() < 100 ? wrkMastLog.getLocNo() : wrkMastLog.getSourceLocNo()); |
| | | locDetlByTimeDTO.setBatch(wrkDetlLog.getBatch()); |
| | | locDetlByTimeDTO.setAnfme(wrkDetlLog.getAnfme()); |
| | | locDetlByTimeDTO.setOrderNo(wrkDetlLog.getOrderNo()); |
| | |
| | | @Transactional |
| | | public void syncTag(List<TagParam> param) { |
| | | |
| | | param.forEach(tag-> { |
| | | param.forEach(tag -> { |
| | | // 分类 |
| | | Long tagId; |
| | | Date now = new Date(); |
| | | if (Cools.isEmpty(tag.getParentItemClassId())){ |
| | | if (Cools.isEmpty(tag.getParentItemClassId())) { |
| | | Tag priTag = tagService.selectByName("全部", 1); |
| | | |
| | | // 二级分类 |
| | |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } |
| | | }else { |
| | | Tag priTag =tagService.selectOne(new EntityWrapper<Tag>().eq("memo", tag.getParentItemClassId())); |
| | | } else { |
| | | Tag priTag = tagService.selectOne(new EntityWrapper<Tag>().eq("memo", tag.getParentItemClassId())); |
| | | if (priTag == null) { |
| | | Tag top = tagService.getTop(); |
| | | NodeUtils nodeUtils = new NodeUtils(); |
| | |
| | | if (tagMapper.insert(secTag) == 0) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | }else { |
| | | } else { |
| | | secTag.setName(tag.getName()); |
| | | secTag.setParentId(priTag.getId()); |
| | | secTag.setParentName(priTag.getName()); |
| | |
| | | List<Tag> tags = tagService.selectList(new EntityWrapper<Tag>().eq("parent_id", secTag.getId())); |
| | | if (!Cools.isEmpty(tags)) { |
| | | for (Tag tag1 : tags) { |
| | | tag1.setPath(nodeUtils.path.toString()+","+secTag.getId()); |
| | | tag1.setPathName(nodeUtils.pathName.toString()+","+secTag.getName()); |
| | | tag1.setPath(nodeUtils.path.toString() + "," + secTag.getId()); |
| | | tag1.setPathName(nodeUtils.pathName.toString() + "," + secTag.getName()); |
| | | if (tagMapper.updateById(tag1) == 0) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public void orderDelete(String orderNo) { |
| | |
| | | if (order == null) { |
| | | throw new CoolException("未查询到对应订单信息"); |
| | | } |
| | | if (order.getSettle() != 1){ |
| | | if (order.getSettle() != 1) { |
| | | throw new CoolException("该订单已有对应任务,禁止删除"); |
| | | } |
| | | List<OrderDetl> OrderDetl = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no", orderNo)); |
| | |
| | | } |
| | | orderService.delete(new EntityWrapper<Order>().eq("order_no", orderNo)); |
| | | } |
| | | |
| | | /** |
| | | * 入/出库通知单下发 |
| | | * |
| | | * @param param |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public void orderCreate(OpenOrderParam param) { |
| | | Order order = orderService.selectByNo(param.getOrderNo()); |
| | | if (!Cools.isEmpty(order)) { |
| | | throw new CoolException(param.getOrderNo() + "订单已存在,请勿重复创建"); |
| | | } |
| | | Date now = new Date(); |
| | | order = new Order( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | param.getOrderNo(), // 订单编码[非空] |
| | | DateUtils.convert(now), //单据日期 |
| | | WKType.query(param.getWkType()).wkType, //单据类型 |
| | | null, //项目编号 |
| | | null, //项目名称 客户PO号 |
| | | null, //调拨项目编号 |
| | | null, //初始票据号 |
| | | null, //票据号 |
| | | null, //客户编号 |
| | | null, //客户 |
| | | param.getOrderInternalCode(), //单据内码 |
| | | null, //操作人员 |
| | | null, //合计金额 |
| | | null, //优惠率 |
| | | null, //优惠金额 |
| | | null, //销售或采购费用合计 |
| | | null, //实付金额 |
| | | null, //付款类型 1: 现金 2: 记账 |
| | | null, //业务员 |
| | | null, //结算天数 |
| | | null, //邮费支付类型 1: 在线支付 2: 货到付款 |
| | | null, //邮费 |
| | | param.getBusinessTime(), //业务日期 |
| | | param.getCreateTime(), //创建日期 |
| | | null, //物流名称 |
| | | null, //物流单号 |
| | | 1L, //订单状态 |
| | | 1, //状态 1: 正常 0: 禁用 |
| | | 9527L, //添加人员 |
| | | now, //添加时间 |
| | | 9527L, //修改人员 |
| | | now, //修改时间 |
| | | param.getStationId(), //入/出库接驳站点 |
| | | param.getOperateType(), // 操作类型 1.新增 2.修改 3.取消 |
| | | param.getOrderType() // 订单类型 1 出库单 2 入库单 3 调拨单 |
| | | ); |
| | | if (!orderService.insert(order)) { |
| | | throw new CoolException("保存订单主档失败,请联系管理员!" + order); |
| | | } |
| | | List<OpenOrderParam.OrderItem> list = new ArrayList<>(); |
| | | List<OpenOrderParam.OrderItem> orderItems = param.getOrderItems(); |
| | | for (OpenOrderParam.OrderItem item : orderItems) { |
| | | OpenOrderParam.OrderItem orderItem = new OpenOrderParam.OrderItem( |
| | | item.getLineId(), |
| | | item.getMatNr(), |
| | | item.getMakTx(), |
| | | item.getAnfme(), |
| | | item.getSpec(), |
| | | item.getModel(), |
| | | item.getUnit(), |
| | | item.getBatch(), |
| | | item.getPalletId(), |
| | | item.getPlanNo(), |
| | | item.getTargetWareHouseId(), |
| | | item.getSourceWareHouseId() |
| | | ); |
| | | if (OpenOrderParam.OrderItem.hasLineNumber(list, orderItem)) { |
| | | OpenOrderParam.OrderItem oi = OpenOrderParam.OrderItem.findLineNumber( |
| | | list, |
| | | item.getLineId(), |
| | | item.getMatNr(), |
| | | item.getMakTx(), |
| | | item.getAnfme(), |
| | | item.getSpec(), |
| | | item.getModel(), |
| | | item.getUnit(), |
| | | item.getBatch(), |
| | | item.getPalletId(), |
| | | item.getPlanNo(), |
| | | item.getTargetWareHouseId(), |
| | | item.getSourceWareHouseId() |
| | | ); |
| | | assert oi != null; |
| | | oi.setAnfme(oi.getAnfme() + orderItem.getAnfme()); |
| | | } else { |
| | | list.add(orderItem); |
| | | } |
| | | } |
| | | for (OpenOrderParam.OrderItem orderItem : list) { |
| | | Mat mat = matService.selectByMatnr(orderItem.getMatNr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException("订单明细中的商品编号不存在:" + orderItem.getMatNr()); |
| | | } |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setOrderNo(order.getOrderNo()); // 订单编号 |
| | | orderDetl.setOrderId(order.getId()); // 订单内码 |
| | | orderDetl.setStandby1(order.getTel()); // 行内码 唯一标识 |
| | | orderDetl.setAnfme(orderItem.getAnfme()); // 订单数量 |
| | | orderDetl.setBarcode(orderItem.getBatch()); // 批次 |
| | | orderDetl.setStandby2(orderItem.getPalletId()); // 托盘码 |
| | | orderDetl.setStandby3(orderItem.getPlanNo()); // 计划跟踪号 |
| | | orderDetl.setBoxType1(orderItem.getSourceWareHouseId()); // 建议入库仓库 |
| | | orderDetl.setBoxType2(orderItem.getTargetWareHouseId()); // 建议出库仓库 |
| | | orderDetl.setCreateBy(9527L); |
| | | orderDetl.setCreateTime(now); |
| | | orderDetl.setUpdateBy(9527L); |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | // orderDetl.setPakinPakoutStatus(1); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("保存订单明细失败,请联系管理员!" + orderDetl); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.BaseRes; |
| | |
| | | import com.zy.common.model.enums.WorkNoType; |
| | | import com.zy.common.properties.SlaveProperties; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.utils.OutStockInterceptUtil; |
| | | import com.zy.common.web.WcsController; |
| | | import com.zy.common.web.param.ReportParam; |
| | | 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.stereotype.Service; |
| | |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private InventoryCheckOrderDetlService inventoryCheckOrderDetlService; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | if (!locDetlDtos.isEmpty()) { |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locDetlDtos.get(0).getLocDetl().getLocNo())); |
| | | if (locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D") ){ |
| | | if (locMast.getCrnNo() == 7){ |
| | | stockOutSXK(staNo, locDetlDtos, null, userId); |
| | | }else { |
| | | // if (locMast.getCrnNo() == 7){ |
| | | // stockOutSXK(staNo, locDetlDtos, null, userId); |
| | | // }else { |
| | | // 启动出库开始 101.出库 |
| | | stockOut(staNo, locDetlDtos, null, userId); |
| | | } |
| | | // } |
| | | |
| | | }else { |
| | | throw new CoolException("所选库位存在状态不为F、D的库位,库位号:"+locMast.getLocNo()+" 、当前状态:"+locMast.getLocSts()+"-"+locMast.getLocSts$()); |
| | |
| | | } |
| | | } else { |
| | | throw new CoolException(dto.getLocNo() + "库位不是在库状态"); |
| | | } |
| | | String response = null; |
| | | Map<String, Object> requestParam = new LinkedHashMap<>(); |
| | | int result = 0; |
| | | String wcsUrl = null; |
| | | String value = null; |
| | | |
| | | // 调用WCS接口下发出库任务 |
| | | try { |
| | | Config configUrl = configService.selectConfigByCode("wcsurl"); |
| | | wcsUrl = configUrl.getValue(); |
| | | Config config = configService.selectConfigByCode("wcsOutCreateTask"); |
| | | value = config.getValue(); |
| | | if (wcsUrl == null || value == null){ |
| | | throw new CoolException("WCS相关配置有误,出库任务下发失败,请检查相关配置"); |
| | | } |
| | | requestParam.put("taskNo", workNo); |
| | | requestParam.put("staNo", staNo); |
| | | requestParam.put("locNo", Utils.getWcsLoc(dto.getLocNo())); |
| | | requestParam.put("taskPri",13); |
| | | response = new HttpHandler.Builder() |
| | | .setUri(wcsUrl) |
| | | .setPath(value) |
| | | .setJson(JSON.toJSONString(requestParam)) |
| | | .setTimeout(30, TimeUnit.SECONDS) |
| | | .build() |
| | | .doPost(); |
| | | if (response != null) { |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code") == 200){ |
| | | result = 1; |
| | | log.info("调用WCS出库任务下发接口成功!!!url:{};request:{};response:{}", wcsUrl + value, |
| | | JSON.toJSONString(requestParam), response); |
| | | }else { |
| | | throw new CoolException("调用WCS出库任务下发接口失败,接口返回code异常"); |
| | | } |
| | | }else { |
| | | throw new CoolException("调用WCS出库任务下发接口失败,接口未响应"); |
| | | } |
| | | }catch (Exception e){ |
| | | throw new CoolException("调用WCS出库任务下发接口异常"); |
| | | }finally { |
| | | ApiLog apiLog = new ApiLog(); |
| | | apiLog.setNamespace("WMS下发出库任务至WCS"); |
| | | apiLog.setUrl(wcsUrl + value); |
| | | apiLog.setClientIp(wcsUrl); |
| | | apiLog.setRequest(JSON.toJSONString(requestParam)); |
| | | apiLog.setResponse(response); |
| | | apiLog.setResult(result);apiLog.setCreateTime(new Date()); |
| | | apiLogService.insert(apiLog); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } else { |
| | | throw new CoolException(taskDto.getLocNo() + "库位不是在库状态"); |
| | | } |
| | | String response = null; |
| | | Map<String, Object> requestParam = new LinkedHashMap<>(); |
| | | int result = 0; |
| | | String wcsUrl = null; |
| | | String value = null; |
| | | |
| | | // 调用WCS接口下发出库任务 |
| | | try { |
| | | Config configUrl = configService.selectConfigByCode("wcsurl"); |
| | | wcsUrl = configUrl.getValue(); |
| | | Config config = configService.selectConfigByCode("wcsOutCreateTask"); |
| | | value = config.getValue(); |
| | | if (wcsUrl == null || value == null){ |
| | | throw new CoolException("WCS相关配置有误,出库任务下发失败,请检查相关配置"); |
| | | } |
| | | requestParam.put("taskNo", workNo); |
| | | requestParam.put("staNo", staNo); |
| | | requestParam.put("locNo", Utils.getWcsLoc(locMast.getLocNo())); |
| | | requestParam.put("taskPri",13); |
| | | response = new HttpHandler.Builder() |
| | | .setUri(wcsUrl) |
| | | .setPath(value) |
| | | .setJson(JSON.toJSONString(requestParam)) |
| | | .setTimeout(30, TimeUnit.SECONDS) |
| | | .build() |
| | | .doPost(); |
| | | if (response != null) { |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code") == 200){ |
| | | result = 1; |
| | | log.info("调用WCS出库任务下发接口成功!!!url:{};request:{};response:{}", wcsUrl + value, |
| | | JSON.toJSONString(requestParam), response); |
| | | }else { |
| | | throw new CoolException("调用WCS出库任务下发接口失败,接口返回code异常"); |
| | | } |
| | | }else { |
| | | throw new CoolException("调用WCS出库任务下发接口失败,接口未响应"); |
| | | } |
| | | }catch (Exception e){ |
| | | throw new CoolException("调用WCS出库任务下发接口异常"); |
| | | }finally { |
| | | ApiLog apiLog = new ApiLog(); |
| | | apiLog.setNamespace("WMS下发出库任务至WCS"); |
| | | apiLog.setUrl(wcsUrl + value); |
| | | apiLog.setClientIp(wcsUrl); |
| | | apiLog.setRequest(JSON.toJSONString(requestParam)); |
| | | apiLog.setResponse(response); |
| | | apiLog.setResult(result);apiLog.setCreateTime(new Date()); |
| | | apiLogService.insert(apiLog); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void reportHandler(ReportParam param) { |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", param.getSuperTaskNo())); |
| | | if (wrkMast == null){ |
| | | throw new CoolException("WCS上报WMS任务号没有找到对应任务,上级任务号=" + param.getSuperTaskNo()); |
| | | } |
| | | Long wrkSts = null; |
| | | if (wrkMast.getIoType() < 100){ |
| | | if (param.getMsgDesc().equals("RGV_TASK_RUN")){ |
| | | wrkSts = 201L; |
| | | } |
| | | if (param.getMsgDesc().equals("CRN_IN_TASK_RUN")){ |
| | | wrkSts = 3L; |
| | | } |
| | | if (param.getMsgDesc().equals("CRN_IN_TASK_COMPLETE")){ |
| | | wrkSts = 4L; |
| | | } |
| | | }else if (wrkMast.getIoType() > 100){ |
| | | if (param.getMsgDesc().equals("CRN_OUT_TASK_RUN")){ |
| | | wrkSts = 12L; |
| | | } |
| | | if (param.getMsgDesc().equals("CRN_OUT_TASK_COMPLETE") && wrkMast.getIoType() == 101){ |
| | | wrkSts = 15L; |
| | | } |
| | | if (param.getMsgDesc().equals("CRN_OUT_TASK_COMPLETE")){ |
| | | wrkSts = 14L; |
| | | } |
| | | }else { |
| | | throw new CoolException("未知类型的工作档"); |
| | | } |
| | | |
| | | wrkMast.setWrkSts(wrkSts); |
| | | wrkMast.setIoTime(new Date()); |
| | | if (!wrkMastService.updateById(wrkMast)){ |
| | | throw new CoolException("修改工作档状态失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.InventoryFlowDto; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | import com.zy.asrs.mapper.WrkMastLogMapper; |
| | | import com.zy.asrs.service.WrkMastLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @Service("wrkMastLogService") |
| | | public class WrkMastLogServiceImpl extends ServiceImpl<WrkMastLogMapper, WrkMastLog> implements WrkMastLogService { |
| | |
| | | return this.baseMapper.save(workNo) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public R inventoryFlowList(Integer curr, Integer limit, Map<String, Object> param) { |
| | | Page<InventoryFlowDto> page = new Page<>(); |
| | | page.setCurrent(curr); |
| | | page.setSize(limit); |
| | | page.setTotal(this.baseMapper.inventoryFlowListCount(param)); |
| | | page.setRecords(this.baseMapper.inventoryFlowList(curr, limit, param)); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.common.web.param.ReportParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.WrkMastStaLog; |
| | | import com.zy.asrs.mapper.WrkMastStaLogMapper; |
| | | import com.zy.asrs.service.WrkMastStaLogService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("wrkMastStaLogService") |
| | | public class WrkMastStaLogServiceImpl extends ServiceImpl<WrkMastStaLogMapper, WrkMastStaLog> implements WrkMastStaLogService { |
| | | |
| | | @Override |
| | | public boolean save(Long workNo) { |
| | | return this.baseMapper.save(workNo) > 0; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.WrkMastSta; |
| | | import com.zy.asrs.mapper.WrkMastStaMapper; |
| | | import com.zy.asrs.service.WrkMastStaService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service("wrkMastStaService") |
| | | public class WrkMastStaServiceImpl extends ServiceImpl<WrkMastStaMapper, WrkMastSta> implements WrkMastStaService { |
| | | |
| | | @Override |
| | | public List<WrkMastSta> selectToBeHistoryData() { |
| | | return this.baseMapper.selectToBeHistoryData(); |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.DocTypeService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.OrderSyncHandler; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | |
| | | @Scheduled(cron = "0 0 1 * * ? ") |
| | | public void clearApiLog(){ |
| | | public void clearApiLog() { |
| | | try { |
| | | apiLogService.clearWeekBefore(); |
| | | } catch (Exception e) { |
| | |
| | | |
| | | // @Scheduled(cron = "0/5 * * * * ? ") |
| | | @Async("orderThreadPool") |
| | | public void completeAndReport(){ |
| | | public void completeAndReport() { |
| | | String erpReport = Parameter.get().getErpReport(); |
| | | if (!Cools.isEmpty(erpReport) && erpReport.equals("true")) { |
| | | List<Order> orders = orderService.selectComplete(); |
| | | for (Order order : orders) { |
| | | ReturnT<String> result = orderSyncHandler.start(order); |
| | | ReturnT<String> result = reportToMesOrderReport(order); |
| | | if (!result.isSuccess()) { |
| | | log.error("单据[orderNo={}]上报erp失败", order.getOrderNo()); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | private ReturnT<String> reportToMesOrderReport(Order order) { |
| | | if (order == null) { |
| | | return new ReturnT<>(ReturnT.SUCCESS_CODE, "SUCCESS"); |
| | | } |
| | | |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (docType == null) { |
| | | return new ReturnT<>(ReturnT.SUCCESS_CODE, "SUCCESS"); |
| | | } |
| | | |
| | | String wkType = docType.getDocName(); |
| | | List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | | |
| | | String uri = "localhost:9090"; |
| | | String path = "/erp/open/asrs/MES/orderReport"; |
| | | String url = "http://" + uri + path; |
| | | |
| | | Map<String, Object> payload = new HashMap<>(); |
| | | payload.put("orderNo", order.getOrderNo()); |
| | | // payload.put("warehouseId", "WH01"); |
| | | payload.put("wkType", wkType); |
| | | payload.put("orderDetls", orderDetls); |
| | | String requestJson = JSON.toJSONString(payload); |
| | | |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(uri) |
| | | .setPath(path) |
| | | .setJson(requestJson) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject json = JSON.parseObject(response); |
| | | Integer code = json == null ? null : json.getInteger("code"); |
| | | success = code != null && code == 200; |
| | | if (!success) { |
| | | String msg = json == null ? null : json.getString("msg"); |
| | | throw new CoolException(!Cools.isEmpty(msg) ? msg : "接口返回失败:" + response); |
| | | } |
| | | if (!orderService.updateSettle(order.getId(), 6L, null)) { |
| | | throw new CoolException("更新单据状态失败"); |
| | | } |
| | | return new ReturnT<>(ReturnT.SUCCESS_CODE, "SUCCESS"); |
| | | } catch (IOException e) { |
| | | return new ReturnT<>(ReturnT.FAIL_CODE, e.getMessage()); |
| | | } catch (Exception e) { |
| | | return new ReturnT<>(ReturnT.FAIL_CODE, e.getMessage()); |
| | | } finally { |
| | | try { |
| | | apiLogService.save( |
| | | "MES订单上报", |
| | | url, |
| | | null, |
| | | "127.0.0.1", |
| | | requestJson, |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { |
| | | log.error("", e); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | public static String getWcsLoc(String locNo){ |
| | | if (!Cools.isEmpty(locNo)){ |
| | | return getRow(locNo) + "-" + getBay(locNo) + "-" + getLev(locNo); |
| | | } |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | |
| | | // public static void main(String[] args) { |
| | | // SlaveProperties slaveProperties = new SlaveProperties(); |
| | | // slaveProperties.setDoubleDeep(true); |
| | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import javax.websocket.*; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.websocket.*; |
| | | import javax.websocket.server.PathParam; |
| | | import javax.websocket.server.ServerEndpoint; |
| | | import java.util.Map; |
| | |
| | | private String temp2 = ""; |
| | | private String temp3 = ""; |
| | | private String temp4 = ""; |
| | | private String brand = ""; |
| | | private String boxType1 = ""; |
| | | private String boxType2 = ""; |
| | | private String boxType3 = ""; |
| | | private String standby1 = ""; |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | private Long lineNumber = 1L; |
| | | |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.brand = brand; |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | } |
| | | |
| | | public DetlDto() { |
| | | } |
| | |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3, Double anfme) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.brand = brand; |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch, String brand, String standby1, String standby2, String standby3, Long lineNumber, String boxType1, String boxType2, String boxType3) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.brand = brand; |
| | | this.standby1 = standby1; |
| | | this.standby2 = standby2; |
| | | this.standby3 = standby3; |
| | | this.lineNumber = lineNumber; |
| | | this.boxType1 = boxType1; |
| | | this.boxType2 = boxType2; |
| | | this.boxType3 = boxType3; |
| | | } |
| | | |
| | | public static boolean hasList(Set<DetlDto> detlDtos, OrderDetl orderDetl) { |
| | | for (DetlDto dto : detlDtos) { |
| | | if (Cools.isEmpty(dto.getBatch()) && Cools.isEmpty(orderDetl.getBatch())) { |
| | |
| | | |
| | | private String batch; |
| | | |
| | | private String brand = ""; |
| | | |
| | | private String standby1 = ""; |
| | | |
| | | private String standby2 = ""; |
| | | |
| | | private String standby3 = ""; |
| | | |
| | | private String boxType1 = "1"; |
| | | |
| | | private String boxType2 = "1"; |
| | | |
| | | private String boxType3 = "1"; |
| | | |
| | | private String orderNo; |
| | | |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 是否冻结 0.未冻结 1.已冻结 |
| | | */ |
| | | private Integer frozen = 1; |
| | | |
| | | private Integer frozenLoc = 1; |
| | | |
| | | private boolean lack = false; |
| | | |
| | | private List<staListDto> staNos; |
| | | private List<Integer> staNos; |
| | | |
| | | private Integer staNo; |
| | | |
| | | private String staName; |
| | | |
| | | public LocDto() { |
| | |
| | | return this.matnr + "(" + this.maktx + ")"; |
| | | } |
| | | |
| | | public void setStaNos(List<staListDto> staNos) { |
| | | this.staNos = staNos; |
| | | if (!Cools.isEmpty(staNos)) { |
| | | this.staNo = staNos.get(0).getStaNo(); |
| | | this.staName = staNos.get(0).getStaName(); |
| | | } |
| | | } |
| | | // public void setStaNos(List<staListDto> staNos) { |
| | | // this.staNos = staNos; |
| | | // if (!Cools.isEmpty(staNos)) { |
| | | // this.staNo = staNos.get(0).getStaNo(); |
| | | // this.staName = staNos.get(0).getStaName(); |
| | | // } |
| | | // } |
| | | |
| | | } |
| | |
| | | import com.zy.common.model.LocTypeDto; |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.properties.SlaveProperties; |
| | | import com.zy.common.web.param.ChangeLocParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | } |
| | | |
| | | public StartupDto changeLocNo(ChangeLocParam param) { |
| | | StartupDto startupDto = null; |
| | | LocMast targetLocNo = null; |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", param.getLocNo())); |
| | | if (!locMast.getLocSts().equals("F")){ |
| | | return startupDto; |
| | | } |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().in("row1", 3,4,5,6) |
| | | .eq("loc_sts", "O") |
| | | .orderBy("lev1", true).orderBy("bay1", false)); |
| | | for (LocMast loc : locMasts) { |
| | | String deepLoc = Utils.getDeepLoc(slaveProperties, loc.getLocNo()); |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", deepLoc).eq("loc_sts", "O")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | targetLocNo = locMast1; |
| | | break; |
| | | } |
| | | targetLocNo = loc; |
| | | break; |
| | | } |
| | | int workNo = getWorkNo(3); |
| | | startupDto.setWorkNo(workNo); |
| | | startupDto.setLocNo(targetLocNo.getLocNo()); |
| | | startupDto.setCrnNo(targetLocNo.getCrnNo()); |
| | | return startupDto; |
| | | |
| | | } |
| | | } |
| | |
| | | import com.zy.common.model.LocTypeDto; |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.web.param.ChangeLocParam; |
| | | import com.zy.common.web.param.ReportParam; |
| | | import com.zy.common.web.param.SearchLocParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @ResponseBody |
| | | @Transactional |
| | | public synchronized R getLocNo2(@RequestBody SearchLocParam param) { |
| | | if (Cools.isEmpty(param.getIoType())) { |
| | | return R.error("入出库类型不能为空"); |
| | | if ((param.isEmptyMk() && param.isFullPlt()) || (!param.isFullPlt() && !param.isEmptyMk())) { |
| | | return R.error("空托/满托信号不能同时为true/false"); |
| | | } |
| | | if (Cools.isEmpty(param.getSourceStaNo())) { |
| | | return R.error("源站编号不能为空"); |
| | |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | if (param.getIoType() == 107) {//盘点再入库 |
| | | /** |
| | | * 此处存在问题 如确实需要用此接口 请根据实际情况修改 |
| | | */ |
| | | if (param.isFullPlt()) {//盘点再入库 |
| | | try{ |
| | | // 检索库位 |
| | | List<KeyValueVo> list = locDetls.stream().map(item -> new KeyValueVo(item.getMatnr(), item.getBatch())).distinct().collect(Collectors.toList()); |
| | |
| | | @ResponseBody |
| | | public synchronized R getLocNo(@RequestBody SearchLocParam param) { |
| | | log.info("收到WCS入库接口请求====>>入参:{}", param); |
| | | if (Cools.isEmpty(param.getIoType())) { |
| | | return R.error("入出库类型不能为空"); |
| | | if ((param.isEmptyMk() && param.isFullPlt()) || (!param.isFullPlt() && !param.isEmptyMk())) { |
| | | return R.error("空托/满托信号不能同时为true/false"); |
| | | } |
| | | if (Cools.isEmpty(param.getSourceStaNo())) { |
| | | return R.error("源站编号不能为空"); |
| | |
| | | return R.ok(locNo3); |
| | | }else { |
| | | List<WaitPakin> waitPakins = null; |
| | | if (param.getIoType() == 1) { |
| | | if (param.isFullPlt()) { |
| | | if (Cools.isEmpty(param.getBarcode())) { |
| | | return R.error("条码不能为空"); |
| | | } |
| | |
| | | LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo); |
| | | |
| | | StartupDto dto = null; |
| | | switch (param.getIoType()) { |
| | | case 1://满托盘入库 |
| | | assert waitPakins != null; |
| | | dto = startupFullPutStore(param.getSourceStaNo(), param.getBarcode(), locTypeDto, waitPakins); |
| | | break; |
| | | case 10://空托盘入库 |
| | | dto = emptyPlateIn(param.getSourceStaNo(), locTypeDto, param.getBarcode()); |
| | | break; |
| | | default: |
| | | break; |
| | | if (param.isFullPlt()) { |
| | | assert waitPakins != null; |
| | | dto = startupFullPutStore(param.getSourceStaNo(), param.getBarcode(), locTypeDto, waitPakins); |
| | | } |
| | | if (param.isEmptyMk()){ |
| | | dto = emptyPlateIn(param.getSourceStaNo(), locTypeDto, param.getBarcode()); |
| | | } |
| | | log.info("WCS入库接口返参:{},托盘码:{}", dto, param.getBarcode()); |
| | | return R.ok().add(dto); |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * WCS上报接口 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @PostMapping("/openapi/report") |
| | | public synchronized R report(@RequestBody ReportParam param){ |
| | | if (Cools.isEmpty(param)){ |
| | | return R.error("参数为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getSuperTaskNo())){ |
| | | return R.error("WMS工作号为空"); |
| | | } |
| | | workService.reportHandler(param); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/openapi/change/loc") |
| | | public synchronized R changeLoc(@RequestBody ChangeLocParam param){ |
| | | if (Cools.isEmpty(param)){ |
| | | return R.error("参数为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getLocNo())){ |
| | | return R.error("移库的库位号为空"); |
| | | } |
| | | StartupDto dto = commonService.changeLocNo(param); |
| | | Date now = new Date(); |
| | | // 生成工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(dto.getWorkNo()); |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setWrkSts(11L); |
| | | wrkMast.setIoPri(15D); |
| | | wrkMast.setIoType(11); |
| | | wrkMast.setCrnNo(dto.getCrnNo()); |
| | | wrkMast.setSourceLocNo(param.getLocNo()); |
| | | wrkMast.setLocNo(dto.getLocNo()); |
| | | wrkMast.setFullPlt("Y"); // 满板:N |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setEmptyMk("N"); // 空板 |
| | | wrkMast.setLinkMis("Y"); |
| | | // 操作人员数据 |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiTime(now); |
| | | return wrkMastService.insert(wrkMast) ? R.ok(dto) : R.error("移库失败"); |
| | | } |
| | | |
| | | @PostMapping("/auto/emptyIn/v1") |
| | | @ResponseBody |
| | | public R autoEmptyIn(@RequestBody LocTypeDto locTypeDto){ |
| New file |
| | |
| | | package com.zy.common.web.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ChangeLocParam { |
| | | /** |
| | | * 移库的库位号 |
| | | */ |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 可用排 |
| | | */ |
| | | private List<Integer> row; |
| | | } |
| New file |
| | |
| | | package com.zy.common.web.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ReportParam { |
| | | |
| | | /** |
| | | * 通知流水号 |
| | | */ |
| | | private int id; |
| | | |
| | | /** |
| | | * 通知类型 |
| | | */ |
| | | private String notifyType; |
| | | |
| | | /** |
| | | * 设备号 |
| | | */ |
| | | private int device; |
| | | |
| | | /** |
| | | * WCS工作号 |
| | | */ |
| | | private String taskNo; |
| | | |
| | | /** |
| | | * 上级系统工作号 |
| | | */ |
| | | private String superTaskNo; |
| | | |
| | | /** |
| | | * 消息类型 |
| | | */ |
| | | private String magType; |
| | | |
| | | /** |
| | | * 消息描述 |
| | | */ |
| | | private String msgDesc; |
| | | |
| | | /** |
| | | * 消息数据 |
| | | */ |
| | | private String data; |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/10/30 |
| | | */ |
| | | @Data |
| | | public class SearchLocParam { |
| | | |
| | | private Integer ioType; |
| | | private List<Integer> row; |
| | | |
| | | private Integer sourceStaNo; |
| | | |
| | |
| | | // 库位规格( 0:未知, 1:低库位, 2:高库位) |
| | | private Short locType1; |
| | | |
| | | /** |
| | | * 空托盘信号 |
| | | */ |
| | | private boolean emptyMk; |
| | | |
| | | /** |
| | | * 满托盘信号 |
| | | */ |
| | | private boolean fullPlt; |
| | | } |
| | |
| | | import com.core.common.R; |
| | | import com.zy.system.entity.license.*; |
| | | import com.zy.system.timer.LicenseTimer; |
| | | import de.schlichtherle.license.LicenseContent; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.MediaType; |
| | |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * |
| | |
| | | |
| | | @Value("${license.licensePath}") |
| | | private String licensePath; |
| | | |
| | | @Autowired |
| | | private LicenseCheckListener licenseCheckListener; |
| | | |
| | | @Autowired |
| | | private LicenseTimer licenseTimer; |
| | | |
| | | /** |
| | | * 获取服务器硬件信息 |
| | | * @param osName 操作系统类型,如果为空则自动判断 |
| | |
| | | if (osName.startsWith("windows")) { |
| | | abstractServerInfos = new WindowsServerInfos(); |
| | | } else if (osName.startsWith("linux")) { |
| | | // abstractServerInfos = new LinuxServerInfos(); |
| | | abstractServerInfos = new LinuxServerInfos(); |
| | | }else{//其他服务器类型 |
| | | abstractServerInfos = new WindowsServerInfos(); |
| | | } |
| | |
| | | return R.error("许可证更新失败"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/activate") |
| | | public R activate() { |
| | | licenseTimer.timer(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.system.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 io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("sys_license_infos") |
| | | public class LicenseInfos implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String license; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String licenseTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | public LicenseInfos() {} |
| | | |
| | | public LicenseInfos(String license,Date createTime) { |
| | | this.license = license; |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | // LicenseInfos licenseInfos = new LicenseInfos( |
| | | // null, // |
| | | // null // |
| | | // ); |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | LicenseCheck result = new LicenseCheck(); |
| | | |
| | | try { |
| | | result.setIpAddress(this.getIpAddress()); |
| | | // result.setIpAddress(this.getIpAddress()); |
| | | result.setMacAddress(this.getMacAddress()); |
| | | result.setCpuSerial(this.getCPUSerial()); |
| | | result.setMainBoardSerial(this.getMainBoardSerial()); |
| | |
| | | |
| | | if(expectedCheckModel != null && serverCheckModel != null){ |
| | | //校验IP地址 |
| | | // if(!checkIpAddress(expectedCheckModel.getIpAddress(),serverCheckModel.getIpAddress())){ |
| | | // throw new LicenseContentException("当前服务器的IP没在授权范围内"); |
| | | // } |
| | | // |
| | | // //校验Mac地址 |
| | | // if(!checkIpAddress(expectedCheckModel.getMacAddress(),serverCheckModel.getMacAddress())){ |
| | | // throw new LicenseContentException("当前服务器的Mac地址没在授权范围内"); |
| | | // } |
| | | // |
| | | // //校验主板序列号 |
| | | // if(!checkSerial(expectedCheckModel.getMainBoardSerial(),serverCheckModel.getMainBoardSerial())){ |
| | | // throw new LicenseContentException("当前服务器的主板序列号没在授权范围内"); |
| | | // } |
| | | // |
| | | // //校验CPU序列号 |
| | | // if(!checkSerial(expectedCheckModel.getCpuSerial(),serverCheckModel.getCpuSerial())){ |
| | | // throw new LicenseContentException("当前服务器的CPU序列号没在授权范围内"); |
| | | // } |
| | | if(!checkIpAddress(expectedCheckModel.getIpAddress(),serverCheckModel.getIpAddress())){ |
| | | throw new LicenseContentException("当前服务器的IP没在授权范围内"); |
| | | } |
| | | |
| | | //校验Mac地址 |
| | | if(!checkIpAddress(expectedCheckModel.getMacAddress(),serverCheckModel.getMacAddress())){ |
| | | throw new LicenseContentException("当前服务器的Mac地址没在授权范围内"); |
| | | } |
| | | |
| | | //校验主板序列号 |
| | | if(!checkSerial(expectedCheckModel.getMainBoardSerial(),serverCheckModel.getMainBoardSerial())){ |
| | | throw new LicenseContentException("当前服务器的主板序列号没在授权范围内"); |
| | | } |
| | | |
| | | //校验CPU序列号 |
| | | if(!checkSerial(expectedCheckModel.getCpuSerial(),serverCheckModel.getCpuSerial())){ |
| | | throw new LicenseContentException("当前服务器的CPU序列号没在授权范围内"); |
| | | } |
| | | }else{ |
| | | throw new LicenseContentException("不能获取服务器硬件信息"); |
| | | } |
| | |
| | | if (osName.startsWith("windows")) { |
| | | abstractServerInfos = new WindowsServerInfos(); |
| | | } else if (osName.startsWith("linux")) { |
| | | // abstractServerInfos = new LinuxServerInfos(); |
| | | abstractServerInfos = new LinuxServerInfos(); |
| | | }else{//其他服务器类型 |
| | | abstractServerInfos = new WindowsServerInfos(); |
| | | } |
| | |
| | | package com.zy.system.entity.license; |
| | | |
| | | import com.core.common.Cools; |
| | | import com.zy.system.entity.LicenseInfos; |
| | | import com.zy.system.service.LicenseInfosService; |
| | | import com.zy.system.timer.LicenseTimer; |
| | | import de.schlichtherle.license.LicenseContent; |
| | | import org.apache.logging.log4j.LogManager; |
| | |
| | | */ |
| | | @Value("${license.publicKeysStorePath}") |
| | | private String publicKeysStorePath; |
| | | |
| | | @Autowired |
| | | private LicenseTimer licenseTimer; |
| | | @Autowired |
| | | private LicenseInfosService licenseInfosService; |
| | | |
| | | @Override |
| | | public void onApplicationEvent(ContextRefreshedEvent event) { |
| | |
| | | logger.info("++++++++ 开始加载许可证 ++++++++"); |
| | | |
| | | try { |
| | | // String publicKeysStoreFileName = this.getClass().getClassLoader().getResource(publicKeysStorePath).getPath(); |
| | | // File publicKeysStoreFile = new File(publicKeysStoreFileName); |
| | | // |
| | | // String licensePathFileName = this.getClass().getClassLoader().getResource(licensePath).getPath(); |
| | | // File licensePathFile = new File(licensePathFileName); |
| | | licenseTimer.getRemoteLicense(); |
| | | } catch (Exception e) { |
| | | } |
| | | |
| | | try { |
| | | LicenseVerifyParam param = new LicenseVerifyParam(); |
| | | param.setSubject(subject); |
| | | param.setPublicAlias(publicAlias); |
| | |
| | | param.setPublicKeysStorePath(publicKeysStorePath); |
| | | |
| | | LicenseVerify licenseVerify = new LicenseVerify(); |
| | | |
| | | LicenseInfos latestLicense = licenseInfosService.getLatestLicense(); |
| | | if (latestLicense == null) { |
| | | logger.info("许可证不存在"); |
| | | return false; |
| | | } |
| | | |
| | | //安装证书 |
| | | LicenseContent install = licenseVerify.install(param); |
| | | LicenseContent install = licenseVerify.install(param, latestLicense.getLicense()); |
| | | |
| | | logger.info("++++++++ 许可证加载结束 ++++++++"); |
| | | |
| | |
| | | |
| | | return install != null; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | import de.schlichtherle.license.*; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | import org.apache.tomcat.util.http.fileupload.IOUtils; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.InputStream; |
| | | import java.io.IOException; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | | import java.text.DateFormat; |
| | | import java.text.MessageFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Base64; |
| | | import java.util.prefs.Preferences; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 安装License证书 |
| | | */ |
| | | public synchronized LicenseContent install(LicenseVerifyParam param){ |
| | | public synchronized LicenseContent install(LicenseVerifyParam param, String license) { |
| | | LicenseContent result = null; |
| | | DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | //1. 安装证书 |
| | | try{ |
| | | LicenseManager licenseManager = LicenseManagerHolder.getInstance(initLicenseParam(param)); |
| | | try { |
| | | LicenseParam licenseParam = initLicenseParam(param); |
| | | LicenseManager licenseManager = LicenseManagerHolder.getInstance(licenseParam); |
| | | licenseManager.uninstall(); |
| | | |
| | | InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(param.getLicensePath()); |
| | | File file = new File(param.getLicensePath()); |
| | | try (FileOutputStream out = new FileOutputStream(file)) { |
| | | IOUtils.copy(inputStream, out); |
| | | } |
| | | |
| | | result = licenseManager.install(new File(param.getLicensePath())); |
| | | logger.info(MessageFormat.format("许可证加载成功,许可证有效期:{0} - {1}",format.format(result.getNotBefore()),format.format(result.getNotAfter()))); |
| | | }catch (Exception e){ |
| | | logger.error("许可证加载失败!",e); |
| | | File tempFileFromBase64 = createTempFileFromBase64(license); |
| | | result = licenseManager.install(tempFileFromBase64); |
| | | logger.info(MessageFormat.format("许可证加载成功,许可证有效期:{0} - {1}", format.format(result.getNotBefore()), format.format(result.getNotAfter()))); |
| | | } catch (Exception e) { |
| | | logger.error("许可证加载失败!", e); |
| | | } |
| | | |
| | | return result; |
| | |
| | | try { |
| | | LicenseManager licenseManager = LicenseManagerHolder.getInstance(null); |
| | | DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | if (!updateSystemTime()) { |
| | | //时间更新失败,系统时间被更改 |
| | | return false; |
| | | } |
| | | |
| | | LicenseContent licenseContent = licenseManager.verify(); |
| | | logger.info(MessageFormat.format("许可证校验通过,许可证有效期:{0} - {1}",format.format(licenseContent.getNotBefore()),format.format(licenseContent.getNotAfter()))); |
| | |
| | | */ |
| | | public LicenseContent getVerifyInfo(){ |
| | | LicenseManager licenseManager = LicenseManagerHolder.getInstance(null); |
| | | |
| | | if (!updateSystemTime()) { |
| | | //时间更新失败,系统时间被更改 |
| | | return null; |
| | | } |
| | | |
| | | //校验证书 |
| | | try { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 更新时间到注册表中 |
| | | * 将Base64字符串转换为临时文件 |
| | | * @param base64String Base64编码的字符串 |
| | | * @param filePrefix 文件名前缀(例如 "license_") |
| | | * @param fileSuffix 文件后缀(例如 ".lic") |
| | | * @return 生成的临时File对象(自动在JVM退出时删除) |
| | | * @throws IOException |
| | | */ |
| | | private boolean updateSystemTime() { |
| | | // 获取用户根节点 |
| | | Preferences userRoot = Preferences.userRoot(); |
| | | // 获取指定路径下的节点 |
| | | Preferences node = userRoot.node("/zhongyang"); |
| | | String key = "time"; |
| | | // 读取注册表 |
| | | String value = node.get(key, null); |
| | | if (value != null) { |
| | | long originTime = Long.parseLong(value); |
| | | long now = System.currentTimeMillis(); |
| | | long diff = now - originTime;//现在时间 - 源时间 = 时间差 |
| | | if (diff > 0) { |
| | | //时间差大于0才允许更新注册表时间 |
| | | node.put(key, String.valueOf(System.currentTimeMillis())); |
| | | return true; |
| | | } |
| | | }else { |
| | | // 写入注册表 |
| | | node.put(key, String.valueOf(System.currentTimeMillis())); |
| | | return true; |
| | | } |
| | | return false; |
| | | public File base64ToTempFile(String base64String, String filePrefix, String fileSuffix) |
| | | throws IOException { |
| | | // 解码Base64 |
| | | byte[] decodedBytes = Base64.getDecoder().decode(base64String); |
| | | // 创建临时文件 |
| | | Path tempPath = Files.createTempFile(filePrefix, fileSuffix); |
| | | // 写入内容 |
| | | Files.write(tempPath, decodedBytes); |
| | | // 设置JVM退出时自动删除 |
| | | tempPath.toFile().deleteOnExit(); |
| | | return tempPath.toFile(); |
| | | } |
| | | |
| | | public File createTempFileFromBase64(String base64Data) throws IOException { |
| | | return base64ToTempFile(base64Data, "temp_license_", ".bin"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.system.entity.license; |
| | | |
| | | import com.core.common.Cools; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.InputStreamReader; |
| | | import java.net.InetAddress; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 用于获取客户Linux服务器的基本信息 |
| | | */ |
| | | public class LinuxServerInfos extends AbstractServerInfos { |
| | | |
| | | @Override |
| | | protected List<String> getIpAddress() throws Exception { |
| | | List<String> result = null; |
| | | |
| | | //获取所有网络接口 |
| | | List<InetAddress> inetAddresses = getLocalAllInetAddress(); |
| | | |
| | | if (inetAddresses != null && inetAddresses.size() > 0) { |
| | | result = inetAddresses.stream().map(InetAddress::getHostAddress).distinct().map(String::toLowerCase).collect(Collectors.toList()); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | protected List<String> getMacAddress() throws Exception { |
| | | List<String> result = null; |
| | | |
| | | //1. 获取所有网络接口 |
| | | List<InetAddress> inetAddresses = getLocalAllInetAddress(); |
| | | |
| | | if (inetAddresses != null && inetAddresses.size() > 0) { |
| | | //2. 获取所有网络接口的Mac地址 |
| | | result = inetAddresses.stream().map(this::getMacByInetAddress).distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | protected String getCPUSerial() throws Exception { |
| | | //序列号 |
| | | String serialNumber = ""; |
| | | |
| | | //使用dmidecode命令获取CPU序列号 |
| | | String[] shell = {"/bin/bash", "-c", "dmidecode -t processor | grep 'ID' | awk -F ':' '{print $2}' | head -n 1"}; |
| | | Process process = Runtime.getRuntime().exec(shell); |
| | | process.getOutputStream().close(); |
| | | |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); |
| | | |
| | | if (null == reader.readLine()) { |
| | | return serialNumber; |
| | | } |
| | | String line = reader.readLine().trim(); |
| | | if (!Cools.isEmpty(line)) { |
| | | serialNumber = line; |
| | | } |
| | | |
| | | reader.close(); |
| | | return serialNumber; |
| | | } |
| | | |
| | | @Override |
| | | protected String getMainBoardSerial() throws Exception { |
| | | //序列号 |
| | | String serialNumber = ""; |
| | | |
| | | //使用dmidecode命令获取主板序列号 |
| | | String[] shell = {"/bin/bash", "-c", "dmidecode | grep 'Serial Number' | awk -F ':' '{print $2}' | head -n 1"}; |
| | | Process process = Runtime.getRuntime().exec(shell); |
| | | process.getOutputStream().close(); |
| | | |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); |
| | | if (null == reader.readLine()) { |
| | | return serialNumber; |
| | | } |
| | | String line = reader.readLine().trim(); |
| | | if (!Cools.isEmpty(line)) { |
| | | serialNumber = line; |
| | | } |
| | | |
| | | reader.close(); |
| | | return serialNumber; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.system.mapper; |
| | | |
| | | import com.zy.system.entity.LicenseInfos; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface LicenseInfosMapper extends BaseMapper<LicenseInfos> { |
| | | |
| | | LicenseInfos getLatestLicense(); |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.system.service; |
| | | |
| | | import com.zy.system.entity.LicenseInfos; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface LicenseInfosService extends IService<LicenseInfos> { |
| | | |
| | | LicenseInfos getLatestLicense(); |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.zy.system.mapper.LicenseInfosMapper; |
| | | import com.zy.system.entity.LicenseInfos; |
| | | import com.zy.system.service.LicenseInfosService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("licenseInfosService") |
| | | public class LicenseInfosServiceImpl extends ServiceImpl<LicenseInfosMapper, LicenseInfos> implements LicenseInfosService { |
| | | |
| | | @Override |
| | | public LicenseInfos getLatestLicense() { |
| | | return this.baseMapper.getLatestLicense(); |
| | | } |
| | | } |
| | |
| | | package com.zy.system.timer; |
| | | |
| | | import com.zy.system.entity.license.LicenseVerify; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.Cools; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.system.entity.LicenseInfos; |
| | | import com.zy.system.entity.license.*; |
| | | import com.zy.system.service.LicenseInfosService; |
| | | import de.schlichtherle.license.LicenseContent; |
| | | 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.util.Date; |
| | | import java.util.HashMap; |
| | | |
| | | @Component |
| | | public class LicenseTimer { |
| | |
| | | |
| | | private static int LICENSE_DAYS = 0;//许可证天数 |
| | | |
| | | /** |
| | | * 证书subject |
| | | */ |
| | | @Value("${license.subject}") |
| | | private String subject; |
| | | |
| | | /** |
| | | * 公钥别称 |
| | | */ |
| | | @Value("${license.publicAlias}") |
| | | private String publicAlias; |
| | | |
| | | /** |
| | | * 访问公钥库的密码 |
| | | */ |
| | | @Value("${license.storePass}") |
| | | private String storePass; |
| | | |
| | | /** |
| | | * 证书生成路径 |
| | | */ |
| | | @Value("${license.licensePath}") |
| | | private String licensePath; |
| | | |
| | | /** |
| | | * 密钥库存储路径 |
| | | */ |
| | | @Value("${license.publicKeysStorePath}") |
| | | private String publicKeysStorePath; |
| | | |
| | | @Autowired |
| | | private LicenseInfosService licenseInfosService; |
| | | |
| | | //每天晚上11点更新系统激活状态 |
| | | @Scheduled(cron = "0 0 23 * * ? ") |
| | | public void timer() { |
| | | // System.out.println(SYSTEM_SUPPORT); |
| | | try { |
| | | getRemoteLicense(); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | |
| | | try { |
| | | verify(); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } |
| | | |
| | | public void getRemoteLicense() { |
| | | try { |
| | | AbstractServerInfos abstractServerInfos = null; |
| | | String osName = System.getProperty("os.name"); |
| | | //根据不同操作系统类型选择不同的数据获取方法 |
| | | if (osName.startsWith("windows")) { |
| | | abstractServerInfos = new WindowsServerInfos(); |
| | | } else if (osName.startsWith("linux")) { |
| | | abstractServerInfos = new LinuxServerInfos(); |
| | | }else{//其他服务器类型 |
| | | abstractServerInfos = new WindowsServerInfos(); |
| | | } |
| | | LicenseCheck serverInfos = abstractServerInfos.getServerInfos(); |
| | | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("subject", subject); |
| | | map.put("licenseCheck", serverInfos); |
| | | |
| | | String response = new HttpHandler.Builder() |
| | | .setUri("http://net.zoneyung.net:9999/license") |
| | | .setPath("/remoteQueryLicense") |
| | | .setJson(JSON.toJSONString(map)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getString("result").equals("ok")) { |
| | | LicenseInfos licenseInfos = new LicenseInfos(); |
| | | licenseInfos.setLicense(jsonObject.getString("data")); |
| | | licenseInfos.setCreateTime(new Date()); |
| | | licenseInfos.setLicenseTime(jsonObject.getString("licenseTime")); |
| | | licenseInfosService.insert(licenseInfos); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public void verify() { |
| | | LicenseInfos latestLicense = licenseInfosService.getLatestLicense(); |
| | | if (latestLicense == null) { |
| | | setLicenseDays(0); |
| | | setSystemSupport(false); |
| | | return; |
| | | } |
| | | |
| | | LicenseVerifyParam param = new LicenseVerifyParam(); |
| | | param.setSubject(subject); |
| | | param.setPublicAlias(publicAlias); |
| | | param.setStorePass(storePass); |
| | | param.setLicensePath(licensePath); |
| | | param.setPublicKeysStorePath(publicKeysStorePath); |
| | | |
| | | //验证许可证是否有效 |
| | | LicenseVerify licenseVerify = new LicenseVerify(); |
| | | boolean verify = licenseVerify.verify(); |
| | | setSystemSupport(verify);//更新系统激活状态 |
| | | //安装证书 |
| | | LicenseContent install = licenseVerify.install(param, latestLicense.getLicense()); |
| | | |
| | | if (install != null) { |
| | | Date start = new Date(); |
| | | Date end = install.getNotAfter(); |
| | | Long starTime = start.getTime(); |
| | | Long endTime = end.getTime(); |
| | | long num = endTime - starTime;//时间戳相差的毫秒数 |
| | | int day = (int) (num / 24 / 60 / 60 / 1000); |
| | | setLicenseDays(day); |
| | | setSystemSupport(true); |
| | | }else { |
| | | setLicenseDays(0); |
| | | setSystemSupport(false); |
| | | } |
| | | } |
| | | |
| | | public boolean getSystemSupport() { |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=jxgtasrs |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=jshdasrs |
| | | username: sa |
| | | password: sa@123 |
| | | mvc: |
| | |
| | | |
| | | #License相关配置 |
| | | license: |
| | | subject: jxgtwms |
| | | subject: hnfnwms |
| | | publicAlias: publicCert |
| | | storePass: public_zhongyang_123456789 |
| | | licensePath: license.lic |
| | |
| | | # 双深 |
| | | doubleDeep: true |
| | | # 双深库位排号 |
| | | doubleLocs: 1,4,5,8 |
| | | doubleLocs: 3,4,5,6 |
| | | # 一个堆垛机负责的货架排数 |
| | | groupCount: 4 |
| | | # 左深库位排号 |
| | | doubleLocsLeft: 1,5,9,13 |
| | | doubleLocsLeft: 3 |
| | | # 右深库位排号 |
| | | doubleLocsRight: 4,8,12,16 |
| | | doubleLocsRight: 6 |
| | | # wms参数配置 |
| | | wms-parameter: |
| | | # 自动补空板功能开关 |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.BasRgvErrorLogMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasRgvErrorLog"> |
| | | <result column="rgv_no" property="rgvNo" /> |
| | | <result column="emergency_stop" property="emergencyStop" /> |
| | | <result column="slot_1_empty_no_data" property="slot1EmptyNoData" /> |
| | | <result column="slot_2_empty_no_data" property="slot2EmptyNoData" /> |
| | | <result column="command_error_chain_conflict" property="commandErrorChainConflict" /> |
| | | <result column="target_position_issue" property="targetPositionIssue" /> |
| | | <result column="travel_inverter_error" property="travelInverterError" /> |
| | | <result column="photoelectric_1_error" property="photoelectric1Error" /> |
| | | <result column="photoelectric_2_error" property="photoelectric2Error" /> |
| | | <result column="timeout_connection_with_line" property="timeoutConnectionWithLine" /> |
| | | <result column="left_roller_timeout" property="leftRollerTimeout" /> |
| | | <result column="right_roller_timeout" property="rightRollerTimeout" /> |
| | | <result column="rgv_run_timeout" property="rgvRunTimeout" /> |
| | | <result column="position_1_chain_inverter_error" property="position1ChainInverterError" /> |
| | | <result column="position_2_chain_inverter_error" property="position2ChainInverterError" /> |
| | | <result column="front_rear_limit" property="frontRearLimit" /> |
| | | <result column="emergency_button" property="emergencyButton" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="forward_button" property="forwardButton" /> |
| | | <result column="reverse_button" property="reverseButton" /> |
| | | <result column="local_remote" property="localRemote" /> |
| | | <result column="id" property="id" /> |
| | | <result column="reset" property="reset" /> |
| | | <result column="travel_brake_switch" property="travelBrakeSwitch" /> |
| | | <result column="travel_speed_limit_photoelectric" property="travelSpeedLimitPhotoelectric" /> |
| | | <result column="left_overlimit_1" property="leftOverlimit1" /> |
| | | <result column="right_overlimit_1" property="rightOverlimit1" /> |
| | | <result column="left_at_position_1" property="leftAtPosition1" /> |
| | | <result column="right_at_position_1" property="rightAtPosition1" /> |
| | | <result column="chain_forward_1" property="chainForward1" /> |
| | | <result column="chain_reverse_1" property="chainReverse1" /> |
| | | <result column="inverter_alarm" property="inverterAlarm" /> |
| | | <result column="left_overlimit_2" property="leftOverlimit2" /> |
| | | <result column="right_overlimit_2" property="rightOverlimit2" /> |
| | | <result column="left_at_position_2" property="leftAtPosition2" /> |
| | | <result column="right_at_position_2" property="rightAtPosition2" /> |
| | | <result column="cargo_speed_reduction" property="cargoSpeedReduction" /> |
| | | <result column="conveyor_inverter_alarm_2" property="conveyorInverterAlarm2" /> |
| | | <result column="left_conveyor_2" property="leftConveyor2" /> |
| | | <result column="right_conveyor_2" property="rightConveyor2" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.BasRgvMapMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasRgvMap"> |
| | | <result column="rgv_no" property="rgvNo" /> |
| | | <result column="start_route" property="startRoute" /> |
| | | <result column="end_route" property="endRoute" /> |
| | | <result column="now_route" property="nowRoute" /> |
| | | <result column="rgv_status" property="rgvStatus" /> |
| | | <result column="lock_start_route" property="lockStartRoute" /> |
| | | <result column="lock_end_route" property="lockEndRoute" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.BasRgvMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasRgv"> |
| | | <result column="rgv_no" property="rgvNo" /> |
| | | <result column="in_enable" property="inEnable" /> |
| | | <result column="out_enable" property="outEnable" /> |
| | | <result column="rgv_sts" property="rgvSts" /> |
| | | <result column="wrk_no1" property="wrkNo1" /> |
| | | <result column="wrk_no2" property="wrkNo2" /> |
| | | <result column="rgv_err" property="rgvErr" /> |
| | | <result column="pak_mk" property="pakMk" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="loaded2" property="loaded2" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.BasRgvOptMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasRgvOpt"> |
| | | <result column="wrk_no1" property="wrkNo1" /> |
| | | <result column="wrk_no2" property="wrkNo2" /> |
| | | <result column="rgv_no" property="rgvNo" /> |
| | | <result column="send_time" property="sendTime" /> |
| | | <result column="mode" property="mode" /> |
| | | <result column="source_row" property="sourceRow" /> |
| | | <result column="source_bay" property="sourceBay" /> |
| | | <result column="source_lev" property="sourceLev" /> |
| | | <result column="source_sta" property="sourceSta" /> |
| | | <result column="pos_row" property="posRow" /> |
| | | <result column="pos_bay" property="posBay" /> |
| | | <result column="pos_lev" property="posLev" /> |
| | | <result column="pos_sta" property="posSta" /> |
| | | <result column="response" property="response" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="id" property="id" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.BasRgvPathMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasRgvPath"> |
| | | <result column="rgv_no" property="rgvNo" /> |
| | | <result column="path" property="path" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="memo" property="memo" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.system.mapper.LicenseInfosMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.system.entity.LicenseInfos"> |
| | | <id column="id" property="id" /> |
| | | <result column="license" property="license" /> |
| | | <result column="license_time" property="licenseTime" /> |
| | | <result column="create_time" property="createTime" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="getLatestLicense" resultMap="BaseResultMap"> |
| | | select top 1 * from sys_license_infos order by create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </choose> |
| | | </sql> |
| | | |
| | | <select id="queryStock1" resultMap="BaseResultMap"> |
| | | select a.* |
| | | from asr_loc_detl a |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' |
| | | and a.matnr = #{matnr} |
| | | <!-- <choose>--> |
| | | <!-- <when test="batch != null and batch != ''">--> |
| | | <!-- and a.batch = #{batch}--> |
| | | <!-- </when>--> |
| | | <!-- <otherwise>--> |
| | | <!-- and (a.batch IS NULL OR a.batch = '')--> |
| | | <!-- </otherwise>--> |
| | | <!-- </choose>--> |
| | | <if test="batch != null and batch != ''"> |
| | | and a.batch = #{batch} |
| | | </if> |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | and a.order_no = #{orderNo} |
| | | </if> |
| | | |
| | | <if test="locNos != null and locNos.size > 0"> |
| | | and b.loc_no not in |
| | | <foreach item="item" collection="locNos" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | order by |
| | | DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme |
| | | desc, |
| | | NEWID(), |
| | | case |
| | | when (left(a.loc_no, 2) = '01') then 0 |
| | | when (left(a.loc_no, 2) = '02') then 1 |
| | | when (left(a.loc_no, 2) = '03') then 1 |
| | | when (left(a.loc_no, 2) = '04') then 0 |
| | | when (left(a.loc_no, 2) = '05') then 0 |
| | | when (left(a.loc_no, 2) = '06') then 1 |
| | | when (left(a.loc_no, 2) = '07') then 1 |
| | | when (left(a.loc_no, 2) = '08') then 0 |
| | | when (left(a.loc_no, 2) = '09') then 0 |
| | | when (left(a.loc_no, 2) = '10') then 1 |
| | | when (left(a.loc_no, 2) = '11') then 1 |
| | | when (left(a.loc_no, 2) = '12') then 0 |
| | | when (left(a.loc_no, 2) = '13') then 0 |
| | | when (left(a.loc_no, 2) = '14') then 1 |
| | | when (left(a.loc_no, 2) = '15') then 1 |
| | | when (left(a.loc_no, 2) = '16') then 0 |
| | | when (left(a.loc_no, 2) = '17') then 0 |
| | | when (left(a.loc_no, 2) = '18') then 1 |
| | | when (left(a.loc_no, 2) = '19') then 1 |
| | | when (left(a.loc_no, 2) = '20') then 0 |
| | | when (left(a.loc_no, 2) = '21') then 0 |
| | | when (left(a.loc_no, 2) = '22') then 1 |
| | | when (left(a.loc_no, 2) = '23') then 1 |
| | | when (left(a.loc_no, 2) = '24') then 0 |
| | | when (left(a.loc_no, 2) = '25') then 0 |
| | | when (left(a.loc_no, 2) = '26') then 1 |
| | | when (left(a.loc_no, 2) = '27') then 1 |
| | | when (left(a.loc_no, 2) = '28') then 0 |
| | | when (left(a.loc_no, 2) = '29') then 0 |
| | | when (left(a.loc_no, 2) = '30') then 1 |
| | | when (left(a.loc_no, 2) = '31') then 1 |
| | | when (left(a.loc_no, 2) = '32') then 0 |
| | | when (left(a.loc_no, 2) = '33') then 0 |
| | | when (left(a.loc_no, 2) = '34') then 1 |
| | | when (left(a.loc_no, 2) = '35') then 1 |
| | | when (left(a.loc_no, 2) = '36') then 0 |
| | | when (left(a.loc_no, 2) = '37') then 0 |
| | | when (left(a.loc_no, 2) = '38') then 1 |
| | | when (left(a.loc_no, 2) = '39') then 1 |
| | | when (left(a.loc_no, 2) = '40') then 0 |
| | | when (left(a.loc_no, 2) = '41') then 0 |
| | | when (left(a.loc_no, 2) = '42') then 1 |
| | | when (left(a.loc_no, 2) = '43') then 1 |
| | | when (left(a.loc_no, 2) = '44') then 0 |
| | | when (left(a.loc_no, 2) = '45') then 0 |
| | | when (left(a.loc_no, 2) = '46') then 1 |
| | | when (left(a.loc_no, 2) = '47') then 1 |
| | | when (left(a.loc_no, 2) = '48') then 0 |
| | | else 0 |
| | | end |
| | | desc |
| | | </select> |
| | | |
| | | <select id="selectItem" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from asr_loc_detl |
| | |
| | | order by row1 |
| | | </select> |
| | | |
| | | <select id="queryStockAll" resultMap="BaseResultMap"> |
| | | select a.* |
| | | from asr_loc_detl a |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' |
| | | and a.matnr = #{matnr} |
| | | <!-- <choose>--> |
| | | <!-- <when test="batch != null and batch != ''">--> |
| | | <!-- and a.batch = #{batch}--> |
| | | <!-- </when>--> |
| | | <!-- <otherwise>--> |
| | | <!-- and (a.batch IS NULL OR a.batch = '')--> |
| | | <!-- </otherwise>--> |
| | | <!-- </choose>--> |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | and a.order_no = #{orderNo} |
| | | </if> |
| | | |
| | | <include refid="batchSeqA"></include> |
| | | |
| | | |
| | | <if test="locNos != null and locNos.size > 0"> |
| | | and b.loc_no not in |
| | | <foreach item="item" collection="locNos" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | order by |
| | | DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme |
| | | desc, |
| | | NEWID(), |
| | | case |
| | | when (left(a.loc_no, 2) = '01') then 0 |
| | | when (left(a.loc_no, 2) = '02') then 1 |
| | | when (left(a.loc_no, 2) = '03') then 1 |
| | | when (left(a.loc_no, 2) = '04') then 0 |
| | | when (left(a.loc_no, 2) = '05') then 0 |
| | | when (left(a.loc_no, 2) = '06') then 1 |
| | | when (left(a.loc_no, 2) = '07') then 1 |
| | | when (left(a.loc_no, 2) = '08') then 0 |
| | | when (left(a.loc_no, 2) = '09') then 0 |
| | | when (left(a.loc_no, 2) = '10') then 1 |
| | | when (left(a.loc_no, 2) = '11') then 1 |
| | | when (left(a.loc_no, 2) = '12') then 0 |
| | | when (left(a.loc_no, 2) = '13') then 0 |
| | | when (left(a.loc_no, 2) = '14') then 1 |
| | | when (left(a.loc_no, 2) = '15') then 1 |
| | | when (left(a.loc_no, 2) = '16') then 0 |
| | | when (left(a.loc_no, 2) = '17') then 0 |
| | | when (left(a.loc_no, 2) = '18') then 1 |
| | | when (left(a.loc_no, 2) = '19') then 1 |
| | | when (left(a.loc_no, 2) = '20') then 0 |
| | | when (left(a.loc_no, 2) = '21') then 0 |
| | | when (left(a.loc_no, 2) = '22') then 1 |
| | | when (left(a.loc_no, 2) = '23') then 1 |
| | | when (left(a.loc_no, 2) = '24') then 0 |
| | | when (left(a.loc_no, 2) = '25') then 0 |
| | | when (left(a.loc_no, 2) = '26') then 1 |
| | | when (left(a.loc_no, 2) = '27') then 1 |
| | | when (left(a.loc_no, 2) = '28') then 0 |
| | | when (left(a.loc_no, 2) = '29') then 0 |
| | | when (left(a.loc_no, 2) = '30') then 1 |
| | | when (left(a.loc_no, 2) = '31') then 1 |
| | | when (left(a.loc_no, 2) = '32') then 0 |
| | | when (left(a.loc_no, 2) = '33') then 0 |
| | | when (left(a.loc_no, 2) = '34') then 1 |
| | | when (left(a.loc_no, 2) = '35') then 1 |
| | | when (left(a.loc_no, 2) = '36') then 0 |
| | | when (left(a.loc_no, 2) = '37') then 0 |
| | | when (left(a.loc_no, 2) = '38') then 1 |
| | | when (left(a.loc_no, 2) = '39') then 1 |
| | | when (left(a.loc_no, 2) = '40') then 0 |
| | | when (left(a.loc_no, 2) = '41') then 0 |
| | | when (left(a.loc_no, 2) = '42') then 1 |
| | | when (left(a.loc_no, 2) = '43') then 1 |
| | | when (left(a.loc_no, 2) = '44') then 0 |
| | | when (left(a.loc_no, 2) = '45') then 0 |
| | | when (left(a.loc_no, 2) = '46') then 1 |
| | | when (left(a.loc_no, 2) = '47') then 1 |
| | | when (left(a.loc_no, 2) = '48') then 0 |
| | | else 0 |
| | | end |
| | | desc |
| | | </select> |
| | | |
| | | <select id="queryStockMatnr" resultMap="BaseResultMap"> |
| | | select a.* |
| | | from asr_loc_detl a |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' |
| | | and a.matnr = #{matnr} |
| | | order by |
| | | DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme |
| | | desc, |
| | | NEWID(), |
| | | case |
| | | when (left(a.loc_no, 2) = '01') then 0 |
| | | when (left(a.loc_no, 2) = '02') then 1 |
| | | when (left(a.loc_no, 2) = '03') then 1 |
| | | when (left(a.loc_no, 2) = '04') then 0 |
| | | when (left(a.loc_no, 2) = '05') then 0 |
| | | when (left(a.loc_no, 2) = '06') then 1 |
| | | when (left(a.loc_no, 2) = '07') then 1 |
| | | when (left(a.loc_no, 2) = '08') then 0 |
| | | when (left(a.loc_no, 2) = '09') then 0 |
| | | when (left(a.loc_no, 2) = '10') then 1 |
| | | when (left(a.loc_no, 2) = '11') then 1 |
| | | when (left(a.loc_no, 2) = '12') then 0 |
| | | when (left(a.loc_no, 2) = '13') then 0 |
| | | when (left(a.loc_no, 2) = '14') then 1 |
| | | when (left(a.loc_no, 2) = '15') then 1 |
| | | when (left(a.loc_no, 2) = '16') then 0 |
| | | when (left(a.loc_no, 2) = '17') then 0 |
| | | when (left(a.loc_no, 2) = '18') then 1 |
| | | when (left(a.loc_no, 2) = '19') then 1 |
| | | when (left(a.loc_no, 2) = '20') then 0 |
| | | when (left(a.loc_no, 2) = '21') then 0 |
| | | when (left(a.loc_no, 2) = '22') then 1 |
| | | when (left(a.loc_no, 2) = '23') then 1 |
| | | when (left(a.loc_no, 2) = '24') then 0 |
| | | when (left(a.loc_no, 2) = '25') then 0 |
| | | when (left(a.loc_no, 2) = '26') then 1 |
| | | when (left(a.loc_no, 2) = '27') then 1 |
| | | when (left(a.loc_no, 2) = '28') then 0 |
| | | when (left(a.loc_no, 2) = '29') then 0 |
| | | when (left(a.loc_no, 2) = '30') then 1 |
| | | when (left(a.loc_no, 2) = '31') then 1 |
| | | when (left(a.loc_no, 2) = '32') then 0 |
| | | when (left(a.loc_no, 2) = '33') then 0 |
| | | when (left(a.loc_no, 2) = '34') then 1 |
| | | when (left(a.loc_no, 2) = '35') then 1 |
| | | when (left(a.loc_no, 2) = '36') then 0 |
| | | when (left(a.loc_no, 2) = '37') then 0 |
| | | when (left(a.loc_no, 2) = '38') then 1 |
| | | when (left(a.loc_no, 2) = '39') then 1 |
| | | when (left(a.loc_no, 2) = '40') then 0 |
| | | when (left(a.loc_no, 2) = '41') then 0 |
| | | when (left(a.loc_no, 2) = '42') then 1 |
| | | when (left(a.loc_no, 2) = '43') then 1 |
| | | when (left(a.loc_no, 2) = '44') then 0 |
| | | when (left(a.loc_no, 2) = '45') then 0 |
| | | when (left(a.loc_no, 2) = '46') then 1 |
| | | when (left(a.loc_no, 2) = '47') then 1 |
| | | when (left(a.loc_no, 2) = '48') then 0 |
| | | else 0 |
| | | end |
| | | desc |
| | | </select> |
| | | |
| | | <select id="queryStockAll123" resultMap="BaseResultMap"> |
| | | select a.* |
| | | from asr_loc_detl a |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' |
| | | and a.matnr = #{matnr} |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | and a.order_no = #{orderNo} |
| | | </if> |
| | | |
| | | <include refid="batchSeq123"></include> |
| | | |
| | | |
| | | <if test="locNos != null and locNos.size > 0"> |
| | | and b.loc_no not in |
| | | <foreach item="item" collection="locNos" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | order by |
| | | DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time), a.anfme |
| | | desc, |
| | | NEWID(), |
| | | case |
| | | when (left(a.loc_no, 2) = '01') then 0 |
| | | when (left(a.loc_no, 2) = '02') then 1 |
| | | when (left(a.loc_no, 2) = '03') then 1 |
| | | when (left(a.loc_no, 2) = '04') then 0 |
| | | when (left(a.loc_no, 2) = '05') then 0 |
| | | when (left(a.loc_no, 2) = '06') then 1 |
| | | when (left(a.loc_no, 2) = '07') then 1 |
| | | when (left(a.loc_no, 2) = '08') then 0 |
| | | when (left(a.loc_no, 2) = '09') then 0 |
| | | when (left(a.loc_no, 2) = '10') then 1 |
| | | when (left(a.loc_no, 2) = '11') then 1 |
| | | when (left(a.loc_no, 2) = '12') then 0 |
| | | when (left(a.loc_no, 2) = '13') then 0 |
| | | when (left(a.loc_no, 2) = '14') then 1 |
| | | when (left(a.loc_no, 2) = '15') then 1 |
| | | when (left(a.loc_no, 2) = '16') then 0 |
| | | when (left(a.loc_no, 2) = '17') then 0 |
| | | when (left(a.loc_no, 2) = '18') then 1 |
| | | when (left(a.loc_no, 2) = '19') then 1 |
| | | when (left(a.loc_no, 2) = '20') then 0 |
| | | when (left(a.loc_no, 2) = '21') then 0 |
| | | when (left(a.loc_no, 2) = '22') then 1 |
| | | when (left(a.loc_no, 2) = '23') then 1 |
| | | when (left(a.loc_no, 2) = '24') then 0 |
| | | when (left(a.loc_no, 2) = '25') then 0 |
| | | when (left(a.loc_no, 2) = '26') then 1 |
| | | when (left(a.loc_no, 2) = '27') then 1 |
| | | when (left(a.loc_no, 2) = '28') then 0 |
| | | when (left(a.loc_no, 2) = '29') then 0 |
| | | when (left(a.loc_no, 2) = '30') then 1 |
| | | when (left(a.loc_no, 2) = '31') then 1 |
| | | when (left(a.loc_no, 2) = '32') then 0 |
| | | when (left(a.loc_no, 2) = '33') then 0 |
| | | when (left(a.loc_no, 2) = '34') then 1 |
| | | when (left(a.loc_no, 2) = '35') then 1 |
| | | when (left(a.loc_no, 2) = '36') then 0 |
| | | when (left(a.loc_no, 2) = '37') then 0 |
| | | when (left(a.loc_no, 2) = '38') then 1 |
| | | when (left(a.loc_no, 2) = '39') then 1 |
| | | when (left(a.loc_no, 2) = '40') then 0 |
| | | when (left(a.loc_no, 2) = '41') then 0 |
| | | when (left(a.loc_no, 2) = '42') then 1 |
| | | when (left(a.loc_no, 2) = '43') then 1 |
| | | when (left(a.loc_no, 2) = '44') then 0 |
| | | when (left(a.loc_no, 2) = '45') then 0 |
| | | when (left(a.loc_no, 2) = '46') then 1 |
| | | when (left(a.loc_no, 2) = '47') then 1 |
| | | when (left(a.loc_no, 2) = '48') then 0 |
| | | else 0 |
| | | end |
| | | desc |
| | | </select> |
| | | |
| | | <sql id="batchSeqA"> |
| | | <choose> |
| | | <when test="batch != null and batch != ''"> |
| | | and a.batch = #{batch} |
| | | </when> |
| | | <otherwise> |
| | | and (a.batch IS NULL OR a.batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="brand != null and brand != ''"> |
| | | and a.brand = #{brand} |
| | | </when> |
| | | <otherwise> |
| | | and (a.brand IS NULL OR a.brand = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="standby1 != null and standby1 != ''"> |
| | | and a.standby1 = #{standby1} |
| | | </when> |
| | | <otherwise> |
| | | and (a.standby1 IS NULL OR a.standby1 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="standby2 != null and standby2 != ''"> |
| | | and a.standby2 = #{standby2} |
| | | </when> |
| | | <otherwise> |
| | | and (a.standby2 IS NULL OR a.standby2 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="standby3 != null and standby3 != ''"> |
| | | and a.standby3 = #{standby3} |
| | | </when> |
| | | <otherwise> |
| | | and (a.standby3 IS NULL OR a.standby3 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="boxType1 != null and boxType1 != ''"> |
| | | and a.box_type1 = #{boxType1} |
| | | </when> |
| | | <otherwise> |
| | | and (a.box_type1 IS NULL OR a.box_type1 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="boxType2 != null and boxType2 != ''"> |
| | | and a.box_type2 = #{boxType2} |
| | | </when> |
| | | <otherwise> |
| | | and (a.box_type2 IS NULL OR a.box_type2 = '') |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="boxType3 != null and boxType3 != ''"> |
| | | and a.box_type3 = #{boxType3} |
| | | </when> |
| | | <otherwise> |
| | | and (a.box_type3 IS NULL OR a.box_type3 = '') |
| | | </otherwise> |
| | | </choose> |
| | | </sql> |
| | | |
| | | <sql id="batchSeq123"> |
| | | <choose> |
| | | <when test="boxType3 != null and boxType3 != ''"> |
| | | and a.box_type3 = #{boxType3} |
| | | </when> |
| | | <otherwise> |
| | | and (a.box_type3 IS NULL OR a.box_type3 = '') |
| | | </otherwise> |
| | | </choose> |
| | | </sql> |
| | | |
| | | <select id="queryStockMinAnfme" resultMap="BaseResultMap"> |
| | | select a.* |
| | | from asr_loc_detl a |
| | |
| | | desc |
| | | </select> |
| | | |
| | | <select id="inventory" resultType="java.util.Map"> |
| | | select |
| | | ld.loc_no as locId, |
| | | ld.zpallet as palletId, |
| | | ld.matne as matNr, |
| | | coalesce(m.maktx, ld.maktx) as makTx, |
| | | cast(round(ld.anfme, 4) as decimal(18, 4)) as anfme, |
| | | coalesce(m.unit, ld.unit) as unit, |
| | | 1 as status, |
| | | isnull(ld.batch, '') as batch |
| | | from asr_loc_detl as ld |
| | | left join asr_loc_mast as lm on ld.loc_no = lm.loc_no |
| | | left join man_mat as m on ld.matnr = m.matnr |
| | | where 1 = 1 |
| | | and lm.loc_sts = 'F' |
| | | <if test="locId != null and locId != ''"> |
| | | and ld.loc_no = #{locId} |
| | | </if> |
| | | <if test="matNr != null and matNr != ''"> |
| | | and ld.matnr = #{matNr} |
| | | </if> |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | and ld.order_no = #{orderNo} |
| | | </if> |
| | | <if test="batch != null and batch != ''"> |
| | | and ld.batch = #{batch} |
| | | </if> |
| | | order by ld.loc_no, ld.zpallet, ld.matnr |
| | | </select> |
| | | |
| | | <select id="invSummary" resultType="java.util.Map"> |
| | | select |
| | | ld.matnr as matNr, |
| | | coalesce(max(m.maktx), max(ld.maktx)) as matTx, |
| | | cast(round(sum(ld.anfme), 4) as decimal(18, 4)) as anfme, |
| | | coalesce(max(m.unit), max(ld.unit)) as unit |
| | | from asr_loc_detl as ld |
| | | left join asr_loc_mast as lm on ld.loc_no = lm.loc_no |
| | | left join man_mat as m on ld.matnr = m.matnr |
| | | where 1 = 1 |
| | | and lm.loc_sts = 'F' |
| | | <if test="matNrs != null and matNrs.size > 0"> |
| | | and ld.matnr in |
| | | <foreach item="item" collection="matNrs" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | group by ld.matnr |
| | | order by ld.matnr |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="item_num" property="itemNum" /> |
| | | <result column="safe_qty" property="safeQty" /> |
| | | <result column="weight" property="weight" /> |
| | | <result column="length" property="length" /> |
| | | <result column="man_length" property="length" /> |
| | | <result column="volume" property="volume" /> |
| | | <result column="three_code" property="threeCode" /> |
| | | <result column="supp" property="supp" /> |
| | |
| | | <result column="item_num" property="itemNum" /> |
| | | <result column="safe_qty" property="safeQty" /> |
| | | <result column="weight" property="weight" /> |
| | | <result column="length" property="length" /> |
| | | <result column="man_length" property="length" /> |
| | | <result column="volume" property="volume" /> |
| | | <result column="three_code" property="threeCode" /> |
| | | <result column="supp" property="supp" /> |
| | |
| | | <result column="item_num" property="itemNum"/> |
| | | <result column="safe_qty" property="safeQty"/> |
| | | <result column="weight" property="weight"/> |
| | | <result column="length" property="length"/> |
| | | <result column="man_length" property="length"/> |
| | | <result column="volume" property="volume"/> |
| | | <result column="three_code" property="threeCode"/> |
| | | <result column="supp" property="supp"/> |
| | |
| | | <result column="take_none" property="takeNone" /> |
| | | </resultMap> |
| | | |
| | | <sql id="queryWhere"> |
| | | <where> |
| | | <if test="param.wrk_no != null and param.wrk_no != ''"> and a.wrk_no = #{param.wrk_no}</if> |
| | | <if test="param.io_type != null and param.io_type != ''"> and a.io_type = #{param.io_type}</if> |
| | | <if test="param.matnr != null and param.matnr != ''"> and b.matnr = #{param.matnr}</if> |
| | | <if test="param.maktx != null and param.maktx != ''"> and b.maktx = #{param.maktx}</if> |
| | | <if test="param.batch != null and param.batch != ''"> and b.batch = #{param.batch}</if> |
| | | <if test="param.zpallet != null and param.zpallet != ''"> and a.barcode = #{param.zpallet}</if> |
| | | <if test="param.loc_no != null and param.loc_no != ''"> and (a.loc_no = #{param.loc_no} or a.source_loc_no = #{param.loc_no})</if> |
| | | <if test="param.startTime != null and param.startTime != ''"> and a.io_time >= #{param.startTime}</if> |
| | | <if test="param.endTime != null and param.endTime != ''"> and a.io_time <= #{param.endTime}</if> |
| | | </where> |
| | | </sql> |
| | | |
| | | <select id="inventoryFlowList" resultType="com.zy.asrs.entity.InventoryFlowDto"> |
| | | select |
| | | * |
| | | from |
| | | ( |
| | | select |
| | | ROW_NUMBER() over (order by a.modi_time desc) id, |
| | | a.wrk_no wrkNo, |
| | | a.io_type ioType, |
| | | a.io_time ioTime, |
| | | a.wrk_sts wrkSts, |
| | | a.source_loc_no sourceLocNo, |
| | | a.loc_no locNo, |
| | | a.barcode zpallet, |
| | | b.matnr , |
| | | b.maktx , |
| | | b.order_no orderNo, |
| | | b.batch , |
| | | b.anfme , |
| | | b.modi_time modiTime, |
| | | b.modi_user modiUser |
| | | from |
| | | asr_wrk_mast_log a |
| | | inner join asr_wrk_detl_log b on |
| | | a.wrk_no = b.wrk_no |
| | | and a.io_time = b.io_time |
| | | and a.wrk_sts in(5, 15) |
| | | <include refid="queryWhere"></include> |
| | | ) c |
| | | where |
| | | c.id BETWEEN (#{curr} - 1) * (#{limit} + 1) and #{curr} * #{limit} |
| | | </select> |
| | | <select id="inventoryFlowListCount" resultType="java.lang.Integer"> |
| | | select count(*) |
| | | from |
| | | asr_wrk_mast_log a |
| | | inner join asr_wrk_detl_log b on |
| | | a.wrk_no = b.wrk_no |
| | | and a.io_time = b.io_time |
| | | and a.wrk_sts in(5, 15) |
| | | <include refid="queryWhere"></include> |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.WrkMastStaLogMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WrkMastStaLog"> |
| | | <id column="id" property="id" /> |
| | | <result column="wrk_no" property="wrkNo" /> |
| | | <result column="wrk_start" property="wrkStart" /> |
| | | <result column="wrk_end" property="wrkEnd" /> |
| | | <result column="sta_start" property="staStart" /> |
| | | <result column="sta_end" property="staEnd" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="type" property="type" /> |
| | | <result column="wrk_sts" property="wrkSts" /> |
| | | <result column="line_number" property="lineNumber" /> |
| | | <result column="wrk_type" property="wrkType" /> |
| | | <result column="bign_time" property="bignTime" /> |
| | | <result column="wrk_crn" property="wrkCrn" /> |
| | | <result column="work_sta" property="workSta"/> |
| | | <result column="rgv_no" property="rgvNo"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.WrkMastStaMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WrkMastSta"> |
| | | <id column="id" property="id" /> |
| | | <result column="wrk_no" property="wrkNo" /> |
| | | <result column="wrk_start" property="wrkStart" /> |
| | | <result column="wrk_end" property="wrkEnd" /> |
| | | <result column="sta_start" property="staStart" /> |
| | | <result column="sta_end" property="staEnd" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="type" property="type" /> |
| | | <result column="wrk_sts" property="wrkSts" /> |
| | | <result column="line_number" property="lineNumber" /> |
| | | <result column="wrk_type" property="wrkType" /> |
| | | <result column="bign_time" property="bignTime" /> |
| | | <result column="work_sta" property="workSta"/> |
| | | <result column="rgv_no" property="rgvNo"/> |
| | | <result column="mk" property="mk"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="wrkCount1" resultType="Integer"> |
| | | SELECT COUNT(*) FROM asr_wrk_mast_sta WHERE wrk_start < 2000 |
| | | </select> |
| | | |
| | | |
| | | <select id="wrkCount2" resultType="Integer"> |
| | | SELECT COUNT(*) |
| | | FROM asr_wrk_mast_sta |
| | | WHERE wrk_start > 2000 |
| | | </select> |
| | | |
| | | <select id="selectToBeHistoryData" resultMap="BaseResultMap"> |
| | | select * from asr_wrk_mast_sta |
| | | where wrk_sts = 3 |
| | | order by wrk_no asc |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#basRgv', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basRgv/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'rgvNo', align: 'center',title: 'RGV编号'} |
| | | ,{field: 'inEnable', align: 'center',title: '可入'} |
| | | ,{field: 'outEnable', align: 'center',title: '可出'} |
| | | ,{field: 'rgvSts', align: 'center',title: '作业态'} |
| | | ,{field: 'wrkNo1', align: 'center',title: '任务号'} |
| | | ,{field: 'wrkNo2', align: 'center',title: '堆垛机号'} |
| | | ,{field: 'rgvErr', align: 'center',title: '错误码'} |
| | | ,{field: 'pakMk', align: 'center',title: '标记'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'loaded2$', align: 'center',title: '是否有物'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(basRgv)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(basRgv)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.rgvNo; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'basRgv': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgv/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(basRgv)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.rgvNo]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgv/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgv/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 异常项映射 |
| | | var errorNames = { |
| | | emergencyStop: '急停触发', |
| | | slot1EmptyNoData: '1号位有物无资料', |
| | | slot2EmptyNoData: '2号位有物无资料', |
| | | commandErrorChainConflict: '命令错误走链条冲突', |
| | | targetPositionIssue: '目标位下发错误', |
| | | travelInverterError: '走行变频器异常', |
| | | photoelectric1Error: '1号光电异常', |
| | | photoelectric2Error: '2号光电异常', |
| | | timeoutConnectionWithLine: '与输线时接超时', |
| | | leftRollerTimeout: '左侧滚筒运行超时', |
| | | rightRollerTimeout: '右侧滚筒运行超时', |
| | | rgvRunTimeout: 'rgv运行超时', |
| | | position1ChainInverterError: '1号工位链条变频器异常', |
| | | position2ChainInverterError: '2号工位链条变频器异常', |
| | | frontRearLimit: '前后极限位' |
| | | // 其他隐藏列可以按需加入 |
| | | }; |
| | | var errorFields = Object.keys(errorNames); |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#basRgvErrorLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basRgvErrorLog/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'rgvNo', align: 'center', title: '编号'}, |
| | | {field: 'errors', align: 'center', title: '异常项', |
| | | templet: function(d){ |
| | | return errorFields.filter(f => d[f] === 'Y').map(f => errorNames[f]).join(', '); |
| | | } |
| | | }, |
| | | {field: 'createTime$', align: 'center', title: '创建时间'}, |
| | | {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr = curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(basRgvErrorLog)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(basRgvErrorLog)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { return d.id; })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=['编号','异常项','创建时间']; |
| | | var fields=['rgvNo','errors','createTime$']; |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = {'basRgvErrorLog': exportData, 'fields': fields}; |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvErrorLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(basRgvErrorLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'detlShow': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '异常明细', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'logDetl.html', |
| | | success: function(layero, index){ |
| | | var iframeWin = window[layero.find('iframe')[0]['name']]; |
| | | iframeWin.setCreateTime(data.createTime$); |
| | | iframeWin.setUuid(data.id); |
| | | console.log(data.id); |
| | | } |
| | | }); |
| | | break; |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvErrorLog/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', {skin: 'layui-layer-admin', shade: .1}, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvErrorLog/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({elem: '.layui-laydate-range', type: 'datetime', range: true}); |
| | | layDate.render({elem: '#createTime\\$', type: 'datetime', value: data!==undefined?data['createTime$']:null}); |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | }); |
| | | |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({where: searchData, page: {curr: pageCurr}}); |
| | | } |
| New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#basRgvOpt', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basRgvOpt/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo1', align: 'center',title: '任务号'} |
| | | // ,{field: 'wrkNo2', align: 'center',title: ''} |
| | | ,{field: 'rgvNo', align: 'center',title: 'rgv编号'} |
| | | ,{field: 'sendTime$', align: 'center',title: '下发时间'} |
| | | ,{field: 'mode', align: 'center', title: '作业模式', templet: function(d){ |
| | | if (d.mode == 2) { |
| | | return '取货'; |
| | | } else if (d.mode == 3) { |
| | | return '放货'; |
| | | } else { |
| | | return d.mode; |
| | | } |
| | | }} |
| | | // ,{field: 'sourceRow', align: 'center',title: '源排'} |
| | | // ,{field: 'sourceBay', align: 'center',title: '源列'} |
| | | // ,{field: 'sourceLev', align: 'center',title: '源层'} |
| | | ,{field: 'sourceSta', align: 'center',title: '目标站'} |
| | | // ,{field: 'posRow', align: 'center',title: '目标排'} |
| | | // ,{field: 'posBay', align: 'center',title: '目标列'} |
| | | // ,{field: 'posLev', align: 'center',title: '目标层'} |
| | | ,{field: 'posSta', align: 'center',title: '执行工位'} |
| | | // ,{field: 'response$', align: 'center',title: '响应结果'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | // ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | // ,{field: 'id', align: 'center',title: ''} |
| | | |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(basRgvOpt)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(basRgvOpt)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'basRgvOpt': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvOpt/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(basRgvOpt)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvOpt/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvOpt/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#sendTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['sendTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#basRgvPath', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basRgvPath/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'rgvNo', align: 'center',title: 'RGV编号'} |
| | | ,{field: 'path', align: 'center',title: 'RGV运行路径'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | // ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(basRgvPath)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(basRgvPath)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.rgvNo; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'basRgvPath': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvPath/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(basRgvPath)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.rgvNo]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + 'RGV路径', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | if (mData !== undefined) { |
| | | var path = JSON.parse(mData.path); |
| | | path.forEach((item,idx) => { |
| | | $('input[type=checkbox]').each(function() { |
| | | if (parseInt($(this).val()) === item) { |
| | | $(this).attr("checked", true); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | var path = []; |
| | | $('input[type=checkbox]:checked').each(function() { |
| | | path.push(parseInt($(this).val())); |
| | | }); |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvPath/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | path: JSON.stringify(path), |
| | | rgvNo: data.field.rgvNo, |
| | | status: data.field.status, |
| | | memo: data.field.memo |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvPath/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | var baseUrl = "/gtSxkWms"; |
| | | var baseUrl = "/wms"; |
| | | |
| | | // 详情窗口-高度 |
| | | var detailHeight = '80%'; |
| | |
| | | } |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | /** |
| | | * layui 的 form.val 内部使用 layui.each 遍历数据对象。 |
| | | * 当对象存在名为 length 的字段(如 Mat.length),layui.each 会将其误判为“类数组”。 |
| | | * length=0 时会导致遍历次数为 0,进而整对象无法回显到表单。 |
| | | * |
| | | * 解决:回显时临时移除 length 字段,先回显其他字段,再手动写回 length 对应的表单项。 |
| | | */ |
| | | function layuiFormValSafe(form, filter, data) { |
| | | if (data == null || typeof data !== "object" || Array.isArray(data)) { |
| | | form.val(filter, data); |
| | | return; |
| | | } |
| | | if (!Object.prototype.hasOwnProperty.call(data, "length")) { |
| | | form.val(filter, data); |
| | | return; |
| | | } |
| | | |
| | | var lengthVal = data.length; |
| | | var safe = {}; |
| | | for (var key in data) { |
| | | if (!Object.prototype.hasOwnProperty.call(data, key)) { |
| | | continue; |
| | | } |
| | | if (key === "length") { |
| | | continue; |
| | | } |
| | | safe[key] = data[key]; |
| | | } |
| | | |
| | | form.val(filter, safe); |
| | | |
| | | var formDom = $('form[lay-filter="' + filter + '"]'); |
| | | if (formDom.length) { |
| | | formDom.find('[name="length"]').val(lengthVal); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | // Layui/jQuery may treat a plain object with numeric `length` as "array-like". |
| | | // When Mat.length === 0, internal iteration can run 0 times and the whole row becomes blank. |
| | | // Normalize Mat.length -> Mat.matLength for UI rendering, so it won't break table rendering. |
| | | function normalizeMatForLayui(mat) { |
| | | if (mat == null || typeof mat !== "object" || Array.isArray(mat)) { |
| | | return mat; |
| | | } |
| | | if (Object.prototype.hasOwnProperty.call(mat, "length") && typeof mat.length === "number") { |
| | | mat.matLength = mat.length; |
| | | delete mat.length; |
| | | } |
| | | return mat; |
| | | } |
| | | function normalizeMatListForLayui(list) { |
| | | if (!Array.isArray(list)) { |
| | | return list; |
| | | } |
| | | for (var i = 0; i < list.length; i++) { |
| | | normalizeMatForLayui(list[i]); |
| | | } |
| | | return list; |
| | | } |
| | | function restoreMatLengthFromLayui(mat) { |
| | | if (mat == null || typeof mat !== "object" || Array.isArray(mat)) { |
| | | return mat; |
| | | } |
| | | if (!Object.prototype.hasOwnProperty.call(mat, "length") && Object.prototype.hasOwnProperty.call(mat, "matLength")) { |
| | | mat.length = mat.matLength; |
| | | } |
| | | return mat; |
| | | } |
| | | |
| | | var matCols = [ |
| | | {field: 'matnr', align: 'center',title: '商品编号(品号)', width: 180} |
| | | // {field: 'id', align: 'center',title: 'ID'} |
| | |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'matLength', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| New file |
| | |
| | | var pageCurr; |
| | | var wrkNo; |
| | | var ioTime; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#wrkMastLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/inventoryFlow/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {field: 'wrkNo', align: 'center',title: '工作号', style: 'font-weight: bold',event: 'wrkNo'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间', width:160} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型', width:160} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态', width:160} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位'} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位'} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号'} |
| | | ,{field: 'matnr', align: 'center',title: '商品编号'} |
| | | ,{field: 'standby1', align: 'center',title: 'po'} |
| | | ,{field: 'standby2', align: 'center',title: 'upc'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | ,{field: 'batch', align: 'center',title: '批号',hide:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员'} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(wrkMastLog)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkMastLog)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkMastLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | | } |
| | | limit(child); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | if (res && res.data && res.data.records) { |
| | | normalizeMatListForLayui(res.data.records); |
| | | } |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | // 回显表单数据 |
| | | form.val('detail', mData); |
| | | var formData = mData ? $.extend({}, mData) : mData; |
| | | if (formData) { |
| | | restoreMatLengthFromLayui(formData); |
| | | } |
| | | layuiFormValSafe(form, 'detail', formData); |
| | | // 新增自动生成商品编号 |
| | | if (!mData) { |
| | | http.get(baseUrl + "/mat/auto/matnr/auth", null, function (res) { |
| | |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | // 回显表单数据 |
| | | form.val('detail', mData); |
| | | layuiFormValSafe(form, 'detail', mData); |
| | | // 新增自动生成商品编号 |
| | | if (!mData) { |
| | | http.get(baseUrl + "/node/auto/matnr/auth", null, function (res) { |
| | |
| | | switch (obj.event) { |
| | | // 出库 |
| | | case 'pakoutPreview': |
| | | pakoutPreviewCustomQuantity([data.id]) |
| | | pakoutPreview([data.id]) |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | function pakoutPreviewCustomQuantity(ids){ |
| | | // 弹框内容 |
| | | var content = ` |
| | | <form class="layui-form" id="billForm" style="padding: 20px;"> |
| | | <div class="layui-form-item" style="margin-bottom: 20px;"> |
| | | <label class="layui-form-label" style="width: 80px; font-size: 14px;">数量:</label> |
| | | <div class="layui-input-block" style="margin-left: 110px;"> |
| | | <input class="layui-input" type="number" id="amount" placeholder="请输入出库数量"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="text-align: right;"> |
| | | <button type="button" class="layui-btn" id="saveBtn" style="display: inline-block; padding: 0px 20px; font-size: 16px; background-color: #5FB878; border-color: #5FB878; text-align: center;">保存</button> |
| | | </div> |
| | | </form> |
| | | `; |
| | | |
| | | // 弹框 |
| | | layer.open({ |
| | | type: 1, // 使用 HTML 内容 |
| | | title: '输入出库数量', |
| | | content: content, |
| | | area: ['400px', '200px'], // 弹框大小 |
| | | shadeClose: true, // 点击遮罩关闭 |
| | | offset: '100px', |
| | | success: function (layero, index) { |
| | | form.render(); |
| | | // 点击保存按钮事件 |
| | | $('#saveBtn').on('click', function () { |
| | | var amount = $('#amount').val(); |
| | | console.log(amount) |
| | | pakoutPreview2(ids,amount); |
| | | |
| | | |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function pakoutPreview(ids,amount) { |
| | | function pakoutPreview(ids) { |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/out/pakout/preview/auth/sxk", |
| | | url: baseUrl + "/out/pakout/preview/auth/crn", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify(ids), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | var tableCache; |
| | | if (res.code === 200){ |
| | | layer.open({ |
| | | type: 1 |
| | | ,title: false |
| | | ,closeBtn: false |
| | | ,offset: '50px' |
| | | ,area: ['1200px', '700px'] |
| | | ,shade: 0.5 |
| | | ,shadeClose: false |
| | | ,btn: ['立即出库', '稍后处理'] |
| | | ,btnAlign: 'c' |
| | | ,moveType: 1 //拖拽模式,0或者1 |
| | | ,content: $('#pakoutPreviewBox').html() |
| | | ,success: function(layero, index){ |
| | | stoPreTabIdx = table.render({ |
| | | elem: '#stoPreTab', |
| | | data: res.data, |
| | | height: 520, |
| | | page: false, |
| | | limit: Number.MAX_VALUE, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | // {type: 'checkbox', merge: ['orderNo']}, |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center'}, |
| | | {field: 'batch', title: '批次', align: 'center'}, |
| | | {field: 'supp', align: 'center',title: '供应商', hide: false} |
| | | ,{field: 'temp2', align: 'center',title: '客户名称', hide: false} |
| | | ,{field: 'temp1', align: 'center',title: '来源单号', hide: false}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | {type: 'checkbox'}, |
| | | ]], |
| | | done: function (res) { |
| | | tableMerge.render(this); |
| | | $('.layui-table-body.layui-table-main').css("overflow", "auto"); |
| | | tableCache = tableData = table.cache.stoPreTab; |
| | | } |
| | | }); |
| | | // 修改出库站 |
| | | form.on('select(tbBasicTbStaNos)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableCache[index]; |
| | | for (let i = 0; i<tableCache.length; i++) { |
| | | if (tableCache[i].locNo === data.locNo) { |
| | | tableCache[i]['staNo'] = Number(obj.elem.value); |
| | | } |
| | | } |
| | | obj.othis.children().find("input").css("color", "blue"); |
| | | return false; |
| | | }); |
| | | // 批量修改出库站 |
| | | form.on('submit(batchModifySta)', function () { |
| | | let stoPreTabData = layui.table.checkStatus('stoPreTab').data; |
| | | if (stoPreTabData.length < 1) { |
| | | layer.msg("请至少选择一条以上合并数据", {icon: 7}); |
| | | return false; |
| | | } |
| | | modifySta(stoPreTabData); |
| | | }); |
| | | // 批量修改出库站 - 站点选择 |
| | | function modifySta(stoPreTabData) { |
| | | // 出库站取交集 |
| | | let staBatchSelectVal = []; |
| | | for(let i = 0; i<stoPreTabData.length; i++) { |
| | | let staNos = stoPreTabData[i].staNos; |
| | | if (staNos !== null) { |
| | | if (staBatchSelectVal.length === 0) { |
| | | staBatchSelectVal = staNos; |
| | | } else { |
| | | staBatchSelectVal = staBatchSelectVal.filter(val => |
| | | { |
| | | return new Set(staNos).has(val) |
| | | } |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | if (staBatchSelectVal.length === 0) { |
| | | layer.msg("出库站没有交集,无法批量修改", {icon: 2}); |
| | | return; |
| | | } |
| | | admin.open({ |
| | | type: 1, |
| | | area: '300px', |
| | | offset: 'auto', |
| | | title: '请选择站点', |
| | | content: $('#staBatchSelectDialog').html(), |
| | | success: function (layero, ddIndex) { |
| | | // 渲染下拉框 |
| | | let template = Handlebars.compile($('#batchStaSelectTpl').html()); |
| | | $('#batchSelectStaBox').html(template({list: staBatchSelectVal})); |
| | | // 确认 |
| | | form.on('submit(staBatchSelectConfirm)', function (obj) { |
| | | let loadIdx = layer.load(2); |
| | | let batchSta = Number(obj.field.batchSta); |
| | | let arr = []; |
| | | for (let j = 0; j<stoPreTabData.length; j++) { |
| | | for (let i = 0; i<tableCache.length; i++) { |
| | | if (tableCache[i].orderNo === stoPreTabData[j].orderNo |
| | | && tableCache[i].matnr === stoPreTabData[j].matnr |
| | | && tableCache[i].locNo === stoPreTabData[j].locNo) { |
| | | tableCache[i]['staNo'] = batchSta; |
| | | arr.push(i); |
| | | } |
| | | } |
| | | } |
| | | stoPreTabIdx.reload({data: tableCache}); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .order-sta-select').val(batchSta); |
| | | }); |
| | | layui.form.render('select'); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue"); |
| | | }); |
| | | layer.close(loadIdx); layer.close(ddIndex); |
| | | return false; |
| | | }); |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | } |
| | | ,yes: function(index, layero){ |
| | | //按钮【立即出库】的回调 |
| | | pakout(tableCache, index); |
| | | } |
| | | ,btn2: function(index, layero){ |
| | | //按钮【稍后处理】的回调 |
| | | layer.close(index) |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | } |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function pakoutPreview2(ids,amount) { |
| | | let loadIndex = layer.load(2); |
| | | var json = {} |
| | | json.ids = ids |
| | | json.amount = amount |
| | | $.ajax({ |
| | | url: baseUrl + "/out/pakout/previewCustomQuantity/auth/sxk", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify(json), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | |
| | | // let loadIndex = layer.load(2); |
| | | notice.msg('正在生成出库任务......', {icon: 4}); |
| | | $.ajax({ |
| | | url: baseUrl + "/out/pakout/auth/sxk", |
| | | url: baseUrl + "/out/pakout/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify(tableCache), |
| | |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | matCodeData = []; |
| | | normalizeMatForLayui(res.data); |
| | | var param = new Array(); |
| | | param[0] = res.data; |
| | | addTableData(param); |
| New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#wrkMastSta', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkMastSta/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | // {type: 'checkbox'}, |
| | | {field: 'id', align: 'center',title: 'ID',hide: true} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号',hide: false} |
| | | ,{field: 'wrkStart', align: 'center',title: '工作档开始位置',hide: false} |
| | | ,{field: 'wrkEnd', align: 'center',title: '工作档结束位置',hide: false} |
| | | ,{field: 'staStart', align: 'center',title: '小车接货位置',hide: false} |
| | | ,{field: 'staEnd', align: 'center',title: '小车放货位置',hide: false} |
| | | ,{field: 'rgvNo', align: 'center',title: 'RGV执行编号',hide: false} |
| | | ,{field: 'workSta', align: 'center',title: 'RGV执行工位',hide: false} |
| | | ,{field: 'type$', align: 'center',title: '货物类型',hide: false} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态',hide: false} |
| | | ,{field: 'lineNumber', align: 'center',title: '行号',hide: true} |
| | | ,{field: 'wrkType$', align: 'center',title: '工作类型',hide: false} |
| | | ,{field: 'bignTime$', align: 'center',title: '标记时间',hide: false} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间',hide: true} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间',hide: false} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(wrkMastSta)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkMastSta)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkMastSta': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastSta/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(wrkMastSta)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '小车作业状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastSta/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastSta/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#bignTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['bignTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#wrkMastStaLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkMastStaLog/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | // {type: 'checkbox'}, |
| | | {field: 'id', align: 'center',title: 'ID',hide: true} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号',hide: false} |
| | | ,{field: 'wrkStart', align: 'center',title: '工作档开始位置',hide: false} |
| | | ,{field: 'wrkEnd', align: 'center',title: '工作档结束位置',hide: false} |
| | | ,{field: 'staStart', align: 'center',title: '小车接货位置',hide: false} |
| | | ,{field: 'staEnd', align: 'center',title: '小车放货位置',hide: false} |
| | | ,{field: 'type$', align: 'center',title: '货物类型',hide: false} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态',hide: false} |
| | | ,{field: 'lineNumber', align: 'center',title: '行号',hide: true} |
| | | ,{field: 'wrkType$', align: 'center',title: '工作类型',hide: false} |
| | | ,{field: 'bignTime$', align: 'center',title: '标记时间',hide: false} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间',hide: true} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间',hide: false} |
| | | |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(wrkMastStaLog)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkMastStaLog)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkMastStaLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastStaLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(wrkMastStaLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastStaLog/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastStaLog/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#bignTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['bignTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="basRgv" lay-filter="basRgv"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgv/basRgv.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">RGV编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvNo" placeholder="请输入RGV编号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">可入: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="inEnable" placeholder="请输入可入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">可出: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="outEnable" placeholder="请输入可出"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">作业态: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvSts" placeholder="请输入作业态"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">任务号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo1" placeholder="请输入任务号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">堆垛机号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo2" placeholder="请输入堆垛机号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">错误码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvErr" placeholder="请输入错误码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">标记: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="pakMk" placeholder="请输入标记"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">状态: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="status"> |
| | | <option value="">请选择状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">禁用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="createBy" placeholder="请输入添加人员" style="display: none"> |
| | | <input id="createBy$" name="createBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入添加人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入添加时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="updateBy" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="updateBy$" name="updateBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="updateTime" id="updateTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">是否有物: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="loaded2"> |
| | | <option value="">请选择是否有物</option> |
| | | <option value="1">有物</option> |
| | | <option value="0">无物</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="basRgvErrorLog" lay-filter="basRgvErrorLog"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">明细</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvErrorLog/basRgvErrorLog.js" charset="utf-8"></script> |
| | | </body> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>RGV异常</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | body { |
| | | background: #f5f7fa; |
| | | font-family: "Microsoft YaHei", sans-serif; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | /* 顶部时间区域 */ |
| | | .layui-inline { |
| | | background: #fff; |
| | | padding: 16px 20px; |
| | | border-radius: 10px; |
| | | box-shadow: 0 3px 12px rgba(0,0,0,0.06); |
| | | margin: 20px 0 0 20px; |
| | | display: inline-flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* 整体容器 */ |
| | | #logContainer { |
| | | display: flex; |
| | | width: 100%; |
| | | margin-top: 20px; |
| | | height: 600px; |
| | | overflow-y: auto; |
| | | background: #fff; |
| | | border-radius: 12px; |
| | | box-shadow: 0 4px 18px rgba(0,0,0,0.08); |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /* 左右列 */ |
| | | .log-column { |
| | | flex: 1; |
| | | padding: 10px 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .log-column.left { |
| | | border-right: 1px solid #e5e5e5; |
| | | } |
| | | |
| | | /* 列标题 */ |
| | | .column-title { |
| | | text-align: center; |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | margin-bottom: 18px; |
| | | padding-bottom: 10px; |
| | | border-bottom: 2px solid #eee; |
| | | } |
| | | |
| | | .title-red { color: #e74c3c; } |
| | | .title-green { color: #27ae60; } |
| | | |
| | | ul li { |
| | | display: inline-block; /* 改成行内块,自适应宽度 */ |
| | | margin: 6px 6px 6px 0; /* 卡片间距 */ |
| | | padding: 8px 12px; /* 内边距 */ |
| | | border-radius: 10px; |
| | | font-size: 14px; |
| | | box-shadow: 0 2px 6px rgba(0,0,0,0.08); |
| | | transition: all 0.2s; |
| | | white-space: nowrap; /* 防止文字换行,卡片宽度自适应内容 */ |
| | | } |
| | | |
| | | ul li:hover { |
| | | transform: translateY(-2px); |
| | | box-shadow: 0 4px 12px rgba(0,0,0,0.12); |
| | | cursor: default; |
| | | } |
| | | |
| | | /* 异常项 */ |
| | | .error-item { |
| | | color: #c0392b; |
| | | background: #fdecea; |
| | | border: 1px solid #f5c5c5; |
| | | } |
| | | |
| | | /* 正常项 */ |
| | | .normal-item { |
| | | color: #1e8449; |
| | | background: #eafaf1; |
| | | border: 1px solid #c7e6d1; |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">发生时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="createTime" class="layui-input" type="text" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="logContainer"> |
| | | <!-- 异常列 --> |
| | | <div class="log-column left"> |
| | | <h3 class="column-title title-red">异常项(Y)</h3> |
| | | <ul id="errorList"></ul> |
| | | </div> |
| | | |
| | | <!-- 正常列 --> |
| | | <div class="log-column"> |
| | | <h3 class="column-title title-green">无异常项(N)</h3> |
| | | <ul id="normalList"></ul> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript"> |
| | | var parentUuid; |
| | | |
| | | /** 列结构 */ |
| | | function getCol() { |
| | | return [ |
| | | ,{field: 'reset', align: 'center',title: '复位'} |
| | | ,{field: 'travelBrakeSwitch', align: 'center',title: '走行抱闸开关钮'} |
| | | ,{field: 'travelSpeedLimitPhotoelectric', align: 'center',title: '走行强制减速光电'} |
| | | ,{field: 'leftOverlimit1', align: 'center',title: '左超限 1'} |
| | | ,{field: 'rightOverlimit1', align: 'center',title: '右超限 1'} |
| | | ,{field: 'leftAtPosition1', align: 'center',title: '左到位 1'} |
| | | ,{field: 'rightAtPosition1', align: 'center',title: '右到位 1'} |
| | | ,{field: 'chainForward1', align: 'center',title: '链条前进 1'} |
| | | ,{field: 'chainReverse1', align: 'center',title: '链条后退 1'} |
| | | ,{field: 'inverterAlarm', align: 'center',title: '变频器报警'} |
| | | ,{field: 'leftOverlimit2', align: 'center',title: '左超限 2'} |
| | | ,{field: 'rightOverlimit2', align: 'center',title: '右超限 2'} |
| | | ,{field: 'leftAtPosition2', align: 'center',title: '左到位 2'} |
| | | ,{field: 'rightAtPosition2', align: 'center',title: '右到位 2'} |
| | | ,{field: 'cargoSpeedReduction', align: 'center',title: '货物减速'} |
| | | ,{field: 'conveyorInverterAlarm2', align: 'center',title: '输送变频器报警 2'} |
| | | ,{field: 'leftConveyor2', align: 'center',title: '左输送 2'} |
| | | ,{field: 'rightConveyor2', align: 'center',title: '右输送 2'} |
| | | ]; |
| | | } |
| | | |
| | | /** 格式化时间 */ |
| | | function formatDateTime(isoString) { |
| | | const date = new Date(isoString); |
| | | const y = date.getFullYear(); |
| | | const m = String(date.getMonth() + 1).padStart(2, '0'); |
| | | const d = String(date.getDate()).padStart(2, '0'); |
| | | const hh = String(date.getHours()).padStart(2, '0'); |
| | | const mm = String(date.getMinutes()).padStart(2, '0'); |
| | | const ss = String(date.getSeconds()).padStart(2, '0'); |
| | | return `${y}-${m}-${d} ${hh}:${mm}:${ss}`; |
| | | } |
| | | |
| | | /** 渲染双列卡片列表 */ |
| | | function renderList(data) { |
| | | const cols = getCol(); |
| | | $("#errorList").empty(); |
| | | $("#normalList").empty(); |
| | | cols.forEach(col => { |
| | | const field = col.field; |
| | | const title = col.title; |
| | | if (data[field] === "Y") { |
| | | $("#errorList").append(`<li class="error-item">${title}</li>`); |
| | | } else if (data[field] === "N") { |
| | | $("#normalList").append(`<li class="normal-item">${title}</li>`); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** 查询后端数据 */ |
| | | function renderTable() { |
| | | if (!parentUuid) return; |
| | | $.ajax({ |
| | | url: baseUrl + '/basRgvErrorLog/listByUuid/auth', |
| | | method: 'GET', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | data: { uuid: parentUuid, curr: 1, limit: 1 }, |
| | | success: function(res) { |
| | | if (res.code !== 200) return; |
| | | const record = res.data.records[0]; |
| | | if (record) renderList(record); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** 父页面调用 */ |
| | | function setUuid(uuid){ |
| | | parentUuid = uuid; |
| | | renderTable(); |
| | | } |
| | | |
| | | function setCreateTime(value){ |
| | | $('#createTime').val(formatDateTime(value)); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="basRgvMap" lay-filter="basRgvMap"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvMap/basRgvMap.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">RGV编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvNo" placeholder="请输入RGV编号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">开始范围: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="startRoute" placeholder="请输入开始范围"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">结束范围: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="endRoute" placeholder="请输入结束范围"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">当前位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="nowRoute" placeholder="请输入当前位置"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">状态: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvStatus" placeholder="请输入状态"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">锁-开始-位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="lockStartRoute" placeholder="请输入锁-开始-位置"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">锁-结束-位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="lockEndRoute" placeholder="请输入锁-结束-位置"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="rgv_no" placeholder="RGV编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="basRgvOpt" lay-filter="basRgvOpt"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvOpt/basRgvOpt.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">任务号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo1" placeholder="请输入任务号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo2" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">穿梭车: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvNo" placeholder="请输入穿梭车"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">下发时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sendTime" id="sendTime$" placeholder="请输入下发时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">作业: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="mode" placeholder="请输入作业"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源排: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sourceRow" placeholder="请输入源排"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源列: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sourceBay" placeholder="请输入源列"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源层: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sourceLev" placeholder="请输入源层"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源站: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sourceSta" placeholder="请输入源站"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标排: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="posRow" placeholder="请输入目标排"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标列: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="posBay" placeholder="请输入目标列"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标层: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="posLev" placeholder="请输入目标层"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标站: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="posSta" placeholder="请输入目标站"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">响应结果: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="response"> |
| | | <option value="">请选择响应结果</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">失败</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="updateTime" id="updateTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="updateBy" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="updateBy$" name="updateBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="basRgvPath" lay-filter="basRgvPath"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvPath/basRgvPath.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">RGV编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvNo" placeholder="请输入RGV编号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">运行路径: </label> |
| | | <div class="layui-input-block"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="1" title="101(1)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="2" title="102(2)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="3" title="104(3)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="4" title="105(4)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="5" title="118(5)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="6" title="107(6)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="7" title="108(7)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="8" title="119(8)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="9" title="110(9)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="10" title="120(10)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="11" title="111(11)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="12" title="121(12)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="13" title="122(13)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="14" title="113(14)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="15" title="123(15)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="16" title="114(16)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="17" title="116(17)"> |
| | | <input lay-filter="switchTest" type="checkbox" name="path[]" value="18" title="117(18)"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">状态: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="status"> |
| | | <option value="">请选择状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="0">禁用</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | <link rel="stylesheet" href="../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../static/css/loader.css" media="all"> |
| | | <link rel="stylesheet" href="../static/css/layx.min.css" type="text/css" /> |
| | | <script src="../static/js/tools/layx.min.js"></script> |
| | | <style> |
| | | .layui-logo img { |
| | | width: 25px; |
| | |
| | | font-weight: 400; |
| | | /*margin-left: 5px;*/ |
| | | } |
| | | /* 弹窗样式 */ |
| | | .popup { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0,0,0,0.5); |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | z-index: 9999; |
| | | } |
| | | |
| | | .popup-content { |
| | | background-color: #fff; |
| | | padding: 20px; |
| | | border-radius: 5px; |
| | | box-shadow: 0px 0px 20px rgba(0,0,0,0.3); |
| | | text-align: center; |
| | | } |
| | | |
| | | button:hover { |
| | | background-color: #0069d9; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body class="layui-layout-body"> |
| | |
| | | <!-- 头部 --> |
| | | <div class="layui-header"> |
| | | <div class="layui-logo"> |
| | | <img src="../static/image/logo.png" style="display: inline-block; width: 40%;height: auto"> |
| | | <img src="../static/image/zy_logo_dark_color.png" style="display: inline-block; width: 40%;height: auto"> |
| | | <!-- <span style="margin-top: 0; letter-spacing: 10px">中扬立库</span>--> |
| | | <!-- <img src="../static/image/logo.svg"/>--> |
| | | <!-- <cite>中扬 - Zoneyung</cite>--> |
| | |
| | | </li> |
| | | </ul> |
| | | <ul class="layui-nav layui-layout-right"> |
| | | <!-- <li class="layui-nav-item" lay-unselect>--> |
| | | <!-- <a ew-event="note" title="便签"><i class="layui-icon layui-icon-note"></i></a>--> |
| | | <!-- </li>--> |
| | | <li class="layui-nav-item" lay-unselect id="licenseShow" style="display: none;user-select: none;"> |
| | | <div style="color: red;">许可证有效期:<span id="licenseDays">29</span>天</div> |
| | | <div style="color: red;">临时许可证有效期:<span id="licenseDays">29</span>天</div> |
| | | </li> |
| | | <li class="layui-nav-item layui-hide-xs" lay-unselect> |
| | | <a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a> |
| | |
| | | <div class="layuimini-loader"> |
| | | <div class="layuimini-loader-inner"></div> |
| | | </div> |
| | | <!-- 弹窗内容 --> |
| | | <div class="popup" id="popup" style="display: none;user-select: none;"> |
| | | <div class="popup-content"> |
| | | <h2 style="font-size: 28px;margin-bottom: 10px;">许可证即将过期</h2> |
| | | <div id="popup-text" style="font-size: 28px;color: red"></div> |
| | | <br/> |
| | | <button style="background-color: #007bff;color: #fff;border: none;padding: 10px 20px;border-radius: 5px;cursor: pointer;font-size: 16px;" onclick="hidePopup()">关闭</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | // 显示弹窗 |
| | | function showPopup(res) { |
| | | document.getElementById('popup').style.display = 'block'; |
| | | // 获取弹出窗口内容的容器元素 |
| | | var popupText = document.getElementById('popup-text'); |
| | | // 假设后台返回的字符串为 responseString |
| | | if (res!=""){ |
| | | var responseString = "许可证即将过期,剩余有效期:"+res+"天!"; |
| | | // 将字符串设置为弹窗内容的文本 |
| | | popupText.textContent = responseString; |
| | | //关闭设备 |
| | | // document.getElementById('popup').style.display = 'none'; |
| | | }else { |
| | | document.getElementById('popup').style.display = 'none'; |
| | | } |
| | | |
| | | } |
| | | |
| | | // 隐藏弹窗 |
| | | function hidePopup() { |
| | | document.getElementById('popup').style.display = 'none'; |
| | | } |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/layui/layui.js"></script> |
| | |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.code == 200) { |
| | | let days = res.data |
| | | if (days <= 30) { |
| | | $("#licenseShow").show() |
| | | $("#licenseDays").html(days) |
| | | |
| | | showPopup(res.data) |
| | | $("#popup").show() |
| | | alert("临时许可有效期:" + days + "天") |
| | | } |
| | | |
| | | }else { |
| | | top.location.href = baseUrl + "/login"; |
| | | } |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>中扬 - 自动化立体仓库 - AS / RS</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <link rel="icon" type="image/x-icon" href="../static/image/favicon.ico" /> |
| | | <link rel="stylesheet" href="../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../static/css/loader.css" media="all"> |
| | | <link rel="stylesheet" href="../static/css/layx.min.css" type="text/css" /> |
| | | <script src="../static/js/tools/layx.min.js"></script> |
| | | <style> |
| | | .layui-logo img { |
| | | width: 25px; |
| | | } |
| | | .layui-logo cite { |
| | | font-size: 18px; |
| | | font-weight: 400; |
| | | /*margin-left: 5px;*/ |
| | | } |
| | | /* 弹窗样式 */ |
| | | .popup { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0,0,0,0.5); |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | z-index: 9999; |
| | | } |
| | | |
| | | .popup-content { |
| | | background-color: #fff; |
| | | padding: 20px; |
| | | border-radius: 5px; |
| | | box-shadow: 0px 0px 20px rgba(0,0,0,0.3); |
| | | text-align: center; |
| | | } |
| | | |
| | | button:hover { |
| | | background-color: #0069d9; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body class="layui-layout-body"> |
| | | <div class="layui-layout layui-layout-admin"> |
| | | <!-- 头部 --> |
| | | <div class="layui-header"> |
| | | <div class="layui-logo"> |
| | | <img src="../static/image/logo.png" style="display: inline-block; width: 40%;height: auto"> |
| | | <!-- <span style="margin-top: 0; letter-spacing: 10px">中扬立库</span>--> |
| | | <!-- <img src="../static/image/logo.svg"/>--> |
| | | <!-- <cite>中扬 - Zoneyung</cite>--> |
| | | </div> |
| | | |
| | | <ul class="layui-nav layui-layout-left"> |
| | | <li class="layui-nav-item" lay-unselect> |
| | | <a ew-event="flexible" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a> |
| | | </li> |
| | | <li class="layui-nav-item" lay-unselect> |
| | | <a ew-event="refresh" title="刷新"><i class="layui-icon layui-icon-refresh-3"></i></a> |
| | | </li> |
| | | </ul> |
| | | <ul class="layui-nav layui-layout-right"> |
| | | <!-- <li class="layui-nav-item" lay-unselect>--> |
| | | <!-- <a ew-event="note" title="便签"><i class="layui-icon layui-icon-note"></i></a>--> |
| | | <!-- </li>--> |
| | | <li class="layui-nav-item" lay-unselect id="licenseShow" style="display: none;user-select: none;"> |
| | | <div style="color: red;">许可证有效期:<span id="licenseDays">29</span>天</div> |
| | | </li> |
| | | <li class="layui-nav-item layui-hide-xs" lay-unselect> |
| | | <a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a> |
| | | </li> |
| | | <li class="layui-nav-item" lay-unselect> |
| | | <a> |
| | | <cite id="username" style="margin-right: 5px">管理员</cite> |
| | | </a> |
| | | <dl class="layui-nav-child"> |
| | | <dd lay-unselect><a ew-href="detail.html?resourceId=8">基本资料</a></dd> |
| | | <hr> |
| | | <dd lay-unselect><a id="logout">退出</a></dd> |
| | | </dl> |
| | | </li> |
| | | <li class="layui-nav-item" lay-unselect> |
| | | <a ew-event="theme" title="主题"><i class="layui-icon layui-icon-more-vertical"></i></a> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | |
| | | <!-- 侧边栏 --> |
| | | <div class="layui-side"> |
| | | <div class="layui-side-scroll"> |
| | | <ul id="menu-main" class="layui-nav layui-nav-tree arrow2" lay-filter="admin-side-nav" lay-shrink="_all"> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 主体部分 --> |
| | | <div class="layui-body"></div> |
| | | <!-- 底部 --> |
| | | <div class="layui-footer layui-text"> |
| | | copyright © 2022 <a href="https://www.superton.cn/" target="_blank">浙江中扬立库有限公司</a> all rights reserved. |
| | | <span class="pull-right">Version 1.0.0</span> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <!--初始化加载层--> |
| | | <div class="layuimini-loader"> |
| | | <div class="layuimini-loader-inner"></div> |
| | | </div> |
| | | <!-- 弹窗内容 --> |
| | | <div class="popup" id="popup" style="display: none;user-select: none;"> |
| | | <div class="popup-content"> |
| | | <h2 style="font-size: 28px;margin-bottom: 10px;">许可证即将过期</h2> |
| | | <div id="popup-text" style="font-size: 28px;color: red"></div> |
| | | <br/> |
| | | <button style="background-color: #007bff;color: #fff;border: none;padding: 10px 20px;border-radius: 5px;cursor: pointer;font-size: 16px;" onclick="hidePopup()">关闭</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <script> |
| | | // 显示弹窗 |
| | | function showPopup(res) { |
| | | document.getElementById('popup').style.display = 'block'; |
| | | // 获取弹出窗口内容的容器元素 |
| | | var popupText = document.getElementById('popup-text'); |
| | | // 假设后台返回的字符串为 responseString |
| | | if (res!=""){ |
| | | var responseString = "许可证即将过期,剩余有效期:"+res+"天!"; |
| | | // 将字符串设置为弹窗内容的文本 |
| | | popupText.textContent = responseString; |
| | | //关闭设备 |
| | | // document.getElementById('popup').style.display = 'none'; |
| | | }else { |
| | | document.getElementById('popup').style.display = 'none'; |
| | | } |
| | | |
| | | } |
| | | |
| | | // 隐藏弹窗 |
| | | function hidePopup() { |
| | | document.getElementById('popup').style.display = 'none'; |
| | | } |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../static/layui/layui.js"></script> |
| | | <script type="text/javascript" src="../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../static/js/common.js"></script> |
| | | <script> |
| | | console.log('%c 中扬立库平台 %c 1.0.0','background-color:rgb(53,73,94);color: #fff;border-radius:2px 0 0 2px;padding:2px 4px;','background-color:rgb(25,190,107);color: #fff;border-radius:0 2px 2px 0;padding:2px 4px;font: 9pt "Apercu Regular", Georgia, "Times New Roman", Times, serif;'); |
| | | $(function () { |
| | | if ("" === localStorage.getItem('token')) { |
| | | top.location.href = baseUrl + "/login"; |
| | | } |
| | | }); |
| | | |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).extend({ |
| | | notice: 'notice/notice', |
| | | }).use(['index', 'element', 'layer', 'admin', 'notice'], function () { |
| | | var $ = layui.jquery; |
| | | var index = layui.index; |
| | | var element = layui.element; |
| | | var layer = layui.layer; |
| | | var admin = layui.admin; |
| | | var notice = layui.notice; |
| | | |
| | | var easywebIframeMsg = localStorage.getItem("easyweb-iframe"); |
| | | if (!isEmpty(easywebIframeMsg)) { |
| | | var easywebIframeObj = JSON.parse(easywebIframeMsg); |
| | | if (easywebIframeObj.defaultTheme === undefined) { |
| | | admin.changeTheme("theme-colorful"); |
| | | } |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/menu/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | // async: false, |
| | | success: function (res) { |
| | | // 关闭加载动画 |
| | | $('.layuimini-loader').fadeOut(); |
| | | if (res.code === 200) { |
| | | var tpl = $('#menuTpl').html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | $("#menu-main").html(html); |
| | | element.init(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/login"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/license/getLicenseDays", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | let days = res.data |
| | | if (days <= 30) { |
| | | $("#licenseShow").show() |
| | | $("#licenseDays").html(days) |
| | | |
| | | showPopup(res.data) |
| | | $("#popup").show() |
| | | } |
| | | |
| | | }else { |
| | | top.location.href = baseUrl + "/login"; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | // 默认加载主页 |
| | | index.loadHome({ |
| | | menuPath: baseUrl+'/views/home/navigation.html', |
| | | menuName: '<i class="layui-icon layui-icon-home"></i>' |
| | | }); |
| | | |
| | | $('#username').text(localStorage.getItem('username')); |
| | | |
| | | $(document).on('click','#logout', function () { |
| | | window.location.href = "login.html"; |
| | | localStorage.removeItem('token'); |
| | | localStorage.removeItem('username'); |
| | | admin.closeAllTabs(); |
| | | }); |
| | | |
| | | // 替换退出按钮变量 |
| | | var logout = document.getElementById('logout'); |
| | | var url = logout.getAttribute('href'); |
| | | logout.setAttribute('href', baseUrl + "/login"); |
| | | |
| | | }); |
| | | </script> |
| | | <script type="text/html" id="menuTpl"> |
| | | {{#each data}} |
| | | <li class="layui-nav-item"> |
| | | <a><i class="layui-icon {{this.menuIcon}}"></i> <cite>{{this.menu}}</cite></a> |
| | | <dl class="layui-nav-child"> |
| | | {{#each this.subMenu}} |
| | | <dd><a lay-href="{{this.code}}?resourceId={{this.id}}">{{this.name}}</a></dd> |
| | | {{/each}} |
| | | </dl> |
| | | </li> |
| | | {{/each}} |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="ioType" class="layui-input" name="io_type" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="入出库类型" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkIotypeQueryByioTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="maktx" placeholder="商品名称" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="batch" placeholder="批次" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="zpallet" placeholder="托盘码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="loc_no" placeholder="库位号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="io_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格 --> |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="wrkMastLog" lay-filter="wrkMastLog"></table> |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/inventoryFlow/inventoryFlow.js" charset="utf-8"></script> |
| | | </body> |
| | | </html> |
| | | |
| | |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | if (res && res.data && res.data.records) { |
| | | normalizeMatListForLayui(res.data.records); |
| | | } |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger btn-pakoutPreview" id="btn-pakoutPreview" lay-event="pakoutPreview">批量出库</button> |
| | | <!-- <button class="layui-btn layui-btn-sm layui-btn-danger btn-pakoutPreview" id="btn-pakoutPreview" lay-event="pakoutPreview">批量出库</button>--> |
| | | |
| | | </script> |
| | | |
| | |
| | | <select class="order-sta-select" lay-filter="tbBasicTbStaNos"> |
| | | {{#if (d.staNos!=null) {}} |
| | | {{# for(let i=0; i<d.staNos.length; i++) { }} |
| | | <option value="{{d.staNos[i].staNo}}">{{d.staNos[i].staName}}</option> |
| | | <option value="{{d.staNos[i]}}">{{d.staNos[i]}}</option> |
| | | {{# } }} |
| | | {{# } }} |
| | | </select> |
| | |
| | | <script type="text/template" id="batchStaSelectTpl"> |
| | | <option value="">选择出库站</option> |
| | | {{#each list}} |
| | | <option value="{{this.staNo}}">{{this.staName}}</option> |
| | | <option value="{{this}}">{{this}}</option> |
| | | {{/each}} |
| | | </script> |
| | | |
| | |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | if (res && res.data && res.data.records) { |
| | | normalizeMatListForLayui(res.data.records); |
| | | } |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | if (res && res.data && res.data.records) { |
| | | normalizeMatListForLayui(res.data.records); |
| | | } |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 货物类型 --> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="type" id="type" class="layui-input" type="text" placeholder="货物类型" autocomplete="off"> |
| | | <option style="display: none"></option> |
| | | <option value="1">1.非空</option> |
| | | <option value="2">2.空板</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 工作状态 --> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="wrk_sts" id="wrk_sts" class="layui-input" type="text" placeholder="工作状态" autocomplete="off"> |
| | | <option style="display: none"></option> |
| | | <option value="0">0.初始</option> |
| | | <option value="1">1.等待小车取</option> |
| | | <option value="2">2.等待小车放</option> |
| | | <option value="3">3.完成</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 工作类型 --> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="wrk_type" id="wrk_type" class="layui-input" type="text" placeholder="工作类型" autocomplete="off"> |
| | | <option style="display: none"></option> |
| | | <option value="1">叠盘</option> |
| | | <option value="2">拆盘</option> |
| | | <option value="3">取放</option> |
| | | <!-- <option value="2">2.行走</option>--> |
| | | <option value="5">满取</option> |
| | | <option value="6">满放</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="wrkMastSta" lay-filter="wrkMastSta"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <!-- <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button>--> |
| | | <!-- <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button>--> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastSta/wrkMastSta.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo" placeholder="请输入工作号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作档开始位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkStart" placeholder="请输入工作档开始位置" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作档结束位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkEnd" placeholder="请输入工作档结束位置" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">小车接货位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="staStart" placeholder="请输入小车接货位置" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">小车放货位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="staEnd" placeholder="请输入小车放货位置" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">RGV执行编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvNo" placeholder="请输入RGV执行编号" lay-vertype="tips" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">RGV执行工位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="workSta" placeholder="请输入RGV执行编号" lay-vertype="tips" > |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">添加时间: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入添加时间">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">修改时间: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="updateTime" id="updateTime$" placeholder="请输入修改时间">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label layui-form-required">类型 1:非空 2:空板: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="type" placeholder="请输入类型 1:非空 2:空板" lay-vertype="tips" lay-verify="required">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- 货物类型 --> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">货物类型:</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="type"> |
| | | <option value="1">1.非空</option> |
| | | <option value="2">2.空板</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 工作状态 --> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作状态:</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="wrkSts"> |
| | | <option value="0">0.初始</option> |
| | | <option value="1">1.等待小车取</option> |
| | | <option value="2">2.等待小车放</option> |
| | | <option value="3">3.完成</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 工作类型 --> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="wrkType"> |
| | | <option value="1">叠盘</option> |
| | | <option value="2">拆盘</option> |
| | | <option value="3">取放</option> |
| | | <!-- <option value="2">2.行走</option>--> |
| | | <option value="5">满取</option> |
| | | <option value="6">满放</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label layui-form-required">工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="wrkSts" placeholder="请输入工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成" lay-vertype="tips" lay-verify="required">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">行号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="lineNumber" placeholder="请输入行号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label layui-form-required">工作类型: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="wrkType" placeholder="请输入工作类型" lay-vertype="tips" lay-verify="required">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">标记时间: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="bignTime" id="bignTime$" placeholder="请输入标记时间">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 货物类型 --> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="type" id="type" class="layui-input" type="text" placeholder="货物类型" autocomplete="off"> |
| | | <option style="display: none"></option> |
| | | <option value="1">1.非空</option> |
| | | <option value="2">2.空板</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 工作状态 --> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="wrk_sts" id="wrk_sts" class="layui-input" type="text" placeholder="工作状态" autocomplete="off"> |
| | | <option style="display: none"></option> |
| | | <option value="0">0.初始</option> |
| | | <option value="1">1.等待小车取</option> |
| | | <option value="2">2.等待小车放</option> |
| | | <option value="3">3.完成</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- 工作类型 --> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="wrk_type" id="wrk_type" class="layui-input" type="text" placeholder="工作类型" autocomplete="off"> |
| | | <option style="display: none"></option> |
| | | <option value="1">叠盘</option> |
| | | <option value="2">拆盘</option> |
| | | <option value="3">取放</option> |
| | | <!-- <option value="2">2.行走</option>--> |
| | | <option value="5">满取</option> |
| | | <option value="6">满放</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="wrkMastStaLog" lay-filter="wrkMastStaLog"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>--> |
| | | <!-- <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button>--> |
| | | <!-- <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button>--> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a>--> |
| | | <!-- <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a>--> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastStaLog/wrkMastStaLog.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo" placeholder="请输入工作号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作档开始位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkStart" placeholder="请输入工作档开始位置" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作档结束位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkEnd" placeholder="请输入工作档结束位置" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">小车接货位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="staStart" placeholder="请输入小车接货位置" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">小车放货位置: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="staEnd" placeholder="请输入小车放货位置" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">RGV执行编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvNo" placeholder="请输入RGV执行编号" lay-vertype="tips" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">RGV执行工位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="workSta" placeholder="请输入RGV执行编号" lay-vertype="tips" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入添加时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="updateTime" id="updateTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">类型 0:满版 1:空板: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="type" placeholder="请输入类型 0:满版 1:空板" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkSts" placeholder="请输入工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">行号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="lineNumber" placeholder="请输入行号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作类型 类型 1:取(叠盘) 2:放 3:取放 4:拆盘: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkType" placeholder="请输入工作类型 类型 1:取(叠盘) 2:放 3:取放 4:拆盘" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">标记时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="bignTime" id="bignTime$" placeholder="请输入标记时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkCrn" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |