Compare commits

..

No commits in common. "dfde8dfc825170acca7176a261440f703dff30ef" and "d6fda2cde8ce94ffc44386da2274858bee2859b8" have entirely different histories.

11 changed files with 27 additions and 146 deletions

View File

@ -1,18 +0,0 @@
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

@ -1,15 +0,0 @@
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

@ -1,15 +0,0 @@
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

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

View File

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

View File

@ -1,15 +0,0 @@
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,8 +75,6 @@ public class CommonUtil {
LabInputcolMapper labInputcolMapper;
@Autowired
ComLocalconfigMapper comLocalconfigMapper;
@Autowired
LabPatfeeMapper labPatfeeMapper;
//====检验主表操作方法集合===
public LabPat getLabPatOne(Date jyrq, String yq, String ybh) {
return labPatMapper.getLabPatOne(jyrq, yq, ybh);
@ -95,24 +93,6 @@ public class CommonUtil {
public List<LabPat> getSampleListday(String yq, Long 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)
public int insertLabPat(LabPat labPat) {
return labPatMapper.updateLabPat(labPat);

View File

@ -1,21 +0,0 @@
<?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(("新增病人信息"))
@GetMapping("/newpat")
public Result newPatInfo(Date jyrq, String sqh, String yq, String ybh){
return lisWorkOperService.newPatInfo(jyrq,ybh,sqh,yq);
return lisWorkOperService.newPatInfo(jyrq,ybh,sqh,yq,getUserId());
}
/**

View File

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