主程序

This commit is contained in:
tangw 2025-10-17 18:25:22 +08:00
parent d127803152
commit 96d67c84ad
12 changed files with 115 additions and 16 deletions

View File

@ -3,6 +3,7 @@ package com.czlis.interfaceCommon.mapper;
import com.czlis.common.core.domain.entity.lis.LabReqmain; import com.czlis.common.core.domain.entity.lis.LabReqmain;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.Map; import java.util.Map;
public interface LabReqmainMapper { public interface LabReqmainMapper {
@ -12,4 +13,5 @@ public interface LabReqmainMapper {
int deleteLabReqmain(String sqh); int deleteLabReqmain(String sqh);
void insertLabReqmain(LabReqmain labReqmain); void insertLabReqmain(LabReqmain labReqmain);
int zxLabReqmain(@Param("sqh")String sqh,@Param("userId")String userId); int zxLabReqmain(@Param("sqh")String sqh,@Param("userId")String userId);
int QXLabReqmain(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh") String ybh);
} }

View File

@ -11,6 +11,7 @@ public interface LabResultMapper {
LabResult getLabResult(@Param("jyrq") Date jyrq, @Param("yq") String yq,@Param("ybh") String ybh,@Param("xmdh") String xmdh); LabResult getLabResult(@Param("jyrq") Date jyrq, @Param("yq") String yq,@Param("ybh") String ybh,@Param("xmdh") String xmdh);
int insertLabResult(LabResult labResult); int insertLabResult(LabResult labResult);
int delLabResult(LabResult labResult); int delLabResult(LabResult labResult);
int delLabResultAll(@Param("jyrq") Date jyrq, @Param("yq") String yq,@Param("ybh") String ybh);
int updateLabResult(LabResult labResult); int updateLabResult(LabResult labResult);
int delNullLabResult(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh") String ybh); int delNullLabResult(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh") String ybh);
List<LabResult> getLabResultWithSql(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh") String ybh,@Param("wheresql") String wheresql); List<LabResult> getLabResultWithSql(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh") String ybh,@Param("wheresql") String wheresql);

View File

@ -9,4 +9,6 @@ import java.util.List;
public interface LabResultMedMapper { public interface LabResultMedMapper {
List<LabResultMed> getLabResultMed(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh, @Param("xmdh")String xmdh); 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); int getLabResultMedCount(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh);
int delLabResultMed(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh,@Param("xmdh")String xmdh);
int delLabResultMedAll(@Param("jyrq")Date jyrq, @Param("yq")String yq, @Param("ybh")String ybh);
} }

View File

