| | |
| | | |
| | | import com.zy.asrs.framework.common.R; |
| | | 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.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/wave") |
| | |
| | | public R sowSeeds() { |
| | | return waveManagentService.getSowSeeds(); |
| | | } |
| | | |
| | | /** |
| | | * 审核播种状态任务 |
| | | * @param reviewParam |
| | | * @return |
| | | */ |
| | | @PostMapping("/sow/review") |
| | | public R reviewSeeds(@RequestBody WaveSeedReviewParam reviewParam) { |
| | | return waveManagentService.reviewSeeds(reviewParam); |
| | | } |
| | | |
| | | /** |
| | | * 删除播种 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/sow/remove/{id}") |
| | | public R delSowSeeds(@PathVariable Long id) { |
| | | if (waveManagentService.removeSowSeed(id) > 0) { |
| | | return R.ok("删除成功!!"); |
| | | } else { |
| | | return R.error("删除失败!!"); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | // private String siteId; |
| | | |
| | | private String id; |
| | | |
| | | private String siteNo; |
| | | |
| | | private String orderNo; |
| | |
| | | package com.zy.asrs.wms.apis.wcs.services.Impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | 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.WaveSeed; |
| | | import com.zy.asrs.wms.asrs.entity.param.WaveSeedReviewParam; |
| | | import com.zy.asrs.wms.asrs.service.WaveSeedService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | List<SowSeeds> waveSeeds = waveSeedService.selectSeedsList(); |
| | | return R.ok(waveSeeds); |
| | | } |
| | | |
| | | @Override |
| | | public R reviewSeeds(WaveSeedReviewParam reviewParam) { |
| | | waveSeedService.waveSeedReview(reviewParam); |
| | | return R.ok("播种复核成功"); |
| | | } |
| | | |
| | | @Override |
| | | public int removeSowSeed(Long id) { |
| | | if (id == null) { |
| | | throw new CoolException("播种ID不能为空!!"); |
| | | } |
| | | return waveSeedService.removeSowById(id); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.wms.apis.wcs.services; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.zy.asrs.framework.common.R; |
| | | import com.zy.asrs.wms.asrs.entity.WaveSeed; |
| | | import com.zy.asrs.wms.asrs.entity.param.WaveSeedReviewParam; |
| | | |
| | | public interface WaveManagentService { |
| | | R getSowSeeds(); |
| | | |
| | | R reviewSeeds(WaveSeedReviewParam reviewParam); |
| | | |
| | | int removeSowSeed(Long id); |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.wms.asrs.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Constants;
|
| | | import com.zy.asrs.wms.apis.wcs.entity.response.SowSeeds;
|
| | | import com.zy.asrs.wms.asrs.entity.WaveSeed;
|
| | |
| | | public interface WaveSeedMapper extends BaseMapper<WaveSeed> {
|
| | |
|
| | | List<SowSeeds> getSeedsList(@Param(Constants.WRAPPER) LambdaQueryWrapper<WaveSeed> ew);
|
| | |
|
| | | }
|
| | |
| | | void waveSeedReview(WaveSeedReviewParam param);
|
| | |
|
| | | List<SowSeeds> selectSeedsList();
|
| | |
|
| | | int removeSowById(Long id);
|
| | | }
|
| | |
| | | package com.zy.asrs.wms.asrs.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
| | | import com.zy.asrs.framework.exception.CoolException;
|
| | | import com.zy.asrs.wms.apis.wcs.entity.response.SowSeeds;
|
| | | import com.zy.asrs.wms.asrs.entity.param.WaveSeedReviewParam;
|
| | |
| | |
|
| | | @Override
|
| | | public List<SowSeeds> selectSeedsList() {
|
| | | return this.baseMapper.getSeedsList(new LambdaQueryWrapper<WaveSeed>().eq(WaveSeed::getStatus, 1));
|
| | | return this.baseMapper.getSeedsList(new LambdaQueryWrapper<WaveSeed>().eq(WaveSeed::getStatus, 1).eq(WaveSeed::getDeleted, 0));
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int removeSowById(Long id) {
|
| | | return this.baseMapper.update(new LambdaUpdateWrapper<WaveSeed>().eq(WaveSeed::getId, id).set(WaveSeed::getDeleted, 1).set(WaveSeed::getStatus, 0));
|
| | | }
|
| | | }
|
| | |
| | | SELECT
|
| | | *
|
| | | FROM
|
| | | ( SELECT site_id, site_no, order_no, anfme, work_qty, matnr, batch, create_time, `status`, create_by, memo FROM man_wave_seed ) t
|
| | | ( SELECT id, site_id, site_no, order_no, anfme, work_qty, matnr, batch, create_time, `status`, create_by, memo, deleted FROM man_wave_seed ) t
|
| | | ${ew.customSqlSegment}
|
| | | </select>
|
| | | </mapper>
|