瀏覽代碼

new dtp配送打印导出 打印详情页面

wangshuangpan 8 月之前
父節點
當前提交
8fa5fb5af0

+ 20 - 7
health-admin/src/main/java/com/bzd/web/controller/DTP/PrintController.java

@@ -4,6 +4,7 @@ import com.bzd.common.annotation.Log;
 import com.bzd.common.config.dao.PageData;
 import com.bzd.common.config.dao.PageData;
 import com.bzd.common.core.controller.BaseController;
 import com.bzd.common.core.controller.BaseController;
 import com.bzd.common.core.domain.AjaxResult;
 import com.bzd.common.core.domain.AjaxResult;
+import com.bzd.common.core.domain.entity.DtpDeliveryPrint;
 import com.bzd.common.core.page.TableDataInfo;
 import com.bzd.common.core.page.TableDataInfo;
 import com.bzd.common.enums.BusinessType;
 import com.bzd.common.enums.BusinessType;
 import com.bzd.common.utils.poi.ExcelUtil;
 import com.bzd.common.utils.poi.ExcelUtil;
@@ -13,7 +14,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
-
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -61,6 +61,18 @@ public class PrintController extends BaseController {
         return prefix + "/add";
         return prefix + "/add";
     }
     }
     /**
     /**
+     * 配送单据详情页面
+     */
+    @RequiresPermissions("dtp:print:view")
+    @GetMapping("/detail/{id}")
+    public String detail(@PathVariable("id") Long id, ModelMap mmap) throws Exception {
+        PageData pd = this.getPageData();
+        pd.put("id",id);
+        PageData pageData = dtpService.listPrint(pd).get(0);
+        mmap.putAll(pageData);
+        return prefix + "/detail";
+    }
+    /**
      * 配送单据打印单新增保存
      * 配送单据打印单新增保存
      */
      */
     //@RequiresPermissions("server:serv:add")
     //@RequiresPermissions("server:serv:add")
@@ -92,7 +104,7 @@ public class PrintController extends BaseController {
     {
     {
         PageData pd = this.getPageData();
         PageData pd = this.getPageData();
         pd.put("id",id);
         pd.put("id",id);
-        PageData pageData = dtpService.listPrint(pd).get(0);;
+        PageData pageData = dtpService.listPrint(pd).get(0);
         mmap.putAll(pageData);
         mmap.putAll(pageData);
         return prefix + "/edit";
         return prefix + "/edit";
     }
     }
@@ -118,12 +130,13 @@ public class PrintController extends BaseController {
     @RequiresPermissions("dtp:print:export")
     @RequiresPermissions("dtp:print:export")
     @PostMapping("/export")
     @PostMapping("/export")
     @ResponseBody
     @ResponseBody
-    public AjaxResult export()throws Exception
-    {
+    public AjaxResult export()throws Exception {
         PageData pd = this.getPageData();
         PageData pd = this.getPageData();
-        List<PageData> pageData= dtpService.listPrint(pd);
-        ExcelUtil<PageData> util = new ExcelUtil<>(PageData.class);
-        return util.exportExcel(pageData, "配送单据数据");
+        startPage();
+        List<DtpDeliveryPrint> pageData = dtpService.listPrintReport(pd);
+        ExcelUtil<DtpDeliveryPrint> util = new ExcelUtil<DtpDeliveryPrint>(DtpDeliveryPrint.class);
+        return util.exportExcel(pageData, "配送单据信息数据");
+
     }
     }
 
 
 }
 }

+ 1 - 1
health-admin/src/main/java/com/bzd/web/controller/DTP/RecipeRegisterController.java

