Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

wangxin 20 jam lalu
induk
melakukan
fcac3e60ce

+ 5 - 0
src/main/java/cn/ezhizao/project/business/controller/Mrp10201Controller.java

@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 
 import java.util.*;
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
 
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
@@ -60,6 +61,8 @@ public class Mrp10201Controller extends BaseController {
     private IBizProductService productService;
     @Resource
     private IBizCompanyService companyService;
+    @Resource
+    HttpServletRequest request;
 
     @Resource
     private IBizTechnologicalProcessService technologicalProcessService;
@@ -78,6 +81,8 @@ public class Mrp10201Controller extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:productionPlan:query')")
     @GetMapping(value = "/getP2Plan")
     public TableDataInfo getList(BizProductionPlanDetail data) {
+        long tenantId = Long.parseLong(request.getHeader("tenantId"));
+        data.setTenantId(tenantId);
         /*
          * 获取前端传递的参数信息
          * pullP2PlanDetails:如果为 true,说明点击了“同步P2中的生产计划按钮”;

+ 1 - 1
src/main/resources/mybatis/business/BizProductionPlanDetailMapper.xml

@@ -34,10 +34,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="specification != null  and specification != ''"> AND specification = #{specification}</if>
             <if test="drawingNumber != null  and drawingNumber != ''"> AND drawing_number = #{drawingNumber}</if>
             <if test="dispatcherCode != null  and dispatcherCode != ''"> AND dispatcher_code = #{dispatcherCode}</if>
+            <if test="tenantId != null  and tenantId != 0"> AND tenant_id = #{tenantId}</if>
         </trim>
         ORDER BY id DESC
     </select>
-
     <delete id="physicalDelete">
         DELETE FROM biz_production_plan_detail
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">