Merge branch 'jsxswms' into integrationWms
# Conflicts:
# pom.xml
# src/main/resources/application.yml
49个文件已删除
58个文件已修改
1 文件已重命名
23个文件已添加
| | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-tomcat</artifactId> |
| | | <!-- <scope>provided</scope>--> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-aop</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.cool</groupId> |
| | |
| | | <version>${cool.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-aop</artifactId> |
| | | <groupId>org.apache.tika</groupId> |
| | | <artifactId>tika-core</artifactId> |
| | | <version>2.1.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>mysql</groupId> |
| New file |
| | |
| | | -- save basContainer record |
| | | -- mysql |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basContainer/basContainer.html', 'basContainer管理', null , '2', null , '1'); |
| | | |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basContainer#view', '查询', '', '3', '0', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basContainer#btn-add', '新增', '', '3', '1', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basContainer#btn-edit', '编辑', '', '3', '2', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basContainer#btn-delete', '删除', '', '3', '3', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'basContainer#btn-export', '导出', '', '3', '4', '1'); |
| | | |
| | | -- sqlserver |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basContainer/basContainer.html', N'basContainer管理', null, '2', null, '1'); |
| | | |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basContainer#view', N'查询', '90623', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basContainer#btn-add', N'新增', '90623', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basContainer#btn-edit', N'编辑', '90623', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basContainer#btn-delete', N'删除', '90623', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'basContainer#btn-export', N'导出', '90623', '3', '4', '1'); |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasContainer; |
| | | import com.zy.asrs.entity.param.ContainerParams; |
| | | import com.zy.asrs.service.BasContainerService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class BasContainerController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasContainerService basContainerService; |
| | | |
| | | @RequestMapping(value = "/basContainer/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basContainerService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basContainer/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<BasContainer> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasContainer.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basContainerService.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 = "/basContainer/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasContainer basContainer) { |
| | | basContainerService.insert(basContainer); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basContainer/init/auth") |
| | | @ManagerAuth |
| | | public R init(@RequestBody ContainerParams container) { |
| | | if (Objects.isNull(container)) { |
| | | throw new RuntimeException("能数不能为空!!"); |
| | | } |
| | | return basContainerService.init(container); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/basContainer/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasContainer basContainer){ |
| | | if (Cools.isEmpty(basContainer) || null==basContainer.getId()){ |
| | | return R.error(); |
| | | } |
| | | basContainerService.updateById(basContainer); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basContainer/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basContainerService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basContainer/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasContainer> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basContainer")); |
| | | convert(map, wrapper); |
| | | List<BasContainer> list = basContainerService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basContainerQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasContainer> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("_id", condition); |
| | | Page<BasContainer> page = basContainerService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasContainer basContainer : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basContainer.getId()); |
| | | map.put("value", basContainer.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basContainer/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasContainer> wrapper = new EntityWrapper<BasContainer>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basContainerService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasContainer.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | public R query(String condition) { |
| | | EntityWrapper<BasCrnStatus> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("sts_desc", condition); |
| | | Page<BasCrnStatus> page = basCrnStatusService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasCrnStatus> page = basCrnStatusService.selectPage(new Page<>(0, 100), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasCrnStatus basCrnStatus : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | public R query(String condition) { |
| | | EntityWrapper<BasLocSts> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("loc_desc", condition); |
| | | Page<BasLocSts> page = basLocStsService.selectPage(new Page<>(0, 32), wrapper); |
| | | Page<BasLocSts> page = basLocStsService.selectPage(new Page<>(0, 100), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasLocSts basLocSts : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | |
| | | @RequestMapping(value = "/basStation/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<BasStation> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasStation.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(basStationService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | if (val.contains(RANGE_TIME_LINK)) { |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | |
| | | @RequestMapping(value = "/basStation/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasStation basStation) { |
| | | basStation.setAppeUser(getUserId()); |
| | | basStation.setModiUser(getUserId()); |
| | | basStation.setIoTime(new Date()); |
| | | basStation.setId(null); |
| | | basStationService.insert(basStation); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basStation/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasStation basStation){ |
| | | if (Cools.isEmpty(basStation) || null==basStation.getId()){ |
| | | @RequestMapping(value = "/basStation/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasStation basStation) { |
| | | if (Cools.isEmpty(basStation) || null == basStation.getId()) { |
| | | return R.error(); |
| | | } |
| | | basStationService.updateById(basStation); |
| | |
| | | |
| | | @RequestMapping(value = "/basStation/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | basStationService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/basStation/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<BasStation> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basStation")); |
| | |
| | | wrapper.like("dev_no", condition); |
| | | Page<BasStation> page = basStationService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasStation basStation : page.getRecords()){ |
| | | for (BasStation basStation : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basStation.getId()); |
| | | map.put("value", basStation.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasStation> wrapper = new EntityWrapper<BasStation>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basStationService.selectOne(wrapper)){ |
| | | if (null != basStationService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasStation.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | public R query(String condition) { |
| | | EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("io_desc", condition); |
| | | Page<BasWrkIotype> page = basWrkIotypeService.selectPage(new Page<>(0, 20), wrapper); |
| | | Page<BasWrkIotype> page = basWrkIotypeService.selectPage(new Page<>(0, 100), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasWrkIotype basWrkIotype : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | public R query(String condition) { |
| | | EntityWrapper<BasWrkStatus> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("wrk_desc", condition); |
| | | Page<BasWrkStatus> page = basWrkStatusService.selectPage(new Page<>(0, 20), wrapper); |
| | | Page<BasWrkStatus> page = basWrkStatusService.selectPage(new Page<>(0, 100), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasWrkStatus basWrkStatus : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.MatPrint; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.param.BatchMatsUpdateParam; |
| | | import com.zy.asrs.entity.param.EmptyPlateOutParam; |
| | | import com.zy.asrs.entity.result.KeyValueVo; |
| | | import com.zy.asrs.service.MatService; |
| | |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | |
| | | @RequestMapping(value = "/mat/auto/matnr/auth") |
| | | public R autoMatnr(){ |
| | | public R autoMatnr() { |
| | | return R.ok().add("YJ" + DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss).substring(0, 16)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/list/pda/auth") |
| | | @ManagerAuth |
| | | public R pdaList(@RequestParam(required = true)Long tagId){ |
| | | public R pdaList(@RequestParam(required = true) Long tagId) { |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("tag_id", tagId); |
| | | wrapper.orderBy("create_time", false); |
| | |
| | | |
| | | @RequestMapping(value = "/mat/search/pda/auth") |
| | | @ManagerAuth |
| | | public R pdaSearch(@RequestParam(required = false)String condition){ |
| | | public R pdaSearch(@RequestParam(required = false) String condition) { |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | // wrapper.like("matnr", condition).or().like("maktx", condition); |
| | |
| | | |
| | | @RequestMapping(value = "/mat/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | Object tagId = param.get("tag_id"); |
| | | if (Cools.isEmpty(tagId)) { |
| | | tagId = getOriginTag().getId(); |
| | |
| | | |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | if (val.contains(RANGE_TIME_LINK)) { |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | |
| | | mat.setCreateTime(now); |
| | | mat.setUpdateBy(getUserId()); |
| | | mat.setUpdateTime(now); |
| | | mat.setLocType(mat.getTagId()); |
| | | mat.setStatus(1); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("添加失败,请联系管理员"); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/update/auth") |
| | | @ManagerAuth |
| | | public R update(Mat mat){ |
| | | if (Cools.isEmpty(mat) || null==mat.getId()){ |
| | | @RequestMapping(value = "/mat/update/auth") |
| | | @ManagerAuth |
| | | public R update(Mat mat) { |
| | | if (Cools.isEmpty(mat) || null == mat.getId()) { |
| | | return R.error(); |
| | | } |
| | | mat.setUpdateBy(getUserId()); |
| | | mat.setLocType(mat.getTagId()); |
| | | mat.setUpdateTime(new Date()); |
| | | matService.updateById(mat); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("mat/batch/auth") |
| | | @ManagerAuth |
| | | public R batchUpdate(@RequestBody BatchMatsUpdateParam params) { |
| | | |
| | | return matService.batchInfo(params); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<Mat> list = JSONArray.parseArray(param, Mat.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (Mat entity : list){ |
| | | for (Mat entity : list) { |
| | | if (!matService.delete(new EntityWrapper<>(entity))) { |
| | | throw new CoolException("删除失败,请联系管理员"); |
| | | } |
| | |
| | | |
| | | @RequestMapping(value = "/mat/turn/over/list/auth") |
| | | @ManagerAuth |
| | | public R turnOverList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R turnOverList(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | return R.ok(matService.getMatTurnPage(toPage(curr, limit, param, Mat.class))); |
| | | } |
| | | |
| | | @RequestMapping("/mat/turn/over/take/site") |
| | | @ManagerAuth() |
| | | public R availableTakeSite(@RequestParam(required = false) String matnr){ |
| | | public R availableTakeSite(@RequestParam(required = false) String matnr) { |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | List<Mat> mats = matService.selectByMatnrLink(matnr); |
| | | for (Mat mat : mats) { |
| | |
| | | |
| | | @RequestMapping(value = "/mat/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("mat")); |
| | |
| | | wrapper.like("matnr", condition).or().like("maktx", condition); |
| | | Page<Mat> page = matService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Mat mat : page.getRecords()){ |
| | | for (Mat mat : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", mat.getId()); |
| | | map.put("value", mat.getMatnr() + "(" + mat.getMaktx() + ")"); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<Mat> wrapper = new EntityWrapper<Mat>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != matService.selectOne(wrapper)){ |
| | | if (null != matService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(Mat.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | , @RequestParam String param |
| | | , HttpServletResponse response) throws Exception { |
| | | AdminInterceptor.cors(response); |
| | | if (Cools.isEmpty(param)){ |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.EMPTY); |
| | | } |
| | | BufferedImage img; |
| | |
| | | @RequestMapping(value = "/mat/print/auth") |
| | | @ManagerAuth(memo = "商品编码打印") |
| | | public R matCodePrint(@RequestParam(value = "param[]") String[] param) { |
| | | if(Cools.isEmpty(param)) { |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(CodeRes.EMPTY); |
| | | } |
| | | List<MatPrint> res = new ArrayList<>(); |
| | | for (String matnr : param){ |
| | | for (String matnr : param) { |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | // 打印数据注入 |
| | | MatPrint print = new MatPrint(); |
| | |
| | | public R matExcelImport(MultipartFile file) throws IOException { |
| | | MatExcelListener listener = new MatExcelListener(getUserId()); |
| | | EasyExcel.read(file.getInputStream(), MatExcel.class, listener).sheet().doRead(); |
| | | return R.ok("成功同步"+listener.getTotal()+"条商品数据"); |
| | | return R.ok("成功同步" + listener.getTotal() + "条商品数据"); |
| | | } |
| | | |
| | | /*************************************** xm-select ***********************************************/ |
| | |
| | | return mobileService.pickMats(matnr, orderNo); |
| | | } |
| | | |
| | | @PostMapping("/scan/order/mats") |
| | | @ManagerAuth(memo = "扫码获取组托物料") |
| | | public R scanMats(@RequestBody PakinMatsByQRParams params) { |
| | | if (Objects.isNull(params)) { |
| | | return R.parse("参数不能为空!!"); |
| | | } |
| | | return mobileService.getMatsByQRcode(params); |
| | | } |
| | | |
| | | // 商品上架 |
| | | @RequestMapping("/mat/onSale/auth") |
| | | @ManagerAuth |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/cache/out/call") |
| | | @ApiOperation("呼叫AGV搬运") |
| | | @ManagerAuth |
| | | public R OutCallAgv(@RequestBody AgvCallParams params) { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | return mobileService.OutCallAgv(params, getUserId()); |
| | | } |
| | | |
| | | |
| | | // 组托 ---------------------------------------------------------------------------------------------------- |
| | | |
| | |
| | | } |
| | | Mat mat = new Mat(); |
| | | mat.setTagId(tagService.getTop().getId()); |
| | | mat.setLocType(tagService.getTop().getId()); |
| | | mat.setMatnr(barcode); |
| | | mat.setMaktx(barcode); |
| | | mat.setStatus(1); |
| | |
| | | |
| | | @RequestMapping(value = "/task/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R list(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<Task> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(Task.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "desc".equals(orderByType)); |
| | | } |
| | | if (Cools.isEmpty(orderByField)) { |
| | | wrapper.orderDesc(Arrays.asList("wrk_no")); |
| | | } |
| | | return R.ok(taskService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | if (val.contains(RANGE_TIME_LINK)) { |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/task/update/auth") |
| | | @ManagerAuth |
| | | public R update(Task task){ |
| | | if (Cools.isEmpty(task) || null==task.getId()){ |
| | | @RequestMapping(value = "/task/update/auth") |
| | | @ManagerAuth |
| | | public R update(Task task) { |
| | | if (Cools.isEmpty(task) || null == task.getId()) { |
| | | return R.error(); |
| | | } |
| | | taskService.updateById(task); |
| | |
| | | |
| | | @RequestMapping(value = "/task/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | taskService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/task/control") |
| | | @ManagerAuth(memo = "手动处理工作档") |
| | | public R handControlWrkMast(@RequestParam String workNo, |
| | | @RequestParam Integer type) { |
| | | if (type == 1) { |
| | | taskService.completeWrkMast(workNo, getUserId()); |
| | | return R.ok("工作档已完成"); |
| | | } else if (type == 2) { |
| | | taskService.cancelWrkMast(workNo, getUserId()); |
| | | return R.ok("工作档已取消"); |
| | | } else if (type == 3) { |
| | | taskService.pickWrkMast(workNo, getUserId()); |
| | | return R.ok("工作档已拣料"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/task/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<Task> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("task")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<Task> page = taskService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Task task : page.getRecords()){ |
| | | for (Task task : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", task.getId()); |
| | | map.put("value", task.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<Task> wrapper = new EntityWrapper<Task>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != taskService.selectOne(wrapper)){ |
| | | if (null != taskService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(Task.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.zy.asrs.enums.CommonEnum; |
| | | import com.zy.asrs.enums.ContainerType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("asr_bas_container") |
| | | public class BasContainer implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value= "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 容器编码 |
| | | */ |
| | | @ApiModelProperty(value= "容器编码") |
| | | private String barcode; |
| | | |
| | | @ApiModelProperty("容器类型") |
| | | private Long type; |
| | | |
| | | @ApiModelProperty("是否混放") |
| | | @TableField("flag_mix") |
| | | private Integer flagMix; |
| | | |
| | | @ApiModelProperty("最大混放种类") |
| | | private Integer mixMax; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("修改时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | public BasContainer() {} |
| | | |
| | | public BasContainer(String barcode) { |
| | | this.barcode = barcode; |
| | | } |
| | | |
| | | |
| | | public String getType$() { |
| | | if (Cools.isEmpty(type)) { |
| | | return "料箱"; |
| | | } |
| | | if (type.equals(ContainerType.CONTAINER_TYPE_BOX.type)) { |
| | | return ContainerType.CONTAINER_TYPE_BOX.desc; |
| | | } else if (type.equals(ContainerType.CONTAINER_TYPE_SALVER.type)) { |
| | | return ContainerType.CONTAINER_TYPE_SALVER.desc; |
| | | } else if (type.equals(ContainerType.CONTAINER_TYPE_CAGE.type)) { |
| | | return ContainerType.CONTAINER_TYPE_CAGE.desc; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getFlagMix$() { |
| | | if (Cools.isEmpty(flagMix)) { |
| | | return null; |
| | | } |
| | | if (flagMix.equals(CommonEnum.COMMON_ENUM_N.type)) { |
| | | return CommonEnum.COMMON_ENUM_N.desc; |
| | | } else if (flagMix.equals(CommonEnum.COMMON_ENUM_Y.type)) { |
| | | return CommonEnum.COMMON_ENUM_Y.desc; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.zy.asrs.enums.LocStsType; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableField("dev_no") |
| | | private Integer devNo; |
| | | private String devNo; |
| | | |
| | | /** |
| | | * 设备描述 |
| | |
| | | @ApiModelProperty(value= "") |
| | | private String area; |
| | | |
| | | @ApiModelProperty("库区ID") |
| | | @TableField("area_id") |
| | | private String areaId; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("in_ok") |
| | | private String inOk; |
| | |
| | | |
| | | public BasStation() {} |
| | | |
| | | public BasStation(Integer devNo,String decDesc,String devMk,String inEnable,String outEnable,String autoing,String loading,String locSts,String canining,String canouting,String fronting,String rearing,String uping,String downing,Integer wrkNo,Integer ctnType,String barcode,Integer inQty,Integer row1,Date ioTime,String area,String inOk,String outOk,Short locType1,Short locType2,Short locType3,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Double stdQty,Double minWt,Double grossWt) { |
| | | public BasStation(String devNo,String decDesc,String devMk,String inEnable,String outEnable,String autoing,String loading,String locSts,String canining,String canouting,String fronting,String rearing,String uping,String downing,Integer wrkNo,Integer ctnType,String barcode,Integer inQty,Integer row1,Date ioTime,String area,String inOk,String outOk,Short locType1,Short locType2,Short locType3,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Double stdQty,Double minWt,Double grossWt) { |
| | | this.devNo = devNo; |
| | | this.decDesc = decDesc; |
| | | this.devMk = devMk; |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); |
| | | } |
| | | |
| | | public String getLocSts$() { |
| | | if (Cools.isEmpty(this.locSts)){ |
| | | return null; |
| | | } |
| | | if (this.locSts.equals(LocStsType.LOC_STS_TYPE_O.type)) { |
| | | return LocStsType.LOC_STS_TYPE_O.type + "." + LocStsType.LOC_STS_TYPE_O.desc; |
| | | } else if (this.locSts.equals(LocStsType.LOC_STS_TYPE_R.type)) { |
| | | return LocStsType.LOC_STS_TYPE_R.type + "." + LocStsType.LOC_STS_TYPE_R.desc; |
| | | } else if (this.locSts.equals(LocStsType.LOC_STS_TYPE_S.type)) { |
| | | return LocStsType.LOC_STS_TYPE_S.type + "." + LocStsType.LOC_STS_TYPE_S.desc; |
| | | } else if (this.locSts.equals(LocStsType.LOC_STS_TYPE_F.type)) { |
| | | return LocStsType.LOC_STS_TYPE_F.type + "." + LocStsType.LOC_STS_TYPE_F.desc; |
| | | } else if (this.locSts.equals(LocStsType.LOC_STS_TYPE_X.type)) { |
| | | return LocStsType.LOC_STS_TYPE_X.type + "." + LocStsType.LOC_STS_TYPE_X.desc; |
| | | } else if (this.locSts.equals(LocStsType.LOC_STS_TYPE_D.type)) { |
| | | return LocStsType.LOC_STS_TYPE_D.type + "." + LocStsType.LOC_STS_TYPE_D.desc; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getLocType1$(){ |
| | | if (null == this.locType1){ return null; } |
| | | switch (this.locType1){ |
| | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.enums.ContainerType; |
| | | import com.zy.asrs.service.BasContainerService; |
| | | import com.zy.asrs.service.TagService; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.system.entity.User; |
| | |
| | | private String manuDate; |
| | | |
| | | /** |
| | | * 品项数 |
| | | * 品项数/最大组托数量 |
| | | */ |
| | | @ApiModelProperty(value= "品项数") |
| | | @ExcelProperty(value = "品项数") |
| | |
| | | @ApiModelProperty(value= "重量") |
| | | @ExcelProperty(value = "重量") |
| | | private Double weight; |
| | | |
| | | @ApiModelProperty(value= "最大组托上限") |
| | | @ExcelProperty(value = "最大组托上限") |
| | | @TableField("up_qty") |
| | | private Double upQty; |
| | | |
| | | /** |
| | | * 长度 |
| | |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty("库位类型") |
| | | @TableField("loc_type") |
| | | @ExcelProperty(value = "库位类型") |
| | | private Long locType; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | |
| | | return null; |
| | | } |
| | | |
| | | public String getLocType$(){ |
| | | if (Cools.isEmpty(locType)) { |
| | | return "料箱"; |
| | | } |
| | | if (locType.equals(ContainerType.CONTAINER_TYPE_BOX.type)) { |
| | | return ContainerType.CONTAINER_TYPE_BOX.desc; |
| | | } else if (locType.equals(ContainerType.CONTAINER_TYPE_SALVER.type)) { |
| | | return ContainerType.CONTAINER_TYPE_SALVER.desc; |
| | | } else if (locType.equals(ContainerType.CONTAINER_TYPE_CAGE.type)) { |
| | | return ContainerType.CONTAINER_TYPE_CAGE.desc; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | | switch (this.beBatch){ |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("agv_task") |
| | | @Accessors(chain = true) |
| | | public class Task implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | @TableField("task_type") |
| | | private String taskType; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("inv_wh") |
| | | private String invWh; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private Date ymd; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String mk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("whs_type") |
| | | private Integer whsType; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 堆垛机 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机") |
| | | @TableField("crn_no") |
| | | private Integer crnNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("sheet_no") |
| | | private String sheetNo; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | @TableField("io_pri") |
| | | private Double ioPri; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("wrk_date") |
| | | private Date wrkDate; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @TableField("sta_no") |
| | | private String staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @TableField("source_sta_no") |
| | | private String sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("loc_sts") |
| | | private String locSts; |
| | | |
| | | /** |
| | | * 拣料 |
| | | */ |
| | | @ApiModelProperty(value= "拣料") |
| | | private String picking; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("link_mis") |
| | | private String linkMis; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("online_yn") |
| | | private String onlineYn; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("upd_mk") |
| | | private String updMk; |
| | | |
| | | /** |
| | | * 退出 |
| | | */ |
| | | @ApiModelProperty(value= "退出") |
| | | @TableField("exit_mk") |
| | | private String exitMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("plt_type") |
| | | private Integer pltType; |
| | | |
| | | /** |
| | | * 空板 |
| | | */ |
| | | @ApiModelProperty(value= "空板") |
| | | @TableField("empty_mk") |
| | | private String emptyMk; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @TableField("io_time") |
| | | private Date ioTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ctn_type") |
| | | private Integer ctnType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private String packed; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ove_mk") |
| | | private String oveMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("mtn_type") |
| | | private Double mtnType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("user_no") |
| | | private String userNo; |
| | | |
| | | /** |
| | | * 堆垛机启动时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机启动时间") |
| | | @TableField("crn_str_time") |
| | | private Date crnStrTime; |
| | | |
| | | /** |
| | | * 堆垛机停止时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机停止时间") |
| | | @TableField("crn_end_time") |
| | | private Date crnEndTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("plc_str_time") |
| | | private Date plcStrTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("crn_pos_time") |
| | | private Date crnPosTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("load_time") |
| | | private Double loadTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("exp_time") |
| | | private Double expTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ref_wrkno") |
| | | private Double refWrkno; |
| | | |
| | | /** |
| | | * 拣料时间 |
| | | */ |
| | | @ApiModelProperty(value= "拣料时间") |
| | | @TableField("ref_iotime") |
| | | private Date refIotime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | private Date appeTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("pause_mk") |
| | | private String pauseMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("error_time") |
| | | private Date errorTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("error_memo") |
| | | private String errorMemo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ctn_kind") |
| | | private Integer ctnKind; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("manu_type") |
| | | private String manuType; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("sc_weight") |
| | | private Double scWeight; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("log_mk") |
| | | private String logMk; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("log_err_time") |
| | | private Date logErrTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("log_err_memo") |
| | | private String logErrMemo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | // Y:销售订单出库任务 |
| | | @ApiModelProperty(value= "") |
| | | @TableField("Pdc_type") |
| | | private String PdcType; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ctn_no") |
| | | private String ctnNo; |
| | | |
| | | /** |
| | | * 满板 |
| | | */ |
| | | @ApiModelProperty(value= "满板") |
| | | @TableField("full_plt") |
| | | private String fullPlt; |
| | | |
| | | /** |
| | | * 先入品 / 双重入库 |
| | | */ |
| | | @ApiModelProperty(value= "先入品") |
| | | @TableField("pre_have") |
| | | private String preHave; |
| | | |
| | | /** |
| | | * 空操作 / 取货无箱 |
| | | */ |
| | | @ApiModelProperty(value= "空操作") |
| | | @TableField("take_none") |
| | | private String takeNone; |
| | | |
| | | public Task() {} |
| | | |
| | | public Task(String taskType) { |
| | | this.taskType = taskType; |
| | | public String getYmd$(){ |
| | | if (Cools.isEmpty(this.ymd)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ymd); |
| | | } |
| | | |
| | | // Task task = new Task( |
| | | // null // 任务类型: agv , crn |
| | | // ); |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCrnNo$(){ |
| | | BasCrnpService service = SpringUtils.getBean(BasCrnpService.class); |
| | | BasCrnp basCrnp = service.selectById(this.crnNo); |
| | | if (!Cools.isEmpty(basCrnp)){ |
| | | return String.valueOf(basCrnp.getCrnNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getWrkDate$(){ |
| | | if (Cools.isEmpty(this.wrkDate)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.wrkDate); |
| | | } |
| | | |
| | | 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 getTaskType$(){ |
| | | if (Cools.isEmpty(this.taskType)){return null;} |
| | | if (taskType.equals("agv")) { |
| | | return "AGV任务"; |
| | | } else { |
| | | return "堆垛机任务"; |
| | | } |
| | | } |
| | | |
| | | |
| | | public String getStaNo$(){ |
| | | BasStationService service = SpringUtils.getBean(BasStationService.class); |
| | | BasStation basDevp = service.selectOne(new EntityWrapper<BasStation>().eq("dev_no", this.staNo)); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceStaNo$(){ |
| | | BasStationService service = SpringUtils.getBean(BasStationService.class); |
| | | BasStation basDevp = service.selectOne(new EntityWrapper<BasStation>().eq("dev_no", this.sourceStaNo)); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | 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 getCrnStrTime$(){ |
| | | if (Cools.isEmpty(this.crnStrTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnStrTime); |
| | | } |
| | | |
| | | public String getCrnEndTime$(){ |
| | | if (Cools.isEmpty(this.crnEndTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnEndTime); |
| | | } |
| | | |
| | | public String getPlcStrTime$(){ |
| | | if (Cools.isEmpty(this.plcStrTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.plcStrTime); |
| | | } |
| | | |
| | | public String getCrnPosTime$(){ |
| | | if (Cools.isEmpty(this.crnPosTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnPosTime); |
| | | } |
| | | |
| | | public String getRefIotime$(){ |
| | | if (Cools.isEmpty(this.refIotime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.refIotime); |
| | | } |
| | | |
| | | public String getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.appeUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | public String getErrorTime$(){ |
| | | if (Cools.isEmpty(this.errorTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime); |
| | | } |
| | | |
| | | |
| | | public String getLogErrTime$(){ |
| | | if (Cools.isEmpty(this.logErrTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.logErrTime); |
| | | } |
| | | } |
| | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("agv_task_detl") |
| | | public class TaskDetl implements Serializable { |
| | | |
| | |
| | | @ApiModelProperty("起始位置") |
| | | private String orgSite; |
| | | |
| | | @ApiModelProperty("源库位") |
| | | private String orgLoc; |
| | | |
| | | @ApiModelProperty("终点位置") |
| | | private String tarSite; |
| | | |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "BatchMatsUpdateParam", description = "批量修改参数") |
| | | public class BatchMatsUpdateParam { |
| | | |
| | | @ApiModelProperty("ids") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty("库位类型") |
| | | private Long type; |
| | | |
| | | @ApiModelProperty("组托上限") |
| | | private Double upQty; |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "ContainerParams",description = "容器初始化参数") |
| | | public class ContainerParams implements Serializable { |
| | | |
| | | @ApiModelProperty("起点") |
| | | private Integer start; |
| | | |
| | | @ApiModelProperty("终点") |
| | | private Integer end; |
| | | |
| | | @ApiModelProperty("类型") |
| | | private Long type; |
| | | |
| | | @ApiModelProperty("是否初始化") |
| | | private Integer flagInit; |
| | | |
| | | @ApiModelProperty("长度") |
| | | private Integer length; |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class PakinMatsByQRParams { |
| | | |
| | | @ApiModelProperty("订单号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty("物料编码") |
| | | private String matnr; |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.enums; |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/25 |
| | | * @description: 通用类型枚举 |
| | | * @version 1.0 |
| | | */ |
| | | public enum CommonEnum { |
| | | |
| | | //通用类型 |
| | | COMMON_ENUM_Y(1, "是"), |
| | | //通用 |
| | | COMMON_ENUM_N(0, "否"); |
| | | |
| | | public Integer type; |
| | | |
| | | public String desc; |
| | | |
| | | CommonEnum(Integer type, String desc) { |
| | | this.type = type; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.enums; |
| | | |
| | | public enum ContainerType { |
| | | |
| | | //料箱 |
| | | CONTAINER_TYPE_BOX("12", "料箱"), |
| | | //托盘 |
| | | CONTAINER_TYPE_SALVER("14", "托盘"), |
| | | |
| | | CONTAINER_TYPE_CAGE("13", "笼框"), |
| | | |
| | | CONTAINER_TYPE_CAR("3", "台车"), |
| | | ; |
| | | |
| | | public Long type; |
| | | |
| | | public String desc; |
| | | |
| | | ContainerType(String type, String desc) { |
| | | this.type = Long.valueOf(type); |
| | | this.desc = desc; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.enums; |
| | | |
| | | public enum MatTagType { |
| | | //中件 |
| | | MAT_TAGT_YPE_MIDDLE("13", "中件"), |
| | | //小件 |
| | | MAT_TAGT_YPE_SMALL("12", "小件"), |
| | | //滤芯 |
| | | MAT_TAGT_YPE_XIN("14", "滤芯") |
| | | ; |
| | | |
| | | public String id; |
| | | |
| | | public String type; |
| | | |
| | | MatTagType(String id, String type) { |
| | | this.type = type; |
| | | this.id = id; |
| | | } |
| | | } |
| File was renamed from src/main/java/com/zy/asrs/mapper/AutoMoveMapper.java |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.AutoMove; |
| | | import com.zy.asrs.entity.BasContainer; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface AutoMoveMapper extends BaseMapper<AutoMove> { |
| | | public interface BasContainerMapper extends BaseMapper<BasContainer> { |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface TaskMapper extends BaseMapper<Task> { |
| | | |
| | | List<Task> selectToBeCompleteData(); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.BasContainer; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.param.ContainerParams; |
| | | |
| | | public interface BasContainerService extends IService<BasContainer> { |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/26 |
| | | * @description: TODO |
| | | * @version 1.0 |
| | | */ |
| | | R init(ContainerParams container); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.param.BatchMatsUpdateParam; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | Mat selectNewUpdateTime(); |
| | | |
| | | R batchInfo(BatchMatsUpdateParam params); |
| | | } |
| | |
| | | * @version 1.0 |
| | | */ |
| | | R callAgvMove(AgvCallParams params, Long userId); |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/24 |
| | | * @description: 获取单据物料信息 |
| | | * @version 1.0 |
| | | */ |
| | | R getMatsByQRcode(PakinMatsByQRParams params); |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/24 |
| | | * @description: 呼叫AGV出库搬运 |
| | | * @version 1.0 |
| | | */ |
| | | R OutCallAgv(AgvCallParams params, Long userId); |
| | | } |
| | |
| | | |
| | | public interface TaskDetlLogService extends IService<TaskDetlLog> { |
| | | |
| | | boolean save(Integer wrkNo); |
| | | } |
| | |
| | | |
| | | public interface TaskLogService extends IService<TaskLog> { |
| | | |
| | | boolean save(Integer wrkNo); |
| | | } |
| | |
| | | import com.zy.asrs.entity.Task; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface TaskService extends IService<Task> { |
| | | |
| | | void completeWrkMast(String workNo, Long userId); |
| | | |
| | | void cancelWrkMast(String workNo, Long userId); |
| | | |
| | | void pickWrkMast(String workNo, Long userId); |
| | | |
| | | List<Task> selectToBeCompleteData(); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.param.ContainerParams; |
| | | import com.zy.asrs.enums.CommonEnum; |
| | | import com.zy.asrs.enums.ContainerType; |
| | | import com.zy.asrs.mapper.BasContainerMapper; |
| | | import com.zy.asrs.entity.BasContainer; |
| | | import com.zy.asrs.service.BasContainerService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.apache.tika.utils.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.awt.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @Service("basContainerService") |
| | | public class BasContainerServiceImpl extends ServiceImpl<BasContainerMapper, BasContainer> implements BasContainerService { |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/26 |
| | | * @description: 容器初始化 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R init(ContainerParams container) { |
| | | Integer length = 7; |
| | | if (Objects.isNull(container.getType())) { |
| | | throw new CoolException("容器类型不能为空!"); |
| | | } |
| | | if (!Objects.isNull(container.getLength())) { |
| | | length = container.getLength(); |
| | | } |
| | | if (!Objects.isNull(container.getFlagInit()) && container.getFlagInit().equals(CommonEnum.COMMON_ENUM_Y.type)) { |
| | | this.delete(new EntityWrapper<>()); |
| | | } |
| | | for (int i = container.getStart(); i <= container.getEnd(); i++) { |
| | | BasContainer basContainer = new BasContainer(); |
| | | String prefix = "", ruleCode = ""; |
| | | if (container.getType().equals(ContainerType.CONTAINER_TYPE_BOX.type)) { |
| | | prefix = "LX2"; |
| | | basContainer.setMixMax(3); |
| | | } else if (container.getType().equals(ContainerType.CONTAINER_TYPE_CAGE.type)) { |
| | | prefix = "LK3"; |
| | | basContainer.setMixMax(2); |
| | | } else if (container.getType().equals(ContainerType.CONTAINER_TYPE_SALVER.type)) { |
| | | prefix = "TP4"; |
| | | basContainer.setMixMax(2); |
| | | } |
| | | ruleCode = prefix + StringUtils.leftPad(i + "", length, "0"); |
| | | basContainer.setType(container.getType()) |
| | | .setCreateTime(new Date()) |
| | | .setUpdateTime(new Date()) |
| | | .setId(null) |
| | | .setFlagMix(1) |
| | | .setBarcode(ruleCode); |
| | | if (!this.insert(basContainer)) { |
| | | throw new CoolException("容器保存失败!!"); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.param.BatchMatsUpdateParam; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.mapper.MatMapper; |
| | | import com.zy.asrs.service.MatService; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | return this.baseMapper.selectNewUpdateTime(); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/26 |
| | | * @description: 批量修改物料信息 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R batchInfo(BatchMatsUpdateParam params) { |
| | | List<Long> ids = params.getIds(); |
| | | List<Mat> mats = this.baseMapper.selectList(new EntityWrapper<Mat>().in("id", ids)); |
| | | mats.forEach(mat -> { |
| | | mat.setLocType(params.getType()); |
| | | mat.setUpQty(params.getUpQty()); |
| | | if (this.updateById(mat)) { |
| | | throw new CoolException("物料信息修改失败!!"); |
| | | } |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public Page<Mat> getMatTurnPage(Page<Mat> page){ |
| | | page.setRecords(baseMapper.getMatTurnPage(page.getCondition())); |
| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.enums.CommonEnum; |
| | | import com.zy.asrs.enums.LocStsType; |
| | | import com.zy.asrs.mapper.LocMastMapper; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 移动端服务核心类 |
| | |
| | | |
| | | @Resource |
| | | private OrderDetlPakoutService orderDetlPakoutService; |
| | | |
| | | @Autowired |
| | | private LocCacheService locCacheService; |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @Autowired |
| | | private TaskDetlService taskDetlService; |
| | | @Autowired |
| | | private BasStationService basStationService; |
| | | @Autowired |
| | | private BasContainerService basContainerService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | } |
| | | // 判断是否有相同条码的数据 |
| | | if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | | eq("zpallet", param.getBarcode()) |
| | | .eq("io_status", "N")) > 0) { |
| | | throw new CoolException(param.getBarcode() + "数据正在进行入库"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | |
| | | // 无单组托 |
| | | if (Cools.isEmpty(param.getOrderNo())) { |
| | | // 生成入库通知档 |
| | |
| | | } |
| | | }); |
| | | |
| | | |
| | | for (DetlDto detlDto : detlDtos) { |
| | | Mat mat = matService.selectByMatnr(detlDto.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(detlDto.getMatnr() + "商品档案不存在"); |
| | | } |
| | | if (mat.getUpQty().compareTo(detlDto.getAnfme()) < 0) { |
| | | throw new CoolException("物料:" + detlDto.getMatnr() + "单次最大组托上限为:" + mat.getUpQty()); |
| | | } |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | BeanUtils.copyProperties(mat, waitPakin); |
| | | waitPakin.setBatch(detlDto.getBatch()); |
| | | waitPakin.setZpallet(param.getBarcode()); // 托盘码 |
| | | waitPakin.setIoStatus("N"); // 入出状态 |
| | | waitPakin.setAnfme(detlDto.getAnfme()); // 数量 |
| | | waitPakin.setStatus("Y"); // 状态 |
| | | waitPakin.setZpallet(param.getBarcode()); |
| | | waitPakin.setIoStatus("N"); |
| | | waitPakin.setAnfme(detlDto.getAnfme()); |
| | | waitPakin.setStatus("Y"); |
| | | waitPakin.setAppeUser(userId); |
| | | waitPakin.setAppeTime(now); |
| | | waitPakin.setModiUser(userId); |
| | |
| | | // 关联组托 |
| | | } else { |
| | | // Order order = orderService.selectByNo(param.getOrderNo()); |
| | | Order order = OrderInAndOutUtil.selectByNo(Boolean.TRUE, param.getOrderNo()); |
| | | if (Cools.isEmpty(order) || order.getSettle() > 2) { |
| | | throw new CoolException("单据编号已过期"); |
| | | } |
| | | // 生成入库通知档 |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | param.getCombMats().forEach(elem -> { |
| | | Order order = OrderInAndOutUtil.selectByNo(Boolean.TRUE, elem.getOrderNo()); |
| | | if (Cools.isEmpty(order) || order.getSettle() > 2) { |
| | | throw new CoolException("单据编号已过期"); |
| | | } |
| | | // 订单明细数量校验 |
| | | // OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.TRUE, order.getId(), elem.getMatnr(), elem.getBatch(), elem.getBrand(), elem.getStandby1(), elem.getStandby2(), elem.getStandby3(), |
| | | // elem.getBoxType1(), elem.getBoxType2(), elem.getBoxType3()); |
| | |
| | | elem.getBoxType1(), elem.getBoxType2(), elem.getBoxType3(), elem.getAnfme()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getBrand(), elem.getStandby1(), elem.getStandby2(), elem.getStandby3(), |
| | | elem.getBoxType1(), elem.getBoxType2(), elem.getBoxType3(), elem.getAnfme()); |
| | | detlDto.setOrderId(order.getId()); |
| | | detlDto.setOrderNo(order.getOrderNo()); |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.findDto(detlDtos, detlDto); |
| | | assert one != null; |
| | |
| | | detlDtos.add(detlDto); |
| | | } |
| | | }); |
| | | |
| | | BasContainer container = basContainerService.selectOne(new EntityWrapper<BasContainer>().eq("barcode", param.getBarcode())); |
| | | if (Objects.isNull(container)) { |
| | | throw new CoolException("数据错误:容器码不存在!!"); |
| | | } |
| | | if (container.getMixMax() < detlDtos.size()) { |
| | | throw new CoolException("超出容器最大混装数量,当前容器最大数量为:" + container.getMixMax() + "!!"); |
| | | } |
| | | Set<String> matnrs = detlDtos.stream().map(DetlDto::getMatnr).collect(Collectors.toSet()); |
| | | List<Mat> mats = matService.selectList(new EntityWrapper<Mat>().in("matnr", matnrs)); |
| | | Set<Long> tagIds = mats.stream().map(Mat::getTagId).collect(Collectors.toSet()); |
| | | if (tagIds.size() > 1) { |
| | | throw new CoolException("组托物料类型不一致,只有相同的物料分类才可以组托!!"); |
| | | } |
| | | //还可以放入多少种物料 |
| | | Integer suplus = container.getMixMax(); |
| | | for (DetlDto detlDto : detlDtos) { |
| | | Mat mat = matService.selectByMatnr(detlDto.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(detlDto.getMatnr() + "商品档案不存在"); |
| | | } |
| | | //最多可放数量 |
| | | Double singleMax = mat.getUpQty() * suplus; |
| | | if (singleMax.compareTo(detlDto.getAnfme()) < 0) { |
| | | throw new CoolException("物料:" + detlDto.getMatnr() + "单次组托上限为:" + mat.getUpQty() + ",当前总量超出托盘装载上限!!"); |
| | | } |
| | | BigDecimal decimal = new BigDecimal(detlDto.getAnfme() / mat.getUpQty()); |
| | | //当前物料需要占用料箱格数 |
| | | Integer curr = decimal.setScale(0, RoundingMode.CEILING).intValue(); |
| | | suplus = suplus - curr; |
| | | if (suplus < 0) { |
| | | throw new CoolException("物料:" + detlDto.getMatnr() + ", 超出当前托盘装载上限!!"); |
| | | } |
| | | |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | BeanUtils.copyProperties(mat, waitPakin); |
| | | // waitPakin.sync(mat); |
| | | waitPakin.setOrderNo(order.getOrderNo()); // 单据编号 |
| | | waitPakin.setOrderId(order.getId()); |
| | | waitPakin.setOrderNo(detlDto.getOrderNo()); // 单据编号 |
| | | waitPakin.setOrderId(detlDto.getOrderId()); |
| | | waitPakin.setBatch(detlDto.getBatch()); // 序列码 |
| | | waitPakin.setZpallet(param.getBarcode()); // 托盘码 |
| | | waitPakin.setIoStatus("N"); // 入出状态 |
| | |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
| | | } |
| | | // orderService.updateSettle(order.getId(), 2L, userId); |
| | | OrderInAndOutUtil.updateOrder(Boolean.TRUE, order.getId(), 2L, userId); |
| | | |
| | | Set<String> stringSet = param.getCombMats().stream().map(CombParam.CombMat::getOrderNo).collect(Collectors.toSet()); |
| | | stringSet.forEach(orderNo -> { |
| | | Order order = OrderInAndOutUtil.selectByNo(Boolean.TRUE, orderNo); |
| | | OrderInAndOutUtil.updateOrder(Boolean.TRUE, order.getId(), 2L, userId); |
| | | }); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/24 |
| | | * @description: 获取订单物料信息 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public R getMatsByQRcode(PakinMatsByQRParams params) { |
| | | if (Objects.isNull(params)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | if (Objects.isNull(params.getOrderNo())) { |
| | | throw new CoolException("单号不能为空!!"); |
| | | } |
| | | OrderPakin orderPakin = orderPakinService.selectOne(new EntityWrapper<OrderPakin>().eq("order_no", params.getOrderNo())); |
| | | if (Objects.isNull(orderPakin)) { |
| | | throw new CoolException("数据错误:单据不存在!!"); |
| | | } |
| | | List<OrderDetlPakin> detlPakins = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>() |
| | | .eq(!Cools.isEmpty(params.getMatnr()), "matnr", params.getMatnr()) |
| | | .eq("order_id", orderPakin.getId())); |
| | | if (Objects.isNull(detlPakins) || detlPakins.isEmpty()) { |
| | | throw new CoolException("数据错误: 单据明细不存在!!"); |
| | | } |
| | | |
| | | return R.ok().add(detlPakins); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/24 |
| | | * @description: AGV呼叫搬运 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public R OutCallAgv(AgvCallParams params, Long userId) { |
| | | LocCache locCaches = locCacheService.selectOne(new EntityWrapper<LocCache>() |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_F.type) |
| | | .eq("frozen", 0) |
| | | .orderDesc(Arrays.asList("sort", "first_time")) |
| | | .last("OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY")); |
| | | if (Objects.isNull(locCaches)) { |
| | | throw new CoolException("暂无满足需求库位!"); |
| | | } |
| | | BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>() |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type) |
| | | .eq("dev_no", params.getTarSite())); |
| | | if (Objects.isNull(station)) { |
| | | throw new CoolException("站点正在执行任务!!"); |
| | | } |
| | | |
| | | generateOutTask(station, locCaches, userId); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/25 |
| | | * @description: 呼叫AGV生成出库任务 |
| | | * @version 1.0 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void generateOutTask(BasStation station, LocCache loc, Long userId) { |
| | | // 获取工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.PICK.type); |
| | | // 保存工作档 |
| | | Task task = new Task(); |
| | | task.setWrkNo(workNo) |
| | | .setIoTime(new Date()) |
| | | .setWrkSts(11L) // 工作状态:11.生成出库ID |
| | | .setIoType(101) // 入出库状态: 11.库格移载 |
| | | .setTaskType("agv") |
| | | .setIoPri(10D) |
| | | .setFullPlt("Y") // 满板:Y |
| | | .setPicking("N") // 拣料 |
| | | .setExitMk("N")// 退出 |
| | | .setStaNo(station.getDevNo()) |
| | | .setSourceLocNo(loc.getLocNo()) |
| | | .setEmptyMk(loc.getLocSts().equals("D") ? "Y" : "N")// 空板 |
| | | .setBarcode(loc.getBarcode())// 托盘码 |
| | | .setLinkMis("N") |
| | | .setAppeUser(userId) |
| | | .setAppeTime(new Date()) |
| | | .setModiUser(userId) |
| | | .setModiTime(new Date()); |
| | | if (!taskService.insert(task)) { |
| | | throw new CoolException("保存工作档失败"); |
| | | } |
| | | List<LocDetl> detls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_id", loc.getId())); |
| | | if (Objects.isNull(detls) || detls.isEmpty()) { |
| | | throw new CoolException("数据错误:库位明细为空!!"); |
| | | } |
| | | List<TaskDetl> taskDetls = new ArrayList<>(); |
| | | detls.forEach(pakin -> { |
| | | TaskDetl wrkDetl = new TaskDetl(); |
| | | BeanUtils.copyProperties(pakin, wrkDetl); |
| | | wrkDetl.setWrkNo(workNo) |
| | | .setIoTime(new Date()) |
| | | .setOrderNo(pakin.getOrderNo()) |
| | | .setAnfme(pakin.getAnfme()) |
| | | .setZpallet(pakin.getZpallet()) |
| | | .setBatch(pakin.getBatch()) |
| | | .setMatnr(pakin.getMatnr()) |
| | | .setMaktx(pakin.getMaktx()) |
| | | .setAppeUser(userId) |
| | | .setUnit(pakin.getUnit()) |
| | | .setModel(pakin.getModel()) |
| | | .setAppeTime(new Date()) |
| | | .setModiUser(userId); |
| | | taskDetls.add(wrkDetl); |
| | | }); |
| | | |
| | | //保存工作档明细 |
| | | if (!taskDetlService.insertBatch(taskDetls)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | |
| | | loc.setLocSts(LocStsType.LOC_STS_TYPE_R.type); |
| | | loc.setModiUser(userId); |
| | | loc.setModiTime(new Date()); |
| | | |
| | | if (!locCacheService.updateById(loc)) { |
| | | throw new CoolException("更新库位状态信息!!"); |
| | | } |
| | | |
| | | // 修改目标站点信息 |
| | | if (station.getLocSts().equals("O")) { |
| | | station.setLocSts("S"); // S.入库预约 |
| | | station.setModiTime(new Date()); |
| | | station.setModiUser(userId); |
| | | if (!basStationService.updateById(station)) { |
| | | throw new CoolException("更新目标库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("移转失败,目标库位状态:" + station.getLocSts()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/22 |
| | | * @description: 生成AGV搬运任务 |
| | | * @version 1.0 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void generateAgvTask(String type, LocCache loc, String orgSite, String barcode, Long userId) { |
| | | WaitPakin pakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("zpallet", barcode)); |
| | | if (Objects.isNull(pakin)) { |
| | | List<WaitPakin> pakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", barcode)); |
| | | if (Objects.isNull(pakins) || pakins.isEmpty()) { |
| | | throw new CoolException("组托信息不存在!!"); |
| | | } |
| | | OrderPakin orderPakin = orderPakinService.selectById(pakin.getOrderId()); |
| | | if (Objects.isNull(orderPakin)) { |
| | | throw new CoolException("单据不能为空!!"); |
| | | } |
| | | |
| | | List<OrderDetlPakin> detls = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>().eq("order_id", pakin.getOrderId())); |
| | | if (Objects.isNull(detls) || detls.isEmpty()) { |
| | | throw new CoolException("数据错误:单据明细不存在!!"); |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | // 获取工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.PICK.type); |
| | | // 保存工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(workNo); |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | wrkMast.setIoType(11); // 入出库状态: 11.库格移载 |
| | | wrkMast.setTaskType("agv"); |
| | | wrkMast.setIoPri(10D); |
| | | wrkMast.setLocNo(loc.getLocNo()); // 目标库位 |
| | | wrkMast.setFullPlt("Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setSourceLocNo(orgSite); |
| | | wrkMast.setEmptyMk(loc.getLocSts().equals("D") ? "Y" : "N"); // 空板 |
| | | wrkMast.setBarcode(barcode); // 托盘码 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setAppeUser(userId); |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.insert(wrkMast)) { |
| | | Task task = new Task(); |
| | | task.setWrkNo(workNo) |
| | | .setIoTime(new Date()) |
| | | .setWrkSts(1L) // 工作状态:11.生成出库ID |
| | | .setIoType(1) // 入出库状态: 11.库格移载 |
| | | .setTaskType("agv") |
| | | .setIoPri(10D) |
| | | .setLocNo(loc.getLocNo()) // 目标库位 |
| | | .setFullPlt("Y") // 满板:Y |
| | | .setPicking("N") // 拣料 |
| | | .setExitMk("N")// 退出 |
| | | .setSourceStaNo(orgSite) |
| | | .setEmptyMk(loc.getLocSts().equals("D") ? "Y" : "N")// 空板 |
| | | .setBarcode(barcode)// 托盘码 |
| | | .setLinkMis("N") |
| | | .setAppeUser(userId) |
| | | .setAppeTime(new Date()) |
| | | .setModiUser(userId) |
| | | .setModiTime(new Date()); |
| | | if (!taskService.insert(task)) { |
| | | throw new CoolException("保存工作档失败"); |
| | | } |
| | | |
| | | List<WrkDetl> taskDetls = new ArrayList<>(); |
| | | detls.forEach(detl -> { |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | BeanUtils.copyProperties(detl, wrkDetl); |
| | | List<TaskDetl> taskDetls = new ArrayList<>(); |
| | | pakins.forEach(pakin -> { |
| | | TaskDetl wrkDetl = new TaskDetl(); |
| | | BeanUtils.copyProperties(pakin, wrkDetl); |
| | | wrkDetl.setWrkNo(workNo) |
| | | .setIoTime(new Date()) |
| | | .setAnfme(detl.getAnfme()) |
| | | .setOrderNo(pakin.getOrderNo()) |
| | | .setAnfme(pakin.getAnfme()) |
| | | .setZpallet(pakin.getZpallet()) |
| | | .setBatch(detl.getBatch()) |
| | | .setMatnr(detl.getMatnr()) |
| | | .setMaktx(detl.getMaktx()) |
| | | .setBatch(pakin.getBatch()) |
| | | .setMatnr(pakin.getMatnr()) |
| | | .setMaktx(pakin.getMaktx()) |
| | | .setAppeUser(userId) |
| | | .setUnit(detl.getUnit()) |
| | | .setModel(detl.getModel()) |
| | | .setUnit(pakin.getUnit()) |
| | | .setModel(pakin.getModel()) |
| | | .setAppeTime(new Date()) |
| | | .setModiUser(userId); |
| | | taskDetls.add(wrkDetl); |
| | | }); |
| | | |
| | | //保存工作档明细 |
| | | if (!wrkDetlService.insertBatch(taskDetls)) { |
| | | if (!taskDetlService.insertBatch(taskDetls)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | // 修改目标库位状态 |
| | | if (loc.getLocSts().equals("O")) { |
| | | loc.setLocSts("S"); // S.入库预约 |
| | | loc.setModiTime(now); |
| | | loc.setModiTime(new Date()); |
| | | loc.setModiUser(userId); |
| | | if (!locCacheService.updateById(loc)) { |
| | | throw new CoolException("更新目标库位状态失败"); |
| | |
| | | tagId = tagService.getTop().getId(); |
| | | } |
| | | mat.setTagId(tagId); |
| | | mat.setLocType(tagId); |
| | | mat.setMatnr(analyse.getMatnr()); |
| | | mat.setMaktx(param.getMaterialName()); |
| | | mat.setSpecs(param.getConfigureDesc()); |
| | |
| | | // mat.setModel(param.getModel()); |
| | | |
| | | mat.setTagId(tagId); |
| | | mat.setLocType(tagId); |
| | | mat.setStatus(1); |
| | | mat.setCreateTime(now); |
| | | mat.setUpdateTime(now); |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.Task; |
| | | import com.zy.asrs.entity.TaskDetl; |
| | | import com.zy.asrs.entity.TaskLog; |
| | | import com.zy.asrs.mapper.TaskDetlLogMapper; |
| | | import com.zy.asrs.entity.TaskDetlLog; |
| | | import com.zy.asrs.service.TaskDetlLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.service.TaskDetlService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @Service("taskDetlLogService") |
| | | public class TaskDetlLogServiceImpl extends ServiceImpl<TaskDetlLogMapper, TaskDetlLog> implements TaskDetlLogService { |
| | | |
| | | @Autowired |
| | | private TaskDetlService taskDetlService; |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean save(Integer wrkNo) { |
| | | List<TaskDetl> detls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", wrkNo)); |
| | | if (Objects.isNull(detls) || detls.isEmpty()) { |
| | | throw new CoolException("数据错误:任务不存在!!"); |
| | | } |
| | | detls.forEach(detl -> { |
| | | TaskDetlLog detlLog = new TaskDetlLog(); |
| | | BeanUtils.copyProperties(detl, detlLog); |
| | | detlLog.setId(null); |
| | | detlLog.setLogId(detl.getId()); |
| | | if (!this.insert(detlLog)) { |
| | | throw new CoolException("工作档明细历史保存失败!!"); |
| | | } |
| | | }); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.Task; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | import com.zy.asrs.mapper.TaskLogMapper; |
| | | import com.zy.asrs.entity.TaskLog; |
| | | import com.zy.asrs.service.TaskLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.service.TaskService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | @Service("taskLogService") |
| | | public class TaskLogServiceImpl extends ServiceImpl<TaskLogMapper, TaskLog> implements TaskLogService { |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/23 |
| | | * @description: 保存任务日志 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean save(Integer wrkNo) { |
| | | Task task = taskService.selectOne(new EntityWrapper<Task>().eq("wrk_no", wrkNo)); |
| | | if (Objects.isNull(task)) { |
| | | throw new CoolException("数据错误:任务不存在!!"); |
| | | } |
| | | TaskLog taskLog = new TaskLog(); |
| | | BeanUtils.copyProperties(task, taskLog); |
| | | taskLog.setLogId(task.getId()); |
| | | |
| | | if (!this.insert(taskLog)) { |
| | | throw new CoolException("任务日志保存失败!!"); |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.mapper.TaskMapper; |
| | | import com.zy.asrs.entity.Task; |
| | | import com.zy.asrs.service.TaskService; |
| | | import com.zy.asrs.service.*; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Service("taskService") |
| | | public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService { |
| | | |
| | | @Autowired |
| | | private TaskLogService taskLogService; |
| | | @Autowired |
| | | private LocCacheService locCacheService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private TaskDetlService taskDetlService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private TaskDetlLogService taskDetlLogService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void completeWrkMast(String workNo, Long userId) { |
| | | Task wrkMast = this.selectOne(new EntityWrapper<Task>().eq("wrk_no", workNo)); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException(workNo + "工作档不存在"); |
| | | } |
| | | if (wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() == 14) { |
| | | throw new CoolException("当前工作档已完成"); |
| | | } |
| | | // 入库 + 库位转移 |
| | | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType() == 11)) { |
| | | wrkMast.setWrkSts(4L); |
| | | // 出库 |
| | | } else if (wrkMast.getWrkSts() > 10) { |
| | | wrkMast.setWrkSts(14L); |
| | | } |
| | | Date now = new Date(); |
| | | wrkMast.setCrnStrTime(DateUtils.calculate(now, 1L, TimeUnit.SECONDS, true)); |
| | | wrkMast.setCrnEndTime(now); |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | // 完成操作人员记录 |
| | | wrkMast.setManuType("手动完成"); |
| | | if (!this.updateById(wrkMast)) { |
| | | throw new CoolException("修改工作档失败"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void pickWrkMast(String workNo, Long userId) { |
| | | Task wrkMast = this.selectById(workNo); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException(workNo + "工作档不存在"); |
| | | } |
| | | // 入出库类型判断 |
| | | if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 104 && wrkMast.getIoType() != 107) { |
| | | throw new CoolException("当前入出库类型无法进行操作"); |
| | | } |
| | | // 工作状态判断 |
| | | if (wrkMast.getWrkSts() < 11 || wrkMast.getWrkSts() == 15) { |
| | | throw new CoolException("当前工作状态无法进行操作"); |
| | | } |
| | | // 保存工作明细档历史档 |
| | | // if (!wrkDetlLogService.save(wrkMast.getWrkNo())) { |
| | | // throw new CoolException("保存工作明细档历史档失败"); |
| | | // } |
| | | // 保存工作主档历史档 |
| | | if (!taskLogService.save(wrkMast.getWrkNo())) { |
| | | throw new CoolException("保存工作主档历史档失败"); |
| | | } |
| | | // 获取目标站 |
| | | // Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | // .eq("type_no", wrkMast.getIoType() - 50) |
| | | // .eq("stn_no", wrkMast.getStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | // .eq("crn_no", wrkMast.getCrnNo()); // 堆垛机号 |
| | | // StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | // if (Cools.isEmpty(staDesc)) { |
| | | // throw new CoolException("入库路径不存在"); |
| | | // } |
| | | Date now = new Date(); |
| | | // 堆垛机站点(目标站) |
| | | // Integer staNo = staDesc.getCrnStn(); |
| | | // 更新工作档数据状态 |
| | | wrkMast.setIoType(wrkMast.getIoType() - 50); // 入出库类型: 103->53,104->54,107->57 |
| | | wrkMast.setWrkSts(2L); // 工作状态: 2.设备上走 |
| | | wrkMast.setSourceStaNo(wrkMast.getStaNo()); // 源站 |
| | | // wrkMast.setStaNo(staNo + ""); // 目标站 |
| | | wrkMast.setLocNo(wrkMast.getSourceLocNo()); // 目标库位 = 出库时的源库位 |
| | | wrkMast.setSourceLocNo(""); // 源库位清空 |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | if (!this.updateById(wrkMast)) { |
| | | throw new CoolException("更新工作档数据状态失败"); |
| | | } |
| | | // 修改库位状态 Q.拣料/盘点/并板再入库 |
| | | LocCache locMast = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", wrkMast.getLocNo())); |
| | | locMast.setLocSts("Q"); |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(userId); |
| | | if (!locCacheService.updateById(locMast)) { |
| | | throw new CoolException("修改库位状态失败"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<Task> selectToBeCompleteData() { |
| | | return this.baseMapper.selectToBeCompleteData(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void cancelWrkMast(String workNo, Long userId) { |
| | | Date now = new Date(); |
| | | Task wrkMast = this.selectOne(new EntityWrapper<Task>().eq("wrk_no", workNo)); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException(workNo + "工作档不存在"); |
| | | } |
| | | String locNo = ""; // 待修改目标库位 |
| | | String locSts = ""; // 待修改目标库位状态 |
| | | // 入库取消(修改目标库位) |
| | | if (wrkMast.getWrkSts() < 4) { |
| | | locNo = wrkMast.getLocNo(); |
| | | locSts = "O"; |
| | | |
| | | // 库位转移 |
| | | if (wrkMast.getIoType() == 11) { |
| | | // 库位转移:源库位 |
| | | LocCache locMast = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", wrkMast.getSourceLocNo())); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("取消库位转移失败,源库位不存在:" + wrkMast.getSourceLocNo()); |
| | | } |
| | | locMast.setLocSts(wrkMast.getFullPlt().equalsIgnoreCase("N") ? "D" : "F"); |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(userId); |
| | | locCacheService.updateById(locMast); |
| | | } |
| | | // 出库取消(修改源库位) |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14) { |
| | | locNo = wrkMast.getSourceLocNo(); |
| | | // 出库 ===>> F.在库 |
| | | if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) { |
| | | locSts = "F"; |
| | | // 空板出库 ===>> D.空桶/空栈板 |
| | | } else if (wrkMast.getIoType() == 110) { |
| | | locSts = "D"; |
| | | // 库位转移 ===>> D.空桶/空栈板 |
| | | } else if (wrkMast.getIoType() == 11) { |
| | | locSts = wrkMast.getFullPlt().equalsIgnoreCase("N") ? "D" : "F"; |
| | | // 库位转移:目标库位 |
| | | LocCache locMast = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", wrkMast.getLocNo())); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("取消库位转移失败,目标库位不存在:" + wrkMast.getSourceLocNo()); |
| | | } |
| | | locMast.setLocSts("O"); |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(userId); |
| | | locCacheService.updateById(locMast); |
| | | } |
| | | } else { |
| | | throw new CoolException("当前工作状态无法取消"); |
| | | } |
| | | |
| | | //取消入库工作档时,查询组托表,如果有将状态改为待处理 |
| | | if (wrkMast.getIoType() == 1) { |
| | | List<WaitPakin> waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | for (WaitPakin waitPakin : waitPakins) { |
| | | if (!Cools.isEmpty(waitPakin)) { |
| | | waitPakin.setIoStatus("N"); |
| | | waitPakin.setLocNo(""); |
| | | waitPakinService.update(waitPakin, new EntityWrapper<WaitPakin>() |
| | | // .eq("order_no", waitPakin.getOrderNo()) |
| | | .eq("zpallet", waitPakin.getZpallet()) |
| | | .eq("matnr", waitPakin.getMatnr()) |
| | | .eq("batch", waitPakin.getBatch())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //取消出库工作档时,查询单据管理表,回滚作业中数量 |
| | | if (wrkMast.getIoType() == 101 || wrkMast.getIoType() == 103) { |
| | | List<TaskDetl> wrkDetls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | for (TaskDetl wrkDetl : wrkDetls) { |
| | | if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | // if (!orderDetlService.decrease(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getAnfme())) { |
| | | // throw new CoolException("订单数据回滚失败"); |
| | | // } |
| | | OrderInAndOutUtil.decrease(Boolean.FALSE, wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), |
| | | wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme()); |
| | | |
| | | //修改订单主表状态,没有作业数量时才可以修改 |
| | | boolean flag = true; |
| | | // List<OrderDetl> orderDetls = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no",wrkDetl.getOrderNo())); |
| | | Order order = OrderInAndOutUtil.selectByNo(Boolean.FALSE, wrkDetl.getOrderNo()); |
| | | List<OrderDetl> orderDetls = OrderInAndOutUtil.selectByOrderId(Boolean.FALSE, order.getId()); |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | if (orderDetl.getWorkQty() > 0) { |
| | | flag = false; |
| | | } |
| | | } |
| | | if (flag) { |
| | | // Order order = orderService.selectOne(new EntityWrapper<Order>().eq("order_no",wrkDetl.getOrderNo())); |
| | | if (!Cools.isEmpty(order) && order.getSettle() == 2) { |
| | | order.setSettle(1L); |
| | | order.setUpdateBy(userId); |
| | | order.setUpdateTime(now); |
| | | } |
| | | // if(!orderService.update(order,new EntityWrapper<Order>().eq("order_no",wrkDetl.getOrderNo()))){ |
| | | // throw new CoolException("修改订单状态失败"); |
| | | // } |
| | | OrderInAndOutUtil.updateOrder(Boolean.FALSE, order.getId(), order.getSettle(), userId); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // // 订单关联 |
| | | // List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | // for (WrkDetl wrkDetl : wrkDetls) { |
| | | // if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | // if (!orderDetlService.decrease(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getAnfme())) { |
| | | // throw new CoolException("订单数据回滚失败"); |
| | | // } |
| | | // // 生成新的出库作业 |
| | | //// stockOutRe(wrkMast, wrkDetls); |
| | | // } |
| | | // } |
| | | |
| | | // 取消操作人员记录 |
| | | wrkMast.setManuType("手动取消"); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(now); |
| | | if (!taskService.updateById(wrkMast)) { |
| | | throw new CoolException("取消工作档失败"); |
| | | } |
| | | // 保存工作主档历史档 |
| | | if (!taskLogService.save(wrkMast.getWrkNo())) { |
| | | throw new CoolException("保存工作历史档失败, workNo = " + wrkMast.getWrkNo()); |
| | | } |
| | | // 删除工作主档 |
| | | boolean wrkMastRes = taskService.deleteById(wrkMast); |
| | | |
| | | if (wrkMast.getIoType() != 10 && wrkMast.getIoType() != 110) { |
| | | // 保存工作明细档历史档 |
| | | if (!taskDetlLogService.save(wrkMast.getWrkNo())) { |
| | | // throw new CoolException("保存工作明细历史档失败, workNo = " + wrkMast.getWrkNo()); |
| | | } |
| | | // 删除工作档明细 |
| | | boolean wrkDetlRes = taskDetlService.delete(new EntityWrapper<TaskDetl>().eq("wrk_no", workNo)); |
| | | } |
| | | |
| | | // 修改库位状态 |
| | | LocCache locMast = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", locNo)); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("取消工作档失败,库位不存在:" + locNo); |
| | | } |
| | | locMast.setLocSts(locSts); |
| | | locMast.setModiTime(now); |
| | | locMast.setModiUser(userId); |
| | | boolean locMastRes = locCacheService.updateById(locMast); |
| | | if (!wrkMastRes || !locMastRes) { |
| | | throw new CoolException("保存数据失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | @Transactional |
| | | public void completeWrkMast(String workNo, Long userId) { |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", workNo)); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | throw new CoolException(workNo + "工作档不存在"); |
| | | } |
| | | if (wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() == 14) { |
| | | if (wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() == 14 || wrkMast.getWrkSts() == 5 || wrkMast.getWrkSts() == 15) { |
| | | throw new CoolException("当前工作档已完成"); |
| | | } |
| | | // 入库 + 库位转移 |
| | |
| | | private OrderPakoutService orderPakoutService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | @Autowired |
| | | private AutoMoveService autoMoveService; |
| | | |
| | | |
| | | //定时出库 经典双伸 |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | |
| | | // } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | // @Scheduled(cron = "0/5 * * * * ? ") |
| | | @Async("orderThreadPool") |
| | | public void completeAndReportOrderInAndOutUtil() { |
| | | // String erpReport = Parameter.get().getErpReport(); |
| | |
| | | // } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/30 * * * * ? ") |
| | | // @Scheduled(cron = "0/30 * * * * ? ") |
| | | @Async("orderThreadPool") |
| | | public void completeAndReportOrderReport() { |
| | | if (!ErpReportOld){ |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.entity.Task; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.TaskService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkMastHandler; |
| | |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WorkMastHandler workMastHandler; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){ |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void executeTask(){ |
| | | List<Task> wrkMasts = taskService.selectToBeCompleteData(); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | | for (Task wrkMast : wrkMasts) { |
| | | ReturnT<String> returnT = workMastHandler.AgvStart(wrkMast); |
| | | if (!returnT.isSuccess()) { |
| | | wrkMast.setUpdMk("X"); |
| | | wrkMast.setErrorMemo(returnT.getMsg()); |
| | | wrkMast.setErrorTime(new Date()); |
| | | if (!taskService.updateById(wrkMast)) { |
| | | log.error("工作档[workNo={}]标记待处理失败", wrkMast.getWrkNo()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.system.timer.LoadingConfigTimer; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private LoadingConfigTimer loadingConfigTimer; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() { |
| | | Integer logDeleteDays = loadingConfigTimer.getLogDeleteDays(); |
| | | if (logDeleteDays == -1) { |
| | | return SUCCESS; |
| | | } |
| | | try { |
| | | // 删除半年以上的历史档 |
| | | jdbcTemplate.update("delete from asr_stk_hplc where dateadd(day,180,appe_time) <= getdate();"); |
| | | jdbcTemplate.update("delete from asr_wrk_detl_log where dateadd(day,1080,appe_time) <= getdate();"); |
| | | jdbcTemplate.update("delete from asr_wrk_mast_log where dateadd(day,360,appe_time) <= getdate();"); |
| | | jdbcTemplate.update("delete from cust_wait_pakin_log where dateadd(day,1080,appe_time) <= getdate();"); |
| | | jdbcTemplate.update("delete from asr_wrk_detl_log where dateadd(day," + logDeleteDays + ",appe_time) <= getdate();"); |
| | | jdbcTemplate.update("delete from asr_wrk_mast_log where dateadd(day," + logDeleteDays + ",appe_time) <= getdate();"); |
| | | jdbcTemplate.update("delete from cust_wait_pakin_log where dateadd(day," + logDeleteDays + ",appe_time) <= getdate();"); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.enums.LocStsType; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.service.impl.BasStationServiceImpl; |
| | | import com.zy.asrs.service.impl.LocCacheServiceImpl; |
| | | import com.zy.asrs.service.impl.OrderPakinServiceImpl; |
| | | import com.zy.asrs.service.impl.TaskDetlServiceImpl; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | private LocCacheService locCacheService; |
| | | @Autowired |
| | | private OrderPakinService orderPakinService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private TaskDetlService taskDetlService; |
| | | @Autowired |
| | | private BasStationServiceImpl basStationService; |
| | | |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | | // 4.入库完成 |
| | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | |
| | | public ReturnT<String> doIn(WrkMast wrkMast) { |
| | | if (wrkMast.getTaskType().equals("agv")) { |
| | | Date now = new Date(); |
| | | LocCache locCache = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", wrkMast.getLocNo())); |
| | | if (Objects.isNull(locCache)) { |
| | | throw new CoolException("数据错误,库位不存在!!"); |
| | | } |
| | | List<WaitPakin> apallet = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | if (Objects.isNull(apallet)) { |
| | | throw new CoolException("数据错误:组托数据不存在!!"); |
| | | } |
| | | |
| | | apallet.forEach(pakin -> { |
| | | LocDetl detl = new LocDetl(); |
| | | BeanUtils.copyProperties(pakin, detl); |
| | | detl.setBarcode(pakin.getBarcode()) |
| | | .setAnfme(pakin.getAnfme()) |
| | | .setBrand(pakin.getBrand()) |
| | | .setAppeTime(new Date()) |
| | | .setSpecs(pakin.getSpecs()) |
| | | .setColor(pakin.getColor()) |
| | | .setLocId(locCache.getId()) |
| | | .setLocNo(locCache.getLocNo()) |
| | | .setAreaId(locCache.getAreaId()) |
| | | .setAreaName(locCache.getAreaName()) |
| | | .setUnit(pakin.getUnit()) |
| | | .setBatch(pakin.getBatch()); |
| | | |
| | | if (!locDetlService.insert(detl)) { |
| | | throw new CoolException("库位明细保存失败!!"); |
| | | } |
| | | }); |
| | | |
| | | locCache.setLocSts(LocStsType.LOC_STS_TYPE_F.type); |
| | | locCache.setModiTime(new Date()); |
| | | locCache.setBarcode(""); |
| | | locCache.setModiTime(new Date()); |
| | | locCache.setIoTime(new Date()); |
| | | if (!locCacheService.updateById(locCache)) { |
| | | throw new CoolException("库位状态修改失败!"); |
| | | } |
| | | wrkMast.setWrkSts(5L); |
| | | wrkMast.setModiTime(new Date()); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | throw new CoolException("任务状态修改失败!!"); |
| | | } |
| | | |
| | | Set<Long> list = apallet.stream().map(WaitPakin::getOrderId).collect(Collectors.toSet()); |
| | | List<OrderPakin> pakins = orderPakinService.selectList(new EntityWrapper<OrderPakin>().in("order_id", list)); |
| | | if (Objects.isNull(pakins) || pakins.isEmpty()) { |
| | | throw new CoolException("单据不存在!!"); |
| | | } |
| | | pakins.forEach(orderPakin -> { |
| | | orderPakin.setSettle(4L); |
| | | if (!orderPakinService.updateById(orderPakin)) { |
| | | throw new CoolException("单据修改失败!!"); |
| | | } |
| | | }); |
| | | } else { |
| | | Date now = new Date(); |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | try { |
| | | if (null == locMast) { |
| | | Date now = new Date(); |
| | | LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | try { |
| | | if (null == locMast) { |
| | | // exceptionHandle("工作档[workNo={0}]库位号错误[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("工作档[workNo=" + wrkMast.getWrkNo() + "]库位号错误[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | assert locMast != null; |
| | | switch (wrkMast.getIoType()) { |
| | | // 空板入库 |
| | | case 10: |
| | | // 修改库位状态=D |
| | | if (locMast.getLocSts().equals("S") || locMast.getLocSts().equals("Q")) { |
| | | if (!Cools.isEmpty(wrkMast.getBarcode())) { |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | } |
| | | locMast.setLocSts("D"); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("工作档[workNo=" + wrkMast.getWrkNo() + "]库位号错误[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | assert locMast != null; |
| | | switch (wrkMast.getIoType()) { |
| | | // 空板入库 |
| | | case 10: |
| | | // 修改库位状态=D |
| | | if (locMast.getLocSts().equals("S") || locMast.getLocSts().equals("Q")) { |
| | | if (!Cools.isEmpty(wrkMast.getBarcode())) { |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | } |
| | | locMast.setLocSts("D"); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("空板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("空板入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | break; |
| | | // 全板入库 |
| | | case 1: |
| | | // 清除所属库位之前的库存明细 |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo())); |
| | | if (!locDetls.isEmpty()) { |
| | | locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo())); |
| | | } |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls.isEmpty()) { |
| | | // exceptionHandle("全板入库 ===>> 工作明细档不存在;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 工作明细档不存在; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | return FAIL.setMsg("空板入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | // 遍历工作明细,更新库存明细和入库通知档 |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | } |
| | | break; |
| | | // 全板入库 |
| | | case 1: |
| | | // 清除所属库位之前的库存明细 |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo())); |
| | | if (!locDetls.isEmpty()) { |
| | | locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo())); |
| | | } |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls.isEmpty()) { |
| | | // exceptionHandle("全板入库 ===>> 工作明细档不存在;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 工作明细档不存在; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | // 遍历工作明细,更新库存明细和入库通知档 |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand() |
| | | , wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(wrkDetl.getAnfme(), wrkMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3() |
| | | , wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3())) { |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand() |
| | | , wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(wrkDetl.getAnfme(), wrkMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3() |
| | | , wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3())) { |
| | | // exceptionHandle("全板入库 ===>> 更新库存明细失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 更新库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } else { |
| | | locDetl = new LocDetl(); |
| | | locDetl.sync(wrkDetl); |
| | | locDetl.setLocNo(wrkMast.getLocNo()); // 库位号 |
| | | locDetl.setAnfme(wrkDetl.getAnfme()); // 数量 |
| | | locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeTime(now); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 更新库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } else { |
| | | locDetl = new LocDetl(); |
| | | locDetl.sync(wrkDetl); |
| | | locDetl.setLocNo(wrkMast.getLocNo()); // 库位号 |
| | | locDetl.setAnfme(wrkDetl.getAnfme()); // 数量 |
| | | locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeTime(now); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | // exceptionHandle("全板入库 ===>> 添加库存明细失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 添加库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 添加库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | |
| | | // 更新订单完成数量 |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | // 更新订单完成数量 |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (orderDetlPakin == null) { |
| | | orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), |
| | | wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (orderDetlPakin == null) { |
| | | orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), |
| | | wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | } |
| | | try { |
| | | if (!Cools.isEmpty(orderDetlPakin)) { |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | } |
| | | try { |
| | | if (!Cools.isEmpty(orderDetlPakin)) { |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | // exceptionHandle("全板入库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore) { |
| | | } |
| | | |
| | | } |
| | | // 修改库位状态 S ====>> F |
| | | if (locMast.getLocSts().equals("S")) { |
| | | locMast.setLocSts("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("全板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | break; |
| | | // 拣料途中并板 |
| | | case 8: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls8 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls8.isEmpty()) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料途中并板 ===>> 工作明细档不存在; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | // 遍历工作明细,更新库存明细和入库通知档 |
| | | for (WrkDetl wrkDetl : wrkDetls8) { |
| | | |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand() |
| | | , wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(wrkDetl.getAnfme() + locDetl.getAnfme(), wrkMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3() |
| | | , wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3())) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料途中并板 ===>> 更新库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } else { |
| | | locDetl = new LocDetl(); |
| | | locDetl.sync(wrkDetl); |
| | | locDetl.setLocNo(wrkMast.getLocNo()); // 库位号 |
| | | locDetl.setAnfme(wrkDetl.getAnfme()); // 数量 |
| | | locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeTime(now); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料途中并板 ===>> 添加库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | return FAIL.setMsg("全板入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore) { |
| | | } |
| | | |
| | | if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | // 更新订单完成数量 |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料途中并板 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | // 拣料入库 |
| | | case 53: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls53 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls53.isEmpty()) { |
| | | // exceptionHandle("拣料入库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料入库 ===>> 工作明细档为空; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | for (WrkDetl wrkDetl : wrkDetls53) { |
| | | |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand() |
| | | , wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(locDetl.getAnfme() - wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3() |
| | | , wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3())) { |
| | | // exceptionHandle("拣料入库 ===>> 修改库存明细数量失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料入库 ===>> 修改库存明细数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | |
| | | // 更新订单完成数量 |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), |
| | | wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (orderDetlPakin == null) { |
| | | orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | } |
| | | try { |
| | | if (!Cools.isEmpty(orderDetlPakin)) { |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | // exceptionHandle("拣料入库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore) { |
| | | } |
| | | |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocSts().equals("Q")) { |
| | | locMast.setLocSts("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("拣料入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | break; |
| | | // 并板入库 |
| | | case 54: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls54 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls54.isEmpty()) { |
| | | // exceptionHandle("并板入库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 工作明细档为空; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | // 修改库存明细数量,如无库存,曾新增 |
| | | for (WrkDetl wrkDetl : wrkDetls54) { |
| | | |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand() |
| | | , wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3() |
| | | , wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3())) { |
| | | // exceptionHandle("并板入库 ===>> 修改库存明细数量失败;[workNo={0}],[matnr={1}]", wrkMast.getWrkNo(), wrkDetl.getMatnr()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 修改库存明细数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } else { |
| | | locDetl = new LocDetl(); |
| | | locDetl.sync(wrkDetl); |
| | | locDetl.setLocNo(wrkMast.getLocNo()); // 库位号 |
| | | locDetl.setAnfme(wrkDetl.getAnfme()); // 数量 |
| | | locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeTime(now); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 新增库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | |
| | | // 更新订单完成数量 |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | try { |
| | | if (!Cools.isEmpty(orderDetlPakin)) { |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore) { |
| | | |
| | | } |
| | | |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocSts().equals("Q")) { |
| | | locMast.setLocSts("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("并板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | break; |
| | | // 盘点入库 |
| | | case 57: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls57 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls57.isEmpty()) { |
| | | // exceptionHandle("盘点入库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("盘点入库 ===>> 工作明细档为空; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | for (WrkDetl wrkDetl : wrkDetls57) { |
| | | if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | // 更新订单完成数量 |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (!Cools.isEmpty(orderDetlPakout)) { |
| | | if (!orderDetlPakoutService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakout.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("盘点入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getSourceLocNo() + "]"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocSts().equals("Q")) { |
| | | locMast.setLocSts(wrkMast.getFullPlt().equals("Y") ? "F" : "D"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("盘点入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("盘点入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | break; |
| | | // 库位移转 |
| | | case 11: |
| | | // 默认目标库位是空板 |
| | | String locSts = "D"; |
| | | // 库位移转判断是否为空板移转 |
| | | if (wrkMast.getEmptyMk().equals("N")) { |
| | | locSts = "F"; |
| | | // 转移库存明细数据: 库存号 由工作档源库位变为目标库位 |
| | | if (!locDetlService.updateLocNo(wrkMast.getLocNo(), wrkMast.getSourceLocNo())) { |
| | | // exceptionHandle("库位移转 ===>> 转移库存明细数据失败;[源库位={0}],[目标库位={1}]", wrkMast.getSourceLocNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("库位移转 ===>> 转移库存明细数据失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | // 修改源库位状态 ==> O |
| | | LocMast sourceLoc = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | if (null != sourceLoc) { |
| | | sourceLoc.setBarcode(""); |
| | | sourceLoc.setLocSts("O"); |
| | | sourceLoc.setModiTime(now); |
| | | sourceLoc.setIoTime(now); |
| | | if (!locMastService.updateById(sourceLoc)) { |
| | | // exceptionHandle("库位移转 ===>> 修改源库位状态失败;[workNo={0}],[sourceLoc={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("库位移转 ===>> 修改源库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | // 修改目标库位状态 ==> .locSts |
| | | locMast.setLocSts(locSts); |
| | | } |
| | | // 修改库位状态 S ====>> F |
| | | if (locMast.getLocSts().equals("S")) { |
| | | locMast.setLocSts("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("库位移转 ===>> 修改目标库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | // exceptionHandle("全板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("库位移转 ===>> 修改目标库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | return FAIL.setMsg("全板入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | // 修改工作主档状态 |
| | | wrkMast.setWrkSts(5L); |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | // exceptionHandle("更新入库完成状态失败;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("更新入库完成状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | break; |
| | | // 拣料途中并板 |
| | | case 8: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls8 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls8.isEmpty()) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料途中并板 ===>> 工作明细档不存在; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | // 遍历工作明细,更新库存明细和入库通知档 |
| | | for (WrkDetl wrkDetl : wrkDetls8) { |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand() |
| | | , wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(wrkDetl.getAnfme() + locDetl.getAnfme(), wrkMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3() |
| | | , wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3())) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料途中并板 ===>> 更新库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } else { |
| | | locDetl = new LocDetl(); |
| | | locDetl.sync(wrkDetl); |
| | | locDetl.setLocNo(wrkMast.getLocNo()); // 库位号 |
| | | locDetl.setAnfme(wrkDetl.getAnfme()); // 数量 |
| | | locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeTime(now); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料途中并板 ===>> 添加库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | |
| | | if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | // 更新订单完成数量 |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料途中并板 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | // 拣料入库 |
| | | case 53: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls53 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls53.isEmpty()) { |
| | | // exceptionHandle("拣料入库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料入库 ===>> 工作明细档为空; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | for (WrkDetl wrkDetl : wrkDetls53) { |
| | | |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand() |
| | | , wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(locDetl.getAnfme() - wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3() |
| | | , wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3())) { |
| | | // exceptionHandle("拣料入库 ===>> 修改库存明细数量失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料入库 ===>> 修改库存明细数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | |
| | | // 更新订单完成数量 |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), |
| | | wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (orderDetlPakin == null) { |
| | | orderDetlPakin = orderDetlPakinService.selectItem |
| | | (wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | } |
| | | try { |
| | | if (!Cools.isEmpty(orderDetlPakin)) { |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | // exceptionHandle("拣料入库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore) { |
| | | } |
| | | |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocSts().equals("Q")) { |
| | | locMast.setLocSts("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("拣料入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("拣料入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | break; |
| | | // 并板入库 |
| | | case 54: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls54 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls54.isEmpty()) { |
| | | // exceptionHandle("并板入库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 工作明细档为空; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | // 修改库存明细数量,如无库存,曾新增 |
| | | for (WrkDetl wrkDetl : wrkDetls54) { |
| | | |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand() |
| | | , wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3() |
| | | , wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3())) { |
| | | // exceptionHandle("并板入库 ===>> 修改库存明细数量失败;[workNo={0}],[matnr={1}]", wrkMast.getWrkNo(), wrkDetl.getMatnr()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 修改库存明细数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } else { |
| | | locDetl = new LocDetl(); |
| | | locDetl.sync(wrkDetl); |
| | | locDetl.setLocNo(wrkMast.getLocNo()); // 库位号 |
| | | locDetl.setAnfme(wrkDetl.getAnfme()); // 数量 |
| | | locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeTime(now); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 新增库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | |
| | | // 更新订单完成数量 |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | try { |
| | | if (!Cools.isEmpty(orderDetlPakin)) { |
| | | if (!orderDetlPakinService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakin.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore) { |
| | | |
| | | } |
| | | |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocSts().equals("Q")) { |
| | | locMast.setLocSts("F"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("并板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("并板入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | break; |
| | | // 盘点入库 |
| | | case 57: |
| | | // 根据工作号,查询工作明细档 |
| | | List<WrkDetl> wrkDetls57 = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (wrkDetls57.isEmpty()) { |
| | | // exceptionHandle("盘点入库 ===>> 工作明细档为空;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("盘点入库 ===>> 工作明细档为空; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | for (WrkDetl wrkDetl : wrkDetls57) { |
| | | if (!Cools.isEmpty(wrkDetl.getOrderNo())) { |
| | | // 更新订单完成数量 |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (!Cools.isEmpty(orderDetlPakout)) { |
| | | if (!orderDetlPakoutService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakout.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("盘点入库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getSourceLocNo() + "]"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 修改库位状态 Q ====>> F |
| | | if (locMast.getLocSts().equals("Q")) { |
| | | locMast.setLocSts(wrkMast.getFullPlt().equals("Y") ? "F" : "D"); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("盘点入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("盘点入库 ===>> 修改库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | break; |
| | | // 库位移转 |
| | | case 11: |
| | | // 默认目标库位是空板 |
| | | String locSts = "D"; |
| | | // 库位移转判断是否为空板移转 |
| | | if (wrkMast.getEmptyMk().equals("N")) { |
| | | locSts = "F"; |
| | | // 转移库存明细数据: 库存号 由工作档源库位变为目标库位 |
| | | if (!locDetlService.updateLocNo(wrkMast.getLocNo(), wrkMast.getSourceLocNo())) { |
| | | // exceptionHandle("库位移转 ===>> 转移库存明细数据失败;[源库位={0}],[目标库位={1}]", wrkMast.getSourceLocNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("库位移转 ===>> 转移库存明细数据失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | // 修改源库位状态 ==> O |
| | | LocMast sourceLoc = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | if (null != sourceLoc) { |
| | | sourceLoc.setBarcode(""); |
| | | sourceLoc.setLocSts("O"); |
| | | sourceLoc.setModiTime(now); |
| | | sourceLoc.setIoTime(now); |
| | | if (!locMastService.updateById(sourceLoc)) { |
| | | // exceptionHandle("库位移转 ===>> 修改源库位状态失败;[workNo={0}],[sourceLoc={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("库位移转 ===>> 修改源库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } |
| | | // 修改目标库位状态 ==> .locSts |
| | | locMast.setLocSts(locSts); |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("库位移转 ===>> 修改目标库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("库位移转 ===>> 修改目标库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | // 修改工作主档状态 |
| | | wrkMast.setWrkSts(5L); |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | // exceptionHandle("更新入库完成状态失败;[workNo={0}]", wrkMast.getWrkNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("更新入库完成状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | |
| | | return SUCCESS; |
| | | } |
| | | |
| | |
| | | if (!orderDetlPakoutService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakout.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | // exceptionHandle("全板出库 ===>> 更新订单完成数量失败;[workNo={0}],[locNo={1}]", |
| | | // wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板出库 ===>> 更新订单完成数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getSourceLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore) { |
| | | |
| | | } |
| | | } |
| | | // 删除工作档源库位的库存明细 |
| | | if (!locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getSourceLocNo()))) { |
| | | // exceptionHandle("全板出库 ===>> 删除库存明细失败;[workNo={0}],[sourceLocNo={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板出库 ===>> 删除库存明细失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getSourceLocNo() + "]"); |
| | | } |
| | |
| | | locMast.setModiTime(now); |
| | | locMast.setIoTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("全板出库 ===>> 修改源库位状态失败;[workNo={0}],[sourceLocNo={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板出库 ===>> 修改源库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getSourceLocNo() + "]"); |
| | | } |
| | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/23 |
| | | * @description: AGV任务完成加入历史档 |
| | | * @version 1.0 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ReturnT<String> AgvStart(Task task) { |
| | | // 4.入库完成 |
| | | if (task.getWrkSts() == 4) { |
| | | return agvDoIn(task); |
| | | // 14.出库完成 |
| | | } else if (task.getWrkSts() == 14) { |
| | | return agvDoOut(task); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/9/25 |
| | | * @description: AGV出库任务 |
| | | * @version 1.0 |
| | | */ |
| | | public ReturnT<String> agvDoOut(Task task) { |
| | | if (task.getIoType().equals(101)) { |
| | | Date now = new Date(); |
| | | LocCache locMast = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no" ,task.getSourceLocNo())); |
| | | if (Objects.isNull(locMast)) { |
| | | throw new RuntimeException("数据错误:库位信息不能为空!!"); |
| | | } |
| | | List<TaskDetl> wrkDetls101 = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", task.getWrkNo())); |
| | | if (wrkDetls101.isEmpty()) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板出库 ===>> 工作明细档为空; [workNo=" + task.getWrkNo() + "],[locNo=" + task.getSourceLocNo() + "]"); |
| | | } |
| | | for (TaskDetl wrkDetl : wrkDetls101) { |
| | | // 更新订单完成数量 |
| | | OrderDetlPakout orderDetlPakout = orderDetlPakoutService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (orderDetlPakout == null) { |
| | | orderDetlPakout = orderDetlPakoutService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | } |
| | | try { |
| | | if (!Cools.isEmpty(orderDetlPakout)) { |
| | | if (!orderDetlPakoutService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), |
| | | orderDetlPakout.getBatch(), wrkDetl.getBrand(), wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3(), wrkDetl.getAnfme())) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板出库 ===>> 更新订单完成数量失败; [workNo=" + task.getWrkNo() + "],[locNo=" + task.getSourceLocNo() + "]"); |
| | | } |
| | | } |
| | | } catch (Exception ignore) { |
| | | } |
| | | } |
| | | // 删除工作档源库位的库存明细 |
| | | if (!locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", task.getSourceLocNo()))) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板出库 ===>> 删除库存明细失败; [workNo=" + task.getWrkNo() + "],[locNo=" + task.getSourceLocNo() + "]"); |
| | | } |
| | | // 修改源库位状态 R ===>> O |
| | | if (locMast.getLocSts().equals(LocStsType.LOC_STS_TYPE_R.type)) { |
| | | locMast.setLocSts(LocStsType.LOC_STS_TYPE_O.type); |
| | | locMast.setBarcode(""); |
| | | locMast.setModiTime(now); |
| | | locMast.setIoTime(now); |
| | | if (!locCacheService.updateById(locMast)) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg("全板出库 ===>> 修改源库位状态失败; [workNo=" + task.getWrkNo() + "],[locNo=" + task.getSourceLocNo() + "]"); |
| | | } |
| | | } else { |
| | | throw new CoolException("当前库位状态" + locMast.getLocSts() + ", 无法执行出库操作!!"); |
| | | } |
| | | |
| | | BasStation devNo = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", task.getStaNo())); |
| | | if (Objects.isNull(devNo)) { |
| | | throw new CoolException("站点:" + task.getSourceStaNo() + ", 不存在!!"); |
| | | } |
| | | devNo.setLocSts(LocStsType.LOC_STS_TYPE_F.type); |
| | | devNo.setModiTime(new Date()); |
| | | if (!basStationService.updateById(devNo)) { |
| | | throw new CoolException("站点信息修改失败!!"); |
| | | } |
| | | task.setWrkSts(15L); |
| | | if (!taskService.updateById(task)) { |
| | | throw new CoolException("任务状态修改失败!!"); |
| | | } |
| | | } else { |
| | | |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ReturnT<String> agvDoIn(Task wrkMast) { |
| | | LocCache locCache = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", wrkMast.getLocNo())); |
| | | if (Objects.isNull(locCache)) { |
| | | throw new CoolException("数据错误,库位不存在!!"); |
| | | } |
| | | if (!locCache.getLocSts().equals(LocStsType.LOC_STS_TYPE_S.type)) { |
| | | throw new CoolException("当前库位状态为:" + LocStsType.LOC_STS_TYPE_S.type + "." + LocStsType.LOC_STS_TYPE_S.desc + ",不是出库预约状态"); |
| | | } |
| | | List<WaitPakin> apallet = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | if (Objects.isNull(apallet)) { |
| | | throw new CoolException("数据错误:组托数据不存在!!"); |
| | | } |
| | | apallet.forEach(pakin -> { |
| | | LocDetl detl = new LocDetl(); |
| | | BeanUtils.copyProperties(pakin, detl); |
| | | detl.setBarcode(pakin.getBarcode()) |
| | | .setAnfme(pakin.getAnfme()) |
| | | .setBrand(pakin.getBrand()) |
| | | .setAppeTime(new Date()) |
| | | .setSpecs(pakin.getSpecs()) |
| | | .setColor(pakin.getColor()) |
| | | .setLocId(locCache.getId()) |
| | | .setLocNo(locCache.getLocNo()) |
| | | .setAreaId(locCache.getAreaId()) |
| | | .setAreaName(locCache.getAreaName()) |
| | | .setUnit(pakin.getUnit()) |
| | | .setBatch(pakin.getBatch()); |
| | | if (!locDetlService.insert(detl)) { |
| | | throw new CoolException("库位明细保存失败!!"); |
| | | } |
| | | }); |
| | | |
| | | locCache.setLocSts(LocStsType.LOC_STS_TYPE_F.type); |
| | | locCache.setModiTime(new Date()); |
| | | locCache.setBarcode(wrkMast.getBarcode()); |
| | | locCache.setModiTime(new Date()); |
| | | locCache.setIoTime(new Date()); |
| | | if (!locCacheService.updateById(locCache)) { |
| | | throw new CoolException("库位状态修改失败!"); |
| | | } |
| | | wrkMast.setWrkSts(5L); |
| | | wrkMast.setModiTime(new Date()); |
| | | if (!taskService.updateById(wrkMast)) { |
| | | throw new CoolException("任务状态修改失败!!"); |
| | | } |
| | | |
| | | Set<Long> list = apallet.stream().map(WaitPakin::getOrderId).collect(Collectors.toSet()); |
| | | List<OrderPakin> pakins = orderPakinService.selectList(new EntityWrapper<OrderPakin>().in("id", list)); |
| | | if (Objects.isNull(pakins) || pakins.isEmpty()) { |
| | | throw new CoolException("单据不存在!!"); |
| | | } |
| | | |
| | | return SUCCESS; |
| | | } |
| | | } |
| | |
| | | if (mat == null) { |
| | | mat = excel; |
| | | mat.setTagId(tagId); |
| | | mat.setLocType(tagId); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("保存商品信息失败,商品编码:" + excel.getMatnr()); |
| | | } |
| | |
| | | generator.url="127.0.0.1:1433;databasename=jsxswms"; |
| | | generator.username="sa"; |
| | | generator.password="Skyouc#23"; |
| | | generator.table="agv_task_detl_log"; |
| | | generator.table="asr_bas_container"; |
| | | generator.packagePath="com.zy.asrs"; |
| | | generator.build(); |
| | | } |
| | |
| | | import com.zy.common.utils.Http; |
| | | import com.zy.system.entity.*; |
| | | import com.zy.system.service.*; |
| | | import com.zy.system.timer.LoadingConfigTimer; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.lang.Nullable; |
| | |
| | | private PermissionService permissionService; |
| | | @Autowired |
| | | private RolePermissionService rolePermissionService; |
| | | @Autowired |
| | | private LoadingConfigTimer loadingConfigTimer; |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
| | |
| | | if (deToken!=null){ |
| | | long timestamp = Long.parseLong(deToken.substring(0, 13)); |
| | | // 1天后过期 |
| | | if (System.currentTimeMillis() - timestamp > 86400000){ |
| | | if (System.currentTimeMillis() - timestamp > loadingConfigTimer.getTokenExpire()){ |
| | | Http.response(response, BaseRes.DENIED); |
| | | return false; |
| | | } |
| | |
| | | |
| | | private String orderNo; |
| | | |
| | | private Long orderId; |
| | | |
| | | private String matnr; |
| | | |
| | | private String batch = ""; |
| | |
| | | import com.zy.system.entity.license.LicenseVerify; |
| | | import com.zy.system.service.*; |
| | | import com.zy.system.timer.LicenseTimer; |
| | | import com.zy.system.timer.LoadingConfigTimer; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private RolePermissionService rolePermissionService; |
| | | @Autowired |
| | | private LicenseTimer licenseTimer; |
| | | @Autowired |
| | | private LoadingConfigTimer loadingConfigTimer; |
| | | |
| | | @PostMapping("/login.action") |
| | | @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "登录") |
| | |
| | | return R.parse(CodeRes.USER_10003); |
| | | } |
| | | String token = Cools.enToken(System.currentTimeMillis() + param.get("username"), user.getPassword()); |
| | | userLoginService.delete(new EntityWrapper<UserLogin>().eq("user_id", user.getId())); |
| | | UserLogin userLogin = new UserLogin(); |
| | | if (loadingConfigTimer.getTokenNumber() == 1) { |
| | | userLoginService.delete(new EntityWrapper<UserLogin>().eq("user_id", user.getId()).eq("system", "WMS")); |
| | | } UserLogin userLogin = new UserLogin(); |
| | | userLogin.setUserId(user.getId()); |
| | | userLogin.setToken(token); |
| | | userLogin.setCreateTime(new Date()); |
| | |
| | | return R.ok(resources); |
| | | } |
| | | |
| | | @GetMapping(value = "/system/activation/auth") |
| | | public R activation() { |
| | | if (SystemProperties.SYSTEM_ACTIVATION) { |
| | | String activationCode = SystemProperties.getActivationCode(OSinfo.getOSname().getActivationCodePath()); |
| | | String timeStr = AesUtils.decrypt(activationCode, SystemProperties.SALT); |
| | | if (null == timeStr) { |
| | | SystemProperties.SYSTEM_ACTIVATION = Boolean.FALSE; |
| | | return R.error(); |
| | | } |
| | | Date exprTime = DateUtils.convert(timeStr, DateUtils.yyyyMMddHHmmss); |
| | | if (new Date().getTime() < exprTime.getTime()) { |
| | | return R.ok().add(DateUtils.convert(exprTime)); |
| | | } else { |
| | | SystemProperties.SYSTEM_ACTIVATION = Boolean.FALSE; |
| | | return R.error(); |
| | | } |
| | | } else { |
| | | return R.error(); |
| | | } |
| | | } |
| | | |
| | | @PostMapping(value = "/system/secret/auth") |
| | | @ManagerAuth |
| | | public R systemSecret(@RequestParam(value = "secret") String secret) { |
| | | if (Cools.isEmpty(secret)) { |
| | | return R.error("请输入激活码"); |
| | | } |
| | | // 验证激活码 |
| | | String timeStr = AesUtils.decrypt(secret, SystemProperties.SALT); |
| | | if (null == timeStr) { |
| | | return R.error("激活码错误"); |
| | | } |
| | | Date exprTime = DateUtils.convert(timeStr, DateUtils.yyyyMMddHHmmss); |
| | | if (new Date().getTime() >= exprTime.getTime()) { |
| | | return R.error("激活码已失效"); |
| | | } |
| | | boolean result = SystemProperties.saveActivationCode(OSinfo.getOSname().getActivationCodePath(), secret); |
| | | if (!result) { |
| | | return R.error("激活失败"); |
| | | } |
| | | SystemProperties.SYSTEM_ACTIVATION = Boolean.TRUE; |
| | | return R.ok("激活成功,有效期至" + DateUtils.convert(exprTime)); |
| | | } |
| | | // @GetMapping(value = "/system/activation/auth") |
| | | // public R activation() { |
| | | // if (SystemProperties.SYSTEM_ACTIVATION) { |
| | | // String activationCode = SystemProperties.getActivationCode(OSinfo.getOSname().getActivationCodePath()); |
| | | // String timeStr = AesUtils.decrypt(activationCode, SystemProperties.SALT); |
| | | // if (null == timeStr) { |
| | | // SystemProperties.SYSTEM_ACTIVATION = Boolean.FALSE; |
| | | // return R.error(); |
| | | // } |
| | | // Date exprTime = DateUtils.convert(timeStr, DateUtils.yyyyMMddHHmmss); |
| | | // if (new Date().getTime() < exprTime.getTime()) { |
| | | // return R.ok().add(DateUtils.convert(exprTime)); |
| | | // } else { |
| | | // SystemProperties.SYSTEM_ACTIVATION = Boolean.FALSE; |
| | | // return R.error(); |
| | | // } |
| | | // } else { |
| | | // return R.error(); |
| | | // } |
| | | // } |
| | | // |
| | | // @PostMapping(value = "/system/secret/auth") |
| | | // @ManagerAuth |
| | | // public R systemSecret(@RequestParam(value = "secret") String secret) { |
| | | // if (Cools.isEmpty(secret)) { |
| | | // return R.error("请输入激活码"); |
| | | // } |
| | | // // 验证激活码 |
| | | // String timeStr = AesUtils.decrypt(secret, SystemProperties.SALT); |
| | | // if (null == timeStr) { |
| | | // return R.error("激活码错误"); |
| | | // } |
| | | // Date exprTime = DateUtils.convert(timeStr, DateUtils.yyyyMMddHHmmss); |
| | | // if (new Date().getTime() >= exprTime.getTime()) { |
| | | // return R.error("激活码已失效"); |
| | | // } |
| | | // boolean result = SystemProperties.saveActivationCode(OSinfo.getOSname().getActivationCodePath(), secret); |
| | | // if (!result) { |
| | | // return R.error("激活失败"); |
| | | // } |
| | | // SystemProperties.SYSTEM_ACTIVATION = Boolean.TRUE; |
| | | // return R.ok("激活成功,有效期至" + DateUtils.convert(exprTime)); |
| | | // } |
| | | |
| | | } |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/activate") |
| | | public R activate() { |
| | | licenseTimer.timer(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | public interface ConfigService extends IService<Config> { |
| | | |
| | | Config selectConfigByCode(String code); |
| | | |
| | | <T> T getVal(String key, Class<T> clazz, T t); |
| | | } |
| | |
| | | package com.zy.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.mapper.ConfigMapper; |
| | | import com.zy.system.service.ConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Slf4j |
| | | @Service("configService") |
| | | public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> implements ConfigService { |
| | | |
| | |
| | | return this.baseMapper.selectConfigByCode(code); |
| | | }; |
| | | |
| | | @Override |
| | | @SuppressWarnings("unchecked") |
| | | public <T> T getVal(String key, Class<T> clazz, T t) { |
| | | try { |
| | | Config config = this.baseMapper.selectConfigByCode(key); |
| | | if (config == null || config.getStatus() != 1 || Cools.isEmpty(config.getValue())) { |
| | | return t; |
| | | } |
| | | String val = config.getValue(); |
| | | if (clazz.equals(Boolean.class)) { |
| | | if (val.equals("1") || val.trim().equalsIgnoreCase("TRUE")) { |
| | | return (T) Boolean.TRUE; |
| | | } |
| | | return (T) Boolean.FALSE; |
| | | } else if (clazz.equals(Integer.class)) { |
| | | return (T) Integer.valueOf(val); |
| | | } else if (clazz.equals(String.class)) { |
| | | return (T) val; |
| | | } else if (clazz.equals(Short.class)) { |
| | | return (T) Short.valueOf(val); |
| | | } else if (clazz.equals(Long.class)) { |
| | | return (T) Long.valueOf(val); |
| | | } else if (clazz.equals(Double.class)) { |
| | | return (T) Double.valueOf(val); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("参数加载异常,配置参数={}", key); |
| | | } |
| | | return t; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.system.timer; |
| | | |
| | | import com.zy.system.service.ConfigService; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 定时任务读取配置信息 |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | @Data |
| | | public class LoadingConfigTimer { |
| | | |
| | | /** |
| | | * token有效期时间 |
| | | */ |
| | | private Integer tokenExpire = 1000 * 30 * 60; |
| | | /** |
| | | * token数量限制 |
| | | */ |
| | | private Integer tokenNumber = 1; |
| | | /** |
| | | * 删除天数 |
| | | */ |
| | | private Integer logDeleteDays = 360; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private ConfigService configService; |
| | | |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | public void timer() { |
| | | tokenExpire = configService.getVal("tokenExpire", Integer.class, tokenExpire); |
| | | tokenNumber = configService.getVal("tokenNumber", Integer.class, tokenNumber); |
| | | logDeleteDays = configService.getVal("logDeleteDays", Integer.class, logDeleteDays); |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.system.timer; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.system.entity.UserLogin; |
| | | import com.zy.system.service.UserLoginService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * token定时任务,删除过期的token |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | public class TokenTimer { |
| | | |
| | | @Autowired |
| | | private UserLoginService userLoginService; |
| | | |
| | | @Autowired |
| | | private LoadingConfigTimer loadingConfigTimer; |
| | | |
| | | @Value("${super.pwd}") |
| | | private String superPwd; |
| | | |
| | | @Scheduled(cron = "0/30 * * * * ? ") |
| | | public void timer() { |
| | | if (loadingConfigTimer.getTokenNumber() == 1) { |
| | | return; |
| | | } |
| | | List<UserLogin> userLogins = userLoginService.selectList(new EntityWrapper<>()); |
| | | for (UserLogin userLogin : userLogins) { |
| | | String deToken = Cools.deTokn(userLogin.getToken(), superPwd); |
| | | if (deToken != null) { |
| | | long timestamp = Long.parseLong(deToken.substring(0, 13)); |
| | | // 半小时后过期 |
| | | if (System.currentTimeMillis() - timestamp > loadingConfigTimer.getTokenExpire()) { |
| | | userLoginService.deleteById(userLogin.getId()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | server: |
| | | port: 8080 |
| | | servlet: |
| | | context-path: /@pom.build.finalName@ |
| | | |
| | | spring: |
| | | application: |
| | | name: @pom.build.finalName@ |
| | | jmx: |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | username: sa |
| | | password: Skyouc#23 |
| | | url: jdbc:sqlserver://192.168.4.24:1433;databasename=jsxswms |
| | | mvc: |
| | | static-path-pattern: /** |
| | | redis: |
| | | host: localhost |
| | | port: 6379 |
| | | database: 0 |
| | | # password: xltys1995 |
| | | servlet: |
| | | multipart: |
| | | maxFileSize: 100MB |
| | | maxRequestSize: 100MB |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath:mapper/*.xml |
| | | # global-config: |
| | | # field-strategy: 0 |
| | | configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | map-underscore-to-camel-case: true |
| | | cache-enabled: true |
| | | call-setters-on-nulls: true |
| | | |
| | | logging: |
| | | file: |
| | | path: /stock/out/@pom.build.finalName@/logs |
| | | |
| | | super: |
| | | pwd: asrs2023 |
| | | |
| | | swagger: |
| | | enable: false |
| | | |
| | | #License相关配置 |
| | | license: |
| | | subject: integrationasrs |
| | | publicAlias: publicCert |
| | | storePass: public_zhongyang_123456789 |
| | | licensePath: license.lic |
| | | publicKeysStorePath: publicCerts.keystore |
| | | |
| | | # 下位机配置 |
| | | wcs-slave: |
| | | # 双深 |
| | | doubleDeep: true |
| | | # 双深库位排号 |
| | | doubleLocs: 1,4,5,8,9,12,13,16 |
| | | # 一个堆垛机负责的货架排数 |
| | | groupCount: 4 |
| | | # 左深库位排号 |
| | | doubleLocsLeft: 1,5,9,13 |
| | | # 右深库位排号 |
| | | doubleLocsRight: 4,8,12,16 |
| | | # wms参数配置 |
| | | wms-parameter: |
| | | # 自动补空板功能开关 |
| | | automaticFillingBoardStaNosBoolean: false |
| | | # 自动补空板站点 |
| | | automaticFillingBoardStaNos: 112,101 |
| | | # 自动移库功能开关 |
| | | autoLocMoveBoolean: false |
| | | # 自动移库功能开关 穿梭 |
| | | autoLocMoveUnilateralBoolean: false |
| | | |
| | | comb: |
| | | limit: 5000 |
| | | |
| | | #erp对接 |
| | | erp: |
| | | # 开关 |
| | | switch: |
| | | #计时器上报开关 |
| | | ErpReportOld: false |
| | | #获取单据开关 |
| | | InboundOrderSwitch: false |
| | | #登录接口开关 |
| | | LoginAuthenticationSwitch: false |
| | | #上报、审核单据开关 |
| | | ReviewOrderSwitch: false |
| | | # 地址 |
| | | address: |
| | | URL: http://58.210.10.90:28090 |
| | | #登录地址 |
| | | loginaddress: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc |
| | | #单据,商品档案地址 |
| | | inaddress: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc |
| | | #结果上报(保存)单地址 |
| | | outaddressSave: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc |
| | | #结果上报(提交)单地址 |
| | | outaddressSubmit: K3Cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit.common.kdsvc |
| | | #结果上报(审核)单地址 |
| | | outaddressAudit: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit.common.kdsvc |
| | | # 登录账号管理 |
| | | login : |
| | | acctID: "647e849ab6fa0f" |
| | | username: "llw" |
| | | password: "666666" |
| | | lcid: 2052 |
| New file |
| | |
| | | server: |
| | | port: 8080 |
| | | servlet: |
| | | context-path: /@pom.build.finalName@ |
| | | |
| | | spring: |
| | | application: |
| | | name: @pom.build.finalName@ |
| | | jmx: |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # url: jdbc:sqlserver://192.168.4.191:1433;databasename=integrationasrs |
| | | # username: sa |
| | | # password: sa@123 |
| | | # url: jdbc:sqlserver://127.0.0.1:1433;databasename=source |
| | | # username: sa |
| | | # password: sa@123 |
| | | # url: jdbc:sqlserver://127.0.0.1:51433;databasename=source |
| | | # username: sa |
| | | # password: Zoneyung@zy56$ |
| | | # url: jdbc:sqlserver://192.168.4.191:50948;databasename=source |
| | | # username: sa |
| | | # password: sa@123 |
| | | # url: jdbc:sqlserver://127.0.0.1:62316;databasename=source |
| | | username: sa |
| | | password: Skyouc#23 |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=jsxswms |
| | | mvc: |
| | | static-path-pattern: /** |
| | | redis: |
| | | host: localhost |
| | | port: 6379 |
| | | database: 0 |
| | | # password: xltys1995 |
| | | servlet: |
| | | multipart: |
| | | maxFileSize: 100MB |
| | | maxRequestSize: 100MB |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath:mapper/*.xml |
| | | # global-config: |
| | | # field-strategy: 0 |
| | | configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | map-underscore-to-camel-case: true |
| | | cache-enabled: true |
| | | call-setters-on-nulls: true |
| | | |
| | | logging: |
| | | file: |
| | | path: /stock/out/@pom.build.finalName@/logs |
| | | |
| | | super: |
| | | pwd: asrs2023 |
| | | |
| | | swagger: |
| | | enable: false |
| | | |
| | | #License相关配置 |
| | | license: |
| | | subject: integrationasrs |
| | | publicAlias: publicCert |
| | | storePass: public_zhongyang_123456789 |
| | | licensePath: license.lic |
| | | publicKeysStorePath: publicCerts.keystore |
| | | |
| | | # 下位机配置 |
| | | wcs-slave: |
| | | # 双深 |
| | | doubleDeep: true |
| | | # 双深库位排号 |
| | | doubleLocs: 1,4,5,8,9,12,13,16 |
| | | # 一个堆垛机负责的货架排数 |
| | | groupCount: 4 |
| | | # 左深库位排号 |
| | | doubleLocsLeft: 1,5,9,13 |
| | | # 右深库位排号 |
| | | doubleLocsRight: 4,8,12,16 |
| | | # wms参数配置 |
| | | wms-parameter: |
| | | # 自动补空板功能开关 |
| | | automaticFillingBoardStaNosBoolean: false |
| | | # 自动补空板站点 |
| | | automaticFillingBoardStaNos: 112,101 |
| | | # 自动移库功能开关 |
| | | autoLocMoveBoolean: false |
| | | # 自动移库功能开关 穿梭 |
| | | autoLocMoveUnilateralBoolean: false |
| | | |
| | | comb: |
| | | limit: 5000 |
| | | |
| | | #erp对接 |
| | | erp: |
| | | # 开关 |
| | | switch: |
| | | #计时器上报开关 |
| | | ErpReportOld: false |
| | | #获取单据开关 |
| | | InboundOrderSwitch: false |
| | | #登录接口开关 |
| | | LoginAuthenticationSwitch: false |
| | | #上报、审核单据开关 |
| | | ReviewOrderSwitch: false |
| | | # 地址 |
| | | address: |
| | | URL: http://58.210.10.90:28090 |
| | | #登录地址 |
| | | loginaddress: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc |
| | | #单据,商品档案地址 |
| | | inaddress: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc |
| | | #结果上报(保存)单地址 |
| | | outaddressSave: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc |
| | | #结果上报(提交)单地址 |
| | | outaddressSubmit: K3Cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit.common.kdsvc |
| | | #结果上报(审核)单地址 |
| | | outaddressAudit: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit.common.kdsvc |
| | | # 登录账号管理 |
| | | login : |
| | | acctID: "647e849ab6fa0f" |
| | | username: "llw" |
| | | password: "666666" |
| | | lcid: 2052 |
| | |
| | | server: |
| | | port: 8080 |
| | | servlet: |
| | | context-path: /@pom.build.finalName@ |
| | | |
| | | spring: |
| | | application: |
| | | name: @pom.build.finalName@ |
| | | jmx: |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # url: jdbc:sqlserver://192.168.4.191:1433;databasename=integrationasrs |
| | | # username: sa |
| | | # password: sa@123 |
| | | url: jdbc:sqlserver://localhost:1433;databasename=nbjsasrs |
| | | # username: sa |
| | | # password: sa@123 |
| | | # url: jdbc:sqlserver://127.0.0.1:51433;databasename=source |
| | | # username: sa |
| | | # password: Zoneyung@zy56$ |
| | | # url: jdbc:sqlserver://192.168.4.191:50948;databasename=source |
| | | # username: sa |
| | | # password: sa@123 |
| | | # url: jdbc:sqlserver://127.0.0.1:62316;databasename=source |
| | | username: sa |
| | | password: sa@123 |
| | | #password: Skyouc#23 |
| | | #url: jdbc:sqlserver://127.0.0.1:1433;databasename=jsxswms |
| | | mvc: |
| | | static-path-pattern: /** |
| | | redis: |
| | | host: localhost |
| | | port: 6379 |
| | | database: 0 |
| | | # password: xltys1995 |
| | | servlet: |
| | | multipart: |
| | | maxFileSize: 100MB |
| | | maxRequestSize: 100MB |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath:mapper/*.xml |
| | | # global-config: |
| | | # field-strategy: 0 |
| | | configuration: |
| | | #impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | map-underscore-to-camel-case: true |
| | | cache-enabled: true |
| | | call-setters-on-nulls: true |
| | | |
| | | logging: |
| | | file: |
| | | path: /stock/out/@pom.build.finalName@/logs |
| | | |
| | | super: |
| | | pwd: asrs2023 |
| | | |
| | | swagger: |
| | | enable: false |
| | | |
| | | #License相关配置 |
| | | license: |
| | | subject: nbjsasrs |
| | | publicAlias: publicCert |
| | | storePass: public_zhongyang_123456789 |
| | | # licensePath: license.lic |
| | | publicKeysStorePath: publicCerts.keystore |
| | | |
| | | # 下位机配置 |
| | | wcs-slave: |
| | | # 双深 |
| | | doubleDeep: true |
| | | # 双深库位排号 |
| | | doubleLocs: 1,4,5,8,9,12,13,16 |
| | | # 一个堆垛机负责的货架排数 |
| | | groupCount: 4 |
| | | # 左深库位排号 |
| | | doubleLocsLeft: 1,5,9,13 |
| | | # 右深库位排号 |
| | | doubleLocsRight: 4,8,12,16 |
| | | # wms参数配置 |
| | | wms-parameter: |
| | | # 自动补空板功能开关 |
| | | automaticFillingBoardStaNosBoolean: false |
| | | # 自动补空板站点 |
| | | automaticFillingBoardStaNos: 112,101 |
| | | # 自动移库功能开关 |
| | | autoLocMoveBoolean: false |
| | | # 自动移库功能开关 穿梭 |
| | | autoLocMoveUnilateralBoolean: false |
| | | |
| | | comb: |
| | | limit: 5000 |
| | | |
| | | #erp对接 |
| | | erp: |
| | | # 开关 |
| | | switch: |
| | | #计时器上报开关 |
| | | ErpReportOld: false |
| | | #获取单据开关 |
| | | InboundOrderSwitch: false |
| | | #登录接口开关 |
| | | LoginAuthenticationSwitch: false |
| | | #上报、审核单据开关 |
| | | ReviewOrderSwitch: false |
| | | # 地址 |
| | | address: |
| | | URL: http://58.210.10.90:28090 |
| | | #登录地址 |
| | | loginaddress: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc |
| | | #单据,商品档案地址 |
| | | inaddress: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc |
| | | #结果上报(保存)单地址 |
| | | outaddressSave: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc |
| | | #结果上报(提交)单地址 |
| | | outaddressSubmit: K3Cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit.common.kdsvc |
| | | #结果上报(审核)单地址 |
| | | outaddressAudit: K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit.common.kdsvc |
| | | # 登录账号管理 |
| | | login : |
| | | acctID: "647e849ab6fa0f" |
| | | username: "llw" |
| | | password: "666666" |
| | | lcid: 2052 |
| | | |
| | | loc-move: |
| | | enable: true |
| | | crn1: true |
| | | crn2: true |
| | | crn3: false |
| | | crn4: false |
| | | profiles: |
| | | active: dev |
| 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.BasContainerMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasContainer"> |
| | | <id column="Id" property="Id" /> |
| | | <result column="barcode" property="barcode" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="task_type" property="taskType" /> |
| | | |
| | | </resultMap> |
| | | <select id="selectToBeCompleteData" resultType="com.zy.asrs.entity.Task"> |
| | | select * from agv_task where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type != 103 and io_type != 104 and io_type != 107 ) or (wrk_sts = 2 and io_type=6) order by upd_mk,error_time,io_time,wrk_no |
| | | </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: '#basContainer', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl + '/basContainer/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | , {field: 'barcode', align: 'center', title: '容器编码'} |
| | | , {field: 'type$', align: 'center', title: '容器类型'} |
| | | , {field: 'flagMix$', align: 'center', title: '是否混放'} |
| | | , {field: 'mixMax', align: 'center', title: '混放种类'} |
| | | , {field: 'createTime', align: 'center', title: '创建时间'} |
| | | , {field: 'updateTime', 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(basContainer)', 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(basContainer)', 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 'init': |
| | | initContainer(); |
| | | 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 = { |
| | | 'basContainer': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl + "/basContainer/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(basContainer)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | function initContainer() { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: '初始化', |
| | | content: $('#initContainer').html(), |
| | | success: function (layero, dIndex) { |
| | | form.on('submit(initDo)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/basContainer/init/auth", |
| | | headers: {'token': localStorage.getItem('token'), 'Content-Type': 'application/json'}, |
| | | data: JSON.stringify(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 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 + "/basContainer/" + (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 + "/basContainer/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); |
| | | }); |
| | | |
| | | form.on('submit(init)', function (data) { |
| | | $.ajax({ |
| | | url: baseUrl + "/basContainer/init/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg); |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403) { |
| | | parent.location.href = "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | , type: 'datetime' |
| | | , range: true |
| | | }); |
| | | |
| | | }, 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 pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | }).use(['table', 'laydate', 'form', 'admin'], function () { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | |
| | | tableIns = table.render({ |
| | | elem: '#basStation', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basStation/list/auth', |
| | | url: baseUrl + '/basStation/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: '主键'} |
| | | ,{field: 'devNo', align: 'center',title: '编号'} |
| | | ,{field: 'decDesc', align: 'center',title: '设备描述'} |
| | | ,{field: 'devMk', align: 'center',title: '备注'} |
| | | ,{field: 'inEnable', align: 'center',title: '可入(checkBox)'} |
| | | ,{field: 'outEnable', align: 'center',title: '可出(checkBox)'} |
| | | ,{field: 'autoing', align: 'center',title: '自动(checkBox)'} |
| | | ,{field: 'loading', align: 'center',title: '有物(checkBox)'} |
| | | ,{field: 'locSts', align: 'center',title: ''} |
| | | ,{field: 'canining', align: 'center',title: '能入(checkBox)'} |
| | | ,{field: 'canouting', align: 'center',title: '能出(checkBox)'} |
| | | ,{field: 'fronting', align: 'center',title: ''} |
| | | ,{field: 'rearing', align: 'center',title: ''} |
| | | ,{field: 'uping', align: 'center',title: ''} |
| | | ,{field: 'downing', align: 'center',title: ''} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'ctnType', align: 'center',title: '容器类型'} |
| | | ,{field: 'barcode', align: 'center',title: '条形码'} |
| | | ,{field: 'inQty', align: 'center',title: ''} |
| | | ,{field: 'row1', align: 'center',title: ''} |
| | | ,{field: 'ioTime$', align: 'center',title: ''} |
| | | ,{field: 'area', align: 'center',title: ''} |
| | | ,{field: 'inOk', align: 'center',title: ''} |
| | | ,{field: 'outOk', align: 'center',title: ''} |
| | | ,{field: 'locType1$', align: 'center',title: '高低类型'} |
| | | ,{field: 'locType2$', align: 'center',title: '宽窄类型'} |
| | | ,{field: 'locType3$', align: 'center',title: '轻重类型'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员'} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'appeUser$', align: 'center',title: '创建者'} |
| | | ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'stdQty', align: 'center',title: ''} |
| | | ,{field: 'minWt', align: 'center',title: ''} |
| | | ,{field: 'grossWt', align: 'center',title: '重量'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | , {field: 'devNo', align: 'center', title: '站点台号'} |
| | | , {field: 'decDesc', align: 'center', title: '设备描述'} |
| | | , {field: 'area', align: 'center', title: '区域'} |
| | | , {field: 'locSts$', align: 'center', title: '状态'} |
| | | , {field: 'ioTime', align: 'center', title: '入出库时间'} |
| | | , {field: 'modiUser$', align: 'center', title: '修改人员'} |
| | | , {field: 'modiTime$', align: 'center', title: '修改时间'} |
| | | , {field: 'appeUser$', align: 'center', title: '创建者'} |
| | | , {field: 'appeTime$', align: 'center', title: '添加时间'} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | limit(); |
| | | } |
| | | }); |
| | |
| | | // 监听排序事件 |
| | | table.on('sort(basStation)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(basStation)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | 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; |
| | | 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=[]; |
| | | 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); |
| | |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basStation/export/auth", |
| | | url: baseUrl + "/basStation/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | 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'); |
| | | table.exportFile(titles, res.data, 'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(basStation)', function(obj){ |
| | | table.on('tool(basStation)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basStation/"+(mData?'update':'add')+"/auth", |
| | | url: baseUrl + "/basStation/" + (mData ? 'update' : 'add') + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basStation/delete/auth", |
| | | url: baseUrl + "/basStation/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | , type: 'datetime' |
| | | , range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['ioTime\\$']:null |
| | | value: data !== undefined ? data['ioTime\\$'] : null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['modiTime\\$']:null |
| | | value: data !== undefined ? data['modiTime\\$'] : null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['appeTime\\$']:null |
| | | value: data !== undefined ? data['appeTime\\$'] : null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | $(document).on('click', '#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | }); |
| | | } |
| | |
| | | {field: 'matnr', align: 'center',title: '商品编号(品号)', width: 180} |
| | | // {field: 'id', align: 'center',title: 'ID'} |
| | | // ,{field: 'uuid', align: 'center',title: '编号'} |
| | | // ,{field: 'tagId$', align: 'center',title: '所属归类'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称(品名)', width: 200} |
| | | // ,{field: 'name', align: 'center',title: '别名'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'upQty', align: 'center',title: '组托上限'} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | |
| | | var cacheCols = [ |
| | | {field: 'matnr', align: 'center',title: '商品编号(品号)', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称(品名)', sort:true} |
| | | ,{field: 'batch', align: 'center',title: '货品特征', sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', hide: false} |
| | | ,{field: 'specs', align: 'center',title: '规格', hide: false} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '货品特征', sort:true} |
| | | ,{field: 'frozen$', align: 'center',title: '冻结否',hide: true, |
| | | templet: function(d) { |
| | | // 根据条件判断字体颜色 |
| | |
| | | ,{field: 'batch', align: 'center',title: '货品特征', sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量', hide: false} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: false} |
| | | |
| | | ,{field: 'specs', align: 'center',title: '规格', hide: false} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cellMinWidth: 80, |
| | | height: 'full-120', |
| | | cols: [[{type: 'checkbox'}, {field: 'locNo', align: 'center', title: '库位号'}, { |
| | | field: 'barcode', |
| | | align: 'center', |
| | | title: '托盘码' |
| | | }, {field: 'areaName', align: 'center', title: '库区名称'}, { |
| | | field: 'whsType$', |
| | | align: 'center', |
| | | title: '库位类型' |
| | | }, {field: 'locSts', align: 'center', title: '库位状态'}, { |
| | | field: 'row1', |
| | | align: 'center', |
| | | title: '排' |
| | | }, {field: 'bay1', align: 'center', title: '列'}, { |
| | | field: 'lev1', |
| | | align: 'center', |
| | | title: '层' |
| | | }, {field: 'locType', align: 'center', title: '库位类型'} |
| | | ,{field: 'sort', align: 'center', title: '优先级'} |
| | | ,{field: 'modiUser$', align: 'center', title: '修改人员' |
| | | }, {field: 'modiTime$', align: 'center', title: '修改时间'}, { |
| | | field: 'appeUser$', |
| | | align: 'center', |
| | | title: '创建者' |
| | | }, {field: 'appeTime$', align: 'center', title: '添加时间'}, { |
| | | field: 'frozen', |
| | | align: 'center', |
| | | title: '是否冻结,0.未冻结,1.已冻结', |
| | | hide: true |
| | | }, {field: 'frozenMemo', align: 'center', title: '冻结备注', hide: true}, { |
| | | fixed: 'right', |
| | | title: '操作', |
| | | align: 'center', |
| | | toolbar: '#operate', |
| | | width: 120 |
| | | }]], |
| | | cols: [[{type: 'checkbox'}, {field: 'locNo', align: 'center', title: '库位号', width: 120} |
| | | , {field: 'barcode', align: 'center', title: '托盘码'} |
| | | , {field: 'areaName', align: 'center', title: '库区名称'} |
| | | // , {field: 'whsType$', align: 'center', title: '库位类型'} |
| | | , {field: 'locSts', align: 'center', title: '库位状态'} |
| | | , {field: 'row1', align: 'center', title: '排'} |
| | | , {field: 'bay1', align: 'center', title: '列'} |
| | | , {field: 'lev1', align: 'center', title: '层'} |
| | | // , {field: 'locType', align: 'center', title: '库位类型'} |
| | | , {field: 'sort', align: 'center', title: '优先级'} |
| | | , {field: 'modiUser$', align: 'center', title: '修改人员'} |
| | | , {field: 'modiTime$', align: 'center', title: '修改时间'} |
| | | , {field: 'appeUser$', align: 'center', title: '创建者'} |
| | | , {field: 'appeTime$', align: 'center', title: '添加时间'} |
| | | , {field: 'frozen', align: 'center', title: '是否冻结,0.未冻结,1.已冻结', hide: true} |
| | | , {field: 'frozenMemo', align: 'center', title: '冻结备注', hide: true} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 160}] |
| | | ], |
| | | request: { |
| | | pageName: 'curr', pageSize: 'limit' |
| | | }, |
| | |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'batchModifties': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择需要修改的数据信息', {icon: 2}); |
| | | return; |
| | | } |
| | | batchModifies(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(locCache)', function (obj) { |
| | | var data = obj.data; |
| | | console.log(data) |
| | | switch (obj.event) { |
| | | case 'showDetl': |
| | | locNo = data?.locNo; |
| | |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'locDetail.html', |
| | | success: function(layero, index){ |
| | | success: function (layero, index) { |
| | | } |
| | | }); |
| | | break; |
| | |
| | | }) |
| | | }); |
| | | |
| | | function batchModifies() { |
| | | layer.open({ |
| | | type: 1, |
| | | title: '批量修改', |
| | | maxmin: true, |
| | | area: ["400px"], |
| | | shadeClose: true, |
| | | content: $('#batchModify'), |
| | | success: function (layero, index) { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | console.log(ids) |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', shade: .1 |
| | | }, function (i) { |
| | |
| | | var pageCurr; |
| | | var printMatCodeNos = []; |
| | | var admin; |
| | | |
| | | function getCol() { |
| | | var cols = [ |
| | | {type: 'checkbox'} |
| | | ,{field: 'tagId$', align: 'center',title: '归类', templet: '#tagTpl'} |
| | | ,{field: 'store_max', align: 'center',title: '库存上限'} |
| | | ,{field: 'store_min', align: 'center',title: '库存下限'} |
| | | ,{field: 'store_max_date', align: 'center',title: '库龄上限(天)'} |
| | | , {field: 'tagId$', align: 'center', title: '归类', templet: '#tagTpl'} |
| | | , {field: 'locType$', align: 'center', title: '库位类型'} |
| | | // ,{field: 'store_max', align: 'center',title: '库存上限'} |
| | | // ,{field: 'store_min', align: 'center',title: '库存下限'} |
| | | // ,{field: 'store_max_date', align: 'center',title: '库龄上限(天)'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push( |
| | | {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 150} |
| | | ) |
| | | return cols; |
| | | } |
| | |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).extend({ |
| | | dropdown: 'dropdown/dropdown', |
| | | }).use(['table','laydate', 'form', 'treeTable', 'admin', 'xmSelect', 'dropdown', 'element'], function(){ |
| | | }).use(['table', 'laydate', 'form', 'treeTable', 'admin', 'xmSelect', 'dropdown', 'element'], function () { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | |
| | | // 商品分类数据 |
| | | var insTb = treeTable.render({ |
| | | elem: '#tag', |
| | | url: baseUrl+'/tag/list/auth', |
| | | url: baseUrl + '/tag/list/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | tree: { |
| | | iconIndex: 2, // 折叠图标显示在第几列 |
| | |
| | | tableIns = table.render({ |
| | | elem: '#mat', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/mat/list/auth', |
| | | url: baseUrl + '/mat/list/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | limit(); |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | var _index = $(data.elem).attr('table-index') || 0; |
| | | if (data.elem.checked) { |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | } else { |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | |
| | | // 监听排序事件 |
| | | table.on('sort(locMast)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | limit(); |
| | | } |
| | | }); |
| | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(mat)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | switch (obj.event) { |
| | | case 'addData': |
| | | showEditModel() |
| | | break; |
| | | case 'deleteData': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | if (data.length === 0) { |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | layer.confirm('确定删除' + (data.length === 1 ? '此' : data.length) + '条数据吗', function () { |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/delete/auth", |
| | | url: baseUrl + "/mat/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: JSON.stringify(data)}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | traditional: true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | |
| | | } |
| | | break; |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | 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); |
| | |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/export/auth", |
| | | url: baseUrl + "/mat/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | 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'); |
| | | table.exportFile(titles, res.data, 'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | |
| | | case "btnPrintBatch": |
| | | printMatCodeNos = []; |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | if (data.length === 0) { |
| | | layer.msg('请选择打印数据'); |
| | | } else { |
| | | layer.open({ |
| | | type: 1, |
| | | title: '批量打印 [数量'+ data.length +']', |
| | | title: '批量打印 [数量' + data.length + ']', |
| | | area: ['500px'], |
| | | shadeClose: true, |
| | | content: $('#printDataDiv'), |
| | | success: function(layero, index){ |
| | | for (var i = 0; i<data.length;i++) { |
| | | success: function (layero, index) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | printMatCodeNos.push(data[i].matnr); |
| | | } |
| | | }, |
| | |
| | | }); |
| | | } |
| | | break; |
| | | case "batchModifties": |
| | | var selected = checkStatus.data; |
| | | if (selected.length === 0) { |
| | | layer.msg('请选择修改数据'); |
| | | } else { |
| | | let selIds = selected.map(item => { |
| | | return item.id |
| | | }); |
| | | layer.open({ |
| | | type: 1, |
| | | title: '批量修改', |
| | | area: ['500px'], |
| | | shadeClose: true, |
| | | content: $('#batchModifties'), |
| | | success: function (layero, index) { |
| | | layer.iframeAuto(index); |
| | | form.on('submit(batchModify)', function (data) { |
| | | let params = {...data?.field} |
| | | params.id = selIds |
| | | $.ajax({ |
| | | url: baseUrl + "/mat/batch/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(params), |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | layer.closeAll(); |
| | | }); |
| | | }, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(mat)', function(obj){ |
| | | table.on('tool(mat)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 打印 |
| | |
| | | area: ['500px'], |
| | | shadeClose: true, |
| | | content: $('#printDataDiv'), |
| | | success: function(layero, index){ |
| | | success: function (layero, index) { |
| | | layer.iframeAuto(index); |
| | | printMatCodeNos.push(data.matnr); |
| | | }, |
| | |
| | | } |
| | | // 表单提交事件 |
| | | form.on('submit(editSubmit)', function (data) { |
| | | console.log(data) |
| | | data.field.tagId = insXmSel.getValue('valueStr'); |
| | | if (isEmpty(data.field.tagId)) { |
| | | layer.msg('分类不能为空', {icon: 2}); |
| | |
| | | } |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/"+(mData?'update':'add')+"/auth", |
| | | url: baseUrl + "/mat/" + (mData ? 'update' : 'add') + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | |
| | | // 模板选择 |
| | | form.on('radio(selectTemplateRadio)', function (data) { |
| | | $('.template-preview').hide(); |
| | | $('#template-preview-'+data.value).show(); |
| | | $('#template-preview-' + data.value).show(); |
| | | }); |
| | | |
| | | // 开始打印 |
| | | form.on('submit(doPrint)', function (data) { |
| | | var templateNo = data.field.selectTemplate; |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/print/auth", |
| | | url: baseUrl + "/mat/print/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {param: printMatCodeNos}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.closeAll(); |
| | | for (let i=0;i<res.data.length;i++){ |
| | | var templateDom = $("#templatePreview"+templateNo); |
| | | for (let i = 0; i < res.data.length; i++) { |
| | | var templateDom = $("#templatePreview" + templateNo); |
| | | var className = templateDom.attr("class"); |
| | | if (className === 'template-barcode') { |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=1¶m="+res.data[i].matnr; |
| | | res.data[i]["barcodeUrl"] = baseUrl + "/mac/code/auth?type=1¶m=" + res.data[i].matnr; |
| | | } else { |
| | | res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=2¶m="+res.data[i].matnr; |
| | | res.data[i]["barcodeUrl"] = baseUrl + "/mac/code/auth?type=2¶m=" + res.data[i].matnr; |
| | | } |
| | | } |
| | | var tpl = templateDom.html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | var box = $("#box"); |
| | | box.html(html);box.show(); |
| | | box.print({mediaPrint:true}); |
| | | box.html(html); |
| | | box.show(); |
| | | box.print({mediaPrint: true}); |
| | | box.hide(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | |
| | | }); |
| | | |
| | | // excel导入模板下载 |
| | | function excelMouldDownload(){ |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | function excelMouldDownload() { |
| | | layer.load(1, {shade: [0.1, '#fff']}); |
| | | location.href = baseUrl + "/mat/excel/import/mould"; |
| | | layer.closeAll('loading'); |
| | | } |
| | |
| | | function importExcel() { |
| | | $("#importExcel").trigger("click"); |
| | | } |
| | | function upload(obj){ |
| | | if(!obj.files) { |
| | | |
| | | function upload(obj) { |
| | | if (!obj.files) { |
| | | return; |
| | | } |
| | | var file = obj.files[0]; |
| | | admin.confirm('确认同步 [' + file.name +'] 文件吗?', function (index) { |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | admin.confirm('确认同步 [' + file.name + '] 文件吗?', function (index) { |
| | | layer.load(1, {shade: [0.1, '#fff']}); |
| | | var url = baseUrl + "/mat/excel/import/auth"; |
| | | var form = new FormData(); |
| | | form.append("file", file); |
| | |
| | | xhr.open("post", url, true); //post方式,url为服务器请求地址,true 该参数规定请求是否异步处理。 |
| | | xhr.setRequestHeader('token', localStorage.getItem('token')); |
| | | xhr.onload = uploadComplete; //请求完成 |
| | | xhr.onerror = uploadFailed; //请求失败 |
| | | xhr.onerror = uploadFailed; //请求失败 |
| | | xhr.onloadend = function () { // // 上传完成重置文件流 |
| | | layer.closeAll('loading'); |
| | | $("#importExcel").val(""); |
| | | }; |
| | | // xhr.upload.onprogress = progressFunction;//【上传进度调用方法实现】 |
| | | xhr.upload.onloadstart = function(){//上传开始执行方法 |
| | | xhr.upload.onloadstart = function () {//上传开始执行方法 |
| | | ot = new Date().getTime(); //设置上传开始时间 |
| | | oloaded = 0;//设置上传开始时,以上传的文件大小为0 |
| | | }; |
| | | xhr.send(form); |
| | | }, function(index){ |
| | | }, function (index) { |
| | | $("#importExcel").val(""); |
| | | }); |
| | | } |
| | | |
| | | function uploadComplete(evt) { |
| | | var res = JSON.parse(evt.target.responseText); |
| | | if(res.code === 200) { |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | loadTree(""); |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | |
| | | function uploadFailed(evt) { |
| | | var res = JSON.parse(evt.target.responseText); |
| | | layer.msg(res.msg, {icon: 2}); |
| | |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: { |
| | | curr: pageCurr-1 |
| | | curr: pageCurr - 1 |
| | | } |
| | | }); |
| | | pageCurr -= 1; |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | }).use(['table', 'laydate', 'form', 'admin'], function () { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | |
| | | tableIns = table.render({ |
| | | elem: '#task', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/task/list/auth', |
| | | url: baseUrl + '/task/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: ''} |
| | | ,{field: 'taskType', align: 'center',title: '任务类型: agv , crn'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | , {field: 'wrkNo', align: 'center', title: '工作号', sort: true, width: 105} |
| | | , {field: 'ioTime$', align: 'center', title: '工作时间', width: 160} |
| | | , {field: 'wrkSts$', align: 'center', title: '工作状态', width: 150} |
| | | , {field: 'ioType$', align: 'center', title: '入出库类型', width: 150} |
| | | , {field: 'ioPri', align: 'center', title: '优先级', width: 80} |
| | | , {field: 'taskType$', align: 'center', title: '任务类型'} |
| | | , {field: 'crnNo$', align: 'center', title: '堆垛机', hide: true} |
| | | , {field: 'sourceStaNo$', align: 'center', title: '源站'} |
| | | , {field: 'staNo$', align: 'center', title: '目标站', width: 120} |
| | | , {field: 'sourceLocNo', align: 'center', title: '源库位', width: 120} |
| | | , {field: 'locNo', align: 'center', title: '目标库位', width: 120} |
| | | , {field: 'barcode', align: 'center', title: '条码', width: 110} |
| | | , {field: 'preHave', align: 'center', title: '先入品', hide: true} |
| | | , {field: 'takeNone', align: 'center', title: '空操作', hide: true} |
| | | , {field: 'modiUser$', align: 'center', title: '修改人员', hide: true} |
| | | , {field: 'modiTime$', align: 'center', title: '修改时间', hide: true, width: 160} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 200} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | limit(); |
| | | } |
| | | }); |
| | |
| | | // 监听排序事件 |
| | | table.on('sort(task)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(task)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | 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; |
| | | 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=[]; |
| | | 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); |
| | |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/task/export/auth", |
| | | url: baseUrl + "/task/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | 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'); |
| | | table.exportFile(titles, res.data, 'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(task)', function(obj){ |
| | | var data = obj.data; |
| | | table.on('tool(task)', function (obj) { |
| | | let data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | // 明细展示 |
| | | case 'detlShow': |
| | | wrkNo = data.wrkNo; |
| | | // 弹层显示 |
| | | layer.open({ |
| | | type: 2, |
| | | title: '工作档明细', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'taskDetl.html', |
| | | success: function (layero, index) { |
| | | } |
| | | }); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | // 完成 |
| | | case 'complete': |
| | | layer.confirm('确认完成该笔工作档?', {title: '工作号:' + data.wrkNo, shadeClose: true}, function () { |
| | | http.post(baseUrl + "/task/control", {workNo: data.wrkNo, type: 1}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | break; |
| | | // 取消 |
| | | case 'cancel': |
| | | if (data.pdcType === "Y") { |
| | | layer.confirm('当前任务关联ERP销售单,取消将重新生成出库作业,是否继续?', { |
| | | title: '工作号:' + data.wrkNo, |
| | | shadeClose: true |
| | | }, function () { |
| | | http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 2}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | } else { |
| | | layer.confirm('确认取消该笔工作档?', { |
| | | title: '工作号:' + data.wrkNo, |
| | | shadeClose: true |
| | | }, function () { |
| | | http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 2}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | } |
| | | break; |
| | | // 拣料入库 |
| | | case 'pick': |
| | | layer.confirm('拣料入库该笔工作档?', {title: '工作号:' + data.wrkNo, shadeClose: true}, function () { |
| | | http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 3}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | break; |
| | | // 先入品 |
| | | case 'preHave': |
| | | layer.confirm('任务发生先入品异常。如需重新入库,请确保货物已放至堆垛机出库站!', { |
| | | title: '工作号:' + data.wrkNo, |
| | | shadeClose: true |
| | | }, function () { |
| | | http.post(baseUrl + "/deal/preHave/start", {wrkNo: data.wrkNo}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg, {icon: 1}); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | break; |
| | | // 空操作 |
| | | case 'takeNone': |
| | | layer.confirm('任务发送空操作异常!是否。。。。。。。。?', { |
| | | title: '工作号:' + data.wrkNo, |
| | | shadeClose: true |
| | | }, function () { |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/task/"+(mData?'update':'add')+"/auth", |
| | | url: baseUrl + "/task/" + (mData ? 'update' : 'add') + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/task/delete/auth", |
| | | url: baseUrl + "/task/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | , type: 'datetime' |
| | | , range: true |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | $(document).on('click', '#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | }); |
| | | } |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | 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; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#taskLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/taskLog/list/auth', |
| | | url: baseUrl + '/taskLog/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: ''} |
| | | ,{field: 'wrkNo$', align: 'center',title: '工作号'} |
| | | ,{field: 'logId', align: 'center',title: ''} |
| | | ,{field: 'invWh', align: 'center',title: ''} |
| | | ,{field: 'ymd$', align: 'center',title: ''} |
| | | ,{field: 'mk', align: 'center',title: ''} |
| | | ,{field: 'whsType', align: 'center',title: ''} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机号'} |
| | | ,{field: 'sheetNo', align: 'center',title: ''} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级'} |
| | | ,{field: 'wrkDate$', align: 'center',title: ''} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位'} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站'} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站'} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位'} |
| | | ,{field: 'locSts', align: 'center',title: ''} |
| | | ,{field: 'picking', align: 'center',title: '拣料(checkBox)'} |
| | | ,{field: 'linkMis', align: 'center',title: ''} |
| | | ,{field: 'onlineYn', align: 'center',title: ''} |
| | | ,{field: 'updMk', align: 'center',title: ''} |
| | | ,{field: 'exitMk', align: 'center',title: '退出(checkBox)'} |
| | | ,{field: 'pltType', align: 'center',title: ''} |
| | | ,{field: 'emptyMk', align: 'center',title: '空板(checkBox)'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | ,{field: 'ctnType', align: 'center',title: ''} |
| | | ,{field: 'packed', align: 'center',title: ''} |
| | | ,{field: 'oveMk', align: 'center',title: ''} |
| | | ,{field: 'mtnType', align: 'center',title: ''} |
| | | ,{field: 'userNo', align: 'center',title: ''} |
| | | ,{field: 'crnStrTime$', align: 'center',title: '堆垛机启动时间'} |
| | | ,{field: 'crnEndTime$', align: 'center',title: '堆垛机停止时间'} |
| | | ,{field: 'plcStrTime$', align: 'center',title: '拣料时间'} |
| | | ,{field: 'crnPosTime$', align: 'center',title: ''} |
| | | ,{field: 'loadTime', align: 'center',title: ''} |
| | | ,{field: 'expTime', align: 'center',title: ''} |
| | | ,{field: 'refWrkno', align: 'center',title: ''} |
| | | ,{field: 'refIotime$', align: 'center',title: ''} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员'} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'appeUser$', align: 'center',title: '创建者'} |
| | | ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'pauseMk', align: 'center',title: ''} |
| | | ,{field: 'errorTime$', align: 'center',title: ''} |
| | | ,{field: 'errorMemo', align: 'center',title: ''} |
| | | ,{field: 'ctnKind', align: 'center',title: ''} |
| | | ,{field: 'manuType', align: 'center',title: ''} |
| | | ,{field: 'memoM', align: 'center',title: ''} |
| | | ,{field: 'scWeight', align: 'center',title: ''} |
| | | ,{field: 'logMk', align: 'center',title: ''} |
| | | ,{field: 'logErrTime$', align: 'center',title: ''} |
| | | ,{field: 'logErrMemo', align: 'center',title: ''} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'PdcType', align: 'center',title: ''} |
| | | ,{field: 'ctnNo', align: 'center',title: ''} |
| | | ,{field: 'fullPlt', align: 'center',title: '满板(checkBox)'} |
| | | ,{field: 'preHave', align: 'center',title: ''} |
| | | ,{field: 'takeNone', align: 'center',title: ''} |
| | | ,{field: 'lineNumber', align: 'center',title: ''} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | {field: 'wrkNo', align: 'center', title: '工作号', event: 'wrkNo', sort: true} |
| | | , {field: 'ioTime$', align: 'center', title: '工作时间', width: 160, sort: true} |
| | | , {field: 'wrkSts$', align: 'center', title: '工作状态', width: 160} |
| | | , {field: 'ioType$', align: 'center', title: '入出库类型', width: 160} |
| | | , {field: 'ioPri', align: 'center', title: '优先级'} |
| | | , {field: 'crnNo$', align: 'center', title: '堆垛机号'} |
| | | , {field: 'sourceStaNo$', align: 'center', title: '源站'} |
| | | , {field: 'staNo$', align: 'center', title: '目标站'} |
| | | , {field: 'sourceLocNo$', align: 'center', title: '源库位'} |
| | | , {field: 'locNo$', align: 'center', title: '目标库位'} |
| | | , {field: 'modiUser$', align: 'center', title: '修改人员', hide: true} |
| | | , {field: 'modiTime$', align: 'center', title: '修改时间', hide: true} |
| | | , {field: 'barcode', align: 'center', title: '条码'} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 80} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr=curr; |
| | | 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(taskLog)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.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} |
| | | page: { |
| | | curr: 1 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr = curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(taskLog)', 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 = { |
| | | 'taskLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/taskLog/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(taskLog)', function(obj){ |
| | | table.on('tool(taskLog)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | // 明细展示 |
| | | case 'detlShow': |
| | | wrkNo = data.wrkNo; |
| | | ioTime = data.ioTime; |
| | | // 表格下方显示 |
| | | // locDetl(data.wrkNo); |
| | | // 弹层显示 |
| | | layer.open({ |
| | | type: 2, |
| | | title: '工作明细历史档', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'taskLog_detail.html', |
| | | success: function (layero, index) { |
| | | } |
| | | }); |
| | | 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+"/taskLog/"+(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'); |
| | | } |
| | | }); |
| | | } |
| | | // 数据保存动作 |
| | | form.on('submit(save)', function () { |
| | | if (banMsg != null) { |
| | | layer.msg(banMsg); |
| | | return; |
| | | } |
| | | method("add"); |
| | | }); |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/taskLog/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(edit)', function () { |
| | | method("update") |
| | | }); |
| | | |
| | | function method(name) { |
| | | var index = layer.load(1, { |
| | | shade: [0.5, '#000'] //0.1透明度的背景 |
| | | }); |
| | | var data = { |
| | | // id: $('#id').val(), |
| | | id: $('#id').val(), |
| | | wrkNo: $('#wrkNo').val(), |
| | | invWh: $('#invWh').val(), |
| | | ymd: top.strToDate($('#ymd\\$').val()), |
| | | mk: $('#mk').val(), |
| | | whsType: $('#whsType').val(), |
| | | wrkSts: $('#wrkSts').val(), |
| | | ioType: $('#ioType').val(), |
| | | crnNo: $('#crnNo').val(), |
| | | sheetNo: $('#sheetNo').val(), |
| | | ioPri: $('#ioPri').val(), |
| | | wrkDate: top.strToDate($('#wrkDate\\$').val()), |
| | | locNo: $('#locNo').val(), |
| | | staNo: $('#staNo').val(), |
| | | sourceStaNo: $('#sourceStaNo').val(), |
| | | sourceLocNo: $('#sourceLocNo').val(), |
| | | locSts: $('#locSts').val(), |
| | | picking: $('#picking').val(), |
| | | linkMis: $('#linkMis').val(), |
| | | onlineYn: $('#onlineYn').val(), |
| | | updMk: $('#updMk').val(), |
| | | exitMk: $('#exitMk').val(), |
| | | pltType: $('#pltType').val(), |
| | | emptyMk: $('#emptyMk').val(), |
| | | ioTime: top.strToDate($('#ioTime\\$').val()), |
| | | ctnType: $('#ctnType').val(), |
| | | packed: $('#packed').val(), |
| | | oveMk: $('#oveMk').val(), |
| | | mtnType: $('#mtnType').val(), |
| | | userNo: $('#userNo').val(), |
| | | crnStrTime: top.strToDate($('#crnStrTime\\$').val()), |
| | | crnEndTime: top.strToDate($('#crnEndTime\\$').val()), |
| | | plcStrTime: top.strToDate($('#plcStrTime\\$').val()), |
| | | crnPosTime: top.strToDate($('#crnPosTime\\$').val()), |
| | | loadTime: $('#loadTime').val(), |
| | | expTime: $('#expTime').val(), |
| | | refWrkno: $('#refWrkno').val(), |
| | | refIotime: top.strToDate($('#refIotime\\$').val()), |
| | | modiUser: $('#modiUser').val(), |
| | | modiTime: top.strToDate($('#modiTime\\$').val()), |
| | | appeUser: $('#appeUser').val(), |
| | | appeTime: top.strToDate($('#appeTime\\$').val()), |
| | | pauseMk: $('#pauseMk').val(), |
| | | errorTime: top.strToDate($('#errorTime\\$').val()), |
| | | errorMemo: $('#errorMemo').val(), |
| | | ctnKind: $('#ctnKind').val(), |
| | | manuType: $('#manuType').val(), |
| | | memoM: $('#memoM').val(), |
| | | scWeight: $('#scWeight').val(), |
| | | logMk: $('#logMk').val(), |
| | | logErrTime: top.strToDate($('#logErrTime\\$').val()), |
| | | logErrMemo: $('#logErrMemo').val(), |
| | | barcode: $('#barcode').val(), |
| | | PdcType: $('#PdcType').val(), |
| | | ctnNo: $('#ctnNo').val(), |
| | | fullPlt: $('#fullPlt').val(), |
| | | |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl + "/taskLog/" + name + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: top.reObject(data), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | parent.layer.closeAll(); |
| | | parent.$(".layui-laypage-btn")[0].click(); |
| | | $("#data-detail :input").each(function () { |
| | | $(this).val(""); |
| | | }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | }) |
| | | }); |
| | | layer.close(index); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 搜索 |
| | | // 复选框事件 |
| | | form.on('checkbox(detailCheckbox)', function (data) { |
| | | var el = data.elem; |
| | | if (el.checked) { |
| | | $(el).val('Y'); |
| | | } else { |
| | | $(el).val('N'); |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | // 搜索栏重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#ymd\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['ymd\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#wrkDate\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['wrkDate\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['ioTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnStrTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['crnStrTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnEndTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['crnEndTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#plcStrTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['plcStrTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnPosTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['crnPosTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#refIotime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['refIotime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['modiTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['appeTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#errorTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['errorTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#logErrTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['logErrTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | layDate.render({ |
| | | elem: '#ymd\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#wrkDate\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#ioTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnEndTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#plcStrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#crnPosTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#refIotime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#errorTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '#logErrTime\\$', |
| | | type: 'datetime' |
| | | }); |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | , type: 'datetime' |
| | | , range: true |
| | | }); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | $(document).on('click', '#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | $.each($('#search-box [name]').serializeArray(), function () { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | (child ? parent.tableIns : tableIns).reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | 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 setFormVal(el, data, showImg) { |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | if (find[0] != null) { |
| | | if (find[0].type === 'checkbox') { |
| | | if (data[val] === 'Y') { |
| | | find.attr("checked", "checked"); |
| | | find.val('Y'); |
| | | } else { |
| | | find.remove("checked"); |
| | | find.val('N'); |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | find.val(data[val]); |
| | | if (showImg) { |
| | | var next = find.next(); |
| | | if (next.get(0)) { |
| | | if (next.get(0).localName === "img") { |
| | | find.hide(); |
| | | next.attr("src", data[val]); |
| | | next.show(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | function clearFormVal(el) { |
| | | $(':input', el) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | } |
| | | |
| | | function detailScreen(index) { |
| | | var detail = layer.getChildFrame('#data-detail', index); |
| | | var height = detail.height() + 60; |
| | | if (height > ($(window).height() * 0.9)) { |
| | | height = ($(window).height() * 0.8); |
| | | } |
| | | layer.style(index, { |
| | | // top: (($(window).height()-height)/3)+"px", |
| | | height: height + 'px' |
| | | }); |
| | | } |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $("#search").click(); |
| | | } |
| | | }); |
| | |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号',sort: true, width: 85} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间',sort: true, width: 160} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号',sort: true, width: 95} |
| | | ,{field: 'ioTime$', align: 'center',title: '工作时间',sort: true, width: 170} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态', width: 120} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型', width: 140} |
| | | ,{field: 'ioPri', align: 'center',title: '优先级'} |
| | | ,{field: 'taskType$', align: 'center',title: '任务类型'} |
| | | ,{field: 'barcode', align: 'center',title: '条码', width: 120} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机'} |
| | | ,{field: 'sourceStaNo$', align: 'center',title: '源站'} |
| | | ,{field: 'staNo$', align: 'center',title: '目标站'} |
| | | ,{field: 'sourceLocNo', align: 'center',title: '源库位'} |
| | | ,{field: 'locNo', align: 'center',title: '目标库位'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'sourceLocNo', align: 'center',title: '源库位', width: 120} |
| | | ,{field: 'locNo', align: 'center',title: '目标库位', width: 120} |
| | | ,{field: 'preHave', align: 'center',title: '先入品', hide: true} |
| | | ,{field: 'takeNone', align: 'center',title: '空操作', hide: true} |
| | | // ,{field: 'picking', align: 'center',title: '拣料', templet:function(row){ |
| | | // var html = "<input value='picking' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.picking === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // ,{field: 'exitMk', align: 'center',title: '退出', templet:function(row){ |
| | | // var html = "<input value='exitMk' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.exitMk === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // ,{field: 'emptyMk', align: 'center',title: '空板', templet:function(row){ |
| | | // var html = "<input value='emptyMk' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.emptyMk === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | // |
| | | // ,{field: 'crnStrTime$', align: 'center',title: '堆垛机启动时间'} |
| | | // ,{field: 'crnEndTime$', align: 'center',title: '堆垛机停止时间'} |
| | | // ,{field: 'refIotime$', align: 'center',title: '拣料时间'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true, width: 160} |
| | | // ,{field: 'memo', align: 'center',title: '备注'} |
| | | // |
| | | // ,{field: 'fullPlt', align: 'center',title: '满板', templet:function(row){ |
| | | // var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | // if(row.fullPlt === 'Y'){html += " checked ";} |
| | | // html += ">"; |
| | | // return html; |
| | | // }} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:250} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:300} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | layer.confirm('任务发送空操作异常!是否。。。。。。。。?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | }); |
| | | break; |
| | | case 'priWrkMast': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '维护工作档', |
| | | maxmin: true, |
| | | area: ['500px', top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'wrkMast_detail2.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-save', index).hide(); |
| | | setFormVal(layer.getChildFrame('#detail', index), data, false); |
| | | top.convertDisabled(layer.getChildFrame('#locNo', index), true); |
| | | layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('select'); |
| | | layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'wrkMastLog_detail.html', |
| | | content: 'taskLog_detail.html', |
| | | success: function(layero, index){ |
| | | layer.getChildFrame('#data-detail-submit-edit', index).hide(); |
| | | clearFormVal(layer.getChildFrame('#detail', index)); |
| | |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: false, |
| | | content: 'wrkMastLog_detail.html', |
| | | content: 'taskLog_detail.html', |
| | | success: function(layero, index){ |
| | | setFormVal(layer.getChildFrame('#detail', index), data, true); |
| | | top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); |
| 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="basContainer" lay-filter="basContainer"></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-init" lay-event="init">初始化</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/basContainer/basContainer.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="barcode" placeholder="请输入容器编码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">容器类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="type"> |
| | | <option style="display: none"></option> |
| | | <option value="12">料箱</option> |
| | | <option value="13">笼框</option> |
| | | <option value="14">托盘</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> |
| | | |
| | | <div id="initContainer" style="margin: auto; display: none"> |
| | | <div class="layui-form layui-form-pane" style="padding: 25px;"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">删除容器</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="checkbox" name="flagInit" lay-skin="switch" value="0" lay-text="删除|保留"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 排 --> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">起止</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="start" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | <div class="layui-form-mid">-</div> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="end" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 容器类型 --> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">容器类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="type"> |
| | | <option style="display: none"></option> |
| | | <option value="12">料箱</option> |
| | | <option value="13">笼框</option> |
| | | <option value="14">托盘</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div style="text-align: center; margin-top: 20px"> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | <button class="layui-btn layui-btn-normal" id="initDo" lay-submit lay-filter="initDo">确定</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </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"> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-inline" style="width:31%;margin-top: 20px"> |
| | | <label class="layui-form-label">库 位 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="locNo" class="layui-input" type="text" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 容器初始化 --> |
| | | <div id="initContainer" style="margin: 20px 0 10px 30px; display: none"> |
| | | <div class="layui-form layui-form-pane"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">删除库位</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="checkbox" name="enable" lay-skin="switch" value="1" lay-text="删除|保留"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>库区名称:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="identifying" name="identifying" class="layui-input" type="text" style="display: none"> |
| | | <input id="identifying$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" |
| | | type="text" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basAreasQueryBywhsType" |
| | | onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basAreasQueryBywhsTypeSelect" |
| | | onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 排 --> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">起止排</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="startRow" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | <div class="layui-form-mid">-</div> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="endRow" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 列 --> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">起止列</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="startBay" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | <div class="layui-form-mid">-</div> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="endBay" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 层 --> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">起止层</label> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="startLev" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | <div class="layui-form-mid">-</div> |
| | | <div class="layui-input-inline" style="width: 100px;"> |
| | | <input type="text" name="endLev" autocomplete="off" class="layui-input" |
| | | lay-verify="required|number"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">堆垛机数量</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="crnAmount" lay-verify="required|number" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">起始堆垛机</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="staCrn" autocomplete="off" class="layui-input" lay-verify="number"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 库位类型 --> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">高低类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType1"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">低库位</option> |
| | | <option value="2">高库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">宽窄类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType2"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">窄库位</option> |
| | | <option value="2">宽库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">轻重类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType3"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">轻库位</option> |
| | | <option value="2">重库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div style="text-align: center; margin-top: 20px"> |
| | | <button class="layui-btn layui-btn-radius layui-btn-normal" id="initDo" lay-submit lay-filter="initDo"> |
| | | 确定 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script> |
| | | <script type="text/javascript"> |
| | | |
| | | |
| | | </script> |
| | | |
| | | </html> |
| | |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <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"> |
| | | <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"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" |
| | | autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | |
| | | <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="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"> |
| | | <input class="layui-input" name="id" style="display: none"> |
| | | </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="devNo" placeholder="请输入编号" lay-vertype="tips" lay-verify="required"> |
| | | <input class="layui-input" name="devNo" placeholder="请输入编号" lay-vertype="tips" |
| | | lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="devMk" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">可入(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="inEnable" placeholder="请输入可入(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">可出(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="outEnable" placeholder="请输入可出(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">自动(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="autoing" placeholder="请输入自动(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">有物(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="loading" placeholder="请输入有物(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="locSts" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">能入(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="canining" placeholder="请输入能入(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">能出(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="canouting" placeholder="请输入能出(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="fronting" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rearing" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="uping" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="downing" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">工作号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo" placeholder="请输入工作号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">容器类型: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ctnType" placeholder="请输入容器类型"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">条形码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条形码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="inQty" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="row1" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ioTime" id="ioTime$" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="area" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="inOk" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="outOk" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">高低类型: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="locType1"> |
| | | <option value="">请选择高低类型</option> |
| | | <option value="0">未知</option> |
| | | <option value="1">低库位</option> |
| | | <option value="2">高库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">宽窄类型: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="locType2"> |
| | | <option value="">请选择宽窄类型</option> |
| | | <option value="0">未知</option> |
| | | <option value="1">窄库位</option> |
| | | <option value="2">宽库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">轻重类型: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="locType3"> |
| | | <option value="">请选择轻重类型</option> |
| | | <option value="0">未知</option> |
| | | <option value="1">轻库位</option> |
| | | <option value="2">重库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <label class="layui-form-label">区域:</label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="modiUser" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="modiUser$" name="modiUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <input class="layui-input" name="areaId" placeholder="请选择库区" style="display: none"> |
| | | <input id="area" name="area" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请选择库区" onfocus=this.blur() lay-verType="tips" lay-verify="required"> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | <input class="cool-auto-complete-window-input" data-key="basAreasQueryBydocType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basAreasQueryBydocTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <label class="layui-form-label">站点状态: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="modiTime" id="modiTime$" placeholder="请输入修改时间"> |
| | | <select name="locSts"> |
| | | <option value="O">闲置</option> |
| | | <option value="F">在库</option> |
| | | <option value="S">入库预约</option> |
| | | <option value="R">出库预约</option> |
| | | <option value="X">禁用</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="appeUser" placeholder="请输入创建者" style="display: none"> |
| | | <input id="appeUser$" name="appeUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入创建者" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="appeTime" id="appeTime$" placeholder="请输入添加时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="stdQty" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="minWt" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">重量: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="grossWt" placeholder="请输入重量"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | |
| | | <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" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-print-batch" lay-event="batchModifties">批量修改</button> |
| | | <button class="layui-btn layui-btn-danger layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary" id="btn-init" lay-event="init">初始化</button> |
| | | </div> |
| | | </script> |
| | | |
| | | |
| | | <div id="batchModify" style="margin: 20px 0 10px 30px; display: none"> |
| | | <div class="layui-form layui-form-pane"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>库区名称:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="identifying" name="identifying" class="layui-input" type="text" style="display: none"> |
| | | <input id="identifying$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" |
| | | type="text" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basAreasQueryBywhsType" |
| | | onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basAreasQueryBywhsTypeSelect" |
| | | onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 库位类型 --> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">高低类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType1"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">低库位</option> |
| | | <option value="2">高库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">宽窄类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType2"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">窄库位</option> |
| | | <option value="2">宽库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">轻重类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="locType3"> |
| | | <option style="display: none"></option> |
| | | <option value="0">未知</option> |
| | | <option value="1">轻库位</option> |
| | | <option value="2">重库位</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div style="text-align: center; margin-top: 20px"> |
| | | <button class="layui-btn layui-btn-normal" id="initDo" lay-submit lay-filter="initDo"> |
| | | 确定 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <!-- 重置库位弹窗 --> |
| | | <div id="resetLocDiv" style="margin: 20px 0 10px 30px; display: none"> |
| | | <div class="layui-form layui-form-pane"> |
| | |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'locNo', align: 'center', title: '库位号'} |
| | | , {field: 'ioTime$', align: 'center', title: '工作时间'} |
| | | ]; |
| | | cols.push.apply(cols, cacheCols); |
| | | return cols; |
| | |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-print-batch" lay-event="btnPrintBatch">批量打印</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-normal" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-print-batch" lay-event="batchModifties">批量修改</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <!-- 商品/物料 数据中心 --> |
| | | <div class="dropdown-menu" style="float: right"> |
| | |
| | | <input name="updateTime$" type="hidden"> |
| | | <input name="updateBy" type="hidden"> |
| | | <div class="layui-row"> |
| | | |
| | | <div class="layui-col-md6"> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">分类</label> |
| | | <div class="layui-input-block"> |
| | | <div id="tagSel" class="ew-xmselect-tree"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">商品名称</label> |
| | | <div class="layui-input-block"> |
| | | <input name="maktx" placeholder="请输入商品名称" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">组托上限</label> |
| | | <div class="layui-input-block"> |
| | | <input name="upQty" placeholder="请输入最大组托数量" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">配置</label> |
| | | <div class="layui-input-block"> |
| | | <input name="specs" placeholder="请输入配置" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单箱净重</label> |
| | | <div class="layui-input-block"> |
| | | <input name="weight" placeholder="请输入单箱净重格" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单箱体积</label> |
| | | <div class="layui-input-block"> |
| | | <input name="volume" placeholder="请输入单箱体积" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">商品编号</label> |
| | |
| | | <input id="matnr" name="matnr" placeholder="请输入商品编号" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">规格</label> |
| | | <div class="layui-input-block"> |
| | | <input name="specs" placeholder="请输入代码" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注</label> |
| | | <div class="layui-input-block"> |
| | | <input name="memo" placeholder="请输入备注" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单箱毛重</label> |
| | | <div class="layui-input-block"> |
| | | <input name="manLength" placeholder="请输入单箱毛重" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单箱体积</label> |
| | | <div class="layui-input-block"> |
| | | <input name="threeCode" placeholder="请输入箱子尺寸" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="batchModifties" style="display: none;padding: 40px"> |
| | | <form class="layui-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md8"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">库位类型</label> |
| | | <div class="layui-input-block"> |
| | | <select name="type"> |
| | | <option style="display: none"></option> |
| | | <option value="12">料箱</option> |
| | | <option value="13">笼框</option> |
| | | <option value="14">托盘</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">组托上限</label> |
| | | <div class="layui-input-block"> |
| | | <input name="upQty" placeholder="请输入最大组托数量" class="layui-input" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="batchModify" lay-submit="batchModify">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <div id="box" style="display: block"></div> |
| | | |
| | | <!-- 初始化打印模板的条形码 --> |
| | |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <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"> |
| | | <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"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" |
| | | autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | |
| | | </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> |
| | | {{#if (d.preHave === 'Y' && d.wrkSts === 3) { }} |
| | | <a class="layui-btn layui-btn-primary layui-border-red layui-btn-xs btn-error" lay-event="preHave">先入品</a> |
| | | {{# } }} |
| | | {{#if (d.takeNone === 'Y' && d.wrkSts === 12) { }} |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-error" lay-event="takeNone">空操作</a> |
| | | {{# } }} |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">明细</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-complete" lay-event="complete">完成</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-cancel" lay-event="cancel">取消</a> |
| | | {{#if (d.ioType === 103) { }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">拣</a> |
| | | {{# } }} |
| | | {{#if (d.ioType === 107) { }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">盘</a> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/task/task.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">任务类型: agv , crn: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="taskType" placeholder="请输入任务类型: agv , crn"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-inline" style="width:31%;margin-top: 20px"> |
| | | <label class="layui-form-label">工 作 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" type="text" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="taskDetailByMast" lay-filter="taskDetailByMast"></table> |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script> |
| | | <script type="text/javascript"> |
| | | var pageCur; |
| | | |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'wrkNo', align: 'center', title: '工作号'} |
| | | , {field: 'ioTime$', align: 'center', title: '工作时间'} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | return cols; |
| | | } |
| | | |
| | | layui.use(['table', 'laydate', 'form'], function () { |
| | | table = layui.table; |
| | | var $ = layui.jquery; |
| | | var form = layui.form; |
| | | |
| | | $('#wrkNo').val(parent.wrkNo); |
| | | // 数据渲染 |
| | | tableIns1 = table.render({ |
| | | elem: '#taskDetailByMast', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl + '/taskDetl/list/auth', |
| | | where: {wrk_no: parent.wrkNo}, |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |
| | | 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 + "/"; |
| | | } |
| | | pageCur = curr; |
| | | 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'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | <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"> |
| | | <link rel="stylesheet" href="../../static/css/common.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="taskLog" lay-filter="taskLog"></table> |
| | | <!-- 搜索栏 --> |
| | | <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="wrkSts" class="layui-input" name="wrk_sts" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="工作状态" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <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 cool-auto-complete"> |
| | | <input id="crnNo" class="layui-input" name="crn_no" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="crnNo$" 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="basCrnpQueryBycrnNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basCrnpQueryBycrnNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </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/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> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="margin-top: 10px">导出</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> |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">明细</a> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</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/taskLog/taskLog.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="id" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作号: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="wrkNo" placeholder="请输入工作号" lay-vertype="tips" lay-verify="required" style="display: none"> |
| | | <input id="wrkNo$" name="wrkNo$" 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="wrkMastQueryBywrkNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="wrkMastQueryBywrkNoSelect" 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="logId" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="invWh" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ymd" id="ymd$" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="mk" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="whsType" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">工作状态: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="wrkSts" placeholder="请输入工作状态" style="display: none"> |
| | | <input id="wrkSts$" name="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入工作状态" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">入出库类型: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="ioType" placeholder="请输入入出库类型" style="display: none"> |
| | | <input id="ioType$" name="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入入出库类型" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkIotypeQueryByioTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">堆垛机号: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="crnNo" placeholder="请输入堆垛机号" style="display: none"> |
| | | <input id="crnNo$" name="crnNo$" 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="basCrnpQueryBycrnNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basCrnpQueryBycrnNoSelect" 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="sheetNo" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">优先级: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ioPri" placeholder="请输入优先级"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkDate" id="wrkDate$" 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="locNo" placeholder="请输入目标库位" style="display: none"> |
| | | <input id="locNo$" name="locNo$" 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="locMastQueryBylocNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="locMastQueryBylocNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标站: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="staNo" placeholder="请输入目标站" style="display: none"> |
| | | <input id="staNo$" name="staNo$" 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="basDevpQueryBystaNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basDevpQueryBystaNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源站: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="sourceStaNo" placeholder="请输入源站" style="display: none"> |
| | | <input id="sourceStaNo$" name="sourceStaNo$" 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="basDevpQueryBysourceStaNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basDevpQueryBysourceStaNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源库位: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="sourceLocNo" placeholder="请输入源库位" style="display: none"> |
| | | <input id="sourceLocNo$" name="sourceLocNo$" 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="locMastQueryBysourceLocNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="locMastQueryBysourceLocNoSelect" 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="locSts" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">拣料(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="picking" placeholder="请输入拣料(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="linkMis" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="onlineYn" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="updMk" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">退出(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="exitMk" placeholder="请输入退出(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="pltType" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">空板(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="emptyMk" placeholder="请输入空板(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">工作时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ioTime" id="ioTime$" placeholder="请输入工作时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ctnType" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="packed" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="oveMk" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="mtnType" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="userNo" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">堆垛机启动时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="crnStrTime" id="crnStrTime$" placeholder="请输入堆垛机启动时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">堆垛机停止时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="crnEndTime" id="crnEndTime$" placeholder="请输入堆垛机停止时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">拣料时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="plcStrTime" id="plcStrTime$" placeholder="请输入拣料时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="crnPosTime" id="crnPosTime$" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="loadTime" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="expTime" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="refWrkno" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="refIotime" id="refIotime$" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="modiUser" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="modiUser$" name="modiUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="modiTime" id="modiTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">创建者: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="appeUser" placeholder="请输入创建者" style="display: none"> |
| | | <input id="appeUser$" name="appeUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入创建者" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="appeTime" id="appeTime$" placeholder="请输入添加时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="pauseMk" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="errorTime" id="errorTime$" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="errorMemo" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ctnKind" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="manuType" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memoM" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="scWeight" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="logMk" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="logErrTime" id="logErrTime$" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="logErrMemo" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">条码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="PdcType" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="ctnNo" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">满板(checkBox): </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="fullPlt" placeholder="请输入满板(checkBox)"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="preHave" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="takeNone" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="lineNumber" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <script type="text/javascript" src="../../static/js/wrkMastLog/wrkMastLog.js" charset="utf-8"></script> |
| | | |
| | | </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> |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | </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="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form"> |
| | | <div class="layui-inline" style="width:31%;display: none"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>编 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="id" class="layui-input" type="text" onkeyup="check(this.id, 'wrkMastLog')" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>工 作 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" type="text" onkeyup="check(this.id, 'wrkMastLog')" lay-verify="required|number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工作状态:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="wrkSts" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">入出库类型:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="ioType" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入..." onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkIotypeQueryByioTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">堆垛机号:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="crnNo" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="crnNo$" 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="basCrnpQueryBycrnNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basCrnpQueryBycrnNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">优 先 级:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="ioPri" class="layui-input" type="text" lay-verify="number" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">目标库位:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="locNo" class="layui-input" type="text" style="display: none"> |
| | | <input id="locNo$" 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="locMastQueryBylocNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="locMastQueryBylocNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">目 标 站:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="staNo" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="staNo$" 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="basDevpQueryBystaNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basDevpQueryBystaNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">源 站:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="sourceStaNo" class="layui-input" type="text" lay-verify="number" style="display: none"> |
| | | <input id="sourceStaNo$" 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="basDevpQueryBysourceStaNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basDevpQueryBysourceStaNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">源 库 位:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="sourceLocNo" class="layui-input" type="text" style="display: none"> |
| | | <input id="sourceLocNo$" 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="locMastQueryBysourceLocNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="locMastQueryBysourceLocNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">拣 料:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="picking" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">退 出:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="exitMk" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">空 板:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="emptyMk" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">工作时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="ioTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">堆垛机启动时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnStrTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label" style="font-size: x-small">堆垛机停止时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="crnEndTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">拣料时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="plcStrTime$" class="layui-input" type="text" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">条 码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="barcode" class="layui-input" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:31%;"> |
| | | <label class="layui-form-label">满 板:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="fullPlt" class="layui-input" type="checkBox" lay-skin="primary" lay-filter='detailCheckbox'> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <hr class="layui-bg-gray"> |
| | | |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | |
| | | <div id="prompt"> |
| | | 温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastLog/wrkMastLog.js" charset="utf-8"></script> |
| | | </html> |
| | | |
| | |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">明细</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-complete" lay-event="complete">完成</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-cancel" lay-event="cancel">取消</a> |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="priWrkMast">维护状态</a> |
| | | {{#if (d.ioType === 103) { }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">拣</a> |
| | | {{# } }} |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en" xmlns="http://www.w3.org/1999/html"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 详情 --> |
| | | <div id="data-detail" class="layer_self_wrap"> |
| | | <form id="detail" class="layui-form" style="height: 100%"> |
| | | <div class="layui-inline" > |
| | | <label class="layui-form-label"><span class="not-null">*</span>工 作 号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="wrkNo" class="layui-input" disabled =“disabled” onkeyup="check(this.id, 'wrkMast')"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">工作状态:</label> |
| | | <div class="layui-input-inline cool-auto-complete" style="height: 200px"> |
| | | <input id="wrkSts" class="layui-input" name="wrk_sts" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="工作状态" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div id="prompt"> |
| | | 温馨提示:大于10的工作状态请查看 基础数据<span style="font-weight: 900;color: black">→</span>工作状态 |
| | | </div> |
| | | <div id="data-detail-btn" class="layui-btn-container layui-form-item"> |
| | | <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div> |
| | | <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div> |
| | | <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </body> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMast/wrkMast.js" charset="utf-8"></script> |
| | | </html> |
| | | |