Ver código fonte

优化采购 申请页面功能

java110 6 anos atrás
pai
commit
532266f822

+ 4 - 0
StoreService/src/main/java/com/java110/store/listener/purchaseApply/AbstractPurchaseApplyBusinessServiceDataFlowListener.java

@@ -46,6 +46,8 @@ public abstract class AbstractPurchaseApplyBusinessServiceDataFlowListener exten
         businessPurchaseApplyInfo.put("storeId", businessPurchaseApplyInfo.get("store_id"));
         businessPurchaseApplyInfo.put("entryPerson", businessPurchaseApplyInfo.get("entry_person"));
         businessPurchaseApplyInfo.put("userId", businessPurchaseApplyInfo.get("user_id"));
+        businessPurchaseApplyInfo.put("endUserName", businessPurchaseApplyInfo.get("end_user_name"));
+        businessPurchaseApplyInfo.put("endUserTel", businessPurchaseApplyInfo.get("end_user_tel"));
         businessPurchaseApplyInfo.remove("bId");
         businessPurchaseApplyInfo.put("statusCd", statusCd);
     }
@@ -77,6 +79,8 @@ public abstract class AbstractPurchaseApplyBusinessServiceDataFlowListener exten
         currentPurchaseApplyInfo.put("state", currentPurchaseApplyInfo.get("state"));
         currentPurchaseApplyInfo.put("storeId", currentPurchaseApplyInfo.get("storeId"));
         currentPurchaseApplyInfo.put("userId", currentPurchaseApplyInfo.get("userId"));
+        currentPurchaseApplyInfo.put("endUserName", currentPurchaseApplyInfo.get("end_user_name"));
+        currentPurchaseApplyInfo.put("endUserTel", currentPurchaseApplyInfo.get("end_user_tel"));
         currentPurchaseApplyInfo.put("userName", currentPurchaseApplyInfo.get("userName"));
         currentPurchaseApplyInfo.put("createTime", currentPurchaseApplyInfo.get("createTime"));
         currentPurchaseApplyInfo.put("operate", StatusConstant.OPERATE_DEL);

+ 19 - 0
java110-bean/src/main/java/com/java110/dto/purchaseApply/PurchaseApplyDto.java

