Browse Source

新增随访表单全量表单,任务跟进人维护

bzd_wsp 1 month ago
parent
commit
905c806de4

+ 4 - 0
health-admin/src/main/java/com/bzd/web/controller/dtp/PharmaceuticalServiceController.java

@@ -78,6 +78,10 @@ public class PharmaceuticalServiceController extends BaseController {
     public TableDataInfo archivesList() throws Exception {
         PageData pd = this.getPageData();
         startPage();
+          String storeId = (String) pd.get("storeId");
+          if(StringUtils.isNull(storeId)){
+              pd.put("storeId",getSysUser().getDeptId());
+          }
         List<PageData> pageData = pharmaceuticalService.findArchivesList(pd);
         return getDataTable(pageData);
     }

+ 82 - 0
health-admin/src/main/java/com/bzd/web/controller/dtp/RecipeRegisterController.java

@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.List;
 
 import static com.bzd.common.config.datasource.DynamicDataSourceContextHolder.log;
+import static com.bzd.common.utils.ShiroUtils.getSysUser;
 
 /**
  * 处方登记管理
@@ -33,6 +34,7 @@ import static com.bzd.common.config.datasource.DynamicDataSourceContextHolder.lo
 public class RecipeRegisterController extends BaseController {
 
     private String prefix = "dtp/recipe";
+    private String prefix_fl = "dtp/followUpAssign";
     private String prefix_archives = "dtp/archives";
 
     @Autowired
@@ -474,9 +476,89 @@ public class RecipeRegisterController extends BaseController {
     public AjaxResult findRevieForList( ModelMap mmap) throws Exception {
         PageData pd = this.getPageData();
         startPage();
+        pd.put("storeId", getSysUser().getDeptId());
+        pd.put("status", 1);
+        pd.put("position", "审核药师");
         List<PageData> pageData =dtpService.findRevieForList(pd);
         return  AjaxResult.success(pageData);
     }
+    /**
+     * 获取随访跟进人信息
+     * @param mmap
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/getFollowUpInformation")
+    @ResponseBody
+    public TableDataInfo getFollowUpInformation( ModelMap mmap) throws Exception {
+        PageData pd = this.getPageData();
+        startPage();
+        pd.put("storeId", getSysUser().getDeptId());
+        pd.put("status", 1);
+        pd.put("position", "任务跟进人");
+        List<PageData> pageData =dtpService.findRevieForList(pd);
+        return  getDataTable(pageData);
+    }
+    /**
+     * 获取随访跟进人信息页面
+     * @param mmap
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("dtp:recipe:view")
+    @GetMapping("/getFollowUpInformationPage")
+    public String getFollowUpInformationPage(ModelMap mmap)
+    {
+        mmap.put("posts", 1);
+        return prefix_fl + "/followUpInformationPage";
+    }
+    //修改随访跟进人信息
+    @PostMapping("/updateFollowUp")
+    @ResponseBody
+    public AjaxResult updateFollowUp( ModelMap mmap) throws Exception {
+        PageData pd = this.getPageData();
+        startPage();
+
+       String storeId =  (String) pd.get("storeId");
+       String follow_up_assign_id =  (String) pd.get("follow_up_assign_id");
+        if(StringUtils.isNull(follow_up_assign_id)){
+            return  AjaxResult.warn("随访跟进人ID不能为空");
+        }
+        if(StringUtils.isNull(storeId)){
+            pd.put("storeId", getSysUser().getDeptId());
+        }
+        String patientId =  (String) pd.get("patientId");
+        if(StringUtils.isNotEmpty(patientId)){
+            pd.put("id", patientId);
+        }else {
+            return  AjaxResult.warn("患者ID不能为空");
+        }
+
+        int  ret=dtpService.updateFollowUp(pd);
+        if(ret>0){
+            return  AjaxResult.success("更新成功");
+        }else{
+            return  AjaxResult.warn("更新失败");
+
+        }
+    }
+    //更新随访跟进人信息
+    @PostMapping("/updatePharmacistsByStoreId")
+    @ResponseBody
+    public AjaxResult updatePharmacistsByStoreId( ModelMap mmap) throws Exception {
+        PageData pd = this.getPageData();
+        startPage();
+        String lzid =  (String) pd.get("lzid");
+        String id =  (String) pd.get("id");
+        if(StringUtils.isEmpty(id)){
+            return  AjaxResult.warn("店员id不能为空");
+        }
+        if(StringUtils.isEmpty(lzid)){
+            return  AjaxResult.warn("离职人员ID不能为空");
+        }
+        int  ret=dtpService.updatePharmacistsByStoreId(pd);
+        return  AjaxResult.success(ret);
+    }
 
 
     /**

+ 4 - 2
health-admin/src/main/java/com/bzd/web/controller/gxhpz/PharmacistsController.java

@@ -132,10 +132,12 @@ public class PharmacistsController extends BaseController {
     {
         PageData pd = this.getPageData();
         Integer update = pharmacistsService.update(pd);
-        if(update!=1){
+        if(update>0){
+            return toAjax(update);
+        }else{
             return error("修改失败");
         }
-        return toAjax(update);
+
     }
 
 }

File diff suppressed because it is too large
+ 1220 - 962
health-admin/src/main/resources/templates/dtp/followUp/followUpEditAll.html


+ 315 - 115
health-admin/src/main/resources/templates/dtp/followUpAssign/followUpAssignList.html

@@ -107,7 +107,10 @@
 		var editFlag = [[${@permission.hasPermi('dtp:pmService:edit')}]];
 		var removeFlag = [[${@permission.hasPermi('dtp:pmService:remove')}]];
 		var prefix = ctx + "dtp/pmService";
+		var prefix_recipe = ctx + "dtp/recipe";
 		var patientId='';
+		var lzid;
+		var follow_params;
 		$(function() {
 		    var panehHidden = false;
 		    if ($(this).width() < 1590) {
@@ -144,9 +147,9 @@
 				showFooter:true,  //是否显示表格底部区域。
 				clickToSelect: true, //是否启用点击行时选中整行的功能。
 				singleSelect: false, //是否仅允许选择一行
-            fixedColumns: true,
-            //fixedNumber: 3,
-            fixedRightNumber: 1,
+				fixedColumns: true,
+				//fixedNumber: 3,
+				fixedRightNumber: 1,
 		        columns: [{
 		            checkbox: true
 		        },
@@ -305,37 +308,36 @@
     		}
 		}
 		function dlFormatter(value, row, index) {
-			if (!value || !Array.isArray(value)) {
-				return ''; // 如果值为空或不是数组,返回空字符串
+			if (!value || typeof value !== 'string') {
+				return ''; // 如果值为空或不是字符串,返回空字符串
+			}
+
+			try {
+				// 尝试将字符串解析为数组
+				var parsedValue = JSON.parse(value);
+
+				if (!Array.isArray(parsedValue) || parsedValue.length === 0) {
+					return ''; // 如果解析结果不是数组或数组为空,返回空字符串
+				}
+
+				// 提取 name 属性并连接成逗号分隔的字符串
+				var names = parsedValue.map(function(item) {
+					return item.name || ''; // 如果某个对象没有 name 属性,使用空字符串代替
+				}).filter(Boolean); // 过滤掉空字符串
+
+				return names.join(', ');
+			} catch (error) {
+				console.error('Failed to parse JSON string:', error);
+				return ''; // 如果解析失败,返回空字符串
 			}
-			return value.map(item => item.name).join(', ');
 		}
 		/*员工离职交接初始化*/
 		function initForLZYGJJTab() {
-			var datas=[];
 			var tableId = 'bootstrap-table-5';
-			var tableElement = $('#' + tableId);
-			var data = $("#followUpAssign-form").serializeArray();
-			data.push({name: 'flag', value: '5'});
-			$.ajax({
-				cache : true,
-				type : "POST",
+			var options = {
+				id: tableId,
 				url: prefix + "/followUpAssignList",
-				data : data,
-				async : false,
-				error : function(request) {
-					$.modal.alertError("系统错误");
-				},
-				success : function(data) {
-					datas=data.rows;
-					$.operate.successCallback(data);
-				}
-			});
-			tableElement.bootstrapTable({
-				// 配置表格的相关属性
-				// 例如数据源、列定义等
-				// 示例配置
-				modalName: "员工离职交接",
+				method: 'POST',
 				fitColumns: true,
 				striped: true,
 				autoRowHeight: true,
@@ -346,121 +348,118 @@
 				fixedColumns: true,
 				//fixedNumber: 3,
 				fixedRightNumber: 1,
-				data: datas,
+				pagination: true,
+				pageSize: 10,
+				pageNumber: 1,
+				pageList: [10, 15, 25, 50, 100],
+				sidePagination: 'server',
+				queryParams: function(params) {
+					return {
+						limit: params.limit,
+						offset: params.offset,
+						pageNum: Math.floor(params.offset / params.limit) + 1,
+						pageSize: params.limit,
+						flag: 5,
+						...$.common.formToJSON($("#followUpAssign-form").attr('id'))
+					};
+				},
 				columns: [
-					{ field: 'pharmacistName', title: '离职员工', align: 'center' },
-					{ field: 'phone', title: '手机号', align: 'center'},
-					{ field: 'storeName', title: '门店', align: 'center'},
-					{
-						title: '操作',
-						align: 'center',
-						width: 150,
-						formatter: function(value, row, index) {
-							if (row.id) {
-								var actions = [];
-								actions.push('<a class="tn-xs ' + editFlag + '" href="javascript:void(0)" onclick="selectUsersToParentCallBack2(\'' + row.id + '\')">一键分配</a> ');
-								return actions.join('');
-							} else {
-								return "";
-							}
+				{ field: 'pharmacistName', title: '离职员工', align: 'center' },
+				{ field: 'phone', title: '手机号', align: 'center'},
+				{ field: 'storeName', title: '门店', align: 'center'},
+				{
+					title: '操作',
+					align: 'center',
+					width: 150,
+					formatter: function(value, row, index) {
+						if (row.id) {
+							var actions = [];
+							actions.push('<a class="tn-xs ' + editFlag + '" href="javascript:void(0)" onclick="selectUsersToParentCallBack3(\'' + row.id + '\')">一键分配</a> ');
+							return actions.join('');
+						} else {
+							return "";
 						}
-					}]
+					}
+				}],
+				onLoadSuccess: function(data) {
+					console.log("数据加载成功", data);
+				},
+				onLoadError: function(status) {
+					$.modal.alertError("系统错误");
+				}
+			};
 
-			});
+			$.table.init(options);
 
 		}
 		function initializeTableForTab(tabId) {
-			var datas=[];
-			debugger
 			var tableId = 'bootstrap-table-' + tabId.substring(4);
 			var tableElement = $('#' + tableId);
+
 			var data = $("#followUpAssign-form").serializeArray();
 			data.push({name: 'flag', value: tabId.substring(4)});
-			console.log("tableId="+tabId.substring(4));
-			$.ajax({
-				cache : true,
-				type : "POST",
+
+			var options = {
+				id: tableId,
 				url: prefix + "/followUpAssignList",
-				data : data,
-				async : false,
-				error : function(request) {
-					$.modal.alertError("系统错误");
-				},
-				success : function(data) {
-					datas=data.rows;
-					$.operate.successCallback(data);
-				}
-			});
-			tableElement.bootstrapTable({
-				// 配置表格的相关属性
-				// 例如数据源、列定义等
-				// 示例配置
-				modalName: "随访跟进人分配",
-				fitColumns: true,
-				striped: true,
-				autoRowHeight: true,
-				rowNumbers: true,
-				showFooter:true,  //是否显示表格底部区域。
-				clickToSelect: true, //是否启用点击行时选中整行的功能。
-				singleSelect: false, //是否仅允许选择一行
-				fixedColumns: true,
-				//fixedNumber: 3,
-				fixedRightNumber: 1,
-				data: datas,
-				columns: [{
-					checkbox: true
+				method: 'POST',
+				pagination: true,
+				pageSize: 10,
+				pageNumber: 1,
+				pageList: [10, 15, 25, 50, 100],
+				sidePagination: 'server',
+				queryParams: function(params) {
+					return {
+						limit: params.limit,
+						offset: params.offset,
+						pageNum: Math.floor(params.offset / params.limit) + 1,
+						pageSize: params.limit,
+						flag: tabId.substring(4),
+						...$.common.formToJSON($("#followUpAssign-form").attr('id'))
+					};
 				},
+				columns: [
+					{ checkbox: true },
 					{ field: 'name', title: '患者姓名', align: 'center' },
-					{field: 'gender', title: '性别', align: 'center',
+					{ field: 'gender', title: '性别', align: 'center', width: 60,
 						formatter: function(value, row, index) {
 							switch (value) {
 								case 0:
 									return "男";
-									break;
 								case 1:
 									return "女";
-									break;
 								default:
 									return "-";
 							}
-						}},
-					{ field: 'age', title: '年龄', align: 'center',width: 30, },
-					{ field: 'dl', title: '疾病', align: 'center',formatter: dlFormatter },
+						}
+					},
+					{ field: 'age', title: '年龄', align: 'center', width: 60 },
+					{ field: 'dl', title: '疾病', align: 'center', formatter: dlFormatter },
 					{ field: 'disease', title: '临床诊断', align: 'center' },
 					{ field: 'productName', title: '药品名称', align: 'center' },
-					{ field: 'status', title: '跟进人状态', align: 'center',
+					{ field: 'status', title: '跟进人状态', align: 'center', width: 80,
 						formatter: function(value, row, index) {
 							switch (value) {
-									//0离职,1在职,2请假
 								case 0:
 									return "离职";
-									break;
 								case 1:
 									return "在职";
-									break;
 								case 2:
 									return "请假";
-									break;
 								default:
 									return "-";
 							}
-						} },
-					{ field: 'follow_up_assign', title: '随访跟进人', align: 'center',
+						}
+					},
+					{ field: 'follow_up_assign', title: '随访跟进人', align: 'center', width: 80,
 						formatter: function(value, row, index) {
-							switch (value) {
-								case "":
-									return "未分配";
-									break;
-								case undefined:
-									return "未分配";
-									break;
-								case " ":
-									return "未分配";
-									break;
-								default:
-									return value;
+							if (!value || value === "" || value === " ") {
+								return "未分配";
+							} else {
+								return value;
 							}
-						}  },
+						}
+					},
 					{ field: 'updateTime', title: '最后一次购药', align: 'center' },
 					{ field: 'createTime', title: '建档日期', align: 'center' },
 					{
@@ -470,16 +469,150 @@
 						formatter: function(value, row, index) {
 							if (row.id) {
 								var actions = [];
-								actions.push('<a class="btn-xs' + editFlag + '" href="javascript:void(0)" onclick="selectUsersToParentCallBack2(\'' + row.id + '\')">修改跟进人</a> ');
-								actions.push('<a class="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-xs" href="javascript:void(0)" onclick="selectUsersToParentCallBack2(\'' + row.id + '\')">修改跟进人</a> ');
+								actions.push('<a class="btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
 								return actions.join('');
 							} else {
 								return "";
 							}
 						}
-					}]
+					}
+				],
+				onLoadSuccess: function(data) {
+					console.log("数据加载成功", data);
+				},
+				onLoadError: function(status) {
+					$.modal.alertError("系统错误");
+				}
+			};
 
-			});
+			$.table.init(options);
+			// debugger;
+			// var datas=[];
+			// debugger
+			// var tableId = 'bootstrap-table-' + tabId.substring(4);
+			// var tableElement = $('#' + tableId);
+			// var data = $("#followUpAssign-form").serializeArray();
+			// data.push({name: 'flag', value: tabId.substring(4)});
+			// console.log("tableId="+tabId.substring(4));
+			// $.ajax({
+			// 	cache : true,
+			// 	type : "POST",
+			// 	url: prefix + "/followUpAssignList",
+			// 	data : data,
+			// 	async : false,
+			// 	error : function(request) {
+			// 		$.modal.alertError("系统错误");
+			// 	},
+			// 	success : function(data) {
+			// 		datas=data.rows;
+			// 		$.operate.successCallback(data);
+			// 	}
+			// });
+			// var options = {
+			// 	// 配置表格的相关属性
+			// 	// 例如数据源、列定义等
+			// 	// 示例配置
+			// 	modalName: "随访跟进人分配",
+			// 			fitColumns: true,
+			// 		striped: true,
+			// 		autoRowHeight: true,
+			// 		rowNumbers: true,
+			// 		showFooter:true,  //是否显示表格底部区域。
+			// 		clickToSelect: true, //是否启用点击行时选中整行的功能。
+			// 		singleSelect: false, //是否仅允许选择一行
+			// 		fixedColumns: true,
+			// 		//fixedNumber: 3,
+			// 		fixedRightNumber: 1,
+			// 		pagination: true, // 启用分页
+			// 		pageSize: 10, // 每页显示的条目数
+			// 		pageNumber: 1, // 当前页码
+			// 		pageList: [10, 25, 50, 100], // 可供选择的每页条目数
+			// 		sidePagination: 'server', // 使用服务器端分页
+			// 	     queryParams: function(params) {
+			// 			return {
+			// 				limit: params.limit, // 每页显示的条目数
+			// 				offset: params.offset, // 当前页的偏移量
+			// 				pageNumber: params.pageNumber, // 当前页码
+			// 				pageSize: params.pageSize, // 每页显示的条目数
+			// 				flag: tabId.substring(4)
+			// 			};
+			// 		},
+			// 		data: datas,
+			// 		columns: [{
+			// 	checkbox: true
+			// },
+			// 	{ field: 'name', title: '患者姓名', align: 'center' },
+			// 	{field: 'gender', title: '性别', align: 'center',width: 60,
+			// 		formatter: function(value, row, index) {
+			// 			switch (value) {
+			// 				case 0:
+			// 					return "男";
+			// 					break;
+			// 				case 1:
+			// 					return "女";
+			// 					break;
+			// 				default:
+			// 					return "-";
+			// 			}
+			// 		}},
+			// 	{ field: 'age', title: '年龄', align: 'center',width: 60, },
+			// 	{ field: 'dl', title: '疾病', align: 'center',formatter: dlFormatter },
+			// 	{ field: 'disease', title: '临床诊断', align: 'center' },
+			// 	{ field: 'productName', title: '药品名称', align: 'center' },
+			// 	{ field: 'status', title: '跟进人状态', align: 'center',width: 80,
+			// 		formatter: function(value, row, index) {
+			// 			switch (value) {
+			// 					//0离职,1在职,2请假
+			// 				case 0:
+			// 					return "离职";
+			// 					break;
+			// 				case 1:
+			// 					return "在职";
+			// 					break;
+			// 				case 2:
+			// 					return "请假";
+			// 					break;
+			// 				default:
+			// 					return "-";
+			// 			}
+			// 		} },
+			// 	{ field: 'follow_up_assign', title: '随访跟进人', align: 'center',width: 80,
+			// 		formatter: function(value, row, index) {
+			// 			switch (value) {
+			// 				case "":
+			// 					return "未分配";
+			// 					break;
+			// 				case undefined:
+			// 					return "未分配";
+			// 					break;
+			// 				case " ":
+			// 					return "未分配";
+			// 					break;
+			// 				default:
+			// 					return value;
+			// 			}
+			// 		}  },
+			// 	{ field: 'updateTime', title: '最后一次购药', align: 'center' },
+			// 	{ field: 'createTime', title: '建档日期', align: 'center' },
+			// 	{
+			// 		title: '操作',
+			// 		align: 'center',
+			// 		width: 150,
+			// 		formatter: function(value, row, index) {
+			// 			if (row.id) {
+			// 				var actions = [];
+			// 				actions.push('<a class="btn-xs' + editFlag + '" href="javascript:void(0)" onclick="selectUsersToParentCallBack2(\'' + row.id + '\')">修改跟进人</a> ');
+			// 				actions.push('<a class="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 "";
+			// 			}
+			// 		}
+			// 	}]
+			//
+			// }
+			// tableElement.bootstrapTable(options);
 		}
 		function selectUsersToParentCallBack2(rowid){
 			console.log("rowid=="+rowid)
@@ -488,7 +621,7 @@
 			//l: prefix + "/updateFollowUpPerson?id="+rowid,
 			var options = {
 				title: '修改随访跟进人',
-				url: prefix_s + "/drugInfo",
+				url: prefix_s + "/getFollowUpInformationPage",//获取随访跟进人信息
 				callBack: doSubmit2
 			};
 			$.modal.openOptions(options);
@@ -501,17 +634,84 @@
 				$.modal.alertWarning("请至少选择一条记录");
 				return;
 			}
