From b44efe13d111ab9717be06252277bf168ba87d03 Mon Sep 17 00:00:00 2001 From: wenjy Date: Fri, 10 Jun 2022 18:30:18 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=BD=93=E5=89=8D=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionboard/common/CodeGenerator.java | 2 +- .../productionboard/entity/RecordTask.java | 121 ++++++++++++++++++ .../mapper/RecordTaskMapper.java | 18 +++ .../service/impl/BaseLocationServiceImpl.java | 21 +++ 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 productionboard/src/main/java/com/productionboard/entity/RecordTask.java create mode 100644 productionboard/src/main/java/com/productionboard/mapper/RecordTaskMapper.java diff --git a/productionboard/src/main/java/com/productionboard/common/CodeGenerator.java b/productionboard/src/main/java/com/productionboard/common/CodeGenerator.java index 7ed4813..1f4a019 100644 --- a/productionboard/src/main/java/com/productionboard/common/CodeGenerator.java +++ b/productionboard/src/main/java/com/productionboard/common/CodeGenerator.java @@ -48,7 +48,7 @@ public class CodeGenerator { // 全局配置 GlobalConfig gc = new GlobalConfig(); String projectPath = System.getProperty("user.dir"); - gc.setOutputDir(projectPath + "/src/main/java"); + gc.setOutputDir("E:\\桌面\\scada-visual-board\\productionboard\\src\\main\\java"); // gc.setOutputDir("D:\\test"); gc.setAuthor("wenjy"); gc.setOpen(false); diff --git a/productionboard/src/main/java/com/productionboard/entity/RecordTask.java b/productionboard/src/main/java/com/productionboard/entity/RecordTask.java new file mode 100644 index 0000000..b168b9c --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/entity/RecordTask.java @@ -0,0 +1,121 @@ +package com.productionboard.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + *

+ * 出入库任务记录 + *

+ * + * @author wenjy + * @since 2022-06-10 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("RECORD_TASK") +public class RecordTask implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId("OBJID") + private String objid; + + /** + * 任务编号 + */ + @TableField("TASK_CODE") + private String taskCode; + + /** + * 箱体编码 + */ + @TableField("BOX_CODE") + private String boxCode; + + /** + * 门体/物料编码 + */ + @TableField("MATERIAL_CODE") + private String materialCode; + + /** + * 物料类型 + */ + @TableField("MATERIAL_TYPE") + private BigDecimal materialType; + + /** + * 仓库编码 + */ + @TableField("STORE_CODE") + private String storeCode; + + /** + * 库位编码 + */ + @TableField("LOCATION_CODE") + private String locationCode; + + /** + * 库位区域 + */ + @TableField("LOCATION_AREA") + private String locationArea; + + /** + * 操作类型 + */ + @TableField("OPERATION_TYPE") + private BigDecimal operationType; + + /** + * 任务类型 + */ + @TableField("TASK_TYPE") + private BigDecimal taskType; + + /** + * 任务状态 + */ + @TableField("TASK_STATUS") + private BigDecimal taskStatus; + + /** + * 返回标识 + */ + @TableField("RETURN_FLAG") + private String returnFlag; + + /** + * 开始时间 + */ + @TableField("BEGIN_TIME") + private LocalDateTime beginTime; + + /** + * 结束时间 + */ + @TableField("END_TIME") + private LocalDateTime endTime; + + /** + * 记录时间 + */ + @TableField("RECORD_TIME") + private LocalDateTime recordTime; + + +} diff --git a/productionboard/src/main/java/com/productionboard/mapper/RecordTaskMapper.java b/productionboard/src/main/java/com/productionboard/mapper/RecordTaskMapper.java new file mode 100644 index 0000000..087a74e --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/mapper/RecordTaskMapper.java @@ -0,0 +1,18 @@ +package com.productionboard.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.RecordTask; +import org.apache.ibatis.annotations.Mapper; + +/** + *

+ * 出入库任务记录 Mapper 接口 + *

+ * + * @author wenjy + * @since 2022-06-10 + */ +@Mapper +public interface RecordTaskMapper extends BaseMapper { + +} diff --git a/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java index e85c63a..79e792d 100644 --- a/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java +++ b/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.productionboard.entity.BaseLocationInfo; import com.productionboard.mapper.BaseLocationInfoMapper; +import com.productionboard.mapper.RecordTaskMapper; import com.productionboard.service.IBaseLocationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -24,6 +25,9 @@ public class BaseLocationServiceImpl implements IBaseLocationService { @Autowired private BaseLocationInfoMapper lcoationMapper; + @Autowired + private RecordTaskMapper recordTaskMapper; + @Override public String getStoreStatistics(String ids) { QueryWrapper wrapper = new QueryWrapper<>(); @@ -54,6 +58,23 @@ public class BaseLocationServiceImpl implements IBaseLocationService { @Override public String getParamJson(String ids) { + + QueryWrapper wrapper = new QueryWrapper<>(); + switch (ids) { + case"0": + wrapper.eq("STORE_CODE","B"); + break; + case"1": + wrapper.eq("STORE_CODE","A"); + break; + default: + break; + } + + //1号库入库数量、出库数量 + + //2 + return null; } }