diff --git a/src/main/java/com/emr/controller/MedicalHandleController.java b/src/main/java/com/emr/controller/MedicalHandleController.java new file mode 100644 index 0000000..c9f369a --- /dev/null +++ b/src/main/java/com/emr/controller/MedicalHandleController.java @@ -0,0 +1,55 @@ +package com.emr.controller; + +import com.emr.entity.Archive_Master; +import com.emr.entity.Archive_Master_Vo; +import com.emr.entity.OffsetLimitPage; +import com.emr.service.Archive_MasterService; +import com.emr.util.ExportExcelUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +@Controller +@RequestMapping("/medicalHandle") +public class MedicalHandleController { + @Autowired + private Archive_MasterService archiveMasterService; + + @RequestMapping(value = "/medicalHandles") + public String faults(Model model) { + return "medicalHandlerDir/medicalHandlerList"; + } + + @ResponseBody + @RequestMapping(value = "/medicalHandlesList") + public OffsetLimitPage medicalHandlesList(HttpServletRequest request, HttpServletResponse response, Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) { + + OffsetLimitPage result = archiveMasterService.selectHandleDetail(archiveMasterVo, offset, limit); + return result; + } + + @ResponseBody + @RequestMapping(value = "/exportExcel") + public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception { + String tableThNames = "病历清单id,住院号,住院次数,名字,性别,入院科室,入院日期,出院科室,出院日期,处理人,处理时间,处理状态"; + String fieldCns = "id,inpNo,visitId,name,sex,deptAdmissionTo,admissionDateTime,deptName,dischargeDateTime,handleName,handleTime,followingContent"; + //构造excel的数据 + List list = archiveMasterService.selectHandleDetail(archiveMasterVo); + + //文件名 + String fileName = "病案室处理列表" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls"; + //ExportExcelUtil + ExportExcelUtil exportExcelUtil = new ExportExcelUtil(); + response.setContentType("application/ms-excel;charset=gbk"); + //导出excel的操作 + exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response); + } +} diff --git a/src/main/java/com/emr/controller/PowerUserController.java b/src/main/java/com/emr/controller/PowerUserController.java new file mode 100644 index 0000000..ae15504 --- /dev/null +++ b/src/main/java/com/emr/controller/PowerUserController.java @@ -0,0 +1,55 @@ +package com.emr.controller; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.emr.entity.Power_User; +import com.emr.util.HttpClientUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.servlet.http.HttpServletRequest; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +@Controller +public class PowerUserController { + @Value("${powerGetUserList}") + private String powerGetUserList; + + @RequestMapping("getPowerUserList") + @ResponseBody + public Object test(HttpServletRequest request,String type){ + Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); + String handleName = user.getUserPosition();//姓名 + request.setAttribute("handleName",handleName); + JSONObject jsonObject = HttpClientUtils.httpGet(powerGetUserList); + List users = new ArrayList<>(); + String code = jsonObject.getString("code"); + if (code.equals("100")){ + JSONObject data = jsonObject.getJSONObject("extend"); +// return data.toString() + JSONArray userList = data.getJSONArray("userList"); + if (type.equals("1")){ +// return userList.toJSONString(); + return userList; + }else{ + for (int i = 0; i < userList.size(); i++) { + JSONObject temp = userList.getJSONObject(i); + String roleId = temp.getString("roleId"); + if (roleId.equals("22")||roleId.equals("20")){ + users.add(temp); + } + } + return users; + } + + + }else{ + return "ERROR"; + } + + } +} diff --git a/src/main/java/com/emr/dao/Archive_Master_FollowingMapper.java b/src/main/java/com/emr/dao/Archive_Master_FollowingMapper.java new file mode 100644 index 0000000..3787441 --- /dev/null +++ b/src/main/java/com/emr/dao/Archive_Master_FollowingMapper.java @@ -0,0 +1,17 @@ +package com.emr.dao; + +import com.emr.entity.Archive_Master_Following; + +public interface Archive_Master_FollowingMapper { + int deleteByPrimaryKey(String id); + + int insert(Archive_Master_Following record); + + int insertSelective(Archive_Master_Following record); + + Archive_Master_Following selectByPrimaryKey(String id); + + int updateByPrimaryKeySelective(Archive_Master_Following record); + + int updateByPrimaryKey(Archive_Master_Following record); +} \ No newline at end of file diff --git a/src/main/java/com/emr/entity/Archive_Master_Following.java b/src/main/java/com/emr/entity/Archive_Master_Following.java new file mode 100644 index 0000000..318f821 --- /dev/null +++ b/src/main/java/com/emr/entity/Archive_Master_Following.java @@ -0,0 +1,85 @@ +package com.emr.entity; + +import java.util.Date; + +public class Archive_Master_Following { + private String id; + + private String masterId; + + private String followingType; + + private String followingContent; + + private String handleTime; + + private String handleId; + + private String handleName; + + private String remark; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id == null ? null : id.trim(); + } + + public String getMasterId() { + return masterId; + } + + public void setMasterId(String masterId) { + this.masterId = masterId == null ? null : masterId.trim(); + } + + public String getFollowingType() { + return followingType; + } + + public void setFollowingType(String followingType) { + this.followingType = followingType == null ? null : followingType.trim(); + } + + public String getFollowingContent() { + return followingContent; + } + + public void setFollowingContent(String followingContent) { + this.followingContent = followingContent == null ? null : followingContent.trim(); + } + + public String getHandleTime() { + return handleTime; + } + + public void setHandleTime(String handleTime) { + this.handleTime = handleTime; + } + + public String getHandleId() { + return handleId; + } + + public void setHandleId(String handleId) { + this.handleId = handleId == null ? null : handleId.trim(); + } + + public String getHandleName() { + return handleName; + } + + public void setHandleName(String handleName) { + this.handleName = handleName == null ? null : handleName.trim(); + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/emr/service/Archive_Master_FollowingService.java b/src/main/java/com/emr/service/Archive_Master_FollowingService.java new file mode 100644 index 0000000..b16a698 --- /dev/null +++ b/src/main/java/com/emr/service/Archive_Master_FollowingService.java @@ -0,0 +1,7 @@ +package com.emr.service; + +import com.emr.entity.Archive_Master_Following; + +public interface Archive_Master_FollowingService { + int insertSelective(Archive_Master_Following record); +} diff --git a/src/main/java/com/emr/service/ipml/Archive_Master_FollowingServiceImpl.java b/src/main/java/com/emr/service/ipml/Archive_Master_FollowingServiceImpl.java new file mode 100644 index 0000000..395c82b --- /dev/null +++ b/src/main/java/com/emr/service/ipml/Archive_Master_FollowingServiceImpl.java @@ -0,0 +1,17 @@ +package com.emr.service.ipml; + +import com.emr.dao.Archive_Master_FollowingMapper; +import com.emr.entity.Archive_Master_Following; +import com.emr.service.Archive_Master_FollowingService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class Archive_Master_FollowingServiceImpl implements Archive_Master_FollowingService { + @Autowired + private Archive_Master_FollowingMapper archive_master_followingMapper; + @Override + public int insertSelective(Archive_Master_Following record) { + return archive_master_followingMapper.insertSelective(record); + } +} diff --git a/src/main/resources/mapper/Archive_MasterMapper.xml b/src/main/resources/mapper/Archive_MasterMapper.xml index 786296c..492e651 100644 --- a/src/main/resources/mapper/Archive_MasterMapper.xml +++ b/src/main/resources/mapper/Archive_MasterMapper.xml @@ -1084,8 +1084,11 @@ and f.handle_time <= #{endHandleTime,jdbcType=NCHAR}+ ' 23:59:59' - - and f.handle_name like '%'+#{handleName,jdbcType=NCHAR}+'%' + + and f.handle_id in + + #{item} + and f.following_type in(#{followingType,jdbcType=NVARCHAR}) diff --git a/src/main/resources/mapper/Archive_Master_FollowingMapper.xml b/src/main/resources/mapper/Archive_Master_FollowingMapper.xml new file mode 100644 index 0000000..2d2ff6e --- /dev/null +++ b/src/main/resources/mapper/Archive_Master_FollowingMapper.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + id, master_id, following_type, following_content, handle_time, handle_id, handle_name, + remark + + + + delete from Archive_Master_Following + where id = #{id,jdbcType=VARCHAR} + + + insert into Archive_Master_Following (id, master_id, following_type, + following_content, handle_time, handle_id, + handle_name, remark) + values ((select replace(newid(),'-','')), #{masterId,jdbcType=VARCHAR}, #{followingType,jdbcType=VARCHAR}, + #{followingContent,jdbcType=NVARCHAR}, #{handleTime,jdbcType=TIMESTAMP}, #{handleId,jdbcType=VARCHAR}, + #{handleName,jdbcType=NVARCHAR}, #{remark,jdbcType=NVARCHAR}) + + + insert into Archive_Master_Following + + + id, + + + master_id, + + + following_type, + + + following_content, + + + handle_time, + + + handle_id, + + + handle_name, + + + remark, + + + + + (select replace(newid(),'-','')), + + + #{masterId,jdbcType=VARCHAR}, + + + #{followingType,jdbcType=VARCHAR}, + + + #{followingContent,jdbcType=NVARCHAR}, + + + #{handleTime,jdbcType=TIMESTAMP}, + + + #{handleId,jdbcType=VARCHAR}, + + + #{handleName,jdbcType=NVARCHAR}, + + + #{remark,jdbcType=NVARCHAR}, + + + + + update Archive_Master_Following + + + master_id = #{masterId,jdbcType=VARCHAR}, + + + following_type = #{followingType,jdbcType=VARCHAR}, + + + following_content = #{followingContent,jdbcType=NVARCHAR}, + + + handle_time = #{handleTime,jdbcType=TIMESTAMP}, + + + handle_id = #{handleId,jdbcType=VARCHAR}, + + + handle_name = #{handleName,jdbcType=NVARCHAR}, + + + remark = #{remark,jdbcType=NVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update Archive_Master_Following + set master_id = #{masterId,jdbcType=VARCHAR}, + following_type = #{followingType,jdbcType=VARCHAR}, + following_content = #{followingContent,jdbcType=NVARCHAR}, + handle_time = #{handleTime,jdbcType=TIMESTAMP}, + handle_id = #{handleId,jdbcType=VARCHAR}, + handle_name = #{handleName,jdbcType=NVARCHAR}, + remark = #{remark,jdbcType=NVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/medicalHandlerDir/medicalHandlerList.jsp b/src/main/webapp/WEB-INF/views/medicalHandlerDir/medicalHandlerList.jsp new file mode 100644 index 0000000..4357a4d --- /dev/null +++ b/src/main/webapp/WEB-INF/views/medicalHandlerDir/medicalHandlerList.jsp @@ -0,0 +1,3474 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.*"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + +<% + ResourceBundle res = ResourceBundle.getBundle("config.jdbc"); +%> + + + 病案室处理列表 + + + + + + + <%@include file="../../jspf/comm.jspf" %> + <%@ include file="../../jspf/ztreeCommom.jsp" %> + + + + + + + +
+ + +
+
+ +
+ + +
+
+ + +
+
+ + +
+ + <%--
+ + <%––%> + +
--%> + <%--
+ +
+ + - + +
+
--%> +
+ + +
+ <%--
+ +
+ + - + +
+
--%> +
+ + +
+
+ + +
+
+ +
+ + - + +
+
+ + + +
+
+ +
+
+
+
+ +
+ +
+
+
+ + +<%----%> + + + + +<%--退回弹窗--%> + + +<%--缺陷详情弹窗--%> + + + + +<%--多图片框--%> + +<%--发大弹窗--%> + +<%--确认框--%> + + + +<%--初审核弹窗--%> + + +<%--确认框--%> + + +<%--确认框--%> + + + + +<%--删除pdf某页弹窗--%> + + + +<%--删除pdf某页确认框--%> + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp b/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp index 43595e7..6c24cf4 100644 --- a/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp +++ b/src/main/webapp/WEB-INF/views/medicalRecallDir/medicalRecallList.jsp @@ -296,6 +296,8 @@ }); + + //处理导出内容,这个方法可以自定义某一行、某一列、甚至某个单元格的内容,也就是将其值设置为自己想要的内容 function DoOnCellHtmlData(cell, row, col, data) { if (row == 0) {