@@ -109,7 +109,7 @@ public class RecipeRegisterController extends BaseController {
     {
     {
         PageData pd = this.getPageData();
         PageData pd = this.getPageData();
         pd.put("id",id);
         pd.put("id",id);
-        PageData pageData = dtpService.findForList(pd).get(0);;
+        PageData pageData = dtpService.findForList(pd).get(0);
         mmap.putAll(pageData);
         mmap.putAll(pageData);
         return prefix + "/edit";
         return prefix + "/edit";
     }
     }

+ 82 - 28
health-admin/src/main/java/com/bzd/web/controller/DTP/RecipeReportController.java

@@ -42,16 +42,43 @@ public class RecipeReportController extends BaseController {
     public AjaxResult viewDetail(@PathVariable("id") Long id)
     public AjaxResult viewDetail(@PathVariable("id") Long id)
     {
     {
         PageData pd1 = new PageData();
         PageData pd1 = new PageData();
+        PageData pd2 = new PageData();
+        PageData pd3 = new PageData();
+        PageData pd4 = new PageData();
         List<PageData> pageData = new ArrayList<>();
         List<PageData> pageData = new ArrayList<>();
 
 
             // 第一条数据
             // 第一条数据
-            pd1.put("id", id);
-            pd1.put("chain", "hh");
-            pd1.put("orderCount", "85");
-            pd1.put("pendingCount", "13");
-            pd1.put("completedCount", "5");
-            pd1.put("completionRate", "77%");
-            pageData.add(pd1);
+        pd1.put("id", id);
+        pd1.put("chain", id+"花果园分店");
+        pd1.put("orderCount", "88");
+        pd1.put("pendingCount", "10");
+        pd1.put("completedCount", "8");
+        pd1.put("completionRate", "65%");
+        pageData.add(pd1);
+        // 第二条数据
+        pd2.put("id", "102");
+        pd2.put("chain", id+"1分店");
+        pd2.put("orderCount", "120");
+        pd2.put("pendingCount", "15");
+        pd2.put("completedCount", "105");
+        pd2.put("completionRate", "87.5%");
+        pageData.add(pd2);
+        // 第三条数据
+        pd3.put("id","103");
+        pd3.put("chain",id+"2分店");
+        pd3.put("orderCount","89");
+        pd3.put("pendingCount","15");
+        pd3.put("completedCount","11");
+        pd3.put("completionRate","58%");
+        pageData.add(pd3);
+        // 第4条数据
+        pd4.put("id", "104");
+        pd4.put("chain", id+"3分店");
+        pd4.put("orderCount", "110");
+        pd4.put("pendingCount", "16");
+        pd4.put("completedCount", "95");
+        pd4.put("completionRate", "80.5%");
+        pageData.add(pd4);
          return  AjaxResult.success("cg",pageData);
          return  AjaxResult.success("cg",pageData);
     }
     }
     /**
     /**
@@ -76,7 +103,7 @@ public class RecipeReportController extends BaseController {
 
 
         List<PageData> pageData = new ArrayList<>();
         List<PageData> pageData = new ArrayList<>();
         // 第一条数据
         // 第一条数据
-        pd1.put("id", "01");
+        pd1.put("id", "1");
         pd1.put("chain", "花果园店");
         pd1.put("chain", "花果园店");
         pd1.put("orderCount", "88");
         pd1.put("orderCount", "88");
         pd1.put("pendingCount", "10");
         pd1.put("pendingCount", "10");
@@ -84,7 +111,7 @@ public class RecipeReportController extends BaseController {
         pd1.put("completionRate", "65%");
         pd1.put("completionRate", "65%");
         pageData.add(pd1);
         pageData.add(pd1);
         // 第二条数据
         // 第二条数据
-        pd2.put("id", "02");
+        pd2.put("id", "2");
         pd2.put("chain", "龙阳路店");
         pd2.put("chain", "龙阳路店");
         pd2.put("orderCount", "120");
         pd2.put("orderCount", "120");
         pd2.put("pendingCount", "15");
         pd2.put("pendingCount", "15");
@@ -92,7 +119,7 @@ public class RecipeReportController extends BaseController {
         pd2.put("completionRate", "87.5%");
         pd2.put("completionRate", "87.5%");
         pageData.add(pd2);
         pageData.add(pd2);
         // 第三条数据
         // 第三条数据
-        pd3.put("id","103");
+        pd3.put("id","3");
         pd3.put("chain","观山湖店");
         pd3.put("chain","观山湖店");
         pd3.put("orderCount","89");
         pd3.put("orderCount","89");
         pd3.put("pendingCount","15");
         pd3.put("pendingCount","15");
@@ -100,7 +127,7 @@ public class RecipeReportController extends BaseController {
         pd3.put("completionRate","58%");
         pd3.put("completionRate","58%");
         pageData.add(pd3);
         pageData.add(pd3);
         // 第4条数据
         // 第4条数据
-        pd4.put("id", "04");
+        pd4.put("id", "4");
         pd4.put("chain", "青云路店");
         pd4.put("chain", "青云路店");
         pd4.put("orderCount", "110");
         pd4.put("orderCount", "110");
         pd4.put("pendingCount", "16");
         pd4.put("pendingCount", "16");
@@ -108,7 +135,7 @@ public class RecipeReportController extends BaseController {
         pd4.put("completionRate", "80.5%");
         pd4.put("completionRate", "80.5%");
         pageData.add(pd4);
         pageData.add(pd4);
         // 第5条数据
         // 第5条数据
-        pd5.put("id","05");
+        pd5.put("id","5");
         pd5.put("chain","白云区店");
         pd5.put("chain","白云区店");
         pd5.put("orderCount","59");
         pd5.put("orderCount","59");
         pd5.put("pendingCount","5");
         pd5.put("pendingCount","5");
@@ -116,7 +143,7 @@ public class RecipeReportController extends BaseController {
         pd5.put("completionRate","70%");
         pd5.put("completionRate","70%");
         pageData.add(pd5);
         pageData.add(pd5);
         // 第1条数据
         // 第1条数据
-        pd7.put("id", "07");
+        pd7.put("id", "7");
         pd7.put("chain", "天河区店");
         pd7.put("chain", "天河区店");
         pd7.put("orderCount", "120");
         pd7.put("orderCount", "120");
         pd7.put("pendingCount", "10");
         pd7.put("pendingCount", "10");
@@ -125,7 +152,7 @@ public class RecipeReportController extends BaseController {
         pageData.add(pd7);
         pageData.add(pd7);
 
 
         // 第2条数据
         // 第2条数据
-        pd8.put("id", "08");
+        pd8.put("id", "8");
         pd8.put("chain", "海珠区店");
         pd8.put("chain", "海珠区店");
         pd8.put("orderCount", "95");
         pd8.put("orderCount", "95");
         pd8.put("pendingCount", "7");
         pd8.put("pendingCount", "7");
@@ -134,7 +161,7 @@ public class RecipeReportController extends BaseController {
         pageData.add(pd8);
         pageData.add(pd8);
 
 
         // 第3条数据
         // 第3条数据
-        pd9.put("id", "09");
+        pd9.put("id", "9");
         pd9.put("chain", "荔湾区店");
         pd9.put("chain", "荔湾区店");
         pd9.put("orderCount", "75");
         pd9.put("orderCount", "75");
         pd9.put("pendingCount", "5");
         pd9.put("pendingCount", "5");
@@ -151,7 +178,7 @@ public class RecipeReportController extends BaseController {
         pd10.put("completionRate", "93.85%");
         pd10.put("completionRate", "93.85%");
         pageData.add(pd10);
         pageData.add(pd10);
         // 第6条数据
         // 第6条数据
-        pd6.put("id", "06");
+        pd6.put("id", "6");
         pd6.put("chain", "白云区店");
         pd6.put("chain", "白云区店");
         pd6.put("orderCount", "59");
         pd6.put("orderCount", "59");
         pd6.put("pendingCount", "5");
         pd6.put("pendingCount", "5");
@@ -187,19 +214,45 @@ public class RecipeReportController extends BaseController {
         startPage();
         startPage();
         List<PageData> pageData = new ArrayList<>();
         List<PageData> pageData = new ArrayList<>();
         if(!pd.get("id").equals("")){
         if(!pd.get("id").equals("")){
-            pd1.put("id", "01");
-            pd1.put("chain", "花果园店");
+            pd1.put("id", pd.get("id"));
+            pd1.put("chain", pd.get("id")+"花果园店");
             pd1.put("orderCount", "88");
             pd1.put("orderCount", "88");
             pd1.put("pendingCount", "10");
             pd1.put("pendingCount", "10");
             pd1.put("completedCount", "8");
             pd1.put("completedCount", "8");
             pd1.put("completionRate", "65%");
             pd1.put("completionRate", "65%");
-            return   getDataTable( pageData);
+            pageData.add(pd1);
+            // 第二条数据
+            pd2.put("id", "102");
+            pd2.put("chain", pd.get("id")+"1分店");
+            pd2.put("orderCount", "120");
+            pd2.put("pendingCount", "15");
+            pd2.put("completedCount", "105");
+            pd2.put("completionRate", "87.5%");
+            pageData.add(pd2);
+            // 第三条数据
+            pd3.put("id","103");
+            pd3.put("chain",pd.get("id")+"2分店");
+            pd3.put("orderCount","89");
+            pd3.put("pendingCount","15");
+            pd3.put("completedCount","11");
+            pd3.put("completionRate","58%");
+            pageData.add(pd3);
+            // 第4条数据
+            pd4.put("id", "104");
+            pd4.put("chain", pd.get("id")+"3分店");
+            pd4.put("orderCount", "110");
+            pd4.put("pendingCount", "16");
+            pd4.put("completedCount", "95");
+            pd4.put("completionRate", "80.5%");
+            pageData.add(pd4);
+
+            return   getDataTable(pageData);
         }else {
         }else {
 
 
 
 
 
 
         // 第一条数据
         // 第一条数据
-        pd1.put("id", "01");
+        pd1.put("id", "1");
         pd1.put("chain", "花果园店");
         pd1.put("chain", "花果园店");
         pd1.put("orderCount", "88");
         pd1.put("orderCount", "88");
         pd1.put("pendingCount", "10");
         pd1.put("pendingCount", "10");
@@ -208,7 +261,7 @@ public class RecipeReportController extends BaseController {
         pageData.add(pd1);
         pageData.add(pd1);
 
 
         // 第二条数据
         // 第二条数据
-        pd2.put("id", "02");
+        pd2.put("id", "2");
         pd2.put("chain", "龙阳路店");
         pd2.put("chain", "龙阳路店");
         pd2.put("orderCount", "120");
         pd2.put("orderCount", "120");
         pd2.put("pendingCount", "15");
         pd2.put("pendingCount", "15");
@@ -216,7 +269,7 @@ public class RecipeReportController extends BaseController {
         pd2.put("completionRate", "87.5%");
         pd2.put("completionRate", "87.5%");
         pageData.add(pd2);
         pageData.add(pd2);
         // 第三条数据
         // 第三条数据
-        pd3.put("id","103");
+        pd3.put("id","3");
         pd3.put("chain","观山湖店");
         pd3.put("chain","观山湖店");
         pd3.put("orderCount","89");
         pd3.put("orderCount","89");
         pd3.put("pendingCount","15");
         pd3.put("pendingCount","15");
@@ -224,7 +277,7 @@ public class RecipeReportController extends BaseController {
         pd3.put("completionRate","58%");
         pd3.put("completionRate","58%");
         pageData.add(pd3);
         pageData.add(pd3);
         // 第4条数据
         // 第4条数据
-        pd4.put("id", "04");
+        pd4.put("id", "4");
         pd4.put("chain", "青云路店");
         pd4.put("chain", "青云路店");
         pd4.put("orderCount", "110");
         pd4.put("orderCount", "110");
         pd4.put("pendingCount", "16");
         pd4.put("pendingCount", "16");
@@ -232,7 +285,7 @@ public class RecipeReportController extends BaseController {
         pd4.put("completionRate", "80.5%");
         pd4.put("completionRate", "80.5%");
         pageData.add(pd4);
         pageData.add(pd4);
         // 第5条数据
         // 第5条数据
-        pd5.put("id","05");
+        pd5.put("id","5");
         pd5.put("chain","白云区店");
         pd5.put("chain","白云区店");
         pd5.put("orderCount","59");
         pd5.put("orderCount","59");
         pd5.put("pendingCount","5");
         pd5.put("pendingCount","5");
@@ -241,7 +294,7 @@ public class RecipeReportController extends BaseController {
         pageData.add(pd5);
         pageData.add(pd5);
 
 
         // 第1条数据
         // 第1条数据
-        pd7.put("id", "07");
+        pd7.put("id", "7");
         pd7.put("chain", "天河区店");
         pd7.put("chain", "天河区店");
         pd7.put("orderCount", "120");
         pd7.put("orderCount", "120");
         pd7.put("pendingCount", "10");
         pd7.put("pendingCount", "10");
@@ -250,7 +303,7 @@ public class RecipeReportController extends BaseController {
         pageData.add(pd7);
         pageData.add(pd7);
 
 
         // 第2条数据
         // 第2条数据
-        pd8.put("id", "08");
+        pd8.put("id", "8");
         pd8.put("chain", "海珠区店");
         pd8.put("chain", "海珠区店");
         pd8.put("orderCount", "95");
         pd8.put("orderCount", "95");
         pd8.put("pendingCount", "7");
         pd8.put("pendingCount", "7");
@@ -259,7 +312,7 @@ public class RecipeReportController extends BaseController {
         pageData.add(pd8);
         pageData.add(pd8);
 
 
         // 第3条数据
         // 第3条数据
-        pd9.put("id", "09");
+        pd9.put("id", "9");
         pd9.put("chain", "荔湾区店");
         pd9.put("chain", "荔湾区店");
         pd9.put("orderCount", "75");
         pd9.put("orderCount", "75");
         pd9.put("pendingCount", "5");
         pd9.put("pendingCount", "5");
@@ -276,13 +329,14 @@ public class RecipeReportController extends BaseController {
         pd10.put("completionRate", "93.85%");
         pd10.put("completionRate", "93.85%");
         pageData.add(pd10);
         pageData.add(pd10);
         // 第6条数据
         // 第6条数据
-        pd6.put("id", "06");
+        pd6.put("id", "6");
         pd6.put("chain", "白云区店");
         pd6.put("chain", "白云区店");
         pd6.put("orderCount", "59");
         pd6.put("orderCount", "59");
         pd6.put("pendingCount", "5");
         pd6.put("pendingCount", "5");
         pd6.put("completedCount", "5");
         pd6.put("completedCount", "5");
         pd6.put("completionRate", "70%");
         pd6.put("completionRate", "70%");
         pageData.add(pd6);
         pageData.add(pd6);
+            System.out.println("=====================查询所有"+pageData.size());
         return   getDataTable(pageData);
         return   getDataTable(pageData);
         }
         }
     }
     }

+ 0 - 80
health-admin/src/main/resources/templates/DTP/edit.html

@@ -1,80 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
-<head>
-    <th:block th:include="include :: header('服务详细')" />
-</head>
-<body>
-    <div class="main-content">
-        <form class="form-horizontal" id="form-server-edit" th:object="${server}">
-            <h4 class="form-header h4">基本信息</h4>
-            <input type="hidden" id="serviceId" name="serviceId" th:value="${serviceId}">
-            <div class="row">
-                <div class="col-sm-12">
-                    <div class="form-group">
-                        <!--is-required 增加星号 显示为必填-->
-                        <label class="col-sm-5 control-label">服务类型编号:</label>
-                        <div class="col-sm-4" >
-                            <div class="input-group">
-                                <input name="serviceTypeNumber" placeholder="请输入服务类型编号" class="form-control" type="text" maxlength="30" th:value="${serviceTypeNumber}" required>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div class="col-sm-12">
-                    <div class="form-group">
-                        <label class="col-sm-5 control-label">服务类型名称:</label>
-                        <div class="col-sm-4">
-                            <div class="input-group">
-                                <input name="serviceTypeName" placeholder="请输入服务类型名称" class="form-control" type="text" maxlength="30" th:value="${serviceTypeName}" required>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div class="col-sm-12">
-                    <div class="form-group">
-                        <label class="col-sm-5 control-label">服务类型描述:</label>
-                        <div class="col-sm-4">
-                            <div class="input-group">
-                                <input name="serviceTypeDescription" placeholder="请输入服务类型描述" class="form-control" type="text" maxlength="30" th:value="${serviceTypeDescription}" required>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div class="col-sm-12">
-                    <div class="form-group">
-                        <label class="col-sm-5 control-label">履约方:</label>
-                        <div class="col-sm-4">
-                            <div class="input-group">
-                                <input name="fulfillmentParty" placeholder="履约方" class="form-control" type="text" maxlength="30" th:value="${fulfillmentParty}" required>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </form>
-    </div>
-    <div class="main-content">
-        <div class="col-sm-offset-5 col-sm-10">
-            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
-            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
-        </div>
-    </div>
-	<th:block th:include="include :: footer" />
-</body>
-</html>
-
-<script>
-    function submitHandler() {
-        var prefix = ctx + "server/serv";
-        if ($.validate.form()) {
-            var data = $("#form-server-edit").serializeArray();
-            /*var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
-            var roleIds = $.form.selectCheckeds("role");
-            var postIds = $.form.selectSelects("post");
-            data.push({"name": "status", "value": status});
-            data.push({"name": "roleIds", "value": roleIds});
-            data.push({"name": "postIds", "value": postIds});*/
-            $.operate.saveTab(prefix + "/edit", data);
-        }
-    }
-</script>