@ -157,8 +157,8 @@ public class CommonUtil {
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int delLabPat(LabPat labPat) { public int delLabPat(Date jyrq, String yq, String ybh) {
return labPatMapper.updateLabPat(labPat); return labPatMapper.delLabPat(jyrq, yq,ybh);
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -211,6 +211,10 @@ public class CommonUtil {
public void zxLabReqmain(String sqh,String userId){ public void zxLabReqmain(String sqh,String userId){
labReqmainMapper.zxLabReqmain(sqh,userId); labReqmainMapper.zxLabReqmain(sqh,userId);
} }
@Transactional(rollbackFor = Exception.class)
public void QXLabReqmain(Date jyrq, String yq, String ybh){
labReqmainMapper.QXLabReqmain(jyrq,yq,ybh);
}
public List<LabReqsteplog> getLabReqsteplog(String sqh) { public List<LabReqsteplog> getLabReqsteplog(String sqh) {
return labReqsteplogMapper.getLabReqsteplog(sqh); return labReqsteplogMapper.getLabReqsteplog(sqh);
} }
@ -253,7 +257,10 @@ public class CommonUtil {
public int delLabResult(LabResult labResult) { public int delLabResult(LabResult labResult) {
return labResultMapper.delLabResult(labResult); return labResultMapper.delLabResult(labResult);
} }
@Transactional(rollbackFor = Exception.class)
public int delLabResultAll(Date jyrq, String yq, String ybh) {
return labResultMapper.delLabResultAll(jyrq,yq,ybh);
}
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int delNullLabResult(Date jyrq, String yq, String ybh) { public int delNullLabResult(Date jyrq, String yq, String ybh) {
return labResultMapper.delNullLabResult(jyrq, yq, ybh); return labResultMapper.delNullLabResult(jyrq, yq, ybh);
@ -308,6 +315,17 @@ public class CommonUtil {
public int getLabResultMedCount(Date jyrq, String yq, String ybh) { public int getLabResultMedCount(Date jyrq, String yq, String ybh) {
return labResultMedMapper.getLabResultMedCount(jyrq, yq, ybh); return labResultMedMapper.getLabResultMedCount(jyrq, yq, ybh);
} }
public List<LabResultMed> getLabResultMed(Date jyrq, String yq, String ybh,String xmdh){
return labResultMedMapper.getLabResultMed(jyrq, yq, ybh,xmdh);
}
@Transactional(rollbackFor = Exception.class)
public void delLabResultMed(Date jyrq, String yq, String ybh,String xmdh) {
labResultMedMapper.delLabResultMed(jyrq, yq, ybh,xmdh);
}
@Transactional(rollbackFor = Exception.class)
public void delLabResultMedAll(Date jyrq, String yq, String ybh) {
labResultMedMapper.delLabResultMedAll(jyrq, yq, ybh);
}
//=====项目字典查询========= //=====项目字典查询=========
public List<XmInfo> getXmInfoList(String yq) { public List<XmInfo> getXmInfoList(String yq) {
return xmInfoMapper.getXmInfoList(yq); return xmInfoMapper.getXmInfoList(yq);

View File

@ -1632,18 +1632,54 @@ public class LisWorkUtils {
} }
/** /**
* 输入住院号获取病人信息 * 删除样本
* *
* @param jyrq * @param jyrq
* @param yq * @param yq
* @param ybh * @param ybh
* @param value * @param yhdh
* @param problemId
* @return * @return
*/ */
private Result changePatbrdh(Date jyrq, String yq, String ybh, String value) { public Result delsample(Date jyrq, String yq, String ybh, String yhdh, int problemId) {
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh); String jgbz = commonUtil.getLabPatJgbz(jyrq, yq, ybh);
if ("2".equals(jgbz)) return new Result("-1", "结果已审核禁止删除!");
return new Result("0", "保存成功", labPat); if ("5".equals(jgbz)) return new Result("-1", "结果已锁定禁止删除!");
// if ("1".equals(jgbz)) return new Result("-1", "结果已初审禁止删除!");
//IF MessageBox("删除","你确定删除当前 " + ls_ybh + " 号标本?",question!,YesNo!,2) = 2 THEN RETURN 1 交给前端
String yqdl=commonUtil.getYqdl(yq);
if("细菌仪".equals(yqdl)) {
String cbbgyq=commonUtil.getComOptValue(yq,"cbbgyq");
if(cbbgyq!=null&&!"".equals(cbbgyq)) {
String is_instr_cbbg="CBBG"+cbbgyq;
String is_instr_ejbg="EJBG"+cbbgyq;
String jgbz0 = commonUtil.getLabPatJgbz(jyrq, is_instr_cbbg, ybh);
if(jgbz0!=null) {
if("2".equals(jgbz0)||"3".equals(jgbz0)){
return new Result("1", "初步报告已经被审核,撤回前无法删除!");
}
}
String jgbz1 = commonUtil.getLabPatJgbz(jyrq, is_instr_ejbg, ybh);
if(jgbz1!=null) {
if("2".equals(jgbz1)||"4".equals(jgbz1)){
return new Result("1", "二级报告已经被审核,撤回前无法删除!");
}
}
if(jgbz0!=null) delsample(jyrq, is_instr_cbbg, ybh);
if(jgbz1!=null) delsample(jyrq, is_instr_ejbg, ybh);
}
}
delsample(jyrq, yq, ybh);
setComLog(jyrq, yq, ybh,yhdh,ComLogConstants.LG_M,"删除整个样本");
return new Result("0", "保存成功");
}
private void delsample(Date jyrq, String yq, String ybh) {
commonUtil.delLabResultMedAll(jyrq, yq, ybh);
commonUtil.delLabResultAll(jyrq, yq, ybh);
commonUtil.deleteLabGraphAll(jyrq, yq, ybh);
commonUtil.deleteLabPatfee(jyrq, yq, ybh);
commonUtil.QXLabReqmain(jyrq, yq, ybh);
commonUtil.delLabPat(jyrq, yq, ybh);
} }
public Result newresult(LabResult labResult) { public Result newresult(LabResult labResult) {
@ -1976,7 +2012,7 @@ public class LisWorkUtils {
lisWorkUtils.setComLog(jyrq,yq,ybh,yhdh,ComLogConstants.LG_SJ,sqh); lisWorkUtils.setComLog(jyrq,yq,ybh,yhdh,ComLogConstants.LG_SJ,sqh);
if(sqh!=null||"".equals(sqh))lisWorkUtils.setlabReqsteplog(sqh,LabReqmainConstants.START,yhdh); if(sqh!=null||"".equals(sqh))lisWorkUtils.setlabReqsteplog(sqh,LabReqmainConstants.START,yhdh);
return new Result("0", ""); return new Result("0", "",labPat);
} }
public LabPat loaddefault(LabPat labPat) { public LabPat loaddefault(LabPat labPat) {
Date jyrq = labPat.getJyrq(); Date jyrq = labPat.getJyrq();

View File

@ -9,6 +9,10 @@
<update id="zxLabReqmain"> <update id="zxLabReqmain">
UPDATE lab_reqmain SET zt = '2', jsys = #{userId}, jssj =getdate() WHERE sqh = #{sqh} AND ('2'> zt or zt='8' or zxsj>jssj) UPDATE lab_reqmain SET zt = '2', jsys = #{userId}, jssj =getdate() WHERE sqh = #{sqh} AND ('2'> zt or zt='8' or zxsj>jssj)
</update> </update>
<update id="QXLabReqmain">
update lab_reqmain set yqdh=null,sjsj=null FROM lab_pat,lab_reqmain WHERE jyrq = #{jyrq} AND yq =#{yq} AND ybh =#{ybh}
and lab_reqmain.sqh=lab_pat.sqh and lab_reqmain.yqdh=lab_pat.yq
</update>
<delete id="deleteLabReqmain" parameterType="String"> <delete id="deleteLabReqmain" parameterType="String">
delete from lab_reqmain where sqh = #{sqh} delete from lab_reqmain where sqh = #{sqh}
</delete> </delete>

View File

@ -63,6 +63,12 @@
and ybh = #{ybh,jdbcType=VARCHAR} and ybh = #{ybh,jdbcType=VARCHAR}
and xmdh = #{xmdh,jdbcType=VARCHAR} and xmdh = #{xmdh,jdbcType=VARCHAR}
</delete> </delete>
<delete id="delLabResultAll" >
delete from lab_result
where jyrq = #{jyrq}
and yq = #{yq,jdbcType=CHAR}
and ybh = #{ybh,jdbcType=VARCHAR}
</delete>
<delete id="delNullLabResult" > <delete id="delNullLabResult" >
delete from lab_result delete from lab_result
where jyrq = #{jyrq} where jyrq = #{jyrq}

View File

@ -35,4 +35,17 @@
</if> </if>
</where> </where>
</select> </select>
<delete id="delLabResultMed" >
delete from lab_resultmed
where jyrq = #{jyrq}
and yq = #{yq,jdbcType=CHAR}
and ybh = #{ybh,jdbcType=VARCHAR}
and xmdh = #{xmdh,jdbcType=VARCHAR}
</delete>
<delete id="delLabResultMedAll" >
delete from lab_resultmed
where jyrq = #{jyrq}
and yq = #{yq,jdbcType=CHAR}
and ybh = #{ybh,jdbcType=VARCHAR}
</delete>
</mapper> </mapper>

View File

@ -141,4 +141,12 @@ public class LisWorkOperController extends BaseController {
return lisWorkOperService.reglimit(jyrq, yq, ybh, yhdh, qrr, phone, tzfs); return lisWorkOperService.reglimit(jyrq, yq, ybh, yhdh, qrr, phone, tzfs);
} }
@Log(title = "主界面",businessType = BusinessType.DELETE)
@ApiOperation("删除样本")
@GetMapping("/delsample")
public Result delsample(Date jyrq, String yq, String ybh) {
return lisWorkOperService.delsample(jyrq, yq, ybh);
}
} }

View File

@ -8,7 +8,7 @@ import java.util.Date;
public interface LisWorkOperService { public interface LisWorkOperService {
Result newPatInfo(Date jyrq, String ybh, String sqh, String yq); Result newPatInfo(Date jyrq, String ybh, String sqh, String yq);
Result delsample(Date jyrq, String yq, String ybh);
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);
Result changeresult(LabResult labResult); Result changeresult(LabResult labResult);

View File

@ -46,6 +46,12 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
return lisWorkUtils.newPatInfo(jyrq, ybh, sqh, yq, problemId); return lisWorkUtils.newPatInfo(jyrq, ybh, sqh, yq, problemId);
} }
@Override @Override
public Result delsample(Date jyrq, String yq, String ybh){
int problemId = ServletUtils.getParameterToInt("problemId", 0);
String yhdh=SecurityUtils.getLoginUser().getUsername();
return lisWorkUtils.delsample(jyrq, yq, ybh,yhdh, problemId);
}
@Override
public Result changePat(LabPat labPat) { public Result changePat(LabPat labPat) {
int problemId = JsonParamUtils.getParameterToInt("problemId", 0); int problemId = JsonParamUtils.getParameterToInt("problemId", 0);
Date jyrq=labPat.getJyrq(); Date jyrq=labPat.getJyrq();

View File

@ -315,13 +315,16 @@ public class LisWorkServiceImpl implements LisWorkService {
String xmdh=labResult.getXmdh(); String xmdh=labResult.getXmdh();
String csjg=labResult.getCsjg(); String csjg=labResult.getCsjg();
if(csjg==null)csjg=""; if(csjg==null)csjg="";
if(xmdh!=null&&"".equals(xmdh)) { if(xmdh!=null&&!"".equals(xmdh)) {
List<LabResultlog> labResultlog0 = labResultlog.stream().filter(rlog -> xmdh.equals(rlog.getXmdh())).collect(Collectors.toList()); List<LabResultlog> labResultlog0 = labResultlog.stream().filter(rlog -> xmdh.equals(rlog.getXmdh())).collect(Collectors.toList());
if(labResultlog0.size()>0) { if(labResultlog0.size()>0) {
String csjg0=labResultlog0.get(0).getCsjg(); for(LabResultlog labResultlog1 : labResultlog0) {
if(csjg0==null)csjg0=""; String csjg0 = labResultlog1.getCsjg();
if(!csjg.equals(csjg0)) { if (csjg0 == null) csjg0 = "";
if (!csjg.equals(csjg0)) {
labResult.setCp_modify(1); labResult.setCp_modify(1);
break;
}
} }
} }
} }