+			var formData = new FormData();
 			rows.forEach(function(item, index) {
-				var id =item.productId;
-				var name = item.productName;
+				formData.append("follow_up_assign", item.pharmacistName);
+				formData.append("follow_up_assign_id", item.id);
+				formData.append("patientId", patientId);
+				formData.append("storeId", item.storeId);
+				formData.append("position", item.position);
+				formData.append("phone", item.phone);
 
+			});
+			$.ajax({
+				url: prefix_recipe + "/updateFollowUp",
+				data: formData,
+				method: 'POST',
+				processData: false, // 防止 jQuery 自动转换数据
+				contentType: false, // 不设置内容类型
+				success: function(data) {
+					$.modal.alertSuccess("修改成功");
+					// 做修改操作 修改跟进人
+					$.modal.close(index);
+					window.location.reload();
 
+				},
+				error: function(xhr, status, error) {
+					$.modal.alertError("修改失败");
+				}
 			});
-			// 做修改操作 修改跟进人
-			$.modal.close(index);
+
 		}
+		//更新默认跟进人
+		function selectUsersToParentCallBack3(rowid){
+			console.log("storeId=="+rowid)
+			lzid=rowid;
+			var prefix_s = ctx + "dtp/recipe";
+			var options = {
+				title: '修改随访跟进人',
+				url: prefix_s + "/getFollowUpInformationPage",//获取随访跟进人信息
+				callBack: doSubmit3
+			};
+			$.modal.openOptions(options);
+		}
+		//更新默认跟进人
+		function doSubmit3(index, layero){
+			console.log("id=="+index)
+			var rows = layero.find("iframe")[0].contentWindow.selectColumns2();
+			if (rows.length == 0) {
+				$.modal.alertWarning("请至少选择一条记录");
+				return;
+			}
+			var formData = new FormData();
+			rows.forEach(function(item, index) {
+				//formData.append("pharmacistName", item.pharmacistName);
+				formData.append("id", item.id);//新
+				formData.append("lzid", lzid);//旧
+				//formData.append("position", item.position);
+				//formData.append("phone", item.phone);
+				//formData.append("status", item.status);
+				//formData.append("default_follow_up", item.default_follow_up);
+			});
+			$.ajax({
+				url: prefix_recipe + "/updatePharmacistsByStoreId",
+				data: formData,
+				method: 'POST',
+				processData: false, // 防止 jQuery 自动转换数据
+				contentType: false, // 不设置内容类型
+				success: function(data) {
+					$.modal.alertSuccess("修改成功");
+					// 做修改操作 修改跟进人
+					$.modal.close(index);
+					window.location.reload();
 
+				},
+				error: function(xhr, status, error) {
+					$.modal.alertError("修改失败");
+				}
+			});
 
+		}
 	</script>
 <style>
 	.lizhi {

+ 148 - 0
health-admin/src/main/resources/templates/dtp/followUpAssign/followUpInformationPage.html

@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+	<meta charset="UTF-8">
+	<th:block th:include="include :: header('任务跟进人')" />
+	<th:block th:include="include :: layout-latest-css" />
+	<th:block th:include="include :: ztree-css" />
+</head>
+
+<body><div class="main-content">
+
+
+				<div class="row">
+					<div class="col-sm-12 search-collapse">
+						<div class="query-condition-container">
+							<h4 class="query-condition-title">查询条件</h4>
+							<div class="query-buttons">
+								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+								<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+							</div>
+						</div>
+						<form id="tag-form" class="customize-search-form">
+							<div class="customize-form-group-container">
+								<div class="customize-form-group">
+									<label>搜索名称:</label>
+									<input type="text" class="styled-input" placeholder="请输入店员姓名或者手机号" name="query" style="width: 350px;"/>
+								</div>
+							</div>
+						</form>
+					</div>
+
+				</div>
+				<div class="row">
+					<div class="col-sm-12 select-table table-striped">
+						<table id="bootstrap-table"></table>
+					</div>
+				</div>
+</div>
+
+<th:block th:include="include :: footer" />
+<script th:inline="javascript">
+	var prefix = ctx + "dtp/recipe";
+	$(function() {
+		var panehHidden = false;
+		if ($(this).width() < 1590) {
+			panehHidden = true;
+		}
+		queryUserList();
+	});
+	function queryUserList() {
+		var options = {
+			url: prefix + "/getFollowUpInformation",
+			sortOrder: "desc",
+			modalName: "任务跟进人",
+			showFooter:true,  //是否显示表格底部区域。
+			clickToSelect: true, //是否启用点击行时选中整行的功能。
+			singleSelect: true, //是否仅允许选择一行
+			fixedColumns: true,
+			//fixedNumber: 3,
+			//fixedRightNumber: 1,
+			columns: [{
+				checkbox: true
+			},
+				{
+					field: 'id',
+					title: 'id',
+					//hidden:false
+					visible: false,
+				},
+				{
+					field: 'pharmacistName',
+					title: '姓名'
+				},{
+					field: 'position',
+					title: '角色'
+				},{
+					field: 'phone',
+					title: '手机号'
+				},{
+					field: 'status',
+					title: '状态',
+					visible: false,
+				},{
+					field: 'default_follow_up',
+					title: '是否是该门店的默认跟进人',
+					visible: false,
+				},{
+					field: 'storeId',
+					title: '门店ID'
+				}]
+		};
+		$.table.init(options);
+	}
+
+	/* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
+	function resetPre() {
+		resetDate();
+		$("#tag-form")[0].reset();
+		$("#deptId").val("");
+		$("#parentId").val("");
+		$(".curSelectedNode").removeClass("curSelectedNode");
+		$.table.search();
+	}
+	/* 添加用户-选择用户-提交(子页面调用父页面形式) */
+	function submitHandler(index, layero) {
+		debugger
+		var rows = $.table.selectFirstColumns();
+
+		if (rows.length == 0) {
+			$.modal.alertWarning("请至少选择一条记录");
+			return;
+		}
+		$.modal.close();
+		// 父页面的方法
+		// activeWindow().selectUsers();
+		// 父页面的变量
+		activeWindow().$('#userids').html('我是通过方式一来的:' + rows.join());
+	}
+
+	/* 添加用户-选择用户-提交(回调形式-父页面调用子页面) */
+	function getSelections() {
+		return $.table.selectFirstColumns();
+	}
+
+	function selectTableObject() {
+		var pharmacistName = $.table.selectColumns('pharmacistName');
+		var position = $.table.selectColumns('position');
+		var phone = $.table.selectColumns('phone');
+		var status = $.table.selectColumns('status');
+		var default_follow_up = $.table.selectColumns('default_follow_up');
+		var storeId = $.table.selectColumns('storeId');
+		var id = $.table.selectColumns('id');
+		var column= [{pharmacistName:pharmacistName,position:position,phone:phone,status:status,default_follow_up:default_follow_up,storeId:storeId,id:id}];
+		return column;
+	}
+	/*回调返回所有的选中行数据*/
+	function selectColumns2() {
+		return $.table.selectColumns2();
+	}
+	$("#bootstrap-table").on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rowsAfter, rowsBefore) {
+		var rows = $.common.equals("uncheck-all", e.type) ? rowsBefore : rowsAfter;
+		var rowIds = $.table.affectedRowIds(rows);
+		$("#rowIds").val(rowIds);
+	});
+</script>
+</body>
+
+</html>

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

