zhangyuewww 3 سال پیش
والد
کامیت
744fe13136

+ 9 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/PurchaseOrder.java

@@ -176,6 +176,15 @@ public class PurchaseOrder extends BaseModel<PurchaseOrder> {
      * 审核状态
      */
     private String approveStatus;
+    /**
+     * 用户id
+     */
+    private String commonId;
+    /**
+     * PC端(传1)
+     */
+    @TableField(exist = false)
+    private String pcFlag;
     /**
      * 已入库量
      */

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ProcurementPlanInfoServiceImpl.java

@@ -87,6 +87,7 @@ public class ProcurementPlanInfoServiceImpl extends ServiceImpl<ProcurementPlanI
                 * procurementPlanInfo.getPageSize());
         //公司id
         pageView.put("compId",procurementPlanInfo.getCompId());
+        pageView.put("commonId",procurementPlanInfo.getCommonId());
         pageView.put("searchKeyWord",procurementPlanInfo.getSearchKeyWord());
         pageView.put("pcFlag",procurementPlanInfo.getPcFlag());
         pageView.put("showFlag",procurementPlanInfo.getShowFlag());

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PurchaseOrderServiceImpl.java

@@ -197,8 +197,10 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<PurchaseOrderMapper, P
                 * purchaseOrder.getPageSize());
         //公司id
         pageView.put("compId", purchaseOrder.getCompId());
+        pageView.put("commonId", purchaseOrder.getCommonId());
         pageView.put("searchKeyWord", purchaseOrder.getSearchKeyWord());
         pageView.put("searchType", purchaseOrder.getSearchType());
+        pageView.put("pcFlag",purchaseOrder.getPcFlag());
         pageView.put("pageSize", purchaseOrder.getPageSize());
         pageView.put("currentPage", purchaseOrder.getCurrentPage());
         // 查询采购订单总数

+ 12 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/ProcurementPlanInfoMapper.xml

@@ -16,7 +16,12 @@
             AND (lower(receive_private) like lower(CONCAT('%',#{receivePrivate},'%')))
         </if>
         <if test="pcFlag != null and pcFlag != ''">
-            AND comp_id = #{compId}
+            <if test="pcFlag == 0">
+                AND common_id = #{commonId}
+            </if>
+            <if test="pcFlag == 1">
+                AND comp_id = #{compId}
+            </if>
         </if>
         <if test="showFlag != null and showFlag != ''">
             AND show_flag = #{showFlag}
@@ -51,7 +56,12 @@
             AND (lower(receive_private) like lower(CONCAT('%',#{receivePrivate},'%')))
         </if>
         <if test="pcFlag != null and pcFlag != ''">
-            AND comp_id = #{compId}
+            <if test="pcFlag == 0">
+                AND common_id = #{commonId}
+            </if>
+            <if test="pcFlag == 1">
+                AND comp_id = #{compId}
+            </if>
         </if>
         <if test="showFlag != null and showFlag != ''">
             AND show_flag = #{showFlag}

+ 18 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/PurchaseOrderMapper.xml

@@ -10,8 +10,7 @@
         left join price_change_record c on p.id=c.order_id
         left join transaction_record t on p.id=t.order_id
         WHERE
-        p.comp_id = #{compId}
-        and p.delete_flag = '0'
+        p.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
                 AND p.status_flag = '1'
@@ -24,6 +23,14 @@
                 AND p.status_flag = '7'
             </if>
         </if>
+        <if test="pcFlag != null and pcFlag != ''">
+            <if test="pcFlag == 0">
+                AND common_id = #{commonId}
+            </if>
+            <if test="pcFlag == 1">
+                AND comp_id = #{compId}
+            </if>
+        </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(p.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(p.customer) like lower(CONCAT('%',#{searchKeyWord},'%')))
@@ -63,8 +70,7 @@
         left join price_change_record c on p.id=c.order_id
         left join transaction_record t on p.id=t.order_id
         WHERE
-        p.comp_id = #{compId}
-        and p.delete_flag = '0'
+        p.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
                 AND p.status_flag = '1'
@@ -81,6 +87,14 @@
             AND (lower(p.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(p.customer) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
+        <if test="pcFlag != null and pcFlag != ''">
+            <if test="pcFlag == 0">
+                AND common_id = #{commonId}
+            </if>
+            <if test="pcFlag == 1">
+                AND comp_id = #{compId}
+            </if>
+        </if>
         ORDER BY p.update_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}