更新版本20210313新增上架信息维护

master
zengwh 5 years ago
parent f53754345c
commit 243a7c2a24

@ -0,0 +1,38 @@
package com.emr.controller;
import com.emr.entity.EmrPaperPositionDictionary;
import com.emr.entity.EmrPaperPositionInfo;
import com.emr.service.ipml.PaperPostionService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@Controller
@RequestMapping("paperPostion")
public class PaperPostionController {
@Autowired
private PaperPostionService paperPostionService;
@RequestMapping("selectPaperPositonDictionary")
@ResponseBody
public List<EmrPaperPositionDictionary> selectPaperPositonDictionary(){
try{
return paperPostionService.selectPaperPositonDictionary();
}catch (Exception e){
e.printStackTrace();
ExceptionPrintUtil.printException(e);
return null;
}
}
@RequestMapping("updatePaperPostion")
@ResponseBody
public Msg updatePaperPostion(EmrPaperPositionInfo obj) throws Exception{
paperPostionService.updatePaperPostion(obj);
return Msg.success();
}
}

@ -0,0 +1,22 @@
package com.emr.dao;
import com.emr.entity.EmrPaperPositionDictionary;
import java.util.List;
public interface EmrPaperPositionDictionaryMapper {
int deleteByPrimaryKey(Long id);
int insert(EmrPaperPositionDictionary record);
int insertSelective(EmrPaperPositionDictionary record);
EmrPaperPositionDictionary selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(EmrPaperPositionDictionary record);
int updateByPrimaryKey(EmrPaperPositionDictionary record);
List<EmrPaperPositionDictionary> selectAll();
}

@ -0,0 +1,19 @@
package com.emr.dao;
import com.emr.entity.EmrPaperPositionInfo;
public interface EmrPaperPositionInfoMapper {
int deleteByPrimaryKey(Long id);
int insert(EmrPaperPositionInfo record);
int insertSelective(EmrPaperPositionInfo record);
EmrPaperPositionInfo selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(EmrPaperPositionInfo record);
int updateByPrimaryKey(EmrPaperPositionInfo record);
EmrPaperPositionInfo selectPaperPositionInfoByPatientId(String patientId);
}

@ -67,6 +67,16 @@ public class Archive_Master_Vo extends Archive_Master{
private String masterIds;//id集合
private String masterIdsByTranDept;//转科的id集合
private String paperPosition;
private String paperPosition1;
private String paperPosition2;
private String paperPosition3;
private String paperPosition4;
}

