bzd_wsp 6 hónapja
szülő
commit
485cffae75

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

@@ -267,14 +267,14 @@
                                     <input type="text" placeholder="请输入说明"  class="styled-input" style="width: 200px; height: 25px;"  id="remark" name="remark">
                                 </div>
                             </div>
-                            <div class="modalbudan" id="budanshibai">
-                                <div class="rows" style="text-align: center">
-                                    审核失败!
-                                </div>
-                                <div class="rows">
-                                    请核实药品
-                                </div>
-                            </div>
+<!--                            <div class="modalbudan" id="budanshibai">-->
+<!--                                <div class="rows" style="text-align: center">-->
+<!--                                    审核失败!-->
+<!--                                </div>-->
+<!--                                <div class="rows">-->
+<!--                                    请核实药品-->
+<!--                                </div>-->
+<!--                            </div>-->
                         </div>
 
                     </div>

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

@@ -25,14 +25,7 @@
 								<label>患者信息:</label>
 								<input type="text" class="styled-input" placeholder="请输入患者姓名或手机号" name="query"/>
 							</div>
-							<div class="customize-form-group">
-								<label>药品:</label>
-								<input type="text" class="styled-input" name="genericName"/>
-							</div>
-							<div class="customize-form-group">
-								<label>订单编号:</label>
-								<input type="text" class="styled-input" name="orderId"/>
-							</div>
+
 							<div class="customize-form-group">
 								<label>销售单号:</label>
 								<input type="text" class="styled-input" name="saleOrderNumber"/>
@@ -49,16 +42,9 @@
 									></option>
 								</select>
 							</div>
-							<div class="customize-form-group">
-								<label>配送方式</label>
-								<select name="deliveryMethod"  th:with="type=${@dict.getType('sys_select_delivery_method')}" class="styled-input">
-									<option value="">全部</option>
-									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
-									></option>
-								</select>
-							</div>
+
 							<div class="customize-form-group select-time">
-								<label>订单日期:</label>
+								<label>处方登记日期:</label>
 								<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime"/>
 								<span>-</span>
 								<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
@@ -74,7 +60,6 @@
 						</div>
 					</form>
 				</div>
-
 		        <div class="btn-group-sm" id="toolbar" role="group">
 <!--		        	<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="dtp:recipe:add">-->
 <!--		                <i class="fa fa-plus"></i> 处方登记APP-->
@@ -82,67 +67,14 @@
 					<a class="btn btn-success" onclick="$.operate.addTab2()" shiro:hasPermission="dtp:recipe:add">
 						<i class="fa fa-plus"></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-success" onclick="budan()">-->
-<!--						<i class="fa btn-primary"></i> 补单-->
-<!--					</a>
-<button type="button"  onclick="budan()" class="btn-primary">补单</button>-->
-
 		        </div>
-
 				<div class="col-sm-12 select-table table-striped" style="width: 100%; overflow-x: hidden;">
 					<table id="bootstrap-table" class="fixed-layout-table"></table>
 				</div>
-
 			</div>
 		</div>
 
 	</div>
-	<div class="modal inmodal" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
-		<div class="modal-dialog">
-			<form class="form-horizontal" id="form-budan-add">
-				<div class="modal-content animated bounceInRight">
-					<div class="modal-header">
-						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
-						</button>
-						<h4 class="modal-title">请输入补录销售单号</h4>
-					</div>
-					<div class="modal-body">
-						<div class="customize-search-form">
-							<div class="rows">
-								<div class="input-group">
-									一次仅补录一个处方单,多个销售单号请分别依次补录
-								</div>
-							</div>
-							<div class="rows">
-								<div class="input-group">
-									<input type="text" placeholder="请输入订单号编号"  class="styled-input" style="width: 400px; height: 40px;"  id="saleOrderNumber" name="saleOrderNumber">
-								</div>
-							</div>
-							<div class="modalbudan" id="budanshibai">
-									<div class="rows" style="text-align: center">
-											补单失败,功能未启用,请及时查看数据是否已全部同步!
-									</div>
-									<div class="rows">
-											系统未找到该订单,已通知研发同学排查,感谢操作
-									</div>
-							</div>
-						</div>
-
-					</div>
-					<div class="modal-footer">
-						<button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
-						<button type="button" class="btn btn-primary" onclick="saveBudDan()">补单</button>
-					</div>
-
-				</div>
-			</form>
-		</div>
-	</div>
-
-
 
 	<th:block th:include="include :: footer" />
 	<th:block th:include="include :: layout-latest-js" />
