库存权限修改
This commit is contained in:
@@ -44,7 +44,7 @@ public class BasWarehouseServiceImpl implements IBasWarehouseService
|
||||
* @return 仓库管理
|
||||
*/
|
||||
@Override
|
||||
@DataScope
|
||||
//@DataScope
|
||||
public List<BasWarehouse> selectBasWarehouseList(BasWarehouse basWarehouse)
|
||||
{
|
||||
return basWarehouseMapper.selectBasWarehouseList(basWarehouse);
|
||||
|
||||
@@ -25,7 +25,7 @@ public class BillStatusCountServiceImpl implements IBillStatusCountService {
|
||||
* @return 单据状态统计列表
|
||||
*/
|
||||
@Override
|
||||
@DataScope
|
||||
//@DataScope
|
||||
// @DataScope(warehouseAlias = "")
|
||||
public List<BillStatusCount> selectAllBillStatusCount(BaseEntity baseEntity) {
|
||||
List<BillStatusCount> resultList = new ArrayList<>();
|
||||
|
||||
@@ -26,28 +26,28 @@ public class CargoSpaceCountServiceImpl implements ICargoSpaceCountService {
|
||||
* @return 货位状态统计对象
|
||||
*/
|
||||
@Override
|
||||
@DataScope
|
||||
//@DataScope
|
||||
public CargoSpaceCount selectStatusCount(BaseEntity baseEntity) {
|
||||
// 查询各状态货位数量
|
||||
List<Map<String, Object>> statusCounts = cargoSpaceCountMapper.selectStatusCount(baseEntity);
|
||||
|
||||
|
||||
// 初始化结果数组,默认所有状态数量为0
|
||||
List<Integer> counts = new ArrayList<>();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
counts.add(0);
|
||||
}
|
||||
|
||||
|
||||
// 填充实际统计数量
|
||||
for (Map<String, Object> count : statusCounts) {
|
||||
int status = Integer.parseInt(count.get("status").toString());
|
||||
long countValue = Long.parseLong(count.get("count").toString());
|
||||
counts.set(status - 1, (int)countValue);
|
||||
}
|
||||
|
||||
|
||||
// 封装结果
|
||||
CargoSpaceCount result = new CargoSpaceCount();
|
||||
result.setStatusCounts(counts);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class IndexCountServiceImpl implements IIndexCountService
|
||||
* @return 统计结果
|
||||
*/
|
||||
@Override
|
||||
@DataScope
|
||||
//@DataScope
|
||||
public IndexCount selectFinishCount(BaseEntity baseEntity)
|
||||
{
|
||||
IndexCount indexCount = new IndexCount();
|
||||
|
||||
@@ -136,6 +136,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
|
||||
outStockout.setCreateManId(username);
|
||||
outStockout.setStatus("1");
|
||||
outStockout.setStockoutSource(outStockoutVo.getOutStockout().getStockoutSource());
|
||||
outStockout.setDepartmentNo(SecurityUtils.getDeptId().toString());
|
||||
// outStockout.setWarehouseId("01");
|
||||
for (int i = 0; i < detailList.size(); i++) {
|
||||
OutStockoutDetail outStockoutDetail = detailList.get(i);
|
||||
|
||||
@@ -207,6 +207,7 @@ public class PdaServiceImp implements PdaService {
|
||||
public AjaxResult rkSure(TrayCodeMsg trayCodeMsg) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMsg.getTrayCode());
|
||||
map.put("v_dept_id", SecurityUtils.getDeptId().toString());
|
||||
map.put("v_warehouse_id", trayCodeMsg.getWarehouseId());
|
||||
pdaMapper.rkSure(map);
|
||||
String result = map.get("v_result").toString();
|
||||
|
||||
@@ -172,8 +172,17 @@ public class ViewInJobFlow extends BaseEntity
|
||||
//@Excel(name = "质量",dictType = "quality_type")
|
||||
private String quality;
|
||||
|
||||
private String departmentId;
|
||||
|
||||
|
||||
public String getDepartmentId() {
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
public void setDepartmentId(String departmentId) {
|
||||
this.departmentId = departmentId;
|
||||
}
|
||||
|
||||
public void setJobDetailId(String jobDetailId)
|
||||
{
|
||||
this.jobDetailId = jobDetailId;
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.search.ViewInJobFlow.mapper.ViewInJobFlowMapper;
|
||||
@@ -44,6 +45,9 @@ public class ViewInJobFlowServiceImpl implements IViewInJobFlowService
|
||||
//@DataScope(warehouseAlias = "vijf")
|
||||
public List<ViewInJobFlow> selectViewInJobFlowList(ViewInJobFlow viewInJobFlow)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
viewInJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
}
|
||||
return viewInJobFlowMapper.selectViewInJobFlowList(viewInJobFlow);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,15 @@ public class ViewOutJobFlow extends BaseEntity
|
||||
/** 质量 */
|
||||
//@Excel(name = "质量",dictType = "quality_type")
|
||||
private String quality;
|
||||
private String departmentId;
|
||||
|
||||
public String getDepartmentId() {
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
public void setDepartmentId(String departmentId) {
|
||||
this.departmentId = departmentId;
|
||||
}
|
||||
|
||||
public void setJobDetailId(String jobDetailId)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.search.ViewOutJobFlow.mapper.ViewOutJobFlowMapper;
|
||||
@@ -44,6 +45,9 @@ public class ViewOutJobFlowServiceImpl implements IViewOutJobFlowService
|
||||
//@DataScope(warehouseAlias = "vojf")
|
||||
public List<ViewOutJobFlow> selectViewOutJobFlowList(ViewOutJobFlow viewOutJobFlow)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
viewOutJobFlow.setDepartmentId(SecurityUtils.getDeptId().toString());
|
||||
}
|
||||
return viewOutJobFlowMapper.selectViewOutJobFlowList(viewOutJobFlow);
|
||||
}
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ public class ViewStockDetail extends BaseEntity
|
||||
private String productType;
|
||||
private String outside;
|
||||
private String spare4;
|
||||
private String model;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.search.ViewStockDetail.service.impl;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.search.ViewStockDetail.domain.ViewStockDetail;
|
||||
import com.ruoyi.search.ViewStockDetail.mapper.ViewStockDetailMapper;
|
||||
import com.ruoyi.search.ViewStockDetail.service.IViewStockDetailService;
|
||||
@@ -43,6 +44,9 @@ public class ViewStockDetailServiceImpl implements IViewStockDetailService
|
||||
//@DataScope(warehouseAlias = "bw")
|
||||
public List<ViewStockDetail> selectViewStockDetailList(ViewStockDetail viewStockDetail)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
viewStockDetail.setModel(SecurityUtils.getDeptId().toString());
|
||||
}
|
||||
return viewStockDetailMapper.selectViewStockDetailList(viewStockDetail);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,9 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
@Override
|
||||
public List<BasStock> selectBasStockList(BasStock basStock)
|
||||
{
|
||||
if (!"admin".equals(SecurityUtils.getUsername())){
|
||||
basStock.setModel(SecurityUtils.getDeptId().toString());
|
||||
}
|
||||
return basStockMapper.selectBasStockList(basStock);
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
<select id="rkSure" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_add_in_job(
|
||||
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_dept_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_warehouse_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
|
||||
@@ -45,10 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="cases" column="cases" />
|
||||
<result property="quality" column="quality" />
|
||||
<result property="managementNo" column="managementNo" />
|
||||
<result property="departmentId" column="department_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewInJobFlowVo">
|
||||
select job_detail_id, job_id, task_no, status, in_or_out, tray_code, create_time, start_time, finish_time, entrance_id, warehouse_id, product_id, product_name, parent_id, price, cargo_no, unit, spec, remark, productType, systemItem, productCtm, productCtu, upperNum, limitNum, enableFlag, in_quantity, lot_no, in_or_out_id, in_or_out_d_id, priceTotal, origin, turnovertype, account, purpose, units, contract, cases, quality, managementNo from view_in_job_flow vijf
|
||||
select job_detail_id, job_id, task_no, status, in_or_out, tray_code, create_time, start_time, finish_time, entrance_id, warehouse_id, product_id, product_name, parent_id, price, cargo_no, unit, spec, remark, productType, systemItem, productCtm, productCtu, upperNum, limitNum, enableFlag, in_quantity, lot_no, in_or_out_id, in_or_out_d_id, priceTotal, origin, turnovertype, account, purpose, units, contract, cases, quality, managementNo,department_id from view_in_job_flow vijf
|
||||
</sql>
|
||||
|
||||
<select id="selectViewInJobFlowList" parameterType="ViewInJobFlow" resultMap="ViewInJobFlowResult">
|
||||
@@ -92,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="cases != null and cases != ''"> and cases = #{cases}</if>
|
||||
<if test="quality != null and quality != ''"> and quality = #{quality}</if>
|
||||
<if test="managementNo != null and managementNo != ''"> and managementNo = #{managementNo}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (department_id = #{departmentId} or department_id is null)</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
|
||||
@@ -45,10 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="cases" column="cases" />
|
||||
<result property="quality" column="quality" />
|
||||
<result property="managementNo" column="managementNo" />
|
||||
<result property="departmentId" column="department_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewOutJobFlowVo">
|
||||
select job_detail_id, job_id, task_no, status, in_or_out, tray_code, create_time, start_time, finish_time, exit_id, warehouse_id, product_id, product_name, parent_id, price, cargo_no, unit, spec, remark, productType, systemItem, productCtm, productCtu, upperNum, limitNum, enableFlag, out_quantity, lot_no, in_or_out_id, in_or_out_d_id, priceTotal, origin, turnovertype, account, purpose, units, contract, cases, quality, managementNo from view_out_job_flow vojf
|
||||
select job_detail_id, job_id, task_no, status, in_or_out, tray_code, create_time, start_time, finish_time, exit_id, warehouse_id, product_id, product_name, parent_id, price, cargo_no, unit, spec, remark, productType, systemItem, productCtm, productCtu, upperNum, limitNum, enableFlag, out_quantity, lot_no, in_or_out_id, in_or_out_d_id, priceTotal, origin, turnovertype, account, purpose, units, contract, cases, quality, managementNo,department_id from view_out_job_flow vojf
|
||||
</sql>
|
||||
|
||||
<select id="selectViewOutJobFlowList" parameterType="ViewOutJobFlow" resultMap="ViewOutJobFlowResult">
|
||||
@@ -92,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="cases != null and cases != ''"> and cases = #{cases}</if>
|
||||
<if test="quality != null and quality != ''"> and quality = #{quality}</if>
|
||||
<if test="managementNo != null and managementNo != ''"> and managementNo = #{managementNo}</if>
|
||||
<if test="departmentId != null and departmentId != ''"> and (department_id = #{departmentId} or department_id is null)</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
|
||||
@@ -88,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectViewStockDetailVo"/>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and bs.stock_id = #{stockId}</if>
|
||||
<if test="model != null and model != ''"> and (bs.model = #{model} or bs.model is null)</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bs.cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and bs.lot_no = #{lotNo}</if>
|
||||
|
||||
@@ -139,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="netWeight != null and netWeight != ''"> and bs.net_weight = #{netWeight}</if>
|
||||
<if test="grossWeight != null and grossWeight != ''"> and bs.gross_weight = #{grossWeight}</if>
|
||||
<if test="distribution != null and distribution != ''"> and bs.distribution = #{distribution}</if>
|
||||
<if test="model != null and model != ''"> and bs.model = #{model}</if>
|
||||
<if test="model != null and model != ''"> and (bs.model = #{model} or bs.model is null)</if>
|
||||
<if test="orderId != null and orderId != ''"> and bs.order_id = #{orderId}</if>
|
||||
<if test="productId != null and productId != ''"> and bs.product_id = #{productId}</if>
|
||||
<if test="cargoSpaceStockStatus != null and cargoSpaceStockStatus != ''"> and bcs.status = #{cargoSpaceStockStatus}</if>
|
||||
|
||||
@@ -164,8 +164,8 @@
|
||||
<el-table-column label="仓库" align="left" prop="warehouseName"/><!--仓库-->
|
||||
<el-table-column label="创建人" align="left" prop="createManName"/><!--创建人-->
|
||||
<el-table-column label="部门" align="left" prop="departmentName"/><!--部门-->
|
||||
<el-table-column label="建立时间" align="left" prop="createDate"/><!--建立时间-->
|
||||
<el-table-column label="完成日期" align="left" prop="finishDate"/><!--完成日期-->
|
||||
<el-table-column label="建立时间" align="left" prop="createDate" width="160"/><!--建立时间-->
|
||||
<el-table-column label="完成日期" align="left" prop="finishDate" width="160"/><!--完成日期-->
|
||||
<el-table-column label="备注" align="left" prop="spare5"/><!--备注-->
|
||||
</el-table>
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
</el-table-column>-->
|
||||
<!-- <el-table-column label="仓库编码" align="center" prop="warehouseId"/>-->
|
||||
<el-table-column label="库位" align="center" prop="cargoSpaceId" width="160"/>
|
||||
<el-table-column label="托盘" align="center" prop="trayCode"/>
|
||||
<el-table-column label="托盘" align="center" prop="trayCode" width="160"/>
|
||||
<el-table-column label="合同号" align="center" prop="orderId"/>
|
||||
<el-table-column label="产品号" align="center" prop="power"/>
|
||||
<el-table-column label="代号" align="center" prop="distribution"/>
|
||||
|
||||
Reference in New Issue
Block a user