主业务添加代码

This commit is contained in:
tangw 2025-09-10 18:43:11 +08:00
parent 0440d97479
commit 22942b5e10
6 changed files with 27 additions and 24 deletions

View File

@ -8,6 +8,7 @@ import java.util.List;
public interface LisPatlogMapper { public interface LisPatlogMapper {
List<LisPatlog> getLisPatlogList(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh") String ybh); List<LisPatlog> getLisPatlogList(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh") String ybh);
List<LisPatlog> getLisPatlog(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh") String ybh,@Param("xgrq") Date xgrq); String getLisPatlog(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh") String ybh,@Param("xgrq") Date xgrq);
String getLisPatlogbz(@Param("jyrq") Date jyrq, @Param("yq")String yq, @Param("ybh") String ybh);
int insertLisPatlog(LisPatlog lisPatlog); int insertLisPatlog(LisPatlog lisPatlog);
} }

View File

@ -243,7 +243,9 @@ public class CommonUtil {
public Integer insertLisPatlog(LisPatlog lisPatlog) { public Integer insertLisPatlog(LisPatlog lisPatlog) {
return lisPatlogMapper.insertLisPatlog(lisPatlog); return lisPatlogMapper.insertLisPatlog(lisPatlog);
} }
public String getLisPatlogbz(Date jyrq, String yq, String ybh) {
return lisPatlogMapper.getLisPatlogbz(jyrq, yq, ybh);
}
public String getYqmc(String yq) { public String getYqmc(String yq) {
return labInstrMapper.getYqmc(yq); return labInstrMapper.getYqmc(yq);
} }
@ -400,6 +402,7 @@ public class CommonUtil {
} }
public Boolean getUserPower(String yq, String yhdh, int powerIdx) { public Boolean getUserPower(String yq, String yhdh, int powerIdx) {
if ("admin".equals(yhdh)) return true;
if ("LIS".equals(yhdh)) return true; if ("LIS".equals(yhdh)) return true;
if ("lis".equals(yhdh)) return true; if ("lis".equals(yhdh)) return true;
//String yhjs= commonMapper.getyhjs(yhdh); //String yhjs= commonMapper.getyhjs(yhdh);

View File

@ -2,14 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" > "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.czlis.interfaceCommon.mapper.LabPatwarningMapper"> <mapper namespace="com.czlis.interfaceCommon.mapper.LabPatwarningMapper">
<select id="getLabPatwarning" resultMap="com.czlis.common.core.domain.entity.lis.LabPatwarning"> <select id="getLabPatwarning" resultType="com.czlis.common.core.domain.entity.lis.LabPatwarning">
select * select *
from lab_patwarning from lab_patwarning
where jyrq = #{jyrq,jdbcType=TIMESTAMP} where jyrq = #{jyrq,jdbcType=TIMESTAMP}
and yq = #{yq,jdbcType=CHAR} and yq = #{yq,jdbcType=CHAR}
and ybh = #{ybh,jdbcType=VARCHAR} and ybh = #{ybh,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteLabPatwarning"> <delete id="deleteLabPatwarning">
delete from lab_patwarning delete from lab_patwarning
where jyrq = #{jyrq} where jyrq = #{jyrq}

View File

@ -6,13 +6,14 @@
<select id="getLisPatlogList" resultType="com.czlis.common.core.domain.entity.lis.LisPatlog"> <select id="getLisPatlogList" resultType="com.czlis.common.core.domain.entity.lis.LisPatlog">
select * from lis_patlog where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh} select * from lis_patlog where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh}
</select> </select>
<select id="getLisPatlog" resultType="com.czlis.common.core.domain.entity.lis.LisPatlog"> <select id="getLisPatlog" resultType="String">
select * from lis_patlog where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh} and xgrq = #{xgrq} select * from lis_patlog where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh} and xgrq={xgrq}
</select>
<select id="getLisPatlogbz" resultType="String">
select top 1 bz1 from lis_patlog where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh} order by xgrq desc
</select> </select>
<insert id="insertLisPatlog" parameterType="com.czlis.common.core.domain.entity.lis.LisPatlog"> <insert id="insertLisPatlog" parameterType="com.czlis.common.core.domain.entity.lis.LisPatlog">
insert into lis_patlog (jyrq, yq, ybh, xgrq, xgyhdh, bz1) insert into lis_patlog (jyrq, yq, ybh, xgrq, xgyhdh, bz1)
values (#{jyrq}, #{yq}, #{ybh},#{xgrq}, #{xgyhdh},#{bz1}) values (#{jyrq}, #{yq}, #{ybh},#{xgrq}, #{xgyhdh},#{bz1})
</insert> </insert>
</mapper> </mapper>

View File

@ -45,28 +45,22 @@ public class LisWorkOperController extends BaseController {
* @param jyrq 检验日期 * @param jyrq 检验日期
* @param yq 仪器 * @param yq 仪器
* @param ybh 样本号 * @param ybh 样本号
* @param hdys 核对医生 * @param yhdh 核对医生
* @return * @return
*/ */
@ApiOperation("审核报告") @ApiOperation("审核报告")
@GetMapping("/check2") @GetMapping("/check2")
public Result check2( Date jyrq, String yq, String ybh, String hdys){ public Result check2( Date jyrq, String yq, String ybh, String yhdh){
log.info("yq:{}", yq); return lisWorkOperService.confirm(jyrq, yq, ybh, yhdh);
hdys="lis";
return lisWorkOperService.confirm(jyrq, yq, ybh, hdys);
} }
@ApiOperation("取消审核") @ApiOperation("取消审核")
@GetMapping("/uncheck2") @GetMapping("/uncheck2")
public Result uncheck2( Date jyrq, String yq, String ybh, String hdys){ public Result uncheck2( Date jyrq, String yq, String ybh, String yhdh){
log.info("yq:{}", yq); return lisWorkOperService.unconfirm(jyrq, yq, ybh, yhdh);
hdys="lis";
return lisWorkOperService.unconfirm(jyrq, yq, ybh, hdys);
} }
@GetMapping("/unconfirmlog") @GetMapping("/unconfirmlog")
public Result unconfirmlog( Date jyrq, String yq, String ybh, String hdys,String reason){ public Result unconfirmlog( Date jyrq, String yq, String ybh, String yhdh,String reason){
return lisWorkOperService.unconfirmlog(jyrq, yq, ybh, hdys,reason); return lisWorkOperService.unconfirmlog(jyrq, yq, ybh, yhdh,reason);
} }
} }

