当前任务以及任务详细相关文件
细节优化
This commit is contained in:
parent
7f67da210d
commit
f784b36f30
@ -0,0 +1,25 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.empty.service.CurrTaskService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author xcc
|
||||
* @date 2021年11月8日
|
||||
* @since 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "currTask")
|
||||
@Slf4j
|
||||
@Api(value = "当前任务管理", tags = "任务管理", hidden = false)
|
||||
public class CurrTaskController extends BaseController {
|
||||
@Autowired
|
||||
private CurrTaskService currTaskService;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.mt.wms.empty.controller;
|
||||
|
||||
import com.mt.wms.core.base.BaseController;
|
||||
import com.mt.wms.core.constants.CommonConstant;
|
||||
import com.mt.wms.empty.service.CurrTaskDetService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author xcc
|
||||
* @date 2021年11月8日
|
||||
* @since 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(CommonConstant.API_MODULE_BASE + "currTaskDet")
|
||||
@Slf4j
|
||||
@Api(value = "当前任务详情管理", tags = "任务详情管理", hidden = false)
|
||||
public class CurrTaskDetController extends BaseController {
|
||||
@Autowired
|
||||
CurrTaskDetService currTaskDetService;
|
||||
|
||||
|
||||
}
|
@ -57,6 +57,7 @@ public class OrderInfoController extends BaseController {
|
||||
private R<OrderInfoVo> get(@Validated @RequestBody IdParam idParam) {
|
||||
return orderInfoService.getOne(idParam);
|
||||
}
|
||||
|
||||
@PostMapping(value = "getTaskInfo")
|
||||
@ApiOperation(value = "当前订单任务详情")
|
||||
private R<PageVo<OrderInfoTaskDetVo>> getTaskInfo(@Validated @RequestBody OrderInfoTaskDetParam orderInfoTaskDetParam) {
|
||||
|
@ -0,0 +1,25 @@
|
||||
package com.mt.wms.empty.service;
|
||||
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
|
||||
import com.mt.wms.empty.vo.CurrTaskDetVo;
|
||||
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拆分任务相关服务
|
||||
*
|
||||
* @author xcc
|
||||
* @date 2021年11月8日
|
||||
* @since 1.0
|
||||
*/
|
||||
public interface CurrTaskDetService {
|
||||
/**
|
||||
* 获取当前订单的任务详情
|
||||
* @param param 订单号 和标识卡
|
||||
* @return 结果
|
||||
*/
|
||||
public PageVo<OrderInfoTaskDetVo> getCurrOrderCurrTask(OrderInfoTaskDetParam param);
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.mt.wms.empty.service;
|
||||
|
||||
/**
|
||||
* 拆分任务相关服务
|
||||
*
|
||||
* @author xcc
|
||||
* @date 2021年11月8日
|
||||
* @since 1.0
|
||||
*/
|
||||
public interface CurrTaskService {
|
||||
|
||||
}
|
@ -48,7 +48,7 @@ public interface OrderInfoService {
|
||||
*/
|
||||
R<OrderInfoVo> getOne(IdParam idParam);
|
||||
/**
|
||||
*
|
||||
*获取当前订单的详细任务信息
|
||||
* @param orderInfoTaskDetParam 标识卡号与订单号
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -0,0 +1,40 @@
|
||||
package com.mt.wms.empty.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mt.wms.core.base.BaseService;
|
||||
import com.mt.wms.core.dal.entity.CurrTaskDet;
|
||||
import com.mt.wms.core.dal.service.CurrTaskDetServiceBiz;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
|
||||
import com.mt.wms.empty.service.CurrTaskDetService;
|
||||
import com.mt.wms.empty.vo.CurrTaskDetVo;
|
||||
import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* xx服务实现类
|
||||
*
|
||||
* @author xcc
|
||||
* @date 2021年11月8日
|
||||
* @since 1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetService {
|
||||
|
||||
@Autowired
|
||||
CurrTaskDetServiceBiz currTaskDetServiceBiz;
|
||||
|
||||
@Override
|
||||
public PageVo<OrderInfoTaskDetVo> getCurrOrderCurrTask(OrderInfoTaskDetParam param) {
|
||||
QueryWrapper<CurrTaskDet> queryWrapper = new QueryWrapper<CurrTaskDet>();
|
||||
queryWrapper.eq(CurrTaskDet.IDEN_CARD_NUM,param.getIdenCardNum())
|
||||
.eq(CurrTaskDet.ORDER_NO,param.getOrderNo())
|
||||
.eq(CurrTaskDet.VALID,1);
|
||||
Page<CurrTaskDet> page = currTaskDetServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper);
|
||||
return new PageVo<>(page, OrderInfoTaskDetVo.class);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.mt.wms.empty.service.impl;
|
||||
|
||||
import com.mt.wms.core.base.BaseService;
|
||||
import com.mt.wms.core.dal.service.CurrTaskServiceBiz;
|
||||
import com.mt.wms.empty.service.CurrTaskService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* xx服务实现类
|
||||
*
|
||||
* @author xcc
|
||||
* @date 2021年11月8日
|
||||
* @since 1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class CurrTaskServiceImpl extends BaseService implements CurrTaskService {
|
||||
|
||||
@Autowired
|
||||
CurrTaskServiceBiz currTaskServiceBiz;
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.mt.wms.empty.vo;
|
||||
|
||||
import com.mt.wms.core.base.BaseVo;
|
||||
import com.mt.wms.core.vo.PageVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author xcc
|
||||
* @date 2021年11月8日
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@Builder
|
||||
@ApiModel(value = "任务详细信息", description = "用于返回任务详细信息")
|
||||
public class CurrTaskDetVo extends BaseVo implements PageVo.ConvertVo {
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 状态: 0等待执行
|
||||
*/
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
/**
|
||||
* 任务编码
|
||||
*/
|
||||
@ApiModelProperty("任务编码")
|
||||
private String taskCode;
|
||||
|
||||
/**
|
||||
* 当前任务id,关联当前任务表:t_curr_task
|
||||
*/
|
||||
@ApiModelProperty("当前任务id")
|
||||
private Integer currTaskId;
|
||||
/**
|
||||
* 重量,手动输入
|
||||
*/
|
||||
@ApiModelProperty("重量")
|
||||
private Float weight;
|
||||
|
||||
/**
|
||||
* 数量,手动输入
|
||||
*/
|
||||
@ApiModelProperty("数量")
|
||||
private Float quantity;
|
||||
}
|
Loading…
Reference in New Issue
Block a user