|
|
|
@ -83,7 +83,7 @@ public class signListController {
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "/signList")
|
|
|
|
|
public OffsetLimitPage signList(HttpServletRequest request, HttpServletResponse response, Sign_List_Vo signListVo, Integer offset, Integer limit) throws UnsupportedEncodingException {
|
|
|
|
|
System.out.println("signListVo:::"+signListVo.getOperateName1());
|
|
|
|
|
System.out.println("signListVo:::" + signListVo.getOperateName1());
|
|
|
|
|
response.setCharacterEncoding("utf-8");
|
|
|
|
|
request.setCharacterEncoding("utf-8");
|
|
|
|
|
//判断所有都为空则签收日期按当前日期
|
|
|
|
@ -105,8 +105,8 @@ public class signListController {
|
|
|
|
|
@RequestMapping(value = "/exportExcel")
|
|
|
|
|
public void exportExcel(HttpServletResponse response, Sign_List_Vo signListVo) throws Exception {
|
|
|
|
|
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
|
|
|
|
String[] header = {"病历清单id", "住院号", "住院次数", "名字", "出院科室", "出院日期", "签收状态", "是否有纸质病历送病案室", "签收人", "签收日期", "签收次数"};
|
|
|
|
|
String[] fileNames = {"id", "inpNo", "visitId", "name", "deptName", "dischargeDateTime", "c5", "isscaned", "c1", "dTime", "num"};
|
|
|
|
|
String[] header = {"病历清单id", "住院号", "住院次数", "名字", "出院科室", "出院日期", "签收状态", "是否有纸质病历送病案室", "签收人", "签收日期", "签收次数"};
|
|
|
|
|
String[] fileNames = {"id", "inpNo", "visitId", "name", "deptName", "dischargeDateTime", "c5", "isscaned", "c1", "dTime", "num"};
|
|
|
|
|
//文件名
|
|
|
|
|
String fileName = "纸质病历签收列表" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
|
|
|
|
|
//构造excel的数据
|
|
|
|
@ -117,13 +117,19 @@ public class signListController {
|
|
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "/selSignByColm")
|
|
|
|
|
public OffsetLimitPage selSignByColm(HttpServletRequest request, HttpServletResponse response, Sign_List_Vo signListVo, Integer offset, Integer limit) throws UnsupportedEncodingException {
|
|
|
|
|
response.setCharacterEncoding("utf-8");
|
|
|
|
|
request.setCharacterEncoding("utf-8");
|
|
|
|
|
OffsetLimitPage result = signListService.selSignByColm(signListVo, offset, limit);
|
|
|
|
|
public OffsetLimitPage selSignByColm(HttpServletRequest request, HttpServletResponse response, SignList signList, Integer offset, Integer limit) {
|
|
|
|
|
OffsetLimitPage result = signListService.selSignByColm(signList, offset, limit);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Transactional
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "/delotherId")
|
|
|
|
|
public String delotherId(HttpServletRequest request, HttpServletResponse response,String id) {
|
|
|
|
|
signListService.deleteSignListById(id);
|
|
|
|
|
return "取消签收成功!";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "/addSignList")
|
|
|
|
@ -168,6 +174,10 @@ public class signListController {
|
|
|
|
|
signList.setCreatedtime(sdf.format(new Date()));
|
|
|
|
|
signList.setdTime(sdf.format(new Date()));
|
|
|
|
|
signList.setT1(sdf.format(new Date()));
|
|
|
|
|
Archive_Master archiveMaster = new Archive_Master();
|
|
|
|
|
archiveMaster.setIsSign(1);
|
|
|
|
|
archiveMaster.setId(master.get(0).getId());
|
|
|
|
|
int bol = archiveMasterService.updateByClo(archiveMaster);
|
|
|
|
|
int z = signListService.insertSignList(signList);
|
|
|
|
|
result = "签收成功";
|
|
|
|
|
} else {
|
|
|
|
@ -214,6 +224,9 @@ public class signListController {
|
|
|
|
|
signList.setCreatedtime(sdf.format(new Date()));
|
|
|
|
|
signList.setdTime(sdf.format(new Date()));
|
|
|
|
|
signList.setT1(sdf.format(new Date()));
|
|
|
|
|
Archive_Master archiveMaster = new Archive_Master();
|
|
|
|
|
archiveMaster.setIsSign(1);
|
|
|
|
|
int bol = archiveMasterService.updateByClo(archiveMaster);
|
|
|
|
|
signListService.insertSignList(signList);
|
|
|
|
|
result = "签收成功";
|
|
|
|
|
} else {
|
|
|
|
@ -232,8 +245,6 @@ public class signListController {
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "/getFaultType")
|
|
|
|
|
public List<Emr_Fault_Type> getFaultType(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Type emrFaultType) throws UnsupportedEncodingException {
|
|
|
|
@ -435,6 +446,7 @@ public class signListController {
|
|
|
|
|
result = "无纸质,无需签收!";
|
|
|
|
|
return result;
|
|
|
|
|
} else {
|
|
|
|
|
archiveMaster.setIsSign(0);
|
|
|
|
|
archiveMaster.setSigner(username);
|
|
|
|
|
archiveMaster.setSignTime(nowTime);
|
|
|
|
|
}
|
|
|
|
@ -453,7 +465,7 @@ public class signListController {
|
|
|
|
|
followingType = "14";
|
|
|
|
|
}
|
|
|
|
|
//2021-05-13 following表中添加签收操作记录
|
|
|
|
|
String handleName = user.getUserPosition();//姓名
|
|
|
|
|
String handleName = user.getUserPosition();//姓名
|
|
|
|
|
Archive_Master_Following archive_master_following = new Archive_Master_Following();
|
|
|
|
|
archive_master_following.setMasterId(archiveMaster.getId());
|
|
|
|
|
archive_master_following.setFollowingType(followingType);
|
|
|
|
@ -673,7 +685,7 @@ public class signListController {
|
|
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@RequestMapping(value = "/collection")
|
|
|
|
|
public String collection(HttpServletRequest request, HttpServletResponse response, int flagNum,String id,String pid) throws Exception {
|
|
|
|
|
public String collection(HttpServletRequest request, HttpServletResponse response, int flagNum, String id, String pid) throws Exception {
|
|
|
|
|
response.setCharacterEncoding("utf-8");
|
|
|
|
|
request.setCharacterEncoding("utf-8");
|
|
|
|
|
// 从session获取用户名
|
|
|
|
@ -684,18 +696,18 @@ public class signListController {
|
|
|
|
|
|
|
|
|
|
//新增ext表数据逻辑
|
|
|
|
|
Archive_Master archive_master = archiveMasterService.selectById(id);
|
|
|
|
|
if (archive_master != null){
|
|
|
|
|
if (archive_master != null) {
|
|
|
|
|
//查ext表有无任务
|
|
|
|
|
ArchiveOtherExt archiveOtherExtParm=new ArchiveOtherExt();
|
|
|
|
|
ArchiveOtherExt archiveOtherExtParm = new ArchiveOtherExt();
|
|
|
|
|
archiveOtherExtParm.setMid(id);
|
|
|
|
|
archiveOtherExtParm.setSysflag(-300);
|
|
|
|
|
List<ArchiveOtherExt> extList = archiveOtherExtService.selectExtTaskIsExistOrNot(archiveOtherExtParm);
|
|
|
|
|
if (!extList.isEmpty() && extList.size()==1){
|
|
|
|
|
if (!extList.isEmpty() && extList.size() == 1) {
|
|
|
|
|
//有任务,则ext表更新statusFlag=0,对应C3-C8置空,T1-T6置空,其他不变
|
|
|
|
|
//1.statusFlag=0
|
|
|
|
|
extList.get(0).setStatusflag(0);
|
|
|
|
|
//2.对应C3-C8置空,T1-T6置空
|
|
|
|
|
switch (flagNum){
|
|
|
|
|
switch (flagNum) {
|
|
|
|
|
//体温单
|
|
|
|
|
case 1:
|
|
|
|
|
extList.get(0).setC5("");
|
|
|
|
@ -728,20 +740,20 @@ public class signListController {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
archiveOtherExtService.updateByPrimaryKeySelective(extList.get(0));
|
|
|
|
|
}else if(extList.isEmpty()|| extList.size()<0){
|
|
|
|
|
} else if (extList.isEmpty() || extList.size() < 0) {
|
|
|
|
|
//无任务,则新增
|
|
|
|
|
OracleDateVo doctorNurseFinishedDatetime = finishedDateTimeService.findByID(archive_master.getInpNo(), archive_master.getVisitId());
|
|
|
|
|
//V6医生最后完成时间
|
|
|
|
|
String doctorFinishedDateTime = sdf.format(doctorNurseFinishedDatetime.getFinishedDateTime());
|
|
|
|
|
//V6护士最后完成时间
|
|
|
|
|
String nurseFinishedDateTime = sdf.format(doctorNurseFinishedDatetime.getMrCommitNurseDateTime());
|
|
|
|
|
ArchiveOtherExt archiveOtherExt = new ArchiveOtherExt(IDHelper.NewID(),new Date(),"按需采集",0L,-300,date_1801,pid,
|
|
|
|
|
archive_master.getInpNo(),date_1801,date_1801,0,"",id,archive_master.getVisitId(),
|
|
|
|
|
doctorFinishedDateTime,nurseFinishedDateTime,"Done","Done","Done","Done","Done","Done","",archive_master.getName(),
|
|
|
|
|
BigDecimal.valueOf(0.0000),BigDecimal.valueOf(0.0000),BigDecimal.valueOf(0.0000),
|
|
|
|
|
date_1801,date_1801,date_1801,date_1801,date_1801,date_1801);
|
|
|
|
|
ArchiveOtherExt archiveOtherExt = new ArchiveOtherExt(IDHelper.NewID(), new Date(), "按需采集", 0L, -300, date_1801, pid,
|
|
|
|
|
archive_master.getInpNo(), date_1801, date_1801, 0, "", id, archive_master.getVisitId(),
|
|
|
|
|
doctorFinishedDateTime, nurseFinishedDateTime, "Done", "Done", "Done", "Done", "Done", "Done", "", archive_master.getName(),
|
|
|
|
|
BigDecimal.valueOf(0.0000), BigDecimal.valueOf(0.0000), BigDecimal.valueOf(0.0000),
|
|
|
|
|
date_1801, date_1801, date_1801, date_1801, date_1801, date_1801);
|
|
|
|
|
//对应C3-C8置空,T无需置空
|
|
|
|
|
switch (flagNum){
|
|
|
|
|
switch (flagNum) {
|
|
|
|
|
//体温单
|
|
|
|
|
case 1:
|
|
|
|
|
archiveOtherExt.setC5("");
|
|
|
|
@ -768,7 +780,7 @@ public class signListController {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
archiveOtherExtService.insertSelective(archiveOtherExt);
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
//archive_Other_Ext表已经存在记录,且不只1条,删除多余或采集接口那边需要调整
|
|
|
|
|
return "同一个病案ID,ext表只允许1条数据!";
|
|
|
|
|
}
|
|
|
|
@ -778,39 +790,39 @@ public class signListController {
|
|
|
|
|
Sign_List signList = new Sign_List();
|
|
|
|
|
signList.setPid(pid);
|
|
|
|
|
signList.setMasterID(id);
|
|
|
|
|
int num=0;
|
|
|
|
|
switch (flagNum){
|
|
|
|
|
int num = 0;
|
|
|
|
|
switch (flagNum) {
|
|
|
|
|
//体温单
|
|
|
|
|
case 1:
|
|
|
|
|
num=-401;
|
|
|
|
|
num = -401;
|
|
|
|
|
break;
|
|
|
|
|
//护理记录
|
|
|
|
|
case 2:
|
|
|
|
|
num=-402;
|
|
|
|
|
num = -402;
|
|
|
|
|
break;
|
|
|
|
|
//首页
|
|
|
|
|
case 3:
|
|
|
|
|
num=-403;
|
|
|
|
|
num = -403;
|
|
|
|
|
break;
|
|
|
|
|
//医生文书
|
|
|
|
|
case 4:
|
|
|
|
|
num=-404;
|
|
|
|
|
num = -404;
|
|
|
|
|
break;
|
|
|
|
|
//评估单
|
|
|
|
|
case 5:
|
|
|
|
|
num=-405;
|
|
|
|
|
num = -405;
|
|
|
|
|
break;
|
|
|
|
|
//护士文书
|
|
|
|
|
case 6:
|
|
|
|
|
num=-406;
|
|
|
|
|
num = -406;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
signList.setSysFlag(num);
|
|
|
|
|
signList.setC5("0");
|
|
|
|
|
List<Sign_List> list=signListService.selectSignListWith(signList);
|
|
|
|
|
if(list!=null&&list.size()>0){
|
|
|
|
|
List<Sign_List> list = signListService.selectSignListWith(signList);
|
|
|
|
|
if (list != null && list.size() > 0) {
|
|
|
|
|
return "当前采集计划已存在,请勿重复发起!";
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
signList.setId(IDHelper.NewID());
|
|
|
|
|
signList.setCreatedtime(sdf.format(new Date()));
|
|
|
|
|
signList.setC1(username);
|
|
|
|
|