|
@@ -7,6 +7,8 @@ import cn.hnthyy.thmz.enums.UnitTypeEnum;
|
|
|
import cn.hnthyy.thmz.mapper.his.yp.YpZdDictMapper;
|
|
|
import cn.hnthyy.thmz.mapper.his.zd.MzZdYpYshMapper;
|
|
|
import cn.hnthyy.thmz.service.his.zd.MzZdYpYshService;
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -86,4 +88,30 @@ public class MzZdYpYshServiceImpl implements MzZdYpYshService {
|
|
|
public List<MzZdYpYsh> queryAllJeList() {
|
|
|
return mzZdYpYshMapper.selectJeByCommonParams( null,null);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param userCode
|
|
|
+ * @param code
|
|
|
+ * @description: 检查改用户是否有开抗生素权限
|
|
|
+ * @author: lihong
|
|
|
+ * @date: 2024/2/28 16:03
|
|
|
+ * @param: userCode
|
|
|
+ * @param: code
|
|
|
+ * @return: java.lang.String
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public boolean checkKssByUserCode(String userCode, String code,String serial) {
|
|
|
+ String doctorXzYp = mzZdYpYshMapper.selectDoctorXzYp(userCode);
|
|
|
+ String ypLevel = mzZdYpYshMapper.selectYpLevel(code,serial);
|
|
|
+ Integer xzYp = Convert.toInt(doctorXzYp, 0);
|
|
|
+ if(StrUtil.isNotBlank(ypLevel)){
|
|
|
+ if(Convert.toInt(ypLevel) >= 2 && xzYp == 0){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(xzYp == 1 && Convert.toInt(ypLevel) >=3){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|