病案封存页面

master
linjj 2 years ago
parent 49dcd2bdd1
commit bce79c8389

@ -202,7 +202,6 @@ public class beHospitaledController {
if (flagNum == 0) {
try {
String endpoint = HomepageDictionary;
//String endpoint = "http://localhost:8080/ca3/services/caSynrochnized?wsdl";
String method = HomepageMethod;
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
Client client = factory.createClient(endpoint);
@ -210,8 +209,6 @@ public class beHospitaledController {
Object[] res = null;
res = client.invoke(method, temp);
result = (String) res[0];
//给方法传递参数,并且调用方法
//System.out.println("result is " + result);
} catch (Exception e) {
System.err.println(e.toString());
return "连接不到完整性接口!";
@ -222,6 +219,7 @@ public class beHospitaledController {
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
archiveMaster.setArchivestate(emrFaultDetail.getState());
archiveMaster.setLockinfo(result);
archiveMaster.setDirectorFlag(1);
archiveMaster.setCmtDoctor(1);
archiveMaster.setCmtNurse(1);
int bol = archiveMasterService.updateByClo(archiveMaster);

@ -163,6 +163,8 @@ public interface Archive_MasterMapper {
* @return
*/
List<Archive_Master_Vo> selectOverdue(Archive_Master_Vo record);
//获取初次审核信息
List<Archive_Master_Vo>getFollowingInfo(@Param("ids")String ids);
/**
* -

@ -135,6 +135,9 @@ public interface Emr_Fault_DetailMapper {
*/
List<Emr_Fault_Vo> masterTotalList(Emr_Fault_Vo emrFaultVo);
//获取费用信息
List<Emr_Fault_Vo> totalBackFee(@Param("ids") String ids,@Param("backFee")String backFee);
/**
* 退

@ -20,6 +20,16 @@ public class Archive_Master {
private String dischargeDateTime;
private String archivestate;
//科主任审核状态0否1.已
private int directorFlag;
public int getDirectorFlag() {
return directorFlag;
}
public void setDirectorFlag(int directorFlag) {
this.directorFlag = directorFlag;
}
private String admissionDateTime;

@ -947,6 +947,24 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
List<Archive_Master_Vo> list = archiveMasterMapper.selectOverdue(archiveMasterVo);
if(list!=null && list.size()>0) {
//赋值签收信息
//masterIds集合
List<String> masterIds = ListUtils.distinctSelect(list, Archive_Master_Vo::getMasterId);
//转成逗号拼接
String ids = String.join(",", masterIds);
//根据分页的masterId获取签收信息
List<Archive_Master_Vo> followingInfo = archiveMasterMapper.getFollowingInfo(ids);
//医生是否有缺陷
Map<String, Archive_Master_Vo> followingMap = ListUtils.toMap(followingInfo, Archive_Master_Vo::getMasterId);
Setters.<Archive_Master_Vo>instance().list(list).cycleSetProperties(p -> {
String masterId = p.getMasterId();
if (followingMap.containsKey(masterId)){
String handleTime = followingMap.get(masterId).getHandleTime();
String handleName = followingMap.get(masterId).getHandleName();
p.setHandleTime(handleTime);
p.setHandleName(handleName);
}
});
//查询用户集合
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<Power_User_Dto> powerUserList = null;
@ -956,12 +974,8 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
//遍历赋值
for (Archive_Master_Vo archiveMaster : list) {
if (null != powerUserList) {
//获取主管医生
String doctorInCharge = archiveMaster.getDoctorInCharge();
//获取 初审人
String firstInstance = archiveMaster.getFirstInstance();
//遍历匹配工号赋值姓名
if (StringUtils.isNotBlank(archiveMaster.getHandleTime())){
//赋值超期天数
String overTime1 = archiveMaster.getOverTime1();
String handleTime = archiveMaster.getHandleTime();
String dischargeDateTime = archiveMaster.getDischargeDateTime();
@ -972,19 +986,30 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
} catch (ParseException e) {
e.printStackTrace();
}
Calendar ca1 = Calendar.getInstance();
Calendar ca2 = Calendar.getInstance();
ca1.setTime(date1);
ca2.setTime(date2);
long distanceMin =( ca2.getTimeInMillis()- ca1.getTimeInMillis())/(1000*60*60*24);
int i= (int)distanceMin;
Calendar ca1 = Calendar.getInstance();
Calendar ca2 = Calendar.getInstance();
Calendar ca3 = Calendar.getInstance();
ca1.setTime(date1);
ca2.setTime(date2);
ca3.setTime(date3);
long distanceMin =( ca2.getTimeInMillis()- ca1.getTimeInMillis())/(1000*60*60*24);
long distanceMin2 =( ca2.getTimeInMillis()- ca3.getTimeInMillis())/(1000*60*60*24);
int i= (int)distanceMin;
int i2= (int)distanceMin2;
archiveMaster.setDiffDay(String.valueOf(i2));
archiveMasterVo.setDischargeDateTime1(date3);
if (i>0){
archiveMaster.setOverTime(i);
}else {
archiveMaster.setOverTime(0);
}
}
if (null != powerUserList) {
//获取主管医生
String doctorInCharge = archiveMaster.getDoctorInCharge();
//获取 初审人
String firstInstance = archiveMaster.getFirstInstance();
//遍历匹配工号赋值姓名
for (Power_User_Dto powerUserDto : powerUserList) {
String name = powerUserDto.getName();
if (StringUtils.isNotBlank(doctorInCharge) && powerUserDto.getUserName().equals(doctorInCharge)) {

@ -15,6 +15,8 @@ import com.emr.service.Emr_DictionaryService;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.service.Emr_Fault_TypeService;
import com.emr.service.PowerUserService;
import com.emr.util.ListUtils;
import com.emr.util.Setters;
import com.emr.vo.Power_User_Dto;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@ -339,7 +341,39 @@ public class Emr_Fault_DetailServiceImpl implements Emr_Fault_DetailService {
}
emrFaultVo.setBackFee(backFee);
List<Emr_Fault_Vo> list= emrFaultDetailMapper.masterTotalList(emrFaultVo);
if(list!=null && list.size()>0) {
// //masterIds集合
// List<String> masterIds = ListUtils.distinctSelect(list, Emr_Fault_Vo::getArchiveDetailId);
// //转成逗号拼接
// String ids = String.join(",", masterIds);
// List<Emr_Fault_Vo> emrFaultVos = emrFaultDetailMapper.totalBackFee(ids, backFee);
// //缺陷费用记录
// Map<String, Emr_Fault_Vo> emrFaultMap = ListUtils.toMap(emrFaultVos, Emr_Fault_Vo::getMasterId);
// //根据masterid插入缺陷费用信息
// Setters.<Emr_Fault_Vo>instance().list(list).cycleSetProperties(p -> {
// String masterId = p.getMasterId();
// if (emrFaultMap.containsKey(masterId)){
// String totalBackNum = emrFaultMap.get(masterId).getTotalBackNum();
// String totalBackFee = emrFaultMap.get(masterId).getTotalBackFee();
// p.setTotalBackNum(totalBackNum);
// p.setTotalBackFee(totalBackFee);
// }
// });
//获取科室列表
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
dic.setTypecode("dept_code");
List<Emr_Dictionary> dicList = emrDictionaryService.dicByTypeCode(dic);
//转换科室
Map<String, Emr_Dictionary> codeMap = ListUtils.toMap(dicList, Emr_Dictionary::getCode);
Setters.<Emr_Fault_Vo>instance().list(list).cycleSetProperties(p -> {
String deptCode = p.getDeptName();
if(StringUtils.isNotBlank(deptCode) && codeMap.containsKey(deptCode)){
String deptName = codeMap.get(deptCode).getName();
p.setDeptName(deptName);
}
});
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<JSONObject> powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), JSONObject.class);
if (powerUserList != null){
@ -365,7 +399,6 @@ public class Emr_Fault_DetailServiceImpl implements Emr_Fault_DetailService {
emr_fault_vo.setCreater(userInfo.getString("name"));
}
}
}
}
return list;

@ -1,8 +1,8 @@
POWER_IP=127.0.0.1
jdbc.username=sa
jdbc.password=docus702
jdbc.password=admin123
dataBaseName=zj_record_new
POWER_PORT=8081
POWER_PORT=8082
jdbc.url=jdbc\:sqlserver\://${POWER_IP}:1433;databaseName=${dataBaseName}
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
@ -25,7 +25,7 @@ pictureUrl=Z:\\test\\uploadImage
#\u672C\u5730\u81EA\u52A8\u751F\u6210PDF\u5730\u5740D:\tesst\autoPdf
autoPdfUrl=D:/test/autoPdf
#\u672C\u5730\u4E0A\u4F20PDF\u5730\u5740
pdfUrl=Z:\\test\\loadPdf
pdfUrl=D:\\test\\loadPdf
#PDF\u6587\u4EF6\u4E0D\u5B58\u5728\u6216\u635F\u574F\u5217\u8868\u5730\u5740
pdfErrorUrl=Z:\\test\\error\\

@ -163,7 +163,7 @@
</select>
<select id="detailByClo" resultMap="BaseResultMap2" parameterType="com.emr.entity.Archive_Detail_Vo">
select
t.id,t.Source,CONVERT(varchar(100),t.UpLoadDateTime, 120) UpLoadDateTime,t.Title,t.flag
t.id,t.Source,t.UpLoadDateTime,t.Title,t.flag
from archive_detail t
where 1=1
<if test="patientId != null">

@ -1379,6 +1379,9 @@
<if test="signer != null and signer != ''">
signer=#{signer,jdbcType=NVARCHAR},
</if>
<if test="directorFlag != null">
director_flag = #{directorFlag},
</if>
<if test="signTime != null and signTime != ''">
sign_time=#{signTime,jdbcType=NVARCHAR}
</if>
@ -1514,8 +1517,6 @@
<!--初次提交归档-->
<select id="selectOverdue" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
select
f.id,f.handle_name,f.handle_id,f.handle_time,ISNULL(DATEDIFF(dd,CONVERT(VARCHAR(20),m.discharge_date_time,23),CONVERT(VARCHAR(20),f.handle_time,23)),
0) diffDay,
(SELECT max(b.date)
FROM (select top ${overdueDaysTwo} date from emr_holiday_set where date >= CONVERT (
VARCHAR (10),
@ -1525,19 +1526,12 @@
,m.master_id,m.patient_id,m.inp_no,m.visit_id,m.name,m.dept_name,m.discharge_date_time,m.DOCTOR_IN_CHARGE,
m.first_instance,m.death_flag,m.dept_admission_to,admission_date_time
from (
select id,master_id ,convert(varchar,handle_time,120) handle_time ,handle_id,handle_name,following_type from (
select ROW_NUMBER() over(partition by master_id order by handle_time asc) RowNum
,Archive_Master_Following.*
from Archive_Master_Following where 1=1 and following_type='5') as t1 where 1=1 and RowNum = 1
) f
LEFT JOIN (
select id master_id,patient_id,inp_no,visit_id,name,dept_name,convert(varchar,discharge_date_time,120)
discharge_date_time,check_doctor,first_instance,DOCTOR_IN_CHARGE,death_flag,dept_admission_to,convert(varchar,admission_date_time,120)
admission_date_time
select id master_id,patient_id,inp_no,visit_id,name,dept_name,
discharge_date_time,check_doctor,first_instance,DOCTOR_IN_CHARGE,death_flag,dept_admission_to,
admission_date_time,director_flag
from archive_master where 1=1 and ArchiveState not in('作废','已封存','取消入院') and Is_Valid!=1
) m
on f.master_id=m.master_id
<where> 1=1 and m.master_id!='' and m.master_id is not null
<where> 1=1 and m.master_id!='' and m.master_id is not null and m.director_flag=1
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
@ -1576,19 +1570,8 @@
and CONVERT(VARCHAR(20),m.discharge_date_time,23) &lt;= #{endDate,jdbcType=NCHAR}
</when>
</choose>
<choose>
<when test="createTimeStart != null and createTimeStart != '' and createTimeEnd != null and createTimeEnd != ''">
and CONVERT(VARCHAR(20),f.handle_time,23) between #{createTimeStart,jdbcType=NCHAR} and #{createTimeEnd,jdbcType=NCHAR}
</when>
<when test="createTimeStart != null and createTimeStart != ''">
and CONVERT(VARCHAR(20),f.handle_time,23) >= #{createTimeStart,jdbcType=NCHAR}
</when>
<when test="createTimeEnd != null and createTimeEnd != ''">
and CONVERT(VARCHAR(20),f.handle_time,23) &lt;= #{createTimeEnd,jdbcType=NCHAR}
</when>
</choose>
</where>
ORDER BY m.master_id,m.discharge_date_time,f.handle_time asc
ORDER BY m.master_id,m.discharge_date_time asc
</select>
<!-- 住院返修病历 -->
<select id="selectOverdue2" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
@ -2455,4 +2438,30 @@
#{item}
</foreach>
</select>
<select id="getFollowingInfo" resultType="com.emr.entity.Archive_Master_Vo">
SELECT
id,
master_id,
CONVERT ( VARCHAR, handle_time, 120 ) handle_time,
handle_id,
handle_name,
following_type
FROM
(
SELECT
ROW_NUMBER ( ) OVER ( partition BY master_id ORDER BY handle_time ASC ) RowNum,
Archive_Master_Following.*
FROM
Archive_Master_Following
WHERE
1 = 1
AND following_type = '5'
) AS t1
WHERE
master_id in
<foreach item="item" collection="ids.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
AND RowNum = 1
</select>
</mapper>

@ -549,12 +549,12 @@
m.visit_id,
m.name,
m.dept_name,
CONVERT ( VARCHAR ( 20 ), m.discharge_date_time, 120 ) discharge_date_time,
m.discharge_date_time,
m.ArchiveState,
m.sex,
m.ID_NO,
m.dept_admission_to,
CONVERT ( VARCHAR ( 20 ), m.admission_date_time, 120 ) admission_date_time,
m.admission_date_time,
m.DISCHARGE_DISPOSITION
FROM
archive_master m
@ -1163,78 +1163,167 @@
</where>
order by m.create_time desc
</select>
<!--退回总次数、总费用和总评分-->
<select id="masterTotalList" parameterType="com.emr.entity.Emr_Fault_Vo" resultMap="BaseResultMap2">
select DISTINCT m.id archive_detail_id,e.creater,m.inp_no,m.visit_id,m.name,convert(varchar,m.discharge_date_time,120) discharge_date_time,a.total_back_fee,a.total_back_num,#{backFee,jdbcType=NCHAR} back_fee,
m.dept_name dept_admission_to,d.name as deptName,m.ArchiveState,isnull(m.score,0) score,m.DOCTOR_IN_CHARGE
from(
select DISTINCT master_id,count(*) total_back_num,count(*)* #{backFee,jdbcType=NCHAR} total_back_fee from Archive_Master_Following where following_type=9 group by master_id
) a
LEFT JOIN Archive_Master m
on a.master_id=m.id
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) d
on m.dept_name=d.code
LEFT JOIN Archive_Master_Following f
on m.id=f.master_id
LEFT JOIN emr_fault_detail e
on e.archive_detail_id=m.id
<where> 1=1 and m.ArchiveState not in('作废','已封存','') and m.ArchiveState is not null and m.Is_Valid!=1 and total_back_num>0 and f.following_type=9
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="archivestate!= null and archivestate!= ''">
and m.ArchiveState in
<foreach item="item" collection="archivestate.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="deptName!= null and deptName!= ''">
and m.dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="doctorInCharge!= null and doctorInCharge!= ''">
and m.DOCTOR_IN_CHARGE in
<foreach item="item" collection="doctorInCharge.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dischargeDateTime != null">
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
</if>
<if test="creater!= null and creater!= ''">
and e.creater in
<foreach item="item" collection="creater.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) between CONVERT(VARCHAR(20),#{startDate,jdbcType=NCHAR},23) and
CONVERT(VARCHAR(20),#{endDate,jdbcType=NCHAR},23)
</when>
<when test="startDate != null and startDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) >= CONVERT(VARCHAR(20),#{startDate,jdbcType=NCHAR},23)
</when>
<when test="endDate != null and endDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) &lt;=CONVERT(VARCHAR(20),#{endDate,jdbcType=NCHAR},23)
</when>
</choose>
<if test="updater!= null and updater!= ''">
and t.id in
<foreach item="item" collection="updater.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<!--退回总次数、总费用和总评分2023-09-13优化去掉创建人-->
<!-- <select id="masterTotalList" parameterType="com.emr.entity.Emr_Fault_Vo" resultMap="BaseResultMap2">-->
<!-- select DISTINCT m.id archive_detail_id,e.creater,m.inp_no,m.visit_id,m.name,convert(varchar,m.discharge_date_time,120) discharge_date_time,a.total_back_fee,a.total_back_num,#{backFee,jdbcType=NCHAR} back_fee,-->
<!-- m.dept_name dept_admission_to,d.name as deptName,m.ArchiveState,isnull(m.score,0) score,m.DOCTOR_IN_CHARGE-->
<!-- from(-->
<!-- select DISTINCT master_id,count(*) total_back_num,count(*)* #{backFee,jdbcType=NCHAR} total_back_fee from Archive_Master_Following where following_type=9 group by master_id-->
<!-- ) a-->
<!-- LEFT JOIN Archive_Master m-->
<!-- on a.master_id=m.id-->
<!-- LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) d-->
<!-- on m.dept_name=d.code-->
<!-- LEFT JOIN Archive_Master_Following f-->
<!-- on m.id=f.master_id-->
<!-- LEFT JOIN emr_fault_detail e-->
<!-- on e.archive_detail_id=m.id-->
<!-- <where> 1=1 and m.ArchiveState not in('作废','已封存','') and m.ArchiveState is not null and m.Is_Valid!=1 and total_back_num>0 and f.following_type=9-->
<!-- <if test="inpNo != null and inpNo != ''">-->
<!-- and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'-->
<!-- </if>-->
<!-- <if test="visitId != null and visitId != ''">-->
<!-- and m.visit_id=#{visitId,jdbcType=NCHAR}-->
<!-- </if>-->
<!-- <if test="name != null and name != ''">-->
<!-- and m.name like '%'+#{name,jdbcType=NCHAR}+'%'-->
<!-- </if>-->
<!-- <if test="archivestate!= null and archivestate!= ''">-->
<!-- and m.ArchiveState in-->
<!-- <foreach item="item" collection="archivestate.split(',')" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="deptName!= null and deptName!= ''">-->
<!-- and m.dept_name in-->
<!-- <foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="doctorInCharge!= null and doctorInCharge!= ''">-->
<!-- and m.DOCTOR_IN_CHARGE in-->
<!-- <foreach item="item" collection="doctorInCharge.split(',')" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="dischargeDateTime != null">-->
<!-- and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}-->
<!-- </if>-->
<!-- <if test="creater!= null and creater!= ''">-->
<!-- and e.creater in-->
<!-- <foreach item="item" collection="creater.split(',')" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <choose>-->
<!-- <when test="startDate != null and startDate != '' and endDate != null and endDate != ''">-->
<!-- and CONVERT(VARCHAR(20),m.discharge_date_time,23) between CONVERT(VARCHAR(20),#{startDate,jdbcType=NCHAR},23) and-->
<!-- CONVERT(VARCHAR(20),#{endDate,jdbcType=NCHAR},23)-->
<!-- </when>-->
<!-- <when test="startDate != null and startDate != ''">-->
<!-- and CONVERT(VARCHAR(20),m.discharge_date_time,23) >= CONVERT(VARCHAR(20),#{startDate,jdbcType=NCHAR},23)-->
<!-- </when>-->
<!-- <when test="endDate != null and endDate != ''">-->
<!-- and CONVERT(VARCHAR(20),m.discharge_date_time,23) &lt;=CONVERT(VARCHAR(20),#{endDate,jdbcType=NCHAR},23)-->
<!-- </when>-->
<!-- </choose>-->
<!-- <if test="updater!= null and updater!= ''">-->
<!-- and t.id in-->
<!-- <foreach item="item" collection="updater.split(',')" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </where>-->
<!-- </select>-->
<select id="masterTotalList" parameterType="com.emr.entity.Emr_Fault_Vo" resultMap="BaseResultMap2">
SELECT DISTINCT
m.id archive_detail_id,
m.inp_no,
m.visit_id,
m.name,
discharge_date_time,
a.total_back_fee,
a.total_back_num,
#{ backFee,jdbcType = NCHAR } back_fee,
m.ArchiveState,
isnull( m.score, 0 ) score,
m.dept_name,
m.DOCTOR_IN_CHARGE
FROM
(
SELECT DISTINCT
master_id,
COUNT ( * ) total_back_num,
COUNT ( * ) * #{ backFee,
jdbcType = NCHAR } total_back_fee
FROM
Archive_Master_Following
WHERE
following_type = 9
GROUP BY
master_id
) a
LEFT JOIN Archive_Master m ON a.master_id= m.id
<where> 1=1 and m.ArchiveState not in('作废','已封存','') and m.ArchiveState is not null and m.Is_Valid!=1 and total_back_num>0
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="archivestate!= null and archivestate!= ''">
and m.ArchiveState in
<foreach item="item" collection="archivestate.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="deptName!= null and deptName!= ''">
and m.dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="doctorInCharge!= null and doctorInCharge!= ''">
and m.DOCTOR_IN_CHARGE in
<foreach item="item" collection="doctorInCharge.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dischargeDateTime != null">
and m.discharge_date_time = #{dischargeDateTime,jdbcType=NVARCHAR}
</if>
<if test="creater!= null and creater!= ''">
and e.creater in
<foreach item="item" collection="creater.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) between CONVERT(VARCHAR(20),#{startDate,jdbcType=NCHAR},23) and
CONVERT(VARCHAR(20),#{endDate,jdbcType=NCHAR},23)
</when>
<when test="startDate != null and startDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) >= CONVERT(VARCHAR(20),#{startDate,jdbcType=NCHAR},23)
</when>
<when test="endDate != null and endDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) &lt;=CONVERT(VARCHAR(20),#{endDate,jdbcType=NCHAR},23)
</when>
</choose>
<if test="updater!= null and updater!= ''">
and t.id in
<foreach item="item" collection="updater.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
<!--退回总次数、总费用和总评分-->
<select id="masterTotalListTwo" parameterType="com.emr.entity.Emr_Fault_Vo" resultMap="BaseResultMap2">
@ -1651,5 +1740,22 @@ WHERE
archive_detail_id = #{ masterId }
GROUP BY archive_detail_id
</select>
<select id="totalBackFee" resultType="com.emr.entity.Emr_Fault_Vo">
SELECT DISTINCT
master_id,
COUNT ( * ) total_back_num,
COUNT ( * ) * #{ backFee,
jdbcType = NCHAR } total_back_fee
FROM
Archive_Master_Following
WHERE
following_type = 9
and master_id in
<foreach item="item" collection="ids.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY
master_id
</select>
</mapper>

@ -119,12 +119,12 @@
</select>
&lt;%&ndash;<input type="text" class="input-sm form-control" id="backer" placeholder="请输入退回人">&ndash;%&gt;
</div>--%>
<div class="form-group divCss8">
<label for="name">创建人:</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="creater" id="creater" title="请输入创建人"
data-actions-box="true" data-deselect-all-text="取消全选" data-select-all-text="全选" data-none-results-text="没找到相应记录{0}">
</select>
</div>
<%-- <div class="form-group divCss8">--%>
<%-- <label for="name">创建人:</label>--%>
<%-- <select class="selectpicker bla bla bli" multiple data-live-search="true" name="creater" id="creater" title="请输入创建人"--%>
<%-- data-actions-box="true" data-deselect-all-text="取消全选" data-select-all-text="全选" data-none-results-text="没找到相应记录{0}">--%>
<%-- </select>--%>
<%-- </div>--%>
<div class="form-group divCss8">
<label for="archivestate">归档状态 :</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="archivestate" id="archivestate" title="请输入归档状态"
@ -293,7 +293,7 @@
doctorInCharge2=$("#doctorInCharge").val();
archivestate2=$("#archivestate").val();
deptName2=$("#deptName").val();
creater2=$("#creater").val();
// creater2=$("#creater").val();
}
function initTable() {
if(tipLoad==1){
@ -382,7 +382,7 @@
name:""+$("#name").val(),
doctorInCharge:""+$("#doctorInCharge").val(),
archivestate:"" + $("#archivestate").val(),
creater:"" + $("#creater").val(),
// creater:"" + $("#creater").val(),
deptName: deptName,
};
@ -439,9 +439,6 @@
field: 'deptName',
align: 'left',
valign: 'middle',
formatter: function (value, row, index) {
return value;
}
},
{
title: '出院日期',
@ -533,11 +530,11 @@
//return changeDateFormat(value)
}
},
{
field: 'creater',
title: '创建人',
valign: 'middle',
}
// {
// field: 'creater',
// title: '创建人',
// valign: 'middle',
// }
/*{
field: 'createTime',
title: '创建时间',

@ -126,14 +126,6 @@
<input type="text" class="input-sm form-control" name="end" id="endDate"/>
</div>
</div>
<div class="form-group divCss8">
<label>初审日期:</label>
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="start" id="createTimeStart"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="createTimeEnd"/>
</div>
</div>
<div class="form-group divCss8">
<label>超期天数(查)>=</label>
<input type="text" class="input-sm form-control" id="overdueDays4" placeholder="请输入超期天数">

Loading…
Cancel
Save