+ 49 - 0
health-admin/src/main/resources/templates/DTP/print/detail.html

@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+	<th:block th:include="include :: header('配送单据打印详细')" />
+	<th:block th:include="include :: jsonview-css" />
+</head>
+<body class="white-bg">
+	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+	<form class="form-horizontal m-t" id="signupForm" th:object="${detail}">
+		<div class="form-group">
+			<label class="col-sm-2 control-label">订单编号:</label>
+			<div class="form-control-static" th:text="${orderId}">
+			</div>
+		</div>
+		<div class="form-group">
+			<label class="col-sm-2 control-label">配送时间:</label>
+			<div class="form-control-static" th:text="${deliveryTime}">
+			</div>
+		</div>
+		<div class="form-group">
+			<label class="col-sm-2 control-label">配送人:</label>
+			<div class="form-control-static" th:text="${deliverer}">
+			</div>
+		</div>
+		<div class="form-group">
+			<label class="col-sm-2 control-label">打印申请时间:</label>
+			<div class="form-control-static" th:text="${printRequestTime}">
+			</div>
+		</div>
+		<div class="form-group">
+			<label class="col-sm-2 control-label">打印状态:</label>
+			<div class="form-control-static" th:text="${status}">
+			</div>
+		</div>
+
+		<div class="form-group" th:style="'display:' + ${status == 0 ? 'none' : 'block'}">
+			<label class="col-sm-2 control-label">订单数据:</label>
+			<div class="form-control-static" th:text="${orderData}">
+			</div>
+		</div>
+	</form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <th:block th:include="include :: jsonview-js" />
+    <script th:inline="javascript">
+
+    </script>
+</body>
+</html>

