Quellcode durchsuchen

库位管理-库位导入

k vor 1 Jahr
Ursprung
Commit
9e99fcfd49

+ 1 - 1
ruoyi-ui/src/views/base/locationZone/index.vue

@@ -74,7 +74,7 @@
 
     <el-table v-loading="loading" :data="locationZoneList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <!--<el-table-column label="库区ID" align="center" prop="zoneId" />-->
+      <el-table-column label="库区ID" align="center" prop="zoneId" />
       <el-table-column label="库区名称" align="center" prop="zoneName" />
       <el-table-column label="所属仓库" align="center" prop="warehouseName" />
       <el-table-column label="状态" align="center" prop="status">

+ 9 - 7
warewms-base/src/main/java/com/ruoyi/base/service/impl/BaseLocationInfoServiceImpl.java

@@ -384,20 +384,22 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
                 BaseLocationInfo b = baseLocationInfoMapper.selectBaseLocationInfoByLocationNo(baseLocationInfo.getLocationNo(), Constant.WAREHOUSE_ID);
                 if (b == null) {
                     //BeanValidators.validateWithException(validator, stu);
+                    baseLocationInfo.setStockStatus(Constant.STOCK_STATUS.STOCK00.getValue());
+                    baseLocationInfo.setIsEmpty(Constant.IS_YES.Y.name());
+                    baseLocationInfo.setWarehouseId(Constant.WAREHOUSE_ID);
                     baseLocationInfo.setCreateBy(opname);
                     baseLocationInfo.setCreateTime(new Date());
-                    baseLocationInfo.setStockStatus("00");
-                    baseLocationInfo.setIsEmpty("Y");
-                    baseLocationInfo.setWarehouseId(Constant.WAREHOUSE_ID);
-                    baseLocationInfo.setColNo(baseLocationInfo.getColNo());
                     this.insertBaseLocationInfo(baseLocationInfo);
                     successNum++;
                     successMsg.append("<br/>" + successNum + "、库位 " + baseLocationInfo.getLocationNo() + " 导入成功");
                 } else if (updateSupport) {
                     //BeanValidators.validateWithException(validator, stu);
-                    b.setUpdateBy(opname);
-                    b.setUpdateTime(new Date());
-                    this.updateBaseLocationInfo(b);
+                    baseLocationInfo.setId(b.getId());
+                    baseLocationInfo.setStockStatus(null);
+                    baseLocationInfo.setIsEmpty(null);
+                    baseLocationInfo.setUpdateBy(opname);
+                    baseLocationInfo.setUpdateTime(new Date());
+                    this.updateBaseLocationInfo(baseLocationInfo);
                     successNum++;
                     successMsg.append("<br/>" + successNum + "、库位 " + b.getLocationNo() + " 更新成功");
                 } else {