Merge branches 'bfasrs' and 'ynasrs' of http://47.97.1.152:5880/r/zy-asrs into ynasrs
Conflicts:
src/main/java/com/zy/asrs/service/impl/BasCrnpServiceImpl.java
src/main/java/com/zy/common/service/CommonService.java
src/main/resources/mapper/LocDetlMapper.xml
| | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <finalName>ynwms</finalName> |
| | | <finalName>bfwms</finalName> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.BasSteErrLog; |
| | | import com.zy.asrs.service.BasSteErrLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class BasSteErrLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BasSteErrLogService basSteErrLogService; |
| | | |
| | | @RequestMapping(value = "/basSteErrLog/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(basSteErrLogService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basSteErrLog/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<BasSteErrLog> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(BasSteErrLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(basSteErrLogService.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 = "/basSteErrLog/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasSteErrLog basSteErrLog) { |
| | | basSteErrLogService.insert(basSteErrLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basSteErrLog/update/auth") |
| | | @ManagerAuth |
| | | public R update(BasSteErrLog basSteErrLog){ |
| | | if (Cools.isEmpty(basSteErrLog) || null==basSteErrLog.getId()){ |
| | | return R.error(); |
| | | } |
| | | basSteErrLogService.updateById(basSteErrLog); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basSteErrLog/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | basSteErrLogService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basSteErrLog/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BasSteErrLog> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("basSteErrLog")); |
| | | convert(map, wrapper); |
| | | List<BasSteErrLog> list = basSteErrLogService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basSteErrLogQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BasSteErrLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BasSteErrLog> page = basSteErrLogService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasSteErrLog basSteErrLog : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", basSteErrLog.getId()); |
| | | map.put("value", basSteErrLog.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/basSteErrLog/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BasSteErrLog> wrapper = new EntityWrapper<BasSteErrLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != basSteErrLogService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BasSteErrLog.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | return R.ok().add(mats); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/list/pda/page/auth") |
| | | @ManagerAuth |
| | | public R pdaPageList(@RequestParam(required = true)Long tagId, |
| | | @RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit){ |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("tag_id", tagId); |
| | | wrapper.orderBy("create_time", false); |
| | | return R.ok().add(matService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/search/pda/auth") |
| | | @ManagerAuth |
| | | 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); |
| | | wrapper.like("matnr", condition).or().like("maktx", condition).or().like("specs", condition); |
| | | } |
| | | wrapper.orderBy("create_time", false); |
| | | List<Mat> mats = matService.selectList(wrapper); |
| | |
| | | return R.ok(matService.getPage(new Page<>(curr, limit) |
| | | , String.valueOf(tagId) |
| | | , param.get("matnr") |
| | | , param.get("maktx")) |
| | | , param.get("maktx") |
| | | , param.get("specs") |
| | | ) |
| | | ); |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.ss.usermodel.DataFormatter; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | public class OrderController extends BaseController { |
| | | |
| | |
| | | private WrkMastLogService wrkMastLogService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @RequestMapping(value = "/order/nav/list/auth") |
| | | @ManagerAuth |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /*************************************** 数据相关 ***********************************************/ |
| | | |
| | | /** |
| | | * excel导入 |
| | | */ |
| | | @PostMapping(value = "/order/excel/import/auth") |
| | | @ManagerAuth(memo = "销售单Excel导入") |
| | | @Transactional |
| | | public R cstmrExcelImport(MultipartFile file) throws IOException { |
| | | InputStream inStream = file.getInputStream(); |
| | | String fileMime = file.getContentType(); |
| | | int excelVersion = 2007; |
| | | if ("application/vnd.ms-excel".equals(fileMime)) { |
| | | excelVersion = 2003; |
| | | } |
| | | Workbook book = null; |
| | | try { |
| | | if (excelVersion == 2003) { |
| | | book = new HSSFWorkbook(inStream); |
| | | } |
| | | else { // 当 excel 是 2007 时 |
| | | book = new XSSFWorkbook(inStream); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | return R.error("导入文件格式错误,请使用xls后缀的文件!"); |
| | | } |
| | | |
| | | Sheet sheet = book.getSheetAt(0); |
| | | int totalRows = sheet.getLastRowNum() + 1; // 总 |
| | | Long userId = getUserId(); |
| | | Date now = new Date(); |
| | | DataFormatter dataFormatter = new DataFormatter(); |
| | | for (int i = 1; i < totalRows; i++) { |
| | | Row row = sheet.getRow(i); |
| | | // 订单编号 |
| | | String uuid = dataFormatter.formatCellValue(row.getCell(0)); |
| | | // 商品名称 |
| | | String maktx = dataFormatter.formatCellValue(row.getCell(1)); |
| | | // 商品编码 |
| | | String matnr = dataFormatter.formatCellValue(row.getCell(2)); |
| | | // 数量 |
| | | Double anfme = Double.parseDouble(dataFormatter.formatCellValue(row.getCell(3))); |
| | | // 下单时间 |
| | | String timeStr = dataFormatter.formatCellValue(row.getCell(4)); |
| | | Date time = null; |
| | | try { |
| | | time = DateUtils.convert(timeStr, DateUtils.yyyyMMddHHmmss_F); |
| | | } catch (Exception e) { |
| | | throw new CoolException("第" + i + "行下的那时间解析失败,请重新导入!"); |
| | | } |
| | | // 商品系列 |
| | | String tagName = dataFormatter.formatCellValue(row.getCell(5)); |
| | | // 规格 |
| | | String specs = dataFormatter.formatCellValue(row.getCell(6)); |
| | | |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (null == mat) { |
| | | throw new CoolException(matnr + "商品编码的商品不存在,请重新导入!"); |
| | | } |
| | | |
| | | Order order = orderService.selectByNo(uuid); |
| | | if (null == order) { |
| | | order = new Order( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | uuid, // 订单编号 |
| | | timeStr, // 单据日期 |
| | | 14L, // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | | null, // 客户编号 |
| | | null, // 客户 |
| | | null, // 联系方式 |
| | | null, // 操作人员 |
| | | null, // 合计金额 |
| | | null, // 优惠率 |
| | | null, // 优惠金额 |
| | | null, // 销售或采购费用合计 |
| | | null, // 实付金额 |
| | | null, // 付款类型 |
| | | null, // 业务员 |
| | | null, // 结算天数 |
| | | null, // 邮费支付类型 |
| | | null, // 邮费 |
| | | null, // 付款时间 |
| | | null, // 发货时间 |
| | | null, // 物流名称 |
| | | null, // 物流单号 |
| | | 1L, // 订单状态 |
| | | 1, // 状态 |
| | | userId, // 添加人员 |
| | | now, // 添加时间 |
| | | userId, // 修改人员 |
| | | now, // 修改时间 |
| | | null // 备注 |
| | | ); |
| | | if (!orderService.insert(order)) { |
| | | throw new CoolException("生成单据主档失败,请重新导入!"); |
| | | } |
| | | } |
| | | |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), matnr, null); |
| | | if (orderDetl == null) { |
| | | orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setBatch(null); |
| | | orderDetl.setAnfme(anfme); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setCreateBy(userId); |
| | | orderDetl.setCreateTime(now); |
| | | orderDetl.setUpdateBy(userId); |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("生成单据明细失败,请重新导入!"); |
| | | } |
| | | } else { |
| | | if(!orderDetlService.increaseAnfme(order.getId(), matnr, null, anfme)) { |
| | | throw new CoolException("生成单据明细失败,请重新导入!"); |
| | | } |
| | | } |
| | | } |
| | | return R.ok("导入成功"); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.OrderDto; |
| | | import com.zy.common.model.OrderMergeVo; |
| | | import com.zy.common.model.TaskDto; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | private WorkService workService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @PostMapping("/out/pakout/orderDetlIds/auth") |
| | | @ManagerAuth |
| | |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() ? 101 : 103); |
| | | int ioType = (issued >= locDetl.getAnfme() && locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("loc_no", locDto.getLocNo())) == 1) ? 101 : 103; |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), ioType); |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | exist.add(locDetl.getLocNo()); |
| | |
| | | |
| | | @PostMapping("/out/pakout/auth") |
| | | @ManagerAuth(memo = "订单出库") |
| | | @Transactional |
| | | public synchronized R pakout(@RequestBody List<LocDto> locDtos) throws InterruptedException { |
| | | if (Cools.isEmpty(locDtos)) { |
| | | return R.parse(BaseRes.PARAM); |
| | |
| | | // 订单预校验 ===>> 1.订单状态; 2.订单带出数量 |
| | | List<OrderDto> orderDtos = new ArrayList<>(); |
| | | for (LocDto locDto : locDtos) { |
| | | if (Cools.isEmpty(locDto.getOrderNo())) { continue; } |
| | | OrderDto orderDto = new OrderDto(locDto.getOrderNo(), locDto.getMatnr(), locDto.getAnfme()); |
| | | if (OrderDto.has(orderDtos, orderDto)) { |
| | | OrderDto dto = OrderDto.find(orderDtos, orderDto); |
| | | assert dto != null; |
| | | dto.setAnfme(dto.getAnfme() + orderDto.getAnfme()); |
| | | if (!isJSON(locDto.getOrderNo())) { |
| | | if (Cools.isEmpty(locDto.getOrderNo())) { continue; } |
| | | OrderDto orderDto = new OrderDto(locDto.getOrderNo(), locDto.getMatnr(), locDto.getAnfme()); |
| | | if (OrderDto.has(orderDtos, orderDto)) { |
| | | OrderDto dto = OrderDto.find(orderDtos, orderDto); |
| | | assert dto != null; |
| | | dto.setAnfme(dto.getAnfme() + orderDto.getAnfme()); |
| | | } else { |
| | | orderDtos.add(orderDto); |
| | | } |
| | | } else { |
| | | orderDtos.add(orderDto); |
| | | // 订单合并出库 |
| | | List<OrderDto> orderDtoList = JSON.parseArray(locDto.getOrderNo(), OrderDto.class); |
| | | for (OrderDto one : orderDtoList) { |
| | | OrderDto orderDto = new OrderDto(one.getOrderNo(), locDto.getMatnr(), one.getAnfme()); |
| | | if (OrderDto.has(orderDtos, orderDto)) { |
| | | OrderDto dto = OrderDto.find(orderDtos, orderDto); |
| | | assert dto != null; |
| | | dto.setAnfme(dto.getAnfme() + orderDto.getAnfme()); |
| | | } else { |
| | | orderDtos.add(orderDto); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | for (OrderDto orderDto : orderDtos) { |
| | |
| | | taskDtos.add(taskDto); |
| | | } |
| | | } |
| | | |
| | | // ----------------------------------------------------------------------------------------------- |
| | | List<String> excludeLocNos = taskDtos.stream().map(TaskDto::getLocNo).distinct().collect(Collectors.toList()); |
| | | for (TaskDto taskDto : taskDtos) { |
| | | BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | workService.stockOut(staNo, taskDto, getUserId()); |
| | | locMastService.breakUp(taskDto.getLocNo(), excludeLocNos); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 合并订单汇总预览 |
| | | */ |
| | | @RequestMapping(value = "/order/merge/preview/auth") |
| | | @ManagerAuth |
| | | public R mergePreview(@RequestParam(value = "orderIds[]") List<Long> orderIds){ |
| | | return R.ok().add(orderService.mergePreview(orderIds)); |
| | | } |
| | | |
| | | @PostMapping("/out/pakout/preview/merge/auth") |
| | | @ManagerAuth |
| | | public R pakoutPreviewMerge(@RequestBody List<OrderMergeVo> list) { |
| | | if (Cools.isEmpty(list)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | Set<String> exist = new HashSet<>(); |
| | | List<LocDto> locDtos = new ArrayList<>(); |
| | | |
| | | for (OrderMergeVo vo : list) { |
| | | double issued = Optional.of(vo.getAnfme()).orElse(0.0D); |
| | | if (issued <= 0.0D) { continue; } |
| | | List<LocDetl> locDetls = locDetlService.queryStock(vo.getMatnr(), vo.getBatch(), null, exist); |
| | | for (LocDetl locDetl : locDetls) { |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), JSON.toJSONString(vo.getOrderDtos()), |
| | | issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | int ioType = (issued >= locDetl.getAnfme() && locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("loc_no", locDto.getLocNo())) == 1) ? 101 : 103; |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), ioType); |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | exist.add(locDetl.getLocNo()); |
| | | // 剩余待出数量递减 |
| | | issued = issued - locDetl.getAnfme(); |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(null, vo.getMatnr(), vo.getMaktx(), vo.getBatch(), JSON.toJSONString(vo.getOrderDtos()), issued); |
| | | locDto.setLack(Boolean.TRUE); |
| | | locDtos.add(locDto); |
| | | } |
| | | } |
| | | for (LocDto locDto : locDtos) { |
| | | Mat mat = matService.selectByMatnr(locDto.getMatnr()); |
| | | assert mat != null; |
| | | locDto.setSpecs(mat.getSpecs()); |
| | | } |
| | | return R.ok().add(locDtos); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.param.StockOutParam; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.WorkService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private WorkService workService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @RequestMapping("/available/put/site") |
| | | @ManagerAuth() |
| | |
| | | return R.ok("任务重新入库,目标库位:" + locNo); |
| | | } |
| | | |
| | | @RequestMapping("/deal/steNo/empty") |
| | | @ManagerAuth(memo = "清除小车") |
| | | public R dealSteNoEmpty(@RequestParam Integer wrkNo) { |
| | | return wrkMastService.setSteEmpty(wrkNo)?R.ok():R.error(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.WrkCharge; |
| | | import com.zy.asrs.service.WrkChargeService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class WrkChargeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WrkChargeService wrkChargeService; |
| | | |
| | | @RequestMapping(value = "/wrkCharge/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(wrkChargeService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkCharge/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<WrkCharge> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(WrkCharge.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("appe_time", false); |
| | | } |
| | | return R.ok(wrkChargeService.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 = "/wrkCharge/add/auth") |
| | | @ManagerAuth |
| | | public R add(WrkCharge wrkCharge) { |
| | | wrkChargeService.insert(wrkCharge); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkCharge/update/auth") |
| | | @ManagerAuth |
| | | public R update(WrkCharge wrkCharge){ |
| | | if (Cools.isEmpty(wrkCharge) || null==wrkCharge.getWrkNo()){ |
| | | return R.error(); |
| | | } |
| | | wrkChargeService.updateById(wrkCharge); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkCharge/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Integer[] ids){ |
| | | for (Integer id : ids){ |
| | | wrkChargeService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkCharge/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<WrkCharge> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("wrkCharge")); |
| | | convert(map, wrapper); |
| | | List<WrkCharge> list = wrkChargeService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkChargeQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<WrkCharge> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("wrk_no", condition); |
| | | Page<WrkCharge> page = wrkChargeService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (WrkCharge wrkCharge : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", wrkCharge.getWrkNo()); |
| | | map.put("value", wrkCharge.getWrkNo()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkCharge/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<WrkCharge> wrapper = new EntityWrapper<WrkCharge>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != wrkChargeService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(WrkCharge.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkCharge/truncate/charge/auth") |
| | | @ManagerAuth |
| | | public R truncateCharge() { |
| | | wrkChargeService.delete(new EntityWrapper<WrkCharge>().eq("memo", "charge")); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/wrkCharge/truncate/demo/auth") |
| | | @ManagerAuth |
| | | public R truncateMemo() { |
| | | wrkChargeService.delete(new EntityWrapper<WrkCharge>().eq("memo", "demo")); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_ste") |
| | |
| | | private String pakMk; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | * 最低电量 |
| | | */ |
| | | @ApiModelProperty(value= "最低电量") |
| | | @TableField("charge_line") |
| | | private String chargeLine; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkStatusService; |
| | | import com.zy.asrs.entity.BasWrkStatus; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.BasWrkIotypeService; |
| | | import com.zy.asrs.entity.BasWrkIotype; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_bas_ste_err_log") |
| | | public class BasSteErrLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 发生时间 |
| | | */ |
| | | @ApiModelProperty(value= "发生时间") |
| | | @TableField("start_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @TableField("end_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @TableField("wrk_sts") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @TableField("io_type") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 穿梭车 |
| | | */ |
| | | @ApiModelProperty(value= "穿梭车") |
| | | @TableField("ste_no") |
| | | private Integer steNo; |
| | | |
| | | /** |
| | | * plc |
| | | */ |
| | | @ApiModelProperty(value= "plc") |
| | | @TableField("plc_no") |
| | | private Integer plcNo; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @TableField("sta_no") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @TableField("source_sta_no") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | @ApiModelProperty(value= "异常码") |
| | | @TableField("err_code") |
| | | private Integer errCode; |
| | | |
| | | /** |
| | | * 异常 |
| | | */ |
| | | @ApiModelProperty(value= "异常") |
| | | private String error; |
| | | |
| | | /** |
| | | * 异常情况 1: 未处理 2: 已修复 |
| | | */ |
| | | @ApiModelProperty(value= "异常情况 1: 未处理 2: 已修复 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public BasSteErrLog() {} |
| | | |
| | | public BasSteErrLog(String uuid,Integer wrkNo,Date startTime,Date endTime,Long wrkSts,Integer ioType,Integer steNo,Integer plcNo,String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String barcode,Integer errCode,String error,Integer status,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) { |
| | | this.uuid = uuid; |
| | | this.wrkNo = wrkNo; |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.wrkSts = wrkSts; |
| | | this.ioType = ioType; |
| | | this.steNo = steNo; |
| | | this.plcNo = plcNo; |
| | | this.locNo = locNo; |
| | | this.staNo = staNo; |
| | | this.sourceStaNo = sourceStaNo; |
| | | this.sourceLocNo = sourceLocNo; |
| | | this.barcode = barcode; |
| | | this.errCode = errCode; |
| | | this.error = error; |
| | | this.status = status; |
| | | this.createTime = createTime; |
| | | this.createBy = createBy; |
| | | this.updateTime = updateTime; |
| | | this.updateBy = updateBy; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // BasSteErrLog basSteErrLog = new BasSteErrLog( |
| | | // null, // 编号 |
| | | // null, // 工作号 |
| | | // null, // 发生时间 |
| | | // null, // 结束时间 |
| | | // null, // 工作状态 |
| | | // null, // 入出库类型 |
| | | // null, // 穿梭车 |
| | | // null, // plc |
| | | // null, // 目标库位 |
| | | // null, // 目标站 |
| | | // null, // 源站 |
| | | // null, // 源库位 |
| | | // null, // 条码 |
| | | // null, // 异常码 |
| | | // null, // 异常 |
| | | // null, // 异常情况 |
| | | // null, // 添加时间 |
| | | // null, // 添加人员 |
| | | // null, // 修改时间 |
| | | // null, // 修改人员 |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStartTime$(){ |
| | | if (Cools.isEmpty(this.startTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime); |
| | | } |
| | | |
| | | public String getEndTime$(){ |
| | | if (Cools.isEmpty(this.endTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime); |
| | | } |
| | | |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getIoType$(){ |
| | | BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class); |
| | | BasWrkIotype basWrkIotype = service.selectById(this.ioType); |
| | | if (!Cools.isEmpty(basWrkIotype)){ |
| | | return String.valueOf(basWrkIotype.getIoDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "未处理"; |
| | | case 2: |
| | | return "已修复"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("asr_wrk_charge") |
| | | public class WrkCharge implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableId(value = "wrk_no", type = IdType.INPUT) |
| | | @TableField("wrk_no") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 标记 |
| | | */ |
| | | @ApiModelProperty(value= "标记") |
| | | private String mk; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @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("ste_no") |
| | | private Integer steNo; |
| | | |
| | | /** |
| | | * 巷道口 |
| | | */ |
| | | @ApiModelProperty(value= "巷道口") |
| | | @TableField("out_most") |
| | | private Integer outMost; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | @TableField("io_pri") |
| | | private Double ioPri; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @TableField("loc_no") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @TableField("sta_no") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @TableField("source_sta_no") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @TableField("source_loc_no") |
| | | private String sourceLocNo; |
| | | |
| | | /** |
| | | * 空板(checkBox) |
| | | */ |
| | | @ApiModelProperty(value= "空板(checkBox)") |
| | | @TableField("empty_mk") |
| | | private String emptyMk; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value= "工作时间") |
| | | @TableField("io_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date ioTime; |
| | | |
| | | /** |
| | | * 堆垛机启动时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机启动时间") |
| | | @TableField("crn_str_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date crnStrTime; |
| | | |
| | | /** |
| | | * 堆垛机停止时间 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机停止时间") |
| | | @TableField("crn_end_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date crnEndTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | private String modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @ApiModelProperty(value= "创建者") |
| | | @TableField("appe_user") |
| | | private String appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | public WrkCharge() {} |
| | | |
| | | public WrkCharge(Integer wrkNo,String mk,Long wrkSts,Integer ioType,Integer crnNo,Integer steNo,Integer outMost,Double ioPri,String locNo,Integer staNo,Integer sourceStaNo,String sourceLocNo,String emptyMk,Date ioTime,Date crnStrTime,Date crnEndTime,String modiUser,Date modiTime,String appeUser,Date appeTime,String memo,String barcode) { |
| | | this.wrkNo = wrkNo; |
| | | this.mk = mk; |
| | | this.wrkSts = wrkSts; |
| | | this.ioType = ioType; |
| | | this.crnNo = crnNo; |
| | | this.steNo = steNo; |
| | | this.outMost = outMost; |
| | | this.ioPri = ioPri; |
| | | this.locNo = locNo; |
| | | this.staNo = staNo; |
| | | this.sourceStaNo = sourceStaNo; |
| | | this.sourceLocNo = sourceLocNo; |
| | | this.emptyMk = emptyMk; |
| | | this.ioTime = ioTime; |
| | | this.crnStrTime = crnStrTime; |
| | | this.crnEndTime = crnEndTime; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.appeUser = appeUser; |
| | | this.appeTime = appeTime; |
| | | this.memo = memo; |
| | | this.barcode = barcode; |
| | | } |
| | | |
| | | // WrkCharge wrkCharge = new WrkCharge( |
| | | // null, // 工作号[非空] |
| | | // null, // 标记 |
| | | // null, // 工作状态 |
| | | // null, // 入出库类型 |
| | | // null, // 堆垛机 |
| | | // null, // 穿梭车 |
| | | // null, // 巷道口 |
| | | // null, // 优先级 |
| | | // null, // 目标库位 |
| | | // null, // 目标站 |
| | | // null, // 源站 |
| | | // null, // 源库位 |
| | | // null, // 空板(checkBox) |
| | | // null, // 工作时间 |
| | | // null, // 堆垛机启动时间 |
| | | // null, // 堆垛机停止时间 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null, // 创建者 |
| | | // null, // 添加时间 |
| | | // null, // 备注 |
| | | // null // 条码 |
| | | // ); |
| | | |
| | | public String getWrkSts$(){ |
| | | BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class); |
| | | BasWrkStatus basWrkStatus = service.selectById(this.wrkSts); |
| | | if (!Cools.isEmpty(basWrkStatus)){ |
| | | return String.valueOf(basWrkStatus.getWrkDesc()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String 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 getSteNo$(){ |
| | | BasSteService service = SpringUtils.getBean(BasSteService.class); |
| | | BasSte basSte = service.selectById(this.steNo); |
| | | if (!Cools.isEmpty(basSte)){ |
| | | return String.valueOf(basSte.getSteNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | return String.valueOf(locMast.getLocNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStaNo$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(this.staNo); |
| | | if (!Cools.isEmpty(basDevp)){ |
| | | return String.valueOf(basDevp.getDevNo()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getSourceStaNo$(){ |
| | | BasDevpService service = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevp basDevp = service.selectById(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 getModiUser$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.modiUser); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | 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.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BasSteErrLog; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BasSteErrLogMapper extends BaseMapper<BasSteErrLog> { |
| | | |
| | | } |
| | |
| | | @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}") |
| | | int updateLocNo(String newLocNo, String oldLocNo); |
| | | |
| | | @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE 1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end}) AND lm.loc_sts = 'F' ORDER BY lm.modi_time ASC") |
| | | List<String> selectSameDetl(@Param("matnr") String matnr, @Param("start") Integer start, @Param("end") Integer end); |
| | | |
| | | @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end}) AND lm.loc_sts = 'F' AND DateDiff(dd, lm.modi_time, getdate()) = 0) ORDER BY lm.modi_time ASC") |
| | |
| | | @Repository |
| | | public interface LocMastMapper extends BaseMapper<LocMast> { |
| | | |
| | | LocMast queryFreeLocMast(@Param("row") Integer row, @Param("rows") List<Integer> rows, @Param("locType1") Short locType1); |
| | | List<LocMast> queryFreeLocMast(@Param("rows") List<Integer> rows, @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1); |
| | | |
| | | @Select("select loc_no from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") |
| | | List<String> queryGroupEmptyStock(Integer crnNo); |
| | |
| | | @Repository |
| | | public interface MatMapper extends BaseMapper<Mat> { |
| | | |
| | | List<Mat> listByPage(Page page, @Param("tagId") String tagId, @Param("matnr") Object matnr, @Param("maktx") Object maktx); |
| | | List<Mat> listByPage(Page page, @Param("tagId") String tagId, @Param("matnr") Object matnr, @Param("maktx") Object maktx, @Param("specs") Object specs); |
| | | |
| | | Mat selectByMatnr(@Param("matnr")String matnr); |
| | | |
| | |
| | | |
| | | Integer getPakoutPageCount(Map<String, Object> map); |
| | | |
| | | int increaseAnfme(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); |
| | | |
| | | int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); |
| | | |
| | | int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); |
| | | |
| | | int modifyStatus(@Param("orderId") Long orderId, @Param("status")Integer status); |
| | | |
| | | List<OrderDetl> selectRemainder(@Param("orderId") Long orderId); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.WrkCharge; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WrkChargeMapper extends BaseMapper<WrkCharge> { |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | List<WrkMast> selectToBeHistoryData(); |
| | | |
| | | WrkMast selectByLocNoOfPakin(@Param("locNo") String locNo); |
| | | |
| | | WrkMast selectBySourceLocNoOfPakout(@Param("sourceLocNo") String sourceLocNo); |
| | | |
| | | @Update("update asr_wrk_mast set ste_no = null where wrk_no = #{wrkNo}") |
| | | int setSteEmpty(Integer wrkNo); |
| | | |
| | | WrkMast selectOfPick(@Param("wrkNo") Integer wrkNo, @Param("ioType") Integer ioType); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BasSteErrLog; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface BasSteErrLogService extends IService<BasSteErrLog> { |
| | | |
| | | } |
| | |
| | | /** |
| | | * 检索可用库位 |
| | | */ |
| | | LocMast queryFreeLocMast(Integer row, List<Integer> rows, Short locType1); |
| | | List<LocMast> queryFreeLocMast(List<Integer> rows, Integer rowsLen, Short locType1); |
| | | |
| | | /** |
| | | * 获取同组货架的空库位 |
| | |
| | | // 同组空闲库位 |
| | | LocMast findOutMost(List<String> locNos); |
| | | |
| | | // 对同组货物进行移库操作 |
| | | void breakUp(String locNo, List<String> excludeLocNos); |
| | | |
| | | } |
| | |
| | | |
| | | public interface MatService extends IService<Mat> { |
| | | |
| | | Page<Mat> getPage(Page page, String tagId, Object matnr, Object maktx); |
| | | Page<Mat> getPage(Page page, String tagId, Object matnr, Object maktx, Object specs); |
| | | |
| | | Mat selectByMatnr(String matnr); |
| | | |
| | |
| | | |
| | | OrderDetl findByLook(List<OrderDetl> orderDetls, Long orderId, String matnr, String batch); |
| | | |
| | | boolean increaseAnfme(Long orderId, String matnr, String batch, Double qty); |
| | | |
| | | boolean increase(Long orderId, String matnr, String batch, Double qty); |
| | | |
| | | boolean decrease(String orderNo, String matnr, String batch, Double qty); |
| | | |
| | | boolean modifyStatus(Long orderId, Integer status); |
| | | |
| | | List<OrderDetl> selectRemainder(Long orderId); |
| | | } |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.Order; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.common.model.OrderMergeVo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | List<Order> selectComplete(); |
| | | |
| | | /** |
| | | * 订单合并预览 |
| | | */ |
| | | List<OrderMergeVo> mergePreview(List<Long> ids); |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 出库作业 |
| | | * @param staNo 目标站点 |
| | | * @param locDetls 待出库物料 |
| | | * @param ioType 入出库类型 |
| | | */ |
| | | void stockOut(BasDevp staNo, List<LocDetlDto> locDetls, IoWorkType ioWorkType, Long userId); |
| | | |
| | |
| | | */ |
| | | String dealPreHaveStart(Integer wrkNo, Long userId); |
| | | |
| | | /** |
| | | * 穿梭库移转 |
| | | */ |
| | | void shuttleTransfer(List<String> locNos); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.WrkCharge; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface WrkChargeService extends IService<WrkCharge> { |
| | | |
| | | } |
| | |
| | | |
| | | WrkMast selectByBarcode(String barcode); |
| | | |
| | | Double getIoPri(Integer ioType, String locNo); |
| | | |
| | | /** |
| | | * 从工作档得到站点入库暂存数 |
| | | * @param crnNo |
| | | * @return |
| | | */ |
| | | int getStoreCount(Integer crnNo); |
| | | |
| | | Boolean setSteEmpty(Integer wrkNo); |
| | | |
| | | WrkMast selectOfPick(Integer wrkNo, Integer ioType); |
| | | } |
| | |
| | | } |
| | | |
| | | if (pakin) { |
| | | // //TODO控制入库暂存数,防止主干道堵塞,2022-5-24 ADD |
| | | //TODO控制入库暂存数,防止主干道堵塞,2022-5-24 ADD |
| | | // int staNo = 0; |
| | | // switch (crnNo){ |
| | | // case 1: |
| | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.BasDevpMapper; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | |
| | | if(station.getLoading()==null || !station.getLoading().equals("Y")) { |
| | | throw new CoolException(devpNo+"站点无物"); |
| | | } |
| | | |
| | | if(station.getWrkNo()!=null && station.getWrkNo()>0 && station.getWrkNo() < 9990) { |
| | | throw new CoolException(devpNo+"站点已有工作号"); |
| | | WrkMast wrkMast = wrkMastService.selectById(station.getWrkNo()); |
| | | if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 104 && wrkMast.getIoType() != 107) { |
| | | throw new CoolException(devpNo+"站点已有工作号"); |
| | | } |
| | | |
| | | } |
| | | // if(!station.getInEnable().equals("Y")) { |
| | | // throw new CoolException(devpNo+"站点不是可入状态"); |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BasSteErrLogMapper; |
| | | import com.zy.asrs.entity.BasSteErrLog; |
| | | import com.zy.asrs.service.BasSteErrLogService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("basSteErrLogService") |
| | | public class BasSteErrLogServiceImpl extends ServiceImpl<BasSteErrLogMapper, BasSteErrLog> implements BasSteErrLogService { |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.mapper.LocMastMapper; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.RowLastnoService; |
| | | import com.zy.asrs.service.WorkService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.service.CommonService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private RowLastnoService rowLastnoService; |
| | | @Autowired |
| | | private WorkService workService; |
| | | |
| | | @Override |
| | | public LocMast queryFreeLocMast(Integer row, List<Integer> rows, Short locType1) { |
| | | return this.baseMapper.queryFreeLocMast(row, rows, locType1); |
| | | public List<LocMast> queryFreeLocMast(List<Integer> rows, Integer rowsLen, Short locType1) { |
| | | return this.baseMapper.queryFreeLocMast(rows, rowsLen, locType1); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public Boolean isOutMost(String locNo, Boolean pakin) { |
| | | return Integer.parseInt(locNo.substring(0, 2)) == Utils.getGroupRow(locNo, true); |
| | | return Integer.parseInt(locNo.substring(0, 2)) == Utils.getOutermostRow(locNo, true); |
| | | } |
| | | |
| | | @Override |
| | | public LocMast findOutMost(List<String> locNos) { |
| | | List<Integer> rows = locNos.stream().map(item -> Integer.parseInt(item.substring(0, 2))).distinct().collect(Collectors.toList()); |
| | | if (!rows.retainAll(CommonService.FIRST_GROUP_ROW_LIST)) { |
| | | if (!rows.retainAll(new ArrayList<Integer>() {{ add(1);add(2);add(3);}})) { |
| | | locNos.sort(Comparator.comparingInt(o -> Integer.parseInt(o.substring(0, 2)))); |
| | | } else if (!rows.retainAll(CommonService.SECOND_GROUP_ROW_LIST)) { |
| | | locNos.sort((o1, o2) -> Integer.parseInt(o2.substring(0, 2)) - Integer.parseInt(o1.substring(0, 2))); |
| | | } else { |
| | | rows = locNos.stream().map(item -> Integer.parseInt(item.substring(0, 2))).distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | if (!rows.retainAll(new ArrayList<Integer>() {{ add(8);add(9);add(10);add(11);}})) { |
| | | locNos.sort(Comparator.comparingInt(o -> Integer.parseInt(o.substring(0, 2)))); |
| | | } else { |
| | | rows = locNos.stream().map(item -> Integer.parseInt(item.substring(0, 2))).distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | if (!rows.retainAll(new ArrayList<Integer>() {{ add(15);add(16);add(17);add(18);}})) { |
| | | locNos.sort(Comparator.comparingInt(o -> Integer.parseInt(o.substring(0, 2)))); |
| | | } else { |
| | | rows = locNos.stream().map(item -> Integer.parseInt(item.substring(0, 2))).distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | if (!rows.retainAll(new ArrayList<Integer>() {{ add(4);add(5);add(6);add(7);}})) { |
| | | locNos.sort((o1, o2) -> Integer.parseInt(o2.substring(0, 2)) - Integer.parseInt(o1.substring(0, 2))); |
| | | } else { |
| | | rows = locNos.stream().map(item -> Integer.parseInt(item.substring(0, 2))).distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | if (!rows.retainAll(new ArrayList<Integer>() {{ add(12);add(13);add(14);}})) { |
| | | locNos.sort((o1, o2) -> Integer.parseInt(o2.substring(0, 2)) - Integer.parseInt(o1.substring(0, 2))); |
| | | } else { |
| | | rows = locNos.stream().map(item -> Integer.parseInt(item.substring(0, 2))).distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | if (!rows.retainAll(new ArrayList<Integer>() {{ add(19);add(20);add(21);}})) { |
| | | locNos.sort((o1, o2) -> Integer.parseInt(o2.substring(0, 2)) - Integer.parseInt(o1.substring(0, 2))); |
| | | } else { |
| | | rows = locNos.stream().map(item -> Integer.parseInt(item.substring(0, 2))).distinct().collect(Collectors.toList()); |
| | | } |
| | | |
| | | // if (!rows.retainAll(new ArrayList<Integer>() {{ add(1);add(2);add(3);}}) |
| | | // || !rows.retainAll(new ArrayList<Integer>() {{ add(8);add(9);add(10);add(11);}}) |
| | | // || !rows.retainAll(new ArrayList<Integer>() {{ add(15);add(16);add(17);add(18);}}) |
| | | // ) { |
| | | // locNos.sort(Comparator.comparingInt(o -> Integer.parseInt(o.substring(0, 2)))); |
| | | // } else if (!rows.retainAll(new ArrayList<Integer>() {{ add(4);add(5);add(6);add(7);}}) |
| | | // || !rows.retainAll(new ArrayList<Integer>() {{ add(12);add(13);add(14);}}) |
| | | // || !rows.retainAll(new ArrayList<Integer>() {{ add(19);add(20);add(21);}}) |
| | | // ) { |
| | | // locNos.sort((o1, o2) -> Integer.parseInt(o2.substring(0, 2)) - Integer.parseInt(o1.substring(0, 2))); |
| | | // } |
| | | for (String locNo : locNos) { |
| | | LocMast locMast = this.selectById(locNo); |
| | | if (locMast.getLocSts().equals("O")) { |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public synchronized void breakUp(String locNo, List<String> excludeLocNos) { |
| | | List<String> groupLoc = Utils.getGroupOuterLoc(locNo); |
| | | Iterator<String> iterator = groupLoc.iterator(); |
| | | while (iterator.hasNext()) { |
| | | String next = iterator.next(); |
| | | LocMast locMast = this.selectById(next); |
| | | if (locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D")) { |
| | | if (!excludeLocNos.contains(locMast.getLocNo())) { |
| | | continue; |
| | | } |
| | | } |
| | | iterator.remove(); |
| | | } |
| | | workService.shuttleTransfer(groupLoc); |
| | | } |
| | | |
| | | } |
| | |
| | | public class MatServiceImpl extends ServiceImpl<MatMapper, Mat> implements MatService { |
| | | |
| | | @Override |
| | | public Page<Mat> getPage(Page page, String tagId, Object matnr, Object maktx) { |
| | | return page.setRecords(baseMapper.listByPage(page, tagId, matnr, maktx)); |
| | | public Page<Mat> getPage(Page page, String tagId, Object matnr, Object maktx, Object specs) { |
| | | return page.setRecords(baseMapper.listByPage(page, tagId, matnr, maktx, specs)); |
| | | } |
| | | |
| | | |
| | |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.OpenOrderPakinParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.entity.Parameter; |
| | |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private WorkLogHandler workLogHandler; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | | throw new CoolException(param.getBarcode() + "数据正在进行入库"); |
| | | } |
| | | |
| | | // todo: 不下线重新入库 |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode()); |
| | | if (wrkMast != null && wrkMast.getWrkSts() == 18) { |
| | | ReturnT<String> start = workLogHandler.start(wrkMast); |
| | | if (!start.isSuccess()) { |
| | | log.error("工作档[workNo={}]历史档处理失败", wrkMast.getWrkNo()); |
| | | } |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | |
| | | // 无单组托 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean increaseAnfme(Long orderId, String matnr, String batch, Double qty) { |
| | | return this.baseMapper.increaseAnfme(orderId, matnr, batch, qty) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean increase(Long orderId, String matnr, String batch, Double qty) { |
| | | return this.baseMapper.increase(orderId, matnr, batch, qty) > 0; |
| | | } |
| | |
| | | return this.baseMapper.modifyStatus(orderId, status) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderDetl> selectRemainder(Long orderId) { |
| | | return this.baseMapper.selectRemainder(orderId); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SnowflakeIdWorker; |
| | |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.mapper.OrderMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.model.OrderDto; |
| | | import com.zy.common.model.OrderMergeVo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private DocTypeService docTypeService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @Override |
| | | public Order selectByNo(String orderNo) { |
| | |
| | | break; |
| | | } |
| | | } |
| | | if (complete && wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", orderNo)) == 0) { |
| | | if (complete && wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().like("order_no", orderNo)) == 0) { |
| | | // 出库订单重新整理明细 |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | if (null != docType && docType.getPakout() == 1) { |
| | | // 重组明细 |
| | | if (!orderDetlService.delete(new EntityWrapper<OrderDetl>().eq("order_id", order.getId()))) { |
| | | throw new CoolException("重整出库订单【orderNo = " + order.getOrderNo() + "】明细失败"); |
| | | } |
| | |
| | | return this.baseMapper.selectComplete(); |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderMergeVo> mergePreview(List<Long> ids) { |
| | | List<OrderMergeVo> result = new ArrayList<>(); |
| | | for (Long orderId : ids) { |
| | | Order order = this.selectById(orderId); |
| | | // 获取所有未作业的明细 |
| | | List<OrderDetl> orderDetls = orderDetlService.selectRemainder(orderId); |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | Double leave = orderDetl.getAnfme() - orderDetl.getQty(); |
| | | OrderMergeVo vo = new OrderMergeVo(orderDetl.getMatnr(), orderDetl.getBatch(), leave); |
| | | OrderDto orderDto = new OrderDto(orderDetl.getOrderNo(), null, leave); |
| | | if (OrderMergeVo.has(result, vo)) { |
| | | OrderMergeVo exist = OrderMergeVo.find(result, vo.getMatnr(), vo.getBatch()); |
| | | assert exist != null; |
| | | exist.setAnfme(exist.getAnfme() + vo.getAnfme()); |
| | | exist.getOrderDtos().add(orderDto); |
| | | } else { |
| | | vo.getOrderDtos().add(orderDto); |
| | | result.add(vo); |
| | | } |
| | | |
| | | } |
| | | } |
| | | for (OrderMergeVo vo : result) { |
| | | Mat mat = matService.selectByMatnr(vo.getMatnr()); |
| | | assert mat != null; |
| | | vo.setMaktx(mat.getMaktx()); |
| | | vo.setSpecs(mat.getSpecs()); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.BaseRes; |
| | |
| | | import com.zy.common.model.enums.WorkNoType; |
| | | import com.zy.common.properties.SlaveProperties; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.common.web.WcsController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(1L); // 工作状态:生成入库ID |
| | | wrkMast.setIoType(1); // 入出库状态:1.入库 |
| | | wrkMast.setIoPri(13D); // 优先级:13 |
| | | Double ioPri = wrkMastService.getIoPri(1, dto.getLocNo()); |
| | | wrkMast.setIoPri(ioPri); // 优先级:13 |
| | | wrkMast.setOutMost(locMastService.isOutMost(dto.getLocNo(), true)?1:0);; |
| | | wrkMast.setCrnNo(dto.getCrnNo()); |
| | | wrkMast.setSourceStaNo(dto.getSourceStaNo()); |
| | |
| | | } |
| | | } |
| | | Integer ioType = null; |
| | | List<String> excludeLocNos = dtos.stream().map(OutLocDto::getLocNo).distinct().collect(Collectors.toList()); |
| | | // 生成工作档 |
| | | for (OutLocDto dto : dtos) { |
| | | // 如果为深库位,且对应浅库位为X.禁用,则略过此库位 |
| | |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | wrkMast.setIoType(ioType); // 入出库状态 |
| | | wrkMast.setIoPri(13D); // 优先级:13 |
| | | Double ioPri = wrkMastService.getIoPri(ioType, dto.getLocNo()); |
| | | wrkMast.setIoPri(ioPri); // 优先级:13 |
| | | wrkMast.setOutMost(locMastService.isOutMost(dto.getLocNo(), false)?1:0);; |
| | | wrkMast.setCrnNo(locMast.getCrnNo()); |
| | | wrkMast.setSourceStaNo(staDesc.getCrnStn()); // 源站 |
| | |
| | | } else { |
| | | throw new CoolException(dto.getLocNo() + "库位不是在库状态"); |
| | | } |
| | | locMastService.breakUp(dto.getLocNo(), excludeLocNos); |
| | | } |
| | | } |
| | | |
| | |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | wrkMast.setIoType(ioType); // 入出库状态 |
| | | wrkMast.setIoPri(13D); // 优先级:13 |
| | | Double ioPri = wrkMastService.getIoPri(ioType, taskDto.getLocNo()); |
| | | wrkMast.setIoPri(ioPri); // 优先级:13 |
| | | wrkMast.setOutMost(locMastService.isOutMost(taskDto.getLocNo(), false)?1:0);; |
| | | wrkMast.setCrnNo(locMast.getCrnNo()); |
| | | wrkMast.setSourceStaNo(staDesc.getCrnStn()); // 源站 |
| | |
| | | // 生成工作档明细 |
| | | for (LocDto locDto : taskDto.getLocDtos()) { |
| | | if (locDto.getAnfme()==null || locDto.getAnfme() <= 0.0D) { continue; } |
| | | OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null); |
| | | } |
| | | LocDetl locDetl = locDetlService.selectItem(locDto.getLocNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | if (locDetl == null || locDetl.getAnfme() < locDto.getAnfme()) { |
| | | throw new CoolException(locDto.getLocNo() + "库位中" + locDto.getMatnr() + "商品库存不足!"); |
| | | } |
| | | Mat mat = matService.selectByMatnr(locDto.getMatnr()); |
| | | assert mat != null; |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.sync(orderDetl); |
| | | wrkDetl.sync(mat); |
| | | wrkDetl.setZpallet(wrkMast.getBarcode()); |
| | | wrkDetl.setIoTime(now); |
| | | wrkDetl.setWrkNo(workNo); |
| | |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | // 修改订单明细 |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | if (!BaseController.isJSON(locDto.getOrderNo())) { |
| | | OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null); |
| | | } |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | | } else { |
| | | // 订单合并出库 |
| | | List<OrderDto> orderDtoList = JSON.parseArray(locDto.getOrderNo(), OrderDto.class); |
| | | for (OrderDto orderDto : orderDtoList) { |
| | | OrderDetl orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(orderDto.getOrderNo(), locDto.getMatnr(), null); |
| | | } |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDto.getAnfme())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | | } |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | | } |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | | locMast = locMastService.selectById(taskDto.getLocNo()); |
| | |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(1L); // 工作状态:生成入库ID |
| | | wrkMast.setIoType(10); // 入出库状态:10.空板入库 |
| | | wrkMast.setIoPri(10D); // 优先级:10 |
| | | Double ioPri = wrkMastService.getIoPri(10, dto.getLocNo()); |
| | | wrkMast.setIoPri(ioPri); // 优先级:10 |
| | | wrkMast.setOutMost(locMastService.isOutMost(dto.getLocNo(), true)?1:0);; |
| | | wrkMast.setCrnNo(dto.getCrnNo()); |
| | | wrkMast.setSourceStaNo(dto.getSourceStaNo()); |
| | |
| | | .eq("stn_no", param.getOutSite()) |
| | | .eq("crn_no", locMast.getCrnNo()); |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | | throw new CoolException("非法路径!"); |
| | | } |
| | | Integer sourceStaNo = staDesc.getCrnStn(); |
| | | if (Cools.isEmpty(sourceStaNo)) { |
| | | throw new CoolException("检索源站失败"); |
| | |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | wrkMast.setIoType(110); // 入出库状态: 110.空板出库 |
| | | wrkMast.setIoPri(10D); |
| | | Double ioPri = wrkMastService.getIoPri(110, locNo); |
| | | wrkMast.setIoPri(ioPri); |
| | | wrkMast.setSourceStaNo(sourceStaNo); // 源站 |
| | | wrkMast.setStaNo(param.getOutSite()); // 目标站 |
| | | wrkMast.setOutMost(locMastService.isOutMost(locNo, false)?1:0);; |
| | |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | if (!sourceLoc.getCrnNo().equals(loc.getCrnNo())) { |
| | | throw new CoolException("移转库位属于不同堆垛机"); |
| | | // throw new CoolException("移转库位属于不同堆垛机"); todo:luxiaotao |
| | | } |
| | | Date now = new Date(); |
| | | // 获取工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.PICK.type); |
| | | // 保存工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(workNo); |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | wrkMast.setIoType(11); // 入出库状态: 11.库格移载 |
| | | wrkMast.setIoPri(10D); |
| | |
| | | wrkMast.setBarcode(sourceLoc.getBarcode()); // 托盘码 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setAppeUser(userId); |
| | | wrkMast.setAppeTime(new Date()); |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMast.setModiTime(now); |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | | if (!res) { |
| | | throw new CoolException("保存工作档失败"); |
| | |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.sync(locDetl); |
| | | wrkDetl.setWrkNo(workNo); |
| | | wrkDetl.setIoTime(new Date()); |
| | | wrkDetl.setIoTime(now); |
| | | wrkDetl.setAnfme(locDetl.getAnfme()); |
| | | wrkDetl.setAppeTime(new Date()); |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setAppeUser(userId); |
| | | wrkDetl.setModiTime(new Date()); |
| | | wrkDetl.setModiTime(now); |
| | | wrkDetl.setModiUser(userId); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | |
| | | if (sourceLoc.getLocSts().equals("D") || sourceLoc.getLocSts().equals("F")) { |
| | | sourceLoc.setLocSts("R"); // R.出库预约 |
| | | sourceLoc.setModiUser(userId); |
| | | sourceLoc.setModiTime(new Date()); |
| | | sourceLoc.setModiTime(now); |
| | | if (!locMastService.updateById(sourceLoc)){ |
| | | throw new CoolException("更新源库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("源库位出库失败,状态:"+sourceLoc.getLocSts$()); |
| | | throw new CoolException(sourceLoc.getLocNo() + "源库位出库失败,状态:"+sourceLoc.getLocSts$()); |
| | | } |
| | | // 修改目标库位状态 |
| | | if (loc.getLocSts().equals("O")) { |
| | | loc.setLocSts("S"); // S.入库预约 |
| | | loc.setModiTime(new Date()); |
| | | loc.setModiTime(now); |
| | | loc.setModiUser(userId); |
| | | if (!locMastService.updateById(loc)) { |
| | | throw new CoolException("更新目标库位状态失败"); |
| | |
| | | String locNo = ""; // 待修改目标库位 |
| | | String locSts = ""; // 待修改目标库位状态 |
| | | // 入库取消(修改目标库位) |
| | | if (wrkMast.getWrkSts() < 4) { |
| | | if (wrkMast.getWrkSts() < 9) { |
| | | locNo = wrkMast.getLocNo(); |
| | | locSts = "O"; |
| | | |
| | |
| | | locMastService.updateById(locMast); |
| | | } |
| | | // 出库取消(修改源库位) |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14) { |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 19) { |
| | | locNo = wrkMast.getSourceLocNo(); |
| | | // 出库 ===>> F.在库 |
| | | if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) { |
| | |
| | | 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("订单数据回滚失败"); |
| | | if (!BaseController.isJSON(wrkDetl.getOrderNo())) { |
| | | if (!orderDetlService.decrease(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getAnfme())) { |
| | | throw new CoolException("订单数据回滚失败"); |
| | | } |
| | | } else { |
| | | // 订单合并出库 |
| | | List<OrderDto> orderDtoList = JSON.parseArray(wrkDetl.getOrderNo(), OrderDto.class); |
| | | for (OrderDto orderDto : orderDtoList) { |
| | | if (!orderDetlService.decrease(orderDto.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), orderDto.getAnfme())) { |
| | | throw new CoolException("订单数据回滚失败"); |
| | | } |
| | | } |
| | | } |
| | | // 生成新的出库作业 |
| | | // stockOutRe(wrkMast, wrkDetls); |
| | | } |
| | | } |
| | | // 取消操作人员记录 |
| | |
| | | return ""; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void shuttleTransfer(List<String> locNos) { |
| | | if (Cools.isEmpty(locNos)) { |
| | | return; |
| | | } |
| | | if (true && !Cools.isEmpty(locNos)) { |
| | | throw new CoolException("暂不支持移库任务"); // todo:luxiaotao 移库开关 |
| | | } |
| | | LocMast one = locMastService.selectById(locNos.get(0)); |
| | | List<Integer> rows = Utils.getGroupLoc(Integer.parseInt(locNos.get(0).substring(0, 2))); |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast(rows, rows.size(), one.getLocType1()); |
| | | if (Cools.isEmpty(locMasts)) { |
| | | throw new CoolException("库位移转失败,已无空库位"); |
| | | } |
| | | // 入库排序 深库位 ==> 浅库位 |
| | | switch (locMasts.get(0).getRow1()) { |
| | | case 4: |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | case 12: |
| | | case 13: |
| | | case 14: |
| | | case 19: |
| | | case 20: |
| | | case 21: |
| | | Collections.reverse(locMasts); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | if (locNos.size() > locMasts.size()) { |
| | | throw new CoolException("服务器错误"); |
| | | } |
| | | Date now = new Date(); |
| | | // 生成移库工作档 |
| | | Iterator<LocMast> iterator = locMasts.iterator(); |
| | | for (String sourceLocNo : locNos) { |
| | | |
| | | while (iterator.hasNext()) { |
| | | LocMast sourceLoc = locMastService.selectById(sourceLocNo); |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", sourceLocNo)); |
| | | if (Cools.isEmpty(sourceLoc)){ |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | LocMast loc = iterator.next(); |
| | | if (Cools.isEmpty(loc)){ |
| | | throw new CoolException("未找到库位"); |
| | | } |
| | | if (!sourceLoc.getCrnNo().equals(loc.getCrnNo())) { |
| | | // throw new CoolException("移转库位属于不同堆垛机"); todo:luxiaotao |
| | | } |
| | | // 获取工作号 |
| | | 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.setIoPri(15D); |
| | | wrkMast.setOutMost(locMastService.isOutMost(loc.getLocNo(), false)?1:0);; |
| | | wrkMast.setCrnNo(sourceLoc.getCrnNo()); |
| | | wrkMast.setSourceLocNo(sourceLocNo); // 源库位 |
| | | wrkMast.setLocNo(loc.getLocNo()); // 目标库位 |
| | | wrkMast.setFullPlt(Cools.isEmpty(locDetls)?"N":"Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setEmptyMk(sourceLoc.getLocSts().equals("D")?"Y":"N"); // 空板 |
| | | wrkMast.setBarcode(sourceLoc.getBarcode()); // 托盘码 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setAppeUser(9527L); |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(9527L); |
| | | wrkMast.setModiTime(now); |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | | if (!res) { |
| | | throw new CoolException("保存工作档失败"); |
| | | } |
| | | // 工作档明细保存 |
| | | for (LocDetl locDetl : locDetls) { |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.sync(locDetl); |
| | | wrkDetl.setWrkNo(workNo); |
| | | wrkDetl.setIoTime(now); |
| | | wrkDetl.setAnfme(locDetl.getAnfme()); |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setAppeUser(9527L); |
| | | wrkDetl.setModiTime(now); |
| | | wrkDetl.setModiUser(9527L); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | } |
| | | // 修改源库位状态 |
| | | if (sourceLoc.getLocSts().equals("D") || sourceLoc.getLocSts().equals("F")) { |
| | | sourceLoc.setLocSts("R"); // R.出库预约 |
| | | sourceLoc.setModiUser(9527L); |
| | | sourceLoc.setModiTime(now); |
| | | if (!locMastService.updateById(sourceLoc)){ |
| | | throw new CoolException("更新源库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException(sourceLoc.getLocNo() + "源库位出库失败,状态:"+sourceLoc.getLocSts$()); |
| | | } |
| | | // 修改目标库位状态 |
| | | if (loc.getLocSts().equals("O")) { |
| | | loc.setLocSts("S"); // S.入库预约 |
| | | loc.setModiTime(now); |
| | | loc.setModiUser(9527L); |
| | | if (!locMastService.updateById(loc)) { |
| | | throw new CoolException("更新目标库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("移转失败,目标库位状态:"+loc.getLocSts$()); |
| | | } |
| | | |
| | | iterator.remove(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.WrkChargeMapper; |
| | | import com.zy.asrs.entity.WrkCharge; |
| | | import com.zy.asrs.service.WrkChargeService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("wrkChargeService") |
| | | public class WrkChargeServiceImpl extends ServiceImpl<WrkChargeMapper, WrkCharge> implements WrkChargeService { |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public synchronized Double getIoPri(Integer ioType, String locNo) { |
| | | Double defaultIoPri = null; |
| | | if (Cools.isEmpty(ioType, locNo)) { |
| | | return 15.0D; |
| | | } |
| | | if (ioType != 11) { |
| | | // 入库 |
| | | if (ioType < 100) { |
| | | List<String> groupOuterLoc = Utils.getGroupOuterLoc(locNo); |
| | | if (!Cools.isEmpty(groupOuterLoc)) { |
| | | for (String outerLoc : groupOuterLoc) { |
| | | WrkMast wrkMast = this.baseMapper.selectByLocNoOfPakin(outerLoc); |
| | | if (wrkMast != null) { |
| | | defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2; |
| | | } |
| | | } |
| | | } |
| | | List<String> groupInsideLoc = Utils.getGroupInsideLoc(locNo); |
| | | if (!Cools.isEmpty(groupInsideLoc)) { |
| | | for (String insideLoc : groupInsideLoc) { |
| | | WrkMast wrkMast = this.baseMapper.selectByLocNoOfPakin(insideLoc); |
| | | if (wrkMast != null) { |
| | | defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2; |
| | | } |
| | | } |
| | | } |
| | | // 出库 |
| | | } else { |
| | | List<String> groupOuterLoc = Utils.getGroupOuterLoc(locNo); |
| | | if (!Cools.isEmpty(groupOuterLoc)) { |
| | | for (String outerLoc : groupOuterLoc) { |
| | | WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(outerLoc); |
| | | if (wrkMast != null) { |
| | | defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2; |
| | | } |
| | | } |
| | | } |
| | | List<String> groupInsideLoc = Utils.getGroupInsideLoc(locNo); |
| | | if (!Cools.isEmpty(groupInsideLoc)) { |
| | | for (String insideLoc : groupInsideLoc) { |
| | | WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(insideLoc); |
| | | if (wrkMast != null) { |
| | | defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 移库 |
| | | } else { |
| | | // @Deprecated |
| | | } |
| | | return defaultIoPri == null ? 15.0D : defaultIoPri; |
| | | } |
| | | |
| | | @Override |
| | | public int getStoreCount(Integer crnNo) { |
| | | return selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo) |
| | | .last(" and (wrk_sts in (1,2) or (wrk_sts=3 and wrk_no in (select wrk_no from asr_bas_devp)))")); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean setSteEmpty(Integer wrkNo) { |
| | | return this.baseMapper.setSteEmpty(wrkNo) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public WrkMast selectOfPick(Integer wrkNo, Integer ioType) { |
| | | return this.baseMapper.selectOfPick(wrkNo, ioType); |
| | | } |
| | | |
| | | } |
| | |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Component |
| | | //@RestController |
| | | public class ErrorStockScheduler { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(ErrorStockScheduler.class); |
| | |
| | | } |
| | | } |
| | | |
| | | // @Autowired |
| | | // private BasErrLogService basErrLogService; |
| | | // @Autowired |
| | | // private BasCrnErrorMapper basCrnErrorMapper; |
| | | // |
| | | // @GetMapping("/adsadwqwqewq") |
| | | // private void ErrorCovert(){ |
| | | // List<BasErrLog> basErrLogs = basErrLogService.selectList(new EntityWrapper<BasErrLog>()); |
| | | // for (BasErrLog basErrLog : basErrLogs) { |
| | | // if (!Cools.isEmpty(basErrLog.getErrCode())) { |
| | | // BasCrnError error = basCrnErrorMapper.selectById(basErrLog.getErrCode()); |
| | | // basErrLog.setError(error==null?"未知异常":error.getErrName()); |
| | | // basErrLogService.updateById(basErrLog); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.common.model.OrderDto; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | // 修改订单状态 作业中 ===>> 已完成 |
| | | for (WrkDetl wrkDetl : wrkDetlsKeyOrder) { |
| | | orderService.checkComplete(wrkDetl.getOrderNo()); |
| | | if (!BaseController.isJSON(wrkDetl.getOrderNo())) { |
| | | orderService.checkComplete(wrkDetl.getOrderNo()); |
| | | } else { |
| | | // 订单合并出库 |
| | | List<OrderDto> orderDtoList = JSON.parseArray(wrkDetl.getOrderNo(), OrderDto.class); |
| | | for (OrderDto one : orderDtoList) { |
| | | orderService.checkComplete(one.getOrderNo()); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.zy.common.properties.SlaveProperties; |
| | | import com.zy.common.service.CommonService; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | } |
| | | |
| | | public static Integer getGroupRow(String locNo, Boolean pakin){ |
| | | public static Integer getOutermostRow(String locNo, Boolean pakin){ |
| | | int row = getRow(locNo); |
| | | if (CommonService.FIRST_GROUP_ROW_LIST.contains(row)) { |
| | | return pakin?17:2; |
| | | switch (row) { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | return 3; |
| | | case 4: |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | return 4; |
| | | case 8: |
| | | case 9: |
| | | case 10: |
| | | case 11: |
| | | return 11; |
| | | case 12: |
| | | case 13: |
| | | case 14: |
| | | return 12; |
| | | case 15: |
| | | case 16: |
| | | case 17: |
| | | case 18: |
| | | return 18; |
| | | case 19: |
| | | case 20: |
| | | case 21: |
| | | return 19; |
| | | default: |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | if (CommonService.SECOND_GROUP_ROW_LIST.contains(row)) { |
| | | return pakin?30:18; |
| | | } |
| | | |
| | | public static Integer getInnermostRow(String locNo){ |
| | | int row = getRow(locNo); |
| | | switch (row) { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | return 1; |
| | | case 4: |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | return 7; |
| | | case 8: |
| | | case 9: |
| | | case 10: |
| | | case 11: |
| | | return 8; |
| | | case 12: |
| | | case 13: |
| | | case 14: |
| | | return 14; |
| | | case 15: |
| | | case 16: |
| | | case 17: |
| | | case 18: |
| | | return 15; |
| | | case 19: |
| | | case 20: |
| | | case 21: |
| | | return 21; |
| | | default: |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | |
| | | |
| | | public static List<String> getGroupLoc(String locNo){ |
| | | int row = getRow(locNo); |
| | | if (CommonService.FIRST_GROUP_ROW_LIST.contains(row)) { |
| | | List<String> result = new ArrayList<>(); |
| | | for (Integer row0 : CommonService.FIRST_GROUP_ROW_LIST) { |
| | | result.add(zerofill(String.valueOf(row0), 2) + locNo.substring(2)); |
| | | } |
| | | return result; |
| | | switch (row) { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(1), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(2), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(3), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 4: |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(4), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(5), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(6), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(7), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 8: |
| | | case 9: |
| | | case 10: |
| | | case 11: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(8), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(9), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(10), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(11), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 12: |
| | | case 13: |
| | | case 14: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(12), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(13), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(14), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 15: |
| | | case 16: |
| | | case 17: |
| | | case 18: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(15), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(16), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(17), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(18), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 19: |
| | | case 20: |
| | | case 21: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(19), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(20), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(21), 2) + locNo.substring(2)); |
| | | }}; |
| | | default: |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | if (CommonService.SECOND_GROUP_ROW_LIST.contains(row)) { |
| | | List<String> result = new ArrayList<>(); |
| | | for (Integer row0 : CommonService.SECOND_GROUP_ROW_LIST) { |
| | | result.add(zerofill(String.valueOf(row0), 2) + locNo.substring(2)); |
| | | } |
| | | return result; |
| | | } |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | SlaveProperties slaveProperties = new SlaveProperties(); |
| | | slaveProperties.setDoubleDeep(true); |
| | | List<Integer> list = new ArrayList<>(); |
| | | list.add(1);list.add(4);list.add(5);list.add(8);list.add(9);list.add(12); |
| | | slaveProperties.setDoubleLocs(list); |
| | | slaveProperties.setGroupCount(4); |
| | | Integer deepRow = getDeepRow(slaveProperties, 6); |
| | | System.out.println(deepRow); |
| | | |
| | | public static List<Integer> getGroupLoc(Integer row){ |
| | | switch (row) { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | return new ArrayList<Integer>() {{ |
| | | add(1); |
| | | add(2); |
| | | add(3); |
| | | }}; |
| | | case 4: |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | return new ArrayList<Integer>() {{ |
| | | add(4); |
| | | add(5); |
| | | add(6); |
| | | add(7); |
| | | }}; |
| | | case 8: |
| | | case 9: |
| | | case 10: |
| | | case 11: |
| | | return new ArrayList<Integer>() {{ |
| | | add(8); |
| | | add(9); |
| | | add(10); |
| | | add(11); |
| | | }}; |
| | | case 12: |
| | | case 13: |
| | | case 14: |
| | | return new ArrayList<Integer>() {{ |
| | | add(12); |
| | | add(13); |
| | | add(14); |
| | | }}; |
| | | case 15: |
| | | case 16: |
| | | case 17: |
| | | case 18: |
| | | return new ArrayList<Integer>() {{ |
| | | add(15); |
| | | add(16); |
| | | add(17); |
| | | add(18); |
| | | }}; |
| | | case 19: |
| | | case 20: |
| | | case 21: |
| | | return new ArrayList<Integer>() {{ |
| | | add(19); |
| | | add(20); |
| | | add(21); |
| | | }}; |
| | | default: |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | } |
| | | |
| | | // 注意顺序 |
| | | public static List<String> getGroupOuterLoc(String locNo){ |
| | | int row = getRow(locNo); |
| | | switch (row) { |
| | | case 1: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(3), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(2), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 2: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(3), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 3: |
| | | case 4: |
| | | case 11: |
| | | case 12: |
| | | case 18: |
| | | case 19: |
| | | return new ArrayList<>(); |
| | | case 5: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(4), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 6: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(4), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(5), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 7: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(4), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(5), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(6), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 8: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(11), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(10), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(9), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 9: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(11), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(10), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 10: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(11), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 13: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(12), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 14: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(12), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(13), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 15: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(18), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(17), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(16), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 16: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(18), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(17), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 17: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(18), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 20: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(19), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 21: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(19), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(20), 2) + locNo.substring(2)); |
| | | }}; |
| | | default: |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | } |
| | | |
| | | // 注意顺序 |
| | | public static List<String> getGroupInsideLoc(String locNo){ |
| | | int row = getRow(locNo); |
| | | switch (row) { |
| | | case 1: |
| | | case 21: |
| | | case 14: |
| | | case 15: |
| | | case 7: |
| | | case 8: |
| | | return new ArrayList<>(); |
| | | case 2: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(1), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 3: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(1), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(2), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 4: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(7), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(6), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(5), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 5: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(7), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(6), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 6: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(7), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 9: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(8), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 10: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(8), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(9), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 11: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(8), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(9), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(10), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 12: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(14), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(13), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 13: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(14), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 16: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(15), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 17: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(15), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(16), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 18: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(15), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(16), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(17), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 19: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(21), 2) + locNo.substring(2)); |
| | | add(zerofill(String.valueOf(20), 2) + locNo.substring(2)); |
| | | }}; |
| | | case 20: |
| | | return new ArrayList<String>() {{ |
| | | add(zerofill(String.valueOf(21), 2) + locNo.substring(2)); |
| | | }}; |
| | | default: |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | // generator.table="sys_host"; |
| | | // sqlserver |
| | | generator.sqlOsType = SqlOsType.SQL_SERVER; |
| | | generator.url="localhost:1433;databasename=ynasrs"; |
| | | generator.url="10.10.10.100:1433;databasename=bfasrs"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="asr_bas_ste_opt"; |
| | | generator.table="asr_bas_ste_err_log"; |
| | | generator.packagePath="com.zy.asrs"; |
| | | generator.build(); |
| | | } |
| | |
| | | String PICK_600 = "600-拣料任务"; |
| | | String NO_COMB_700 = "700-请先组托"; |
| | | |
| | | String NONE_MAST_800 = "800-任务丢失"; |
| | | String NONE_DETL_900 = "900-任务明细丢失"; |
| | | |
| | | } |
| | |
| | | |
| | | private Integer staNo; |
| | | |
| | | private String specs; |
| | | |
| | | public LocDto() { |
| | | } |
| | | |
New file |
| | |
| | | package com.zy.common.model; |
| | | |
| | | import com.core.common.Cools; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2022/10/17 |
| | | */ |
| | | @Data |
| | | public class OrderMergeVo { |
| | | |
| | | private String matnr; |
| | | |
| | | private String maktx; |
| | | |
| | | private String batch; |
| | | |
| | | private String specs; |
| | | |
| | | private Double anfme; |
| | | |
| | | private List<OrderDto> orderDtos = new ArrayList<>(); |
| | | |
| | | public OrderMergeVo(String matnr, String batch, Double anfme) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public static boolean has(List<OrderMergeVo> detlDtos, OrderMergeVo detlDto) { |
| | | for (OrderMergeVo dto : detlDtos) { |
| | | if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch())) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public static OrderMergeVo find(List<OrderMergeVo> detlDtos, String matnr, String batch) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | for (OrderMergeVo detlDto : detlDtos) { |
| | | if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch())) { |
| | | return detlDto; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, LocTypeDto oldLocType, int times) { |
| | | StartupDto startupDto = new StartupDto(); |
| | | int start = 2; |
| | | int end = 30; |
| | | int start; |
| | | int end; |
| | | switch (sourceStaNo) { |
| | | case 107: |
| | | whsType = 2; |
| | | end = 17; |
| | | case 103: |
| | | whsType = 1; |
| | | start = 1; |
| | | end = 14; |
| | | break; |
| | | case 118: |
| | | whsType = 3; |
| | | start = 18; |
| | | case 203: |
| | | whsType = 2; |
| | | start = 8; |
| | | end = 21; |
| | | break; |
| | | default: |
| | | whsType = 1; |
| | | break; |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | | } |
| | | // 生成工作号 |
| | | int workNo = getWorkNo(0); |
| | |
| | | // 目标库位 |
| | | LocMast locMast = null; |
| | | |
| | | |
| | | // 靠近摆放规则 --- 同天同规格物料 |
| | | if (!Cools.isEmpty(matNos)) { |
| | | if (!Cools.isEmpty(matNos) && matNos.size() == 1) { |
| | | List<String> locNos = locDetlService.getSameDetl(matNos.get(0), start, end); |
| | | for (String locNo : locNos) { |
| | | List<String> groupLoc = Utils.getGroupLoc(locNo); |
| | | locMast = locMastService.findOutMost(groupLoc); |
| | | if (null != locMast) { |
| | | LocMast locMast0 = locMastService.findOutMost(groupLoc); |
| | | if (null != locMast0) { |
| | | // 浅库位符合尺寸检测 |
| | | if (VersionUtils.locMoveCheckLocType(locMast, locTypeDto)) { |
| | | if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) { |
| | | // 浅库位对应堆垛机必须可用且无异常 |
| | | if (basCrnpService.checkSiteError(locMast.getCrnNo(), true)) { |
| | | crnNo = locMast.getCrnNo(); // todo:luxiaotao crn 不等于locMast.crnNo |
| | | if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) { |
| | | crnNo = locMast0.getCrnNo(); |
| | | locMast = locMast0; |
| | | break; |
| | | } |
| | | } |
| | |
| | | |
| | | // 靠近摆放规则 --- 空托 |
| | | if (staDescId == 10) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", start).le("row1", end)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "D").ge("row1", start).le("row1", end)); |
| | | if (locMasts.size() > 0) { |
| | | for (LocMast loc : locMasts) { |
| | | List<String> groupLoc = Utils.getGroupLoc(loc.getLocNo()); |
| | | locMast = locMastService.findOutMost(groupLoc); |
| | | if (null != locMast) { |
| | | LocMast locMast0 = locMastService.findOutMost(groupLoc); |
| | | if (null != locMast0) { |
| | | // 浅库位符合尺寸检测 |
| | | if (VersionUtils.locMoveCheckLocType(locMast, locTypeDto)) { |
| | | if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) { |
| | | // 浅库位对应堆垛机必须可用且无异常 |
| | | if (basCrnpService.checkSiteError(locMast.getCrnNo(), true)) { |
| | | crnNo = locMast.getCrnNo(); // todo:luxiaotao crn 不等于locMast.crnNo |
| | | if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) { |
| | | crnNo = locMast0.getCrnNo(); |
| | | locMast = locMast0; |
| | | break; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // 如果没有相近物料,则按规则轮询货架 |
| | | |
| | | int currentRow = 1; |
| | | if (null == locMast) { |
| | | Shelves shelves = new Shelves(rowCount, crn_qty); |
| | | for (int i = 0; i < shelves.group; i ++) { |
| | | if (i > 0) { |
| | | curRow = currentRow; |
| | | } |
| | | curRow = shelves.start(curRow); |
| | | if (curRow < 0) { |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | | } |
| | | Integer crnNo1 = shelves.get(curRow) + 1; |
| | | if (whsType != 1) { |
| | | crnNo1 = whsType; |
| | | currentRow = curRow; |
| | | int crnNo1 = shelves.get(curRow); |
| | | if (whsType == 1) { |
| | | switch (curRow) { |
| | | case 1: |
| | | curRow = 1; |
| | | break; |
| | | case 2: |
| | | curRow = 7; |
| | | break; |
| | | case 3: |
| | | curRow = 8; |
| | | break; |
| | | case 4: |
| | | curRow = 14; |
| | | break; |
| | | default: |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | | } |
| | | } else { |
| | | switch (curRow) { |
| | | case 1: |
| | | curRow = 8; |
| | | break; |
| | | case 2: |
| | | curRow = 14; |
| | | break; |
| | | case 3: |
| | | curRow = 15; |
| | | break; |
| | | case 4: |
| | | curRow = 21; |
| | | break; |
| | | default: |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | | } |
| | | crnNo1 = crnNo1 + 1; |
| | | } |
| | | if (basCrnpService.checkSiteError(crnNo1, true)) { |
| | | crnNo = crnNo1; |
| | |
| | | } |
| | | |
| | | // 更新库位排号 |
| | | rowLastno.setCurrentRow(curRow); |
| | | rowLastno.setCurrentRow(currentRow); |
| | | rowLastnoService.updateById(rowLastno); |
| | | |
| | | // 开始查找库位 ==============================>> |
| | | |
| | | // 1.当检索库排为浅库位排时,优先寻找当前库排的深库位排 |
| | | if (locMast == null) { |
| | | List<Integer> rows; |
| | | if (whsType == 2) { |
| | | rows = FIRST_GROUP_ROW_LIST; |
| | | } else if (whsType == 3) { |
| | | rows = SECOND_GROUP_ROW_LIST; |
| | | } else { |
| | | switch (curRow) { |
| | | case 1: |
| | | rows = FIRST_GROUP_ROW_LIST; |
| | | List<Integer> rows = Utils.getGroupLoc(curRow); |
| | | |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast(rows, rows.size(), locTypeDto.getLocType1()); |
| | | if (!Cools.isEmpty(locMasts)) { |
| | | Integer innermostRow = Utils.getInnermostRow(locMasts.get(0).getLocNo()); |
| | | for (LocMast one : locMasts) { |
| | | if (one.getRow1().equals(innermostRow)) { |
| | | locMast = one; |
| | | break; |
| | | case 2: |
| | | rows = SECOND_GROUP_ROW_LIST; |
| | | break; |
| | | default: |
| | | throw new CoolException("入库逻辑故障【" + curRow + "】"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | locMast = locMastService.queryFreeLocMast(null, rows, locTypeDto.getLocType1()); |
| | | // 因库位移转、需预留空库位 |
| | | // 因库位移转、需预留空库位 todo:luxiaotao |
| | | // if (!locMastService.checkEmptyCount(locMast)) { |
| | | // locMast = null; |
| | | // } |
| | |
| | | package com.zy.common.web; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | |
| | | wrapper.like(columns.get(i), condition); |
| | | } |
| | | } |
| | | |
| | | public static boolean isJSON(String str) { |
| | | if (Cools.isEmpty(str)) { |
| | | return false; |
| | | } else { |
| | | try { |
| | | JSON.parse(str); |
| | | return true; |
| | | } catch (Exception e) { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | case 10://空托盘入库 |
| | | dto = emptyPlateIn(param.getSourceStaNo(), locTypeDto, param.getBarcode()); |
| | | break; |
| | | case 103:// 拣料入库 |
| | | case 104:// 并板入库 |
| | | case 107:// 盘点入库 |
| | | dto = pickWrkPlateIn(param.getWrkNo(), param.getIoType(), param.getSourceStaNo(), locTypeDto); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(2L); // 工作状态:生成入库ID |
| | | wrkMast.setIoType(1); // 入出库状态:1.入库 |
| | | wrkMast.setIoPri(13D); // 优先级 |
| | | Double ioPri = wrkMastService.getIoPri(1, dto.getLocNo()); |
| | | wrkMast.setIoPri(ioPri); // 优先级 |
| | | wrkMast.setCrnNo(dto.getCrnNo()); |
| | | wrkMast.setOutMost(locMastService.isOutMost(dto.getLocNo(), true)?1:0);; |
| | | wrkMast.setSourceStaNo(dto.getSourceStaNo()); |
| | |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(2L); // 工作状态:生成入库ID |
| | | wrkMast.setIoType(10); // 入出库状态:10.空板入库 |
| | | wrkMast.setIoPri(13D); // 优先级 |
| | | Double ioPri = wrkMastService.getIoPri(10, dto.getLocNo()); |
| | | wrkMast.setIoPri(ioPri); // 优先级 |
| | | wrkMast.setOutMost(locMastService.isOutMost(dto.getLocNo(), true)?1:0);; |
| | | wrkMast.setCrnNo(dto.getCrnNo()); |
| | | wrkMast.setSourceStaNo(dto.getSourceStaNo()); |
| | |
| | | wrkMast.setEmptyMk("Y"); // 空板 |
| | | wrkMast.setLinkMis("Y"); |
| | | wrkMast.setBarcode(barcode); |
| | | // wrkMast.setSteNo(findSte(wrkMast.getLocNo())); |
| | | wrkMast.setCtnType(sourceStaNo.getCtnType()); // 容器类型 |
| | | // 操作人员数据 |
| | | wrkMast.setAppeTime(new Date()); |
| | |
| | | return dto; |
| | | } |
| | | |
| | | @Transactional |
| | | public StartupDto pickWrkPlateIn(Integer wrkNo, Integer ioType, Integer devpNo, LocTypeDto locTypeDto) { |
| | | WrkMast wrkMast = wrkMastService.selectOfPick(wrkNo, ioType); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | log.error("{}任务【ioType = {}】已过期!!!", wrkNo, ioType); |
| | | throw new CoolException(CodeRes.NONE_MAST_800); |
| | | } |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | if (Cools.isEmpty(wrkDetls)) { |
| | | throw new CoolException(CodeRes.NONE_DETL_900); |
| | | } |
| | | // 检索库位 |
| | | List<String> matnrList = wrkDetls.stream().map(WrkDetl::getMatnr).distinct().collect(Collectors.toList()); |
| | | return commonService.getLocNo(1, ioType - 50, devpNo, matnrList, locTypeDto,0); // 库位号, 堆垛机,目标站 |
| | | } |
| | | |
| | | } |
| | |
| | | @Data |
| | | public class SearchLocParam { |
| | | |
| | | private Integer wrkNo; |
| | | |
| | | private Integer ioType; |
| | | |
| | | private Integer sourceStaNo; |
| | |
| | | server: |
| | | port: 8081 |
| | | port: 8080 |
| | | servlet: |
| | | context-path: /@pom.build.finalName@ |
| | | |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://47.97.1.152:51433;databasename=ynasrs |
| | | # url: jdbc:sqlserver://localhost:1433;databasename=ynasrs |
| | | # url: jdbc:sqlserver://10.10.10.100:1433;databasename=bfasrs |
| | | url: jdbc:sqlserver://localhost:1433;databasename=bfasrs |
| | | username: sa |
| | | password: Zoneyung@zy56$ |
| | | # password: Zoneyung@zy56$ |
| | | password: sa@123 |
| | | mvc: |
| | | static-path-pattern: /** |
| | | redis: |
| | |
| | | # 下位机配置 |
| | | wcs-slave: |
| | | # 双深 |
| | | doubleDeep: true |
| | | doubleDeep: false |
| | | # 双深库位排号 |
| | | doubleLocs: 1,4,5,8,9,12,13,16,17,20,21,24,25,28,29,32,33,36,37,40,41,44,45,48 |
| | | # 一个堆垛机负责的货架排数 |
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.BasSteErrLogMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BasSteErrLog"> |
| | | <id column="id" property="id" /> |
| | | <result column="uuid" property="uuid" /> |
| | | <result column="wrk_no" property="wrkNo" /> |
| | | <result column="start_time" property="startTime" /> |
| | | <result column="end_time" property="endTime" /> |
| | | <result column="wrk_sts" property="wrkSts" /> |
| | | <result column="io_type" property="ioType" /> |
| | | <result column="ste_no" property="steNo" /> |
| | | <result column="plc_no" property="plcNo" /> |
| | | <result column="loc_no" property="locNo" /> |
| | | <result column="sta_no" property="staNo" /> |
| | | <result column="source_sta_no" property="sourceStaNo" /> |
| | | <result column="source_loc_no" property="sourceLocNo" /> |
| | | <result column="barcode" property="barcode" /> |
| | | <result column="err_code" property="errCode" /> |
| | | <result column="error" property="error" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="memo" property="memo" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="idle_loc" property="idleLoc" /> |
| | | <result column="ste_err" property="steErr" /> |
| | | <result column="pak_mk" property="pakMk" /> |
| | | <result column="charge_line" property="chargeLine" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="queryFreeLocMast" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | select |
| | | * |
| | | from asr_loc_mast |
| | | where |
| | | row1 in |
| | | where 1=1 |
| | | and row1 in |
| | | <foreach item="item" collection="rows" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | <if test="locType1 != null"> |
| | | and loc_type1 = #{locType1} |
| | | </if> |
| | | and loc_sts='O' |
| | | order by loc_sts desc,row1 asc, lev1 asc, bay1 asc |
| | | and ctn_no = |
| | | ( |
| | | select |
| | | top 1 |
| | | ctn_no |
| | | from ( |
| | | select |
| | | ctn_no, |
| | | count(1) as count |
| | | from asr_loc_mast |
| | | where 1=1 |
| | | and row1 in |
| | | <foreach item="item" collection="rows" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | and loc_sts = 'O' |
| | | <if test="locType1 != null"> |
| | | and loc_type1 = #{locType1} |
| | | </if> |
| | | and loc_no not in ('0100101', '0200101', '0300101', '1200701', '1300701', '1400701', '1900401', '2000401', '2100401') |
| | | group by ctn_no |
| | | ) a |
| | | where count = #{rowsLen} |
| | | order by right(ctn_no, 2) + 0 asc, left(ctn_no, 3) + 0 asc |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="maktx != null and maktx != ''"> |
| | | and mm.maktx like concat('%',#{maktx},'%') |
| | | </if> |
| | | <if test="specs != null and specs != ''"> |
| | | and mm.specs like concat('%',#{specs},'%') |
| | | </if> |
| | | ORDER BY mm.create_time DESC |
| | | </select> |
| | | |
| | |
| | | <include refid="pakOutPageCondition"></include> |
| | | </select> |
| | | |
| | | <update id="increaseAnfme"> |
| | | update man_order_detl |
| | | set anfme = anfme + #{qty} |
| | | where 1=1 |
| | | and order_id = #{orderId} |
| | | and matnr = #{matnr} |
| | | <choose> |
| | | <when test="batch != null and batch != ''"> |
| | | and batch = #{batch} |
| | | </when> |
| | | <otherwise> |
| | | and (batch IS NULL OR batch = '') |
| | | </otherwise> |
| | | </choose> |
| | | </update> |
| | | |
| | | <update id="increase"> |
| | | update man_order_detl |
| | | set qty = qty + #{qty} |
| | |
| | | and order_id = #{orderId} |
| | | </update> |
| | | |
| | | <select id="selectRemainder" resultMap="BaseResultMap"> |
| | | select |
| | | * |
| | | from man_order_detl |
| | | where 1=1 |
| | | and anfme > qty |
| | | and order_id = #{orderId} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.mapper.WrkChargeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WrkCharge"> |
| | | <id column="wrk_no" property="wrkNo" /> |
| | | <result column="mk" property="mk" /> |
| | | <result column="wrk_sts" property="wrkSts" /> |
| | | <result column="io_type" property="ioType" /> |
| | | <result column="crn_no" property="crnNo" /> |
| | | <result column="ste_no" property="steNo" /> |
| | | <result column="out_most" property="outMost" /> |
| | | <result column="io_pri" property="ioPri" /> |
| | | <result column="loc_no" property="locNo" /> |
| | | <result column="sta_no" property="staNo" /> |
| | | <result column="source_sta_no" property="sourceStaNo" /> |
| | | <result column="source_loc_no" property="sourceLocNo" /> |
| | | <result column="empty_mk" property="emptyMk" /> |
| | | <result column="io_time" property="ioTime" /> |
| | | <result column="crn_str_time" property="crnStrTime" /> |
| | | <result column="crn_end_time" property="crnEndTime" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="barcode" property="barcode" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | order by io_time,wrk_no asc |
| | | </select> |
| | | |
| | | <select id="selectByLocNoOfPakin" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from asr_wrk_mast |
| | | where 1=1 |
| | | and io_type < 100 and io_type != 11 |
| | | and loc_no = #{locNo} |
| | | and wrk_sts < 9 |
| | | </select> |
| | | |
| | | <select id="selectBySourceLocNoOfPakout" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from asr_wrk_mast |
| | | where 1=1 |
| | | and io_type > 100 |
| | | and source_loc_no = #{sourceLocNo} |
| | | and wrk_sts < 17 |
| | | </select> |
| | | |
| | | <select id="selectOfPick" resultMap="BaseResultMap"> |
| | | select top 1 * from asr_wrk_mast where wrk_no=#{wrkNo} and wrk_sts=17 and io_type = #{ioType} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | ,{field: 'hisLev', align: 'center',title: '历史层', hide: true} |
| | | ,{field: 'idleLoc', align: 'center',title: '暂存库位'} |
| | | ,{field: 'steErr', align: 'center',title: '错误码'} |
| | | ,{field: 'chargeLine', align: 'center',title: '最低电量%'} |
| | | ,{field: 'pakMk', align: 'center',title: '标记', hide: true} |
| | | // ,{field: 'status$', align: 'center',title: '状态'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
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: '#basSteErrLog', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/basSteErrLog/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'uuid', align: 'center',title: '编号', hide: true} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{field: 'startTime$', align: 'center',title: '发生时间'} |
| | | ,{field: 'endTime$', align: 'center',title: '结束时间'} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'steNo', align: 'center',title: '穿梭车'} |
| | | ,{field: 'plcNo', align: 'center',title: 'plc', hide: true} |
| | | ,{field: 'locNo', align: 'center',title: '目标库位', hide: true} |
| | | ,{field: 'staNo', align: 'center',title: '目标站', hide: true} |
| | | ,{field: 'sourceStaNo', align: 'center',title: '源站', hide: true} |
| | | ,{field: 'sourceLocNo', align: 'center',title: '源库位', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'errCode', align: 'center',title: '异常码'} |
| | | ,{field: 'error', align: 'center',title: '异常描述'} |
| | | ,{field: 'status$', align: 'center',title: '异常情况'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间', hide: true} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{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(basSteErrLog)', 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(basSteErrLog)', 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 = { |
| | | 'basSteErrLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/basSteErrLog/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(basSteErrLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/basSteErrLog/"+(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+"/basSteErrLog/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#startTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['startTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#endTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['endTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | var baseUrl = "/ynwms"; |
| | | var baseUrl = "/bfwms"; |
| | | |
| | | // 详情窗口-高度 |
| | | var detailHeight = '80%'; |
| | |
| | | // {field: 'id', align: 'center',title: 'ID'} |
| | | // ,{field: 'uuid', align: 'center',title: '编号'} |
| | | // ,{field: 'tagId$', align: 'center',title: '所属归类'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', width: 200} |
| | | ,{field: 'specs', align: 'center',title: '规格', width: 200} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称'} |
| | | // ,{field: 'name', align: 'center',title: '别名'} |
| | | ,{field: 'specs', align: 'center',title: '配置'} |
| | | ,{field: 'model', 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: true} |
| | |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: false} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: false} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: false} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | |
| | | |
| | | var detlCols = [ |
| | | {field: 'matnr', align: 'center',title: '商品编号', sort:true} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '序列码', width: 300, sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | |
| | | ,{field: 'specs', align: 'center',title: '配置'} |
| | | ,{field: 'model', 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: true} |
| | |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: false} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: false} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: false} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: false} |
| | | ,{field: 'weight', align: 'center',title: '单箱净重', hide: true} |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '供应商', hide: true} |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | |
| | | ,{field: 'specs', 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} |
| | |
| | | var insTbCount = 0; |
| | | var admin; |
| | | var insTb |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['layer', 'form', 'table', 'util', 'admin', 'xmSelect', 'laydate'], function () { |
| | |
| | | var form = layui.form; |
| | | var table = layui.table; |
| | | var util = layui.util; |
| | | var admin = layui.admin; |
| | | admin = layui.admin; |
| | | var xmSelect = layui.xmSelect; |
| | | var layDate = layui.laydate; |
| | | var laytpl = layui.laytpl; |
| | |
| | | }) |
| | | |
| | | // 渲染表格 |
| | | var insTb = table.render({ |
| | | insTb = table.render({ |
| | | elem: '#order', |
| | | url: baseUrl+'/order/head/page/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | |
| | | // 添加 |
| | | $("#orderAddBtn").click(function () { |
| | | showEditModel(); |
| | | }); |
| | | |
| | | // 导入销售单 |
| | | $("#importOrder").click(function () { |
| | | $("#importExcel").trigger("click"); |
| | | }); |
| | | |
| | | // 工具条点击事件 |
| | |
| | | ,range: true |
| | | }); |
| | | }); |
| | | |
| | | 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']}); |
| | | var url = baseUrl + "/order/excel/import/auth"; |
| | | var form = new FormData(); |
| | | form.append("file", file); |
| | | let xhr = new XMLHttpRequest(); |
| | | xhr.open("post", url, true); |
| | | xhr.setRequestHeader('token', localStorage.getItem('token')); |
| | | xhr.onload = uploadComplete; |
| | | xhr.onerror = uploadFailed; |
| | | xhr.onloadend = function () { |
| | | layer.closeAll('loading'); |
| | | }; |
| | | // xhr.upload.onprogress = progressFunction; |
| | | xhr.upload.onloadstart = function(){ |
| | | ot = new Date().getTime(); |
| | | oloaded = 0; |
| | | }; |
| | | xhr.send(form); |
| | | }, function(index){ |
| | | }); |
| | | } |
| | | function uploadComplete(evt) { |
| | | let res = JSON.parse(evt.target.responseText); |
| | | if(res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | insTb.reload({page: {curr: 1}}); |
| | | } else { |
| | | alert(res.msg); |
| | | // layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | function uploadFailed(evt) { |
| | | let res = JSON.parse(evt.target.responseText); |
| | | alert(res.msg); |
| | | // layer.msg(res.msg, {icon: 2}); |
| | | } |
| | |
| | | |
| | | /* 表格2头工具栏点击事件 */ |
| | | table.on('toolbar(orderDetlTable)', function (obj) { |
| | | |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | if (obj.event === 'pakoutPreview') { // 添加 |
| | | if (checkStatus.length === 0) { |
| | |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | var tableCache; |
| | | if (res.code === 200){ |
| | | layer.open({ |
| | | type: 1 |
| | | ,title: false |
| | | ,closeBtn: false |
| | | ,offset: '50px' |
| | | ,area: ['1200px', '700px'] |
| | | ,shade: 0.5 |
| | | ,shadeClose: false |
| | | ,btn: ['立即出库', '稍后处理'] |
| | | ,btnAlign: 'c' |
| | | ,moveType: 1 //拖拽模式,0或者1 |
| | | ,content: $('#pakoutPreviewBox').html() |
| | | ,success: function(layero, index){ |
| | | stoPreTabIdx = table.render({ |
| | | elem: '#stoPreTab', |
| | | data: res.data, |
| | | height: 520, |
| | | page: false, |
| | | limit: Number.MAX_VALUE, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | // {type: 'checkbox', merge: ['orderNo']}, |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {field: 'batch', title: '序列码', align: 'center'}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | // {type: 'checkbox', merge: ['locNo']}, |
| | | ]], |
| | | done: function (res) { |
| | | tableMerge.render(this); |
| | | $('.layui-table-body.layui-table-main').css("overflow", "auto"); |
| | | tableCache = tableData = table.cache.stoPreTab; |
| | | } |
| | | }); |
| | | // 修改出库站 |
| | | form.on('select(tbBasicTbStaNos)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableCache[index]; |
| | | for (let i = 0; i<tableCache.length; i++) { |
| | | if (tableCache[i].locNo === data.locNo) { |
| | | tableCache[i]['staNo'] = Number(obj.elem.value); |
| | | } |
| | | } |
| | | obj.othis.children().find("input").css("color", "blue"); |
| | | return false; |
| | | }); |
| | | // 批量修改出库站 |
| | | form.on('submit(batchModifySta)', function () { |
| | | modifySta(); |
| | | }); |
| | | // 批量修改出库站 - 站点选择 |
| | | function modifySta() { |
| | | // 出库站取交集 |
| | | let staBatchSelectVal = []; |
| | | for(let i = 0; i<tableCache.length; i++) { |
| | | let staNos = tableCache[i].staNos; |
| | | if (staNos !== null) { |
| | | if (staBatchSelectVal.length === 0) { |
| | | staBatchSelectVal = staNos; |
| | | } else { |
| | | staBatchSelectVal = staBatchSelectVal.filter(val => |
| | | { |
| | | return new Set(staNos).has(val) |
| | | } |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | if (staBatchSelectVal.length === 0) { |
| | | layer.msg("出库站没有交集,无法批量修改", {icon: 2}); |
| | | return; |
| | | } |
| | | admin.open({ |
| | | type: 1, |
| | | area: '300px', |
| | | offset: 'auto', |
| | | title: '请选择站点', |
| | | content: $('#staBatchSelectDialog').html(), |
| | | success: function (layero, ddIndex) { |
| | | // 渲染下拉框 |
| | | let template = Handlebars.compile($('#batchStaSelectTpl').html()); |
| | | $('#batchSelectStaBox').html(template({list: staBatchSelectVal})); |
| | | // 确认 |
| | | form.on('submit(staBatchSelectConfirm)', function (obj) { |
| | | let loadIdx = layer.load(2); |
| | | let batchSta = Number(obj.field.batchSta); |
| | | let arr = []; |
| | | for (let i = 0; i<tableCache.length; i++) { |
| | | tableCache[i]['staNo'] = batchSta; |
| | | arr.push(i); |
| | | } |
| | | stoPreTabIdx.reload({data: tableCache}); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .order-sta-select').val(batchSta); |
| | | }); |
| | | layui.form.render('select'); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue"); |
| | | }); |
| | | layer.close(loadIdx); layer.close(ddIndex); |
| | | return false; |
| | | }); |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | } |
| | | ,yes: function(index, layero){ |
| | | //按钮【立即出库】的回调 |
| | | pakout(tableCache, index); |
| | | } |
| | | ,btn2: function(index, layero){ |
| | | //按钮【稍后处理】的回调 |
| | | layer.close(index) |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | } |
| | | }); |
| | | pakoutPreviewDialog(res.data) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function pakoutPreviewDialog(data) { |
| | | var tableCache; |
| | | layer.open({ |
| | | type: 1 |
| | | ,title: false |
| | | ,closeBtn: false |
| | | ,offset: '50px' |
| | | ,area: ['1200px', '700px'] |
| | | ,shade: 0.5 |
| | | ,shadeClose: false |
| | | ,btn: ['立即出库', '稍后处理'] |
| | | ,btnAlign: 'c' |
| | | ,moveType: 1 //拖拽模式,0或者1 |
| | | ,content: $('#pakoutPreviewBox').html() |
| | | ,success: function(layero, index){ |
| | | stoPreTabIdx = table.render({ |
| | | elem: '#stoPreTab', |
| | | data: data, |
| | | height: 520, |
| | | page: false, |
| | | limit: Number.MAX_VALUE, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | // {type: 'checkbox', merge: ['orderNo']}, |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {field: 'batch', title: '序列码', align: 'center'}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | // {type: 'checkbox', merge: ['locNo']}, |
| | | ]], |
| | | done: function (res) { |
| | | tableMerge.render(this); |
| | | $('.layui-table-body.layui-table-main').css("overflow", "auto"); |
| | | tableCache = tableData = table.cache.stoPreTab; |
| | | } |
| | | }); |
| | | // 修改出库站 |
| | | form.on('select(tbBasicTbStaNos)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableCache[index]; |
| | | for (let i = 0; i<tableCache.length; i++) { |
| | | if (tableCache[i].locNo === data.locNo) { |
| | | tableCache[i]['staNo'] = Number(obj.elem.value); |
| | | } |
| | | } |
| | | obj.othis.children().find("input").css("color", "blue"); |
| | | return false; |
| | | }); |
| | | // 批量修改出库站 |
| | | form.on('submit(batchModifySta)', function () { |
| | | modifySta(); |
| | | }); |
| | | // 批量修改出库站 - 站点选择 |
| | | function modifySta() { |
| | | // 出库站取交集 |
| | | let staBatchSelectVal = []; |
| | | for(let i = 0; i<tableCache.length; i++) { |
| | | let staNos = tableCache[i].staNos; |
| | | if (staNos !== null) { |
| | | if (staBatchSelectVal.length === 0) { |
| | | staBatchSelectVal = staNos; |
| | | } else { |
| | | staBatchSelectVal = staBatchSelectVal.filter(val => |
| | | { |
| | | return new Set(staNos).has(val) |
| | | } |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | if (staBatchSelectVal.length === 0) { |
| | | layer.msg("出库站没有交集,无法批量修改", {icon: 2}); |
| | | return; |
| | | } |
| | | admin.open({ |
| | | type: 1, |
| | | area: '300px', |
| | | offset: 'auto', |
| | | title: '请选择站点', |
| | | content: $('#staBatchSelectDialog').html(), |
| | | success: function (layero, ddIndex) { |
| | | // 渲染下拉框 |
| | | let template = Handlebars.compile($('#batchStaSelectTpl').html()); |
| | | $('#batchSelectStaBox').html(template({list: staBatchSelectVal})); |
| | | // 确认 |
| | | form.on('submit(staBatchSelectConfirm)', function (obj) { |
| | | let loadIdx = layer.load(2); |
| | | let batchSta = Number(obj.field.batchSta); |
| | | let arr = []; |
| | | for (let i = 0; i<tableCache.length; i++) { |
| | | tableCache[i]['staNo'] = batchSta; |
| | | arr.push(i); |
| | | } |
| | | stoPreTabIdx.reload({data: tableCache}); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .order-sta-select').val(batchSta); |
| | | }); |
| | | layui.form.render('select'); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue"); |
| | | }); |
| | | layer.close(loadIdx); layer.close(ddIndex); |
| | | return false; |
| | | }); |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | } |
| | | ,yes: function(index, layero){ |
| | | //按钮【立即出库】的回调 |
| | | pakout(tableCache, index); |
| | | } |
| | | ,btn2: function(index, layero){ |
| | | //按钮【稍后处理】的回调 |
| | | layer.close(index) |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function pakout(tableCache, layerIndex) { |
| | |
| | | |
| | | window.pakoutPreview = pakoutPreview; |
| | | |
| | | // ---------------------------------------------------------------------------------------------------------------------------------- |
| | | |
| | | // 合并出库 |
| | | form.on('submit(mergeOut)', function (data) { |
| | | let checkStatus = layui.table.checkStatus('originTable').data; |
| | | if (checkStatus.length < 2) { |
| | | layer.msg("请至少选择两条以上合并数据", {icon: 7}); |
| | | return false; |
| | | } |
| | | showMerge(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | }); |
| | | |
| | | // 订单合并窗口 |
| | | function showMerge(orderIds) { |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/merge/preview/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | data: { |
| | | orderIds: orderIds |
| | | }, |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.open({ |
| | | type: 1 |
| | | , title: false |
| | | , closeBtn: false |
| | | , offset: '50px' |
| | | , area: ['1200px', '700px'] |
| | | , shade: 0.5 |
| | | , shadeClose: false |
| | | , btn: ['确定', '取消'] |
| | | , btnAlign: 'c' |
| | | , moveType: 1 //拖拽模式,0或者1 |
| | | , content: $('#mergeDialog').html() |
| | | , success: function (layero, index) { |
| | | orderMergeTabIdx = table.render({ |
| | | elem: '#orderMergeTab', |
| | | data: res.data, |
| | | height: 550, |
| | | page: false, |
| | | limit: Number.MAX_VALUE, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'matnr', title: '商品编码', align: 'center', width: 350}, |
| | | {field: 'maktx', title: '商品名称', align: 'center'}, |
| | | {field: 'specs', title: '规格', align: 'center'}, |
| | | {field: 'batch', title: '批号', align: 'center'}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | ]], |
| | | done: function (res) { |
| | | $('.layui-table-body.layui-table-main').css("overflow", "auto"); |
| | | } |
| | | }); |
| | | } |
| | | , yes: function (index, layero) { |
| | | //按钮【确定】的回调 |
| | | let checkStatus = layui.table.checkStatus('orderMergeTab').data; |
| | | if (checkStatus.length < 1) { |
| | | layer.msg("请至少选择一条数据", {icon: 7}); |
| | | return false; |
| | | } |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/out/pakout/preview/merge/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify(checkStatus), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(index) |
| | | pakoutPreviewMergeDialog(res.data) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | , btn2: function (index, layero) { |
| | | //按钮【取消】的回调 |
| | | layer.close(index) |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | } |
| | | }) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function pakoutPreviewMergeDialog(data) { |
| | | var mergeTabCache; |
| | | layer.open({ |
| | | type: 1 |
| | | ,title: false |
| | | ,closeBtn: false |
| | | ,offset: '50px' |
| | | ,area: ['1200px', '700px'] |
| | | ,shade: 0.5 |
| | | ,shadeClose: false |
| | | ,btn: ['立即出库', '稍后处理'] |
| | | ,btnAlign: 'c' |
| | | ,moveType: 1 //拖拽模式,0或者1 |
| | | ,content: $('#pakoutPreviewMergeBox').html() |
| | | ,success: function(layero, index){ |
| | | stoPreTabMergeIdx = table.render({ |
| | | elem: '#stoPreTabMerge', |
| | | data: data, |
| | | height: 520, |
| | | page: false, |
| | | limit: Number.MAX_VALUE, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | // {type: 'checkbox', merge: ['orderNo']}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {field: 'specs', title: '规格', align: 'center'}, |
| | | {field: 'batch', title: '序列码', align: 'center'}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | // {type: 'checkbox', merge: ['locNo']}, |
| | | ]], |
| | | done: function (res) { |
| | | tableMerge.render(this); |
| | | $('.layui-table-body.layui-table-main').css("overflow", "auto"); |
| | | mergeTabCache = table.cache.stoPreTabMerge; |
| | | } |
| | | }); |
| | | // 修改出库站 |
| | | form.on('select(tbBasicTbStaNos)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = mergeTabCache[index]; |
| | | for (let i = 0; i<mergeTabCache.length; i++) { |
| | | if (mergeTabCache[i].locNo === data.locNo) { |
| | | mergeTabCache[i]['staNo'] = Number(obj.elem.value); |
| | | } |
| | | } |
| | | obj.othis.children().find("input").css("color", "blue"); |
| | | return false; |
| | | }); |
| | | // 批量修改出库站 |
| | | form.on('submit(batchModifySta)', function () { |
| | | modifySta(); |
| | | }); |
| | | // 批量修改出库站 - 站点选择 |
| | | function modifySta() { |
| | | // 出库站取交集 |
| | | let staBatchSelectVal = []; |
| | | for(let i = 0; i<mergeTabCache.length; i++) { |
| | | let staNos = mergeTabCache[i].staNos; |
| | | if (staNos !== null) { |
| | | if (staBatchSelectVal.length === 0) { |
| | | staBatchSelectVal = staNos; |
| | | } else { |
| | | staBatchSelectVal = staBatchSelectVal.filter(val => |
| | | { |
| | | return new Set(staNos).has(val) |
| | | } |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | if (staBatchSelectVal.length === 0) { |
| | | layer.msg("出库站没有交集,无法批量修改", {icon: 2}); |
| | | return; |
| | | } |
| | | admin.open({ |
| | | type: 1, |
| | | area: '300px', |
| | | offset: 'auto', |
| | | title: '请选择站点', |
| | | content: $('#staBatchSelectDialog').html(), |
| | | success: function (layero, ddIndex) { |
| | | // 渲染下拉框 |
| | | let template = Handlebars.compile($('#batchStaSelectTpl').html()); |
| | | $('#batchSelectStaBox').html(template({list: staBatchSelectVal})); |
| | | // 确认 |
| | | form.on('submit(staBatchSelectConfirm)', function (obj) { |
| | | let loadIdx = layer.load(2); |
| | | let batchSta = Number(obj.field.batchSta); |
| | | let arr = []; |
| | | for (let i = 0; i<mergeTabCache.length; i++) { |
| | | mergeTabCache[i]['staNo'] = batchSta; |
| | | arr.push(i); |
| | | } |
| | | console.log(mergeTabCache) |
| | | stoPreTabMergeIdx.reload({data: mergeTabCache}); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTabMerge] tr[data-index="' + item + '"] .order-sta-select').val(batchSta); |
| | | }); |
| | | layui.form.render('select'); |
| | | arr.forEach(item => { |
| | | $('div[lay-id=stoPreTabMerge] tr[data-index="' + item + '"] .layui-select-title').find("input").css("color", "blue"); |
| | | }); |
| | | layer.close(loadIdx); layer.close(ddIndex); |
| | | return false; |
| | | }); |
| | | // 弹窗不出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | } |
| | | ,yes: function(index, layero){ |
| | | //按钮【立即出库】的回调 |
| | | pakout(mergeTabCache, index); |
| | | } |
| | | ,btn2: function(index, layero){ |
| | | //按钮【稍后处理】的回调 |
| | | layer.close(index) |
| | | //return false 开启该代码可禁止点击该按钮关闭 |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | |
| | | // '</p>'].join(''), |
| | | defaultToolbar: [], |
| | | cols: [[ |
| | | // {type: 'numbers', title: '#'}, |
| | | {type: 'checkbox'}, |
| | | {field: 'orderTime', title: '日期'}, |
| | | {field: 'orderNo', title: '单据编号', align: 'center'} |
| | | ]], |
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: '#wrkCharge', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/wrkCharge/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'wrkNo', align: 'center',title: '工作号'} |
| | | ,{align: 'center',title: '任务类型', templet: '#memoTpl'} |
| | | // ,{field: 'mk', align: 'center',title: '标记'} |
| | | ,{field: 'wrkSts$', align: 'center',title: '工作状态'} |
| | | // ,{field: 'ioType$', align: 'center',title: '入出库类型'} |
| | | ,{field: 'crnNo$', align: 'center',title: '堆垛机'} |
| | | ,{field: 'steNo$', align: 'center',title: '穿梭车'} |
| | | // ,{field: 'outMost', align: 'center',title: '巷道口'} |
| | | // ,{field: 'ioPri', align: 'center',title: '优先级'} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位'} |
| | | // ,{field: 'staNo$', align: 'center',title: '目标站'} |
| | | // ,{field: 'sourceStaNo$', align: 'center',title: '源站'} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位'} |
| | | // ,{field: 'emptyMk', align: 'center',title: '空板(checkBox)'} |
| | | // ,{field: 'ioTime$', align: 'center',title: '工作时间'} |
| | | // ,{field: 'crnStrTime$', align: 'center',title: '堆垛机启动时间'} |
| | | // ,{field: 'crnEndTime$', align: 'center',title: '堆垛机停止时间'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员'} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | // ,{field: 'appeUser$', align: 'center',title: '创建者'} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | |
| | | ,{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(wrkCharge)', 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(wrkCharge)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'clearCharge': |
| | | layer.confirm('确定重置充电任务吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkCharge/truncate/charge/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | 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}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | break; |
| | | case 'clearMemo': |
| | | layer.confirm('确定重置演示任务吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkCharge/truncate/demo/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | 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}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | break; |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.wrkNo; |
| | | })); |
| | | 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 = { |
| | | 'wrkCharge': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkCharge/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(wrkCharge)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.wrkNo]); |
| | | 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+"/wrkCharge/"+(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); |
| | | console.log({ids: ids}) |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkCharge/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#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: '#modiTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['modiTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['appeTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | ,{field: 'staNo$', align: 'center',title: '目标站'} |
| | | ,{field: 'sourceLocNo$', align: 'center',title: '源库位'} |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位'} |
| | | ,{field: 'steNo', align: 'center',title: '小车', width: 70} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'preHave', align: 'center',title: '先入品', hide: true} |
| | | ,{field: 'takeNone', align: 'center',title: '空操作', hide: true} |
| | |
| | | layer.confirm('任务发送空操作异常!是否。。。。。。。。?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | }); |
| | | break; |
| | | // 弃车 |
| | | case 'removeSte': |
| | | layer.confirm('清除小车【' + data.steNo + '】', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | http.post(baseUrl+"/deal/steNo/empty", {wrkNo: data.wrkNo}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg, {icon: 1}); |
| | | }) |
| | | layer.closeAll(); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | |
| | | <input class="layui-input" name="idleLoc" placeholder="请输入暂存库位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">最低电量: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="number" name="chargeLine" placeholder="请输入最低电量"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
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="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="ste_no" placeholder="穿梭车" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="status"> |
| | | <option value="" style="display: none"></option> |
| | | <option value="1">待处理</option> |
| | | <option value="2">已修复</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="basSteErrLog" lay-filter="basSteErrLog"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basSteErrLog/basSteErrLog.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="uuid" 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="startTime" id="startTime$" placeholder="请输入发生时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">结束时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="endTime" id="endTime$" placeholder="请输入结束时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">工作状态: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="wrkSts" placeholder="请输入工作状态" style="display: none"> |
| | | <input id="wrkSts$" name="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入工作状态" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">入出库类型: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="ioType" placeholder="请输入入出库类型" style="display: none"> |
| | | <input id="ioType$" name="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入入出库类型" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkIotypeQueryByioTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">穿梭车: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="steNo" placeholder="请输入穿梭车"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">plc: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="plcNo" placeholder="请输入plc"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标库位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="locNo" placeholder="请输入目标库位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标站: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="staNo" placeholder="请输入目标站"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源站: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sourceStaNo" placeholder="请输入源站"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">源库位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sourceLocNo" placeholder="请输入源库位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">条码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">异常码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="errCode" placeholder="请输入异常码"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">异常: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="error" placeholder="请输入异常"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">异常情况: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="status"> |
| | | <option value="">请选择异常情况</option> |
| | | <option value="1">未处理</option> |
| | | <option value="2">已修复</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入添加时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">添加人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="createBy" placeholder="请输入添加人员" style="display: none"> |
| | | <input id="createBy$" name="createBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入添加人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="updateTime" id="updateTime$" placeholder="请输入修改时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="updateBy" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="updateBy$" name="updateBy$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </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> |
| | | |
| | |
| | | <input name="maktx" class="layui-input" placeholder="输入商品名称"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="padding: 8px 15px 8px 15px">规格:</label> |
| | | <div class="layui-input-inline"> |
| | | <input name="specs" class="layui-input" placeholder="输入规格"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <button class="layui-btn icon-btn" id="search" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">配置</label> |
| | | <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"> |
| | | <input name="memo" placeholder="请输入备注" class="layui-input"> |
| | | </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 name="model" type="number" 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="length" 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"> |
| | | <input name="specs" placeholder="请输入规格" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="3">商品</td> |
| | | <td align="center" colspan="5">xxxxxx-xx/xx</td> |
| | | <td align="center" colspan="2">备注</td> |
| | | <td align="center" colspan="2">规格</td> |
| | | <td align="center" colspan="2">xx</td> |
| | | </tr> |
| | | </table> |
| | |
| | | <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td> |
| | | </tr> |
| | | <tr style="height: 30px"> |
| | | <td align="center" width="20%">备注</td> |
| | | <td align="center" width="20%">规格</td> |
| | | <td align="center" width="80%">xxxxxxxx</td> |
| | | </tr> |
| | | <tr style="height: 75px;"> |
| | |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="1">备注</td> |
| | | <td align="center" colspan="1">规格</td> |
| | | <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td> |
| | | </tr> |
| | | </table> |
| | |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="3">商品</td> |
| | | <td align="center" colspan="5" style="overflow: hidden; white-space: nowrap;text-overflow: ellipsis;">{{this.maktx}}</td> |
| | | <td align="center" colspan="2">备注</td> |
| | | <td align="center" colspan="2">{{this.memo}}</td> |
| | | <td align="center" colspan="2">规格</td> |
| | | <td align="center" colspan="2">{{this.specs}}</td> |
| | | </tr> |
| | | </table> |
| | | {{/each}} |
| | |
| | | <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.maktx}}</td> |
| | | </tr> |
| | | <tr style="height: 35px"> |
| | | <td align="center" width="20%">备注</td> |
| | | <td align="center" width="80%">{{this.memo}}</td> |
| | | <td align="center" width="20%">规格</td> |
| | | <td align="center" width="80%">{{this.specs}}</td> |
| | | </tr> |
| | | <tr style="height: 79px;"> |
| | | <td align="center" colspan="2" width="100%" style="border: none"> |
| | |
| | | <tr style="height: 74px" > |
| | | <td align="center" scope="col" colspan="1">商品</td> |
| | | <td align="center" scope="col" colspan="1" style=" |
| | | display: inline-block; |
| | | line-height: 20px; |
| | | vertical-align: middle; |
| | | border: none; |
| | | border-top: 1px solid #000; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 3; |
| | | -webkit-box-orient: vertical; |
| | | "> |
| | |
| | | </td> |
| | | </tr> |
| | | <tr style="height: 74px"> |
| | | <td align="center" colspan="1">备注</td> |
| | | <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.memo}}</td> |
| | | <td align="center" colspan="1">规格</td> |
| | | <td align="center" colspan="1" style=" |
| | | overflow:hidden; |
| | | text-overflow:ellipsis; |
| | | -webkit-line-clamp: 3; |
| | | -webkit-box-orient: vertical; |
| | | ">{{this.specs}}</td> |
| | | </tr> |
| | | </table> |
| | | {{/each}} |
| | |
| | | <button class="layui-btn icon-btn" lay-filter="tbSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><i class="layui-icon"></i>添加 |
| | | <button id="orderAddBtn" class="layui-btn icon-btn btn-add"> |
| | | <i class="layui-icon"></i>添加 |
| | | </button> |
| | | <button id="importOrder" class="layui-btn icon-btn btn-add"> |
| | | <i class="layui-icon layui-icon-upload"></i> 导入销售单 |
| | | </button> |
| | | <input style="display:none" id="importExcel" type="file" onchange="upload(this)" > |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-card-body" style="padding: 10px;"> |
| | | <form class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline" style="max-width: 300px;"> |
| | | <div class="layui-inline" style="max-width: 300px;margin-bottom: 5px"> |
| | | <input name="orderNo" class="layui-input" placeholder="输入单据编号" autocomplete="off"/> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-inline" style="margin-bottom: 5px"> |
| | | <button class="layui-btn icon-btn" lay-filter="originTableSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <button style="margin-bottom: 5px;line-height: 28px;height: 28px" class="layui-btn icon-btn layui-btn-danger" lay-filter="mergeOut" lay-submit> |
| | | <i class="layui-icon"></i> 合并出库 |
| | | </button> |
| | | <table id="originTable" lay-filter="originTable"></table> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </script> |
| | | |
| | | <!-- 合并表单弹窗 --> |
| | | <script type="text/html" id="mergeDialog"> |
| | | <div style="padding: 25px; line-height: 22px; background-color: #1E9FFF; color: #fff; font-weight: 300;"> |
| | | <span style="font-size: large; font-weight: bold">合并出库</span> |
| | | </div> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px"> |
| | | <table id="orderMergeTab" lay-filter="orderMergeTab"></table> |
| | | </div> |
| | | </div> |
| | | </script> |
| | | |
| | | <!-- 出库预览 【合并】 --> |
| | | <script type="text/html" id="pakoutPreviewMergeBox" style="display: none"> |
| | | <div style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;"> |
| | | <span style="font-size: large; font-weight: bold">出库预览</span> |
| | | </div> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px"> |
| | | <table id="stoPreTabMerge" lay-filter="stoPreTabMerge"></table> |
| | | </div> |
| | | <button class="layui-btn layui-btn-primary layui-border-black layui-btn-sm" lay-filter="batchModifySta" lay-submit style="display: block;float: right;margin-right: 1rem"> |
| | | 批量修改 |
| | | </button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="tbBasicTbStaNos"> |
| | | <div class="ew-select-fixed"> |
| | | <select class="order-sta-select" lay-filter="tbBasicTbStaNos"> |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="loc_sts" placeholder="库位状态" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="barcode" placeholder="托盘码" autocomplete="off"> |
| | | </div> |
| | | </div> |
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="wrk_no" placeholder="任务号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="ste_no" placeholder="穿梭车" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="memo"> |
| | | <option value="">选择类型</option> |
| | | <option value="charge">充电任务</option> |
| | | <option value="memo">演示任务</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="wrkCharge" lay-filter="wrkCharge"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="memoTpl"> |
| | | {{# if(d.memo === "charge"){ }} |
| | | <span name="memo" class="layui-badge layui-badge-red" >充电任务</span> |
| | | {{# } }} |
| | | {{# if(d.memo === "memo"){ }} |
| | | <span name="memo" class="layui-badge layui-badge-red" >演示任务</span> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm layui-btn-normal" id="btn-clear-charge" lay-event="clearCharge">重置充电任务</button> |
| | | <button class="layui-btn layui-btn-sm " id="btn-clear-memo" lay-event="clearMemo">重置演示任务</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-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/wrkCharge/wrkCharge.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo" placeholder="请输入工作号" lay-vertype="tips" lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">标记: </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 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 cool-auto-complete"> |
| | | <input class="layui-input" name="steNo" placeholder="请输入穿梭车" style="display: none"> |
| | | <input id="steNo$" name="steNo$" 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="basSteQueryBysteNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basSteQueryBysteNoSelect" 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="outMost" 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 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">空板(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="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 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="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">条码: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="barcode" placeholder="请输入条码"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | <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> |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="pick">盘</a> |
| | | {{# } }} |
| | | {{#if (d.steNo) { }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="removeSte">弃车</a> |
| | | {{# } }} |
| | | </script> |
| | | |