@@ -153,7 +85,6 @@
 		var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
 		var prefix = ctx + "dtp/recipe";
 
-
 		$(function() {
 		    var panehHidden = false;
 		    if ($(this).width() < 1590) {
@@ -191,216 +122,200 @@
 				rowNumbers: true,
 				showFooter:true,  //是否显示表格底部区域。
 				clickToSelect: true, //是否启用点击行时选中整行的功能。
-				singleSelect: false, //是否仅允许选择一行
+				singleSelect: true, //是否仅允许选择一行
 				fixedColumns: true,
 				//fixedNumber: 3,
 				fixedRightNumber: 1,
-		        columns: [{
-		            checkbox: true
-		        },
-					{
-						field: "id",
-						title: "id",
-						//hidden:false
-						visible: false,
-					},
-					{
-						field: "orderId",
-						title: "订单编号"
-					},
-					{
-						field: "saleOrderNumber",
-						title: "销售单号"
-					},
-					{
-						field: "genericName",
-						title: "药品通用名"
-					},
-					{
-						field: "productName",
-						title: "商品名",
-					},
-					{
-						field: "specification",
-						title: "规格"
-					},
-					{
-						field: "quantity",
-						title: "数量"
-					},
-					{
-						field: "manufacturer",
-						title: "厂家"
-					},
-					{
-						field: "mdmCode",
-						title: "MDM编码"
-					},
-					{
-						field: "posMemberName",
-						title: "POS会员姓名"
-					},
-					{
-						field: "posMemberPhone",
-						title: "POS会员手机号"
-					},
-					{
-						field: "prescriptionType",
-						title: "处方类型",
-						formatter: function(value, row, index) {
-							switch (value) {
-								case 1:
-									return "电子处方";
-									break;
-								case 2:
-									return "纸质处方";
-									break;
-								default:
-									return "";
-							}
+				columns: [{
+					checkbox: true
+				}, {
+					field: "id",
+					title: "ID",
+					visible: false,
+				}, {
+					field: "prescriptionNumber",
+					title: "处方单号"
+				}, {
+					field: "saleOrderNumber",
+					title: "销售单号"
+				}, {
+					field: "hospital",
+					title: "医院"
+				}, {
+					field: "department",
+					title: "科室"
+				}, {
+					field: "prescribingDoctor",
+					title: "处方医生"
+				}, {
+					field: "attendingDoctor",
+					title: "主管医生"
+				}, {
+					field: "patientName",
+					title: "患者姓名"
+				}, {
+					field: "gender",
+					title: "性别"
+				}, {
+					field: "age",
+					title: "年龄"
+				} ,{
+					field: "patientPhone",
+					title: "患者手机号"
+				}, {
+					field: "storeName",
+					title: "建档门店",
+					visible: false,
+				}, {
+					field: "registrant",
+					title: "登记人"
+				}, {
+					field: "reviewingName",
+					title: "审核药师姓名"
+				}, {
+					field: "prescriptionType",
+					title: "处方类型",
+					formatter: function(value, row, index) {
+						switch (value) {
+							case 1:
+								return "电子处方";
+								break;
+							case 2:
+								return "纸质处方";
+								break;
+							default:
+								return "";
 						}
-					},
-					{
-						field: "orderTime",
-						title: "订单时间"
-					},
-					{
-						field: "prescriptionNumber",
-						title: "处方单号"
-					},
-					{
-						field: "hospital",
-						title: "医院"
-					},
-					{
-						field: "department",
-						title: "科室"
-					},
-					{
-						field: "doctor",
-						title: "医生"
-					},
-					{
-						field: "patientName",
-						title: "患者姓名"
-					},
-					{
-						field: "patientPhone",
-						title: "手机号"
-					},
-					{
-						field: "storeName",
-						title: "门店"
-					},
-					{
-						field: "registrar",
-						title: "登记人"
-					},
-					{
-						field: "completionTime",
-						title: "完成时间"
-					},
-					{
-						field: "lastUpdated",
-						title: "最后更新时间"
-					},
-					{
-						field: "deliveryMethod",
-						title: "配送方式",
-						formatter: function(value, row, index) {
-							switch (value) {
-								case "1":
-									return "门店自取";
-									break;
-								case "2":
-									return "配送";
-									break;
-								default:
-									return "";
-							}
+					}
+				}, {
+					field: "status",
+					title: "状态",
+					formatter: function(value, row, index) {
+						switch (value) {
+							case 1:
+								return "订单已完成";
+								break;
+							case 2:
+								return "待上传处方";
+								break;
+							case 3:
+								return "待确认信息";
+								break;
+							case 4:
+								return "待处方登记";
+								break;
+							case 5:
+								return "待订单销售";
+								break;
+							case 6:
+								return "待绑定患者";
+								break;
+							case 7:
+								return "处方已完成";
+								break;
+							case 8:
+								return "订单已退款";
+								break;
+							default:
+								return "待确认信息";
 						}
-					},
-					// {
-					// 	field: "paymentCode",
-					// 	title: "付款代码"
-					// },
-					// {
-					// 	field: "paymentMethod",
-					// 	title: "付款方式"
-					// },
-					{
-						field: "status",
-						title: "状态",
-						formatter: function(value, row, index) {
-							switch (value) {
-								case 1:
-									return "订单已完成";
-									break;
-								case 2:
-									return "待上传处方";
-									break;
-								case 3:
-									return "待确认信息";
-									break;
-								case 4:
-									return "待处方登记";
-									break;
-								case 5:
-									return "待订单销售";
-									break;
-								case 6:
-									return "待绑定患者";
-									break;
-								case 7:
-									return "处方已完成";
-									break;
-								case 8:
-									return "订单已退款";
-									break;
-								default:
-									return "待确认信息";
-							}
+					}
+				}, {
+					field: "createdTime",
+					title: "创建时间"
+				}, {
+					field: "updatedTime",
+					title: "最后更新时间",
+					visible: false,
+				}, {
+					field: "prescriptionImageUrl",
+					title: "处方图片URL",
+					visible: false,
+				}, {
+					field: "invoiceImageUrl",
+					title: "发票图片URL",
+					visible: false,
+				}, {
+					field: "prescriptionIssueDate",
+					title: "处方开具日期"
+				}, {
+					field: "saleDate",
+					title: "销售日期"
+				}, {
+					field: "registrationDate",
+					title: "处方登记日期"
+				}, {
+					field: "drugVarietyCount",
+					title: "药品品种数",
+					visible: false,
+				}, {
+					field: "drugQuantity",
+					title: "处方取药数量"
+				}, {
+					field: "invoiceCode",
+					title: "发票编码",
+					visible: false,
+				}, {
+					field: "drugsLinkId",
+					title: "处方关联的处方购药药表ID",
+					visible: false,
+				}, {
+					field: "reviewStatus",
+					title: "处方审核状态",
+					formatter: function(value, row, index) {
+						switch (value) {
+							case 1:
+								return "审核通过";
+								break;
+							case 2:
+								return "待审核";
+								break;
+							case 3:
+								return "审核未通过";
+								break;
+							case 4:
+								return "待订单销售";
+								break;
+							default:
+								return "待确认信息";
 						}
-					},
-					{
-						field: "createTime",
-						title: "创建时间"
-					},
-
-		        {
-		            title: '操作',
-		            align: 'center',
-		            formatter: function(value, row, index) {
-		                if (row.id) {
-		                	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-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
-			                return actions.join('');
-		            	} else {
-		                    return "";
-		                }
-		            }
-		        }]
+					}
+					}, {
+					field: "source",
+					title: "处方来源",
+					visible: false,
+				}, {
+					field: "drugRoute",
+					title: "用药途径",
+					visible: false,
+				}, {
+					field: "storeId",
+					title: "建档门店ID",
+					visible: false,
+				}, {
+					field: "remarks",
+					title: "备注",
+					visible: false,
+				}, {
+					title: '操作',
+					align: 'center',
+					width: 165,
+					formatter: function(value, row, index) {
+						if (row.id) {
+							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 ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.view(\'' + row.id + '\')"><i class="fa fa-eye"></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('');
+						} else {
+							return "";
+						}
+					}
+				}]
 		    };
 		    $.table.init(options);
 		}
 
-		function queryDeptTree()
-		{
-			var url = ctx + "dtp/recipe/deptTreeData";
-			var options = {
-		        url: url,
-		        expandLevel: 2,
-		        onClick : zOnClick
-		    };
-			$.tree.init(options);
-
-			function zOnClick(event, treeId, treeNode) {
-				$("#deptId").val(treeNode.id);
-				$("#parentId").val(treeNode.pId);
-				$.table.search();
-			}
-		}
 		/* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
 		function resetPre() {
 			resetDate();
@@ -410,35 +325,6 @@
 			$(".curSelectedNode").removeClass("curSelectedNode");
 			$.table.search();
 		}
-		function budan(){
-			$('#myModal').modal('show');
-		}
-		function saveBudDan(){
-			if ($.validate.form("form-budan-add")) {
-				var data = $("#form-budan-add").serializeArray();
-				var saleOrderNumber= $("#saleOrderNumber").val();
-				console.log("saleOrderNumber="+saleOrderNumber);
-				console.log("data="+data);
-				// $.ajax({
-				// 	cache: true,
-				// 	type: "POST",
-				// 	url: prefix + "/budanSelect",
-				// 	data: data,
-				// 	async: false,
-				// 	error: function (data) {
-				// 		$.modal.alertError(data.msg);
-				// 	},
-				// 	success: function (data) {
-				// 		if(data.code==0){
-				// 			$('#budanshibai').hide();
-				// 		}else{
-				// 			$('#budanshibai').show();
-				// 		}
-				// 	}
-				// });
-			}
-			$('#budanshibai').show();
-		}
 
 	</script>
 </body>

+ 8 - 10
health-admin/src/main/resources/templates/gxhpz/drugconfigList.html

@@ -133,7 +133,6 @@
              </div>
              </form>
             </div>
-            <div class="container-div">
             <div class="btn-group-sm" id="toolbar" role="group">
                 <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:user:add">
                     <i class="fa fa-plus"></i> 新增患者管理品
@@ -149,11 +148,10 @@
 <!--                </a>-->
             </div>
 
-            <div class="col-sm-12 select-table table-bordered" style="width: 100%; overflow-x: auto;">
+            <div class="col-sm-12 select-table table-bordered" style="width: 100%; overflow-x: hidden;">
 <!--                <p class="select-title">按住表格列拖拽</p>-->
                 <table id="bootstrap-table"  class="fixed-layout-table"></table>
             </div>
-            </div>
         </div>
     </div>
 </div>
@@ -232,7 +230,7 @@
                 { field: 'specification', title: '规格', align: 'center' },
                 { field: 'packaging', title: '包装', align: 'center' },
                 { field: 'manufacturerShortName', title: '厂家简称', align: 'center' },
-                { field: 'isFollowUpManaged', title: '是否随访管理品', align: 'center',
+                { field: 'isFollowUpManaged', title: '随访管理品', align: 'center',
                     formatter: function(value, row, index) {
                         switch (value) {
                             case 0:
@@ -245,7 +243,7 @@
                                 return '-';
                         }
                     }},
-                { field: 'isColdChainManaged', title: '是否冷链管理品', align: 'center',
+                { field: 'isColdChainManaged', title: '冷链管理品', align: 'center',
                     formatter: function(value, row, index) {
                         switch (value) {
                             case 0:
@@ -258,7 +256,7 @@
                                 return '-';
                         }
                     } },
-                { field: 'isRegisteredManaged', title: '是否登记管理品', align: 'center',
+                { field: 'isRegisteredManaged', title: '登记管理品', align: 'center',
                     formatter: function(value, row, index) {
                         switch (value) {
                             case 0:
@@ -271,7 +269,7 @@
                                 return '-';
                         }
                     } },
-                { field: 'isCharityAidManaged', title: '是否慈善援助管理品', align: 'center',
+                { field: 'isCharityAidManaged', title: '慈善援助品', align: 'center',
                     formatter: function(value, row, index) {
                         switch (value) {
                             case 0:
@@ -285,12 +283,12 @@
                         }
                     } },
                 { field: 'administrationMethod', title: '给药方式', align: 'center' },
-                { field: 'enterpriseFlowManagement', title: '企业流向管理方式', align: 'center' },
+                { field: 'enterpriseFlowManagement', title: '流向方式', align: 'center' },
                 { field: 'updatedTime', title: '管理品更新日期', align: 'center' },
                 { field: 'createdTime', title: '管理品创建时间', align: 'center' },
                 { field: 'dvcreatedTime', title: 'D值关联时间', align: 'center' },
                 { field: 'dvupdatedTime', title: 'D值更新时间', align: 'center' },
-                { field: 'indicationDescription', title: '说明书适应症', align: 'center' },
+                { field: 'indicationDescription', title: '适应症', align: 'center' },
                 { field: 'dosageAndAdministration', title: '用法用量', align: 'center' },
                 { field: 'manufacturer', title: '厂家', align: 'center' },
                 { field: 'createdBy', title: '创建人', align: 'center' },
@@ -336,7 +334,7 @@
                 {
                     title: '操作',
                     align: 'center',
-                    width: 165,
+                    width: 180,
                     formatter: function(value, row, index) {
                         if (row.id) {
                             var actions = [];

+ 5 - 0
health-common/src/main/java/com/bzd/common/utils/uuid/IdUtils.java

@@ -35,6 +35,11 @@ public class IdUtils
     {
         return UUID.getrandomNumber();
     }
+
+    public static int get10randomNumber()
+    {
+        return UUID.get10randomNumber();
+    }
     /**
      * 获取随机UUID,使用性能更好的ThreadLocalRandom生成UUID
      *

+ 8 - 0
health-common/src/main/java/com/bzd/common/utils/uuid/UUID.java

@@ -497,5 +497,13 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
 
         return randomNumber;
     }
+    public static int get10randomNumber()
+    { // 创建一个SecureRandom对象
+        SecureRandom secureRandom = new SecureRandom();
+
+        // 生成一个5位数的随机数
+        int randomNumber = 1000000000 + secureRandom.nextInt(90000);
 
+        return randomNumber;
+    }
 }

+ 6 - 5
health-system/src/main/java/com/bzd/system/service/DTPService.java

@@ -39,7 +39,7 @@ public class DTPService {
      * @throws Exception
      */
     public List<PageData> findForList(final PageData pd) throws Exception {
-        return (List<PageData>) daoSupport.findForList("DTPMapper.RecipeRegisterList", pd);
+        return (List<PageData>) daoSupport.findForList("DTPCFDJMapper.selectPrescriptionRegistration", pd);
     }
     /**
      * 处方列表
@@ -90,7 +90,7 @@ public class DTPService {
         String prescriptionImg = (String) pd.get("prescriptionImg");
         String prescriptionDate = (String) pd.get("prescriptionDate");
         if (StringUtils.isEmpty(prescriptionNumber.toString())) {
-            pd.put("prescriptionNumber", IdUtils.fastSimpleUUID());//处方表 处方单号 如果没有就自动生成
+            pd.put("prescriptionNumber", IdUtils.get10randomNumber());//处方表 处方单号 如果没有就自动生成
             if( StringUtils.isEmpty(prescriptionImg.toString())){
                 pd.put("status",5);//待上传处方
             }
@@ -104,7 +104,7 @@ public class DTPService {
         }
         String isFlipItemStr = "否"; // 初始化 isFlipItemStr
         boolean isFlipItemFound = false; // 标志变量
-        String Id = IdUtils.fastSimpleUUID();
+        int Id = IdUtils.get10randomNumber();
         List<PageData> addList = new ArrayList<>();
         Object drugList = pd.get("drugList");//获取药品信息列表
 
@@ -178,7 +178,7 @@ public class DTPService {
 
 
         Object drugList = pd.get("drugData");//获取药品信息列表
-        String Id = IdUtils.fastSimpleUUID();//生成处方单号
+        Integer Id = IdUtils.get10randomNumber();//生成处方单号
         List<PageData> addList = new ArrayList<>();
         int resultDrug=0;
         int drugQuantity=0;
@@ -244,7 +244,8 @@ public class DTPService {
 
         }
 
-
+        System.out.println("当前用户信息getUserId:" + getSysUser().getUserId());
+        System.out.println("当前用户信息getDeptId:" + getSysUser().getDeptId());
         // 从表单数据填充
         pd.put("prescriptionNumber", Id); // 处方单表id主键,Id 应该是某个方式生成的唯一标识符
         pd.put("storeId", getSysUser().getDeptId());

+ 184 - 0
health-system/src/main/resources/mapper/gxhpz/dvalueMapper.xml

@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="dvalueMapper">
+
+    <select id="selectDValue" parameterType="pd" resultType="pd">
+        select * from s_gxhpz_dvalue where 1=1
+        <if test="d_value_code != null and d_value_code != ''">
+            and d_value_code = #{d_value_code}
+        </if>
+
+        <if test="dValueName != null and dValueName != ''">
+            and dValueName = #{dValueName}
+        </if>
+
+        <if test="createdBy != null and createdBy != ''">
+            and createdBy = #{createdBy}
+        </if>
+        <if test="createdTime != null">
+            and createdTime = #{createdTime}
+        </if>
+        <if test="updatedBy != null and updatedBy != ''">
+            and updatedBy = #{updatedBy}
+        </if>
+        <if test="updatedTime != null">
+            and updatedTime = #{updatedTime}
+        </if>
+        <if test="status != null and status != ''">
+            and status = #{status}
+        </if>
+        <if test="remarks != null and remarks != ''">
+            and remarks = #{remarks}
+        </if>
+        <if test="id != null and id != ''">
+            and id = #{id}
+        </if>
+    </select>
+    <select id="selectOneById" parameterType="pd" resultType="pd">
+        select * from s_gxhpz_dvalue   where 1=1 and id=#{id}
+    </select>
+    <select id="checkValueByCode" parameterType="pd" resultType="pd">
+        select * from s_gxhpz_dvalue   where d_value_code=#{d_value_code}
+    </select>
+    <select id="selectOne" parameterType="pd" resultType="pd">
+        select *
+        from s_gxhpz_dvalue  v
+
+        where 1=1
+        <if test="query != null and query != ''">
+            AND (v.dValueName LIKE CONCAT('%', #{query}, '%')
+            OR v.d_value_code = #{query})
+        </if>
+        and v.status = 1
+        LIMIT 1
+    </select>
+    <update id="updateDValue" parameterType="pd">
+        update s_gxhpz_dvalue
+        <trim prefix="SET " suffix="" prefixOverrides="," suffixOverrides=",">
+            <if test="d_value_code != null and d_value_code != ''">
+                d_value_code = #{d_value_code},
+            </if>
+
+            <if test="dValueName != null and dValueName != ''">
+                dValueName = #{dValueName},
+            </if>
+
+            <if test="createdBy != null and createdBy != ''">
+                createdBy = #{createdBy},
+            </if>
+            <if test="createdTime != null">
+                createdTime = #{createdTime},
+            </if>
+            <if test="updatedBy != null and updatedBy != ''">
+                updatedBy = #{updatedBy},
+            </if>
+            <if test="updatedTime != null">
+                updatedTime = #{updatedTime},
+            </if>
+            <if test="status != null and status != ''">
+                status = #{status},
+            </if>
+            <if test="remarks != null and remarks != ''">
+                remarks = #{remarks},
+            </if>
+        </trim>
+        <if test="id != null">
+            where id = #{id}
+        </if>
+    </update>
+    <update id="updateDValueByd_value_code" parameterType="pd">
+        update s_gxhpz_dvalue
+        <trim prefix="SET " suffix="" prefixOverrides="," suffixOverrides=",">
+
+            <if test="dValueName != null and dValueName != ''">
+                dValueName = #{dValueName},
+            </if>
+            <if test="updatedBy != null and updatedBy != ''">
+                updatedBy = #{updatedBy},
+            </if>
+            <if test="updatedTime != null">
+                updatedTime = #{updatedTime},
+            </if>
+            <if test="status != null and status != ''">
+                status = #{status},
+            </if>
+        </trim>
+        <if test="d_value_code != null and d_value_code != ''">
+            where d_value_code = #{d_value_code}
+        </if>
+    </update>
+    <delete id="deleteDvalueByIds" parameterType="java.util.List">
+        <if test="list != null and list.size() > 0">
+            delete from s_gxhpz_dvalue
+            where id in
+            <foreach item="id" index="index" collection="list" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+    </delete>
+
+
+    <insert id="insertDValue" parameterType="pd">
+        insert into s_gxhpz_dvalue
+        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
+            <if test="d_value_code != null and d_value_code != ''">
+                d_value_code,
+            </if>
+
+            <if test="dValueName != null and dValueName != ''">
+                dValueName,
+            </if>
+            <if test="createdBy != null and createdBy != ''">
+                createdBy,
+            </if>
+            <if test="createdTime != null">
+                createdTime,
+            </if>
+            <if test="updatedBy != null and updatedBy != ''">
+                updatedBy,
+            </if>
+            <if test="updatedTime != null">
+                updatedTime,
+            </if>
+            <if test="status != null and status !=''">
+                status,
+            </if>
+            <if test="remarks != null and remarks != ''">
+                remarks,
+            </if>
+        </trim>
+        <trim prefix="VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
+            <if test="d_value_code != null and d_value_code != ''">
+                #{d_value_code},
+            </if>
+
+            <if test="dValueName != null and dValueName != ''">
+                #{dValueName},
+            </if>
+            <if test="createdBy != null and createdBy != ''">
+                #{createdBy},
+            </if>
+            <if test="createdTime != null">
+                #{createdTime},
+            </if>
+            <if test="updatedBy != null and updatedBy != ''">
+                #{updatedBy},
+            </if>
+            <if test="updatedTime != null">
+                #{updatedTime},
+            </if>
+            <if test="status != null and status !=''">
+                #{status},
+            </if>
+            <if test="remarks != null and remarks != ''">
+                #{remarks},
+            </if>
+        </trim>
+    </insert>
+
+    <update id="changeStatus" parameterType="pd">
+        update s_gxhpz_dvalue set  status = #{status}, updatedBy = #{updatedBy},updatedTime = #{updatedTime} where   id = #{id}
+    </update>
+</mapper>

+ 154 - 0
health-system/src/main/resources/mapper/gxhpz/reviewPharmacistsMapper.xml

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="reviewPharmacistsMapper">
+
+    <!-- 查询所有审核药师 -->
+    <select id="selectAllReviewPharmacists" parameterType="map" resultType="map">
+        SELECT * FROM s_dtp_review_pharmacists WHERE 1=1
+        <if test="pharmacistName != null and pharmacistName != ''">
+            AND pharmacistName = #{pharmacistName}
+        </if>
+        <if test="position != null and position != ''">
+            AND position = #{position}
+        </if>
+        <if test="storeName != null and storeName != ''">
+            AND storeName = #{storeName}
+        </if>
+        <if test="storeId != null and storeId != ''">
+            AND storeId = #{storeId}
+        </if>
+        <if test="createdTime != null">
+            AND createdTime = #{createdTime}
+        </if>
+        <if test="updatedTime != null">
+            AND updatedTime = #{updatedTime}
+        </if>
+    </select>
+
+    <!-- 根据 ID 查询单个审核药师 -->
+    <select id="selectReviewPharmacistById" parameterType="long" resultType="map">
+        SELECT * FROM s_dtp_review_pharmacists WHERE id = #{id}
+    </select>
+
+    <!-- 检查是否存在特定药师 -->
+    <select id="checkPharmacistByNameAndStore" parameterType="map" resultType="map">
+        SELECT * FROM s_dtp_review_pharmacists WHERE pharmacistName = #{pharmacistName} AND storeId = #{storeId}
+    </select>
+
+    <!-- 更新审核药师信息 -->
+    <update id="updateReviewPharmacist" parameterType="map">
+        UPDATE s_dtp_review_pharmacists
+        <trim prefix="SET " suffix="" prefixOverrides="," suffixOverrides=",">
+            <if test="pharmacistName != null and pharmacistName != ''">
+                pharmacistName = #{pharmacistName},
+            </if>
+            <if test="position != null and position != ''">
+                position = #{position},
+            </if>
+            <if test="storeName != null and storeName != ''">
+                storeName = #{storeName},
+            </if>
+            <if test="storeId != null and storeId != ''">
+                storeId = #{storeId},
+            </if>
+            <if test="reviewPassword != null and reviewPassword != ''">
+                reviewPassword = #{reviewPassword},
+            </if>
+            <if test="updatedTime != null">
+                updatedTime = #{updatedTime},
+            </if>
+        </trim>
+        <if test="id != null">
+            WHERE id = #{id}
+        </if>
+    </update>
+
+    <!-- 根据 d_value_code 更新审核药师信息 -->
+    <update id="updateReviewPharmacistByStoreId" parameterType="map">
+        UPDATE s_dtp_review_pharmacists
+        <trim prefix="SET " suffix="" prefixOverrides="," suffixOverrides=",">
+            <if test="pharmacistName != null and pharmacistName != ''">
+                pharmacistName = #{pharmacistName},
+            </if>
+            <if test="position != null and position != ''">
+                position = #{position},
+            </if>
+            <if test="storeName != null and storeName != ''">
+                storeName = #{storeName},
+            </if>
+            <if test="reviewPassword != null and reviewPassword != ''">
+                reviewPassword = #{reviewPassword},
+            </if>
+            <if test="updatedTime != null">
+                updatedTime = #{updatedTime},
+            </if>
+        </trim>
+        <if test="storeId != null and storeId != ''">
+            WHERE storeId = #{storeId}
+        </if>
+    </update>
+
+    <!-- 删除审核药师(按ID列表) -->
+    <delete id="deleteReviewPharmacistsByIds" parameterType="java.util.List">
+        <if test="list != null and list.size() > 0">
+            DELETE FROM s_dtp_review_pharmacists
+            WHERE id IN
+            <foreach item="id" index="index" collection="list" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+    </delete>
+
+    <!-- 插入新的审核药师 -->
+    <insert id="insertReviewPharmacist" parameterType="map">
+        INSERT INTO s_dtp_review_pharmacists
+        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
+            <if test="pharmacistName != null and pharmacistName != ''">
+                pharmacistName,
+            </if>
+            <if test="position != null and position != ''">
+                position,
+            </if>
+            <if test="storeName != null and storeName != ''">
+                storeName,
+            </if>
+            <if test="storeId != null and storeId != ''">
+                storeId,
+            </if>
+            <if test="reviewPassword != null and reviewPassword != ''">
+                reviewPassword,
+            </if>
+            <if test="createdTime != null">
+                createdTime,
+            </if>
+        </trim>
+        VALUES
+        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
+            <if test="pharmacistName != null and pharmacistName != ''">
+                #{pharmacistName},
+            </if>
+            <if test="position != null and position != ''">
+                #{position},
+            </if>
+            <if test="storeName != null and storeName != ''">
+                #{storeName},
+            </if>
+            <if test="storeId != null and storeId != ''">
+                #{storeId},
+            </if>
+            <if test="reviewPassword != null and reviewPassword != ''">
+                #{reviewPassword},
+            </if>
+            <if test="createdTime != null">
+                #{createdTime},
+            </if>
+        </trim>
+    </insert>
+
+    <!-- 修改审核药师密码 -->
+    <update id="changeStatus" parameterType="map">
+        UPDATE s_dtp_review_pharmacists SET updatedTime = #{updatedTime}, reviewPassword = #{reviewPassword} WHERE id = #{id}
+    </update>
+</mapper>

+ 21 - 3
health-system/src/main/resources/mapper/mdyy/DTPCFDJMapper.xml

@@ -82,13 +82,13 @@
         <if test="drugsLinkId != null">
             and drugsLinkId = #{drugsLinkId}
         </if>
-        <if test="status != null">
+        <if test="status != null and status != ''">
             and status = #{status}
         </if>
-        <if test="reviewStatus != null">
+        <if test="reviewStatus != null ">
             and reviewStatus = #{reviewStatus}
         </if>
-        <if test="prescriptionType != null">
+        <if test="prescriptionType != null and prescriptionType != ''">
             and prescriptionType = #{prescriptionType}
         </if>
         <if test="source != null and source != ''">
@@ -118,6 +118,24 @@
         <if test="remarks != null and remarks != ''">
             and remarks = #{remarks}
         </if>
+        <if test="id != null and id != ''">
+            and id = #{id}
+        </if>
+        <if test="id != null and id != ''">
+            and id = #{id}
+        </if>
+        <if test="createTime !=null and createTime !='' ">
+            and createTime = #{createTime}
+        </if>
+        <if test="query != null and query!=''">
+            AND patientName LIKE CONCAT('%', #{query}, '%') or patientPhone = #{query}
+        </if>
+
+        <if test="beginTime != null and beginTime!='' and endTime != null and endTime!=''">
+            and registrationDate between #{beginTime} and #{endTime}
+        </if>
+
+
     </select>
 
     <!-- 根据patientId查询单条记录 -->