@ -0,0 +1,172 @@
package com.emr.entity;
import java.io.Serializable;
import java.util.Date;
public class EmrPaperPositionDictionary implements Serializable {
private Long id;
private String typename;
private String typevalue;
private Integer effective;
private Date createTime;
private String createUserName;
private Date updateTime;
private String updateUserName;
private Integer int1;
private String str1;
private Date time1;
private Integer int2;
private String str2;
private Date time2;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTypename() {
return typename;
}
public void setTypename(String typename) {
this.typename = typename == null ? null : typename.trim();
}
public String getTypevalue() {
return typevalue;
}
public void setTypevalue(String typevalue) {
this.typevalue = typevalue == null ? null : typevalue.trim();
}
public Integer getEffective() {
return effective;
}
public void setEffective(Integer effective) {
this.effective = effective;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateUserName() {
return createUserName;
}
public void setCreateUserName(String createUserName) {
this.createUserName = createUserName == null ? null : createUserName.trim();
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateUserName() {
return updateUserName;
}
public void setUpdateUserName(String updateUserName) {
this.updateUserName = updateUserName == null ? null : updateUserName.trim();
}
public Integer getInt1() {
return int1;
}
public void setInt1(Integer int1) {
this.int1 = int1;
}
public String getStr1() {
return str1;
}
public void setStr1(String str1) {
this.str1 = str1 == null ? null : str1.trim();
}
public Date getTime1() {
return time1;
}
public void setTime1(Date time1) {
this.time1 = time1;
}
public Integer getInt2() {
return int2;
}
public void setInt2(Integer int2) {
this.int2 = int2;
}
public String getStr2() {
return str2;
}
public void setStr2(String str2) {
this.str2 = str2 == null ? null : str2.trim();
}
public Date getTime2() {
return time2;
}
public void setTime2(Date time2) {
this.time2 = time2;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", typename=").append(typename);
sb.append(", typevalue=").append(typevalue);
sb.append(", effective=").append(effective);
sb.append(", createTime=").append(createTime);
sb.append(", createUserName=").append(createUserName);
sb.append(", updateTime=").append(updateTime);
sb.append(", updateUserName=").append(updateUserName);
sb.append(", int1=").append(int1);
sb.append(", str1=").append(str1);
sb.append(", time1=").append(time1);
sb.append(", int2=").append(int2);
sb.append(", str2=").append(str2);
sb.append(", time2=").append(time2);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,205 @@
package com.emr.entity;
import java.io.Serializable;
import java.util.Date;
public class EmrPaperPositionInfo implements Serializable {
private Long id;
private String patientId;
private String paperPosition;
private String paperPosition1;
private String paperPosition2;
private String paperPosition3;
private String paperPosition4;
private String createTime;
private String createUserName;
private String updateTime;
private String updateUserName;
private String str1;
private Integer int1;
private String str2;
private Integer int2;
private Date time1;
private Date time2;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPatientId() {
return patientId;
}
public void setPatientId(String patientId) {
this.patientId = patientId == null ? null : patientId.trim();
}
public String getPaperPosition() {
return paperPosition;
}
public void setPaperPosition(String paperPosition) {
this.paperPosition = paperPosition == null ? null : paperPosition.trim();
}
public String getPaperPosition1() {
return paperPosition1;
}
public void setPaperPosition1(String paperPosition1) {
this.paperPosition1 = paperPosition1 == null ? null : paperPosition1.trim();
}
public String getPaperPosition2() {
return paperPosition2;
}
public void setPaperPosition2(String paperPosition2) {
this.paperPosition2 = paperPosition2 == null ? null : paperPosition2.trim();
}
public String getPaperPosition3() {
return paperPosition3;
}
public void setPaperPosition3(String paperPosition3) {
this.paperPosition3 = paperPosition3 == null ? null : paperPosition3.trim();
}
public String getPaperPosition4() {
return paperPosition4;
}
public void setPaperPosition4(String paperPosition4) {
this.paperPosition4 = paperPosition4 == null ? null : paperPosition4.trim();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime == null ? null : createTime.trim();
}
public String getCreateUserName() {
return createUserName;
}
public void setCreateUserName(String createUserName) {
this.createUserName = createUserName == null ? null : createUserName.trim();
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime == null ? null : updateTime.trim();
}
public String getUpdateUserName() {
return updateUserName;
}
public void setUpdateUserName(String updateUserName) {
this.updateUserName = updateUserName == null ? null : updateUserName.trim();
}
public String getStr1() {
return str1;
}
public void setStr1(String str1) {
this.str1 = str1 == null ? null : str1.trim();
}
public Integer getInt1() {
return int1;
}
public void setInt1(Integer int1) {
this.int1 = int1;
}
public String getStr2() {
return str2;
}
public void setStr2(String str2) {
this.str2 = str2 == null ? null : str2.trim();
}
public Integer getInt2() {
return int2;
}
public void setInt2(Integer int2) {
this.int2 = int2;
}
public Date getTime1() {
return time1;
}
public void setTime1(Date time1) {
this.time1 = time1;
}
public Date getTime2() {
return time2;
}
public void setTime2(Date time2) {
this.time2 = time2;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", patientId=").append(patientId);
sb.append(", paperPosition=").append(paperPosition);
sb.append(", paperPosition1=").append(paperPosition1);
sb.append(", paperPosition2=").append(paperPosition2);
sb.append(", paperPosition3=").append(paperPosition3);
sb.append(", paperPosition4=").append(paperPosition4);
sb.append(", createTime=").append(createTime);
sb.append(", createUserName=").append(createUserName);
sb.append(", updateTime=").append(updateTime);
sb.append(", updateUserName=").append(updateUserName);
sb.append(", str1=").append(str1);
sb.append(", int1=").append(int1);
sb.append(", str2=").append(str2);
sb.append(", int2=").append(int2);
sb.append(", time1=").append(time1);
sb.append(", time2=").append(time2);
sb.append("]");
return sb.toString();
}
}

@ -55,7 +55,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
@Autowired
private Emr_DictionaryMapper dictionaryMapper;
@Autowired
private ArchiveTransferDeptUserMapper transferDeptUserMapper;
private PaperPostionService paperPostionService;
/**
*
* */
@ -1085,6 +1085,8 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
List<ArchiveFlowRole> currentRoleAndNextRole = flowInfoService.getCurrentRoleAndNextRole(currentStatus, EnumVerify.DocState.MedicalRoomCheck.getCode(),archiveFlowRoles);
//添加流转节点
flowInfoService.insertFlowInfo(master.getId(), master.getRemark(), currentRoleAndNextRole.get(0), currentRoleAndNextRole.get(1), sumbitDate);
//添加纸质位置
paperPostionService.savePaperPostion(master);
}
}
}