@@ -26,6 +26,8 @@ public class PurchaseApplyDto extends PageDto implements Serializable {
     private String userName;
     private String userId;
     private String stateName;
+    private String endUserName;
+    private String endUserTel;
     private List<PurchaseApplyDetailVo> purchaseApplyDetailVo;
 
     private String createTime;
@@ -177,4 +179,21 @@ public class PurchaseApplyDto extends PageDto implements Serializable {
     public void setbId(String bId) {
         this.bId = bId;
     }
+
+
+    public String getEndUserName() {
+        return endUserName;
+    }
+
+    public void setEndUserName(String endUserName) {
+        this.endUserName = endUserName;
+    }
+
+    public String getEndUserTel() {
+        return endUserTel;
+    }
+
+    public void setEndUserTel(String endUserTel) {
+        this.endUserTel = endUserTel;
+    }
 }

+ 18 - 0
java110-bean/src/main/java/com/java110/vo/api/purchaseApply/ApiPurchaseApplyDataVo.java

@@ -16,6 +16,8 @@ public class ApiPurchaseApplyDataVo implements Serializable {
     private String resourceNames;
     //累计价格
     private String totalPrice;
+    private String endUserName;
+    private String endUserTel;
     private List<PurchaseApplyDetailVo> purchaseApplyDetailVo;
     private String description;
 
@@ -99,4 +101,20 @@ public class ApiPurchaseApplyDataVo implements Serializable {
     public void setResOrderType(String resOrderType) {
         this.resOrderType = resOrderType;
     }
+
+    public String getEndUserName() {
+        return endUserName;
+    }
+
+    public void setEndUserName(String endUserName) {
+        this.endUserName = endUserName;
+    }
+
+    public String getEndUserTel() {
+        return endUserTel;
+    }
+
+    public void setEndUserTel(String endUserTel) {
+        this.endUserTel = endUserTel;
+    }
 }

+ 49 - 9
java110-db/src/main/resources/mapper/store/PurchaseApplyServiceDaoImplMapper.xml

@@ -35,9 +35,9 @@
     <!-- 保存采购申请信息 add by wuxw 2018-07-03 -->
     <insert id="saveBusinessPurchaseApplyInfo" parameterType="Map">
            insert into business_purchase_apply
-                (operate,res_order_type,description,apply_order_id,state,store_id,user_id,user_name,b_id)
+                (operate,res_order_type,description,apply_order_id,state,store_id,user_id,user_name,b_id,end_user_name,end_user_tel)
            values
-                (#{operate},#{resOrderType},#{description},#{applyOrderId},#{state},#{storeId},#{userId},#{userName},#{bId})
+                (#{operate},#{resOrderType},#{description},#{applyOrderId},#{state},#{storeId},#{userId},#{userName},#{bId},#{endUserName},#{endUserTel})
     </insert>
 
     <!-- 保存采购明细表备份表 -->
@@ -85,7 +85,11 @@
             t.apply_order_id applyOrderId,t.state,
             t.store_id storeId,
             t.user_name userName,t.b_id bId,t.user_id userId,
-            t.status_cd statusCd
+            t.status_cd statusCd,
+            t.end_user_name,
+            t.end_user_tel,
+            t.end_user_name endUserName,
+            t.end_user_tel endUserTel
         from business_purchase_apply t
         where 1 =1
         <if test="operate !=null and operate != ''">
@@ -112,6 +116,12 @@
         <if test="userId !=null and userId != ''">
             and t.user_id= #{userId}
         </if>
+        <if test="endUserName !=null and endUserName != ''">
+            and t.end_user_name= #{endUserName}
+        </if>
+        <if test="endUserTel !=null and endUserTel != ''">
+            and t.end_user_tel= #{endUserTel}
+        </if>
 
     </select>
 
@@ -139,9 +149,9 @@
     <!-- 保存采购申请信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="savePurchaseApplyInfoInstance" parameterType="Map">
         insert into purchase_apply
-        (res_order_type,description,apply_order_id,status_cd,state,store_id,user_name,b_id,user_id)
+        (res_order_type,description,apply_order_id,status_cd,state,store_id,user_name,b_id,user_id,end_user_name,end_user_tel)
         select
-        t.res_order_type,t.description,t.apply_order_id,'0',t.state,t.store_id,t.user_name,t.b_id,t.user_id
+        t.res_order_type,t.description,t.apply_order_id,'0',t.state,t.store_id,t.user_name,t.b_id,t.user_id,t.end_user_name,t.end_user_tel
         from business_purchase_apply t where 1=1
         and t.operate= 'ADD'
         <if test="resOrderType !=null and resOrderType != ''">
@@ -175,7 +185,11 @@
             t.res_order_type resOrderType,t.description,
             t.apply_order_id applyOrderId,t.status_cd statusCd,t.state,
             t.store_id storeId,t.user_name userName,
-            t.b_id bId,t.user_id userId,t.create_time createTime,d.name stateName
+            t.b_id bId,t.user_id userId,t.create_time createTime,d.name stateName,
+            t.end_user_name,
+            t.end_user_tel,
+            t.end_user_name endUserName,
+            t.end_user_tel endUserTel
         from purchase_apply t
         inner join t_dict d on t.state = d.status_cd and d.table_name = 'purchase_apply' and d.table_columns = 'state'
         where 1 =1
@@ -203,6 +217,12 @@
         <if test="bId !=null and bId != ''">
             and t.b_id= #{bId}
         </if>
+        <if test="endUserName !=null and endUserName != ''">
+            and t.end_user_name= #{endUserName}
+        </if>
+        <if test="endUserTel !=null and endUserTel != ''">
+            and t.end_user_tel= #{endUserTel}
+        </if>
 
         order by t.create_time desc
         <if test="page != -1 and page != null ">
@@ -219,7 +239,11 @@
         t.apply_order_id applyOrderId,t.status_cd statusCd,t.state,
         t.store_id storeId,t.user_name userName,
         t.b_id bId,t.user_id userId,t.create_time createTime,d.name stateName,
-        de.apply_order_id applyOrderId,de.res_id resId,de.quantity,de.remark,rs.res_name resName,rs.price,rs.stock,rs.res_code resCode,rs.description
+        de.apply_order_id applyOrderId,de.res_id resId,de.quantity,de.remark,rs.res_name resName,rs.price,rs.stock,rs.res_code resCode,rs.description,
+        t.end_user_name,
+        t.end_user_tel,
+        t.end_user_name endUserName,
+        t.end_user_tel endUserTel
         from purchase_apply t
         inner join t_dict d on t.state = d.status_cd and d.table_name = 'purchase_apply' and d.table_columns = 'state'
         inner join purchase_apply_detail de on de.apply_order_id = t.apply_order_id
@@ -245,6 +269,12 @@
         <if test="bId !=null and bId != ''">
             and t.b_id= #{bId}
         </if>
+        <if test="endUserName !=null and endUserName != ''">
+            and t.end_user_name= #{endUserName}
+        </if>
+        <if test="endUserTel !=null and endUserTel != ''">
+            and t.end_user_tel= #{endUserTel}
+        </if>
 
         order by t.create_time desc
         <if test="page != -1 and page != null ">
@@ -304,6 +334,12 @@
         <if test="userId !=null and userId != ''">
             , t.user_id= #{userId}
         </if>
+        <if test="endUserName !=null and endUserName != ''">
+            , t.end_user_name= #{endUserName}
+        </if>
+        <if test="endUserTel !=null and endUserTel != ''">
+            , t.end_user_tel= #{endUserTel}
+        </if>
         where 1=1
         <if test="applyOrderId !=null and applyOrderId != ''">
             and t.apply_order_id= #{applyOrderId}
@@ -340,8 +376,12 @@
         <if test="bId !=null and bId != ''">
             and t.b_id= #{bId}
         </if>
-
-
+        <if test="endUserName !=null and endUserName != ''">
+            and t.end_user_name= #{endUserName}
+        </if>
+        <if test="endUserTel !=null and endUserTel != ''">
+            and t.end_user_tel= #{endUserTel}
+        </if>
 
     </select>