@@ -1251,7 +1251,7 @@ function initTab(datas){
     // 异步加载所有药师信息并填充下拉框
     function loadPharmacists() {
         $.ajax({
-            url: prefix_recipe+ "/findRevieForList", // 假设这是获取所有药师的API端点
+            url: prefix_recipe+ "/findRevieForList", // 这是获取所有药师的API端点
             type: 'POST',
             cache: false, // 设置为 false 防止缓存
             processData: false, // 告诉 jQuery 不要处理数据(非常重要)

+ 10 - 2
health-admin/src/main/resources/templates/gxhpz/pharmacistsEdit.html

@@ -28,20 +28,27 @@
                         <label>角色:</label>
                         <select name="position" id="position" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_yppz_roles')}" required>
                             <option value="">请选择</option>
-                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${position==dict.dictValue}"></option>
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${position}==${dict.dictValue}"></option>
                         </select>
                     </div>
                     <div class="customize-form-group" id="default_follow_upId" >
                         <label>是否默认为任务跟进人:</label>
                         <select name="default_follow_up" id="default_follow_up" class="styled-input" th:with="type=${@dict.getType('sys_select_yes_no')}" required>
                             <option value="">请选择</option>
-                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${default_follow_up==dict.dictValue}"></option>
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${default_follow_up}==${dict.dictValue}"></option>
                         </select>
                     </div>
                     <div class="customize-form-group">
                         <label>所属门店:</label>
                         <input name="storeName" placeholder="请输入所属门店" id="storeName" th:value="${storeName}" class="styled-input" type="text">
                     </div>
+                    <div class="customize-form-group" id="statusDIv">
+                        <label>在职状态:</label>
+                        <select name="status" id="status" class="styled-input" th:with="type=${@dict.getType('sys_gxhpz_job_status')}" required>
+                            <option value="">请选择</option>
+                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${status}==${dict.dictValue}"></option>
+                        </select>
+                    </div>
             </div>
         </div>
         </div>
@@ -70,6 +77,7 @@
             $("#ssjh").hide();
             $("#task").hide();
             $("#default_follow_upId").hide();
+           // $("#statusDIv").hide();
 
         }else if(position=="任务跟进人"){
             var selectedValue = $('#default_follow_up').val();

+ 52 - 1
health-system/src/main/java/com/bzd/system/service/DTPService.java

@@ -293,16 +293,31 @@ public class DTPService {
 
 
     /**
-     * 药师列表
+     * 药师列表或者任务跟进人列表
      *
      * @param pd
      * @return
      * @throws Exception
      */
     public List<PageData> findRevieForList(final PageData pd) throws Exception {
+
         return (List<PageData>) daoSupport.findForList("reviewPharmacistsMapper.selectAllReviewPharmacists", pd);
     }
     /**
+     * 任务跟进人列表
+     *
+     * @param pd
+     * @return
+     * @throws Exception
+     */
+    public List<PageData> getFollowUpInformation(final PageData pd) throws Exception {
+        pd.put("storeId", getSysUser().getDeptId());
+        pd.put("status", 1);
+        pd.put("position", "任务跟进人");
+        return (List<PageData>) daoSupport.findForList("reviewPharmacistsMapper.getFollowUpInformation", pd);
+    }
+
+    /**
      * 药师审核前输入密码
      *
      * @param pd
@@ -1369,4 +1384,40 @@ public class DTPService {
     public PageData searchICD11Object(PageData pd) throws Exception{
         return (PageData) daoSupport.findForObject("TypeDateMapper.getICD11_Date", pd);
     }
+    public Integer updateFollowUp(PageData pd)throws Exception{
+                pd.put("updateTime",DateUtils.getTime());
+        return daoSupport.update("PharmaceuticalServiceMapper.updateArchiveRecord",pd);
+    }
+
+    public Integer updatePharmacistsByStoreId(PageData pd)throws Exception{
+       String id= (String) pd.get("id");//新默认跟进人id 设置他为默认人
+       String lzid= (String) pd.get("lzid");//旧默认跟进人id 取消他为默认人
+        PageData pd1=new PageData();
+        PageData pd2=new PageData();
+        int a=0;
+        int b=0;
+       if(StringUtils.isNotEmpty(id)){
+           pd1.put("id",id);
+           pd1.put("storeId",getSysUser().getDeptId());
+           pd1.put("default_follow_up",1);//是
+           pd1.put("updateTime",DateUtils.getTime());
+             a= daoSupport.update("reviewPharmacistsMapper.updatePharmacistsById",pd1);
+       }
+        if(StringUtils.isNotEmpty(lzid)){
+            pd2.put("id",lzid);
+            pd2.put("storeId",getSysUser().getDeptId());
+            pd2.put("default_follow_up",0);//否
+            pd2.put("updateTime",DateUtils.getTime());
+             b= daoSupport.update("reviewPharmacistsMapper.updatePharmacistsById",pd1);
+
+        }
+        System.out.println("新默认跟人更新结果=====>a:"+a+"b:"+b);
+        if(a >0 && b >0){
+            return 1;
+        }else{
+            return 0;
+        }
+
+    }
+
 }

+ 1 - 1
health-system/src/main/resources/mapper/dtp/SDtpYypzFollowUpSopMapper.xml

@@ -94,7 +94,7 @@
         <if test="position !=null and position !='' ">
             and up.position = #{position}
         </if>
-        <if test="storeId !=null and storeId !='' ">
+        <if test="storeId !=null">
             and up.storeId = #{storeId}
         </if>
         <if test="status !=null and status !='' ">

+ 694 - 0
health-system/src/main/resources/mapper/dtp/SGxhpzFollowUpRecordsMapper.xml

@@ -0,0 +1,694 @@
+<?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="SGxhpzFollowUpRecordsMapper">
+    <!-- 修改 随访记录全量表-->
+    <update id="updateSGxhpzFollowUpRecords" parameterType="pd">
+        UPDATE s_gxhpz_follow_up_records
+        <set>
+            <!-- 合并用药是否引起不良反应 -->
+            <if test="combinedMedicationAdverseReaction != null">
+                combined_medication_adverse_reaction = #{combinedMedicationAdverseReaction},
+            </if>
+            <!-- 合并用药其他不良反应 -->
+            <if test="combinedMedicationOtherAdverseReactions != null and combinedMedicationOtherAdverseReactions != ''">
+                combined_medication_other_adverse_reactions = #{combinedMedicationOtherAdverseReactions},
+            </if>
+            <!-- 合并用药其他不良反应图片 -->
+            <if test="combinedMedicationOtherAdverseReactionsImage != null and combinedMedicationOtherAdverseReactionsImage != ''">
+                combined_medication_other_adverse_reactions_image = #{combinedMedicationOtherAdverseReactionsImage},
+            </if>
+            <!-- 合并用药其他不良反应处理 -->
+            <if test="combinedMedicationOtherAdverseReactionsHandling != null and combinedMedicationOtherAdverseReactionsHandling != ''">
+                combined_medication_other_adverse_reactions_handling = #{combinedMedicationOtherAdverseReactionsHandling},
+            </if>
+            <!-- 是否复查 -->
+            <if test="isReview != null">
+                is_review = #{isReview},
+            </if>
+            <!-- 影像学检查 医保类型 -->
+            <if test="imagingInsuranceType != null and imagingInsuranceType != ''">
+                imaging_insurance_type = #{imagingInsuranceType},
+            </if>
+            <!-- CT 单选 -->
+            <if test="ctCheck != null">
+                ct_check = #{ctCheck},
+            </if>
+            <!-- CT文本 -->
+            <if test="ctText != null and ctText != ''">
+                ct_text = #{ctText},
+            </if>
+            <!-- B超 单选 -->
+            <if test="ultrasoundCheck != null">
+                ultrasound_check = #{ultrasoundCheck},
+            </if>
+            <!-- B超文本 -->
+            <if test="ultrasoundText != null and ultrasoundText != ''">
+                ultrasound_text = #{ultrasoundText},
+            </if>
+            <!-- 核磁 单选 -->
+            <if test="mriCheck != null">
+                mri_check = #{mriCheck},
+            </if>
+            <!-- 核磁文本 -->
+            <if test="mriText != null and mriText != ''">
+                mri_text = #{mriText},
+            </if>
+            <!-- 影像学检查其它 -->
+            <if test="otherImagingExaminations != null and otherImagingExaminations != ''">
+                other_imaging_examinations = #{otherImagingExaminations},
+            </if>
+            <!-- 影像学检查图片 -->
+            <if test="imagingExaminationsImage != null and imagingExaminationsImage != ''">
+                imaging_examinations_image = #{imagingExaminationsImage},
+            </if>
+            <!-- 肿瘤标记物检查 多选 -->
+            <if test="tumorMarkerCheck != null and tumorMarkerCheck != ''">
+                tumor_marker_check = #{tumorMarkerCheck},
+            </if>
+            <!-- CEA -->
+            <if test="cea != null and cea != ''">
+                cea = #{cea},
+            </if>
+            <!-- AFP -->
+            <if test="afp != null and afp != ''">
+                afp = #{afp},
+            </if>
+            <!-- CA-199 -->
+            <if test="ca199 != null and ca199 != ''">
+                ca_199 = #{ca199},
+            </if>
+            <!-- CA125 -->
+            <if test="ca125 != null and ca125 != ''">
+                ca125 = #{ca125},
+            </if>
+            <!-- CA153 -->
+            <if test="ca153 != null and ca153 != ''">
+                ca153 = #{ca153},
+            </if>
+            <!-- HCG -->
+            <if test="hcg != null and hcg != ''">
+                hcg = #{hcg},
+            </if>
+            <!-- NSE -->
+            <if test="nse != null and nse != ''">
+                nse = #{nse},
+            </if>
+            <!-- CYFRA21-1 -->
+            <if test="cyfra211 != null and cyfra211 != ''">
+                cyfra21_1 = #{cyfra211},
+            </if>
+            <!-- TG -->
+            <if test="tg != null and tg != ''">
+                tg = #{tg},
+            </if>
+            <!-- PSA -->
+            <if test="psa != null and psa != ''">
+                psa = #{psa},
+            </if>
+            <!-- 肿瘤物标记检查图片 -->
+            <if test="tumorMarkerImage != null and tumorMarkerImage != ''">
+                tumor_marker_image = #{tumorMarkerImage},
+            </if>
+            <!-- 实验室检查指标 -->
+            <if test="labTestIndicators != null and labTestIndicators != ''">
+                lab_test_indicators = #{labTestIndicators},
+            </if>
+            <!-- 实验室检查指标图片 -->
+            <if test="labTestIndicatorsImage != null and labTestIndicatorsImage != ''">
+                lab_test_indicators_image = #{labTestIndicatorsImage},
+            </if>
+            <!-- 治疗类型 -->
+            <if test="treatmentType != null and treatmentType != ''">
+                treatment_type = #{treatmentType},
+            </if>
+            <!-- 用药前治疗方案 -->
+            <if test="preMedicationPlan != null and preMedicationPlan != ''">
+                pre_medication_plan = #{preMedicationPlan},
+            </if>
+            <!-- 目前治疗方案 -->
+            <if test="currentTreatmentPlan != null and currentTreatmentPlan != ''">
+                current_treatment_plan = #{currentTreatmentPlan},
+            </if>
+            <!-- 进展后治疗方案 -->
+            <if test="postProgressionTreatmentPlan != null and postProgressionTreatmentPlan != ''">
+                post_progression_treatment_plan = #{postProgressionTreatmentPlan},
+            </if>
+            <!-- 有无药品适应症 -->
+            <if test="hasMedicationIndications != null">
+                has_medication_indications = #{hasMedicationIndications},
+            </if>
+            <!-- 药物对该疾病是否有效 -->
+            <if test="drugEffectiveness != null">
+                drug_effectiveness = #{drugEffectiveness},
+            </if>
+            <!-- 药物间是否存在临床相互作用 -->
+            <if test="clinicalInteraction != null">
+                clinical_interaction = #{clinicalInteraction},
+            </if>
+            <!-- 请描述临床相互作用 -->
+            <if test="clinicalInteractionDescription != null">
+                clinical_interaction_description = #{clinicalInteractionDescription},
+            </if>
+            <!-- 是否有不必要重复用药 -->
+            <if test="unnecessaryRepeatedMedication != null">
+                unnecessary_repeated_medication = #{unnecessaryRepeatedMedication},
+            </if>
+            <!-- 重复用药首次使用日期 -->
+            <if test="repeatedMedicationFirstUseDate != null">
+                repeated_medication_first_use_date = #{repeatedMedicationFirstUseDate},
+            </if>
+            <!-- 请描述不必要重复用药 -->
+            <if test="unnecessaryRepeatedMedicationDescription != null">
+                unnecessary_repeated_medication_description = #{unnecessaryRepeatedMedicationDescription},
+            </if>
+            <!-- 是否出现用药错误 -->
+            <if test="medicationError != null">
+                medication_error = #{medicationError},
+            </if>
+            <!-- 用药错误出现时间 -->
+            <if test="medicationErrorTime != null">
+                medication_error_time = #{medicationErrorTime},
+            </if>
+            <!-- 请描述用药错误 -->
+            <if test="medicationErrorDescription != null">
+                medication_error_description = #{medicationErrorDescription},
+            </if>
+            <!-- 用药记录 -->
+            <if test="medicationRecord != null">
+                medication_record = #{medicationRecord},
+            </if>
+            <!-- 合并用药记录 -->
+            <if test="combinedMedicationRecord != null">
+                combined_medication_record = #{combinedMedicationRecord},
+            </if>
+            <!-- 疼痛标准评分NRS -->
+            <if test="painNrsScore != null">
+                pain_nrs_score = #{painNrsScore},
+            </if>
+            <!-- 体力状况评分 -->
+            <if test="physicalConditionScore != null">
+                physical_condition_score = #{physicalConditionScore},
+            </if>
+            <!-- 本次回访是否咨询 -->
+            <if test="isConsultation != null">
+                is_consultation = #{isConsultation},
+            </if>
+            <!-- 咨询问题类型 -->
+            <if test="consultationType != null and consultationType != ''">
+                consultation_type = #{consultationType},
+            </if>
+            <!-- 具体问题 -->
+            <if test="specificQuestion != null and specificQuestion != ''">
+                specific_question = #{specificQuestion},
+            </if>
+            <!-- 药师解答 -->
+            <if test="pharmacistResponse != null">
+                pharmacist_response = #{pharmacistResponse},
+            </if>
+            <!-- 患者病情评估 -->
+            <if test="patientConditionAssessment != null">
+                patient_condition_assessment = #{patientConditionAssessment},
+            </if>
+            <!-- 共建项目描述 -->
+            <if test="projectDescription != null">
+                project_description = #{projectDescription},
+            </if>
+            <!-- 更新时间 -->
+            updatedTime = CURRENT_TIMESTAMP,
+        </set>
+        WHERE id = #{id}
+    </update>
+    <!-- 随访记录全量表 添加-->
+    <insert id="insertSGxhpzFollowUpRecords" parameterType="pd">
+        INSERT INTO s_gxhpz_follow_up_records (
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <!-- 合并用药是否引起不良反应 -->
+            <if test="combinedMedicationAdverseReaction != null">
+                combined_medication_adverse_reaction,
+            </if>
+            <!-- 合并用药其他不良反应 -->
+            <if test="combinedMedicationOtherAdverseReactions != null and combinedMedicationOtherAdverseReactions != ''">
+                combined_medication_other_adverse_reactions,
+            </if>
+            <!-- 合并用药其他不良反应图片 -->
+            <if test="combinedMedicationOtherAdverseReactionsImage != null and combinedMedicationOtherAdverseReactionsImage != ''">
+                combined_medication_other_adverse_reactions_image,
+            </if>
+            <!-- 合并用药其他不良反应处理 -->
+            <if test="combinedMedicationOtherAdverseReactionsHandling != null and combinedMedicationOtherAdverseReactionsHandling != ''">
+                combined_medication_other_adverse_reactions_handling,
+            </if>
+            <!-- 是否复查 -->
+            <if test="isReview != null">
+                is_review,
+            </if>
+            <!-- 影像学检查 医保类型 -->
+            <if test="imagingInsuranceType != null and imagingInsuranceType != ''">
+                imaging_insurance_type,
+            </if>
+            <!-- CT 单选 -->
+            <if test="ctCheck != null">
+                ct_check,
+            </if>
+            <!-- CT文本 -->
+            <if test="ctText != null and ctText != ''">
+                ct_text,
+            </if>
+            <!-- B超 单选 -->
+            <if test="ultrasoundCheck != null">
+                ultrasound_check,
+            </if>
+            <!-- B超文本 -->
+            <if test="ultrasoundText != null and ultrasoundText != ''">
+                ultrasound_text,
+            </if>
+            <!-- 核磁 单选 -->
+            <if test="mriCheck != null">
+                mri_check,
+            </if>
+            <!-- 核磁文本 -->
+            <if test="mriText != null and mriText != ''">
+                mri_text,
+            </if>
+            <!-- 影像学检查其它 -->
+            <if test="otherImagingExaminations != null and otherImagingExaminations != ''">
+                other_imaging_examinations,
+            </if>
+            <!-- 影像学检查图片 -->
+            <if test="imagingExaminationsImage != null and imagingExaminationsImage != ''">
+                imaging_examinations_image,
+            </if>
+            <!-- 肿瘤标记物检查 多选 -->
+            <if test="tumorMarkerCheck != null and tumorMarkerCheck != ''">
+                tumor_marker_check,
+            </if>
+            <!-- CEA -->
+            <if test="cea != null and cea != ''">
+                cea,
+            </if>
+            <!-- AFP -->
+            <if test="afp != null and afp != ''">
+                afp,
+            </if>
+            <!-- CA-199 -->
+            <if test="ca199 != null and ca199 != ''">
+                ca_199,
+            </if>
+            <!-- CA125 -->
+            <if test="ca125 != null and ca125 != ''">
+                ca125,
+            </if>
+            <!-- CA153 -->
+            <if test="ca153 != null and ca153 != ''">
+                ca153,
+            </if>
+            <!-- HCG -->
+            <if test="hcg != null and hcg != ''">
+                hcg,
+            </if>
+            <!-- NSE -->
+            <if test="nse != null and nse != ''">
+                nse,
+            </if>
+            <!-- CYFRA21-1 -->
+            <if test="cyfra211 != null and cyfra211 != ''">
+                cyfra21_1,
+            </if>
+            <!-- TG -->
+            <if test="tg != null and tg != ''">
+                tg,
+            </if>
+            <!-- PSA -->
+            <if test="psa != null and psa != ''">
+                psa,
+            </if>
+            <!-- 肿瘤物标记检查图片 -->
+            <if test="tumorMarkerImage != null and tumorMarkerImage != ''">
+                tumor_marker_image,
+            </if>
+            <!-- 实验室检查指标 -->
+            <if test="labTestIndicators != null and labTestIndicators != ''">
+                lab_test_indicators,
+            </if>
+            <!-- 实验室检查指标图片 -->
+            <if test="labTestIndicatorsImage != null and labTestIndicatorsImage != ''">
+                lab_test_indicators_image,
+            </if>
+            <!-- 治疗类型 -->
+            <if test="treatmentType != null and treatmentType != ''">
+                treatment_type,
+            </if>
+            <!-- 用药前治疗方案 -->
+            <if test="preMedicationPlan != null and preMedicationPlan != ''">
+                pre_medication_plan,
+            </if>
+            <!-- 目前治疗方案 -->
+            <if test="currentTreatmentPlan != null and currentTreatmentPlan != ''">
+                current_treatment_plan,
+            </if>
+            <!-- 进展后治疗方案 -->
+            <if test="postProgressionTreatmentPlan != null and postProgressionTreatmentPlan != ''">
+                post_progression_treatment_plan,
+            </if>
+            <!-- 有无药品适应症 -->
+            <if test="hasMedicationIndications != null">
+                has_medication_indications,
+            </if>
+            <!-- 药物对该疾病是否有效 -->
+            <if test="drugEffectiveness != null">
+                drug_effectiveness,
+            </if>
+            <!-- 药物间是否存在临床相互作用 -->
+            <if test="clinicalInteraction != null">
+                clinical_interaction,
+            </if>
+            <!-- 请描述临床相互作用 -->
+            <if test="clinicalInteractionDescription != null">
+                clinical_interaction_description,
+            </if>
+            <!-- 是否有不必要重复用药 -->
+            <if test="unnecessaryRepeatedMedication != null">
+                unnecessary_repeated_medication,
+            </if>
+            <!-- 重复用药首次使用日期 -->
+            <if test="repeatedMedicationFirstUseDate != null">
+                repeated_medication_first_use_date,
+            </if>
+            <!-- 请描述不必要重复用药 -->
+            <if test="unnecessaryRepeatedMedicationDescription != null">
+                unnecessary_repeated_medication_description,
+            </if>
+            <!-- 是否出现用药错误 -->
+            <if test="medicationError != null">
+                medication_error,
+            </if>
+            <!-- 用药错误出现时间 -->
+            <if test="medicationErrorTime != null">
+                medication_error_time,
+            </if>
+            <!-- 请描述用药错误 -->
+            <if test="medicationErrorDescription != null">
+                medication_error_description,
+            </if>
+            <!-- 用药记录 -->
+            <if test="medicationRecord != null">
+                medication_record,
+            </if>
+            <!-- 合并用药记录 -->
+            <if test="combinedMedicationRecord != null">
+                combined_medication_record,
+            </if>
+            <!-- 疼痛标准评分NRS -->
+            <if test="painNrsScore != null">
+                pain_nrs_score,
+            </if>
+            <!-- 体力状况评分 -->
+            <if test="physicalConditionScore != null">
+                physical_condition_score,
+            </if>
+            <!-- 本次回访是否咨询 -->
+            <if test="isConsultation != null">
+                is_consultation,
+            </if>
+            <!-- 咨询问题类型 -->
+            <if test="consultationType != null and consultationType != ''">
+                consultation_type,
+            </if>
+            <!-- 具体问题 -->
+            <if test="specificQuestion != null and specificQuestion != ''">
+                specific_question,
+            </if>
+            <!-- 药师解答 -->
+            <if test="pharmacistResponse != null">
+                pharmacist_response,
+            </if>
+            <!-- 患者病情评估 -->
+            <if test="patientConditionAssessment != null">
+                patient_condition_assessment,
+            </if>
+            <!-- 共建项目描述 -->
+            <if test="projectDescription != null">
+                project_description,
+            </if>
+            <!-- 任务id -->
+            <if test="taskId != null and taskId != ''">
+                task_id,
+            </if>
+            <!-- 计划ID -->
+            <if test="planId != null and planId != ''">
+                plan_id,
+            </if>
+            <!-- 患者id -->
+            <if test="patientId != null and patientId != ''">
+                patient_id,
+            </if>
+            <!-- 门店id -->
+            <if test="storeId != null and storeId != ''">
+                store_id,
+            </if>
+            <!-- 创建时间 -->
+            created_time,
+            <!-- 更新时间 -->
+            updated_time,
+            <!-- 操作人 -->
+            operator
+        </trim>
+        ) VALUES (
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+        <!-- 合并用药是否引起不良反应 -->
+        <if test="combinedMedicationAdverseReaction != null">
+            #{combinedMedicationAdverseReaction},
+        </if>
+        <!-- 合并用药其他不良反应 -->
+        <if test="combinedMedicationOtherAdverseReactions != null and combinedMedicationOtherAdverseReactions != ''">
+            #{combinedMedicationOtherAdverseReactions},
+        </if>
+        <!-- 合并用药其他不良反应图片 -->
+        <if test="combinedMedicationOtherAdverseReactionsImage != null and combinedMedicationOtherAdverseReactionsImage != ''">
+            #{combinedMedicationOtherAdverseReactionsImage},
+        </if>
+        <!-- 合并用药其他不良反应处理 -->
+        <if test="combinedMedicationOtherAdverseReactionsHandling != null and combinedMedicationOtherAdverseReactionsHandling != ''">
+            #{combinedMedicationOtherAdverseReactionsHandling},
+        </if>
+        <!-- 是否复查 -->
+        <if test="isReview != null">
+            #{isReview},
+        </if>
+        <!-- 影像学检查 医保类型 -->
+        <if test="imagingInsuranceType != null and imagingInsuranceType != ''">
+            #{imagingInsuranceType},
+        </if>
+        <!-- CT 单选 -->
+        <if test="ctCheck != null">
+            #{ctCheck},
+        </if>
+        <!-- CT文本 -->
+        <if test="ctText != null and ctText != ''">
+            #{ctText},
+        </if>
+        <!-- B超 单选 -->
+        <if test="ultrasoundCheck != null">
+            #{ultrasoundCheck},
+        </if>
+        <!-- B超文本 -->
+        <if test="ultrasoundText != null and ultrasoundText != ''">
+            #{ultrasoundText},
+        </if>
+        <!-- 核磁 单选 -->
+        <if test="mriCheck != null">
+            #{mriCheck},
+        </if>
+        <!-- 核磁文本 -->
+        <if test="mriText != null and mriText != ''">
+            #{mriText},
+        </if>
+        <!-- 影像学检查其它 -->
+        <if test="otherImagingExaminations != null and otherImagingExaminations != ''">
+            #{otherImagingExaminations},
+        </if>
+        <!-- 影像学检查图片 -->
+        <if test="imagingExaminationsImage != null and imagingExaminationsImage != ''">
+            #{imagingExaminationsImage},
+        </if>
+        <!-- 肿瘤标记物检查 多选 -->
+        <if test="tumorMarkerCheck != null and tumorMarkerCheck != ''">
+            #{tumorMarkerCheck},
+        </if>
+        <!-- CEA -->
+        <if test="cea != null and cea != ''">
+            #{cea},
+        </if>
+        <!-- AFP -->
+        <if test="afp != null and afp != ''">
+            #{afp},
+        </if>
+        <!-- CA-199 -->
+        <if test="ca199 != null and ca199 != ''">
+            #{ca199},
+        </if>
+        <!-- CA125 -->
+        <if test="ca125 != null and ca125 != ''">
+            #{ca125},
+        </if>
+        <!-- CA153 -->
+        <if test="ca153 != null and ca153 != ''">
+            #{ca153},
+        </if>
+        <!-- HCG -->
+        <if test="hcg != null and hcg != ''">
+            #{hcg},
+        </if>
+        <!-- NSE -->
+        <if test="nse != null and nse != ''">
+            #{nse},
+        </if>
+        <!-- CYFRA21-1 -->
+        <if test="cyfra211 != null and cyfra211 != ''">
+            #{cyfra211},
+        </if>
+        <!-- TG -->
+        <if test="tg != null and tg != ''">
+            #{tg},
+        </if>
+        <!-- PSA -->
+        <if test="psa != null and psa != ''">
+            #{psa},
+        </if>
+        <!-- 肿瘤物标记检查图片 -->
+        <if test="tumorMarkerImage != null and tumorMarkerImage != ''">
+            #{tumorMarkerImage},
+        </if>
+        <!-- 实验室检查指标 -->
+        <if test="labTestIndicators != null and labTestIndicators != ''">
+            #{labTestIndicators},
+        </if>
+        <!-- 实验室检查指标图片 -->
+        <if test="labTestIndicatorsImage != null and labTestIndicatorsImage != ''">
+            #{labTestIndicatorsImage},
+        </if>
+        <!-- 治疗类型 -->
+        <if test="treatmentType != null and treatmentType != ''">
+            #{treatmentType},
+        </if>
+        <!-- 用药前治疗方案 -->
+        <if test="preMedicationPlan != null and preMedicationPlan != ''">
+            #{preMedicationPlan},
+        </if>
+        <!-- 目前治疗方案 -->
+        <if test="currentTreatmentPlan != null and currentTreatmentPlan != ''">
+            #{currentTreatmentPlan},
+        </if>
+        <!-- 进展后治疗方案 -->
+        <if test="postProgressionTreatmentPlan != null and postProgressionTreatmentPlan != ''">
+            #{postProgressionTreatmentPlan},
+        </if>
+        <!-- 有无药品适应症 -->
+        <if test="hasMedicationIndications != null">
+            #{hasMedicationIndications},
+        </if>
+        <!-- 药物对该疾病是否有效 -->
+        <if test="drugEffectiveness != null">
+            #{drugEffectiveness},
+        </if>
+        <!-- 药物间是否存在临床相互作用 -->
+        <if test="clinicalInteraction != null">
+            #{clinicalInteraction},
+        </if>
+        <!-- 请描述临床相互作用 -->
+        <if test="clinicalInteractionDescription != null">
+            #{clinical_interaction_description},
+        </if>
+        <if test="unnecessaryRepeatedMedication != null">
+            unnecessary_repeated_medication = #{unnecessaryRepeatedMedication},
+        </if>
+        <!-- 重复用药首次使用日期 -->
+        <if test="repeatedMedicationFirstUseDate != null">
+            repeated_medication_first_use_date = #{repeatedMedicationFirstUseDate},
+        </if>
+        <!-- 请描述不必要重复用药 -->
+        <if test="unnecessaryRepeatedMedicationDescription != null">
+            unnecessary_repeated_medication_description = #{unnecessaryRepeatedMedicationDescription},
+        </if>
+        <!-- 是否出现用药错误 -->
+        <if test="medicationError != null">
+            medication_error = #{medicationError},
+        </if>
+        <!-- 用药错误出现时间 -->
+        <if test="medicationErrorTime != null">
+            medication_error_time = #{medicationErrorTime},
+        </if>
+        <!-- 请描述用药错误 -->
+        <if test="medicationErrorDescription != null">
+            medication_error_description = #{medicationErrorDescription},
+        </if>
+        <!-- 用药记录 -->
+        <if test="medicationRecord != null">
+            medication_record = #{medicationRecord},
+        </if>
+        <!-- 合并用药记录 -->
+        <if test="combinedMedicationRecord != null">
+            combined_medication_record = #{combinedMedicationRecord},
+        </if>
+        <!-- 疼痛标准评分NRS -->
+        <if test="painNrsScore != null">
+            pain_nrs_score = #{painNrsScore},
+        </if>
+        <!-- 体力状况评分 -->
+        <if test="physicalConditionScore != null">
+            physical_condition_score = #{physicalConditionScore},
+        </if>
+        <!-- 本次回访是否咨询 -->
+        <if test="isConsultation != null">
+            is_consultation = #{isConsultation},
+        </if>
+        <!-- 咨询问题类型 -->
+        <if test="consultationType != null and consultationType != ''">
+            consultation_type = #{consultationType},
+        </if>
+        <!-- 具体问题 -->
+        <if test="specificQuestion != null and specificQuestion != ''">
+            specific_question = #{specificQuestion},
+        </if>
+        <!-- 药师解答 -->
+        <if test="pharmacistResponse != null">
+            pharmacist_response = #{pharmacistResponse},
+        </if>
+        <!-- 患者病情评估 -->
+        <if test="patientConditionAssessment != null">
+            patient_condition_assessment = #{patientConditionAssessment},
+        </if>
+        <!-- 共建项目描述 -->
+        <if test="projectDescription != null">
+            project_description = #{projectDescription},
+        </if>
+        <!-- 任务id -->
+        <if test="taskId != null and taskId != ''">
+            taskId = #{taskId},
+        </if>
+        <!-- 计划ID -->
+        <if test="planId != null and planId != ''">
+            planId = #{planId},
+        </if>
+        <!-- 患者id -->
+        <if test="patientId != null and patientId != ''">
+            patientId = #{patientId},
+        </if>
+        <!-- 门店id -->
+        <if test="storeId != null and storeId != ''">
+            storeId = #{storeId},
+        </if>
+        <!-- 创建时间 -->
+        <if test="createdTime != null">
+            createdTime = #{createdTime},
+        </if>
+        <!-- 更新时间 -->
+        updatedTime = CURRENT_TIMESTAMP,
+        <!-- 操作人 -->
+        <if test="operator != null and operator != ''">
+            operator = #{operator},
+        </if>
+       </trim>)
+    </insert>
+
+</mapper>

+ 12 - 5
health-system/src/main/resources/mapper/gxhpz/pharmacistsMapper.xml

@@ -101,9 +101,12 @@
             <if test="phone != null and phone != ''">
                 phone,
             </if>
-            <if test="status != null and status != ''">
+            <if test="status != null">
                 status,
             </if>
+            <if test="storeId != null">
+                storeId
+            </if>
         </trim>
         <trim prefix="VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
 
@@ -140,6 +143,9 @@
             <if test="status != null and status != ''">
                 #{status},
             </if>
+            <if test="storeId != null">
+                #{storeId},
+            </if>
         </trim>
     </insert>
 
@@ -159,11 +165,12 @@
             </if>
         </trim>
         where
-        <if test="storeId != null and storeId !=''">
-            where storeId = #{storeId}
-        </if>
         <if test="position != null and position !=''">
-            and position = #{position}
+             position = #{position}
+        </if>
+        <if test="storeId != nul">
+            and storeId = #{storeId}
         </if>
+
     </update>
 </mapper>

+ 30 - 4
health-system/src/main/resources/mapper/gxhpz/reviewPharmacistsMapper.xml

@@ -4,12 +4,17 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="reviewPharmacistsMapper">
 
-    <!-- 查询所有审核药师 -->
+    <!-- 查询所有审核药师或者任务跟进人 -->
     <select id="selectAllReviewPharmacists" parameterType="pd" resultType="pd">
         SELECT * FROM s_dtp_review_pharmacists WHERE 1=1
         <if test="pharmacistName != null and pharmacistName != ''">
             AND pharmacistName = #{pharmacistName}
         </if>
+        <if test="query != null and query != ''">
+            AND (pharmacistName LIKE CONCAT('%', #{query}, '%')
+            OR phone = #{query})
+        </if>
+
         <if test="position != null and position != ''">
             AND position = #{position}
         </if>
@@ -25,6 +30,9 @@
         <if test="updatedTime != null">
             AND updatedTime = #{updatedTime}
         </if>
+        <if test="status != null">
+            AND status = #{status}
+        </if>
     </select>
 
     <!-- 根据 ID 查询单个审核药师 -->
@@ -67,7 +75,7 @@
         </if>
     </update>
 
-    <!-- 根据 d_value_code 更新审核药师信息 -->
+    <!-- 预留接口 更新审核药师信息 -->
     <update id="updateReviewPharmacistByStoreId" parameterType="pd">
         UPDATE s_dtp_review_pharmacists
         <trim prefix="SET " suffix="" prefixOverrides="," suffixOverrides=",">
@@ -83,8 +91,8 @@
             <if test="reviewPassword != null and reviewPassword != ''">
                 reviewPassword = #{reviewPassword},
             </if>
-            <if test="updatedTime != null">
-                updatedTime = #{updatedTime},
+            <if test="updateTime != null">
+                updateTime = #{updateTime},
             </if>
         </trim>
         <if test="storeId != null">
@@ -153,4 +161,22 @@
     <update id="changeStatus" parameterType="pd">
         UPDATE s_dtp_review_pharmacists SET updatedTime = #{updatedTime}, reviewPassword = #{reviewPassword} WHERE id = #{id}
     </update>
+
+
+    <!-- 更新默认任务跟进人 -->
+    <update id="updatePharmacistsById" parameterType="pd">
+        UPDATE s_dtp_review_pharmacists
+        <trim prefix="SET " suffix="" prefixOverrides="," suffixOverrides=",">
+            <if test="default_follow_up != null and default_follow_up != ''">
+                default_follow_up = #{default_follow_up},
+            </if>
+            <if test="updateTime != null">
+                updateTime = #{updateTime},
+            </if>
+        </trim>
+        WHERE  storeId = #{storeId} and id = #{id}
+
+    </update>
+
+
 </mapper>

+ 18 - 12
health-system/src/main/resources/mapper/pmServiceMapper/PharmaceuticalServiceMapper.xml

@@ -157,6 +157,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="storeName!= null and storeName!=''">
 			and h.storeName=#{storeName}
 		</if>
+		<if test="storeId!= null">
+			and h.storeId=#{storeId}
+		</if>
 
 		<if test="flipStatus!= null and flipStatus!=''">
 			and h.flipStatus=#{flipStatus}
@@ -288,7 +291,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="height != null">height,</if>
 			<if test="weight != null">weight,</if>
 			<if test="BMI != null and BMI != ''">BMI,</if>
-			<if test="storeId != null and storeId != ''">storeId,</if>
+			<if test="storeId != nul">storeId,</if>
 			<if test="insurance != null and insurance != ''">insurance,</if>
 			<if test="socialSecurityCard != null and socialSecurityCard != ''">socialSecurityCard,</if>
 			<if test="timeFirstDiagnosis != null">timeFirstDiagnosis,</if>
@@ -312,7 +315,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="dl != null and dl != ''">dl,</if>
 			<if test="xl != null and xl != ''">xl,</if>
 			<if test="follow_up_assign != null and follow_up_assign != ''">follow_up_assign,</if>
-			<if test="follow_up_assign_id != null and follow_up_assign_id != ''">follow_up_assign_id,</if>
+			<if test="follow_up_assign_id != null">follow_up_assign_id,</if>
 			<if test="addr != null and addr != ''">addr</if>
 		</trim>
 
@@ -341,7 +344,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="height != null">#{height},</if>
 			<if test="weight != null">#{weight},</if>
 			<if test="BMI != null and BMI != ''">#{BMI},</if>
-			<if test="storeId != null and storeId != ''">#{storeId},</if>
+			<if test="storeId != null">#{storeId},</if>
 			<if test="insurance != null and insurance != ''">#{insurance},</if>
 			<if test="socialSecurityCard != null and socialSecurityCard != ''">#{socialSecurityCard},</if>
 			<if test="timeFirstDiagnosis != null">#{timeFirstDiagnosis},</if>
@@ -365,7 +368,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="dl != null and dl != ''">#{dl},</if>
 			<if test="xl != null and xl != ''">#{xl},</if>
 			<if test="follow_up_assign != null and follow_up_assign != ''">>#{follow_up_assign},</if>
-			<if test="follow_up_assign_id != null and follow_up_assign_id != ''">#{follow_up_assign_id},</if>
+			<if test="follow_up_assign_id != null">#{follow_up_assign_id},</if>
 			<if test="addr != null and addr != ''">#{addr}</if>
 		</trim>
 
@@ -410,13 +413,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="mdmCode != null and mdmCode != ''">mdmCode = #{mdmCode},</if>
 		<if test="productName != null and productName != ''">productName = #{productName},</if>
 		<if test="storeName != null and storeName != ''">storeName = #{storeName},</if>
-		<if test="storeId != null and storeId != ''">storeId = #{storeId},</if>
+		<if test="storeId != null">storeId = #{storeId},</if>
 		<if test="noFlipCause != null and noFlipCause != ''">noFlipCause = #{noFlipCause},</if>
 		<if test="followUpStatus != null and followUpStatus != ''">followUpStatus = #{followUpStatus},</if>
 		<if test="genericName != null and genericName != ''">genericName = #{genericName},</if>
-		<if test="follow_up_assign != null and follow_up_assign != ''">>follow_up_assign = #{follow_up_assign},</if>
-		<if test="follow_up_assign_id != null and follow_up_assign_id != ''">follow_up_assign_id = #{follow_up_assign_id},</if>
-		updateTime = #{updateTime}
+		<if test="follow_up_assign != null and follow_up_assign != ''">follow_up_assign = #{follow_up_assign},</if>
+		<if test="follow_up_assign_id != null">follow_up_assign_id = #{follow_up_assign_id},</if>
+		<if test="updateTime != null">updateTime = #{updateTime}</if>
 		WHERE id = #{id}
 	</update>
 
@@ -857,7 +860,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="default_follow_up != null and default_follow_up != ''">
 			and default_follow_up =#{default_follow_up}
 		</if>
-		<if test="status != null and status != ''">
+		<if test="status != null">
 			and status =#{status}
 		</if>
 		<if test="storeId != null and storeId != ''">
@@ -866,7 +869,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 	<!--随访跟进人分配 查询-->
 	<select id="getFollow_up_assignList" parameterType="pd" resultType="pd">
-		select a.*,b.status,DATE_FORMAT(a.createTime, '%Y-%m-%d %H:%i:%s') AS createTime
+		select a.*,b.status,b.pharmacistName,b.phone,b.default_follow_up,DATE_FORMAT(a.createTime, '%Y-%m-%d %H:%i:%s') AS createTime
 		from s_dtp_ysfw_archive_management a left join s_dtp_review_pharmacists b on a.follow_up_assign_id=b.id where 1=1
 			<if test="query != null and query != ''">
 				AND (a.name LIKE CONCAT('%', #{query}, '%')
@@ -881,11 +884,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="noAssign != null and noAssign != ''">
 			and a.follow_up_assign is  null
 		</if>
-		<if test="status != null and status != ''">
+		<if test="status != null">
 			and b.status =#{status}
 		</if>
 
-		<if test="storeId != null and storeId != ''">
+		<if test="storeId != null">
 			and a.storeId=#{storeId}
 		</if>
 		<if test="product != null and product != ''">
@@ -2127,4 +2130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<select id="getDrugData" parameterType="pd" resultType="pd">
 		select * from s_gxhpz_product_dtpinfo where 1=1 and  product_code = #{mdmCode} and storeId = #{storeId}
 	</select>
+
+
+
 </mapper>

Some files were not shown because too many files changed in this diff