主程序
This commit is contained in:
parent
696a0d8403
commit
8cbbcb96d0
@ -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;
|
||||
|
||||
}
|
||||
@ -3,7 +3,7 @@ package com.czlis.interfaceCommon.constants;
|
||||
/**
|
||||
* 检验报告单状态常量(lab_pat.jgbz)
|
||||
*/
|
||||
public class ReportStatusConstants {
|
||||
public class LabPatConstants {
|
||||
/**
|
||||
* 未审核报告默认状态=0
|
||||
*/
|
||||
@ -3,7 +3,7 @@ package com.czlis.interfaceCommon.constants;
|
||||
/**
|
||||
* 申请单状态常量(lab_reqmain.zt)
|
||||
*/
|
||||
public class SampleStatusConstants {
|
||||
public class LabReqmainConstants {
|
||||
/**
|
||||
* 标本开单,新建样本-1
|
||||
*/
|
||||
@ -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";
|
||||
}
|
||||
@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -75,6 +75,8 @@ 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);
|
||||
@ -93,6 +95,24 @@ 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);
|
||||
|
||||
@ -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>
|
||||
@ -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,getUserId());
|
||||
return lisWorkOperService.newPatInfo(jyrq,ybh,sqh,yq);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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, Long userId);
|
||||
Result newPatInfo(Date jyrq, String ybh, String sqh, String yq);
|
||||
|
||||
Result changePat(LabPat labPat);
|
||||
Result changePatColumn(Date jyrq, String yq, String ybh,String column,String value);
|
||||
|
||||
@ -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.ReportStatusConstants;
|
||||
import com.czlis.interfaceCommon.constants.SampleStatusConstants;
|
||||
import com.czlis.interfaceCommon.constants.LabPatConstants;
|
||||
import com.czlis.interfaceCommon.constants.LabReqmainConstants;
|
||||
import com.czlis.interfaceCommon.mapper.LabReqdetailMapper;
|
||||
import com.czlis.interfaceCommon.mapper.LabReqmainMapper;
|
||||
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.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;
|
||||
@ -60,8 +57,26 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
@Autowired
|
||||
LoginConfigParamUtil loginConfigParamUtil;
|
||||
@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);
|
||||
if (labReqmainOne == null) {
|
||||
//1.调用接口,获取申请单信息
|
||||
@ -90,8 +105,8 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
SetReqStatus setReqStatus = new SetReqStatus();
|
||||
setReqStatus.setIp("");
|
||||
setReqStatus.setSqh(sqh);
|
||||
setReqStatus.setUserid(userId.toString());
|
||||
setReqStatus.setStatus(SampleStatusConstants.SIGNFOR);
|
||||
setReqStatus.setUserid(yhdh);
|
||||
setReqStatus.setStatus(LabReqmainConstants.SIGNFOR);
|
||||
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.SETREQSTATUS, setReqStatus);
|
||||
if (!result.getCode().equals("0")) return result;
|
||||
|
||||
@ -99,13 +114,13 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
DayMessage dayMessage = new DayMessage();
|
||||
dayMessage.setIp("");
|
||||
dayMessage.setYljg("1");
|
||||
dayMessage.setUserid(userId.toString());
|
||||
dayMessage.setUserid(yhdh);
|
||||
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);
|
||||
Result result3 = saveReqInfo(yhdh, sqh, labReqmainOne, yq, jyrq, ybh);
|
||||
if (!result3.getCode().equals("0")) return result3;
|
||||
|
||||
//6.写日志
|
||||
@ -409,7 +424,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(ReportStatusConstants.DEFAULT);
|
||||
if(labPat.getJgbz()==null)labPat.setJgbz(LabPatConstants.DEFAULT);
|
||||
return new Result("0", "样本初始化成功!",labPat);
|
||||
}
|
||||
public void updateLabReqmainZT(String userId, String sqh) {
|
||||
@ -490,7 +505,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
setComLog(jyrq, yq, ybh,hdys, ComLogConstants.LG_CK,"");
|
||||
String sqh=labPat.getSqh();
|
||||
if(sqh!=null){
|
||||
setlabReqsteplog(sqh,SampleStatusConstants.CONFIRM,hdys);
|
||||
setlabReqsteplog(sqh, LabReqmainConstants.CONFIRM,hdys);
|
||||
}
|
||||
return new Result("0", "审核成功!");
|
||||
}
|
||||
@ -804,13 +819,13 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
LabReqmain labReqmain = commonUtil.getLabReqmainOne(sqh);
|
||||
if (labReqmain != null) {
|
||||
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.setSjsj(jysj);
|
||||
labReqmain.setConfirmer(hdys);
|
||||
labReqmain.setConfirmtime(Confirmdt);
|
||||
labReqmain = checklabReqmainTAT(labReqmain);
|
||||
if (!SampleStatusConstants.CANCAL.equals(zt)) labReqmain.setZt(SampleStatusConstants.CONFIRM);
|
||||
if (!LabReqmainConstants.CANCAL.equals(zt)) labReqmain.setZt(LabReqmainConstants.CONFIRM);
|
||||
commonUtil.updateLabReqmain(labReqmain);
|
||||
Date cysj = labReqmain.getCysj();
|
||||
if (cysj != null) labPat.setCyrq(cysj);
|
||||
@ -835,7 +850,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
//最后完成
|
||||
String finish = labPat.getFinish();
|
||||
if (!"细菌仪".equals(yqdl) && finish != null) labPat.setFinish("1");
|
||||
labPat.setJgbz(ReportStatusConstants.CONFIRM);
|
||||
labPat.setJgbz(LabPatConstants.CONFIRM);
|
||||
Integer shcs = labPat.getShcs();
|
||||
if (shcs == null) shcs = 0;
|
||||
shcs = shcs + 1;
|
||||
@ -871,7 +886,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
labPat.setLastuser(hdys);
|
||||
String finish = labPat.getFinish();
|
||||
if (!"细菌仪".equals(yqdl) && finish != null) labPat.setFinish("1");
|
||||
labPat.setJgbz(ReportStatusConstants.PRELIM);
|
||||
labPat.setJgbz(LabPatConstants.PRELIM);
|
||||
commonUtil.updateLabPat(labPat);
|
||||
return ret;
|
||||
}
|
||||
@ -1710,11 +1725,11 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
LabReqmain labReqmain = commonUtil.getLabReqmainOne(sqh);
|
||||
if (labReqmain != null) {
|
||||
String zt = labReqmain.getZt();
|
||||
if (!SampleStatusConstants.CANCAL.equals(zt)) {
|
||||
if (!LabReqmainConstants.CANCAL.equals(zt)) {
|
||||
labReqmain.setConfirmer("");
|
||||
labReqmain.setConfirmtime(null);
|
||||
if (SampleStatusConstants.CONFIRM.equals(zt)) {
|
||||
labReqmain.setZt(SampleStatusConstants.SIGNFOR);
|
||||
if (LabReqmainConstants.CONFIRM.equals(zt)) {
|
||||
labReqmain.setZt(LabReqmainConstants.SIGNFOR);
|
||||
labReqmain.setConfirmer("");
|
||||
labReqmain.setConfirmtime(null);
|
||||
commonUtil.updateLabReqmain(labReqmain);
|
||||
@ -1749,13 +1764,13 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
}
|
||||
commonUtil.deleteLabReqreportPdffile(jyrq, yq, ybh);
|
||||
labPat.setFslx("");
|
||||
labPat.setJgbz(ReportStatusConstants.DEFAULT);
|
||||
labPat.setJgbz(LabPatConstants.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,SampleStatusConstants.START,yhdh);
|
||||
setlabReqsteplog(sqh, LabReqmainConstants.START,yhdh);
|
||||
}
|
||||
if (!"取消成功!".equals(msg)) return new Result("3", msg);
|
||||
return new Result("0", msg);
|
||||
@ -1780,7 +1795,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
if (problemId < 5) problemId = 5;
|
||||
|
||||
labPat.setFslx("");
|
||||
labPat.setJgbz(ReportStatusConstants.DEFAULT);
|
||||
labPat.setJgbz(LabPatConstants.DEFAULT);
|
||||
commonUtil.updateLabPat(labPat);
|
||||
setComLog(jyrq, yq, ybh,yhdh, ComLogConstants.LG_UCK1,"");
|
||||
return new Result("0", "取消成功!");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user