| | |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <div class="pick-wall-box"> |
| | | <el-col :span="6" v-for="(item, index) in seedBracket" :key="index"> |
| | | <div class="seed-bracket" :style="getLightStatus(item)" @click.native="lightClick(item)"/> |
| | | <el-col :span="6" v-for="(item, index) in seedBracket" :key="index" @click.native="lightClick(item)"> |
| | | <div class="seed-bracket" :style="getLightStatus(item)" /> |
| | | </el-col> |
| | | </div> |
| | | </dv-border-box-11> |
| | |
| | | <el-row> |
| | | <el-col class="header-title">复核当前作业中数量</el-col> |
| | | <el-col style="text-align: center"> |
| | | <el-col :span="10" class="content">总需求数量:</el-col> |
| | | <el-col :span="10" class="content">需求数量:</el-col> |
| | | <el-col :span="8" class="content-value">{{ selected.anfme }}</el-col> |
| | | </el-col> |
| | | <el-col> |
| | |
| | | import com.zy.asrs.wms.apis.wcs.services.WcsApiService; |
| | | import com.zy.asrs.wms.asrs.entity.CacheSite; |
| | | import com.zy.asrs.wms.asrs.entity.Task; |
| | | import com.zy.asrs.wms.asrs.entity.WaveSeed; |
| | | import com.zy.asrs.wms.asrs.entity.param.BindPlatformParam; |
| | | import com.zy.asrs.wms.asrs.service.CacheSiteService; |
| | | import com.zy.asrs.wms.asrs.service.PlatformService; |
| | | import com.zy.asrs.wms.asrs.service.TaskService; |
| | | import com.zy.asrs.wms.asrs.service.WaveSeedService; |
| | | import com.zy.asrs.wms.asrs.service.impl.WaveSeedServiceImpl; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import io.netty.util.internal.StringUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Resource |
| | | private TaskService taskService; |
| | | |
| | | @Autowired |
| | | private WaveSeedService waveSeedService; |
| | | |
| | | |
| | | /** |
| | |
| | | if (Objects.isNull(cacheSite)) { |
| | | throw new CoolException("当前站点不存在!!"); |
| | | } |
| | | |
| | | WaveSeed waveSeed = waveSeedService.getOne(new LambdaQueryWrapper<WaveSeed>().eq(WaveSeed::getSiteNo, request.get("tagCode").toString())); |
| | | if (Objects.isNull(waveSeed)) { |
| | | throw new CoolException("播种墙地标未绑定!!"); |
| | | } |
| | | // 根据播种站点信息条码,查任务 |
| | | Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, cacheSite.getBarcode())); |
| | | Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getId, waveSeed.getTaskId())); |
| | | if (Objects.isNull(task)) { |
| | | throw new CoolException("当前站点任务不存在!!"); |
| | | } |
| | |
| | | if (task.getTaskSts() == TaskStsType.WCS_EXECUTE_OUT_ARRIVED.id
|
| | | || task.getTaskSts() == TaskStsType.WCS_EXECUTE_OUT_TASK_DONE.id ) {
|
| | | // 到达拣选位,控制播种墙亮灯
|
| | | List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>()
|
| | | .eq(CacheSite::getBarcode, task.getBarcode()));
|
| | | if(cacheSites.size() == 0) {
|
| | | CacheSite cacheSite = cacheSiteService.getOne(new LambdaQueryWrapper<CacheSite>()
|
| | | .eq(CacheSite::getChannel, task.getTargetSite())
|
| | | .isNull(CacheSite::getOrderId).orderByAsc(CacheSite::getId));
|
| | | // List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>()
|
| | | // .eq(CacheSite::getBarcode, task.getBarcode()));
|
| | | if(Objects.isNull(cacheSite)) {
|
| | | log.error("条码:{},未找到播种墙亮灯",task.getBarcode());
|
| | | throw new CoolException("未找到播种墙");
|
| | | }
|
| | | for (CacheSite cacheSite:cacheSites) {
|
| | |
|
| | | // 获取任务明细数量
|
| | | List<TaskDetl> taskDetlByTaskId = taskDetlService.getTaskDetlByTaskId(task.getId());
|
| | | int sum = (int)taskDetlByTaskId.stream().mapToDouble(TaskDetl::getAnfme).sum();
|
| | |
| | | } else {
|
| | | log.info("任务{}到达拣选位,播种墙{}亮灯失败",task.getTaskNo(),cacheSite.getSiteNo());
|
| | | }
|
| | | }
|
| | |
|
| | | boolean update = taskService.update(new LambdaUpdateWrapper<Task>()
|
| | | .set(Task::getTaskSts, TaskStsType.WAVE_SEED.id)
|
| | | .set(Task::getOriginSite, arrivedParam.getSlotCode())
|
| | |
| | | if (!update) {
|
| | | throw new CoolException("容器到达任务更新失败!!");
|
| | | }
|
| | |
|
| | | } else if(task.getTaskSts().equals(TaskStsType.UPDATED_OUT.id)) {
|
| | | ConveyorStarParam conveyorStarParam = new ConveyorStarParam();
|
| | | conveyorStarParam.setSlotCode(task.getOriginSite())
|
| | |
| | | this.siteStatus = siteStatus;
|
| | | this.orderId = orderId;
|
| | | this.orderNo = orderNo;
|
| | | this.barcode = barcode;
|
| | | // this.barcode = barcode;
|
| | | this.hostId = hostId;
|
| | | this.status = status;
|
| | | this.deleted = deleted;
|
| | |
| | | @ApiModelProperty(value= "任务明细")
|
| | | private Long taskDetlId;
|
| | |
|
| | | @ApiModelProperty("任务ID")
|
| | | private Long taskId;
|
| | |
|
| | | @ApiModelProperty("任务号")
|
| | | private String taskNo;
|
| | |
|
| | | /**
|
| | | * 数量
|
| | | */
|
| | |
| | | throw new CoolException("当前波次订单不存在!!");
|
| | | }
|
| | |
|
| | | List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>()
|
| | | .eq(CacheSite::getSiteStatus, CacheSiteStatusType.O.id).eq(CacheSite::getChannel, task.getTargetSite()));
|
| | | // List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>()
|
| | | // .eq(CacheSite::getSiteStatus, CacheSiteStatusType.O.id).eq(CacheSite::getChannel, task.getTargetSite()));
|
| | | //
|
| | | // if (cacheSites.isEmpty()) {
|
| | | // throw new CoolException("缓存站空间不足,请稍后再试");
|
| | | // }
|
| | | //
|
| | | // if (cacheSites.size() < orders.size()) {
|
| | | // throw new CoolException("缓存站空间不足,请稍后再试");
|
| | | // }
|
| | |
|
| | | if (cacheSites.isEmpty()) {
|
| | | throw new CoolException("缓存站空间不足,请稍后再试");
|
| | | }
|
| | |
|
| | | if (cacheSites.size() < orders.size()) {
|
| | | throw new CoolException("缓存站空间不足,请稍后再试");
|
| | | }
|
| | |
|
| | | for (int i = 0; i < orders.size(); i++) {
|
| | | CacheSite cacheSite = cacheSites.get(i);
|
| | | cacheSite.setOrderId(orders.get(i).getId());
|
| | | cacheSite.setOrderNo(orders.get(i).getOrderNo());
|
| | | cacheSite.setSiteStatus(CacheSiteStatusType.R.id);
|
| | | cacheSite.setBarcode(loc.getBarcode());
|
| | | cacheSite.setUpdateTime(new Date());
|
| | | if (!cacheSiteService.updateById(cacheSite)) {
|
| | | throw new CoolException("缓存站更新失败");
|
| | | }
|
| | | }
|
| | | // for (int i = 0; i < orders.size(); i++) {
|
| | | // CacheSite cacheSite = cacheSiteService.getOne(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getOrderId, orders.get(i).getId()));
|
| | | // if (Objects.isNull(cacheSite)) {
|
| | | // cacheSite.setOrderId(orders.get(i).getId());
|
| | | // cacheSite.setOrderNo(orders.get(i).getOrderNo());
|
| | | // cacheSite.setSiteStatus(CacheSiteStatusType.R.id);
|
| | | // cacheSite.setBarcode(loc.getBarcode());
|
| | | // cacheSite.setUpdateTime(new Date());
|
| | | // if (!cacheSiteService.updateById(cacheSite)) {
|
| | | // throw new CoolException("缓存站更新失败");
|
| | | // }
|
| | | // }
|
| | | // }
|
| | |
|
| | | //库位F => R
|
| | | loc.setLocStsId(LocStsType.R.val());
|
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | | import com.zy.asrs.wms.apis.wcs.entity.response.SowSeeds;
|
| | | import com.zy.asrs.wms.asrs.entity.WaveSeed;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.ShippingOrderDetlDto;
|
| | | import com.zy.asrs.wms.asrs.entity.param.WaveSeedReviewParam;
|
| | |
|
| | | import java.util.List;
|
| | |
| | | List<SowSeeds> selectSeedsList();
|
| | |
|
| | | int removeSowById(Long id);
|
| | |
|
| | | List<ShippingOrderDetlDto> selectShippingOrderDtel(String orderNo);
|
| | | }
|
| | |
| | | @Autowired
|
| | | private OrderDetlMapper orderDetlMapper;
|
| | | @Autowired
|
| | | private WaveSeedMapper waveSeedMapper;
|
| | | private WaveSeedService waveSeedMapper;
|
| | | @Autowired
|
| | | private WaveSeedLogService waveSeedLogService;
|
| | | @Autowired
|
| | | private OrderDetlLogService orderDetlLogService;
|
| | |
|
| | | @Autowired
|
| | | private PlatformDetlService platformDetlService;
|
| | | @Autowired
|
| | | private PlatformDetlLogService platformDetlLogService;
|
| | |
|
| | |
|
| | |
|
| | | @Override
|
| | |
| | | .setOrderId(order.getId())
|
| | | .setSiteStatus(CacheSiteStatusType.R.id)
|
| | | .setBarcode(param.get("barcode").toString());
|
| | | if (cacheSiteMapper.updateById(siteNo) < 1) {
|
| | | if (!cacheSiteService.saveOrUpdate(siteNo)) {
|
| | | throw new CoolException("订单播种位绑定失败!!" );
|
| | | }
|
| | |
|
| | | int update = waveSeedMapper.update(new LambdaUpdateWrapper<WaveSeed>()
|
| | | if (!waveSeedMapper.update(new LambdaUpdateWrapper<WaveSeed>()
|
| | | .eq(WaveSeed::getOrderNo, order.getOrderNo())
|
| | | .set(WaveSeed::getSiteId, siteNo.getId())
|
| | | .set(WaveSeed::getSiteNo, siteNo.getSiteNo()));
|
| | | if (update < 1) {
|
| | | .set(WaveSeed::getSiteNo, siteNo.getSiteNo()))) {
|
| | | throw new CoolException("播种站点更新失败!!");
|
| | | }
|
| | | } else {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | List<WaveSeed> waveSeeds = waveSeedMapper.selectList(new LambdaQueryWrapper<WaveSeed>().eq(WaveSeed::getOrderDetlId, order.getId()));
|
| | | List<WaveSeed> waveSeeds = waveSeedMapper.list(new LambdaQueryWrapper<WaveSeed>().eq(WaveSeed::getOrderDetlId, order.getId()));
|
| | | //fixme 订单明细未播种,默认可发货
|
| | | if (!waveSeeds.isEmpty()) {
|
| | | ArrayList<WaveSeedLog> waveSeedLogs = new ArrayList<>();
|
| | |
| | | if (!waveSeedLogService.saveBatch(waveSeedLogs)) {
|
| | | throw new CoolException("波明历史档保存失败!!");
|
| | | }
|
| | | }
|
| | |
|
| | | List<Long> list = waveSeeds.stream().map(WaveSeed::getId).collect(Collectors.toList());
|
| | | //删除播种明细信息
|
| | | if (waveSeedMapper.deleteByIds(waveSeeds) < 1) {
|
| | | if (!waveSeedMapper.removeByIds(list)) {
|
| | | throw new CoolException("播种明细删除携程!!");
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | });
|
| | |
|
| | | orderList.forEach(one -> {
|
| | |
| | | import com.zy.asrs.framework.exception.CoolException;
|
| | | import com.zy.asrs.wms.apis.wcs.entity.response.SowSeeds;
|
| | | import com.zy.asrs.wms.asrs.entity.*;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.ShippingOrderDetlDto;
|
| | | import com.zy.asrs.wms.asrs.entity.enums.OrderPickStatus;
|
| | | import com.zy.asrs.wms.asrs.entity.param.WaveSeedReviewParam;
|
| | | import com.zy.asrs.wms.asrs.mapper.*;
|
| | |
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.Objects;
|
| | | import java.util.Optional;
|
| | | import java.util.*;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | @Service("waveSeedService")
|
| | |
| | | public int removeSowById(Long id) {
|
| | | return this.baseMapper.update(new LambdaUpdateWrapper<WaveSeed>().eq(WaveSeed::getId, id).set(WaveSeed::getDeleted, 1).set(WaveSeed::getStatus, 0));
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<ShippingOrderDetlDto> selectShippingOrderDtel(String orderNo) {
|
| | | return this.baseMapper.selectShippingOrderDtel(orderNo);
|
| | | }
|
| | | }
|
| | |
| | | waveSeed.setOrderNo(orderDetl.getOrderNo());
|
| | | waveSeed.setOrderId(orderDetl.getOrderId());
|
| | | waveSeed.setOrderDetlId(orderDetl.getId());
|
| | | waveSeed.setTaskId(taskDetl.getTaskId());
|
| | | waveSeed.setTaskNo(taskDetl.getTaskNo());
|
| | | waveSeed.setWaveId(taskDetl.getWaveId()).setWaveNo(taskDetl.getWaveNo());
|
| | | waveSeed.setTaskDetlId(taskDetl.getId());
|
| | | //为满足当前需求,经确认,改成订单数量
|
| | |
| | | </foreach>
|
| | | </select>
|
| | | <select id="getTaskDetlByTaskNo" resultType="com.zy.asrs.wms.apis.wcs.entity.domain.WaveTaskDetl">
|
| | | SELECT mt.task_no,mtd.matnr, mtd.anfme ,mtd.wave_no, mtd.stock, mtd.batch FROM man_task mt INNER JOIN
|
| | | SELECT mt.task_no,mtd.matnr, mtd.anfme ,mtd.wave_no, mt.site_no, mtd.stock, mtd.batch 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 != ''">
|
| | |
| | | </select>
|
| | | <select id="getTaskDetlQutify" resultType="com.zy.asrs.wms.apis.wcs.entity.domain.WaveTaskDetl">
|
| | | SELECT
|
| | | *
|
| | | t.*
|
| | | FROM
|
| | | (
|
| | | SELECT
|
| | |
| | | mws.wave_no,
|
| | | SUM( mws.work_qty ) work_qty,
|
| | | mws.batch,
|
| | | mws.task_detl_id,
|
| | | mcs.site_no
|
| | | mws.site_no,
|
| | | mws.task_detl_id
|
| | | FROM
|
| | | man_wave_seed mws LEFT JOIN man_cache_site mcs ON mws.order_id = mcs.order_id
|
| | | man_wave_seed mws
|
| | | 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>
|
| | | )
|
| | | <if test="waveNo != null and waveNo != ''">
|
| | | AND mws.wave_no = #{waveNo}
|
| | | </if>
|
| | | GROUP BY
|
| | | order_no, matnr
|
| | | order_no,
|
| | | matnr
|
| | | ) t
|
| | | </select>
|
| | | <select id="getTaskIntegrateByTaskNo" resultType="com.zy.asrs.wms.asrs.entity.dto.LargeScreenTaskDto">
|