+ 12 - 17
health-admin/src/main/resources/templates/DTP/print/print.html

@@ -33,7 +33,7 @@
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>打印状态:</label>
 									<label>打印状态:</label>
-									<select name="prescriptionType"  th:with="type=${@dict.getType('sys_select_print_status')}">
+									<select name="status"  th:with="type=${@dict.getType('sys_select_print_status')}">
 										<option value="">全部</option>
 										<option value="">全部</option>
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
 												></option>
 												></option>
@@ -49,20 +49,13 @@
 					</form>
 					</form>
 				</div>
 				</div>
 
 
-<!--		        <div class="btn-group-sm" id="toolbar" role="group">-->
-<!--		        	<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="dtp:recipe:add">-->
-<!--		                <i class="fa fa-plus"></i> 新增-->
-<!--		            </a>-->
-<!--		             <a class="btn btn-primary single disabled" onclick="$.operate.editTab()" shiro:hasPermission="dtp:recipe:edit">-->
-<!--			            <i class="fa fa-edit"></i> 修改-->
-<!--			        </a>-->
-<!--		            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="sdtp:recipe:remove">-->
-<!--		                <i class="fa fa-remove"></i> 删除-->
-<!--		            </a>-->
-<!--		            <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="dtp:recipe:import">-->
-<!--			            <i class="fa fa-upload"></i> 导入-->
-<!--			        </a>-->
-				<div class="btn-group-sm" id="toolbar" role="group">
+		        <div class="btn-group-sm" id="toolbar" role="group">
+
+		            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="sdtp:print:remove">
+		                <i class="fa fa-remove"></i> 删除
+		            </a>
+
+
 		            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="dtp:print:export">
 		            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="dtp:print:export">
 			            <i class="fa fa-download"></i> 打印
 			            <i class="fa fa-download"></i> 打印
 			        </a>
 			        </a>
@@ -81,6 +74,7 @@
 	<script th:inline="javascript">
 	<script th:inline="javascript">
 		var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
 		var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
 		var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
 		var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