@ -0,0 +1,166 @@
package com.emr.service.ipml;
import com.emr.dao.EmrPaperPositionDictionaryMapper;
import com.emr.dao.EmrPaperPositionInfoMapper;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.EmrPaperPositionDictionary;
import com.emr.entity.EmrPaperPositionInfo;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.IDHelper;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.*;
@Service
@Transactional
public class PaperPostionService {
@Autowired
private EmrPaperPositionDictionaryMapper paperPositionDictionaryMapper;
@Autowired
private EmrPaperPositionInfoMapper paperPositionInfoMapper;
@Autowired
private CommomService commomService;
public List<EmrPaperPositionDictionary> selectPaperPositonDictionary(){
//查询全部
List<EmrPaperPositionDictionary> list = paperPositionDictionaryMapper.selectAll();
//定义返回列表
List<EmrPaperPositionDictionary> returnList = new ArrayList<>();
if(!CollectionUtils.isEmpty(list)){
//定义柜子列名集合
Set<String> set = new LinkedHashSet<>();
for(EmrPaperPositionDictionary obj : list){
set.add(obj.getTypename());
}
for(String typeName : set){
EmrPaperPositionDictionary vo = new EmrPaperPositionDictionary();
vo.setTypename(typeName);
//定义接收柜子列值集合
StringBuilder typeValues = new StringBuilder();
for(EmrPaperPositionDictionary obj : list){
if(obj.getTypename().equals(typeName)){
if(StringUtils.isNotBlank(typeValues)){
typeValues.append(",");
}
typeValues.append(obj.getTypevalue());
}
}
vo.setTypevalue(typeValues.toString());
returnList.add(vo);
}
}
return returnList;
}
public void savePaperPostion(Archive_Master_Vo archiveMaster) {
if(StringUtils.isNotBlank(archiveMaster.getPaperPosition()) || StringUtils.isNotBlank(archiveMaster.getPaperPosition1())) {
EmrPaperPositionInfo obj = new EmrPaperPositionInfo();
BeanUtils.copyProperties(archiveMaster, obj);
updatePaperPostion(obj);
}
}
/**
*
* @param obj
*/
private void handlePaperPostion(EmrPaperPositionInfo obj) {
if(StringUtils.isNotBlank(obj.getPaperPosition())){
//带横杠的拆横杠
String[] paperPositions = obj.getPaperPosition().split("-");
for(int i = 0;i < paperPositions.length;i++){
if(StringUtils.isNotBlank(paperPositions[i])) {
//组织字段值
String fieldName = "paperPosition" + (i + 1);
try{
Field field = obj.getClass().getDeclaredField(fieldName);
field.setAccessible(true);
field.set(obj,paperPositions[i]);
}catch (Exception e){
e.printStackTrace();
ExceptionPrintUtil.printException(e);
}
}
}
}else{
//多个值的用横杠拼接
String paperPosition = obj.getPaperPosition1();
if(StringUtils.isNotBlank(obj.getPaperPosition2())){
paperPosition += "-" + obj.getPaperPosition2();
}
if(StringUtils.isNotBlank(obj.getPaperPosition3())){
paperPosition += "-" + obj.getPaperPosition3();
}
if(StringUtils.isNotBlank(obj.getPaperPosition4())){
paperPosition += "-" + obj.getPaperPosition4();
}
obj.setPaperPosition(paperPosition);
}
}
/**
*
* @param obj
*/
public void updateByPrimaryKeySelectiveUpdatePaperPosition(EmrPaperPositionInfo obj){
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String time = fmt.format(new Date());
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String currentUserName = commomService.getCurrentUserName(request);
obj.setUpdateUserName(currentUserName);
obj.setUpdateTime(time);
paperPositionInfoMapper.updateByPrimaryKeySelective(obj);
}
/**
*
* @param obj
*/
public void insertPaperPosition(EmrPaperPositionInfo obj){
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String time = fmt.format(new Date());
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String currentUserName = commomService.getCurrentUserName(request);
try {
long id = IDHelper.NewID();
obj.setId(id);
} catch (Exception e) {
e.printStackTrace();
ExceptionPrintUtil.printException(e);
}
obj.setUpdateUserName(currentUserName);
obj.setUpdateTime(time);
obj.setCreateUserName(currentUserName);
obj.setCreateTime(time);
paperPositionInfoMapper.insertSelective(obj);
}
public void updatePaperPostion(EmrPaperPositionInfo obj) {
if(StringUtils.isNotBlank(obj.getPaperPosition()) || StringUtils.isNotBlank(obj.getPaperPosition1())) {
//处理纸质信息值带横杠的拆横杠,多个值的用横杠拼接
handlePaperPostion(obj);
//查询是否存在,存在则更新
EmrPaperPositionInfo emrPaperPositionInfo = paperPositionInfoMapper.selectPaperPositionInfoByPatientId(obj.getPatientId());
if (null != emrPaperPositionInfo) {
emrPaperPositionInfo.setPaperPosition(obj.getPaperPosition());
emrPaperPositionInfo.setPaperPosition1(obj.getPaperPosition1());
emrPaperPositionInfo.setPaperPosition2(obj.getPaperPosition2());
emrPaperPositionInfo.setPaperPosition3(obj.getPaperPosition3());
emrPaperPositionInfo.setPaperPosition4(obj.getPaperPosition4());
updateByPrimaryKeySelectiveUpdatePaperPosition(emrPaperPositionInfo);
} else {
insertPaperPosition(obj);
}
}
}
}

@ -769,6 +769,7 @@
<!--查询已归档记录-->
<select id="selectFiled" resultMap="BaseResultMap2">
SELECT
emr_paper_position_info.paper_position,
archive_master.id,
archive_master.inp_no,
archive_master.patient_id,
@ -822,6 +823,9 @@
WHERE
parent_id = 'dept_code'
) f ON archive_master.dept_name = f. CODE
LEFT JOIN
emr_paper_position_info
ON emr_paper_position_info.patient_id = archive_master.patient_id
WHERE
archive_master.ArchiveState = '128'
<if test="inpNo != null and inpNo != ''">

