diff --git a/productionboard/src/main/java/com/productionboard/common/CodeGenerator.java b/productionboard/src/main/java/com/productionboard/common/CodeGenerator.java index 3962ebc..7ed4813 100644 --- a/productionboard/src/main/java/com/productionboard/common/CodeGenerator.java +++ b/productionboard/src/main/java/com/productionboard/common/CodeGenerator.java @@ -58,10 +58,10 @@ public class CodeGenerator { // 数据源配置 DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl("jdbc:oracle:thin:@10.100.71.101:1521/orcl?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=UTC"); + dsc.setUrl("jdbc:oracle:thin:@10.100.71.119:1521/orcl?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=UTC"); // dsc.setSchemaName("public"); dsc.setDriverName("oracle.jdbc.driver.OracleDriver"); - dsc.setUsername("aucma"); + dsc.setUsername("system"); dsc.setPassword("aucma"); mpg.setDataSource(dsc); diff --git a/productionboard/src/main/java/com/productionboard/controller/StorageController.java b/productionboard/src/main/java/com/productionboard/controller/StorageController.java index 762246d..3f8b8ad 100644 --- a/productionboard/src/main/java/com/productionboard/controller/StorageController.java +++ b/productionboard/src/main/java/com/productionboard/controller/StorageController.java @@ -114,7 +114,7 @@ public class StorageController { * @param ids * @return java.lang.String */ - @GetMapping("/getStoreStatistics") + @GetMapping("/getParamJson") @ResponseBody public String getParamJson(String ids){ diff --git a/productionboard/src/main/java/com/productionboard/entity/BaseLocationInfo.java b/productionboard/src/main/java/com/productionboard/entity/BaseLocationInfo.java new file mode 100644 index 0000000..0b34bde --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/entity/BaseLocationInfo.java @@ -0,0 +1,120 @@ +package com.productionboard.entity; + +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableId; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *

+ * 库位信息 + *

+ * + * @author wenjy + * @since 2022-06-10 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("BASE_LOCATION_INFO") +public class BaseLocationInfo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId("OBJID") + private String objid; + + /** + * 库位编号 + */ + @TableField("LOCATION_CODE") + private String locationCode; + + /** + * 库位名称 + */ + @TableField("LOCATION_NAME") + private String locationName; + + /** + * 物料类别 + */ + @TableField("MATERIAL_TYPE") + private String materialType; + + /** + * 所属仓库 A , B + */ + @TableField("STORE_CODE") + private String storeCode; + + /** + * 库位区域 + */ + @TableField("LOCATION_AREA") + private String locationArea; + + /** + * 所处排 + */ + @TableField("LOCATION_ROW") + private BigDecimal locationRow; + + /** + * 所处列 + */ + @TableField("LOCATION_LINE") + private BigDecimal locationLine; + + /** + * 所处层 + */ + @TableField("LOCATION_TIER") + private BigDecimal locationTier; + + /** + * 库位状态 1:可用 2:空 0:空(锁) + */ + @TableField("LOCATION_STATUS") + private BigDecimal locationStatus; + + /** + * 效率级别 + */ + @TableField("EFFICIENCY") + private BigDecimal efficiency; + + /** + * 备注 + */ + @TableField("REMARK") + private String remark; + + /** + * 删除标志 + */ + @TableField("DELETE_FLAG") + private BigDecimal deleteFlag; + + /** + * 记录时间 + */ + @TableField("RECORD_TIME") + private LocalDateTime recordTime; + + /** + * 排序字段 + */ + @TableField("ORDERNUM") + private BigDecimal ordernum; + + +} diff --git a/productionboard/src/main/java/com/productionboard/mapper/BaseLocationInfoMapper.java b/productionboard/src/main/java/com/productionboard/mapper/BaseLocationInfoMapper.java new file mode 100644 index 0000000..422c9eb --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/mapper/BaseLocationInfoMapper.java @@ -0,0 +1,18 @@ +package com.productionboard.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.productionboard.entity.BaseLocationInfo; +import org.apache.ibatis.annotations.Mapper; + +/** + *

+ * 库位信息 Mapper 接口 + *

+ * + * @author wenjy + * @since 2022-06-10 + */ +@Mapper +public interface BaseLocationInfoMapper extends BaseMapper { + +} diff --git a/productionboard/src/main/java/com/productionboard/service/IBaseLocationService.java b/productionboard/src/main/java/com/productionboard/service/IBaseLocationService.java new file mode 100644 index 0000000..5c5178f --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/service/IBaseLocationService.java @@ -0,0 +1,26 @@ +package com.productionboard.service; + +/** + * @author WenJY + * @date 2022年06月10日 17:47 + */ +public interface IBaseLocationService { + + /** + * 库存统计 + * @author WenJY + * @date 2022-06-10 17:48 + * @param ids + * @return java.lang.String + */ + public String getStoreStatistics(String ids); + + /** + * 库位参数 + * @author WenJY + * @date 2022-06-10 17:48 + * @param ids + * @return java.lang.String + */ + public String getParamJson(String ids); +} diff --git a/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java b/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java new file mode 100644 index 0000000..0f075bf --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java @@ -0,0 +1,46 @@ +package com.productionboard.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.productionboard.entity.BaseLocationInfo; +import com.productionboard.mapper.BaseLocationInfoMapper; +import com.productionboard.service.IBaseLocationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author WenJY + * @date 2022年06月10日 17:48 + */ +@Service +public class BaseLocationServiceImpl implements IBaseLocationService { + + @Autowired + private BaseLocationInfoMapper lcoationMapper; + + @Override + public String getStoreStatistics(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; + } + + List baseLocationInfos = lcoationMapper.selectList(wrapper); + + return JSONArray.toJSONString(baseLocationInfos); + } + + @Override + public String getParamJson(String ids) { + return null; + } +} diff --git a/productionboard/target/classes/com/productionboard/common/CodeGenerator.class b/productionboard/target/classes/com/productionboard/common/CodeGenerator.class index e01b95e..0c43d3e 100644 Binary files a/productionboard/target/classes/com/productionboard/common/CodeGenerator.class and b/productionboard/target/classes/com/productionboard/common/CodeGenerator.class differ