+		var detailFlag = [[${@permission.hasPermi('dtp:print:view')}]];
 		var prefix = ctx + "dtp/print";
 		var prefix = ctx + "dtp/print";
 
 
 		$(function() {
 		$(function() {
@@ -106,6 +100,7 @@
 		        viewUrl: prefix + "/view/{id}",
 		        viewUrl: prefix + "/view/{id}",
 		        createUrl: prefix + "/add",
 		        createUrl: prefix + "/add",
 		        updateUrl: prefix + "/edit/{id}",
 		        updateUrl: prefix + "/edit/{id}",
+				detailUrl: prefix + "/detail/{id}",
 		        removeUrl: prefix + "/remove",
 		        removeUrl: prefix + "/remove",
 		        exportUrl: prefix + "/export",
 		        exportUrl: prefix + "/export",
 		        sortName: "createTime",
 		        sortName: "createTime",
@@ -148,9 +143,9 @@
 		            title: '操作',
 		            title: '操作',
 		            align: 'center',
 		            align: 'center',
 		            formatter: function(value, row, index) {
 		            formatter: function(value, row, index) {
-		                if (row.id) {
+		                if (row.orderId) {
 		                	var actions = [];
 		                	var actions = [];
-			                actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+							actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></i>详细</a>');
 			                actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
 			                actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
 			                return actions.join('');
 			                return actions.join('');
 		            	} else {
 		            	} else {

+ 10 - 5
health-admin/src/main/resources/templates/DTP/recipe/view.html

@@ -20,15 +20,14 @@
                 <div class="ant-card-head-title">
                 <div class="ant-card-head-title">
                     <div class="index_title-2CoZR">
                     <div class="index_title-2CoZR">
                         <h1>DTP处方登记概览</h1>
                         <h1>DTP处方登记概览</h1>
-                        <button onclick="" class="ant-btn-primary">导出订单</button>
-                    </div>
+
                 </div>
                 </div>
             </div>
             </div>
 
 
         </div>
         </div>
         <div class="container-div">
         <div class="container-div">
         <form id="report-form">
         <form id="report-form">
-            <input type="text" class="" hidden="true" value="" name="id">
+            <input type="hidden"  class="form-control"  name="id" id="id">
         <div class="ChartAndTable_chart-and-table-3ib6R">
         <div class="ChartAndTable_chart-and-table-3ib6R">
             <div class="ant-radio-group ant-radio-group-outline">
             <div class="ant-radio-group ant-radio-group-outline">
                 <label class="ant-radio-button-wrapper ant-radio-button-wrapper-checked">
                 <label class="ant-radio-button-wrapper ant-radio-button-wrapper-checked">
@@ -265,6 +264,9 @@
 
 
         /*门店列表-详细*/
         /*门店列表-详细*/
         function detail(id) {
         function detail(id) {
+            $("#id").val(id);
+            $.table.search();
+            $("#id").val("");
             debugger
             debugger
             $.ajax({
             $.ajax({
                 type : "GET",
                 type : "GET",
@@ -300,10 +302,12 @@
                         }]
                         }]
                     };
                     };
 
 
+
+
                     // 使用新的数据更新图表
                     // 使用新的数据更新图表
                     myChart.setOption(updatedOption);
                     myChart.setOption(updatedOption);
-                    $("#id").val(id);
-                    queryUserList();
+
+
                 },
                 },
                 error : function(errorMsg) {
                 error : function(errorMsg) {
                     //请求失败时执行该函数
                     //请求失败时执行该函数
@@ -311,6 +315,7 @@
                     myChart.hideLoading();
                     myChart.hideLoading();
                 }
                 }
             })
             })
+
         }
         }
 
 
     /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
     /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */

+ 8 - 8
health-admin/src/main/resources/templates/dtp/cold/cold.html

@@ -30,34 +30,34 @@
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>订单号:</label>
 									<label>订单号:</label>
-									<input type="text" placeholder="请输入订单号" name="orderNumber"/>
+									<input type="text" class="styled-input" placeholder="请输入订单号" name="orderNumber"/>
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>配送员:</label>
 									<label>配送员:</label>
-									<input type="text"  placeholder="请输入配送员" name="deliveryPerson"/>
+									<input type="text" class="styled-input" placeholder="请输入配送员" name="deliveryPerson"/>
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>收货人:</label>
 									<label>收货人:</label>
-									<input type="text" placeholder="请输入收货人" name="recipientName"/>
+									<input type="text" class="styled-input" placeholder="请输入收货人" name="recipientName"/>
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>收货电话:</label>
 									<label>收货电话:</label>
-								<input type="text" placeholder="请输入收货电话" name="recipientPhone"/>
+								<input type="text" class="styled-input" placeholder="请输入收货电话" name="recipientPhone"/>
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>配送状态:</label>
 									<label>配送状态:</label>
-									<select name="deliveryStatus"  th:with="type=${@dict.getType('sys_select_pszt')}">
+									<select name="deliveryStatus"  th:with="type=${@dict.getType('sys_select_pszt')}" class="styled-input">
 										<option value="">全部</option>
 										<option value="">全部</option>
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option>
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option>
 									</select>
 									</select>
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>所属连锁:</label>
 									<label>所属连锁:</label>
-										<input name="chainName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择门店">
+										<input name="chainName" class="styled-input" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择门店">
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>冷链类型:</label>
 									<label>冷链类型:</label>
-									<select name="coldChainType"  th:with="type=${@dict.getType('sys_select_cold_type')}">
+									<select name="coldChainType"  th:with="type=${@dict.getType('sys_select_cold_type')}" class="styled-input">
 										<option value="">全部</option>
 										<option value="">全部</option>
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
 												></option>
 												></option>
@@ -65,7 +65,7 @@
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>付款顺序:</label>
 									<label>付款顺序:</label>
-									<select name="paymentSequence"  th:with="type=${@dict.getType('sys_select_payment_sequence')}">
+									<select name="paymentSequence"  th:with="type=${@dict.getType('sys_select_payment_sequence')}" class="styled-input">
 										<option value="">全部</option>
 										<option value="">全部</option>
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
 										></option>
 										></option>

+ 9 - 9
health-admin/src/main/resources/templates/dtp/recipe/recipe.html

@@ -17,25 +17,25 @@
 						<div class="select-list">
 						<div class="select-list">
 							<ul>
 							<ul>
 								<li>
 								<li>
-									患者信息:<input type="text"  placeholder="请输入患者姓名或手机号" name="query"/>
+									患者信息:<input type="text" class="styled-input" placeholder="请输入患者姓名或手机号" name="query"/>
 								</li>
 								</li>
 								<li>
 								<li>
-									药品:<input type="text" name="genericName"/>
+									药品:<input type="text" class="styled-input" name="genericName"/>
 								</li>
 								</li>
 								<li>
 								<li>
 								<li>
 								<li>
-									订单编号:<input type="text" name="orderId"/>
+									订单编号:<input type="text" class="styled-input" name="orderId"/>
 								</li>
 								</li>
 								<li>
 								<li>
-									销售单号:<input type="text" name="saleOrderNumber"/>
+									销售单号:<input type="text" class="styled-input" name="saleOrderNumber"/>
 								</li>:
 								</li>:
 								</li>
 								</li>
 								<li>
 								<li>
-									处方单号:<input type="text" name="prescriptionNumber"/>
+									处方单号:<input type="text" class="styled-input" name="prescriptionNumber"/>
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>处方类型</label>
 									<label>处方类型</label>
-									<select name="prescriptionType"  th:with="type=${@dict.getType('sys_select_prescription_ype')}">
+									<select name="prescriptionType"  th:with="type=${@dict.getType('sys_select_prescription_ype')}" class="styled-input">
 										<option value="">全部</option>
 										<option value="">全部</option>
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
 												></option>
 												></option>
@@ -43,7 +43,7 @@
 								</li>
 								</li>
 								<li>
 								<li>
 									<label>配送方式</label>
 									<label>配送方式</label>
-									<select name="deliveryMethod"  th:with="type=${@dict.getType('sys_select_delivery_method')}">
+									<select name="deliveryMethod"  th:with="type=${@dict.getType('sys_select_delivery_method')}" class="styled-input">
 										<option value="">全部</option>
 										<option value="">全部</option>
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
 												></option>
 												></option>
