Browse Source

feature:营养餐订单下载

wuyongyi 1 năm trước cách đây
mục cha
commit
988cfabea6

+ 11 - 0
src/main/java/com/ywt/mg/params/mealOrder/MealOrderListRequest.java

@@ -78,6 +78,9 @@ public class MealOrderListRequest implements Serializable {
     @ApiModelProperty(value = "判断医院后台还是公司后台")
     private int hosp;
 
+    @ApiModelProperty(value = "是否需要打包")
+    private String needPackage;
+
 
     public String getOrderNo() {
         return orderNo;
@@ -270,4 +273,12 @@ public class MealOrderListRequest implements Serializable {
     public void setHosp(int hosp) {
         this.hosp = hosp;
     }
+
+    public String getNeedPackage() {
+        return needPackage;
+    }
+
+    public void setNeedPackage(String needPackage) {
+        this.needPackage = needPackage;
+    }
 }

+ 10 - 2
src/main/java/com/ywt/mg/services/MealOrderService.java

@@ -133,6 +133,11 @@ public class MealOrderService {
             paramList.add(paymentNo);
         }
 
+        if(!Checker.isNone(request.getNeedPackage())){
+            whereSql += " and (need_package = ?)";
+            paramList.add(Integer.parseInt(request.getNeedPackage()));
+        }
+
         int hospitalId = Checker.getIntegerValue(request.getHospitalId());
         if (hospitalId > 0) {
             whereSql += " and ( hospital_id = ?)";
@@ -325,6 +330,7 @@ public class MealOrderService {
             String col8 = "支付状态";
             String col9 = "支付方式";
             String col10 = "总价";
+            String col10_2 = "是否选打包";
             String col11 = "支付时间";
             String col12 = "退款时间";
             String col13 = "取餐时间";
@@ -350,12 +356,12 @@ public class MealOrderService {
                 // 管理后台显示支付流水号
                 columns = new String[]{
                         col2, col3, col3_1, col3_2, col18, col4, col5, col20, col21, col6, col19, col7, col8, col9,
-                        col10, col15, col16, col17, col17_1, col17_2, col11, col12, col13, col14
+                        col10, col15, col16, col17, col17_1, col17_2, col10_2, col11, col12, col13, col14
                 };
             } else {
                 columns = new String[]{
                         col2, col4, col5, col20, col6, col19, col7, col8, col9,
-                        col10, col15, col16, col17, col17_1, col17_2, col11, col12, col13, col14
+                        col10, col15, col16, col17, col17_1, col17_2, col10_2, col11, col12, col13, col14
                 };
             }
             List<Shop> shopList = shopService.getAllShops();
@@ -374,6 +380,8 @@ public class MealOrderService {
                 String totalPriceStr = FormatUtil.intShrink100ToStr(userMealOrderView.getOrderAmount());
                 map.getStringListSafely(col10).add(totalPriceStr);
                 String payTime = FormatUtil.createTimeFormatList(userMealOrderView.getPaymentTime());
+                String needPack = userMealOrderView.getNeedPackage() ? "是":"否";
+                map.getStringListSafely(col10_2).add(needPack);
                 map.getStringListSafely(col11).add(payTime);
                 String deliveryTime = FormatUtil.createTimeFormatList(userMealOrderView.getDeliveryTime());
                 map.getStringListSafely(col13).add(deliveryTime);