Your Name vor 3 Jahren
Ursprung
Commit
03aa7cf216

+ 7 - 2
src/main/java/com/steerinfo/dil/controller/AmstruckInwardPlanController.java

@@ -170,8 +170,13 @@ public class AmstruckInwardPlanController extends BaseRESTfulController {
     public RESTfulResult getPlanOrder(@RequestBody(required = false) Map<String,Object> mapValue,
                                       Integer pageNum,
                                       Integer pageSize,
-                                      Integer apiId,Integer planId,Integer orderStatus){
-        mapValue.put("planId",planId);
+                                      Integer apiId,Integer planId,Integer orderStatus,Integer requirementId){
+        if(planId !=null){
+            mapValue.put("planId",planId);
+        }
+        if(requirementId !=null){
+            mapValue.put("requirementId",requirementId);
+        }
         mapValue.put("orderStatus",orderStatus);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据

+ 11 - 2
src/main/resources/com/steerinfo/dil/mapper/AmstruckInwardPlanMapper.xml

@@ -789,7 +789,16 @@
                            ON RC.CAPACITY_ID = OO.CAPACITY_ID
                  left join amstruck_inward_plan aip
                            on aip.plan_id = oo.order_plan_id
-        where oo.order_plan_id = #{planId}
-            and oo.order_status = #{orderStatus}
+                 left join amstruck_requirement_plan arp
+                           on arp.plan_id = aip.plan_id
+                 left join amstruck_inward_requirement air
+                           on air.requirement_id = arp.requirement_id
+        where    oo.order_status = #{orderStatus}
+        <if test="planId != null  ">
+            and aip.plan_id = #{planId}
+        </if>
+        <if test="requirementId != null  ">
+            and air.requirement_id = #{requirementId}
+        </if>
     </select>
 </mapper>