@ -0,0 +1,203 @@
<?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="com.emr.dao.EmrPaperPositionDictionaryMapper" >
<resultMap id="BaseResultMap" type="com.emr.entity.EmrPaperPositionDictionary" >
<id column="id" property="id" jdbcType="BIGINT" />
<result column="typeName" property="typename" jdbcType="NVARCHAR" />
<result column="typeValue" property="typevalue" jdbcType="NVARCHAR" />
<result column="effective" property="effective" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="create_user_name" property="createUserName" jdbcType="NVARCHAR" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
<result column="update_user_name" property="updateUserName" jdbcType="NVARCHAR" />
<result column="int1" property="int1" jdbcType="INTEGER" />
<result column="str1" property="str1" jdbcType="NVARCHAR" />
<result column="time1" property="time1" jdbcType="TIMESTAMP" />
<result column="int2" property="int2" jdbcType="INTEGER" />
<result column="str2" property="str2" jdbcType="NVARCHAR" />
<result column="time2" property="time2" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, typeName, typeValue, effective, create_time, create_user_name, update_time, update_user_name,
int1, str1, time1, int2, str2, time2
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select
<include refid="Base_Column_List" />
from emr_paper_position_dictionary
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from emr_paper_position_dictionary
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.emr.entity.EmrPaperPositionDictionary" >
insert into emr_paper_position_dictionary (id, typeName, typeValue,
effective, create_time, create_user_name,
update_time, update_user_name, int1,
str1, time1, int2,
str2, time2)
values (#{id,jdbcType=BIGINT}, #{typename,jdbcType=NVARCHAR}, #{typevalue,jdbcType=NVARCHAR},
#{effective,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createUserName,jdbcType=NVARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{updateUserName,jdbcType=NVARCHAR}, #{int1,jdbcType=INTEGER},
#{str1,jdbcType=NVARCHAR}, #{time1,jdbcType=TIMESTAMP}, #{int2,jdbcType=INTEGER},
#{str2,jdbcType=NVARCHAR}, #{time2,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.emr.entity.EmrPaperPositionDictionary" >
insert into emr_paper_position_dictionary
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="typename != null" >
typeName,
</if>
<if test="typevalue != null" >
typeValue,
</if>
<if test="effective != null" >
effective,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="createUserName != null" >
create_user_name,
</if>
<if test="updateTime != null" >
update_time,
</if>
<if test="updateUserName != null" >
update_user_name,
</if>
<if test="int1 != null" >
int1,
</if>
<if test="str1 != null" >
str1,
</if>
<if test="time1 != null" >
time1,
</if>
<if test="int2 != null" >
int2,
</if>
<if test="str2 != null" >
str2,
</if>
<if test="time2 != null" >
time2,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="typename != null" >
#{typename,jdbcType=NVARCHAR},
</if>
<if test="typevalue != null" >
#{typevalue,jdbcType=NVARCHAR},
</if>
<if test="effective != null" >
#{effective,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserName != null" >
#{createUserName,jdbcType=NVARCHAR},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUserName != null" >
#{updateUserName,jdbcType=NVARCHAR},
</if>
<if test="int1 != null" >
#{int1,jdbcType=INTEGER},
</if>
<if test="str1 != null" >
#{str1,jdbcType=NVARCHAR},
</if>
<if test="time1 != null" >
#{time1,jdbcType=TIMESTAMP},
</if>
<if test="int2 != null" >
#{int2,jdbcType=INTEGER},
</if>
<if test="str2 != null" >
#{str2,jdbcType=NVARCHAR},
</if>
<if test="time2 != null" >
#{time2,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.EmrPaperPositionDictionary" >
update emr_paper_position_dictionary
<set >
<if test="typename != null" >
typeName = #{typename,jdbcType=NVARCHAR},
</if>
<if test="typevalue != null" >
typeValue = #{typevalue,jdbcType=NVARCHAR},
</if>
<if test="effective != null" >
effective = #{effective,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createUserName != null" >
create_user_name = #{createUserName,jdbcType=NVARCHAR},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateUserName != null" >
update_user_name = #{updateUserName,jdbcType=NVARCHAR},
</if>
<if test="int1 != null" >
int1 = #{int1,jdbcType=INTEGER},
</if>
<if test="str1 != null" >
str1 = #{str1,jdbcType=NVARCHAR},
</if>
<if test="time1 != null" >
time1 = #{time1,jdbcType=TIMESTAMP},
</if>
<if test="int2 != null" >
int2 = #{int2,jdbcType=INTEGER},
</if>
<if test="str2 != null" >
str2 = #{str2,jdbcType=NVARCHAR},
</if>
<if test="time2 != null" >
time2 = #{time2,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.emr.entity.EmrPaperPositionDictionary" >
update emr_paper_position_dictionary
set typeName = #{typename,jdbcType=NVARCHAR},
typeValue = #{typevalue,jdbcType=NVARCHAR},
effective = #{effective,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_user_name = #{createUserName,jdbcType=NVARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_user_name = #{updateUserName,jdbcType=NVARCHAR},
int1 = #{int1,jdbcType=INTEGER},
str1 = #{str1,jdbcType=NVARCHAR},
time1 = #{time1,jdbcType=TIMESTAMP},
int2 = #{int2,jdbcType=INTEGER},
str2 = #{str2,jdbcType=NVARCHAR},
time2 = #{time2,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<!--查询全部-->
<select id="selectAll" resultMap="BaseResultMap">
select * from emr_paper_position_dictionary
</select>
</mapper>

@ -0,0 +1,239 @@
<?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="com.emr.dao.EmrPaperPositionInfoMapper" >
<resultMap id="BaseResultMap" type="com.emr.entity.EmrPaperPositionInfo" >
<id column="id" property="id" jdbcType="BIGINT" />
<result column="patient_id" property="patientId" jdbcType="NVARCHAR" />
<result column="paper_position" property="paperPosition" jdbcType="NVARCHAR" />
<result column="paper_position1" property="paperPosition1" jdbcType="NVARCHAR" />
<result column="paper_position2" property="paperPosition2" jdbcType="NVARCHAR" />
<result column="paper_position3" property="paperPosition3" jdbcType="NVARCHAR" />
<result column="paper_position4" property="paperPosition4" jdbcType="NVARCHAR" />
<result column="create_time" property="createTime" jdbcType="VARCHAR" />
<result column="create_user_name" property="createUserName" jdbcType="NVARCHAR" />
<result column="update_time" property="updateTime" jdbcType="VARCHAR" />
<result column="update_user_name" property="updateUserName" jdbcType="NVARCHAR" />
<result column="str1" property="str1" jdbcType="NVARCHAR" />
<result column="int1" property="int1" jdbcType="INTEGER" />
<result column="str2" property="str2" jdbcType="NVARCHAR" />
<result column="int2" property="int2" jdbcType="INTEGER" />
<result column="time1" property="time1" jdbcType="TIMESTAMP" />
<result column="time2" property="time2" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, patient_id, paper_position, paper_position1, paper_position2, paper_position3,
paper_position4, create_time, create_user_name, update_time, update_user_name, str1,
int1, str2, int2, time1, time2
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select
<include refid="Base_Column_List" />
from emr_paper_position_info
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from emr_paper_position_info
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.emr.entity.EmrPaperPositionInfo" >
insert into emr_paper_position_info (id, patient_id, paper_position,
paper_position1, paper_position2, paper_position3,
paper_position4, create_time, create_user_name,
update_time, update_user_name, str1,
int1, str2, int2,
time1, time2)
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=NVARCHAR}, #{paperPosition,jdbcType=NVARCHAR},
#{paperPosition1,jdbcType=NVARCHAR}, #{paperPosition2,jdbcType=NVARCHAR}, #{paperPosition3,jdbcType=NVARCHAR},
#{paperPosition4,jdbcType=NVARCHAR}, #{createTime,jdbcType=VARCHAR}, #{createUserName,jdbcType=NVARCHAR},
#{updateTime,jdbcType=VARCHAR}, #{updateUserName,jdbcType=NVARCHAR}, #{str1,jdbcType=NVARCHAR},
#{int1,jdbcType=INTEGER}, #{str2,jdbcType=NVARCHAR}, #{int2,jdbcType=INTEGER},
#{time1,jdbcType=TIMESTAMP}, #{time2,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.emr.entity.EmrPaperPositionInfo" >
insert into emr_paper_position_info
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="patientId != null" >
patient_id,
</if>
<if test="paperPosition != null" >
paper_position,
</if>
<if test="paperPosition1 != null" >
paper_position1,
</if>
<if test="paperPosition2 != null" >
paper_position2,
</if>
<if test="paperPosition3 != null" >
paper_position3,
</if>
<if test="paperPosition4 != null" >
paper_position4,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="createUserName != null" >
create_user_name,
</if>
<if test="updateTime != null" >
update_time,
</if>
<if test="updateUserName != null" >
update_user_name,
</if>
<if test="str1 != null" >
str1,
</if>
<if test="int1 != null" >
int1,
</if>
<if test="str2 != null" >
str2,
</if>
<if test="int2 != null" >
int2,
</if>
<if test="time1 != null" >
time1,
</if>
<if test="time2 != null" >
time2,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="patientId != null" >
#{patientId,jdbcType=NVARCHAR},
</if>
<if test="paperPosition != null" >
#{paperPosition,jdbcType=NVARCHAR},
</if>
<if test="paperPosition1 != null" >
#{paperPosition1,jdbcType=NVARCHAR},
</if>
<if test="paperPosition2 != null" >
#{paperPosition2,jdbcType=NVARCHAR},
</if>
<if test="paperPosition3 != null" >
#{paperPosition3,jdbcType=NVARCHAR},
</if>
<if test="paperPosition4 != null" >
#{paperPosition4,jdbcType=NVARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=VARCHAR},
</if>
<if test="createUserName != null" >
#{createUserName,jdbcType=NVARCHAR},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=VARCHAR},
</if>
<if test="updateUserName != null" >
#{updateUserName,jdbcType=NVARCHAR},
</if>
<if test="str1 != null" >
#{str1,jdbcType=NVARCHAR},
</if>
<if test="int1 != null" >
#{int1,jdbcType=INTEGER},
</if>
<if test="str2 != null" >
#{str2,jdbcType=NVARCHAR},
</if>
<if test="int2 != null" >
#{int2,jdbcType=INTEGER},
</if>
<if test="time1 != null" >
#{time1,jdbcType=TIMESTAMP},
</if>
<if test="time2 != null" >
#{time2,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.EmrPaperPositionInfo" >
update emr_paper_position_info
<set >
<if test="patientId != null" >
patient_id = #{patientId,jdbcType=NVARCHAR},
</if>
<if test="paperPosition != null" >
paper_position = #{paperPosition,jdbcType=NVARCHAR},
</if>
<if test="paperPosition1 != null" >
paper_position1 = #{paperPosition1,jdbcType=NVARCHAR},
</if>
<if test="paperPosition2 != null" >
paper_position2 = #{paperPosition2,jdbcType=NVARCHAR},
</if>
<if test="paperPosition3 != null" >
paper_position3 = #{paperPosition3,jdbcType=NVARCHAR},
</if>
<if test="paperPosition4 != null" >
paper_position4 = #{paperPosition4,jdbcType=NVARCHAR},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=VARCHAR},
</if>
<if test="createUserName != null" >
create_user_name = #{createUserName,jdbcType=NVARCHAR},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=VARCHAR},
</if>
<if test="updateUserName != null" >
update_user_name = #{updateUserName,jdbcType=NVARCHAR},
</if>
<if test="str1 != null" >
str1 = #{str1,jdbcType=NVARCHAR},
</if>
<if test="int1 != null" >
int1 = #{int1,jdbcType=INTEGER},
</if>
<if test="str2 != null" >
str2 = #{str2,jdbcType=NVARCHAR},
</if>
<if test="int2 != null" >
int2 = #{int2,jdbcType=INTEGER},
</if>
<if test="time1 != null" >
time1 = #{time1,jdbcType=TIMESTAMP},
</if>
<if test="time2 != null" >
time2 = #{time2,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.emr.entity.EmrPaperPositionInfo" >
update emr_paper_position_info
set patient_id = #{patientId,jdbcType=NVARCHAR},
paper_position = #{paperPosition,jdbcType=NVARCHAR},
paper_position1 = #{paperPosition1,jdbcType=NVARCHAR},
paper_position2 = #{paperPosition2,jdbcType=NVARCHAR},
paper_position3 = #{paperPosition3,jdbcType=NVARCHAR},
paper_position4 = #{paperPosition4,jdbcType=NVARCHAR},
create_time = #{createTime,jdbcType=VARCHAR},
create_user_name = #{createUserName,jdbcType=NVARCHAR},
update_time = #{updateTime,jdbcType=VARCHAR},
update_user_name = #{updateUserName,jdbcType=NVARCHAR},
str1 = #{str1,jdbcType=NVARCHAR},
int1 = #{int1,jdbcType=INTEGER},
str2 = #{str2,jdbcType=NVARCHAR},
int2 = #{int2,jdbcType=INTEGER},
time1 = #{time1,jdbcType=TIMESTAMP},
time2 = #{time2,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<!--根据记账号查询记录-->
<select id="selectPaperPositionInfoByPatientId" resultType="com.emr.entity.EmrPaperPositionInfo">
select * from emr_paper_position_info where patient_id = #{patientId}
</select>
</mapper>

