Ver código fonte

问题修改

xiaochen 2 anos atrás
pai
commit
714441b1f2

+ 48 - 0
xpyy/src/main/java/com/xpyy/xpyy/entity/Market.java

@@ -287,6 +287,22 @@ public class Market implements Serializable {
      * 让步接受
      */
     private String Qty;
+    /**
+     * 供应商名称
+     */
+    private String cVenName;
+    /**
+     * ERP编码,物料编码
+     */
+    private String ErpCode;
+    /**
+     * 图纸号
+     */
+    private String Pcode;
+    /**
+     * 品名,物料名称
+     */
+    private String cInvName;
     /**
      * 页数
      */
@@ -296,6 +312,38 @@ public class Market implements Serializable {
      */
     private int limit;
 
+    public String getcVenName() {
+        return cVenName;
+    }
+
+    public void setcVenName(String cVenName) {
+        this.cVenName = cVenName;
+    }
+
+    public String getErpCode() {
+        return ErpCode;
+    }
+
+    public void setErpCode(String erpCode) {
+        ErpCode = erpCode;
+    }
+
+    public String getPcode() {
+        return Pcode;
+    }
+
+    public void setPcode(String pcode) {
+        Pcode = pcode;
+    }
+
+    public String getcInvName() {
+        return cInvName;
+    }
+
+    public void setcInvName(String cInvName) {
+        this.cInvName = cInvName;
+    }
+
     public String getId() {
         return id;
     }

+ 39 - 2
xpyy/src/main/resources/mapper/MarketMapper.xml

@@ -10,13 +10,50 @@
             a.poid,
             a.dPODate,
             a.cVenCode,
+            b.cVenName
         from po_main a
         left join vendor b on a.cVenCode = b.cVenCode
+        <trim prefix="WHERE" prefixOverrides="and |or">
+            <if test="cVenName != null and cVenName != ''">
+                and b.cVenName like CONCAT(CONCAT('%', #{cVenName}), '%')
+            </if>
+            <if test="cVenCode != null and cVenCode != ''">
+                and a.cVenCode = #{cVenCode}
+            </if>
+            <if test="id != null and id != ''">
+                and a.id = #{id}
+            </if>
+        </trim>
+        order by a.id desc
     </select>
     <!--查询供应商下的物料信息-->
     <select id="getMarketMaterial" resultType="java.util.Map">
         select
-
-        from po_podetailinfo
+            a.id,
+            a.poid,
+            a.cInvCode,
+            a.iQuantity,
+            a.iUnitPrice,
+            b.cInvName,
+            b.Pcode,
+            a.dArriveDate
+        from po_podetailinfo a
+        left join inventory b on a.cInvCode = b.ErpCode
+        where a.poid = #{poid}
+        <if test="cInvName != null and cInvName != ''">
+            and b.cInvName like CONCAT(CONCAT('%', #{cInvName}), '%')
+        </if>
+        <if test="Pcode != null and Pcode != ''">
+            and b.Pcode like CONCAT(CONCAT('%', #{Pcode}), '%')
+        </if>
+        <if test="cInvCode != null and cInvCode != ''">
+            and a.cInvCode like CONCAT(CONCAT('%', #{cInvCode}), '%')
+        </if>
+        <if test="dArriveDate != null and dArriveDate != ''">
+            and a.dArriveDate like CONCAT(CONCAT('%', #{dArriveDate}), '%')
+        </if>
+        <if test="id != null and id != ''">
+            and a.id = #{id}
+        </if>
     </select>
 </mapper>