Compare commits

...

2 Commits

Author SHA1 Message Date
tangw
dfde8dfc82 Merge remote-tracking branch 'origin/master' 2025-09-29 10:36:09 +08:00
tangw
8cbbcb96d0 主程序 2025-09-29 10:35:58 +08:00
11 changed files with 146 additions and 27 deletions

View File

@ -0,0 +1,18 @@
package com.czlis.common.core.domain.entity.lis;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LabPatfee {
private java.sql.Timestamp jyrq;
private String yq;
private String ybh;
private String sqh;
}

View File

@ -3,7 +3,7 @@ package com.czlis.interfaceCommon.constants;
/** /**
* 检验报告单状态常量(lab_pat.jgbz) * 检验报告单状态常量(lab_pat.jgbz)
*/ */
public class ReportStatusConstants { public class LabPatConstants {
/** /**
* 未审核报告默认状态=0 * 未审核报告默认状态=0
*/ */

View File

@ -3,7 +3,7 @@ package com.czlis.interfaceCommon.constants;
/** /**
* 申请单状态常量(lab_reqmain.zt) * 申请单状态常量(lab_reqmain.zt)
*/ */
public class SampleStatusConstants { public class LabReqmainConstants {
/** /**
* 标本开单,新建样本-1 * 标本开单,新建样本-1
*/ */

View File

@ -0,0 +1,15 @@
package com.czlis.interfaceCommon.constants;
/**
* lab_result.result_flag定义
*/
public class LabResultConstants {
/**正常*/ public static final String normal="M";
/**阳性*/ public static final String pos="P";
/**偏高*/ public static final String high="H";
/**偏低*/ public static final String low="L";
/**阴性*/ public static final String negative="N";
/**危急*/ public static final String limit="J";
/**弱阳性*/ public static final String weakpos="Q";
/**错误*/ public static final String err="E";
}

View File

@ -0,0 +1,15 @@
package com.czlis.interfaceCommon.constants;
public class LabResultmedConstants {
/**
* lab_resultmed.jgbz定义
*/
public class LabResultConstants {
/**耐药*/ public static final String resistant="R";
/**敏感*/ public static final String sensitive="S";
/**中介*/ public static final String middle="I";
/**剂量依赖型敏感*/ public static final String weaksensitive="D";
/**无*/ public static final String negative="N";
}
}

View File

@ -0,0 +1,15 @@
package com.czlis.interfaceCommon.mapper;
import com.czlis.common.core.domain.entity.lis.LabPatfee;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
public interface LabPatfeeMapper {
LabPatfee getLabPatfee(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh") String ybh);
List<LabPatfee> getLabPatfeeBysqh(String sqh);
int insertLabPatfee(LabPatfee labPatfee);
int updateLabPatfee(LabPatfee labPatfee);
int deleteLabPatfee(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh") String ybh);
}

View File

@ -75,6 +75,8 @@ public class CommonUtil {
LabInputcolMapper labInputcolMapper; LabInputcolMapper labInputcolMapper;
@Autowired @Autowired
ComLocalconfigMapper comLocalconfigMapper; ComLocalconfigMapper comLocalconfigMapper;
@Autowired
LabPatfeeMapper labPatfeeMapper;
//====检验主表操作方法集合=== //====检验主表操作方法集合===
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);
@ -93,6 +95,24 @@ public class CommonUtil {
public List<LabPat> getSampleListday(String yq, Long days){ public List<LabPat> getSampleListday(String yq, Long days){
return labPatMapper.getSampleListday(yq,days); return labPatMapper.getSampleListday(yq,days);
} }
public LabPatfee getLabPatfee(Date jyrq, String yq, String ybh) {
return labPatfeeMapper.getLabPatfee(jyrq,yq,ybh);
}
public List<LabPatfee> getLabPatfeeBysqh(String sqh) {
return labPatfeeMapper.getLabPatfeeBysqh(sqh);
}
@Transactional(rollbackFor = Exception.class)
public int insertLabPatfee(LabPatfee labPatfee) {
return labPatfeeMapper.insertLabPatfee(labPatfee);
}
@Transactional(rollbackFor = Exception.class)
public int deleteLabPatfee(Date jyrq, String yq, String ybh) {
return labPatfeeMapper.deleteLabPatfee(jyrq,yq,ybh);
}
@Transactional(rollbackFor = Exception.class)
public int updateLabPatfee(LabPatfee labPatfee) {
return labPatfeeMapper.updateLabPatfee(labPatfee);
}
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int insertLabPat(LabPat labPat) { public int insertLabPat(LabPat labPat) {
return labPatMapper.updateLabPat(labPat); return labPatMapper.updateLabPat(labPat);

View File

@ -0,0 +1,21 @@
<?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.LabPatfeeMapper">
<select id="getLabPatfee" resultType="com.czlis.common.core.domain.entity.lis.LabPatfee">
select * from lab_patfee where jyrq=#{jyrq} and yq=#{yq} and yq=#{ybh}
</select>
<select id="getLabPatfeeBysqh" resultType="com.czlis.common.core.domain.entity.lis.LabPatfee">
select * from lab_patfee where sqh=#{sqh}
</select>
<insert id="insertLabPatfee">
INSERT INTO lab_patfee (jyrq, yq, ybh, sqh)values(#{jyrq},#{yq},#{ybh},#{sqh})
</insert>
<insert id="deleteLabPatfee">
delete from lab_patfee WHERE jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
</insert>
<update id="updateLabPatfee">
update lab_patfee set sqh=#{sqh} where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh}
</update>
</mapper>

View File

@ -31,7 +31,7 @@ public class LisWorkOperController extends BaseController {
@ApiOperation(("新增病人信息")) @ApiOperation(("新增病人信息"))
@GetMapping("/newpat") @GetMapping("/newpat")
public Result newPatInfo(Date jyrq, String sqh, String yq, String ybh){ public Result newPatInfo(Date jyrq, String sqh, String yq, String ybh){
return lisWorkOperService.newPatInfo(jyrq,ybh,sqh,yq,getUserId()); return lisWorkOperService.newPatInfo(jyrq,ybh,sqh,yq);
} }
/** /**

View File

@ -7,7 +7,7 @@ import com.czlis.common.core.domain.entity.lis.LabResult;
import java.util.Date; import java.util.Date;
public interface LisWorkOperService { public interface LisWorkOperService {
Result newPatInfo(Date jyrq, String ybh, String sqh, String yq, Long userId); Result newPatInfo(Date jyrq, String ybh, String sqh, String yq);
Result changePat(LabPat labPat); Result changePat(LabPat labPat);
Result changePatColumn(Date jyrq, String yq, String ybh,String column,String value); Result changePatColumn(Date jyrq, String yq, String ybh,String column,String value);

View File

@ -12,8 +12,8 @@ import com.czlis.common.utils.ip.IpUtils;
import com.czlis.interfaceCommon.constants.ComLogConstants; import com.czlis.interfaceCommon.constants.ComLogConstants;
import com.czlis.interfaceCommon.constants.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.constants.ReportStatusConstants; import com.czlis.interfaceCommon.constants.LabPatConstants;
import com.czlis.interfaceCommon.constants.SampleStatusConstants; import com.czlis.interfaceCommon.constants.LabReqmainConstants;
import com.czlis.interfaceCommon.mapper.LabReqdetailMapper; import com.czlis.interfaceCommon.mapper.LabReqdetailMapper;
import com.czlis.interfaceCommon.mapper.LabReqmainMapper; import com.czlis.interfaceCommon.mapper.LabReqmainMapper;
import com.czlis.interfaceCommon.pojo.inter.DayMessage; import com.czlis.interfaceCommon.pojo.inter.DayMessage;
@ -24,12 +24,9 @@ import com.czlis.interfaceCommon.utils.*;
import com.czlis.liswork.mapper.LisWorkMapper; import com.czlis.liswork.mapper.LisWorkMapper;
import com.czlis.liswork.mapper.LisWorkOperMapper; import com.czlis.liswork.mapper.LisWorkOperMapper;
import com.czlis.liswork.mapper.dict.LabInstrvsreqclassMapper; import com.czlis.liswork.mapper.dict.LabInstrvsreqclassMapper;
import com.czlis.liswork.pojo.DTO.ResultCalcDTO;
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 lombok.val;
import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -60,8 +57,26 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
@Autowired @Autowired
LoginConfigParamUtil loginConfigParamUtil; LoginConfigParamUtil loginConfigParamUtil;
@Override @Override
public Result newPatInfo(Date jyrq, String ybh, String sqh, String yq, Long userId) { public Result newPatInfo(Date jyrq, String ybh, String sqh, String yq) {
int problemId = ServletUtils.getParameterToInt("problemId", 0);
LabPat labPat=commonUtil.getLabPatOne(jyrq,yq,ybh);
boolean newpatinfo=true;
if(labPat!=null){
String jgbz=labPat.getJgbz();
if(LabPatConstants.CONFIRM.equals(jgbz)){
return new Result("-1", "当前样本已审核禁止修改!");
}
newpatinfo=false;
String brdh=labPat.getBrdh();
String sqh0=labPat.getSqh();
String brxm=labPat.getBrxm();
if(problemId<1) {
if ((brdh != null && !"".equals(brdh)) || (sqh0 != null && !"".equals(sqh0)) || (brxm != null && !"".equals(brxm))) {
return new Result("5", "当前样本已有病人信息是否替换!", 1);
}
}
}
String yhdh=SecurityUtils.getLoginUser().getUsername();
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh); LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
if (labReqmainOne == null) { if (labReqmainOne == null) {
//1.调用接口,获取申请单信息 //1.调用接口,获取申请单信息
@ -90,8 +105,8 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
SetReqStatus setReqStatus = new SetReqStatus(); SetReqStatus setReqStatus = new SetReqStatus();
setReqStatus.setIp(""); setReqStatus.setIp("");
setReqStatus.setSqh(sqh); setReqStatus.setSqh(sqh);
setReqStatus.setUserid(userId.toString()); setReqStatus.setUserid(yhdh);
setReqStatus.setStatus(SampleStatusConstants.SIGNFOR); setReqStatus.setStatus(LabReqmainConstants.SIGNFOR);
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.SETREQSTATUS, setReqStatus); Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.SETREQSTATUS, setReqStatus);
if (!result.getCode().equals("0")) return result; if (!result.getCode().equals("0")) return result;
@ -99,13 +114,13 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
DayMessage dayMessage = new DayMessage(); DayMessage dayMessage = new DayMessage();
dayMessage.setIp(""); dayMessage.setIp("");
dayMessage.setYljg("1"); dayMessage.setYljg("1");
dayMessage.setUserid(userId.toString()); dayMessage.setUserid(yhdh);
dayMessage.setMsgid(LisinterfaceNameConstants.DAYMESSAGE_GETPATIENT); dayMessage.setMsgid(LisinterfaceNameConstants.DAYMESSAGE_GETPATIENT);
String val = labReqmainOne.getBrdh() + "|" + labReqmainOne.getBrly() + "|"; //这里有个医疗机构的,没有传,要考虑 String val = labReqmainOne.getBrdh() + "|" + labReqmainOne.getBrly() + "|"; //这里有个医疗机构的,没有传,要考虑
dayMessage.setMsg(val); dayMessage.setMsg(val);
//5.保存数据 //5.保存数据
Result result3 = saveReqInfo(userId.toString(), sqh, labReqmainOne, yq, jyrq, ybh); Result result3 = saveReqInfo(yhdh, sqh, labReqmainOne, yq, jyrq, ybh);
if (!result3.getCode().equals("0")) return result3; if (!result3.getCode().equals("0")) return result3;
//6.写日志 //6.写日志
@ -409,7 +424,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
if(labPat.getYhdh()==null||"".equals(labPat.getYhdh())) labPat.setYhdh(SecurityUtils.getLoginUser().getUsername()); if(labPat.getYhdh()==null||"".equals(labPat.getYhdh())) labPat.setYhdh(SecurityUtils.getLoginUser().getUsername());
labPat.setLastuser(yhdh); labPat.setLastuser(yhdh);
labPat.setLastdt(ldt_now); labPat.setLastdt(ldt_now);
if(labPat.getJgbz()==null)labPat.setJgbz(ReportStatusConstants.DEFAULT); if(labPat.getJgbz()==null)labPat.setJgbz(LabPatConstants.DEFAULT);
return new Result("0", "样本初始化成功!",labPat); return new Result("0", "样本初始化成功!",labPat);
} }
public void updateLabReqmainZT(String userId, String sqh) { public void updateLabReqmainZT(String userId, String sqh) {
@ -490,7 +505,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
setComLog(jyrq, yq, ybh,hdys, ComLogConstants.LG_CK,""); setComLog(jyrq, yq, ybh,hdys, ComLogConstants.LG_CK,"");
String sqh=labPat.getSqh(); String sqh=labPat.getSqh();
if(sqh!=null){ if(sqh!=null){
setlabReqsteplog(sqh,SampleStatusConstants.CONFIRM,hdys); setlabReqsteplog(sqh, LabReqmainConstants.CONFIRM,hdys);
} }
return new Result("0", "审核成功!"); return new Result("0", "审核成功!");
} }
@ -804,13 +819,13 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
LabReqmain labReqmain = commonUtil.getLabReqmainOne(sqh); LabReqmain labReqmain = commonUtil.getLabReqmainOne(sqh);
if (labReqmain != null) { if (labReqmain != null) {
String zt = labReqmain.getZt(); String zt = labReqmain.getZt();
if (SampleStatusConstants.CANCAL.equals(zt)) return new Result("-1", "申请单已作废禁止审核!"); if (LabReqmainConstants.CANCAL.equals(zt)) return new Result("-1", "申请单已作废禁止审核!");
labReqmain.setYqdh(yq); labReqmain.setYqdh(yq);
labReqmain.setSjsj(jysj); labReqmain.setSjsj(jysj);
labReqmain.setConfirmer(hdys); labReqmain.setConfirmer(hdys);
labReqmain.setConfirmtime(Confirmdt); labReqmain.setConfirmtime(Confirmdt);
labReqmain = checklabReqmainTAT(labReqmain); labReqmain = checklabReqmainTAT(labReqmain);
if (!SampleStatusConstants.CANCAL.equals(zt)) labReqmain.setZt(SampleStatusConstants.CONFIRM); if (!LabReqmainConstants.CANCAL.equals(zt)) labReqmain.setZt(LabReqmainConstants.CONFIRM);
commonUtil.updateLabReqmain(labReqmain); commonUtil.updateLabReqmain(labReqmain);
Date cysj = labReqmain.getCysj(); Date cysj = labReqmain.getCysj();
if (cysj != null) labPat.setCyrq(cysj); if (cysj != null) labPat.setCyrq(cysj);
@ -835,7 +850,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
//最后完成 //最后完成
String finish = labPat.getFinish(); String finish = labPat.getFinish();
if (!"细菌仪".equals(yqdl) && finish != null) labPat.setFinish("1"); if (!"细菌仪".equals(yqdl) && finish != null) labPat.setFinish("1");
labPat.setJgbz(ReportStatusConstants.CONFIRM); labPat.setJgbz(LabPatConstants.CONFIRM);
Integer shcs = labPat.getShcs(); Integer shcs = labPat.getShcs();
if (shcs == null) shcs = 0; if (shcs == null) shcs = 0;
shcs = shcs + 1; shcs = shcs + 1;
@ -871,7 +886,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
labPat.setLastuser(hdys); labPat.setLastuser(hdys);
String finish = labPat.getFinish(); String finish = labPat.getFinish();
if (!"细菌仪".equals(yqdl) && finish != null) labPat.setFinish("1"); if (!"细菌仪".equals(yqdl) && finish != null) labPat.setFinish("1");
labPat.setJgbz(ReportStatusConstants.PRELIM); labPat.setJgbz(LabPatConstants.PRELIM);
commonUtil.updateLabPat(labPat); commonUtil.updateLabPat(labPat);
return ret; return ret;
} }
@ -1710,11 +1725,11 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
LabReqmain labReqmain = commonUtil.getLabReqmainOne(sqh); LabReqmain labReqmain = commonUtil.getLabReqmainOne(sqh);
if (labReqmain != null) { if (labReqmain != null) {
String zt = labReqmain.getZt(); String zt = labReqmain.getZt();
if (!SampleStatusConstants.CANCAL.equals(zt)) { if (!LabReqmainConstants.CANCAL.equals(zt)) {
labReqmain.setConfirmer(""); labReqmain.setConfirmer("");
labReqmain.setConfirmtime(null); labReqmain.setConfirmtime(null);
if (SampleStatusConstants.CONFIRM.equals(zt)) { if (LabReqmainConstants.CONFIRM.equals(zt)) {
labReqmain.setZt(SampleStatusConstants.SIGNFOR); labReqmain.setZt(LabReqmainConstants.SIGNFOR);
labReqmain.setConfirmer(""); labReqmain.setConfirmer("");
labReqmain.setConfirmtime(null); labReqmain.setConfirmtime(null);
commonUtil.updateLabReqmain(labReqmain); commonUtil.updateLabReqmain(labReqmain);
@ -1749,13 +1764,13 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
} }
commonUtil.deleteLabReqreportPdffile(jyrq, yq, ybh); commonUtil.deleteLabReqreportPdffile(jyrq, yq, ybh);
labPat.setFslx(""); labPat.setFslx("");
labPat.setJgbz(ReportStatusConstants.DEFAULT); labPat.setJgbz(LabPatConstants.DEFAULT);
commonUtil.updateLabPat(labPat); commonUtil.updateLabPat(labPat);
String logdata=commonUtil.getLisPatlogbz(jyrq, yq, ybh); String logdata=commonUtil.getLisPatlogbz(jyrq, yq, ybh);
setComLog(jyrq, yq, ybh,yhdh, ComLogConstants.LG_UCK,logdata); setComLog(jyrq, yq, ybh,yhdh, ComLogConstants.LG_UCK,logdata);
setpatLog(jyrq, yq, ybh,yhdh); setpatLog(jyrq, yq, ybh,yhdh);
if(sqh!=null){ if(sqh!=null){
setlabReqsteplog(sqh,SampleStatusConstants.START,yhdh); setlabReqsteplog(sqh, LabReqmainConstants.START,yhdh);
} }
if (!"取消成功!".equals(msg)) return new Result("3", msg); if (!"取消成功!".equals(msg)) return new Result("3", msg);
return new Result("0", msg); return new Result("0", msg);
@ -1780,7 +1795,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
if (problemId < 5) problemId = 5; if (problemId < 5) problemId = 5;
labPat.setFslx(""); labPat.setFslx("");
labPat.setJgbz(ReportStatusConstants.DEFAULT); labPat.setJgbz(LabPatConstants.DEFAULT);
commonUtil.updateLabPat(labPat); commonUtil.updateLabPat(labPat);
setComLog(jyrq, yq, ybh,yhdh, ComLogConstants.LG_UCK1,""); setComLog(jyrq, yq, ybh,yhdh, ComLogConstants.LG_UCK1,"");
return new Result("0", "取消成功!"); return new Result("0", "取消成功!");