提交 ac22758b 作者: zhangqiliang

仓库管理的查询和新增优化

父级 8b07388d
......@@ -15,6 +15,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
......@@ -35,7 +36,7 @@ import java.util.List;
@RestController
@RequestMapping("api")
@Api(tags = "仓库管理接口")
@ApiIgnore
@Slf4j
public class WarehouseController {
@Value("${sap.username}")
......
......@@ -37,7 +37,7 @@ public class Warehouse extends CoreEntity {
private Integer isEnabled;
private String superiorWarehouse;
private Integer superiorWarehouseId;
private String receivePeople;
......@@ -157,12 +157,12 @@ public class Warehouse extends CoreEntity {
this.isEnabled = isEnabled;
}
public String getSuperiorWarehouse() {
return superiorWarehouse;
public Integer getSuperiorWarehouseId() {
return superiorWarehouseId;
}
public void setSuperiorWarehouse(String superiorWarehouse) {
this.superiorWarehouse = superiorWarehouse;
public void setSuperiorWarehouseId(Integer superiorWarehouseId) {
this.superiorWarehouseId = superiorWarehouseId;
}
public String getReceivePeople() {
......@@ -214,7 +214,7 @@ public class Warehouse extends CoreEntity {
&& (this.getModifyAccount() == null ? other.getModifyAccount() == null : this.getModifyAccount().equals(other.getModifyAccount()))
&& (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()))
&& (this.getAppkey() == null ? other.getAppkey() == null : this.getAppkey().equals(other.getAppkey()))
&& (this.getSuperiorWarehouse() == null ? other.getSuperiorWarehouse() == null : this.getSuperiorWarehouse().equals(other.getSuperiorWarehouse()))
&& (this.getSuperiorWarehouseId() == null ? other.getSuperiorWarehouseId() == null : this.getSuperiorWarehouseId().equals(other.getSuperiorWarehouseId()))
&& (this.getReceivePeople() == null ? other.getReceivePeople() == null : this.getReceivePeople().equals(other.getReceivePeople()))
&& (this.getReceivePhone() == null ? other.getReceivePhone() == null : this.getReceivePhone().equals(other.getReceivePhone()))
&& (this.getReceiveAddress() == null ? other.getReceiveAddress() == null : this.getReceiveAddress().equals(other.getReceiveAddress()))
......@@ -239,7 +239,7 @@ public class Warehouse extends CoreEntity {
result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
result = prime * result + ((getAppkey() == null) ? 0 : getAppkey().hashCode());
result = prime * result + ((getIsEnabled() == null) ? 0 : getIsEnabled().hashCode());
result = prime * result + ((getSuperiorWarehouse() == null) ? 0 : getSuperiorWarehouse().hashCode());
result = prime * result + ((getSuperiorWarehouseId() == null) ? 0 : getSuperiorWarehouseId().hashCode());
result = prime * result + ((getReceivePeople() == null) ? 0 : getReceivePeople().hashCode());
result = prime * result + ((getReceivePhone() == null) ? 0 : getReceivePhone().hashCode());
result = prime * result + ((getReceiveAddress() == null) ? 0 : getReceiveAddress().hashCode());
......
......@@ -69,4 +69,12 @@ public class WarehouseDTO implements Serializable {
@ApiModelProperty(value = "全路径名称")
private String pathName;
@ApiModelProperty(value = "上级仓库ID")
private Integer superiorWarehouseId;
@ApiModelProperty(value = "收件人")
private String receivePeople;
@ApiModelProperty(value = "收件电话")
private Integer receivePhone;
@ApiModelProperty(value = "收件地址")
private String receiveAddress;
}
......@@ -45,8 +45,8 @@ public class WarehouseSaveQuery {
@ApiModelProperty(value = "用户ID",required = true)
private String accountId;
@ApiModelProperty(value = "上级仓库")
private String superiorWarehouse;
@ApiModelProperty(value = "上级仓库ID")
private String superiorWarehouseId;
@ApiModelProperty(value = "收件人")
private String receivePeople;
@ApiModelProperty(value = "收件电话")
......@@ -135,12 +135,12 @@ public class WarehouseSaveQuery {
this.accountId = accountId;
}
public String getSuperiorWarehouse() {
return superiorWarehouse;
public String getSuperiorWarehouseId() {
return superiorWarehouseId;
}
public void setSuperiorWarehouse(String superiorWarehouse) {
this.superiorWarehouse = superiorWarehouse;
public void setSuperiorWarehouseId(String superiorWarehouseId) {
this.superiorWarehouseId = superiorWarehouseId;
}
public String getReceivePeople() {
......
......@@ -59,9 +59,9 @@
<insert id="insertWarehouse" parameterType="com.boco.nbd.wios.manage.entity.bo.Warehouse">
insert into t_warehouse(id,appkey,warehouse_leven_id,name,area,service_provider,warehouse_attribution,msg,status,create_time,create_account,modify_account,modify_time,is_enabled,superior_warehouse,receive_people,receive_phone,receive_address)
values (#{id},#{appkey},#{warehouseLevenId},#{name},#{area},#{serviceProvider},#{warehouseAttribution},#{msg},#{status},#{createTime},#{createAccount},#{modifyAccount},#{modifyTime},#{isEnabled},#{superiorWarehouse},#{receivePeople},#{receivePhone},#{receiveAddress})
ON DUPLICATE KEY UPDATE warehouse_leven_id = values(warehouse_leven_id),name = values(name),area=values(area),service_provider = values(service_provider),warehouse_attribution = values(warehouse_attribution),msg = values(msg),is_enabled = values(is_enabled),superior_warehouse = values(superior_warehouse),receive_people = values(receive_people),receive_phone = values(receive_phone),receive_address = values(receive_address)
insert into t_warehouse(id,appkey,warehouse_leven_id,name,area,service_provider,warehouse_attribution,msg,status,create_time,create_account,modify_account,modify_time,is_enabled,superior_warehouse_id,receive_people,receive_phone,receive_address)
values (#{id},#{appkey},#{warehouseLevenId},#{name},#{area},#{serviceProvider},#{warehouseAttribution},#{msg},#{status},#{createTime},#{createAccount},#{modifyAccount},#{modifyTime},#{isEnabled},#{superiorWarehouseId},#{receivePeople},#{receivePhone},#{receiveAddress})
ON DUPLICATE KEY UPDATE warehouse_leven_id = values(warehouse_leven_id),name = values(name),area=values(area),service_provider = values(service_provider),warehouse_attribution = values(warehouse_attribution),msg = values(msg),is_enabled = values(is_enabled),superior_warehouse_id = values(superior_warehouse_id),receive_people = values(receive_people),receive_phone = values(receive_phone),receive_address = values(receive_address)
</insert>
......@@ -69,7 +69,7 @@
select
tw.id,
tw.appkey,
warehouse_leven_id,
tw.warehouse_leven_id,
tw.name,
tw.area,
tw.service_provider,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论