diff --git a/src/main/java/com/emr/controller/FontController.java b/src/main/java/com/emr/controller/FontController.java index f0d30a8..2f46361 100644 --- a/src/main/java/com/emr/controller/FontController.java +++ b/src/main/java/com/emr/controller/FontController.java @@ -3,6 +3,7 @@ package com.emr.controller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.emr.dao.Emr_DictionaryMapper; +import com.emr.dao.RecordMapper; import com.emr.dao.TPrintinfoMapper; import com.emr.entity.*; import com.emr.service.Archive_DetailService; @@ -41,6 +42,8 @@ import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -58,7 +61,7 @@ import java.util.*; public class FontController { @Value("${pdfWater}") private String pdfWater; - @Value("${RoomDetailsUrl}") + @Value("${RoomDetailsUrl}") private String RoomDetailsUrl; @Value("${RoomDetailsUrlName}") private String RoomDetailsUrlName; @@ -84,6 +87,8 @@ public class FontController { private ArchiveOtherExtService archiveOtherExtService; @Autowired private TPrintinfoMapper tPrintinfoMapper; + @Autowired + private RecordMapper recordMapper; @RequestMapping("selectIsPrintByPatienId") @ResponseBody @@ -751,6 +756,10 @@ public class FontController { @RequestMapping(value = "getMaster") @ResponseBody public OffsetLimitPage getMaster(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) throws Exception { + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER"); + String deptCode = user.getDeptCode(); + archiveMasterVo.setDeptCode(deptCode); return archiveMasterService.selectByCol(archiveMasterVo, offset, limit); } @@ -888,7 +897,7 @@ public class FontController { } - /* *//* + /* *//* *
HIS diff --git a/src/main/java/com/emr/entity/Archive_Master_Vo.java b/src/main/java/com/emr/entity/Archive_Master_Vo.java index 23290d3..00c5ea3 100644 --- a/src/main/java/com/emr/entity/Archive_Master_Vo.java +++ b/src/main/java/com/emr/entity/Archive_Master_Vo.java @@ -28,6 +28,8 @@ public class Archive_Master_Vo extends Archive_Master{ private String checkedName; + private String deptCode; + private String btns;//拼接按钮 private String status;//转换中文状态 diff --git a/src/main/java/com/emr/entity/Power_User.java b/src/main/java/com/emr/entity/Power_User.java index b12c642..70cc389 100644 --- a/src/main/java/com/emr/entity/Power_User.java +++ b/src/main/java/com/emr/entity/Power_User.java @@ -65,11 +65,41 @@ public class Power_User { * 备注 */ private String remark; + /** * 菜单以及功能权限标识集合 */ private Set menus; + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getPowerDepts() { + return powerDepts; + } + + public void setPowerDepts(String powerDepts) { + this.powerDepts = powerDepts; + } + + private String deptName; + private String deptCode; + + public String getDeptCode() { + return deptCode; + } + + public void setDeptCode(String deptCode) { + this.deptCode = deptCode; + } + + private String powerDepts; + public Integer getUserId() { return userId; } diff --git a/src/main/resources/mapper/Archive_MasterMapper.xml b/src/main/resources/mapper/Archive_MasterMapper.xml index 6faf1dd..8b131b4 100644 --- a/src/main/resources/mapper/Archive_MasterMapper.xml +++ b/src/main/resources/mapper/Archive_MasterMapper.xml @@ -133,6 +133,12 @@ #{item} + + and m.dept_name in + + #{item} + + and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR} diff --git a/src/main/resources/mapper/Emr_DictionaryMapper.xml b/src/main/resources/mapper/Emr_DictionaryMapper.xml index 5d3e3be..a55d52e 100644 --- a/src/main/resources/mapper/Emr_DictionaryMapper.xml +++ b/src/main/resources/mapper/Emr_DictionaryMapper.xml @@ -373,7 +373,7 @@