提交 7695c1f3 作者: zhangqiliang

仓库管理的查询返回上级仓库的名字

父级 60e528cd
......@@ -20,6 +20,7 @@ public class WarehouseEx extends Warehouse {
private String pathName;
private String serviceProviderName;
private String superiorWarehouseName;
public Integer getParentId() {
return parentId;
......@@ -52,4 +53,12 @@ public class WarehouseEx extends Warehouse {
public void setServiceProviderName(String serviceProviderName) {
this.serviceProviderName = serviceProviderName;
}
public String getSuperiorWarehouseName() {
return superiorWarehouseName;
}
public void setSuperiorWarehouseName(String superiorWarehouseName) {
this.superiorWarehouseName = superiorWarehouseName;
}
}
......@@ -79,4 +79,6 @@ public class WarehouseDTO implements Serializable {
private String receiveAddress;
@ApiModelProperty(value = "安装服务商团队的名字")
private String serviceProviderName;
@ApiModelProperty(value = "上级仓库的名字")
private String superiorWarehouseName;
}
......@@ -103,4 +103,10 @@ public interface WarehouseMapperEx {
* @return
*/
int updateWarehouseisEnabled(@Param("id") String id,@Param("isEnabled") Integer isEnabled);
/**
* 根据上级仓库id获取上级仓库的名称
* @param superiorWarehouseId
* @return
*/
WarehouseEx wareHouseBySuperiorWarehouseId(@Param("superiorWarehouseId") String superiorWarehouseId);
}
......@@ -285,6 +285,11 @@ public class WarehouseService {
if (supplier != null){
warehouseEx.setServiceProviderName(supplier.getName());
}
//获取上级仓库的名字
WarehouseEx warehouseEx1=warehouseMapperEx.wareHouseBySuperiorWarehouseId(warehouseEx.getSuperiorWarehouseId());
if (warehouseEx1 !=null){
warehouseEx.setSuperiorWarehouseName(warehouseEx1.getName());
}
WarehouseDTO warehouseDTO = JSONUtilsEx.deserialize(JSONUtilsEx.serialize(warehouseEx), WarehouseDTO.class);
if (warehouseEx.getParentId() == null) {
warehouseDTO.setIsDel(0);
......
......@@ -164,4 +164,8 @@
where id = #{id}
</update>
<select id="wareHouseBySuperiorWarehouseId" parameterType="string" resultType="com.boco.nbd.wios.manage.entity.bo.WarehouseEx">
select id,name from t_warehouse where id = #{superiorWarehouseId}
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论