1. 添加AGV站点与堆垛机站点绑定关系
2. 获取并板入库托盘
3. 生成AGV任务
4. 生成堆垛机任务
| New file |
| | |
| | | package com.zy.api.enums; |
| | | |
| | | /** |
| | | * 物料所属库位类型 |
| | | * @author Ryan |
| | | * @date 2025/12/6 10:41 |
| | | * @return null |
| | | */ |
| | | public enum MatLocType { |
| | | |
| | | /** 小件 */ |
| | | AUTOMATED("12", "小件"), |
| | | /** 中件 */ |
| | | SO_HOLDING("13", "中件"), |
| | | /** 大件 */ |
| | | EO_HOLDING("14", "滤芯"); |
| | | |
| | | public String type; |
| | | |
| | | public String desc; |
| | | |
| | | MatLocType(String type, String desc) { |
| | | this.type = type; |
| | | this.desc = desc; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/11/3 |
| | | * @description: 呼叫AGV搬运缓存区/EO/SO |
| | | * @description: 呼叫AGV搬运入库缓存区/EO/SO |
| | | * @version 1.0 |
| | | */ |
| | | @PostMapping("/cache/out/call") |
| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.StationRela; |
| | | import com.zy.asrs.service.StationRelaService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class StationRelaController extends BaseController { |
| | | |
| | | @Autowired |
| | | private StationRelaService stationRelaService; |
| | | |
| | | @RequestMapping(value = "/stationRela/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(stationRelaService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stationRela/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<StationRela> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(stationRelaService.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 = "/stationRela/add/auth") |
| | | @ManagerAuth |
| | | public R add(StationRela stationRela) { |
| | | stationRelaService.insert(stationRela); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stationRela/update/auth") |
| | | @ManagerAuth |
| | | public R update(StationRela stationRela){ |
| | | if (Cools.isEmpty(stationRela) || null==stationRela.getId()){ |
| | | return R.error(); |
| | | } |
| | | stationRelaService.updateById(stationRela); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stationRela/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | stationRelaService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stationRela/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<StationRela> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("stationRela")); |
| | | convert(map, wrapper); |
| | | List<StationRela> list = stationRelaService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stationRelaQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<StationRela> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<StationRela> page = stationRelaService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (StationRela stationRela : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", stationRela.getId()); |
| | | map.put("value", stationRela.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stationRela/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<StationRela> wrapper = new EntityWrapper<StationRela>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != stationRelaService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(StationRela.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("agv_station_rela") |
| | | public class StationRela implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.INPUT) |
| | | private Long id; |
| | | |
| | | /** |
| | | * AGV站点 |
| | | */ |
| | | @ApiModelProperty(value= "AGV站点") |
| | | @TableField("agv_sta") |
| | | private String agvSta; |
| | | |
| | | /** |
| | | * 堆垛机站点 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机站点") |
| | | @TableField("crn_sta") |
| | | private String crnSta; |
| | | |
| | | /** |
| | | * 站点状态 |
| | | */ |
| | | @ApiModelProperty(value= "站点状态") |
| | | @TableField("use_status") |
| | | private String useStatus; |
| | | |
| | | public StationRela() {} |
| | | |
| | | public StationRela(Long id,String agvSta,String crnSta,String useStatus) { |
| | | this.id = id; |
| | | this.agvSta = agvSta; |
| | | this.crnSta = crnSta; |
| | | this.useStatus = useStatus; |
| | | } |
| | | |
| | | // StationRela stationRela = new StationRela( |
| | | // null, // [非空] |
| | | // null, // AGV站点 |
| | | // null, // 堆垛机站点 |
| | | // null // 站点状态 |
| | | // ); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.enums; |
| | | |
| | | /** |
| | | * 通用站点 |
| | | * @author Ryan |
| | | * @date 2025/12/6 13:56 |
| | | * @return null |
| | | */ |
| | | public enum CommonStation { |
| | | |
| | | //通用类型 |
| | | COMMON_STATION_Y("Y", "是"), |
| | | //通用 |
| | | COMMON_STATION_N("N", "否"); |
| | | |
| | | public String type; |
| | | |
| | | public String desc; |
| | | |
| | | CommonStation(String type, String desc) { |
| | | this.type = type; |
| | | this.desc = desc; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.enums; |
| | | |
| | | /** |
| | | * 任务出入库类型 |
| | | * @author Ryan |
| | | * @date 2025/12/6 14:55 |
| | | * @param null |
| | | * @return null |
| | | */ |
| | | public enum TaskIOType { |
| | | |
| | | //料箱 |
| | | ALL_IN("1", "1.入库"), |
| | | //托盘 |
| | | STATION_STATION("3", "3.站到站"), |
| | | |
| | | DEVICE_OUT("6", "6.设备上退出"), |
| | | |
| | | PICKING_MEGER("8", "8.拣料途中并板"), |
| | | |
| | | EMPTY_IN("10", "10.空板入库"), |
| | | |
| | | MOVE("11", "11.库格移载"), |
| | | |
| | | PICK_IN("53", "53.拣料入库"), |
| | | |
| | | MERGE_IN("54", "53.并板入库"), |
| | | |
| | | CHECK_IN("57", "57.盘点入库"), |
| | | |
| | | ALL_OUT("101", "101.出库"), |
| | | |
| | | PICK_OUT("103", "103.拣料出库"), |
| | | |
| | | MERGE_OUT("104", "104.并板出库"), |
| | | |
| | | CHECK_OUT("107", "107.盘点出库"), |
| | | |
| | | EMPTY_OUT("110", "110.空板出库"), |
| | | |
| | | ; |
| | | |
| | | public Integer type; |
| | | |
| | | public String desc; |
| | | |
| | | TaskIOType(String type, String desc) { |
| | | this.type = Integer.valueOf(type); |
| | | this.desc = desc; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.StationRela; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface StationRelaMapper extends BaseMapper<StationRela> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.LocCache; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.*; |
| | | |
| | | import java.util.Date; |
| | |
| | | * @date 2025/12/3 8:07 |
| | | * @param locCaches |
| | | */ |
| | | void generateCRNOutTask(LocCache locCaches); |
| | | void generateCRNOutTask(BasStation station, LocCache locCaches, Long userId); |
| | | |
| | | R callEmptyCar(AgvCallParams params); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.StationRela; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface StationRelaService extends IService<StationRela> { |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.entity.result.ForwardAGVTaskDTO; |
| | | import com.zy.asrs.entity.result.HIKApiDTO; |
| | | import com.zy.asrs.entity.result.HIKResultDTO; |
| | | import com.zy.asrs.enums.LocAreaType; |
| | | import com.zy.asrs.enums.LocStsType; |
| | | import com.zy.asrs.enums.*; |
| | | import com.zy.asrs.enums.OrderSettle; |
| | | import com.zy.asrs.mapper.LocMastMapper; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.model.LocDetlDto; |
| | | import com.zy.common.model.MesCombParam; |
| | | import com.zy.common.model.enums.IoWorkType; |
| | | import com.zy.common.model.enums.WorkNoType; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.HttpHandler; |
| | |
| | | private BasContainerService basContainerService; |
| | | @Autowired |
| | | private BasAreasService basAreasService; |
| | | @Autowired |
| | | private StationRelaService stationRelaService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | } |
| | | |
| | | if (elem.getAnfme() > detls.getEnableQty()) { |
| | | throw new CoolException(detls.getMatnr() + "入库数量不合法"); |
| | | throw new CoolException(detls.getMatnr() + "入库数量不合规则"); |
| | | } |
| | | OrderInAndOutUtil.increaseWorkQty(Boolean.TRUE, order.getId(), elem.getMatnr(), elem.getBatch(), elem.getBrand(), elem.getStandby1(), elem.getStandby2(), elem.getStandby3(), |
| | | elem.getBoxType1(), elem.getBoxType2(), elem.getBoxType3(), elem.getAnfme()); |
| | |
| | | /**生成缓存区出库任务*/ |
| | | generateCacheOutTask(station, locCaches, userId); |
| | | |
| | | /**生成立库出库任务*/ |
| | | generateCRNOutTask(locCaches); |
| | | // /**生成立库出库任务*/ |
| | | generateCRNOutTask(station, locCaches, userId); |
| | | |
| | | return R.ok(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void generateCRNOutTask(LocCache locCaches) { |
| | | public void generateCRNOutTask(BasStation station, LocCache locCaches, Long userId) { |
| | | if (Objects.isNull(locCaches)) { |
| | | throw new CoolException("库位不能为空!!"); |
| | | } |
| | | //获取缓存区信息 |
| | | BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type)); |
| | | if (Objects.isNull(basAreas)) { |
| | | throw new CoolException("库区不存在!!"); |
| | | } |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("area_id", basAreas.getAreaNo()) |
| | | .eq("area_id", basAreas.getId()) |
| | | .eq("loc_id", locCaches.getId())); |
| | | |
| | | if (Objects.isNull(locDetls)) { |
| | | throw new CoolException("库存明细不存在!!"); |
| | | } |
| | | //获取立库区信息 |
| | | BasAreas one = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_CRN.type)); |
| | | if (Objects.isNull(one)) { |
| | | throw new CoolException("数据错误:库区不存在!!"); |
| | | } |
| | | |
| | | //按物料编码分类 |
| | | List<StationRela> relas = stationRelaService.selectList(new EntityWrapper<StationRela>().eq("agv_sta", station.getDevNo())); |
| | | if (Objects.isNull(relas) || relas.isEmpty()) { |
| | | throw new CoolException("站点未关联堆垛机作业站点!!"); |
| | | } |
| | | |
| | | Set<String> crnStas = relas.stream().map(StationRela::getCrnSta).collect(Collectors.toSet()); |
| | | |
| | | List<BasDevp> devps = basDevpService.selectList(new EntityWrapper<BasDevp>().in("dev_no", crnStas).eq("loading", CommonStation.COMMON_STATION_Y.type)); |
| | | if (Objects.isNull(devps) || devps.isEmpty()) { |
| | | throw new CoolException("无站点可用!"); |
| | | } |
| | | Collections.shuffle(devps); |
| | | BasDevp basDevp = devps.stream().findFirst().get(); |
| | | |
| | | List<LocMast> locMasts = new ArrayList<>(); |
| | | Map<String, List<LocDetl>> listMap = locDetls.stream().collect(Collectors.groupingBy(LocDetl::getMatnr)); |
| | | listMap.forEach((key, detls) -> { |
| | | listMap.forEach((matnr, detls) -> { |
| | | //根据supId(供应商)分类,得到出库总数 |
| | | Map<String, List<LocDetl>> supIds = detls.stream().collect(Collectors.groupingBy(LocDetl::getStandby1)); |
| | | supIds.forEach((supId, sups) -> { |
| | | Double sum = sups.stream().mapToDouble(LocDetl::getAnfme).sum(); |
| | | //获取当前供应商+ 物料在库 |
| | | List<LocDetl> detlList = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("matnr", matnr) |
| | | .eq("area_id", one.getId()) |
| | | .eq("standby1", supId).orderAsc(Arrays.asList("appe_time"))); |
| | | //TODO 判断是否有新库位,没有新库位,再找有空格的位置放 1. 判断当前物料是否有库存 2. 没有余料查询新库位 |
| | | |
| | | if (!Objects.isNull(detlList) && !detlList.isEmpty()) { |
| | | Map<String, List<LocDetl>> locMaps = detlList.stream().collect(Collectors.groupingBy(LocDetl::getLocNo)); |
| | | locMaps.forEach((locNo, adetls) -> { |
| | | LocMast locMast = locMastService.selectById(locNo); |
| | | if (Objects.isNull(locMast)) { |
| | | throw new CoolException("数据错误,库位信息不存在!!"); |
| | | } |
| | | BasContainer container = basContainerService.selectOne(new EntityWrapper<BasContainer>().eq("barcode", locMast.getBarcode())); |
| | | if (Objects.isNull(container)) { |
| | | throw new CoolException("数据错误,容器不存在!!"); |
| | | } |
| | | Set<String> sets = adetls.stream().map(LocDetl::getMatnr).collect(Collectors.toSet()); |
| | | //判断容器是否还可混放,及当前物料可放多少 |
| | | if (container.getMixMax() > sets.size()) { |
| | | int suplus = container.getMixMax() - sets.size(); |
| | | Mat mats = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", matnr)); |
| | | if (Objects.isNull(mats)) { |
| | | throw new CoolException("物料不存在!!"); |
| | | } |
| | | Double v = mats.getUpQty() * suplus; |
| | | //小于零 |
| | | if (sum.compareTo(v) <= 0) { |
| | | //可放下 |
| | | locMasts.add(locMast); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | locDetls.forEach(locDetl -> { |
| | | if (!locMasts.isEmpty()) { |
| | | //生成堆垛机出库任务 |
| | | generateOutTask(locMasts, TaskIOType.MERGE_OUT.type, basDevp, userId); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | /** |
| | | * 生成堆垛机出库任务 |
| | | * @author Ryan |
| | | * @date 2025/12/6 14:44 |
| | | * @param locMasts |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void generateOutTask(List<LocMast> locMasts, Integer ioType, BasDevp devp, Long userId) { |
| | | Date now = new Date(); |
| | | for (LocMast locMast : locMasts) { |
| | | if (Objects.isNull(ioType)) { |
| | | continue; |
| | | } |
| | | Integer outSta = devp.getDevNo(); |
| | | // 获取路径 |
| | | StaDesc staDesc = staDescService.queryCrnStn(ioType, locMast.getCrnNo(), outSta); |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType)); |
| | | // 生成工作档 |
| | | WrkMast wrkMast = new WrkMast(); |
| | | wrkMast.setWrkNo(workNo); |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setWrkSts(11L); // 工作状态:11.生成出库ID |
| | | wrkMast.setIoType(ioType); // 入出库类型 |
| | | wrkMast.setIoPri(13D); // 优先级:13 |
| | | wrkMast.setCrnNo(locMast.getCrnNo()); |
| | | wrkMast.setSourceStaNo(staDesc.getCrnStn() + ""); // 源站 |
| | | wrkMast.setStaNo(staDesc.getStnNo() + ""); // 目标站 |
| | | wrkMast.setSourceLocNo(locMast.getLocNo()); // 源库位 |
| | | wrkMast.setFullPlt("Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setEmptyMk("N"); // 空板 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setBarcode(locMast.getBarcode()); |
| | | wrkMast.setAppeUser(userId); // 操作人员数据 |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.insert(wrkMast)) { |
| | | throw new CoolException("保存工作档失败,出库库位号:" + locMast.getLocNo()); |
| | | } |
| | | |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo())); |
| | | |
| | | // 生成工作档明细 |
| | | for (LocDetl detlDto : locDetls) { |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | BeanUtils.copyProperties(detlDto, wrkDetl); |
| | | wrkDetl.setOrderNo(""); // 手动出库不需要带出库存中的单据编号 |
| | | wrkDetl.setWrkNo(workNo); |
| | | wrkDetl.setIoTime(now); |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setAppeUser(userId); |
| | | wrkDetl.setModiTime(now); |
| | | wrkDetl.setModiUser(userId); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | } |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | | locMast = locMastService.selectById(locMast.getLocNo()); |
| | | if (locMast.getLocSts().equals(LocStsType.LOC_STS_TYPE_F.type)) { |
| | | locMast.setLocSts(ioType == 101 ? "R" : "P"); |
| | | locMast.setModiUser(userId); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("预约库位状态失败,库位号:" + locMast.getLocNo()); |
| | | } |
| | | } else { |
| | | throw new CoolException(locMast.getLocNo() + "库位不是在库状态"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | .setModiUser(userId); |
| | | taskDetls.add(wrkDetl); |
| | | }); |
| | | |
| | | |
| | | |
| | | //保存工作档明细 |
| | | if (!taskDetlService.insertBatch(taskDetls)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.StationRelaMapper; |
| | | import com.zy.asrs.entity.StationRela; |
| | | import com.zy.asrs.service.StationRelaService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("stationRelaService") |
| | | public class StationRelaServiceImpl extends ServiceImpl<StationRelaMapper, StationRela> implements StationRelaService { |
| | | |
| | | } |
| | |
| | | generator.url="192.168.4.15:1433;databasename=jsxsasrs"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="man_check_order_detl"; |
| | | generator.table="agv_station_rela"; |
| | | generator.packagePath="com.zy.asrs"; |
| | | generator.html = false; |
| | | generator.js = false; |
| | |
| | | PICK_IN, |
| | | ALL_OUT, |
| | | PICK_OUT, |
| | | MERGE_OUT, |
| | | CHECK_OUT, |
| | | ; |
| | | |
| New file |
| | |
| | | -- save stationRela record |
| | | -- mysql |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'stationRela/stationRela.html', 'stationRela管理', null , '2', null , '1'); |
| | | |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'stationRela#view', '查询', '', '3', '0', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'stationRela#btn-add', '新增', '', '3', '1', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'stationRela#btn-edit', '编辑', '', '3', '2', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'stationRela#btn-delete', '删除', '', '3', '3', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'stationRela#btn-export', '导出', '', '3', '4', '1'); |
| | | |
| | | -- sqlserver |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'stationRela/stationRela.html', N'stationRela管理', null, '2', null, '1'); |
| | | |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'stationRela#view', N'查询', '', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'stationRela#btn-add', N'新增', '', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'stationRela#btn-edit', N'编辑', '', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'stationRela#btn-delete', N'删除', '', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'stationRela#btn-export', N'导出', '', '3', '4', '1'); |
| 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.StationRelaMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.StationRela"> |
| | | <result column="id" property="id" /> |
| | | <result column="agv_sta" property="agvSta" /> |
| | | <result column="crn_sta" property="crnSta" /> |
| | | <result column="use_status" property="useStatus" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |