主业务添加代码
This commit is contained in:
parent
f85f756f12
commit
ed9b3f8eb1
@ -0,0 +1,25 @@
|
|||||||
|
package com.czlis.common.core.domain.entity.lis;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class LabRefused {
|
||||||
|
|
||||||
|
private String sqh;
|
||||||
|
private Date refusedtime;
|
||||||
|
private String refuseder;
|
||||||
|
private String ksdh;
|
||||||
|
private String bz;
|
||||||
|
private String refusetext;
|
||||||
|
private String jsr;
|
||||||
|
private Date jssj;
|
||||||
|
private String bz1;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -177,16 +177,16 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
|||||||
return localDate.getDayOfWeek().getValue();
|
return localDate.getDayOfWeek().getValue();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 根据 Date 对象获取周几(中文)
|
* 根据 Date 对象获取星期几(中文)
|
||||||
* @param date 目标日期
|
* @param date 目标日期
|
||||||
* @return 中文周几(如 "周一"、"周日")
|
* @return 中文周几(如 "星期一"、"星期日")
|
||||||
*/
|
*/
|
||||||
public static String getWeekDayName(Date date) {
|
public static String getWeekDayName(Date date) {
|
||||||
// Date 转 LocalDate(默认系统时区)
|
// Date 转 LocalDate(默认系统时区)
|
||||||
LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||||
// 获取周索引:Monday=1,Sunday=7(更符合日常认知)
|
// 获取周索引:Monday=1,Sunday=7(更符合日常认知)
|
||||||
int weekIndex= localDate.getDayOfWeek().getValue();
|
int weekIndex= localDate.getDayOfWeek().getValue();
|
||||||
String[] weekDays = {"", "周一", "周二", "周三", "周四", "周五", "周六", "周日"};
|
String[] weekDays = {"", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"};
|
||||||
return weekDays[weekIndex];
|
return weekDays[weekIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.czlis.interfaceCommon.mapper;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.LabRefused;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface LabRefusedMapper {
|
||||||
|
List<LabRefused> getLabRefusedList(LabRefused labRefused);
|
||||||
|
LabRefused getLabRefusedOne(String sqh);
|
||||||
|
int delLabRefused(String sqh);
|
||||||
|
int insertLabRefused(LabRefused labRefused);
|
||||||
|
int updateLabRefused(LabRefused labRefused);
|
||||||
|
}
|
||||||
@ -5,6 +5,7 @@ import com.czlis.common.core.domain.entity.lis.*;
|
|||||||
import com.czlis.common.utils.ComDictUtils;
|
import com.czlis.common.utils.ComDictUtils;
|
||||||
import com.czlis.common.utils.ComOptionUtils;
|
import com.czlis.common.utils.ComOptionUtils;
|
||||||
import com.czlis.interfaceCommon.mapper.*;
|
import com.czlis.interfaceCommon.mapper.*;
|
||||||
|
import com.sun.org.apache.bcel.internal.generic.RETURN;
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -52,7 +53,8 @@ public class CommonUtil {
|
|||||||
LabReqsteplogMapper labReqsteplogMapper;
|
LabReqsteplogMapper labReqsteplogMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
ComLogMapper comLogMapper;
|
ComLogMapper comLogMapper;
|
||||||
|
@Autowired
|
||||||
|
LabRefusedMapper labRefusedMapper;
|
||||||
//====检验主表操作方法集合===
|
//====检验主表操作方法集合===
|
||||||
public LabPat getLabPatOne(Date jyrq, String yq, String ybh) {
|
public LabPat getLabPatOne(Date jyrq, String yq, String ybh) {
|
||||||
return labPatMapper.getLabPatOne(jyrq, yq, ybh);
|
return labPatMapper.getLabPatOne(jyrq, yq, ybh);
|
||||||
@ -109,6 +111,13 @@ public class CommonUtil {
|
|||||||
public List<LabReqsteplog> getLabReqsteplog(String sqh) {
|
public List<LabReqsteplog> getLabReqsteplog(String sqh) {
|
||||||
return labReqsteplogMapper.getLabReqsteplog(sqh);
|
return labReqsteplogMapper.getLabReqsteplog(sqh);
|
||||||
}
|
}
|
||||||
|
public List<LabRefused> getLabRefusedList(LabRefused labRefused){
|
||||||
|
return labRefusedMapper.getLabRefusedList(labRefused);
|
||||||
|
}
|
||||||
|
public int insertLabRefused(LabRefused labRefused){
|
||||||
|
return labRefusedMapper.insertLabRefused(labRefused);
|
||||||
|
}
|
||||||
|
|
||||||
//申请单明细表集合
|
//申请单明细表集合
|
||||||
|
|
||||||
//====检验结果表操作方法集合===
|
//====检验结果表操作方法集合===
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
||||||
select * from lab_pat where where sqh = #{sqh}
|
select * from lab_pat where sqh = #{sqh}
|
||||||
</select>
|
</select>
|
||||||
<sql id="selectLabPatVo">
|
<sql id="selectLabPatVo">
|
||||||
select jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg from lab_pat
|
select jyrq,yq,ybh,jzbz,jgbz,dybz,brly,brdh,brxm,brxb,nl,nldw,ksdh,jymd,yljg from lab_pat
|
||||||
|
|||||||
@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.czlis.interfaceCommon.mapper.LabRefusedMapper">
|
||||||
|
<select id="getLabRefusedOne" resultType="com.czlis.common.core.domain.entity.lis.LabRefused" parameterType="String">
|
||||||
|
select * from lab_refused where sqh = #{sqh}
|
||||||
|
</select>
|
||||||
|
<select id="getLabRefusedList" resultType="com.czlis.common.core.domain.entity.lis.LabRefused">
|
||||||
|
select * from lab_refused
|
||||||
|
<where>
|
||||||
|
<if test="sqh != null and yq !=''">and sqh = #{sqh}</if>
|
||||||
|
<if test="refusedtime != null">and refusedtime = #{refusedtime}</if>
|
||||||
|
<if test="refuseder != null and refuseder !=''">and refuseder = #{refuseder}</if>
|
||||||
|
<if test="ksdh != null and ksdh !=''">and ksdh = #{ksdh}</if>
|
||||||
|
<if test="bz != null and bz !=''">and bz = #{bz}</if>
|
||||||
|
<if test="refusetext != null and refusetext !=''">and refusetext = #{refusetext}</if>
|
||||||
|
<if test="bz1 != null and bz1 !=''">and bz1 = #{bz1}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<delete id="delLabRefused" parameterType="String">
|
||||||
|
delete from lab_refused where sqh = #{sqh}
|
||||||
|
</delete>
|
||||||
|
<insert id="insertLabRefused" parameterType="com.czlis.common.core.domain.entity.lis.LabRefused">
|
||||||
|
insert into lab_refused(
|
||||||
|
<if test="refusedtime != null">refusedtime,</if>
|
||||||
|
<if test="refuseder != null and refuseder != ''">refuseder,</if>
|
||||||
|
<if test="ksdh != null and ksdh != ''">ksdh,</if>
|
||||||
|
<if test="bz != null and bz != ''">bz,</if>
|
||||||
|
<if test="refusetext != null and refusetext != ''">refusetext,</if>
|
||||||
|
<if test="bz1 != null and bz1 != ''">bz1,</if>
|
||||||
|
sqh
|
||||||
|
)values(
|
||||||
|
<if test="refusedtime != null">#{refusedtime},</if>
|
||||||
|
<if test="refuseder != null and refuseder != ''">#{refuseder},</if>
|
||||||
|
<if test="ksdh != null and ksdh != ''">#{ksdh},</if>
|
||||||
|
<if test="bz != null and bz != ''">#{bz},</if>
|
||||||
|
<if test="refusetext != null and yljg != ''">#{refusetext},</if>
|
||||||
|
<if test="bz1 != null and bz1 != ''">#{bz1},</if>
|
||||||
|
#{sqh}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<update id="updateLabRefused" parameterType="com.czlis.common.core.domain.entity.lis.LabRefused">
|
||||||
|
update lab_refused
|
||||||
|
<set>
|
||||||
|
<if test="refusedtime != null and refusedtime !=''">refusedtime= #{refusedtime},</if>
|
||||||
|
<if test="refuseder != null and refuseder != ''">refuseder = #{refuseder},</if>
|
||||||
|
<if test="ksdh != null and ksdh != ''">ksdh = #{ksdh},</if>
|
||||||
|
<if test="bz != null and bz != ''">bz = #{bz},</if>
|
||||||
|
<if test="refusetext != null and refusetext != ''">refusetext = #{refusetext},</if>
|
||||||
|
<if test="bz1 != null and bz1 != ''">bz1 = #{bz1},</if>
|
||||||
|
sqh = #{sqh}
|
||||||
|
</set>
|
||||||
|
where sqh = #{sqh}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@ -1054,4 +1054,28 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
private int checkxpywrgjz(LabPat labPat){
|
||||||
|
String ls_bz=labPat.getBz();
|
||||||
|
String ls_sqh=labPat.getSqh();
|
||||||
|
String yq=labPat.getYq();
|
||||||
|
if(ls_sqh==null || ls_sqh.isEmpty()) return 0;
|
||||||
|
if(ls_bz==null || ls_bz.isEmpty()) return 0;
|
||||||
|
String ls_xpywr=commonUtil.getComOptValue(yq,"xpywrgjz");
|
||||||
|
if(ls_xpywr==null || ls_xpywr.isEmpty()) return 0;
|
||||||
|
if(ls_bz.contains(ls_xpywr)){
|
||||||
|
String ls_yblx=labPat.getYblx();
|
||||||
|
if(ls_yblx==null || ls_yblx.isEmpty()) return 0;
|
||||||
|
String ls_yblxmc=commonUtil.getComDictNameById("BT",ls_yblx);
|
||||||
|
if(ls_yblxmc==null || ls_yblxmc.isEmpty()) return 0;
|
||||||
|
if(ls_yblxmc.contains("血")||ls_yblx.contains("血")){
|
||||||
|
String ls_xpywrdh=commonUtil.getComOptValue(yq,"xpywrdh");
|
||||||
|
if(ls_xpywrdh==null || ls_xpywrdh.isEmpty()) return 0;
|
||||||
|
String ls_hdys=labPat.getHdys();
|
||||||
|
if(ls_hdys==null || ls_hdys.isEmpty())ls_hdys=labPat.getYhdh();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user