diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java new file mode 100644 index 0000000..fe662a3 --- /dev/null +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java @@ -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; + + +} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskDetController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskDetController.java new file mode 100644 index 0000000..c7aae13 --- /dev/null +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskDetController.java @@ -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; + + +} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/OrderInfoController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/OrderInfoController.java index 80070e5..b62ff82 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/OrderInfoController.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/OrderInfoController.java @@ -57,6 +57,7 @@ public class OrderInfoController extends BaseController { private R get(@Validated @RequestBody IdParam idParam) { return orderInfoService.getOne(idParam); } + @PostMapping(value = "getTaskInfo") @ApiOperation(value = "当前订单任务详情") private R> getTaskInfo(@Validated @RequestBody OrderInfoTaskDetParam orderInfoTaskDetParam) { diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/CurrTaskDetService.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/CurrTaskDetService.java new file mode 100644 index 0000000..2c4f689 --- /dev/null +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/CurrTaskDetService.java @@ -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 getCurrOrderCurrTask(OrderInfoTaskDetParam param); + +} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/CurrTaskService.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/CurrTaskService.java new file mode 100644 index 0000000..d47e5be --- /dev/null +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/CurrTaskService.java @@ -0,0 +1,12 @@ +package com.mt.wms.empty.service; + +/** + * 拆分任务相关服务 + * + * @author xcc + * @date 2021年11月8日 + * @since 1.0 + */ +public interface CurrTaskService { + +} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/OrderInfoService.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/OrderInfoService.java index a2ef0ce..da91296 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/OrderInfoService.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/OrderInfoService.java @@ -48,7 +48,7 @@ public interface OrderInfoService { */ R getOne(IdParam idParam); /** - * + *获取当前订单的详细任务信息 * @param orderInfoTaskDetParam 标识卡号与订单号 * @return 结果 */ diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java new file mode 100644 index 0000000..7636510 --- /dev/null +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java @@ -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 getCurrOrderCurrTask(OrderInfoTaskDetParam param) { + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.eq(CurrTaskDet.IDEN_CARD_NUM,param.getIdenCardNum()) + .eq(CurrTaskDet.ORDER_NO,param.getOrderNo()) + .eq(CurrTaskDet.VALID,1); + Page page = currTaskDetServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper); + return new PageVo<>(page, OrderInfoTaskDetVo.class); + } +} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java new file mode 100644 index 0000000..9037499 --- /dev/null +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java @@ -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; + +} diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java new file mode 100644 index 0000000..a3ab058 --- /dev/null +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java @@ -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; +}