@ -376,7 +376,7 @@
</div>
<footer class="main-footer">
<div class="pull-right">
<b>Version</b> 20210208
<b>Version</b> 20210313
</div>
<strong>Copyright &copy; 2019-2090 厦门嘉时软件.</strong> All rights
reserved.

@ -589,8 +589,17 @@
<span style="vertical-align:top;">是否修改终审时间:</span>
<input type="checkbox" id="isChange" onclick="changeBox()">
</div>
<div class="form-group" id="block">
<div class="form-group" id="block"></div>
<div class="form-group ">
<span style="vertical-align:top;float:left;margin-top: 5px">纸质位置:</span>
<!--赋值选择输入或自定义输入-->
<input type="hidden" id="paperPostionValue" value="1">
<!--赋值选择输入个数-->
<input type="hidden" id="paperPostionValueLength">
<!--接收记账号-->
<input type="hidden" id="patientId">
<div id="block1" style="float:left">
</div>
</div>
</form>
</div>
@ -662,7 +671,7 @@
</div>
</div>
</body>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2021-02-02"></script>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2021-03-13"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-16"></script>
<script src="${path}/static/js/statistics/getDeptCommom.js"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>

@ -235,6 +235,32 @@
</div>
</div>
</div>
<%--编辑纸质位置弹窗--%>
<div class="modal fade verifyModal" id="paperPosition" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content modal-contentLow">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">纸质位置</h4>
</div>
<div class="modal-body">
<form>
<input type="hidden" id="patientId1">
<div class="form-group ">
<span style="vertical-align:top;">纸质位置:</span>
<input type="text" id="paperPosition1" maxlength="16">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">返回</button>
<button type="button" class="btn btn-primary btn-sm" id="updatePaperPosition">保存</button>
</div>
</div>
</div>
</div>
</body>
<script src="${path}/static/js/medicalRecallList/medicalRecallList.js?time=2020-10-13"></script>
<script src="${path}/static/js/medicalRecallList/medicalRecallList.js?time=2021-03-13"></script>
</html>

