@ -4,14 +4,21 @@ import com.alibaba.fastjson.JSON;
import com.emr.annotation.OptionalLog ;
import com.emr.annotation.OptionalLog ;
import com.emr.dao.CommomMapper ;
import com.emr.dao.CommomMapper ;
import com.emr.dao.bloodPurification.BloodPurificationMapper ;
import com.emr.dao.bloodPurification.BloodPurificationMapper ;
import com.emr.dao.emrLog.Emr_LogMapper ;
import com.emr.entity.EmrBloodApplyInfo ;
import com.emr.entity.EmrBloodDialysisDoc ;
import com.emr.entity.EmrBloodDialysisDoc ;
import com.emr.entity.Power_User ;
import com.emr.entity.Power_User ;
import com.emr.entity.ResultUtil ;
import com.emr.entity.emrLog.Emr_Log ;
import com.emr.service.ImportExcel.ImportExcelEntity ;
import com.emr.service.ImportExcel.ImportExcelEntity ;
import com.emr.service.ImportExcel.ImportExcelUtil ;
import com.emr.service.ImportExcel.ImportExcelUtil ;
import com.emr.service.bloodPurification.BloodPurificationService ;
import com.emr.util.DateUtils ;
import com.emr.util.DateUtils ;
import com.emr.util.ExceptionPrintUtil ;
import com.emr.util.ExceptionPrintUtil ;
import com.emr.util.ExportExcelUtil ;
import com.github.pagehelper.PageHelper ;
import com.github.pagehelper.PageHelper ;
import com.github.pagehelper.PageInfo ;
import com.github.pagehelper.PageInfo ;
import org.apache.commons.lang3.StringUtils ;
import org.apache.shiro.authz.annotation.RequiresPermissions ;
import org.apache.shiro.authz.annotation.RequiresPermissions ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.http.HttpHeaders ;
import org.springframework.http.HttpHeaders ;
@ -19,6 +26,8 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType ;
import org.springframework.http.MediaType ;
import org.springframework.http.ResponseEntity ;
import org.springframework.http.ResponseEntity ;
import org.springframework.stereotype.Controller ;
import org.springframework.stereotype.Controller ;
import org.springframework.transaction.annotation.Transactional ;
import org.springframework.transaction.interceptor.TransactionAspectSupport ;
import org.springframework.ui.Model ;
import org.springframework.ui.Model ;
import org.springframework.util.CollectionUtils ;
import org.springframework.util.CollectionUtils ;
import org.springframework.util.ObjectUtils ;
import org.springframework.util.ObjectUtils ;
@ -29,13 +38,15 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest ;
import org.springframework.web.multipart.MultipartHttpServletRequest ;
import javax.servlet.http.HttpServletRequest ;
import javax.servlet.http.HttpServletRequest ;
import javax.servlet.http.HttpServletResponse ;
import javax.servlet.http.HttpSession ;
import javax.servlet.http.HttpSession ;
import java.nio.charset.Charset ;
import java.nio.charset.Charset ;
import java.text.DecimalFormat ;
import java.text.DecimalFormat ;
import java.util.Date ;
import java.text.SimpleDateFormat ;
import java.util.List ;
import java.time.LocalDate ;
import java.util.Map ;
import java.time.YearMonth ;
import java.util.Set ;
import java.time.format.DateTimeFormatter ;
import java.util.* ;
/ * *
/ * *
* 广 总 需 求 血 液 净 化 数 字 病 案
* 广 总 需 求 血 液 净 化 数 字 病 案
@ -48,8 +59,15 @@ public class bloodPurificationController {
@Autowired
@Autowired
private BloodPurificationMapper bloodPurificationMapper ;
private BloodPurificationMapper bloodPurificationMapper ;
@Autowired
private BloodPurificationService bloodPurificationService ;
@Autowired
private Emr_LogMapper logMapper ;
/ * *
/ * *
* 病 案 查 询
* 病 案 查 询
*
* @param model
* @param model
* @param request
* @param request
* @return
* @return
@ -83,6 +101,7 @@ public class bloodPurificationController {
/ * *
/ * *
* 文 书 报 表
* 文 书 报 表
*
* @param model
* @param model
* @param request
* @param request
* @return
* @return
@ -95,8 +114,42 @@ public class bloodPurificationController {
return "recordManage/bloodPurification/documentList" ;
return "recordManage/bloodPurification/documentList" ;
}
}
/ * *
* 审 批 页 面
*
* @param model
* @param request
* @return
* /
@RequiresPermissions ( "/bloodPurification/approveList" )
@OptionalLog ( module = "查看" , methods = "血透检查记录审批" )
@RequestMapping ( "bloodApproveList" )
public String bloodApproveList ( Model model , HttpServletRequest request ) {
//获取当前的HttpSession对象, 如果不存在则会创建一个新的会话
HttpSession session = request . getSession ( ) ;
//向HttpSession中放入数据
session . setAttribute ( "status" , request . getParameter ( "status" ) ) ;
return "recordManage/bloodPurification/bloodApproveList" ;
}
/ * *
* 审 批 页 面
*
* @param model
* @param request
* @return
* /
@RequiresPermissions ( "/bloodPurification/flowLogList" )
@OptionalLog ( module = "查看" , methods = "血透检查记录流程记录" )
@RequestMapping ( "flowLogList" )
public String flowLogList ( Model model , HttpServletRequest request ) {
return "recordManage/bloodPurification/flowLogList" ;
}
/ * *
/ * *
* 检 查 记 录 汇 总
* 检 查 记 录 汇 总
*
* @param model
* @param model
* @param request
* @param request
* @return
* @return
@ -109,8 +162,19 @@ public class bloodPurificationController {
return "recordManage/bloodPurification/inspectionRecordsSum" ;
return "recordManage/bloodPurification/inspectionRecordsSum" ;
}
}
/ * *
* 流 程 修 改 、 删 除 日 志 管 理
* @return
* /
@RequiresPermissions ( "/bloodPurification/recordLogList" )
@RequestMapping ( "recordLogList" )
public String recordLogList ( ) {
return "recordManage/bloodPurification/recordLogList" ;
}
/ * *
/ * *
* 检 查 记 录 明 细
* 检 查 记 录 明 细
*
* @param model
* @param model
* @param request
* @param request
* @return
* @return
@ -124,10 +188,6 @@ public class bloodPurificationController {
HttpSession session = request . getSession ( ) ;
HttpSession session = request . getSession ( ) ;
//向HttpSession中放入数据
//向HttpSession中放入数据
String inspectionDate = request . getParameter ( "inspectionDate" ) ;
String name = request . getParameter ( "name" ) ;
String dialysisDate = request . getParameter ( "dialysisDate" ) ;
session . setAttribute ( "inspectionDate" , request . getParameter ( "inspectionDate" ) ) ;
session . setAttribute ( "inspectionDate" , request . getParameter ( "inspectionDate" ) ) ;
session . setAttribute ( "name" , request . getParameter ( "name" ) ) ;
session . setAttribute ( "name" , request . getParameter ( "name" ) ) ;
session . setAttribute ( "dialysisDate" , request . getParameter ( "dialysisDate" ) ) ;
session . setAttribute ( "dialysisDate" , request . getParameter ( "dialysisDate" ) ) ;
@ -138,6 +198,7 @@ public class bloodPurificationController {
/ * *
/ * *
* 查 询 检 查 记 录 汇 总
* 查 询 检 查 记 录 汇 总
*
* @param page
* @param page
* @param limit
* @param limit
* @param emrBloodDialysisDoc
* @param emrBloodDialysisDoc
@ -145,16 +206,16 @@ public class bloodPurificationController {
* /
* /
@RequestMapping ( "queryInspectionRecordsSum" )
@RequestMapping ( "queryInspectionRecordsSum" )
@ResponseBody
@ResponseBody
public String queryInspectionRecordsSum ( Integer page , Integer limit , EmrBloodDialysisDoc emrBloodDialysisDoc ) {
public String queryInspectionRecordsSum ( Integer page , Integer limit , EmrBloodDialysisDoc emrBloodDialysisDoc ) {
if ( null ! = page & & null ! = limit ) {
if ( null ! = page & & null ! = limit ) {
PageHelper . startPage ( page , limit ) ;
PageHelper . startPage ( page , limit ) ;
}
}
try {
try {
List < Map < String , Object > > dataMap = bloodPurificationMapper . queryInspectionRecordsSum ( emrBloodDialysisDoc ) ;
List < Map < String , Object > > dataMap = bloodPurificationMapper . queryInspectionRecordsSum ( emrBloodDialysisDoc ) ;
//保留两位有效数字
//保留两位有效数字
DecimalFormat df = new DecimalFormat ( "0.00" ) ;
DecimalFormat df = new DecimalFormat ( "0.00" ) ;
//遍历 获取有问题数量和总数
//遍历 获取有问题数量和总数
if ( ! CollectionUtils . isEmpty ( dataMap ) ) {
if ( ! CollectionUtils . isEmpty ( dataMap ) ) {
dataMap . forEach ( e - > {
dataMap . forEach ( e - > {
//总数
//总数
double totalNum = ObjectUtils . isEmpty ( e . get ( "total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "total_num" ) . toString ( ) ) ;
double totalNum = ObjectUtils . isEmpty ( e . get ( "total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "total_num" ) . toString ( ) ) ;
@ -199,13 +260,358 @@ public class bloodPurificationController {
}
}
PageInfo pageInfo = new PageInfo < > ( dataMap ) ;
PageInfo pageInfo = new PageInfo < > ( dataMap ) ;
return JSON . toJSONString ( pageInfo ) ;
return JSON . toJSONString ( pageInfo ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
ExceptionPrintUtil . printException ( e ) ;
ExceptionPrintUtil . printException ( e ) ;
e . printStackTrace ( ) ;
e . printStackTrace ( ) ;
return null ;
return null ;
}
}
}
}
@RequestMapping ( "queryDocumentSum" )
@ResponseBody
public ResultUtil queryDocumentSum ( String date ) {
try {
Map < String , Object > params = new HashMap < > ( ) ; //参数集合
Map < String , Object > resultMap = new HashMap < > ( ) ; //返回数据集合
if ( StringUtils . isEmpty ( date ) ) {
date = DateUtils . getDate ( DateUtils . getStringDate ( new Date ( ) , "yyyy-MM" ) ) ;
}
/ * *
* 计 算 传 入 日 期 参 数 date 的 同 比 , 环 比
* /
DateTimeFormatter formatter = DateTimeFormatter . ofPattern ( "yyyy-MM" ) ;
// 解析年份和月份
YearMonth inputDate = YearMonth . parse ( date , formatter ) ;
// 计算同比日期(去年同月)
YearMonth sameMonthLastYear = inputDate . minusYears ( 1 ) ;
// 计算环比日期(上个月)
YearMonth lastMonth = inputDate . minusMonths ( 1 ) ;
// 将YearMonth对象转换成字符串
String sameMonthLastYearStr = sameMonthLastYear . format ( formatter ) ;
String lastMonthStr = lastMonth . format ( formatter ) ;
params . put ( "date" , date ) ; //当月
params . put ( "lastMonth" , lastMonthStr ) ; //环比(上月)
params . put ( "sameMonthLastYear" , sameMonthLastYearStr ) ; //同比(去年同月)
/ * *
* 计 算 传 入 日 期 参 数 date 的 季 度 , 同 比 , 环 比
* /
int year = Integer . valueOf ( date . substring ( 0 , 4 ) ) ;
int month = Integer . valueOf ( date . substring ( 5 , 7 ) ) ;
int currentQuarter = ( month - 1 ) / 3 + 1 ;
List < String > currentQuarterMonths = DateUtils . getQuarterMonths ( year , currentQuarter ) ; //当前季度日期
List < String > previousQuarterMonths = DateUtils . getQuarterMonths ( year , currentQuarter - 1 ) ; //季度环比日期
List < String > yoyQuarterMonth = DateUtils . getQuarterMonths ( year - 1 , currentQuarter ) ; //同比(去年同季度)
params . put ( "currentQuarterStartDate" , currentQuarterMonths . get ( 0 ) ) ; //当前季度开始日期
params . put ( "currentQuarterEndDate" , currentQuarterMonths . get ( 2 ) ) ; //当前季度结束日期
params . put ( "previousQuarterStartDate" , previousQuarterMonths . get ( 0 ) ) ; //环比(上季度开始日期)
params . put ( "previousQuarterEndDate" , previousQuarterMonths . get ( 2 ) ) ; //环比(上季度结束日期)
params . put ( "yoyQuarterStartDate" , yoyQuarterMonth . get ( 0 ) ) ; //同比(去年同季度开始日期)
params . put ( "yoyQuarterEndDate" , yoyQuarterMonth . get ( 2 ) ) ; //同比(去年同季度结束日期)
/ * *
* 计 算 传 入 日 期 参 数 date 的 半 年 度 , 同 比 , 环 比
* /
List < String > halfYearMonths ;
List < String > previousHalfYearMonths ;
List < String > yoyHalfYearMonths ;
// 判断是上半年还是下半年
if ( month > = 1 & & month < = 6 ) {
halfYearMonths = DateUtils . getHalfYearMonths ( year , true ) ; //上半年日期
//计算环比
previousHalfYearMonths = DateUtils . getHalfYearMonths ( year - 1 , false ) ; //环比(去年下半年日期)
//计算同比
yoyHalfYearMonths = DateUtils . getHalfYearMonths ( year - 1 , true ) ; //同比(去年上半年日期)
} else {
halfYearMonths = DateUtils . getHalfYearMonths ( year , false ) ; //下半年日期
//计算环比
previousHalfYearMonths = DateUtils . getHalfYearMonths ( year , true ) ; //环比(上半年日期)
//计算同比
yoyHalfYearMonths = DateUtils . getHalfYearMonths ( year - 1 , false ) ; //同比(去年下半年日期)
}
params . put ( "halfYearStartDate" , halfYearMonths . get ( 0 ) ) ; //半年开始日期
params . put ( "halfYearEndDate" , halfYearMonths . get ( 5 ) ) ; //半年结束日期
params . put ( "previousHalfYearStartDate" , previousHalfYearMonths . get ( 0 ) ) ; //环比(上半年开始日期)
params . put ( "previousHalfYearEndDate" , previousHalfYearMonths . get ( 5 ) ) ; //环比(上半年结束日期)
params . put ( "yoyHalfYearStartDate" , yoyHalfYearMonths . get ( 0 ) ) ; //同比(去年上半年开始日期)
params . put ( "yoyHalfYearEndDate" , yoyHalfYearMonths . get ( 5 ) ) ; //同比(去年上半年结束日期)
/ * *
* 计 算 传 入 日 期 参 数 date 的 年 度 , 同 比 , 环 比
* /
params . put ( "year" , String . valueOf ( year ) ) ; //当前年份
params . put ( "previousYearStartDate" , year + "-01" ) ; //环比 开始时间
params . put ( "previousYearEndDate" , lastMonthStr ) ; //环比 结束时间
params . put ( "lastYear" , String . valueOf ( year - 1 ) ) ; //同比
List < Map < String , Object > > dataMap = bloodPurificationService . queryDocumentSum ( params ) ;
//保留两位有效数字
DecimalFormat df = new DecimalFormat ( "0.00" ) ;
//遍历 获取有问题数量和总数
if ( ! CollectionUtils . isEmpty ( dataMap ) ) {
dataMap . forEach ( e - > {
/ * *
* 计 算 当 月 的 数 据
* /
double bloodFillIncompleteRate = 0 ;
double healtheduFillIncompleteRate = 0 ;
double informedconDocNosignRate = 0 ;
double bloodFillIncompleteRateHb = 0 ;
double healtheduFillIncompleteRateHb = 0 ;
double informedconDocNosignRateHb = 0 ;
double bloodFillIncompleteRateYoy = 0 ;
double healtheduFillIncompleteRateYoy = 0 ;
double informedconDocNosignRateYoy = 0 ;
double totalNum = ObjectUtils . isEmpty ( e . get ( "total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "total_num" ) . toString ( ) ) ; //总数
double bloodTotalNum = ObjectUtils . isEmpty ( e . get ( "blood_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "blood_total_num" ) . toString ( ) ) ; //血净记录缺失总数
double healtheduTotalNum = ObjectUtils . isEmpty ( e . get ( "healthedu_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "healthedu_total_num" ) . toString ( ) ) ; //健康教育缺失总数
double informedconTotalNum = ObjectUtils . isEmpty ( e . get ( "informedcon_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "informedcon_total_num" ) . toString ( ) ) ; //血透知情同意合格总数
if ( totalNum > 0 ) {
bloodFillIncompleteRate = Double . parseDouble ( df . format ( bloodTotalNum / totalNum * 100 ) ) ; //血净记录缺失率
healtheduFillIncompleteRate = Double . parseDouble ( df . format ( healtheduTotalNum / totalNum * 100 ) ) ; //健康教育缺失率
informedconDocNosignRate = Double . parseDouble ( df . format ( informedconTotalNum / totalNum * 100 ) ) ; //知情同意合格率
}
resultMap . put ( "bloodFillIncompleteRate" , bloodFillIncompleteRate ) ;
resultMap . put ( "healtheduFillIncompleteRate" , healtheduFillIncompleteRate ) ;
resultMap . put ( "informedconDocNosignRate" , informedconDocNosignRate ) ;
//计算环比
double totalHbNum = ObjectUtils . isEmpty ( e . get ( "total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "total_hb_num" ) . toString ( ) ) ; //环比 总数
double bloodTotalHbNum = ObjectUtils . isEmpty ( e . get ( "blood_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "blood_total_hb_num" ) . toString ( ) ) ; //环比 血净记录缺失总数
double healtheduTotalHbNum = ObjectUtils . isEmpty ( e . get ( "healthedu_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "healthedu_total_hb_num" ) . toString ( ) ) ; //环比 健康教育缺失总数
double informedconTotalHbNum = ObjectUtils . isEmpty ( e . get ( "informedcon_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "informedcon_total_hb_num" ) . toString ( ) ) ; //环比 知情同意合格总数
if ( totalHbNum > 0 ) {
bloodFillIncompleteRateHb = Double . parseDouble ( df . format ( bloodTotalHbNum / totalHbNum * 100 ) ) ; //环比 血净记录缺失率
healtheduFillIncompleteRateHb = Double . parseDouble ( df . format ( healtheduTotalHbNum / totalHbNum * 100 ) ) ; //环比 健康教育缺失率
informedconDocNosignRateHb = Double . parseDouble ( df . format ( informedconTotalHbNum / totalHbNum * 100 ) ) ; //环比 知情同意合格率
}
resultMap . put ( "bloodFillIncompleteRateHb" , bloodFillIncompleteRateHb ) ;
resultMap . put ( "healtheduFillIncompleteRateHb" , healtheduFillIncompleteRateHb ) ;
resultMap . put ( "informedconDocNosignRateHb" , informedconDocNosignRateHb ) ;
//计算同比
double totalYoyNum = ObjectUtils . isEmpty ( e . get ( "total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "total_tb_num" ) . toString ( ) ) ; //同比 总数
double bloodTotalYoyNum = ObjectUtils . isEmpty ( e . get ( "blood_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "blood_total_tb_num" ) . toString ( ) ) ; //同比 血净记录缺失总数
double healtheduTotalYoyNum = ObjectUtils . isEmpty ( e . get ( "healthedu_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "healthedu_total_tb_num" ) . toString ( ) ) ; //同比 健康教育缺失总数
double informedconTotalYoyNum = ObjectUtils . isEmpty ( e . get ( "informedcon_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "informedcon_total_tb_num" ) . toString ( ) ) ; //同比 知情同意合格总数
if ( totalYoyNum > 0 ) {
bloodFillIncompleteRateYoy = Double . parseDouble ( df . format ( bloodTotalYoyNum / totalYoyNum * 100 ) ) ; //同比 血净记录缺失率
healtheduFillIncompleteRateYoy = Double . parseDouble ( df . format ( healtheduTotalYoyNum / totalYoyNum * 100 ) ) ; //同比 健康教育缺失率
informedconDocNosignRateYoy = Double . parseDouble ( df . format ( informedconTotalYoyNum / totalYoyNum * 100 ) ) ; //同比
}
resultMap . put ( "bloodFillIncompleteRateYoy" , bloodFillIncompleteRateYoy ) ;
resultMap . put ( "healtheduFillIncompleteRateYoy" , healtheduFillIncompleteRateYoy ) ;
resultMap . put ( "informedconDocNosignRateYoy" , informedconDocNosignRateYoy ) ;
/ * *
* 计 算 当 季 的 数 据
* /
double bloodFillIncompleteRateQuarter = 0 ;
double healtheduFillIncompleteRateQuarter = 0 ;
double informedconDocNosignRateQuarter = 0 ;
double bloodFillIncompleteRateQuarterHb = 0 ;
double healtheduFillIncompleteRateQuarterHb = 0 ;
double informedconDocNosignRateQuarterHb = 0 ;
double bloodFillIncompleteRateQuarterYoy = 0 ;
double healtheduFillIncompleteRateQuarterYoy = 0 ;
double informedconDocNosignRateQuarterYoy = 0 ;
double quarterTotalNum = ObjectUtils . isEmpty ( e . get ( "quarter_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_total_num" ) . toString ( ) ) ; //总数
double bloodTotalQuarterNum = ObjectUtils . isEmpty ( e . get ( "quarter_blood_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_blood_total_num" ) . toString ( ) ) ; //当季 血净记录缺失总数
double healtheduTotalQuarterNum = ObjectUtils . isEmpty ( e . get ( "quarter_healthedu_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_healthedu_total_num" ) . toString ( ) ) ; //当季 健康教育缺失总数
double informedconTotalQuarterNum = ObjectUtils . isEmpty ( e . get ( "quarter_informedcon_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_informedcon_total_num" ) . toString ( ) ) ; //当季 知情同意合格总数
if ( quarterTotalNum > 0 ) {
bloodFillIncompleteRateQuarter = Double . parseDouble ( df . format ( bloodTotalQuarterNum / quarterTotalNum * 100 ) ) ; //当季 血净记录缺失率
healtheduFillIncompleteRateQuarter = Double . parseDouble ( df . format ( healtheduTotalQuarterNum / quarterTotalNum * 100 ) ) ; //当季 健康教育缺失率
informedconDocNosignRateQuarter = Double . parseDouble ( df . format ( informedconTotalQuarterNum / quarterTotalNum * 100 ) ) ; //当季 知
}
resultMap . put ( "bloodFillIncompleteRateQuarter" , bloodFillIncompleteRateQuarter ) ;
resultMap . put ( "healtheduFillIncompleteRateQuarter" , healtheduFillIncompleteRateQuarter ) ;
resultMap . put ( "informedconDocNosignRateQuarter" , informedconDocNosignRateQuarter ) ;
//计算环比
double quarterTotalHbNum = ObjectUtils . isEmpty ( e . get ( "quarter_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_total_hb_num" ) . toString ( ) ) ; //环比 总数
double bloodTotalQuarterHbNum = ObjectUtils . isEmpty ( e . get ( "quarter_blood_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_blood_total_hb_num" ) . toString ( ) ) ; //环比 血净记录缺失总数
double healtheduTotalQuarterHbNum = ObjectUtils . isEmpty ( e . get ( "quarter_healthedu_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_healthedu_total_hb_num" ) . toString ( ) ) ; //环比 健康教育缺失总数
double informedconTotalQuarterHbNum = ObjectUtils . isEmpty ( e . get ( "quarter_informedcon_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_informedcon_total_hb_num" ) . toString ( ) ) ; //环比 知情同意合格总数
if ( quarterTotalHbNum > 0 ) {
bloodFillIncompleteRateQuarterHb = Double . parseDouble ( df . format ( bloodTotalQuarterHbNum / quarterTotalHbNum * 100 ) ) ; //环比 血净记录缺失率
healtheduFillIncompleteRateQuarterHb = Double . parseDouble ( df . format ( healtheduTotalQuarterHbNum / quarterTotalHbNum * 100 ) ) ; //环比 健康教育缺失率
informedconDocNosignRateQuarterHb = Double . parseDouble ( df . format ( informedconTotalQuarterHbNum / quarterTotalHbNum * 100 ) ) ; //环比
}
resultMap . put ( "bloodFillIncompleteRateQuarterHb" , bloodFillIncompleteRateQuarterHb ) ;
resultMap . put ( "healtheduFillIncompleteRateQuarterHb" , healtheduFillIncompleteRateQuarterHb ) ;
resultMap . put ( "informedconDocNosignRateQuarterHb" , informedconDocNosignRateQuarterHb ) ;
//计算同比
double quarterTotalYoyNum = ObjectUtils . isEmpty ( e . get ( "quarter_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_total_tb_num" ) . toString ( ) ) ; //同比 总数
double bloodTotalQuarterYoyNum = ObjectUtils . isEmpty ( e . get ( "quarter_blood_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_blood_total_tb_num" ) . toString ( ) ) ; //同比 血净记录缺失总数
double healtheduTotalQuarterYoyNum = ObjectUtils . isEmpty ( e . get ( "quarter_informedcon_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_informedcon_total_tb_num" ) . toString ( ) ) ; //同比 健康教育缺失总数
double informedconTotalQuarterYoyNum = ObjectUtils . isEmpty ( e . get ( "quarter_healthedu_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "quarter_healthedu_total_tb_num" ) . toString ( ) ) ; //同比 知情同意合格总数
if ( quarterTotalYoyNum > 0 ) {
bloodFillIncompleteRateQuarterYoy = Double . parseDouble ( df . format ( bloodTotalQuarterYoyNum / quarterTotalYoyNum * 100 ) ) ; //同比 血净记录缺失率
healtheduFillIncompleteRateQuarterYoy = Double . parseDouble ( df . format ( healtheduTotalQuarterYoyNum / quarterTotalYoyNum * 100 ) ) ; //同比 健康教育缺失率
informedconDocNosignRateQuarterYoy = Double . parseDouble ( df . format ( informedconTotalQuarterYoyNum / quarterTotalYoyNum * 100 ) ) ; //同比
}
resultMap . put ( "bloodFillIncompleteRateQuarterYoy" , bloodFillIncompleteRateQuarterYoy ) ;
resultMap . put ( "healtheduFillIncompleteRateQuarterYoy" , healtheduFillIncompleteRateQuarterYoy ) ;
resultMap . put ( "informedconDocNosignRateQuarterYoy" , informedconDocNosignRateQuarterYoy ) ;
/ * *
* 计 算 当 前 半 年 的 数 据
* /
double bloodFillIncompleteRateHalfYear = 0 ;
double healtheduFillIncompleteRateHalfYear = 0 ;
double informedconDocNosignRateHalfYear = 0 ;
double bloodFillIncompleteRateHalfYearHb = 0 ;
double healtheduFillIncompleteRateHalfYearHb = 0 ;
double informedconDocNosignRateHalfYearHb = 0 ;
double bloodFillIncompleteRateHalfYearYoy = 0 ;
double healtheduFillIncompleteRateHalfYearYoy = 0 ;
double informedconDocNosignRateHalfYearYoy = 0 ;
double halfYearTotalNum = ObjectUtils . isEmpty ( e . get ( "halfYear_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_total_num" ) . toString ( ) ) ; //半年 总数
double bloodTotalHalfYearNum = ObjectUtils . isEmpty ( e . get ( "halfYear_blood_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_blood_total_num" ) . toString ( ) ) ; //半年 血净记录缺失总数
double healtheduTotalHalfYearNum = ObjectUtils . isEmpty ( e . get ( "halfYear_healthedu_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_healthedu_total_num" ) . toString ( ) ) ; //半年 健康教育缺失总数
double informedconTotalHalfYearNum = ObjectUtils . isEmpty ( e . get ( "halfYear_informedcon_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_informedcon_total_num" ) . toString ( ) ) ; //半年 知情同意合格总数
if ( halfYearTotalNum > 0 ) {
bloodFillIncompleteRateHalfYear = Double . parseDouble ( df . format ( bloodTotalHalfYearNum / halfYearTotalNum * 100 ) ) ; //半年 血净记录缺失率
healtheduFillIncompleteRateHalfYear = Double . parseDouble ( df . format ( healtheduTotalHalfYearNum / halfYearTotalNum * 100 ) ) ; //半年 健康教育缺失率
informedconDocNosignRateHalfYear = Double . parseDouble ( df . format ( informedconTotalHalfYearNum / halfYearTotalNum * 100 ) ) ;
}
resultMap . put ( "bloodFillIncompleteRateHalfYear" , bloodFillIncompleteRateHalfYear ) ;
resultMap . put ( "healtheduFillIncompleteRateHalfYear" , healtheduFillIncompleteRateHalfYear ) ;
resultMap . put ( "informedconDocNosignRateHalfYear" , informedconDocNosignRateHalfYear ) ;
//计算环比
double halfYearTotalHbNum = ObjectUtils . isEmpty ( e . get ( "halfYear_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_total_hb_num" ) . toString ( ) ) ; //环比 总数
double bloodTotalHalfYearHbNum = ObjectUtils . isEmpty ( e . get ( "halfYear_blood_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_blood_total_hb_num" ) . toString ( ) ) ; //环比 血净记录缺失总数
double healtheduTotalHalfYearHbNum = ObjectUtils . isEmpty ( e . get ( "halfYear_healthedu_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_healthedu_total_hb_num" ) . toString ( ) ) ; //环比 健康教育缺失总数
double informedconTotalHalfYearHbNum = ObjectUtils . isEmpty ( e . get ( "halfYear_informedcon_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_informedcon_total_hb_num" ) . toString ( ) ) ; //环比 知情同意合格总数
if ( halfYearTotalHbNum > 0 ) {
bloodFillIncompleteRateHalfYearHb = Double . parseDouble ( df . format ( bloodTotalHalfYearHbNum / halfYearTotalHbNum * 100 ) ) ; //环比 血净记录缺失率
healtheduFillIncompleteRateHalfYearHb = Double . parseDouble ( df . format ( healtheduTotalHalfYearHbNum / halfYearTotalHbNum * 100 ) ) ; //环比 健康教育缺失率
informedconDocNosignRateHalfYearHb = Double . parseDouble ( df . format ( informedconTotalHalfYearHbNum / halfYearTotalHbNum * 100 ) ) ;
}
resultMap . put ( "bloodFillIncompleteRateHalfYearHb" , bloodFillIncompleteRateHalfYearHb ) ;
resultMap . put ( "healtheduFillIncompleteRateHalfYearHb" , healtheduFillIncompleteRateHalfYearHb ) ;
resultMap . put ( "informedconDocNosignRateHalfYearHb" , informedconDocNosignRateHalfYearHb ) ;
//计算同比
double halfYearTotalYoyNum = ObjectUtils . isEmpty ( e . get ( "halfYear_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_total_tb_num" ) . toString ( ) ) ; //同比 总数
double bloodTotalHalfYearYoyNum = ObjectUtils . isEmpty ( e . get ( "halfYear_blood_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_blood_total_tb_num" ) . toString ( ) ) ; //同比 血净记录缺失总数
double healtheduTotalHalfYearYoyNum = ObjectUtils . isEmpty ( e . get ( "halfYear_healthedu_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_healthedu_total_tb_num" ) . toString ( ) ) ; //同比 健康教育缺失总数
double informedconTotalHalfYearYoyNum = ObjectUtils . isEmpty ( e . get ( "halfYear_informedcon_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "halfYear_informedcon_total_tb_num" ) . toString ( ) ) ; //
if ( halfYearTotalYoyNum > 0 ) {
bloodFillIncompleteRateHalfYearYoy = Double . parseDouble ( df . format ( bloodTotalHalfYearYoyNum / halfYearTotalYoyNum * 100 ) ) ; //同比 血净记录缺失率
healtheduFillIncompleteRateHalfYearYoy = Double . parseDouble ( df . format ( healtheduTotalHalfYearYoyNum / halfYearTotalYoyNum * 100 ) ) ; //同比 健康教育缺失率
informedconDocNosignRateHalfYearYoy = Double . parseDouble ( df . format ( informedconTotalHalfYearYoyNum / halfYearTotalYoyNum * 100 ) ) ;
}
resultMap . put ( "bloodFillIncompleteRateHalfYearYoy" , bloodFillIncompleteRateHalfYearYoy ) ;
resultMap . put ( "healtheduFillIncompleteRateHalfYearYoy" , healtheduFillIncompleteRateHalfYearYoy ) ;
resultMap . put ( "informedconDocNosignRateHalfYearYoy" , informedconDocNosignRateHalfYearYoy ) ;
/ * *
* 计 算 当 前 年 的 数 据
* /
double bloodFillIncompleteRateYear = 0 ;
double healtheduFillIncompleteRateYear = 0 ;
double informedconDocNosignRateYear = 0 ;
double bloodFillIncompleteRateYearHb = 0 ;
double healtheduFillIncompleteRateYearHb = 0 ;
double informedconDocNosignRateYearHb = 0 ;
double bloodFillIncompleteRateYearYoy = 0 ;
double healtheduFillIncompleteRateYearYoy = 0 ;
double informedconDocNosignRateYearYoy = 0 ;
double yearTotalNum = ObjectUtils . isEmpty ( e . get ( "year_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_total_num" ) . toString ( ) ) ; //当前年 总数
double bloodTotalYearNum = ObjectUtils . isEmpty ( e . get ( "year_blood_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_blood_total_num" ) . toString ( ) ) ; //当前年 血净记录缺失总数
double healtheduTotalYearNum = ObjectUtils . isEmpty ( e . get ( "year_healthedu_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_healthedu_total_num" ) . toString ( ) ) ; //当前年 健康教育缺失总数
double informedconTotalYearNum = ObjectUtils . isEmpty ( e . get ( "year_informedcon_total_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_informedcon_total_num" ) . toString ( ) ) ; //当前年 知情同意合格总数
if ( yearTotalNum > 0 ) {
bloodFillIncompleteRateYear = Double . parseDouble ( df . format ( bloodTotalYearNum / yearTotalNum * 100 ) ) ; //环比 血净记录缺失率
healtheduFillIncompleteRateYear = Double . parseDouble ( df . format ( healtheduTotalYearNum / yearTotalNum * 100 ) ) ; //环比 健康教育缺失率
informedconDocNosignRateYear = Double . parseDouble ( df . format ( informedconTotalYearNum / yearTotalNum * 100 ) ) ;
}
resultMap . put ( "bloodFillIncompleteRateYear" , bloodFillIncompleteRateYear ) ;
resultMap . put ( "healtheduFillIncompleteRateYear" , healtheduFillIncompleteRateYear ) ;
resultMap . put ( "informedconDocNosignRateYear" , informedconDocNosignRateYear ) ;
//计算环比
double yearTotalHbNum = ObjectUtils . isEmpty ( e . get ( "year_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_total_hb_num" ) . toString ( ) ) ; //环比 总数
double bloodTotalYearHbNum = ObjectUtils . isEmpty ( e . get ( "year_blood_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_blood_total_hb_num" ) . toString ( ) ) ; //环比 血净记录缺失总数
double healtheduTotalYearHbNum = ObjectUtils . isEmpty ( e . get ( "year_healthedu_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_healthedu_total_hb_num" ) . toString ( ) ) ; //环比 健康教育缺失总数
double informedconTotalYearHbNum = ObjectUtils . isEmpty ( e . get ( "year_informedcon_total_hb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_informedcon_total_hb_num" ) . toString ( ) ) ; //当前年 知情同意合格总数
if ( yearTotalHbNum > 0 ) {
bloodFillIncompleteRateYearHb = Double . parseDouble ( df . format ( bloodTotalYearHbNum / yearTotalHbNum * 100 ) ) ; //同比 血净记录缺失率
healtheduFillIncompleteRateYearHb = Double . parseDouble ( df . format ( healtheduTotalYearHbNum / yearTotalHbNum * 100 ) ) ; //同比 健康教育缺失率
informedconDocNosignRateYearHb = Double . parseDouble ( df . format ( informedconTotalYearHbNum / yearTotalHbNum * 100 ) ) ;
}
resultMap . put ( "bloodFillIncompleteRateYearHb" , bloodFillIncompleteRateYearHb ) ;
resultMap . put ( "healtheduFillIncompleteRateYearHb" , healtheduFillIncompleteRateYearHb ) ;
resultMap . put ( "informedconDocNosignRateYearHb" , informedconDocNosignRateYearHb ) ;
//计算同比
double yearTotalYoyNum = ObjectUtils . isEmpty ( e . get ( "year_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_total_tb_num" ) . toString ( ) ) ; //同比 总数
double bloodTotalYearYoyNum = ObjectUtils . isEmpty ( e . get ( "year_blood_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_blood_total_tb_num" ) . toString ( ) ) ; //同比 血净记录缺失总数
double healtheduTotalYearYoyNum = ObjectUtils . isEmpty ( e . get ( "year_healthedu_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_healthedu_total_tb_num" ) . toString ( ) ) ; //同比 健康教育缺失总数
double informedconTotalYearYoyNum = ObjectUtils . isEmpty ( e . get ( "year_informedcon_total_tb_num" ) ) ? 0 : Double . parseDouble ( e . get ( "year_informedcon_total_tb_num" ) . toString ( ) ) ; //同比 知情同意合格总数
if ( yearTotalYoyNum > 0 ) {
bloodFillIncompleteRateYearYoy = Double . parseDouble ( df . format ( bloodTotalYearYoyNum / yearTotalYoyNum * 100 ) ) ; //同比 血净记录缺失率
healtheduFillIncompleteRateYearYoy = Double . parseDouble ( df . format ( healtheduTotalYearYoyNum / yearTotalYoyNum * 100 ) ) ; //同比 健康教育缺失率
informedconDocNosignRateYearYoy = Double . parseDouble ( df . format ( informedconTotalYearYoyNum / yearTotalYoyNum * 100 ) ) ;
}
resultMap . put ( "bloodFillIncompleteRateYearYoy" , bloodFillIncompleteRateYearYoy ) ;
resultMap . put ( "healtheduFillIncompleteRateYearYoy" , healtheduFillIncompleteRateYearYoy ) ;
resultMap . put ( "informedconDocNosignRateYearYoy" , informedconDocNosignRateYearYoy ) ;
} ) ;
}
return ResultUtil . ok ( resultMap ) ;
} catch ( Exception e ) {
ExceptionPrintUtil . printException ( e ) ;
e . printStackTrace ( ) ;
return ResultUtil . error ( "统计过程出错,请检查代码" ) ;
}
}
/ * *
/ * *
* 查 询 文 书 报 表
* 查 询 文 书 报 表
* @param page
* @param page
@ -263,7 +669,7 @@ public class bloodPurificationController {
EmrBloodDialysisDoc emrBloodDialysisDoc = new EmrBloodDialysisDoc ( ) ;
EmrBloodDialysisDoc emrBloodDialysisDoc = new EmrBloodDialysisDoc ( ) ;
emrBloodDialysisDoc . setExportDate ( new Date ( ) ) ;
emrBloodDialysisDoc . setExportDate ( new Date ( ) ) ;
emrBloodDialysisDoc . setExportNo ( user . getUserName ( ) ) ;
emrBloodDialysisDoc . setExportNo ( user . getUserName ( ) ) ;
emrBloodDialysisDoc . setIsDel ( 0 ) ;
//实例化
//实例化
ImportExcelUtil . newInstance ( "bloodPurificationMapper" , emrBloodDialysisDoc , EmrBloodDialysisDoc . class ) ;
ImportExcelUtil . newInstance ( "bloodPurificationMapper" , emrBloodDialysisDoc , EmrBloodDialysisDoc . class ) ;
//导入excel的操作
//导入excel的操作
@ -288,4 +694,173 @@ public class bloodPurificationController {
return new ResponseEntity < String > ( e . getMessage ( ) , responseHeaders , HttpStatus . OK ) ;
return new ResponseEntity < String > ( e . getMessage ( ) , responseHeaders , HttpStatus . OK ) ;
}
}
}
}
/ * *
* 修 改 时 回 显 数 据
* @param id
* @return
* @throws Exception
* /
@RequestMapping ( value = "queryInspectionInfoById" , method = RequestMethod . POST )
@ResponseBody
public ResultUtil queryInspectionInfoById ( String id ) {
if ( StringUtils . isEmpty ( id ) ) {
return ResultUtil . error ( "参数错误" ) ;
}
List < EmrBloodDialysisDoc > list = bloodPurificationService . queryInspectionInfoById ( id ) ;
return ResultUtil . ok ( list ) ;
}
/ * *
* 修 改 后 保 存 信 息
* @param emrBloodDialysisDoc
* @return
* /
@OptionalLog ( module = "修改" , methods = "检查记录病历操作" )
@RequestMapping ( value = "updateInspectionInfo" , method = RequestMethod . POST )
@ResponseBody
public ResultUtil updateInspectionInfo ( EmrBloodDialysisDoc emrBloodDialysisDoc ) {
try {
bloodPurificationService . updateInspectionInfo ( emrBloodDialysisDoc ) ;
return ResultUtil . ok ( ) ;
} catch ( Exception e ) {
ExceptionPrintUtil . printException ( e ) ;
e . printStackTrace ( ) ;
return ResultUtil . error ( "更新时出错" ) ;
}
}
/ * *
* 提 交 审 批
* @param emrBloodApplyInfo
* @return
* /
@RequestMapping ( value = "insertFlowInfo" , method = RequestMethod . POST )
@ResponseBody
public ResultUtil insertFlowInfo ( HttpServletRequest request , String ids , EmrBloodApplyInfo emrBloodApplyInfo ) {
try {
Power_User user = ( Power_User ) request . getSession ( ) . getAttribute ( "CURRENT_USER" ) ;
String [ ] bloodIds = ids . split ( "," ) ;
for ( int i = 0 ; i < bloodIds . length ; i + + ) {
emrBloodApplyInfo . setBloodId ( Integer . parseInt ( bloodIds [ i ] ) ) ;
emrBloodApplyInfo . setApplyNo ( user . getUserName ( ) ) ;
emrBloodApplyInfo . setAppNo ( String . valueOf ( UUID . randomUUID ( ) ) ) ;
emrBloodApplyInfo . setStatus ( 1 ) ;
//插入流程表
bloodPurificationService . insertFlowInfo ( emrBloodApplyInfo ) ;
}
return ResultUtil . ok ( ) ;
} catch ( Exception e ) {
ExceptionPrintUtil . printException ( e ) ;
e . printStackTrace ( ) ;
return ResultUtil . error ( "流程处理出错" ) ;
}
}
/ * *
* 查 询 审 批 列 表
* @param page
* @param limit
* @param emrBloodApplyInfo
* @param request
* @return
* /
@RequestMapping ( "queryBloodApproveList" )
@ResponseBody
public String queryBloodApproveList ( Integer page , Integer limit , EmrBloodApplyInfo emrBloodApplyInfo , HttpServletRequest request ) {
if ( null ! = page & & null ! = limit ) {
PageHelper . startPage ( page , limit ) ;
}
try {
HttpSession session = request . getSession ( ) ;
emrBloodApplyInfo . setStatus ( Integer . valueOf ( ( String ) session . getAttribute ( "status" ) ) ) ;
List < EmrBloodApplyInfo > emrBloodDialysisDocs = bloodPurificationMapper . queryBloodApproveList ( emrBloodApplyInfo ) ;
PageInfo pageInfo = new PageInfo < > ( emrBloodDialysisDocs ) ;
return JSON . toJSONString ( pageInfo ) ;
} catch ( Exception e ) {
ExceptionPrintUtil . printException ( e ) ;
e . printStackTrace ( ) ;
return null ;
}
}
/ * *
* 查 询 流 程 记 录
* @param page
* @param limit
* @param emrBloodApplyInfo
* @return
* /
@RequestMapping ( "queryFlowLogList" )
@ResponseBody
public String queryFlowLogList ( Integer page , Integer limit , EmrBloodApplyInfo emrBloodApplyInfo ) {
if ( null ! = page & & null ! = limit ) {
PageHelper . startPage ( page , limit ) ;
}
try {
List < EmrBloodApplyInfo > emrBloodDialysisDocs = bloodPurificationMapper . queryFlowLogList ( emrBloodApplyInfo ) ;
PageInfo pageInfo = new PageInfo < > ( emrBloodDialysisDocs ) ;
return JSON . toJSONString ( pageInfo ) ;
} catch ( Exception e ) {
ExceptionPrintUtil . printException ( e ) ;
e . printStackTrace ( ) ;
return null ;
}
}
/ * *
* 审 批
* @param emrBloodApplyInfo
* @return
* /
@RequestMapping ( value = "handleFlowInfo" , method = RequestMethod . POST )
@ResponseBody
public ResultUtil handleFlowInfo ( HttpServletRequest request , EmrBloodApplyInfo emrBloodApplyInfo ) {
try {
HttpSession session = request . getSession ( ) ;
Integer status = Integer . valueOf ( ( String ) session . getAttribute ( "status" ) ) ;
Power_User user = ( Power_User ) request . getSession ( ) . getAttribute ( "CURRENT_USER" ) ;
String appNo = emrBloodApplyInfo . getAppNo ( ) ;
String [ ] appNos = appNo . split ( "," ) ;
for ( int i = 0 ; i < appNos . length ; i + + ) {
emrBloodApplyInfo . setAppNo ( appNos [ i ] ) ;
emrBloodApplyInfo . setApproveNo ( user . getUserName ( ) ) ;
Integer isAgree = emrBloodApplyInfo . getIsAgree ( ) ;
//如果不通过,则打回
if ( isAgree = = 1 ) {
emrBloodApplyInfo . setStatus ( status + 1 ) ;
} else {
emrBloodApplyInfo . setStatus ( status - 1 ) ;
}
if ( emrBloodApplyInfo . getStatus ( ) = = 0 ) {
//删除当前流程,重新申请新流程
bloodPurificationService . delFlowInfo ( emrBloodApplyInfo ) ;
} else {
bloodPurificationService . handleFlowInfo ( emrBloodApplyInfo ) ;
}
}
return ResultUtil . ok ( ) ;
} catch ( Exception e ) {
ExceptionPrintUtil . printException ( e ) ;
e . printStackTrace ( ) ;
return ResultUtil . error ( "流程处理出错" ) ;
}
}
@OptionalLog ( module = "删除" , methods = "检查记录病历操作" )
@RequestMapping ( value = "delApplyInfo" , method = RequestMethod . POST )
@ResponseBody
public ResultUtil delApplyInfo ( String id ) {
if ( StringUtils . isEmpty ( id ) ) {
return ResultUtil . error ( "参数错误" ) ;
}
try {
bloodPurificationService . delApplyInfo ( id ) ;
return ResultUtil . ok ( ) ;
} catch ( Exception e ) {
ExceptionPrintUtil . printException ( e ) ;
e . printStackTrace ( ) ;
return ResultUtil . error ( "流程处理出错" ) ;
}
}
}
}