| | |
| | | package com.zy.asrs.wms.apis.wcs.controller; |
| | | |
| | | import com.mysql.cj.util.StringUtils; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wms.apis.wcs.services.WaveManagentService; |
| | | import com.zy.asrs.wms.asrs.entity.param.WaveSeedReviewParam; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | @RestController |
| | | @RequestMapping("/wave") |
| | |
| | | */ |
| | | @GetMapping("/sow/task/detl/{taskNo}") |
| | | public R getTaskDetl(@PathVariable String taskNo) { |
| | | if (StringUtils.isNullOrEmpty(taskNo)) { |
| | | throw new CoolException("任务编码不能为空!!"); |
| | | } |
| | | return waveManagentService.getTaskDetl(taskNo); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/task/detl/qutify") |
| | | public R getTaskDetlQutify(@RequestBody Map<String, Object> param) { |
| | | return waveManagentService.getTaskDetlQutify(param); |
| | | if (Objects.isNull(param)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | if (Objects.isNull(param.get("taskNo"))) { |
| | | throw new CoolException("请求参数:任务编码不能为空!!"); |
| | | } |
| | | String taskNoStr = (String) param.get("taskNo"); |
| | | // Long matnr = Long.valueOf(taskNo.get("matnr").toString()); |
| | | |
| | | return waveManagentService.getTaskDetlQutify(taskNoStr); |
| | | } |
| | | |
| | | /*** |
| | | * 获取出库列表 |
| | | * 大屏获取出库列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("/sow/tasks") |
| | |
| | | */ |
| | | private String orderNo; |
| | | /** |
| | | * 执行中数量 |
| | | * 已拣货数量 |
| | | */ |
| | | private Integer workQty; |
| | | /** |
| | |
| | | import com.zy.asrs.wms.apis.wcs.entity.response.SowSeeds; |
| | | import com.zy.asrs.wms.apis.wcs.services.WaveManagentService; |
| | | import com.zy.asrs.wms.asrs.entity.Task; |
| | | import com.zy.asrs.wms.asrs.entity.dto.LargeScreenTaskDto; |
| | | import com.zy.asrs.wms.asrs.entity.enums.TaskStsType; |
| | | import com.zy.asrs.wms.asrs.entity.param.WaveSeedReviewParam; |
| | | import com.zy.asrs.wms.asrs.mapper.TaskMapper; |
| | | import com.zy.asrs.wms.asrs.service.TaskService; |
| | | import com.zy.asrs.wms.asrs.service.WaveSeedService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | public class WaveManagentServiceImpl implements WaveManagentService { |
| | |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @Autowired |
| | | private TaskMapper taskMapper; |
| | | |
| | | @Override |
| | | public R getSowSeeds() { |
| | |
| | | |
| | | @Override |
| | | public R getTask() { |
| | | List<Task> list = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getTaskSts, TaskStsType.WAVE_SEED.id)); |
| | | return R.ok(list); |
| | | List<LargeScreenTaskDto> taskDtos = taskMapper.getTaskIntegrateByTaskNo(new LambdaQueryWrapper<Task>().eq(Task::getTaskSts, TaskStsType.WAVE_SEED.id)); |
| | | return R.ok(taskDtos); |
| | | } |
| | | |
| | | @Override |
| | | public R getTaskDetl(String taskNo) { |
| | | List<WaveTaskDetl> taskDetls = taskService.getTaskDetlByTaskNo(taskNo); |
| | | List<WaveTaskDetl> taskDetls = taskMapper.getTaskDetlByTaskNo(taskNo); |
| | | return R.ok(taskDetls); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getTaskDetlQutify(Map<String, Object> taskNo) { |
| | | List<WaveTaskDetl> taskDetls = taskService.getTaskDetlQutify(taskNo); |
| | | public R getTaskDetlQutify(String taskNo) { |
| | | List<WaveTaskDetl> taskDetls = taskMapper.getTaskDetlQutify(taskNo); |
| | | return R.ok(taskDetls); |
| | | } |
| | | } |
| | |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.wms.asrs.entity.param.WaveSeedReviewParam; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface WaveManagentService { |
| | | R getSowSeeds(); |
| | | |
| | |
| | | |
| | | R getTaskDetl(String taskNo); |
| | | |
| | | R getTaskDetlQutify(Map<String, Object> taskNo); |
| | | R getTaskDetlQutify(String taskNo); |
| | | } |
| | |
| | | import com.zy.asrs.framework.annotations.ManagerAuth;
|
| | | import com.zy.asrs.framework.common.Cools;
|
| | | import com.zy.asrs.framework.common.R;
|
| | | import com.zy.asrs.framework.exception.CoolException;
|
| | | import com.zy.asrs.wms.asrs.entity.CacheSite;
|
| | | import com.zy.asrs.wms.asrs.entity.Loc;
|
| | | import com.zy.asrs.wms.asrs.entity.Order;
|
| | | import com.zy.asrs.wms.asrs.entity.WaitPakin;
|
| | |
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 获取播种位
|
| | | * @return
|
| | | */
|
| | | @GetMapping("/pick/seed/locs")
|
| | | public R seedLocs() {
|
| | | List<CacheSite> sites = mobileService.getSeedLocs();
|
| | | return R.ok(sites);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 订单绑定站点
|
| | | * @param param
|
| | | * @return
|
| | | */
|
| | | @PostMapping("/pick/seed/bind")
|
| | | public R bindLoc(@RequestBody Map<String, Object> param) {
|
| | | if (Objects.isNull(param)) {
|
| | | throw new CoolException("请求参数不能为空!!");
|
| | | }
|
| | | if (Objects.isNull(param.get("barcode"))) {
|
| | | throw new CoolException("容器编码不能为空");
|
| | | }
|
| | | if (Objects.isNull(param.get("orderNo"))) {
|
| | | throw new CoolException("订单编号不能为空!!");
|
| | | }
|
| | | if (Objects.isNull(param.get("siteNo"))) {
|
| | | throw new CoolException("播种站点不能为空!!");
|
| | | }
|
| | | if (Objects.isNull(param.get("type"))) {
|
| | | throw new CoolException("参数类型不能为空!!");
|
| | | }
|
| | | boolean result = mobileService.bindOrderBySite(param);
|
| | | if (result) {
|
| | | return R.ok("绑定成功!!");
|
| | | } else {
|
| | | return R.error("绑定失败!!");
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity.dto; |
| | | |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class LargeScreenTaskDto implements Serializable { |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | private Double anfme; |
| | | /** |
| | | * 波次 |
| | | */ |
| | | private String waveNo; |
| | | |
| | | private Long id; |
| | | /** |
| | | * 拖盘码 |
| | | */ |
| | | private String barcode; |
| | | /** |
| | | * 任务编码 |
| | | */ |
| | | private String taskNo; |
| | | /** |
| | | * 任务状态 |
| | | */ |
| | | private Integer taskSts; |
| | | |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.wms.asrs.entity.CacheSite;
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | @Mapper
|
| | | @Repository
|
| | |
| | | package com.zy.asrs.wms.asrs.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Constants;
|
| | | import com.zy.asrs.wms.apis.wcs.entity.domain.WaveTaskDetl;
|
| | | import com.zy.asrs.wms.asrs.entity.Task;
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.LargeScreenTaskDto;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
| | |
|
| | | List<WaveTaskDetl> getTaskDetlByTaskNo(@Param("taskNo") String taskNo);
|
| | |
|
| | | List<WaveTaskDetl> getTaskDetlQutify(@Param("taskNo") String taskNo,@Param("matnr") Long matnr);
|
| | | List<WaveTaskDetl> getTaskDetlQutify(@Param("taskNo") String taskNo);
|
| | |
|
| | | List<LargeScreenTaskDto> getTaskIntegrateByTaskNo(@Param(Constants.WRAPPER) LambdaQueryWrapper<Task> ew);
|
| | | }
|
| | |
| | | package com.zy.asrs.wms.asrs.service;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.metadata.IPage;
|
| | | import com.zy.asrs.wms.asrs.entity.Loc;
|
| | | import com.zy.asrs.wms.asrs.entity.PickSheet;
|
| | | import com.zy.asrs.wms.asrs.entity.CacheSite;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.PickSheetDetlDto;
|
| | | import com.zy.asrs.wms.asrs.entity.param.BatchMergeOrdersParam;
|
| | | import com.zy.asrs.wms.asrs.entity.param.PageRequest;
|
| | | import com.zy.asrs.wms.asrs.entity.param.PakinOnShelvesParams;
|
| | | import com.zy.asrs.wms.system.entity.Host;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | |
|
| | | public interface MobileService {
|
| | |
| | | PickSheetDetlDto outFlatSheet(String code);
|
| | |
|
| | | boolean confirmFlatSheet(String code);
|
| | |
|
| | | List<CacheSite> getSeedLocs();
|
| | |
|
| | | boolean bindOrderBySite(Map<String, Object> param);
|
| | | }
|
| | |
| | |
|
| | | List<Task> selectWaitWaveOut(List<Long> waveIds);//获取等待波次出库的任务List
|
| | |
|
| | | List<WaveTaskDetl> getTaskDetlByTaskNo(String taskNo);
|
| | |
|
| | | List<WaveTaskDetl> getTaskDetlQutify(Map<String, Object> taskNo);
|
| | | }
|
| | |
| | | import com.zy.asrs.wms.asrs.entity.param.GeneratePakInParam;
|
| | | import com.zy.asrs.wms.asrs.entity.param.PageRequest;
|
| | | import com.zy.asrs.wms.asrs.entity.param.PakinOnShelvesParams;
|
| | | import com.zy.asrs.wms.asrs.mapper.CacheSiteMapper;
|
| | | import com.zy.asrs.wms.asrs.service.*;
|
| | | import com.zy.asrs.wms.system.entity.Host;
|
| | | import com.zy.asrs.wms.system.service.HostService;
|
| | |
| | | private WaveService waveService;
|
| | | @Autowired
|
| | | private WaveDetlService waveDetlService;
|
| | | @Autowired
|
| | | private CacheSiteMapper cacheSiteMapper;
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<CacheSite> getSeedLocs() {
|
| | | return cacheSiteMapper.selectList(new LambdaQueryWrapper<>());
|
| | | }
|
| | |
|
| | | /**
|
| | | * 订单绑定播种墙
|
| | | * @param param
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public boolean bindOrderBySite(Map<String, Object> param) {
|
| | | // return cacheSiteMapper.bindOrderBySite(param);
|
| | | return false;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | return this.baseMapper.selectWaitWaveOut(waveIds);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<WaveTaskDetl> getTaskDetlByTaskNo(String taskNo) {
|
| | | return this.baseMapper.getTaskDetlByTaskNo(taskNo);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<WaveTaskDetl> getTaskDetlQutify(Map<String, Object> taskNo) {
|
| | | String taskNoStr = (String) taskNo.get("taskNo");
|
| | | Long matnr = Long.valueOf(taskNo.get("matnr").toString());
|
| | | return this.baseMapper.getTaskDetlQutify(taskNoStr, matnr);
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
| | | import com.zy.asrs.wms.system.service.UserLoginService;
|
| | | import com.zy.asrs.wms.system.service.UserRoleService;
|
| | | import com.zy.asrs.wms.system.service.UserService;
|
| | | import net.sf.jsqlparser.expression.LongValue;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.core.Authentication;
|
| | | import org.springframework.security.core.context.SecurityContextHolder;
|
| | |
| | | import com.zy.asrs.wms.system.service.*;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | | import lombok.Data;
|
| | | import net.sf.jsqlparser.expression.LongValue;
|
| | | import org.springframework.format.annotation.DateTimeFormat;
|
| | | import org.springframework.security.core.userdetails.UserDetails;
|
| | |
|
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| | | <mapper namespace="com.zy.asrs.wms.asrs.mapper.CacheSiteMapper">
|
| | |
|
| | |
|
| | | <select id="getChannelList" resultType="string">
|
| | | select distinct channel from man_cache_site
|
| | | </select>
|
| | |
| | | </if>
|
| | | </select>
|
| | | <select id="getTaskDetlQutify" resultType="com.zy.asrs.wms.apis.wcs.entity.domain.WaveTaskDetl">
|
| | | SELECT
|
| | | id,matnr,order_no, anfme ,wave_no, work_qty, batch
|
| | | FROM
|
| | | man_wave_seed
|
| | | WHERE
|
| | | task_detl_id IN ( SELECT mtd.id FROM man_task mt INNER JOIN man_task_detl mtd ON mt.id = mtd.task_id
|
| | | WHERE 1 = 1
|
| | | <if test="taskNo != null and taskNo != ''">
|
| | | AND mt.task_no = #{taskNo}
|
| | | </if>
|
| | | )
|
| | | <if test="matnr != null and matnr != ''">
|
| | | AND matnr = #{matnr}
|
| | | </if>
|
| | |
|
| | | SELECT * FROM (
|
| | | SELECT
|
| | | id,matnr,order_no, SUM(anfme) anfme ,wave_no, SUM(work_qty) work_qty, batch, task_detl_id
|
| | | FROM
|
| | | man_wave_seed
|
| | | WHERE
|
| | | task_detl_id IN ( SELECT mtd.id FROM man_task mt INNER JOIN man_task_detl mtd ON mt.id = mtd.task_id
|
| | | <if test="taskNo != null and taskNo != ''">
|
| | | AND mt.task_no = #{taskNo}
|
| | | </if>
|
| | | ) GROUP BY order_no, matnr
|
| | | ) t
|
| | | </select>
|
| | | <select id="getTaskIntegrateByTaskNo" resultType="com.zy.asrs.wms.asrs.entity.dto.LargeScreenTaskDto">
|
| | | SELECT * FROM
|
| | | (
|
| | | SELECT
|
| | | mt.task_no,
|
| | | mt.barcode,
|
| | | mtd.wave_no,
|
| | | SUM( mtd.anfme ) anfme,
|
| | | mt.id,
|
| | | mt.task_sts
|
| | | FROM
|
| | | man_task mt
|
| | | INNER JOIN man_task_detl mtd ON mt.id = mtd.task_id
|
| | | GROUP BY
|
| | | mt.task_no,
|
| | | mtd.wave_no
|
| | | ) t
|
| | | ${ew.customSqlSegment}
|
| | | </select>
|
| | |
|
| | | </mapper>
|