View File

@ -7,6 +7,7 @@ import com.czlis.common.utils.SecurityUtils;
import com.czlis.common.utils.ServletUtils; import com.czlis.common.utils.ServletUtils;
import com.czlis.common.utils.StringUtils; import com.czlis.common.utils.StringUtils;
import com.czlis.common.utils.ip.IpUtils; import com.czlis.common.utils.ip.IpUtils;
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.ReportStatusConstants;
@ -224,7 +225,9 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh); List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
if (problemId < 3) { if (problemId < 3) {
//1,审核权限校验 //1,审核权限校验
if (!commonUtil.getUserPower(yq, hdys, 20)) return new Result("-1", "当前核对者无权对本仪器报告审核!"); if (!commonUtil.getUserPower(yq, hdys, 20)) {
return new Result("-1", "当前核对者无权对本仪器报告审核!");
}
//2:数据合法性校验 //2:数据合法性校验
Result result0 = beforeconfirm(labPat, labResultList, 2, problemId); Result result0 = beforeconfirm(labPat, labResultList, 2, problemId);
if (!"0".equals(result0.getCode())) return result0; if (!"0".equals(result0.getCode())) return result0;
@ -267,6 +270,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
//5:数据状态修改,异步上传接口作业创建 //5:数据状态修改,异步上传接口作业创建
Result result1 = afterconfirm(labPat, problemId); Result result1 = afterconfirm(labPat, problemId);
if (!"0".equals(result1.getCode())) return result1; if (!"0".equals(result1.getCode())) return result1;
setComLog(jyrq, yq, ybh,hdys, ComLogConstants.LG_CK,"");
return new Result("3", "审核成功!"); return new Result("3", "审核成功!");
} }
@ -1316,7 +1320,6 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
//入参通过POSTJSON时使用JsonParamUtils.getParameterToInt获取 //入参通过POSTJSON时使用JsonParamUtils.getParameterToInt获取
int problemId = ServletUtils.getParameterToInt("problemId", 0); int problemId = ServletUtils.getParameterToInt("problemId", 0);
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh); LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
if (problemId < 3) { if (problemId < 3) {
//1,解除审核权限校验 //1,解除审核权限校验
if (!commonUtil.getUserPower(yq, yhdh, 10)) return new Result("-1", "当前操作者无权对本仪器报告解除审核!"); if (!commonUtil.getUserPower(yq, yhdh, 10)) return new Result("-1", "当前操作者无权对本仪器报告解除审核!");
@ -1390,7 +1393,8 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
labPat.setFslx(""); labPat.setFslx("");
labPat.setJgbz(ReportStatusConstants.DEFAULT); labPat.setJgbz(ReportStatusConstants.DEFAULT);
commonUtil.updateLabPat(labPat); commonUtil.updateLabPat(labPat);
setComLog(jyrq, yq, ybh,yhdh,"UCK",""); String logdata=commonUtil.getLisPatlogbz(jyrq, yq, ybh);
setComLog(jyrq, yq, ybh,yhdh, ComLogConstants.LG_UCK,logdata);
return new Result("3", msg); return new Result("3", msg);
} }
public void setComLog(Date jyrq, String yq, String ybh, String yhdh,String logtype,String logdata){ public void setComLog(Date jyrq, String yq, String ybh, String yhdh,String logtype,String logdata){
@ -1402,6 +1406,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
comLog.setDnmc(IpUtils.getIpAddr()); comLog.setDnmc(IpUtils.getIpAddr());
comLog.setRzbz(logtype); comLog.setRzbz(logtype);
comLog.setRznr(logdata); comLog.setRznr(logdata);
comLog.setRzdt(new Date());
commonUtil.insertComLog(comLog); commonUtil.insertComLog(comLog);
} }
} }