|
|
@@ -29,6 +29,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
@@ -352,4 +353,36 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
|
|
|
public List<MedicalOrderInfoResponse> loadMedicalOrderInfo(Integer id) {
|
|
|
return baseMapper.loadMedicalOrderInfo(id);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取医生对应的违规列表
|
|
|
+ * @param page
|
|
|
+ * @param queryWrapper
|
|
|
+ * @param loginUser
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public IPage<AfterwardsAudit> getDoctorViolations(Page<AfterwardsAudit> page, QueryWrapper<AfterwardsAudit> queryWrapper, LoginUser loginUser) {
|
|
|
+ // 根据当前登录,先获取到医生面板
|
|
|
+ SysDepart sysDepart = baseMapper.loadUserDept(loginUser.getUsername());
|
|
|
+ if (null == sysDepart) {
|
|
|
+ log.error("找不到当前医生的科室,请检查");
|
|
|
+ throw new JeecgBootException("找不到当前医生的科室,请检查!");
|
|
|
+ }
|
|
|
+ // 当前登录科室/医生端的科室code
|
|
|
+ String medicalDeptCode = sysDepart.getMedicalDeptCode();
|
|
|
+ // 获取医生code
|
|
|
+ SysUser userByName = sysUserService.getUserByName(loginUser.getUsername());
|
|
|
+ if (null == userByName) {
|
|
|
+ log.error("找不到登录用户信息={}", loginUser.getUsername());
|
|
|
+ throw new JeecgBootException("找不到登录用户的医生用户信息,请检查!");
|
|
|
+ }
|
|
|
+ if (!StringUtils.hasText(userByName.getDoctorId())) {
|
|
|
+ log.error("找不到登录用户信息={},的医生编码信息,请检查", loginUser.getUsername());
|
|
|
+ throw new JeecgBootException("找不到登录用户的医生编码(医生id)信息,请检查!");
|
|
|
+ }
|
|
|
+ queryWrapper.eq("doctor_id", userByName.getDoctorId());
|
|
|
+ queryWrapper.eq("medical_dept_code", medicalDeptCode);
|
|
|
+ return this.page(page, queryWrapper);
|
|
|
+ }
|
|
|
}
|