Browse Source

excel 编码、关联编码循环嵌套

lenovodn 1 year ago
parent
commit
c03e298910

+ 1 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/AfterwardsAuditDetail.java

@@ -68,11 +68,11 @@ public class AfterwardsAuditDetail implements Serializable {
 	/**警示级别*/
 	@Excel(name = "警示级别", width = 15)
     @ApiModelProperty(value = "警示级别")
-    @Dict(dicCode = "violation_level")
     private java.lang.String reminderLevel;
     /**违规等级;0:直接违规  1:重度可疑  2:轻度可疑  3:仅提醒展示*/
     @Excel(name = "违规等级", width = 15)
     @ApiModelProperty(value = "违规等级")
+    @Dict(dicCode = "violation_level")
     private java.lang.Integer violationLevel;
 	/**提醒类别;事前提醒,事中预警,事后监管*/
 	@Excel(name = "提醒类别;事前提醒,事中预警,事后监管", width = 15)

+ 12 - 12
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/AfterwardsAuditServiceImpl.java

@@ -239,23 +239,23 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
     @Override
     public boolean deptAudit(LoginUser loginUser, DeptAuditRequestBO param) {
         // 根据当前登录,先获取到医生面板
-        SysDepart sysDepart = baseMapper.loadUserDept(loginUser.getUsername());
-        if (null == sysDepart) {
-            log.error("找不到当前医生的科室,请检查");
-            throw new JeecgBootException("找不到当前医生的科室,请检查!");
-        }
-        // 当前登录科室/医生端的科室code
-        String medicalDeptCode = sysDepart.getMedicalDeptCode();
+//        SysDepart sysDepart = baseMapper.loadUserDept(loginUser.getUsername());
+//        if (null == sysDepart) {
+//            log.error("找不到当前医生的科室,请检查");
+//            throw new JeecgBootException("找不到当前医生的科室,请检查!");
+//        }
+//        // 当前登录科室/医生端的科室code
+//        String medicalDeptCode = sysDepart.getMedicalDeptCode();
         // 1.获取当前需要复核的id,是否为当前科室。
         AfterwardsAudit audit = this.loadAfterwardsAuditById(param.getId());
         if (null == audit) {
             log.error("根据参数={},获取审核表时,取不到数据", param.getId());
             throw new JeecgBootException("参数异常,找不到要审核的数据");
         }
-        if (!ObjectUtils.nullSafeEquals(medicalDeptCode, audit.getMedicalDeptCode())) {
-            log.error("当前登录用户科室为={}, 需要处理数据的科室为={},不匹配,无法继续操作", medicalDeptCode, audit.getMedicalDeptCode());
-            throw new JeecgBootException("请求数据与您非同一科室,请检查!");
-        }
+//        if (!ObjectUtils.nullSafeEquals(audit, audit.getMedicalDeptCode())) {
+//            log.error("当前登录用户科室为={}, 需要处理数据的科室为={},不匹配,无法继续操作", medicalDeptCode, audit.getMedicalDeptCode());
+//            throw new JeecgBootException("请求数据与您非同一科室,请检查!");
+//        }
         // 如果审核流转状态不为待处理,则不允许继续
         if (!ObjectUtils.nullSafeEquals(AfterwardsAuditStatusEnum.process.getStatus(), audit.getCheckState())) {
             log.error("当前申诉工单id={}, 审核流转状态为={},非处理中,请检查!", param.getId(), audit.getCheckState());
@@ -281,7 +281,7 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
         appealRecord.setCreateTime(new Date()); // 处理时间
         appealRecord.setCreateBy(loginUser.getId());// 处理人
         appealRecord.setAppealStatus(param.getCheckState());
-        appealRecord.setMedicalDeptCode(medicalDeptCode);
+        appealRecord.setMedicalDeptCode(audit.getMedicalDeptCode());
         appealRecord.setMedicalDeptName(audit.getMedicalDeptName());
         appealRecord.setDoctorId(audit.getDoctorId());
         appealRecord.setDoctorName(audit.getDoctorName());