From 995a8469f1d58a1464c1d684ea8af4d3a161f06f Mon Sep 17 00:00:00 2001 From: hujl Date: Thu, 16 Dec 2021 09:29:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=A4=A9=E6=95=B0sQl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/emr/controller/faultController.java | 40 ++++ .../resources/mapper/Archive_MasterMapper.xml | 190 +++++++++--------- .../mapper/Emr_Fault_DetailMapper.xml | 6 +- .../WEB-INF/views/faultDir/faultList.jsp | 162 +++++++-------- 4 files changed, 219 insertions(+), 179 deletions(-) diff --git a/src/main/java/com/emr/controller/faultController.java b/src/main/java/com/emr/controller/faultController.java index 4c8367fb..4a414236 100644 --- a/src/main/java/com/emr/controller/faultController.java +++ b/src/main/java/com/emr/controller/faultController.java @@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; +import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; @@ -110,7 +111,46 @@ public class faultController { /* long end = System.currentTimeMillis(); System.out.println("耗时:" + (end - start) / 1000 + "秒");*/ } + public boolean compare(String time1,String time2) throws ParseException { + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + Date a=sdf.parse(time1); + Date b=sdf.parse(time2); + //a早于b返回true + if(a.before(b)){ + return true; + }else{ + return false; + } + } + + /** + * + * @param nowTime 当前时间 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return + * @author sunran 判断当前时间在时间区间内 + */ + public static boolean isEffectiveDate(Date nowTime, Date startTime, Date endTime) { + if (nowTime.getTime() == startTime.getTime() + || nowTime.getTime() == endTime.getTime()) { + return true; + } + Calendar date = Calendar.getInstance(); + date.setTime(nowTime); + Calendar begin = Calendar.getInstance(); + begin.setTime(startTime); + + Calendar end = Calendar.getInstance(); + end.setTime(endTime); + + if (date.after(begin) && date.before(end)) { + return true; + } else { + return false; + } + } // @ResponseBody // @RequestMapping(value = "/faultByArchiveId") diff --git a/src/main/resources/mapper/Archive_MasterMapper.xml b/src/main/resources/mapper/Archive_MasterMapper.xml index 2ee737a0..7f79dd97 100644 --- a/src/main/resources/mapper/Archive_MasterMapper.xml +++ b/src/main/resources/mapper/Archive_MasterMapper.xml @@ -109,7 +109,7 @@ bed_number,is_sign,signer,sign_time + - + - + delete from emr_fault_detail where id = #{id,jdbcType=INTEGER} @@ -273,12 +273,12 @@ - insert into emr_fault_detail (id, archive_detail_id, assort_id, + insert into emr_fault_detail (id, archive_detail_id, assort_id, parent_id, content,price, score, back_content, first_trial,state,recall_reason,creater, create_time, updater, update_time ) - values (#{id,jdbcType=INTEGER}, #{archiveDetailId,jdbcType=NVARCHAR}, #{assortId,jdbcType=NVARCHAR}, + values (#{id,jdbcType=INTEGER}, #{archiveDetailId,jdbcType=NVARCHAR}, #{assortId,jdbcType=NVARCHAR}, #{parentId,jdbcType=INTEGER}, #{content,jdbcType=NVARCHAR}, #{price,jdbcType=DECIMAL}, #{score,jdbcType=DECIMAL}, #{backContent,jdbcType=NVARCHAR}, #{firstTrial,jdbcType=NVARCHAR}, #{state,jdbcType=NVARCHAR}, #{recallReason,jdbcType=VARCHAR}, #{creater,jdbcType=NVARCHAR}, #{createTime,jdbcType=NCHAR}, #{updater,jdbcType=NVARCHAR}, #{updateTime,jdbcType=NCHAR} diff --git a/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp b/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp index f4e62563..d8cc24bb 100644 --- a/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp +++ b/src/main/webapp/WEB-INF/views/faultDir/faultList.jsp @@ -38,7 +38,7 @@ } /*.table-striped > tbody > tr:nth-of-type(odd) {*/ - /*background-color: #f9f9f9*/ + /*background-color: #f9f9f9*/ /*}*/ .toolbarCss { @@ -60,41 +60,41 @@ -
- - -
-
-
- - -
-
- - -
-
- - -
-
- -
- +
+ + + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ - -
-
- - <%----%> + <%----%> + <%--<%––%>--%> + <%--<%––%>--%> + <%--<%––%>--%> + <%--<%––%>--%> + <%--<%––%>--%> + <%--<%––%>--%> <%----%> --%> - <%--
--%> -
-
+ <%--
--%> +
+
@@ -149,27 +149,27 @@
- -
- <%--
--%> -
-
-
- -
- - + +
+<%--
--%> +
+
+
+
- +
+ + +
@@ -179,20 +179,20 @@ var tipLoad=1; <%--function getDept() {--%> - <%--//获取科室列表--%> - <%--$.ajax({--%> - <%--url: "${path}/inHosp/getDept",--%> - <%--type: "POST",--%> - <%--data: {effective: 1, typecode: "dept_code"},--%> - <%--success: function (result) {--%> - <%--if (result != null) {--%> - <%--for (var i = 0; i < result.length; i++) {--%> - <%--$("#deptName").append("");--%> - <%--}--%> - <%--}--%> - <%--$(".selectpicker").selectpicker('refresh');--%> - <%--}--%> - <%--});--%> + <%--//获取科室列表--%> + <%--$.ajax({--%> + <%--url: "${path}/inHosp/getDept",--%> + <%--type: "POST",--%> + <%--data: {effective: 1, typecode: "dept_code"},--%> + <%--success: function (result) {--%> + <%--if (result != null) {--%> + <%--for (var i = 0; i < result.length; i++) {--%> + <%--$("#deptName").append("");--%> + <%--}--%> + <%--}--%> + <%--$(".selectpicker").selectpicker('refresh');--%> + <%--}--%> + <%--});--%> <%--}--%> <%--getDept();--%> @@ -217,7 +217,7 @@ } function getFaultType() { - // console.log("=========getFaultType========="); + // console.log("=========getFaultType========="); //获取科室列表 $.ajax({ url: "${path}/lastVerify/getFaultType", @@ -319,14 +319,14 @@ var limit= null; var offset= params.offset; //判断是否导出全部all - if ($("#sel_exportoption").val() == "all") { - offset=0; - limit=this.totalRows; - this.pageSize= limit; + if ($("#sel_exportoption").val() == "all") { + offset=0; + limit=this.totalRows; + this.pageSize= limit; }else{ - limit = currPageSize; - this.pageSize = currPageSize; - } + limit = currPageSize; + this.pageSize = currPageSize; + } /*var url = window.location.href; var deptName = url.substring(url.lastIndexOf('&') + 1).replace("depts=", ""); @@ -451,9 +451,9 @@ //在院 未归档 归档中 初审 已归档 已认证 复审退回 var a =''; if (value == "未归档") { - a = '' + value + ''; + a = '' + value + ''; } else if (value == "已归档") { - a = '' + value + ''; + a = '' + value + ''; } else if (value == "在院") { a = '' + value + ''; } else if (value == "归档中") { @@ -708,9 +708,9 @@ //2.初始化select的change事件 $("#sel_exportoption").change(function () { - $('#table').bootstrapTable('refreshOptions', { - exportDataType: $(this).val() - }); + $('#table').bootstrapTable('refreshOptions', { + exportDataType: $(this).val() + }); }); $("#refreshBtn").click(function () { //刷新