许可码校验工具类
This commit is contained in:
parent
b3171392c6
commit
6999b92cf8
@ -0,0 +1,16 @@
|
|||||||
|
package com.czlis.common.core.domain.entity.lis;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class LabReportvsitem {
|
||||||
|
|
||||||
|
private String yq;
|
||||||
|
private String xmdh;
|
||||||
|
private Integer bgdh;
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
package com.czlis.interfaceCommon.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public interface LabReportvsitemMapper {
|
||||||
|
int getLabReportvsitemCount(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh);
|
||||||
|
int getLabReport2(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh);
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.czlis.interfaceCommon.mapper;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.LabResultMed;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface LabResultMedMapper {
|
||||||
|
List<LabResultMed> getLabResultMed(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh, @Param("xmdh")String xmdh);
|
||||||
|
int getLabResultMedCount(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh);
|
||||||
|
}
|
||||||
@ -67,6 +67,10 @@ public class CommonUtil {
|
|||||||
LabResultlogMapper labResultlogMapper;
|
LabResultlogMapper labResultlogMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
LabPatlogMapper labPatlogMapper;
|
LabPatlogMapper labPatlogMapper;
|
||||||
|
@Autowired
|
||||||
|
LabResultMedMapper labResultMedMapper;
|
||||||
|
@Autowired
|
||||||
|
LabReportvsitemMapper labReportvsitemMapper;
|
||||||
//====检验主表操作方法集合===
|
//====检验主表操作方法集合===
|
||||||
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);
|
||||||
@ -217,7 +221,9 @@ public class CommonUtil {
|
|||||||
public void insertLabPatlog(Date jyrq, String yq, String ybh,Date xgrq,String xgyhdh,String ip) {
|
public void insertLabPatlog(Date jyrq, String yq, String ybh,Date xgrq,String xgyhdh,String ip) {
|
||||||
labPatlogMapper.insertLabPatlog(jyrq, yq, ybh,xgrq,xgyhdh,ip);
|
labPatlogMapper.insertLabPatlog(jyrq, yq, ybh,xgrq,xgyhdh,ip);
|
||||||
}
|
}
|
||||||
|
public int getLabResultMedCount(Date jyrq, String yq, String ybh) {
|
||||||
|
return labResultMedMapper.getLabResultMedCount(jyrq, yq, ybh);
|
||||||
|
}
|
||||||
//=====项目字典查询=========
|
//=====项目字典查询=========
|
||||||
public List<XmInfo> getXmInfoList(String yq) {
|
public List<XmInfo> getXmInfoList(String yq) {
|
||||||
return xmInfoMapper.getXmInfoList(yq);
|
return xmInfoMapper.getXmInfoList(yq);
|
||||||
@ -291,7 +297,9 @@ public class CommonUtil {
|
|||||||
public List<LabInstr> getLabInstrList(LabInstr labInstr) {
|
public List<LabInstr> getLabInstrList(LabInstr labInstr) {
|
||||||
return labInstrMapper.getLabInstrList(labInstr);
|
return labInstrMapper.getLabInstrList(labInstr);
|
||||||
}
|
}
|
||||||
|
public int getLabReport2(Date jyrq, String yq, String ybh) {
|
||||||
|
return labReportvsitemMapper.getLabReport2(jyrq, yq, ybh);
|
||||||
|
}
|
||||||
//服务器时间方法
|
//服务器时间方法
|
||||||
public Date getCurrentTime() {
|
public Date getCurrentTime() {
|
||||||
return commonMapper.getCurrentTime();
|
return commonMapper.getCurrentTime();
|
||||||
|
|||||||
@ -4,6 +4,7 @@ package com.czlis.interfaceCommon.utils;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.czlis.common.config.RuoYiConfig;
|
import com.czlis.common.config.RuoYiConfig;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.LabInstr;
|
||||||
import com.czlis.common.utils.ip.IpUtils;
|
import com.czlis.common.utils.ip.IpUtils;
|
||||||
import com.czlis.interfaceCommon.mapper.BackPaperMapper;
|
import com.czlis.interfaceCommon.mapper.BackPaperMapper;
|
||||||
import com.czlis.interfaceCommon.pojo.entity.BackPaperDetail;
|
import com.czlis.interfaceCommon.pojo.entity.BackPaperDetail;
|
||||||
@ -248,6 +249,68 @@ public class ReportUtil {
|
|||||||
return new Result("0","打印成功!",httpPath);
|
return new Result("0","打印成功!",httpPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断当前报告单是否使用A4报告单
|
||||||
|
* @param jyrq
|
||||||
|
* @param yq
|
||||||
|
* @param ybh
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getReportPaperSize(Date jyrq,String yq,String ybh){
|
||||||
|
//是否分A4,A5报告单
|
||||||
|
String NOBOTH =commonUtil.getComOptValue(yq,"NOBOTH");
|
||||||
|
//NOBOTH=0全部A5
|
||||||
|
if("".equals(NOBOTH)||NOBOTH==null||"0".equals(NOBOTH)){
|
||||||
|
return "A5";
|
||||||
|
}
|
||||||
|
//NOBOTH=1全部A4
|
||||||
|
if("1".equals(NOBOTH)){
|
||||||
|
return "A4";
|
||||||
|
}
|
||||||
|
//NOBOTH=2报告一A4,=3报告二A4
|
||||||
|
//当前仪器是否开启双报告单模式,未开启则直接判断纸张
|
||||||
|
String DOUBLEREPORT=commonUtil.getComOptValue(yq,"DOUBLEREPORT");
|
||||||
|
if("".equals(DOUBLEREPORT)||DOUBLEREPORT==null||"0".equals(DOUBLEREPORT)){
|
||||||
|
if("2".equals(NOBOTH)){
|
||||||
|
return "A4";
|
||||||
|
}else {
|
||||||
|
return "A5";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//判断细菌仪使用的报告单模板
|
||||||
|
String yqdl = commonUtil.getYqdl(yq);
|
||||||
|
if("细菌仪".equals(yqdl)){
|
||||||
|
int ym=commonUtil.getLabResultMedCount(jyrq,yq,ybh);
|
||||||
|
if(ym>1){
|
||||||
|
if("2".equals(NOBOTH)){
|
||||||
|
return "A4";
|
||||||
|
}else {
|
||||||
|
return "A5";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if("3".equals(NOBOTH)){
|
||||||
|
return "A4";
|
||||||
|
}else {
|
||||||
|
return "A5";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//常规报告如果报告使用报告二模板,判断报告二是否A4
|
||||||
|
int bg2=commonUtil.getLabReport2(jyrq,yq,ybh);
|
||||||
|
if(bg2>0){
|
||||||
|
if("3".equals(NOBOTH)){
|
||||||
|
return "A4";
|
||||||
|
}else {
|
||||||
|
return "A5";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//无任何设定则使用报告单一
|
||||||
|
if("2".equals(NOBOTH)){
|
||||||
|
return "A4";
|
||||||
|
}else {
|
||||||
|
return "A5";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*** 获取服务器当前的数据库连接事务对象
|
/*** 获取服务器当前的数据库连接事务对象
|
||||||
* 通过@Qualifier获取实际当前连接事务对象,一般是DynamicDataSource
|
* 通过@Qualifier获取实际当前连接事务对象,一般是DynamicDataSource
|
||||||
|
|||||||
@ -0,0 +1,27 @@
|
|||||||
|
<?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.LabReportvsitemMapper">
|
||||||
|
<select id="getLabReportvsitem" resultType="com.czlis.common.core.domain.entity.lis.LabReportvsitem" parameterType="String">
|
||||||
|
select * from lab_reportvsitem where yq = #{yq}
|
||||||
|
</select>
|
||||||
|
<select id="getLabReportvsitemCount" resultType="int">
|
||||||
|
SELECT count(1) FROM lab_result, lab_reportvsitem
|
||||||
|
WHERE ( lab_result.yq = lab_reportvsitem.yq ) AND ( lab_result.xmdh = lab_reportvsitem.xmdh )
|
||||||
|
AND ( lab_result.jyrq =#{jyrq} ) AND ( lab_result.yq = #{yq}) AND ( lab_result.ybh = #{ybh} )
|
||||||
|
</select>
|
||||||
|
<select id="getLabReportCount" resultType="int">
|
||||||
|
SELECT sum(LEN(refs) - LEN(REPLACE(refs, '|', '')))+count(1) FROM lab_result,xm_info WHERE
|
||||||
|
xm_info.yq=lab_result.yq and xm_info.xmdh=lab_result.xmdh and xm_info.dylx !='3' and
|
||||||
|
AND ( lab_result.jyrq =#{jyrq} ) AND ( lab_result.yq = #{yq}) AND ( lab_result.ybh = #{ybh} )
|
||||||
|
</select>
|
||||||
|
<select id="getLabReport2" resultType="int">
|
||||||
|
select count(1) from (SELECT (sum(LEN(refs) - LEN(REPLACE(refs, '|', '')))+count(1)) as sl,count(lab_reportvsitem.xmdh) as bg2xms,count(com_rpt.bgdh) as slbgd
|
||||||
|
FROM lab_result join xm_info on xm_info.yq=lab_result.yq and xm_info.xmdh=lab_result.xmdh and xm_info.dylx !='3'
|
||||||
|
join lab_instr on lab_instr.yq=lab_result.yq
|
||||||
|
left join lab_reportvsitem on lab_result.yq = lab_reportvsitem.yq AND lab_result.xmdh = lab_reportvsitem.xmdh
|
||||||
|
left join com_rpt on dxmc=(select dxmc from com_rpt where bgdh=lab_instr.bgdh) and zdy=0 and com_rpt.bgdh in( 3,8,9,19,22,32,37,40,55)
|
||||||
|
WHERE lab_result.jyrq =#{jyrq} AND lab_result.yq = #{yq} AND lab_result.ybh = #{ybh} ) a join lab_instr on lab_instr.yq=#{yq}
|
||||||
|
where bg2xms>0 or (lab_instr.myhs1 is not null and lab_instr.myhs1>0 and sl>lab_instr.myhs*(case slbgd when 0 then 1 else 2 end))
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@ -19,6 +19,7 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLabResultList" parameterType="com.czlis.common.core.domain.entity.lis.LabResult" resultType="com.czlis.common.core.domain.entity.lis.LabResult">
|
<select id="getLabResultList" parameterType="com.czlis.common.core.domain.entity.lis.LabResult" resultType="com.czlis.common.core.domain.entity.lis.LabResult">
|
||||||
select
|
select
|
||||||
lab_result.jyrq, lab_result.yq, lab_result.ybh, lab_result.xmdh, wyh, csjg, od, cutoff, lab_result.jgbz, bz1, bz2, yhdh, instrid, operdt,
|
lab_result.jyrq, lab_result.yq, lab_result.ybh, lab_result.xmdh, wyh, csjg, od, cutoff, lab_result.jgbz, bz1, bz2, yhdh, instrid, operdt,
|
||||||
|
|||||||
@ -0,0 +1,38 @@
|
|||||||
|
<?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.LabResultMedMapper">
|
||||||
|
<select id="getLabResultMed" resultType="com.czlis.common.core.domain.entity.lis.LabResultMed">
|
||||||
|
select *
|
||||||
|
from lab_resultmed
|
||||||
|
<where>
|
||||||
|
<if test="jyrq != null ">
|
||||||
|
and jyrq = #{jyrq}
|
||||||
|
</if>
|
||||||
|
<if test="yq != null and yq != ''">
|
||||||
|
and yq = #{yq}
|
||||||
|
</if>
|
||||||
|
<if test="ybh != null and ybh != ''">
|
||||||
|
and ybh = #{ybh}
|
||||||
|
</if>
|
||||||
|
<if test="xmdh != null and xmdh != ''">
|
||||||
|
and xmdh = #{xmdh}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="getLabResultMedCount" resultType="int">
|
||||||
|
select count(1)
|
||||||
|
from lab_resultmed
|
||||||
|
<where>
|
||||||
|
<if test="jyrq != null ">
|
||||||
|
and jyrq = #{jyrq}
|
||||||
|
</if>
|
||||||
|
<if test="yq != null and yq != ''">
|
||||||
|
and yq = #{yq}
|
||||||
|
</if>
|
||||||
|
<if test="ybh != null and ybh != ''">
|
||||||
|
and ybh = #{ybh}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@ -67,14 +67,14 @@ public class LisWorkController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation("获取样本列表")
|
@ApiOperation("获取样本列表")
|
||||||
@GetMapping("/samplelist")
|
@GetMapping("/samplelist")
|
||||||
public Result getSampleList(Date jyrq,String yq,Long days){
|
// public Result getSampleList(Date jyrq,String yq,Long days){
|
||||||
return lisWorkService.getSampleList(jyrq,yq,days);
|
// return lisWorkService.getSampleList(jyrq,yq,days);
|
||||||
}
|
|
||||||
// public TableDataInfo getsamplelist(Date jyrq, String yq, Long days) {
|
|
||||||
// startPage();
|
|
||||||
// List<LabPat> labPatList = lisWorkService.getSampleList(jyrq, yq, days);
|
|
||||||
// return getDataTable(labPatList);
|
|
||||||
// }
|
// }
|
||||||
|
public TableDataInfo getsamplelist(Date jyrq, String yq, Long days) {
|
||||||
|
startPage();
|
||||||
|
List<LabPat> labPatList = lisWorkService.getSampleList(jyrq, yq, days);
|
||||||
|
return getDataTable(labPatList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取普通样本信息
|
* 获取普通样本信息
|
||||||
|
|||||||
@ -13,7 +13,7 @@ public interface LisWorkService {
|
|||||||
Result getInstrdList(Long userId);
|
Result getInstrdList(Long userId);
|
||||||
Result getGroupInstrdList(Long userId,String groupId);
|
Result getGroupInstrdList(Long userId,String groupId);
|
||||||
Result getInstrdConfig(String yq);
|
Result getInstrdConfig(String yq);
|
||||||
Result getSampleList(Date jyrq, String yq, Long days);
|
List<LabPat> getSampleList(Date jyrq, String yq, Long days);
|
||||||
Result getLabPat(Date jyrq, String yq, String ybh);
|
Result getLabPat(Date jyrq, String yq, String ybh);
|
||||||
Result sampleMedInfo(Date jyrq, String yq, String ybh);
|
Result sampleMedInfo(Date jyrq, String yq, String ybh);
|
||||||
Result checkUser(String yhdh, String mm);
|
Result checkUser(String yhdh, String mm);
|
||||||
|
|||||||
@ -64,13 +64,13 @@ public class LisWorkServiceImpl implements LisWorkService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result getSampleList(Date jyrq, String yq, Long days) {
|
public List<LabPat> getSampleList(Date jyrq, String yq, Long days) {
|
||||||
if(days>1) {
|
if(days>1) {
|
||||||
List<LabPat> labPatListday = commonUtil.getSampleListday(yq, days);
|
List<LabPat> labPatListday = commonUtil.getSampleListday(yq, days);
|
||||||
return new Result("0", "获取样本数据成功!", labPatListday);
|
return labPatListday;//new Result("0", "获取样本数据成功!", labPatListday);
|
||||||
}else {
|
}else {
|
||||||
List<LabPat> labPatListday = commonUtil.getsamplelist(jyrq, yq);
|
List<LabPat> labPatListday = commonUtil.getsamplelist(jyrq, yq);
|
||||||
return new Result("0", "获取样本数据成功!", labPatListday);
|
return labPatListday;//new Result("0", "获取样本数据成功!", labPatListday);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user