主界面功能
This commit is contained in:
parent
846ebff8ec
commit
8d263a96d0
@ -69,6 +69,8 @@ public class LabPat extends BaseEntity {
|
|||||||
private String zjlx;
|
private String zjlx;
|
||||||
private String upload;
|
private String upload;
|
||||||
private String wyh;
|
private String wyh;
|
||||||
|
private Integer shcs;
|
||||||
|
private String lstd;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.czlis.common.constant;
|
package com.czlis.interfaceCommon.constants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口名称常量类
|
* 接口名称常量类
|
||||||
@ -9,4 +9,6 @@ public class LisinterfaceNameConstants {
|
|||||||
public static final String SETREPORT = "setreport";
|
public static final String SETREPORT = "setreport";
|
||||||
public static final String SETREQSTATUS = "setreqstatus";
|
public static final String SETREQSTATUS = "setreqstatus";
|
||||||
public static final String DAYMESSAGE = "daymessage";
|
public static final String DAYMESSAGE = "daymessage";
|
||||||
|
|
||||||
|
public static final String DAYMESSAGE_GETPATIENT = "204";
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.czlis.liswork.mapper.dict;
|
package com.czlis.interfaceCommon.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.czlis.common.core.domain.entity.ComDict;
|
import com.czlis.common.core.domain.entity.ComDict;
|
||||||
@ -16,7 +16,7 @@ public interface ComDictMapper {
|
|||||||
//根据主键判断是否存在数据
|
//根据主键判断是否存在数据
|
||||||
int getCountById(String zdlb, String zddh) ;
|
int getCountById(String zdlb, String zddh) ;
|
||||||
//根据编号查名称
|
//根据编号查名称
|
||||||
String getNameById(String zdlb,String zdmc);
|
String getComDictNameById(String zdlb,String zddh);
|
||||||
//根据名称查编号
|
//根据名称查编号
|
||||||
String getIdByName(String zdlb,String zdmc);
|
String getComDictIdByName(String zdlb,String zdmc);
|
||||||
}
|
}
|
||||||
@ -1,4 +1,7 @@
|
|||||||
package com.czlis.interfaceCommon.mapper;
|
package com.czlis.interfaceCommon.mapper;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
public interface CommonMapper {
|
public interface CommonMapper {
|
||||||
|
Date getCurrentTime();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface LabPatMapper {
|
public interface LabPatMapper {
|
||||||
List<LabPat> getLabPatList();
|
List<LabPat> getLabPatList(String sqh);
|
||||||
LabPat getLabPatOne(Date jyrq, String yq,String ybh);
|
LabPat getLabPatOne(Date jyrq, String yq,String ybh);
|
||||||
|
void insertLabPat(LabPat labPat);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,10 @@ package com.czlis.interfaceCommon.mapper;
|
|||||||
|
|
||||||
import com.czlis.common.core.domain.entity.LabReqmain;
|
import com.czlis.common.core.domain.entity.LabReqmain;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface LabReqmainMapper {
|
public interface LabReqmainMapper {
|
||||||
LabReqmain getLabReqmainOne(String sqh);
|
LabReqmain getLabReqmainOne(String sqh);
|
||||||
|
void updateLabReqmain(LabReqmain labReqmain);
|
||||||
|
void updateLabReqmainZT(Map<String,Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.czlis.interfaceCommon.pojo;
|
package com.czlis.interfaceCommon.pojo.inter;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.czlis.interfaceCommon.pojo;
|
package com.czlis.interfaceCommon.pojo.inter;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.czlis.interfaceCommon.pojo;
|
package com.czlis.interfaceCommon.pojo.inter;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.czlis.interfaceCommon.pojo;
|
package com.czlis.interfaceCommon.pojo.inter;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.czlis.interfaceCommon.pojo;
|
package com.czlis.interfaceCommon.pojo.inter;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -2,13 +2,12 @@ package com.czlis.interfaceCommon.utils;
|
|||||||
|
|
||||||
import com.czlis.common.core.domain.entity.LabPat;
|
import com.czlis.common.core.domain.entity.LabPat;
|
||||||
import com.czlis.common.core.domain.entity.LabReqmain;
|
import com.czlis.common.core.domain.entity.LabReqmain;
|
||||||
import com.czlis.interfaceCommon.mapper.ComOptMapper;
|
import com.czlis.interfaceCommon.mapper.*;
|
||||||
import com.czlis.interfaceCommon.mapper.LabPatMapper;
|
|
||||||
import com.czlis.interfaceCommon.mapper.LabReqmainMapper;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class CommonUtil {
|
public class CommonUtil {
|
||||||
@ -19,6 +18,11 @@ public class CommonUtil {
|
|||||||
ComOptMapper comOptMapper;
|
ComOptMapper comOptMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
LabReqmainMapper labReqmainMapper;
|
LabReqmainMapper labReqmainMapper;
|
||||||
|
@Autowired
|
||||||
|
CommonMapper commonMapper;
|
||||||
|
@Autowired
|
||||||
|
ComDictMapper comDictMapper;
|
||||||
|
|
||||||
|
|
||||||
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);
|
||||||
@ -31,4 +35,36 @@ public class CommonUtil {
|
|||||||
public LabReqmain getLabReqmainOne(String sqh){
|
public LabReqmain getLabReqmainOne(String sqh){
|
||||||
return labReqmainMapper.getLabReqmainOne(sqh);
|
return labReqmainMapper.getLabReqmainOne(sqh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<LabPat> getLabPatList(String sqh){
|
||||||
|
return labPatMapper.getLabPatList(sqh);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void insertLabPat(LabPat labPat){
|
||||||
|
labPatMapper.insertLabPat(labPat);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCurrentTime(){
|
||||||
|
return commonMapper.getCurrentTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComDictNameById(String zdlb,String xxdh){
|
||||||
|
String zdmc = comDictMapper.getComDictNameById(zdlb,xxdh);
|
||||||
|
if(zdmc == null || zdmc.equals("")){
|
||||||
|
return xxdh;
|
||||||
|
}else{
|
||||||
|
return zdmc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComDictIdByName(String zdlb,String zdmc){
|
||||||
|
String zddh = comDictMapper.getComDictIdByName(zdlb,zdmc);
|
||||||
|
if(zddh == null || zddh.equals("")){
|
||||||
|
return zdmc;
|
||||||
|
}else{
|
||||||
|
return zddh;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import cn.hutool.http.HttpResponse;
|
|||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.czlis.common.config.RuoYiConfig;
|
import com.czlis.common.config.RuoYiConfig;
|
||||||
import com.czlis.common.constant.LisinterfaceNameConstants;
|
import com.czlis.interfaceCommon.constants.LisinterfaceNameConstants;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
import com.czlis.interfaceCommon.mapper.LisInterfaceMapper;
|
import com.czlis.interfaceCommon.mapper.LisInterfaceMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.czlis.liswork.mapper.dict.ComDictMapper">
|
<mapper namespace="com.czlis.interfaceCommon.mapper.ComDictMapper">
|
||||||
|
|
||||||
<sql id="selectComDictVo">
|
<sql id="selectComDictVo">
|
||||||
select zdlb,zddh,zdmc,zjf,zdbz,bz,yljg,userflag from com_dict
|
select zdlb,zddh,zdmc,zjf,zdbz,bz,yljg,userflag from com_dict
|
||||||
@ -27,10 +27,10 @@
|
|||||||
<select id="getCountById" resultType="Long">
|
<select id="getCountById" resultType="Long">
|
||||||
select count(1) from com_dict where zdlb = #{zdlb} and zddh = #{zddh}
|
select count(1) from com_dict where zdlb = #{zdlb} and zddh = #{zddh}
|
||||||
</select>
|
</select>
|
||||||
<select id="getNameById" resultType="String">
|
<select id="getComDictNameById" resultType="String">
|
||||||
select zdmc from com_dict where zdlb = #{zdlb} and zddh = #{zddh}
|
select zdmc from com_dict where zdlb = #{zdlb} and zddh = #{zddh}
|
||||||
</select>
|
</select>
|
||||||
<select id="getIdByName" resultType="String">
|
<select id="getComDictIdByName" resultType="String">
|
||||||
select zddh from com_dict where zdlb = #{zdlb} and zdmc = #{zdmc}
|
select zddh from com_dict where zdlb = #{zdlb} and zdmc = #{zdmc}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
<?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.CommonMapper">
|
||||||
|
<select id="getCurrentTime">
|
||||||
|
select getdate()
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -6,6 +6,164 @@
|
|||||||
select * from lab_pat where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
select * from lab_pat where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getLabPatList" resultType="com.czlis.common.core.domain.entity.LabPat">
|
||||||
|
select * from lab_pat where where sqh = #{sqh}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertLabPat">
|
||||||
|
insert into lab_pat (
|
||||||
|
<if test="wyh != null and wyh !=''">wyh,</if>
|
||||||
|
<if test="yblx != null and yblx !=''">yblx,</if>
|
||||||
|
<if test="fb != null and wyh !=''">fb,</if>
|
||||||
|
<if test="ksdh != null and ksdh !=''">ksdh,</if>
|
||||||
|
<if test="sjys != null and sjys !=''">sjys,</if>
|
||||||
|
<if test="hdys != null and hdys !=''">hdys,</if>
|
||||||
|
<if test="yhdh != null and yhdh !=''">yhdh,</if>
|
||||||
|
<if test="brdh != null and brdh !=''">brdh,</if>
|
||||||
|
<if test="brxm != null and brxm !=''">brxm,</if>
|
||||||
|
<if test="brxb != null and brxb !=''">brxb,</if>
|
||||||
|
<if test="brly != null and brly !=''">brly,</if>
|
||||||
|
<if test="ch != null and ch !=''">ch,</if>
|
||||||
|
<if test="nl != null">nl,</if>
|
||||||
|
<if test="nldw != null and nldw != ''">nldw,</if>
|
||||||
|
<if test="sqh != null and sqh != ''">sqh,</if>
|
||||||
|
<if test="sqsj != null">sqsj,</if>
|
||||||
|
<if test="dysj != null">dysj,</if>
|
||||||
|
<if test="dybz != null and dybz != ''">dybz,</if>
|
||||||
|
<if test="jgbz != null and jgbz != ''">jgbz,</if>
|
||||||
|
<if test="bbbz != null and bbbz != ''">bbbz,</if>
|
||||||
|
<if test="zd != null and zd != ''">zd,</if>
|
||||||
|
<if test="bz != null and bz != ''">bz,</if>
|
||||||
|
<if test="bz1 != null and bz1 != ''">bz1,</if>
|
||||||
|
<if test="zjf != null and zjf != ''">zjf,</if>
|
||||||
|
<if test="zjf != null and zjf != ''">zjf,</if>
|
||||||
|
<if test="cyrq != null ">cyrq,</if>
|
||||||
|
<if test="bq != null and bq != ''">bq,</if>
|
||||||
|
<if test="czybh != null and czybh != ''">czybh,</if>
|
||||||
|
<if test="cjbw != null and cjbw != ''">cjbw,</if>
|
||||||
|
<if test="jymd != null and jymd != ''">jymd,</if>
|
||||||
|
<if test="lastuser != null and lastuser != ''">lastuser,</if>
|
||||||
|
<if test="lastdt != null">lastdt,</if>
|
||||||
|
<if test="confirmer != null and confirmer !=''">confirmer,</if>
|
||||||
|
<if test="confirmdt != null ">confirmdt,</if>
|
||||||
|
<if test="mzdy != null and mzdy != ''">mzdy,</if>
|
||||||
|
<if test="txtval != null and txtval != ''">txtval,</if>
|
||||||
|
<if test="fslx != null and fslx != ''">fslx,</if>
|
||||||
|
<if test="ybzt != null and ybzt != ''">ybzt,</if>
|
||||||
|
<if test="instrid != null and instrid != ''">instrid,</if>
|
||||||
|
<if test="jzbz != null and jzbz != ''">jzbz,</if>
|
||||||
|
<if test="sbbr != null and sbbr != ''">sbbr,</if>
|
||||||
|
<if test="qrr != null and qrr != ''">qrr,</if>
|
||||||
|
<if test="qrsj != null ">qrsj,</if>
|
||||||
|
<if test="alarmflag != null and alarmflag != ''">alarmflag,</if>
|
||||||
|
<if test="alarmconfirm != null and alarmconfirm != ''">alarmconfirm,</if>
|
||||||
|
<if test="alarmconfirmdt != null ">alarmconfirmdt,</if>
|
||||||
|
<if test="shcs != null ">shcs,</if>
|
||||||
|
<if test="sn_tss != null and sn_tss != ''">sn_tss,</if>
|
||||||
|
<if test="sn_result != null and sn_result != ''">sn_result,</if>
|
||||||
|
<if test="mzh != null and mzh != ''">mzh,</if>
|
||||||
|
<if test="yljg != null and yljg != ''">yljg,</if>
|
||||||
|
<if test="finish != null and finish != ''">finish,</if>
|
||||||
|
<if test="send_flag != null and send_flag != ''">send_flag,</if>
|
||||||
|
<if test="sfzh != null and sfzh != ''">sfzh,</if>
|
||||||
|
<if test="phone != null and phone != ''">phone,</if>
|
||||||
|
<if test="phone1 != null and phone1 != ''">phone1,</if>
|
||||||
|
<if test="addr != null and addr != ''">addr,</if>
|
||||||
|
<if test="faultman != null and faultman != ''">faultman,</if>
|
||||||
|
<if test="fault != null and fault != ''">fault,</if>
|
||||||
|
<if test="faults != null and faults != ''">faults,</if>
|
||||||
|
<if test="faultdt != null">faultdt,</if>
|
||||||
|
<if test="lstd != null and lstd !=''">lstd,</if>
|
||||||
|
<if test="zjlx != null and zjlx != ''">zjlx,</if>
|
||||||
|
<if test="slzq != null and slzq != ''">slzq,</if>
|
||||||
|
<if test="uploaddate != null">uploaddate,</if>
|
||||||
|
<if test="lastupdatetime != null">lastupdatetime,</if>
|
||||||
|
<if test="ylfw != null and ylfw != ''">ylfw,</if>
|
||||||
|
<if test="upload != null and upload != ''">upload,</if>
|
||||||
|
<if test="checker != null and checker != ''">checker,</if>
|
||||||
|
<if test="lisptsc != null and lisptsc != ''">lisptsc,</if>
|
||||||
|
<if test="autojgbz != null and autojgbz != ''">autojgbz,</if>
|
||||||
|
<if test="crbsj != null and crbsj != ''">crbsj,</if>
|
||||||
|
<if test="testName != null and testName != ''">testName,</if>
|
||||||
|
jyrq,yq,ybh
|
||||||
|
)
|
||||||
|
values(
|
||||||
|
<if test="wyh != null and wyh !=''">#{wyh},</if>
|
||||||
|
<if test="yblx != null and yblx !=''">#{yblx},</if>
|
||||||
|
<if test="fb != null and wyh !=''">#{fb},</if>
|
||||||
|
<if test="ksdh != null and ksdh !=''">#{ksdh},</if>
|
||||||
|
<if test="sjys != null and sjys !=''">#{sjys},</if>
|
||||||
|
<if test="hdys != null and hdys !=''">#{hdys},</if>
|
||||||
|
<if test="yhdh != null and yhdh !=''">#{yhdh},</if>
|
||||||
|
<if test="brdh != null and brdh !=''">#{brdh},</if>
|
||||||
|
<if test="brxm != null and brxm !=''">#{brxm},</if>
|
||||||
|
<if test="brxb != null and brxb !=''">#{brxb},</if>
|
||||||
|
<if test="brly != null and brly !=''">#{brly},</if>
|
||||||
|
<if test="ch != null and ch !=''">#{ch},</if>
|
||||||
|
<if test="nl != null">#{nl},</if>
|
||||||
|
<if test="nldw != null and nldw != ''">#{nldw},</if>
|
||||||
|
<if test="sqh != null and sqh != ''">#{sqh},</if>
|
||||||
|
<if test="sqsj != null">#{sqsj},</if>
|
||||||
|
<if test="dysj != null">#{dysj},</if>
|
||||||
|
<if test="dybz != null and dybz != ''">#{dybz},</if>
|
||||||
|
<if test="jgbz != null and jgbz != ''">#{jgbz},</if>
|
||||||
|
<if test="bbbz != null and bbbz != ''">#{bbbz},</if>
|
||||||
|
<if test="zd != null and zd != ''">#{zd},</if>
|
||||||
|
<if test="bz != null and bz != ''">#{bz},</if>
|
||||||
|
<if test="bz1 != null and bz1 != ''">#{bz1},</if>
|
||||||
|
<if test="zjf != null and zjf != ''">#{zjf},</if>
|
||||||
|
<if test="cyrq != null ">#{cyrq},</if>
|
||||||
|
<if test="bq != null and bq != ''">#{bq},</if>
|
||||||
|
<if test="czybh != null and czybh != ''">#{czybh},</if>
|
||||||
|
<if test="cjbw != null and cjbw != ''">#{cjbw},</if>
|
||||||
|
<if test="jymd != null and jymd != ''">#{jymd},</if>
|
||||||
|
<if test="lastuser != null and lastuser != ''">#{lastuser},</if>
|
||||||
|
<if test="lastdt != null">#{lastdt},</if>
|
||||||
|
<if test="confirmer != null and confirmer !=''">#{confirmer},</if>
|
||||||
|
<if test="confirmdt != null ">#{confirmdt},</if>
|
||||||
|
<if test="mzdy != null and mzdy != ''">#{mzdy},</if>
|
||||||
|
<if test="txtval != null and txtval != ''">#{txtval},</if>
|
||||||
|
<if test="fslx != null and fslx != ''">#{fslx},</if>
|
||||||
|
<if test="ybzt != null and ybzt != ''">#{ybzt},</if>
|
||||||
|
<if test="instrid != null and instrid != ''">#{instrid},</if>
|
||||||
|
<if test="jzbz != null and jzbz != ''">#{jzbz},</if>
|
||||||
|
<if test="sbbr != null and sbbr != ''">#{sbbr},</if>
|
||||||
|
<if test="qrr != null and qrr != ''">#{qrr},</if>
|
||||||
|
<if test="qrsj != null ">#{qrsj},</if>
|
||||||
|
<if test="alarmflag != null and alarmflag != ''">#{alarmflag},</if>
|
||||||
|
<if test="alarmconfirm != null and alarmconfirm != ''">#{alarmconfirm},</if>
|
||||||
|
<if test="alarmconfirmdt != null ">#{alarmconfirmdt},</if>
|
||||||
|
<if test="shcs != null ">#{shcs},</if>
|
||||||
|
<if test="sn_tss != null and sn_tss != ''">#{sn_tss},</if>
|
||||||
|
<if test="sn_result != null and sn_result != ''">#{sn_result},</if>
|
||||||
|
<if test="mzh != null and mzh != ''">#{mzh},</if>
|
||||||
|
<if test="yljg != null and yljg != ''">#{yljg},</if>
|
||||||
|
<if test="finish != null and finish != ''">#{finish},</if>
|
||||||
|
<if test="send_flag != null and send_flag != ''">#{send_flag},</if>
|
||||||
|
<if test="sfzh != null and sfzh != ''">#{sfzh},</if>
|
||||||
|
<if test="phone != null and phone != ''">#{phone},</if>
|
||||||
|
<if test="phone1 != null and phone1 != ''">#{phone1},</if>
|
||||||
|
<if test="addr != null and addr != ''">#{addr},</if>
|
||||||
|
<if test="faultman != null and faultman != ''">#{faultman},</if>
|
||||||
|
<if test="fault != null and fault != ''">#{fault},</if>
|
||||||
|
<if test="faults != null and faults != ''">#{faults},</if>
|
||||||
|
<if test="faultdt != null">#{faultdt},</if>
|
||||||
|
<if test="lstd != null and lstd !=''">#{lstd},</if>
|
||||||
|
<if test="zjlx != null and zjlx != ''">#{zjlx},</if>
|
||||||
|
<if test="slzq != null and slzq != ''">#{slzq},</if>
|
||||||
|
<if test="uploaddate != null">#{uploaddate},</if>
|
||||||
|
<if test="lastupdatetime != null">#{lastupdatetime},</if>
|
||||||
|
<if test="ylfw != null and ylfw != ''">#{ylfw},</if>
|
||||||
|
<if test="upload != null and upload != ''">#{upload},</if>
|
||||||
|
<if test="checker != null and checker != ''">#{checker},</if>
|
||||||
|
<if test="lisptsc != null and lisptsc != ''">#{lisptsc},</if>
|
||||||
|
<if test="autojgbz != null and autojgbz != ''">#{autojgbz},</if>
|
||||||
|
<if test="crbsj != null and crbsj != ''">#{crbsj},</if>
|
||||||
|
<if test="testName != null and testName != ''">#{testName},</if>
|
||||||
|
#{jyrq},#{yq},#{ybh}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,12 @@
|
|||||||
select * from lab_reqmain where sqh = #{sqh}
|
select * from lab_reqmain where sqh = #{sqh}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateLabReqmainZT">
|
||||||
|
<![CDATA[
|
||||||
|
UPDATE lab_reqmain SET zt = '2', jsys = #{userId}, jssj =getdate() WHERE sqh = #{sqh} AND (zt < '2' or zt='8' or jssj<zxsj)
|
||||||
|
]]>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,21 @@
|
|||||||
package com.czlis.liswork.controller.work;
|
package com.czlis.liswork.controller.work;
|
||||||
|
|
||||||
|
import com.czlis.common.core.controller.BaseController;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
|
import com.czlis.common.core.domain.entity.LabPat;
|
||||||
import com.czlis.liswork.service.LisWorkOperService;
|
import com.czlis.liswork.service.LisWorkOperService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/lisworkoper")
|
@RequestMapping("/lisworkoper")
|
||||||
public class LisWorkOperController {
|
public class LisWorkOperController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private LisWorkOperService lisWorkOperService;
|
private LisWorkOperService lisWorkOperService;
|
||||||
@ -18,7 +23,18 @@ public class LisWorkOperController {
|
|||||||
|
|
||||||
@ApiOperation(("新增病人信息"))
|
@ApiOperation(("新增病人信息"))
|
||||||
@GetMapping("/newpat")
|
@GetMapping("/newpat")
|
||||||
public Result newPatInfo(String sqh){
|
public Result newPatInfo(Date jyrq, String sqh, String yq, String ybh){
|
||||||
return lisWorkOperService.newPatInfo(sqh);
|
return lisWorkOperService.newPatInfo(jyrq,ybh,sqh,yq,getUserId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改病人信息
|
||||||
|
* @param labPat
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改病人信息")
|
||||||
|
@PostMapping("/changepat")
|
||||||
|
public Result changePat(LabPat labPat){
|
||||||
|
return lisWorkOperService.changePat(labPat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
package com.czlis.liswork.mapper;
|
package com.czlis.liswork.mapper;
|
||||||
|
|
||||||
public interface LisWorkOperMapper {
|
public interface LisWorkOperMapper {
|
||||||
|
Long checkReqClass(String sqh,String yq);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
package com.czlis.liswork.mapper.dict;
|
||||||
|
|
||||||
|
import com.czlis.liswork.pojo.LabInstrvsreqclass;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface LabInstrvsreqclassMapper {
|
||||||
|
List<LabInstrvsreqclass> getLabInstrvsreqclassList(LabInstrvsreqclass labInstrvsreqclass);
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.czlis.liswork.pojo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class LabInstrvsreqclass {
|
||||||
|
private String yq;
|
||||||
|
private String bgddh;
|
||||||
|
private Integer seq;
|
||||||
|
private String brly;
|
||||||
|
private String bk;
|
||||||
|
}
|
||||||
@ -1,7 +1,11 @@
|
|||||||
package com.czlis.liswork.service;
|
package com.czlis.liswork.service;
|
||||||
|
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
|
import com.czlis.common.core.domain.entity.LabPat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
public interface LisWorkOperService {
|
public interface LisWorkOperService {
|
||||||
Result newPatInfo(String sqh);
|
Result newPatInfo(Date jyrq,String ybh, String sqh, String yq, Long userId);
|
||||||
|
Result changePat(LabPat labPat);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,16 +2,13 @@ package com.czlis.liswork.service.impl;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.extra.pinyin.PinyinUtil;
|
import cn.hutool.extra.pinyin.PinyinUtil;
|
||||||
import com.czlis.common.constant.HttpStatus;
|
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
import com.czlis.common.exception.ServiceException;
|
|
||||||
import com.czlis.common.utils.ComDictUtils;
|
import com.czlis.common.utils.ComDictUtils;
|
||||||
import com.czlis.common.utils.StringUtils;
|
import com.czlis.common.utils.StringUtils;
|
||||||
import com.czlis.liswork.mapper.dict.ComDictMapper;
|
import com.czlis.interfaceCommon.mapper.ComDictMapper;
|
||||||
import com.czlis.common.core.domain.entity.ComDict;
|
import com.czlis.common.core.domain.entity.ComDict;
|
||||||
import com.czlis.liswork.service.ComDictService;
|
import com.czlis.liswork.service.ComDictService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.hibernate.validator.constraints.ru.INN;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|||||||
@ -1,17 +1,29 @@
|
|||||||
package com.czlis.liswork.service.impl;
|
package com.czlis.liswork.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.czlis.common.constant.LisinterfaceNameConstants;
|
import com.czlis.interfaceCommon.constants.LisinterfaceNameConstants;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
|
import com.czlis.common.core.domain.entity.LabPat;
|
||||||
import com.czlis.common.core.domain.entity.LabReqmain;
|
import com.czlis.common.core.domain.entity.LabReqmain;
|
||||||
import com.czlis.interfaceCommon.pojo.GetReqInterface;
|
import com.czlis.interfaceCommon.mapper.LabReqmainMapper;
|
||||||
|
import com.czlis.interfaceCommon.pojo.inter.DayMessage;
|
||||||
|
import com.czlis.interfaceCommon.pojo.inter.GetReqInterface;
|
||||||
|
import com.czlis.interfaceCommon.pojo.inter.SetReqStatus;
|
||||||
import com.czlis.interfaceCommon.utils.CommonUtil;
|
import com.czlis.interfaceCommon.utils.CommonUtil;
|
||||||
import com.czlis.interfaceCommon.utils.LisInterfaceUtil;
|
import com.czlis.interfaceCommon.utils.LisInterfaceUtil;
|
||||||
import com.czlis.liswork.mapper.LisWorkOperMapper;
|
import com.czlis.liswork.mapper.LisWorkOperMapper;
|
||||||
|
import com.czlis.liswork.mapper.dict.LabInstrvsreqclassMapper;
|
||||||
|
import com.czlis.liswork.pojo.LabInstrvsreqclass;
|
||||||
import com.czlis.liswork.service.LisWorkOperService;
|
import com.czlis.liswork.service.LisWorkOperService;
|
||||||
|
import com.czlis.liswork.utils.LisWorkUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -23,9 +35,13 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
LisInterfaceUtil lisInterfaceUtil;
|
LisInterfaceUtil lisInterfaceUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
CommonUtil commonUtil;
|
CommonUtil commonUtil;
|
||||||
|
@Autowired
|
||||||
|
LabInstrvsreqclassMapper labInstrvsreqclassMapper;
|
||||||
|
@Autowired
|
||||||
|
LabReqmainMapper labReqmainMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result newPatInfo(String sqh) {
|
public Result newPatInfo(Date jyrq,String ybh, String sqh, String yq, Long userId) {
|
||||||
|
|
||||||
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
|
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
|
||||||
if (labReqmainOne == null) {
|
if (labReqmainOne == null) {
|
||||||
@ -44,19 +60,135 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
}
|
}
|
||||||
if(labReqmainOne == null) return new Result("-1","没有获取到申请单信息!");
|
if(labReqmainOne == null) return new Result("-1","没有获取到申请单信息!");
|
||||||
String zt = labReqmainOne.getZt().trim();
|
String zt = labReqmainOne.getZt().trim();
|
||||||
|
//2.校验信息
|
||||||
|
//校验状态信息
|
||||||
|
Result result1 = checkZT(sqh, yq, zt);
|
||||||
|
if(!result1.getCode().equals("0")) return result1;
|
||||||
|
//校验条码类别
|
||||||
|
Result result2 = checkReqClass(sqh, yq, labReqmainOne.getBgddh());
|
||||||
|
if(!result2.getCode().equals("0")) return result2;
|
||||||
|
|
||||||
|
//3.调用his上机接口,
|
||||||
|
SetReqStatus setReqStatus = new SetReqStatus();
|
||||||
|
setReqStatus.setIp("");
|
||||||
|
setReqStatus.setSqh(sqh);
|
||||||
|
setReqStatus.setUserid(userId.toString());
|
||||||
|
setReqStatus.setStatus("2");
|
||||||
|
String jsonStr = JSONUtil.toJsonStr(setReqStatus);
|
||||||
|
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.SETREQSTATUS, jsonStr);
|
||||||
|
if(!result.getCode().equals("0")) return result;
|
||||||
|
|
||||||
|
//4.获取病人信息
|
||||||
|
DayMessage dayMessage = new DayMessage();
|
||||||
|
dayMessage.setIp("");
|
||||||
|
dayMessage.setYljg("1");
|
||||||
|
dayMessage.setUserid(userId.toString());
|
||||||
|
dayMessage.setMsgid(LisinterfaceNameConstants.DAYMESSAGE_GETPATIENT);
|
||||||
|
String val = labReqmainOne.getBrdh()+"|"+labReqmainOne.getBrly()+"|"; //这里有个医疗机构的,没有传,要考虑
|
||||||
|
dayMessage.setMsg(val);
|
||||||
|
|
||||||
|
//5.保存数据
|
||||||
|
Result result3 = saveReqInfo(userId.toString(), sqh, labReqmainOne, yq, jyrq, ybh);
|
||||||
|
if (!result3.getCode().equals("0")) return result3;
|
||||||
|
|
||||||
|
//6.写日志
|
||||||
|
|
||||||
|
|
||||||
|
return new Result("0","");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result changePat(LabPat labPat) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Result checkZT(String sqh,String yq,String zt){
|
||||||
if(zt.equals("9")) return new Result("-1","当前条码已经作废,不允许上机!");
|
if(zt.equals("9")) return new Result("-1","当前条码已经作废,不允许上机!");
|
||||||
String SP_GETTOWREQOK = commonUtil.getComOptValue("HISOPT", "SP_GETTOWREQOK"); //申请单禁止重复上机
|
String SP_GETTOWREQOK = commonUtil.getComOptValue("HISOPT", "SP_GETTOWREQOK"); //申请单禁止重复上机
|
||||||
String SP_GETTOWREQOKYQ = commonUtil.getComOptValue("HISOPT", "SP_GETTOWREQOKYQ");//申请单禁止同仪器重复上机
|
String SP_GETTOWREQOKYQ = commonUtil.getComOptValue("HISOPT", "SP_GETTOWREQOKYQ");//申请单禁止同仪器重复上机
|
||||||
if(zt.equals("2")){
|
if(zt.equals("2")){
|
||||||
if(SP_GETTOWREQOK.equals("1")) return new Result("-1","当前条码已经上机!");
|
if(SP_GETTOWREQOK.equals("1")) return new Result("-1","当前条码已经上机!");
|
||||||
if(SP_GETTOWREQOKYQ.equals("1")){
|
if(SP_GETTOWREQOKYQ.equals("1")){
|
||||||
//仪器代码取值要考虑
|
List<LabPat> labPatList = commonUtil.getLabPatList(sqh);
|
||||||
|
for (LabPat labPat : labPatList) {
|
||||||
|
String yq1 = labPat.getYq();
|
||||||
|
if(yq.equals(yq1)) return new Result("-1","该条码已经在当前仪器上机,不允许重复上机!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new Result("0","校验成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
private Result checkReqClass(String sqh,String yq,String bgddh){
|
||||||
|
String value = commonUtil.getComOptValue(yq, "chkreqclass");
|
||||||
|
if(!value.equals("1")) return new Result("0","");
|
||||||
|
LabInstrvsreqclass labInstrvsreqclass = new LabInstrvsreqclass();
|
||||||
|
labInstrvsreqclass.setYq(yq);
|
||||||
|
List<LabInstrvsreqclass> labInstrvsreqclassList = labInstrvsreqclassMapper.getLabInstrvsreqclassList(labInstrvsreqclass);
|
||||||
|
if(labInstrvsreqclassList.size() > 0){
|
||||||
|
List<LabInstrvsreqclass> collect = labInstrvsreqclassList.stream().filter(labInstrvsreqclass1 -> labInstrvsreqclass1.getBgddh().equals(bgddh)).collect(Collectors.toList());
|
||||||
|
List<LabInstrvsreqclass> collect1 = labInstrvsreqclassList.stream().filter(labInstrvsreqclass1 -> labInstrvsreqclass1.getBgddh().equals("MZ_" + bgddh)).collect(Collectors.toList());
|
||||||
|
if(collect.size() > 0) return new Result("0","");
|
||||||
|
if(collect1.size() > 0) return new Result("0","");
|
||||||
|
}
|
||||||
|
|
||||||
|
Long count = lisWorkOperMapper.checkReqClass(sqh, yq);
|
||||||
|
if(count > 0) {
|
||||||
|
return new Result("0","");
|
||||||
|
}else{
|
||||||
|
return new Result("1","");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Result saveReqInfo(String userId,String sqh,LabReqmain labReqmain,String yq,Date jyrq,String ybh){
|
||||||
|
//修改状态和时间
|
||||||
|
updateLabReqmainZT(userId,sqh);
|
||||||
|
//保存lab_pat表信息
|
||||||
|
LabPat labPat = new LabPat();
|
||||||
|
labPat.setJyrq(commonUtil.getCurrentTime());
|
||||||
|
labPat.setYq(yq);
|
||||||
|
labPat.setYbh(ybh);
|
||||||
|
labPat.setYblx(commonUtil.getComDictIdByName("BT",labReqmain.getYblx()));
|
||||||
|
labPat.setKsdh(commonUtil.getComDictIdByName("DP",labReqmain.getKsdh()));
|
||||||
|
labPat.setSjys(userId);
|
||||||
|
labPat.setBrdh(labReqmain.getBrdh());
|
||||||
|
labPat.setBrxm(labReqmain.getBrxm());
|
||||||
|
labPat.setBrxb(labReqmain.getBrxb());
|
||||||
|
labPat.setBrly(labReqmain.getBrly());
|
||||||
|
labPat.setCh(labReqmain.getCh());
|
||||||
|
Map<String, String> ageFromBirthDay = LisWorkUtil.getAgeFromBirthDay(DateUtil.format(labReqmain.getBrsr(), "yyyy-MM-dd"));
|
||||||
|
String age = ageFromBirthDay.get("age");
|
||||||
|
String unit = ageFromBirthDay.get("unit");
|
||||||
|
labPat.setNl(Integer.parseInt(age));
|
||||||
|
labPat.setNldw(unit);
|
||||||
|
labPat.setSqh(sqh);
|
||||||
|
labPat.setSqsj(labReqmain.getSqsj());
|
||||||
|
labPat.setJgbz("0");
|
||||||
|
labPat.setZd(labReqmain.getZd());
|
||||||
|
labPat.setCyrq(labReqmain.getCysj());
|
||||||
|
labPat.setJymd(labReqmain.getJymd());
|
||||||
|
labPat.setLastuser(userId);
|
||||||
|
labPat.setLastdt(commonUtil.getCurrentTime());
|
||||||
|
labPat.setShcs(0);
|
||||||
|
labPat.setYljg(labReqmain.getYljg());
|
||||||
|
labPat.setSfzh(labReqmain.getSfzh());
|
||||||
|
labPat.setPhone(labReqmain.getPhone());
|
||||||
|
labPat.setAddr(labReqmain.getAddr());
|
||||||
|
labPat.setLstd(labReqmain.getLstd());
|
||||||
|
commonUtil.insertLabPat(labPat);
|
||||||
|
return new Result("0","保存成功!");
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
|
||||||
|
public void updateLabReqmainZT(String userId,String sqh){
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("userId",userId);
|
||||||
|
map.put("sqh",sqh);
|
||||||
|
labReqmainMapper.updateLabReqmainZT(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,70 @@
|
|||||||
package com.czlis.liswork.utils;
|
package com.czlis.liswork.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUnit;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class LisWorkUtil {
|
public class LisWorkUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生日格式为:yyyy-MM-dd
|
||||||
|
* 根据出生日期计算年龄
|
||||||
|
* @param birthday
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Map<String,String> getAgeFromBirthDay(String birthday){
|
||||||
|
Map<String,String> map = new HashMap<>();
|
||||||
|
int age = DateUtil.ageOfNow(birthday);
|
||||||
|
if(age > 0){
|
||||||
|
map.put("age",String.valueOf(age));
|
||||||
|
map.put("unit","岁");
|
||||||
|
}else if(age == 0){
|
||||||
|
//不足一年的
|
||||||
|
long between = DateUtil.between(DateUtil.parse(birthday, "yyyy-MM-dd"), DateUtil.parse(DateUtil.today(), "yyyy-MM-dd"), DateUnit.DAY,true);
|
||||||
|
|
||||||
|
if(between/30 > 0){
|
||||||
|
long month = between/30;
|
||||||
|
map.put("age",String.valueOf(month));
|
||||||
|
map.put("unit","月");
|
||||||
|
}else if( between/30 == 0){
|
||||||
|
//不足一月的
|
||||||
|
map.put("age",String.valueOf(between));
|
||||||
|
map.put("unit","天");
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据年龄获取出生日期
|
||||||
|
* @param nl
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getBirthDayFromAge(int nl, String nldw){
|
||||||
|
Calendar cal = Calendar.getInstance();
|
||||||
|
cal.setTime(DateUtil.date());
|
||||||
|
switch (nldw){
|
||||||
|
case "岁":
|
||||||
|
cal.add(Calendar.YEAR,-nl);
|
||||||
|
case "月":
|
||||||
|
cal.add(Calendar.MONTH,-nl);
|
||||||
|
case "天":
|
||||||
|
cal.add(Calendar.DATE,-nl);
|
||||||
|
}
|
||||||
|
Date BirthDay = cal.getTime();
|
||||||
|
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
String format = df.format(BirthDay);
|
||||||
|
return DateUtil.parse(format,"yyyy-MM-dd");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
<?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.liswork.mapper.dict.LabInstrvsreqclassMapper">
|
||||||
|
<select id="getLabInstrvsreqclassList" resultType="com.czlis.liswork.pojo.LabInstrvsreqclass">
|
||||||
|
select * from lab_instrvsreqclass
|
||||||
|
<where>
|
||||||
|
<if test="yq != null and yq != ''"> and yq = #{yq}</if>
|
||||||
|
<if test="bgddh != null and bgddh !=''"> and bgddh = #{bgddh}</if>
|
||||||
|
<if test="seq != null"> and seq = #{seq}</if>
|
||||||
|
<if test="brly != null and brly != ''"> and brly = #{brly}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
13
liswork/src/main/resources/mapper/LisWorkOperMapper.xml
Normal file
13
liswork/src/main/resources/mapper/LisWorkOperMapper.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?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.liswork.mapper.LisWorkOperMapper">
|
||||||
|
|
||||||
|
<select id="checkReqClass" resultType="Long">
|
||||||
|
select COUNT(*) from xm_feeinstr,lab_reqdetail
|
||||||
|
where lab_reqdetail.sqxmdh=xm_feeinstr.sfxmdh
|
||||||
|
and lab_reqdetail.sqh=#{sqh} and xm_feeinstr.yq=#{yq};
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
x
Reference in New Issue
Block a user