|
|
@ -1,9 +1,6 @@ |
|
|
|
package com.yxt.wms.biz.func.warehouseinfo; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
|
import com.yxt.common.base.utils.PagerUtil; |
|
|
|
import com.yxt.common.base.utils.StringUtils; |
|
|
|
import com.yxt.common.core.query.PagerQuery; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
@ -11,11 +8,10 @@ import com.yxt.common.core.vo.PagerVo; |
|
|
|
import com.yxt.wms.biz.func.commonmethod.CommonMethod; |
|
|
|
import com.yxt.wms.biz.func.commonmethod.DataRule; |
|
|
|
import com.yxt.wms.biz.func.sysorganization.SysOrganizationVo; |
|
|
|
import com.yxt.wms.feign.portal.privilege.PrivilegeQuery; |
|
|
|
import com.yxt.wms.feign.portal.sysorganization.SysOrganizationFeign; |
|
|
|
import com.yxt.wms.feign.portal.sysstafforg.SysStaffOrgFeign; |
|
|
|
import com.yxt.wms.feign.portal.sysuser.SysUserFeign; |
|
|
|
import com.yxt.wms.feign.warehouse.warehouseinfo.WarehouseFeign; |
|
|
|
import com.yxt.wms.feign.warehouse.warehouseinfo.WarehouseInfoFeign; |
|
|
|
import com.yxt.wms.utils.OrgPathQuery; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -31,7 +27,7 @@ import java.util.List; |
|
|
|
public class WarehouseInfoService extends MybatisBaseService<WarehouseInfoMapper, WarehouseInfo> { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WarehouseFeign WarehouseFeign; |
|
|
|
WarehouseInfoFeign warehouseInfoFeign; |
|
|
|
@Autowired |
|
|
|
SysOrganizationFeign sysOrganizationFeign; |
|
|
|
@Autowired |
|
|
@ -45,21 +41,23 @@ public class WarehouseInfoService extends MybatisBaseService<WarehouseInfoMapper |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
WarehouseInfoQuery query = pq.getParams(); |
|
|
|
//通用组装方法 根据用户sid、菜单、组织全路径sid 获取组装参数
|
|
|
|
DataRule dataRule=commonMethod.dataRule(query.getOrgPath(),query.getMenuUrl(),query.getUserSid()).getData(); |
|
|
|
DataRule dataRule = commonMethod.dataRule(query.getOrgPath(), query.getMenuUrl(), query.getUserSid()).getData(); |
|
|
|
pq.getParams().setOrgLevelKey(dataRule.getDataRuleId()); |
|
|
|
pq.getParams().setIndex(dataRule.getIndex()); |
|
|
|
PagerVo<WarehouseInfoVo> p = WarehouseFeign.listPage(pq).getData(); |
|
|
|
PagerVo<WarehouseInfoVo> p = warehouseInfoFeign.listPage(pq).getData(); |
|
|
|
return rb.success().setData(p); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<List<WarehouseInfo>> listQuery(WarehouseInfoMapQuery pq) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
//通用组装方法 根据用户sid、菜单、组织全路径sid 获取组装参数
|
|
|
|
DataRule dataRule=commonMethod.dataRule(pq.getOrgPath(),pq.getMenuUrl(),pq.getUserSid()).getData(); |
|
|
|
DataRule dataRule = commonMethod.dataRule(pq.getOrgPath(), pq.getMenuUrl(), pq.getUserSid()).getData(); |
|
|
|
pq.setOrgLevelKey(dataRule.getDataRuleId()); |
|
|
|
pq.setIndex(dataRule.getIndex()); |
|
|
|
List<WarehouseInfo> p = WarehouseFeign.list(pq).getData(); |
|
|
|
List<WarehouseInfo> p = warehouseInfoFeign.list(pq).getData(); |
|
|
|
return rb.success().setData(p); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<List<WarehouseInfo>> listAll(OrgPathQuery query) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
String useOrgSid = ""; |
|
|
@ -75,7 +73,7 @@ public class WarehouseInfoService extends MybatisBaseService<WarehouseInfoMapper |
|
|
|
useOrgSid = sysOrganization.getSid(); |
|
|
|
} |
|
|
|
} |
|
|
|
List<WarehouseInfo> list = WarehouseFeign.listAll(query).getData(); |
|
|
|
List<WarehouseInfo> list = warehouseInfoFeign.listAll(query).getData(); |
|
|
|
return rb.success().setData(list); |
|
|
|
} |
|
|
|
|
|
|
@ -103,30 +101,26 @@ public class WarehouseInfoService extends MybatisBaseService<WarehouseInfoMapper |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return WarehouseFeign.saveOrUpdate(dto); |
|
|
|
return warehouseInfoFeign.saveOrUpdate(dto); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<WarehouseInfoVo> initialization(String sid) { |
|
|
|
|
|
|
|
return WarehouseFeign.initialization(sid); |
|
|
|
return warehouseInfoFeign.initialization(sid); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ResultBean delete(String sid) { |
|
|
|
|
|
|
|
return WarehouseFeign.delete(sid); |
|
|
|
return warehouseInfoFeign.delete(sid); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean delAll(String[] sids) { |
|
|
|
return WarehouseFeign.delBySids(sids); |
|
|
|
return warehouseInfoFeign.delBySids(sids); |
|
|
|
} |
|
|
|
public ResultBean updateIsEnable(String sid,String isEnable) { |
|
|
|
|
|
|
|
return WarehouseFeign.updateIsEnable(sid, isEnable); |
|
|
|
public ResultBean updateIsEnable(String sid, String isEnable) { |
|
|
|
return warehouseInfoFeign.updateIsEnable(sid, isEnable); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<List<WarehouseInfoAllVo>> selectAll() { |
|
|
|
return WarehouseFeign.selectAll(); |
|
|
|
return warehouseInfoFeign.selectAll(); |
|
|
|
} |
|
|
|
} |
|
|
|