@@ -60,7 +60,7 @@
 
 
 								<li>
 								<li>
 									<label>订单状态</label>
 									<label>订单状态</label>
-									<select name="status" th:with="type=${@dict.getType('sys_select_order_status')}">
+									<select name="status" th:with="type=${@dict.getType('sys_select_order_status')}" class="styled-input">
 										<option value="">全部</option>
 										<option value="">全部</option>
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
 										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
 										></option>
 										></option>
@@ -164,7 +164,7 @@
 					},
 					},
 					{
 					{
 						field: "productName",
 						field: "productName",
-						title: "商品名"
+						title: "商品名",
 					},
 					},
 					{
 					{
 						field: "specification",
 						field: "specification",

+ 46 - 0
health-common/src/main/java/com/bzd/common/core/domain/entity/DtpDeliveryPrint.java

@@ -0,0 +1,46 @@
+package com.bzd.common.core.domain.entity;
+
+import com.bzd.common.annotation.Excel;
+import com.bzd.common.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+@Data
+public class DtpDeliveryPrint extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    /** 订单编号 IMPORT:该字段只在导入时使用*/
+    @Excel(name = "订单编号", type = Excel.Type.IMPORT)
+    private Long orderId;
+    /** 业务Id IMPORT:该字段只在导入时使用 */
+    @Excel(name = "业务Id", type = Excel.Type.IMPORT)
+    private Long businessId;
+    /** 配送人 */
+    @Excel(name = "配送人")
+    private String deliverer;
+    /** 配送时间 */
+    @Excel(name = "配送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
+    private Date deliveryTime;
+    /** 打印申请时间 */
+    @Excel(name = "打印申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
+    private Date printRequestTime;
+    /** 创建时间 */
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
+    private Date createTime;
+
+    /** 打印状态 */
+    @Excel(name = "打印状态")
+    private String status;
+    /** 订单数据 */
+    @Excel(name = "订单数据",width = 50)
+    private String orderData;
+
+//    /** 删除标识 */
+//    @Excel(name = "删除标识", readConverterExp = "0=未删除,1=删除")
+//    private Integer delFlag;
+
+
+
+
+}

+ 16 - 4
health-system/src/main/java/com/bzd/system/service/DTPService.java

@@ -3,6 +3,7 @@ package com.bzd.system.service;
 import com.bzd.common.config.dao.DaoBase;
 import com.bzd.common.config.dao.DaoBase;
 import com.bzd.common.config.dao.DaoSupport;
 import com.bzd.common.config.dao.DaoSupport;
 import com.bzd.common.config.dao.PageData;
 import com.bzd.common.config.dao.PageData;
+import com.bzd.common.core.domain.entity.DtpDeliveryPrint;
 import com.bzd.common.utils.StringUtils;
 import com.bzd.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -144,9 +145,18 @@ public class DTPService {
      * @throws Exception
      * @throws Exception
      */
      */
     public List<PageData> listPrint(final PageData pd) throws Exception {
     public List<PageData> listPrint(final PageData pd) throws Exception {
-        return (List<PageData>) daoSupport.findForList("DTPMapper.listPrint", pd);
-    }
 
 
+        return (List<PageData>) daoSupport.findForList("DTPMapper.listPrintPd", pd);
+    }
+    /**
+     * 配送单据打印导出
+     * @param pd
+     * @return
+     * @throws Exception
+     */
+    public List<DtpDeliveryPrint> listPrintReport(final PageData pd) throws Exception {
+        return (List<DtpDeliveryPrint>) daoSupport.findForList("DTPMapper.listPrintEntity", pd);
+    }
     /**
     /**
      * 配送单据打印 添加
      * 配送单据打印 添加
      * @param pd
      * @param pd
@@ -155,13 +165,15 @@ public class DTPService {
      */
      */
     public Integer savePrint(final PageData pd) throws Exception {
     public Integer savePrint(final PageData pd) throws Exception {
 
 
-        pd.put("orderNumber","1113333");//订单编号
         LocalDateTime now = LocalDateTime.now();
         LocalDateTime now = LocalDateTime.now();
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");//2024-01-01 10:00:00
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");//2024-01-01 10:00:00
         String formattedOrderTime = now.format(formatter);
         String formattedOrderTime = now.format(formatter);
         pd.put("create_time",formattedOrderTime);//订单时间
         pd.put("create_time",formattedOrderTime);//订单时间
         pd.put("creationTime",formattedOrderTime);//订单创建时间
         pd.put("creationTime",formattedOrderTime);//订单创建时间
-        pd.put("createdBy","admin");//订单创建时间
+        pd.put("createdBy","admin");//订单创建人
+        pd.put("businessId","10359");//业务ID
+        pd.put("status","待打印");//打印状态
+
         return daoSupport.save("DTPMapper.savePrint", pd);
         return daoSupport.save("DTPMapper.savePrint", pd);
     }
     }
     /**
     /**

+ 80 - 45
health-system/src/main/resources/mapper/system/DTPMapper.xml

@@ -7,7 +7,7 @@
     <select id="RecipeRegisterList" parameterType="pd" resultType="pd">
     <select id="RecipeRegisterList" parameterType="pd" resultType="pd">
         select id, orderId, saleOrderNumber, genericName, productName, specification, quantity, manufacturer, mdmCode,
         select id, orderId, saleOrderNumber, genericName, productName, specification, quantity, manufacturer, mdmCode,
         posMemberName, posMemberPhone, prescriptionType, orderTime, prescriptionNumber, hospital, department,
         posMemberName, posMemberPhone, prescriptionType, orderTime, prescriptionNumber, hospital, department,
-        doctor, patientName, patientPhone, storeName, registrar, completionTime, deliveryMethod, paymentCode,
+        doctor, patientName, patientPhone, storeName, registrar, completionTime,lastUpdated, deliveryMethod, paymentCode,
         paymentMethod, status ,create_time as createTime  from s_dtp_cfdj_prescription
         paymentMethod, status ,create_time as createTime  from s_dtp_cfdj_prescription
         <where>
         <where>
             <if test="id != null">AND id = #{id}</if>
             <if test="id != null">AND id = #{id}</if>
@@ -74,6 +74,7 @@
             <if test="paymentCode != null and paymentCode!=''">paymentCode,</if>
             <if test="paymentCode != null and paymentCode!=''">paymentCode,</if>
             <if test="paymentMethod != null and paymentMethod!=''">paymentMethod,</if>
             <if test="paymentMethod != null and paymentMethod!=''">paymentMethod,</if>
             <if test="status != null and status!=''">status},</if>
             <if test="status != null and status!=''">status},</if>
+            <if test="lastUpdated != null and lastUpdated!=''">lastUpdated,</if>
             <if test="createTime != null and createTime!=''">create_time,</if>
             <if test="createTime != null and createTime!=''">create_time,</if>
         </trim>
         </trim>
         <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
         <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
@@ -102,6 +103,7 @@
             <if test="paymentCode != null and paymentCode!=''">#{paymentCode},</if>
             <if test="paymentCode != null and paymentCode!=''">#{paymentCode},</if>
             <if test="paymentMethod != null and paymentMethod!=''">#{paymentMethod},</if>
             <if test="paymentMethod != null and paymentMethod!=''">#{paymentMethod},</if>
             <if test="status != null and status!=''">#{status},</if>
             <if test="status != null and status!=''">#{status},</if>
+            <if test="lastUpdated != null and lastUpdated!=''">#{lastUpdated},</if>
             <if test="createTime != null and createTime!=''">#{createTime},</if>
             <if test="createTime != null and createTime!=''">#{createTime},</if>
         </trim>
         </trim>
     </insert>
     </insert>
@@ -142,6 +144,7 @@
             <if test="paymentCode != null and paymentCode!=''">paymentCode=#{paymentCode},</if>
             <if test="paymentCode != null and paymentCode!=''">paymentCode=#{paymentCode},</if>
             <if test="paymentMethod != null and paymentMethod!=''">paymentMethod=#{paymentMethod},</if>
             <if test="paymentMethod != null and paymentMethod!=''">paymentMethod=#{paymentMethod},</if>
             <if test="status != null and status!=''">status=#{status},</if>
             <if test="status != null and status!=''">status=#{status},</if>
+            <if test="lastUpdated != null and lastUpdated!=''">lastUpdated=#{lastUpdated},</if>
             <if test="createTime != null and createTime!=''">create_time=#{createTime},</if>
             <if test="createTime != null and createTime!=''">create_time=#{createTime},</if>
         </trim>
         </trim>
         where id=#{id}
         where id=#{id}
@@ -152,7 +155,7 @@
     <select id="selectOne" parameterType="pd" resultType="pd">
     <select id="selectOne" parameterType="pd" resultType="pd">
         select id, orderId, saleOrderNumber, genericName, productName, specification, quantity, manufacturer, mdmCode,
         select id, orderId, saleOrderNumber, genericName, productName, specification, quantity, manufacturer, mdmCode,
         posMemberName, posMemberPhone, prescriptionType, orderTime, prescriptionNumber, hospital, department,
         posMemberName, posMemberPhone, prescriptionType, orderTime, prescriptionNumber, hospital, department,
-        doctor, patientName, patientPhone, storeName, registrar, completionTime, deliveryMethod, paymentCode,
+        doctor, patientName, patientPhone, storeName, registrar, completionTime, lastUpdated,deliveryMethod, paymentCode,
         paymentMethod, status ,create_time as createTime  from s_dtp_cfdj_prescription where id=#{id}
         paymentMethod, status ,create_time as createTime  from s_dtp_cfdj_prescription where id=#{id}
     </select>
     </select>
 
 
@@ -282,17 +285,15 @@
 
 
 
 
     <update id="softDeleteColdOrder" parameterType="pd">
     <update id="softDeleteColdOrder" parameterType="pd">
-        <if test="ids != null and ids.size() > 0">
             update s_dtp_llps_distribution_order
             update s_dtp_llps_distribution_order
             set del_flag = 1
             set del_flag = 1
-            where id in
-            <foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
-                #{id}
-            </foreach>
-        </if>
+            where  where
+            <if test="ids != null and ids!=''">
+                id in(${ids})
+            </if>
     </update>
     </update>
 <!--配送单据打印模块-->
 <!--配送单据打印模块-->
-    <select id="listPrint" resultType="pd">
+    <select id="listPrintEntity" parameterType="pd" resultType="com.bzd.common.core.domain.entity.DtpDeliveryPrint">
         select id,
         select id,
         businessId,
         businessId,
         orderId,
         orderId,
@@ -303,16 +304,53 @@
         printRequestTime,
         printRequestTime,
         createdBy,
         createdBy,
         orderData,
         orderData,
+        del_flag as delFlag,
         gmtCreate,
         gmtCreate,
         updateBy updatedTime,
         updateBy updatedTime,
         create_time as createTime
         create_time as createTime
         from s_dtp_llps_distribution_print
         from s_dtp_llps_distribution_print
         <where>
         <where>
-            <if test="id != null">and id = #{id}</if>
-            <if test="businessId != null">and businessId = #{businessId}</if>
-            <if test="orderId != null">and orderId = #{orderId}</if>
-            <if test="storeId != null">and storeId = #{storeId}</if>
-            <if test="status != null">and status = #{status}</if>
+            <if test="id != null and id != ''">and id = #{id}</if>
+            <if test="businessId != null and businessId != ''">and businessId = #{businessId}</if>
+            <if test="orderId != null and orderId != ''">and orderId = #{orderId}</if>
+            <if test="storeId != null and storeId != ''">and storeId = #{storeId}</if>
+            <if test="status != null  and status != ''">and status = #{status}</if>
+            <if test="deliverer != null and deliverer != ''">and deliverer = #{deliverer}</if>
+            <if test="deliveryTimeStart != null and deliveryTimeStart!='' and deliveryTimeEnd != null and deliveryTimeEnd!=''">
+                and deliveryTime between #{deliveryTimeStart} and #{deliveryTimeEnd}
+            </if>
+            <if test="printRequestTimeStart != null and printRequestTimeStart!='' and  printRequestTimeEnd != null and printRequestTimeEnd!=''">
+                and printRequestTime between #{printRequestTimeStart} and #{printRequestTimeEnd}
+            </if>
+            <if test="createdBy != null and createdBy != ''">and createdBy = #{createdBy}</if>
+            <if test="createBy != null and createBy != ''">and createBy = #{createBy}</if>
+            <if test="updateBy != null and updateBy != ''">and updateBy = #{updateBy}</if>
+            and del_flag = '0'
+        </where>
+        order by create_time desc
+    </select>
+    <select id="listPrintPd" parameterType="pd" resultType="pd">
+        select id,
+        businessId,
+        orderId,
+        storeId,
+        status,
+        deliverer,
+        deliveryTime,
+        printRequestTime,
+        createdBy,
+        orderData,
+        del_flag as delFlag,
+        gmtCreate,
+        updateBy updatedTime,
+        create_time as createTime
+        from s_dtp_llps_distribution_print
+        <where>
+            <if test="id != null and id != ''">and id = #{id}</if>
+            <if test="businessId != null and businessId != ''">and businessId = #{businessId}</if>
+            <if test="orderId != null and orderId != ''">and orderId = #{orderId}</if>
+            <if test="storeId != null and storeId != ''">and storeId = #{storeId}</if>
+            <if test="status != null  and status != ''">and status = #{status}</if>
             <if test="deliverer != null and deliverer != ''">and deliverer = #{deliverer}</if>
             <if test="deliverer != null and deliverer != ''">and deliverer = #{deliverer}</if>
             <if test="deliveryTimeStart != null and deliveryTimeStart!='' and deliveryTimeEnd != null and deliveryTimeEnd!=''">
             <if test="deliveryTimeStart != null and deliveryTimeStart!='' and deliveryTimeEnd != null and deliveryTimeEnd!=''">
                 and deliveryTime between #{deliveryTimeStart} and #{deliveryTimeEnd}
                 and deliveryTime between #{deliveryTimeStart} and #{deliveryTimeEnd}
@@ -327,27 +365,26 @@
         </where>
         </where>
         order by create_time desc
         order by create_time desc
     </select>
     </select>
-
 
 
     <insert id="savePrint" parameterType="pd">
     <insert id="savePrint" parameterType="pd">
         insert into s_dtp_llps_distribution_print
         insert into s_dtp_llps_distribution_print
         <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
         <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
             <if test="createdBy != null and createdBy != ''">createdBy,</if>
             <if test="createdBy != null and createdBy != ''">createdBy,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="businessId != null">businessId,</if>
-            <if test="deliveryTime != null">deliveryTime,</if>
-            <if test="printRequestTime != null">printRequestTime,</if>
+            <if test="createTime != null and createTime != ''">create_time,</if>
+            <if test="businessId != null and businessId != ''">businessId,</if>
+            <if test="deliveryTime != null and deliveryTime != ''">deliveryTime,</if>
+            <if test="printRequestTime != null and printRequestTime != ''">printRequestTime,</if>
             <if test="deliverer != null and deliverer != ''">deliverer,</if>
             <if test="deliverer != null and deliverer != ''">deliverer,</if>
             <if test="createBy != null and createBy != ''">createBy,</if>
             <if test="createBy != null and createBy != ''">createBy,</if>
-            <if test="extend != null">extend,</if>
-            <if test="gmtCreate != null">gmtCreate,</if>
-            <if test="gmtUpdate != null">gmtUpdate,</if>
-            <if test="orderId != null">orderId,</if>
-            <if test="orderData != null">orderData,</if>
-            <if test="status != null">status,</if>
-            <if test="storeId != null">storeId,</if>
+            <if test="extend != null and extend != ''">extend,</if>
+            <if test="gmtCreate != null and gmtCreate != ''">gmtCreate,</if>
+            <if test="gmtUpdate != null and gmtUpdate != ''">gmtUpdate,</if>
+            <if test="orderId != null and orderId != ''">orderId,</if>
+            <if test="orderData != null and orderData != ''">orderData,</if>
+            <if test="status != null and status != ''">status,</if>
+            <if test="storeId != null and storeId != ''">storeId,</if>
             <if test="updateBy != null and updateBy != ''">updateBy,</if>
             <if test="updateBy != null and updateBy != ''">updateBy,</if>
-            <if test="version != null">version,</if>
+            <if test="version != null and version != ''">version,</if>
         </trim>
         </trim>
         <trim prefix="VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
         <trim prefix="VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
             <if test="createdBy != null and createdBy != ''">#{createdBy},</if>
             <if test="createdBy != null and createdBy != ''">#{createdBy},</if>
@@ -373,35 +410,33 @@
         update s_dtp_llps_distribution_print
         update s_dtp_llps_distribution_print
         <set>
         <set>
             <if test="createdBy != null and createdBy != ''">createdBy = #{createdBy},</if>
             <if test="createdBy != null and createdBy != ''">createdBy = #{createdBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="businessId != null">businessId = #{businessId},</if>
-            <if test="deliveryTime != null">deliveryTime = #{deliveryTime},</if>
-            <if test="printRequestTime != null">printRequestTime = #{printRequestTime},</if>
+            <if test="createTime != null  and createTime != ''">create_time = #{createTime},</if>
+            <if test="businessId != null  and businessId != ''">businessId = #{businessId},</if>
+            <if test="deliveryTime != null  and deliveryTime != ''">deliveryTime = #{deliveryTime},</if>
+            <if test="printRequestTime != null  and printRequestTime != ''">printRequestTime = #{printRequestTime},</if>
             <if test="deliverer != null and deliverer != ''">deliverer = #{deliverer},</if>
             <if test="deliverer != null and deliverer != ''">deliverer = #{deliverer},</if>
             <if test="createBy != null and createBy != ''">createBy = #{createBy},</if>
             <if test="createBy != null and createBy != ''">createBy = #{createBy},</if>
-            <if test="extend != null">extend = #{extend},</if>
-            <if test="gmtCreate != null">gmtCreate = #{gmtCreate},</if>
-            <if test="gmtUpdate != null">gmtUpdate = #{gmtUpdate},</if>
-            <if test="orderId != null">orderId = #{orderId},</if>
-            <if test="orderData != null">orderData = #{orderData},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="storeId != null">storeId = #{storeId},</if>
+            <if test="extend != null  and extend != ''">extend = #{extend},</if>
+            <if test="gmtCreate != null  and gmtCreate != ''">gmtCreate = #{gmtCreate},</if>
+            <if test="gmtUpdate != null  and gmtUpdate != ''">gmtUpdate = #{gmtUpdate},</if>
+            <if test="orderId != null  and orderId != ''">orderId = #{orderId},</if>
+            <if test="orderData != null  and orderData != ''">orderData = #{orderData},</if>
+            <if test="status != null  and status != ''">status = #{status},</if>
+            <if test="storeId != null  and storeId != ''">storeId = #{storeId},</if>
             <if test="updateBy != null and updateBy != ''">updateBy = #{updateBy},</if>
             <if test="updateBy != null and updateBy != ''">updateBy = #{updateBy},</if>
-            <if test="version != null">version = #{version},</if>
+            <if test="version != null  and version != ''">version = #{version},</if>
         </set>
         </set>
         where id = #{id}
         where id = #{id}
     </update>
     </update>
 
 
     <!--配送单据打印模块 软删除-->
     <!--配送单据打印模块 软删除-->
     <update id="DelPrint" parameterType="pd">
     <update id="DelPrint" parameterType="pd">
-        <if test="ids != null and ids.size() > 0">
             update s_dtp_llps_distribution_print
             update s_dtp_llps_distribution_print
             set del_flag = 1
             set del_flag = 1
-            where id in
-            <foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
-                #{id}
-            </foreach>
-        </if>
+            where
+            <if test="ids != null and ids!=''">
+                id in(${ids})
+            </if>
     </update>
     </update>
 
 
 </mapper>
 </mapper>