主业务添加代码
This commit is contained in:
parent
0440d97479
commit
22942b5e10
@ -8,6 +8,7 @@ import java.util.List;
|
||||
|
||||
public interface LisPatlogMapper {
|
||||
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);
|
||||
}
|
||||
|
||||
@ -243,7 +243,9 @@ public class CommonUtil {
|
||||
public Integer insertLisPatlog(LisPatlog 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) {
|
||||
return labInstrMapper.getYqmc(yq);
|
||||
}
|
||||
@ -400,6 +402,7 @@ public class CommonUtil {
|
||||
}
|
||||
|
||||
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;
|
||||
//String yhjs= commonMapper.getyhjs(yhdh);
|
||||
|
||||
@ -2,14 +2,13 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<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 *
|
||||
from lab_patwarning
|
||||
where jyrq = #{jyrq,jdbcType=TIMESTAMP}
|
||||
and yq = #{yq,jdbcType=CHAR}
|
||||
and ybh = #{ybh,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<delete id="deleteLabPatwarning">
|
||||
delete from lab_patwarning
|
||||
where jyrq = #{jyrq}
|
||||
|
||||
@ -6,13 +6,14 @@
|
||||
<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>
|
||||
<select id="getLisPatlog" resultType="com.czlis.common.core.domain.entity.lis.LisPatlog">
|
||||
select * from lis_patlog where yq = #{yq} and jyrq = #{jyrq} and ybh = #{ybh} and xgrq = #{xgrq}
|
||||
<select id="getLisPatlog" resultType="String">
|
||||
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>
|
||||
<insert id="insertLisPatlog" parameterType="com.czlis.common.core.domain.entity.lis.LisPatlog">
|
||||
insert into lis_patlog (jyrq, yq, ybh, xgrq, xgyhdh, bz1)
|
||||
values (#{jyrq}, #{yq}, #{ybh},#{xgrq}, #{xgyhdh},#{bz1})
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -45,28 +45,22 @@ public class LisWorkOperController extends BaseController {
|
||||
* @param jyrq 检验日期
|
||||
* @param yq 仪器
|
||||
* @param ybh 样本号
|
||||
* @param hdys 核对医生
|
||||
* @param yhdh 核对医生
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("审核报告")
|
||||
@GetMapping("/check2")
|
||||
public Result check2( Date jyrq, String yq, String ybh, String hdys){
|
||||
log.info("yq:{}", yq);
|
||||
hdys="lis";
|
||||
|
||||
return lisWorkOperService.confirm(jyrq, yq, ybh, hdys);
|
||||
public Result check2( Date jyrq, String yq, String ybh, String yhdh){
|
||||
return lisWorkOperService.confirm(jyrq, yq, ybh, yhdh);
|
||||
}
|
||||
@ApiOperation("取消审核")
|
||||
@GetMapping("/uncheck2")
|
||||
public Result uncheck2( Date jyrq, String yq, String ybh, String hdys){
|
||||
log.info("yq:{}", yq);
|
||||
hdys="lis";
|
||||
|
||||
return lisWorkOperService.unconfirm(jyrq, yq, ybh, hdys);
|
||||
public Result uncheck2( Date jyrq, String yq, String ybh, String yhdh){
|
||||
return lisWorkOperService.unconfirm(jyrq, yq, ybh, yhdh);
|
||||
}
|
||||
@GetMapping("/unconfirmlog")
|
||||
public Result unconfirmlog( Date jyrq, String yq, String ybh, String hdys,String reason){
|
||||
return lisWorkOperService.unconfirmlog(jyrq, yq, ybh, hdys,reason);
|
||||
public Result unconfirmlog( Date jyrq, String yq, String ybh, String yhdh,String reason){
|
||||
return lisWorkOperService.unconfirmlog(jyrq, yq, ybh, yhdh,reason);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import com.czlis.common.utils.SecurityUtils;
|
||||
import com.czlis.common.utils.ServletUtils;
|
||||
import com.czlis.common.utils.StringUtils;
|
||||
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;
|
||||
@ -224,7 +225,9 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
||||
if (problemId < 3) {
|
||||
//1,审核权限校验
|
||||
if (!commonUtil.getUserPower(yq, hdys, 20)) return new Result("-1", "当前核对者无权对本仪器报告审核!");
|
||||
if (!commonUtil.getUserPower(yq, hdys, 20)) {
|
||||
return new Result("-1", "当前核对者无权对本仪器报告审核!");
|
||||
}
|
||||
//2:数据合法性校验
|
||||
Result result0 = beforeconfirm(labPat, labResultList, 2, problemId);
|
||||
if (!"0".equals(result0.getCode())) return result0;
|
||||
@ -267,6 +270,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
//5:数据状态修改,异步上传接口作业创建
|
||||
Result result1 = afterconfirm(labPat, problemId);
|
||||
if (!"0".equals(result1.getCode())) return result1;
|
||||
setComLog(jyrq, yq, ybh,hdys, ComLogConstants.LG_CK,"");
|
||||
return new Result("3", "审核成功!");
|
||||
}
|
||||
|
||||
@ -1316,7 +1320,6 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
//入参通过POSTJSON时使用JsonParamUtils.getParameterToInt获取
|
||||
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
||||
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
||||
if (problemId < 3) {
|
||||
//1,解除审核权限校验
|
||||
if (!commonUtil.getUserPower(yq, yhdh, 10)) return new Result("-1", "当前操作者无权对本仪器报告解除审核!");
|
||||
@ -1390,7 +1393,8 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||
labPat.setFslx("");
|
||||
labPat.setJgbz(ReportStatusConstants.DEFAULT);
|
||||
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);
|
||||
}
|
||||
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.setRzbz(logtype);
|
||||
comLog.setRznr(logdata);
|
||||
comLog.setRzdt(new Date());
|
||||
commonUtil.insertComLog(comLog);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user