科主任提交时判断视图数据

master
ALW 3 years ago
parent 5f3c257483
commit 9c07dadb55

@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@ -30,9 +31,11 @@ import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/beHosp")
@ -48,6 +51,8 @@ public class beHospitaledController {
@Autowired
private Sign_ListService signListService;
@Autowired
private ArchiveOtherExtService archiveOtherExtService;
@Autowired(required = false)
private Archive_Master_FollowingService archive_master_followingService;
@ -89,6 +94,7 @@ public class beHospitaledController {
@RequestMapping(value = "/wzByArchivId")
public String wzByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
String result = "";
StringBuffer sb = new StringBuffer();
try {
String endpoint = HomepageDictionary;
//String endpoint = "http://localhost:8080/ca3/services/caSynrochnized?wsdl";
@ -129,19 +135,78 @@ public class beHospitaledController {
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
String result = "";
Emr_Fault_Detail entityFault=new Emr_Fault_Detail();
Emr_Fault_Detail entityFault = new Emr_Fault_Detail();
entityFault.setArchiveDetailId(emrFaultDetail.getArchiveDetailId());
List<Emr_Fault_Detail> faultList=emrFaultDetailService.selectByArchiveId(entityFault);
int flagNum=0;
if(faultList!=null && faultList.size()>0){
List<Emr_Fault_Detail> faultList = emrFaultDetailService.selectByArchiveId(entityFault);
int flagNum = 0;
if (faultList != null && faultList.size() > 0) {
//获取未处理缺陷数量
for (int k = 0; k < faultList.size(); k++) {
if ("1".equals(faultList.get(k).getBackFlag()) || "5".equals(faultList.get(k).getBackFlag())) {
flagNum+=1;
flagNum += 1;
}
}
}
String zyh = null;
String did = null;
Date c1 =null;
Date c2 =null;
Date c9 =null;
Date doctorTime=null;
Date nurseTime=null;
Date lastTime=null;
String MID = entityFault.getArchiveDetailId();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<ArchiveOtherExt> archiveOtherExts = archiveOtherExtService.selectExtTime(MID);
if (!CollectionUtils.isEmpty(archiveOtherExts)) {
for (ArchiveOtherExt list : archiveOtherExts) {
zyh = list.getZyh();
did = list.getDid();
String date1 = list.getC1();
String date2 = list.getC2();
String date9 =list.getC9();
try {
c1 = simpleDateFormat.parse(date1);
c2 = simpleDateFormat.parse(date2);
c9 = simpleDateFormat.parse(date9);
} catch (ParseException e) {
e.printStackTrace();
}
}
String sql = "SELECT * FROM JHEMR.V_DOCTOR_PDF4 WHERE INP_NO = '" + zyh + "' AND VISIT_ID = '" + did + "'";
try {
List<Map> selectList = OracleConnect.selectListConvertMap(sql);
if (!CollectionUtils.isEmpty(selectList)) {
for(Map map : selectList){
doctorTime = (Date) map.get("FINISHED_DATE_TIME");
nurseTime = (Date) map.get("MR_COMMIT_NURSE_DATE_TIME");
lastTime = (Date) map.get("FIRST_PAGE_FINISHED_SAVE_TIME");
}
}
} catch (Exception e) {
e.printStackTrace();
}
if(flagNum==0) {
}
String result1="";
String result2="";
String result3="";
if (c1.compareTo(doctorTime)<0){
result1="①检查文书有过修改,麻烦医生在电子病历系统重新提交医生文书";
}
if (c2.compareTo(nurseTime)<0){
result2="②检查文书有过修改,麻烦护士在电子病历系统重新提交护士文书";
}
if (c9.compareTo(lastTime)<0){
result3="③检查首页有过修改,麻烦医生在电子病历系统重新提交首页";
}
if (result1!="" ||result2!="" ||result3!="" ){
result=result1+result2+result3;
}
if (c1.compareTo(doctorTime)>=0 && c2.compareTo(nurseTime)>=0 && c9.compareTo(lastTime)>=0 ){
if(flagNum==0) {
try {
String endpoint = HomepageDictionary;
//String endpoint = "http://localhost:8080/ca3/services/caSynrochnized?wsdl";
@ -204,6 +269,7 @@ public class beHospitaledController {
}else{
result = "提交失败,存在缺陷未处理!";
}
}
return result;
}

@ -18,4 +18,6 @@ public interface ArchiveOtherExtMapper {
int updateByPrimaryKeySelective(ArchiveOtherExt record);
int updateByPrimaryKey(ArchiveOtherExt record);
List<ArchiveOtherExt> selectExtTime(String MID);
}

@ -1,6 +1,7 @@
package com.emr.service;
import com.emr.entity.ArchiveOtherExt;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -25,4 +26,10 @@ public interface ArchiveOtherExtService {
* @return
*/
Integer updateByPrimaryKeySelective(ArchiveOtherExt archiveOtherExt);
/**
* extC1C2C9
* @param MID
* @return
*/
List<ArchiveOtherExt> selectExtTime(@Param(value = "MID")String MID);
}

@ -57,4 +57,9 @@ public class ArchiveOtherExtServiceImpl implements ArchiveOtherExtService {
public Integer updateByPrimaryKeySelective(ArchiveOtherExt archiveOtherExt) {
return archiveOtherExtMapper.updateByPrimaryKeySelective(archiveOtherExt);
}
@Override
public List<ArchiveOtherExt> selectExtTime(String MID) {
return archiveOtherExtMapper.selectExtTime(MID);
}
}

@ -1,7 +1,7 @@
#\u7559\u89C2\u63A8\u9001\u7B2C\u4E09\u65B9\u63A5\u53E3\u5730\u5740
observationRecordRequestUrl = http://10.162.0.51:8091/sanshuyun-ems-function/file/away/updateStatus
#\u6A21\u5757\u6253\u56DE\u7B2C\u4E09\u65B9\u63A5\u53E3\u5730\u5740
returnUrl = http://10.6.1.152:8085/SignWebService.asmx/PartrePair
returnUrl = http://10.6.1.152:8086/SignWebService.asmx/PartrePair
#\u6A21\u5757\u6253\u56DE\u7B2C\u4E09\u65B9\u63A5\u53E3\u53C2\u6570
returnParam = strJson
@ -10,3 +10,10 @@ sqlServerClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
sqlServerUrl=jdbc:sqlserver://10.3.6.94:1433;DatabaseName=headpage_gyfs_1
sqlServerUserName=sa
sqlServerPassword=xjgs+docus911
#\u7B2C\u4E09\u65B9oracle\u914D\u7F6E\u4FE1\u606F
oracleUrl = 10.6.0.150:1521/ORCL
oracleUserName = jswzh
oraclePassWord = jswzh123

@ -1,9 +1,9 @@
POWER_IP=localhost
POWER_IP=10.6.1.127
jdbc.username=sa
jdbc.password=docus@702
dataBaseName=zj_record_new
POWER_PORT=8080
jdbc.url=jdbc\:sqlserver\://120.27.212.36:1433;databaseName=${dataBaseName}
dataBaseName=DB_PrivilegeManagement_GYFY
POWER_PORT=9001
jdbc.url=jdbc\:sqlserver\://${POWER_IP}:1433;databaseName=${dataBaseName}
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
#hibernate config
@ -15,10 +15,11 @@ hibernate.hbm2ddl.auto=update
hibernate.current_session_context_class=thread
hibernate.jdbc.batch_size=50
hibernate.enable_lazy_load_no_trans=true
WEBSOCKET_URLHEAD=${POWER_JSPHEAD}:8088
WEBSOCKET_URLHEAD=${POWER_JSPHEAD}:8089
#\u901A\u77E5\u5B57\u7B26\u4E32\u95F4\u9694\u7B26
STR_SPLIT=*^:|,.
POWER_JSPHEAD=localhost
##\u56FE\u7247\u5730\u5740
pictureUrl=Z:\\test\\uploadImage
#\u672C\u5730\u81EA\u52A8\u751F\u6210PDF\u5730\u5740D:\tesst\autoPdf
@ -28,6 +29,7 @@ pdfUrl=Z:\\test\\loadPdf
#PDF\u6587\u4EF6\u4E0D\u5B58\u5728\u6216\u635F\u574F\u5217\u8868\u5730\u5740
pdfErrorUrl=Z:\\test\\error\\
#\u8D85\u671F\u5929\u6570
expired=7
#\u6B7B\u4EA1\u8D85\u671F\u5929\u6570

@ -97,7 +97,10 @@
from archive_other_ext
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<select id="selectExtTime" resultType="com.emr.entity.ArchiveOtherExt" parameterType="java.lang.String">
select * from archive_other_ext where MID=#{MID}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from archive_other_ext
where ID = #{id,jdbcType=BIGINT}
</delete>

Loading…
Cancel
Save