From 8e96ecba9fea2a620904a8a8881fc7b26841261e Mon Sep 17 00:00:00 2001 From: wenjy Date: Fri, 10 Jun 2022 18:06:55 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E9=97=A8=E4=BD=93=E5=BA=93?= =?UTF-8?q?=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 | 4 +- .../controller/StorageController.java | 2 +- .../entity/BaseLocationInfo.java | 120 ++++++++++++++++++ .../mapper/BaseLocationInfoMapper.java | 18 +++ .../service/IBaseLocationService.java | 26 ++++ .../service/impl/BaseLocationServiceImpl.java | 46 +++++++ .../common/CodeGenerator.class | Bin 6434 -> 6446 bytes 7 files changed, 213 insertions(+), 3 deletions(-) create mode 100644 productionboard/src/main/java/com/productionboard/entity/BaseLocationInfo.java create mode 100644 productionboard/src/main/java/com/productionboard/mapper/BaseLocationInfoMapper.java create mode 100644 productionboard/src/main/java/com/productionboard/service/IBaseLocationService.java create mode 100644 productionboard/src/main/java/com/productionboard/service/impl/BaseLocationServiceImpl.java 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 e01b95e1c7c98317ea0814d4a2a2c8334bbcf723..0c43d3eb6c1360133c25a5a9602285d3ae325d1d 100644 GIT binary patch delta 1448 zcmXX`d0bRg6#mW(GxyEqYA^!h(4wiSKM*HPBZjmzmo_t-Yyu^mMnVuqV^PTptqfbF z^0iuNYL=B@N~y%mF71~+ayylE?dA=F3X zax^I{^x+oVs^P+I3b$)`&}3neaI=LwgzuDyyEGQVmaw}8?$Njx_bJ?O;Q( z!b2JvQuASrEGe^8bLKJ&kBGk9!V2BU!b;H|wXjO~F-dt`VYNmtNqIu}NefR2ud(p7 zaEpbt!p}(XI)(Kbc@o?z{H%rNgdK6VDQwUfBF>Epn>6xeo_37_Y)-`%G;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