Browse Source

修改sql 查询字段 增加多查询非空的判断

training
pref_mail@163.com 1 year ago
parent
commit
599999f915
  1. 2
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/entity/LocationEntity.java
  2. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/LocationMapper.xml
  3. 7
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java

2
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/entity/LocationEntity.java

@ -1,6 +1,7 @@
package com.logpm.oldproject.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
@ -53,6 +54,7 @@ public class LocationEntity {
private Integer floor ;
/** 当前列 */
@ApiModelProperty(name = "当前列",notes = "")
@TableField(value = "`row`")
private Integer row ;
}

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/mapper/LocationMapper.xml

@ -5,7 +5,7 @@
<select id="getStoreyAndRowByShelfId" resultType="java.util.Map">
select max(l.floor) storey,
max(l.`row`) row
max(l.`row`) `row`
from ht_location l
where l.shelf_id = #{shelfId}
and l.delete_time = 0

7
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncWarehouseData.java

@ -109,8 +109,11 @@ public class SyncWarehouseData {
goodsShelfEntity.setWarehouseCode(warehouseEntity.getWarehouseCode());
goodsShelfEntity.setGoodsShelfStatus(2);
goodsShelfEntity.setEnableStatus(shelfIsEmptyMap.get(shelfEntity.getStatus()));
goodsShelfEntity.setStoreyNum(storeyAndRow.get("storey"));
goodsShelfEntity.setRowNum(storeyAndRow.get("row"));
if(!Objects.isNull(storeyAndRow)){
goodsShelfEntity.setStoreyNum(storeyAndRow.get("storey"));
goodsShelfEntity.setRowNum(storeyAndRow.get("row"));
}
goodsShelfEntity.setRemarks("");
goodsShelfEntity.setOldId(oldShelfId);
Long newShelfId = basicdataGoodsShelfClient.addShelf(goodsShelfEntity);

Loading…
Cancel
Save