@ -232,7 +232,7 @@ function initTable() {
},
'click .verifyInfo': function (e, value, row, index) {
//调用审批diag
callApproveDiag(row.id,1);
callApproveDiag(row.id,1,row.patientId);
},
'click .selInfo': function (e, value, row, index) {
//查询是否医生或护士是否提交
@ -401,6 +401,48 @@ $("#verifyBtn").on('click', function () {
}else{
//只有一个直接提交
var ids = $("#archiveId").val();
var paperPosition = null;
var paperPosition1 = null;
var paperPosition2 = null;
var paperPosition3 = null;
var paperPosition4 = null;
//获取纸质输入类型
var paperPostionValue = $("#paperPostionValue").val();
if(paperPostionValue == 1){
//定义输入个数
var valueLength = 0;
//获取柜子列个数
var paperPostionValueLength = $("#paperPostionValueLength").val();
if(paperPostionValueLength >= 1){
paperPosition1 = $("#paperPosition1").val();
if('' != paperPosition1){
valueLength ++;
}
}
if(paperPostionValueLength >= 2){
paperPosition2 = $("#paperPosition2").val();
if('' != paperPosition2){
valueLength ++;
}
}
if(paperPostionValueLength >= 3){
paperPosition3 = $("#paperPosition3").val();
if('' != paperPosition3){
valueLength ++;
}
}
if(paperPostionValueLength >= 4){
paperPosition4 = $("#paperPosition4").val();
if('' != paperPosition4){
valueLength ++;
}
}
//判断只输入一个
if(valueLength > 0 && valueLength < paperPostionValueLength){
toastr.warning("纸质信息必须输入全部");
return false;
}
}
//判断是否有扫描纸质
$.ajax({
type:'get',
@ -435,11 +477,51 @@ $("#wzSaveBtn").click(function(){
//终审方法
function approveMethod(){
var paperPosition = null;
var paperPosition1 = null;
var paperPosition2 = null;
var paperPosition3 = null;
var paperPosition4 = null;
//获取纸质输入类型
var paperPostionValue = $("#paperPostionValue").val();
if(paperPostionValue == 1){
//获取柜子列个数
var paperPostionValueLength = $("#paperPostionValueLength").val();
if(paperPostionValueLength >= 1){
if($("#paperPosition1").val() != 'undefined') {
paperPosition1 = $("#paperPosition1").val();
}
}
if(paperPostionValueLength >= 2){
if($("#paperPosition2").val() != 'undefined') {
paperPosition2 = $("#paperPosition2").val();
}
}
if(paperPostionValueLength >= 3){
if($("#paperPosition3").val() != 'undefined') {
paperPosition3 = $("#paperPosition3").val();
}
}
if(paperPostionValueLength >= 4){
if($("#paperPosition4").val() != 'undefined') {
paperPosition4 = $("#paperPosition4").val();
}
}
}else{
paperPosition = $("#paperPosition").val();
}
//归档状态改为初审还是有就是初审内容保存
$.ajax({
url: path+"/lastVerify/updateStateByArchivId",
type: "POST",
data: {id: $("#archiveId").val(), remark: $("#verifyText").val(),changeReason:$("#changeReason").val(),checkedDatetime:$("#checkedDateTime").val(),status:$("#status1").val(),formToken:$("#formToken").val()},
data: {id: $("#archiveId").val(), remark: $("#verifyText").val(),changeReason:$("#changeReason").val(),checkedDatetime:$("#checkedDateTime").val(),status:$("#status1").val(),formToken:$("#formToken").val(),
paperPosition:paperPosition,
paperPosition1:paperPosition1,
paperPosition2:paperPosition2,
paperPosition3:paperPosition3,
paperPosition4:paperPosition4,
patientId:$("#patientId").val()
},
dataType:'json',
success: function (result) {
if (result.code == 100) {
@ -461,14 +543,17 @@ $("#approvesBtn").on('click', function () {
var count = selects.length;
if(count !== 0){
var ids = '';
var patientIds = '';
for (var i = 0; i < count; i++) {
if(i === 0){
ids += selects[i].id;
patientIds += selects[i].patientId;
}else{
ids += "," + selects[i].id;
patientIds += "," + selects[i].patientId;
}
}
callApproveDiag(ids,count);
callApproveDiag(ids,count,patientIds);
}else{
toastr.warning("批量审批请至少选中一个");
}
@ -480,7 +565,7 @@ $("#sureBtn").on('click',function(){
});
//调用审批diag
function callApproveDiag(ids,count) {
function callApproveDiag(ids,count,patientId) {
$('#verifyModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
@ -491,6 +576,9 @@ function callApproveDiag(ids,count) {
$("#verifyText").val("");
$("#approveCount").val(count);
$("#changeReason").val('');
$("#patientId").val(patientId);
//加载纸质位置字典
loadSelectPaperPostion();
}
//查看初审信息
@ -638,4 +726,56 @@ $("#excelBtn").click(function () {
window.location.href = path+"/lastVerify/exportExcel?inpNo=" + inpNo + "&visitId=" + visitId +
"&name=" + name + "&deptName=" + deptName
+ "&startDateTo=" + startDateTo + "&endDateTo=" + endDateTo+"&isSearch="+$("#isSearch").val()+"&doctorInCharge="+$("#doctorInCharge").val()+"&isSign="+$("#isSign").val()+"&checkName="+$("#checkName").val();
});
});
//纸质位置切换自定义输入
function paperSelect(){
$("#block1").empty();
var str = '<input type="text" id="paperPosition" class="input-sm" maxlength="16">\n' +
' <label for="paperPositionSelect1" style="cursor:pointer"><input type="checkbox" title="选择输入" onchange="paperSelect1()" id="paperPositionSelect1">选择输入</label>';
$("#block1").append(str);
$("#paperPostionValue").val(2);
};
//纸质位置切换选择输入
function paperSelect1(){
loadSelectPaperPostion();
};
//查询纸质位置字典
function selectPaperPositonDictionary(){
var selectValue = '';
$.ajax({
type:'get',
url:path+'/paperPostion/selectPaperPositonDictionary',
dateType:'json',
async:false,
success:function(data){
if(null != data) {
for (var i = 0; i < data.length; i++) {
selectValue += '<select id="paperPosition'+(i+1)+'"><option value="">请选择</option>';
//取出选择值集合
var typeValues = data[i].typevalue.split(",");
for(var j = 0;j < typeValues.length;j++){
selectValue += '<option value="'+typeValues[j]+'">'+typeValues[j]+'</option>';
}
selectValue += '</select>';
selectValue += data[i].typename;
}
$("#paperPostionValueLength").val(data.length);
}
}
});
return selectValue;
}
//返回纸质选择输入html字符串
function selectSelectPaperPostion(){
var paperPositionSelect = selectPaperPositonDictionary();
paperPositionSelect += '<label for="paperPositionSelect" style="cursor:pointer"><input type="checkbox" title="自定义输入" onchange="paperSelect()" id="paperPositionSelect">自定义输入</label>';
return paperPositionSelect;
}
//加载纸质选择输入
function loadSelectPaperPostion(){
$("#block1").empty();
var str = selectSelectPaperPostion();
$("#block1").append(str);
$("#paperPostionValue").val(1);
}

@ -207,6 +207,12 @@ function initTable() {
align: 'center',
valign: 'middle'
},
{
title: '纸质位置',
field: 'paperPosition',
align: 'center',
valign: 'middle'
},
{
title: "操作",
align: 'left',
@ -225,9 +231,9 @@ function initTable() {
}
}
temp += '<button type="button" class="btn btn-sm btn-success showFlowInfo" title="查看流程">查看流程</button>';
return temp;
}
temp += '<button type="button" class="btn btn-sm btn-primary paperPosition" title="纸质位置">纸质位置</button>';
return temp;
},
events: {
//查看流程
@ -243,6 +249,16 @@ function initTable() {
var visitId = row.visitId;
var dischargeDateTime = row.dischargeDateTime;
$("#showFlowInfoIframe").prop("src",path+"/beHosp/toShowFlowInfo?id="+masterId+"&name="+name+"&inpNo="+inpNo+"&visitId="+visitId+"&dischargeDateTime="+dischargeDateTime+"&role=4");
},
//编辑纸质位置
'click .paperPosition': function (e, value, row) {
$('#paperPosition').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
$("#patientId1").val(row.patientId);
$("#paperPosition1").val(row.paperPosition);
}
},
cellStyle: function (value, row, index) {
@ -382,4 +398,22 @@ $("#stateBtn").click(function () {
toastr.error("召回失败!")
}
});
});
});
//修改纸质位置
$("#updatePaperPosition").click(function(){
$.ajax({
type:'post',
url:path+"/paperPostion/updatePaperPostion",
data:{patientId:$("#patientId1").val(),paperPosition:$("#paperPosition1").val()},
dataType:'json',
success:function(data){
if(data.code==100){
toastr.success("保存成功!");
$('#table').bootstrapTable('refresh');
$('#paperPosition').modal('hide'); //手动关闭
}else{
toastr.error(result.msg);
}
}
})
})
Loading…
Cancel
Save