|
|
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.checkerframework.checker.units.qual.A;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -390,17 +391,23 @@ public class CaseFrontSheetMainService {
|
|
|
sheet.setUseAntibiotic(antibioticCounts > 0 ? "1" : "2");
|
|
|
}
|
|
|
|
|
|
- List<String> auditStates = qualityVerificationDao.selectStates(patNo, times);
|
|
|
- if (auditStates.isEmpty()) {
|
|
|
- sheet.setAuditState(AuditState.NONE);
|
|
|
- } else {
|
|
|
- if (auditStates.contains("APPROVED")) {
|
|
|
+ AuditState auditState = qualityVerificationDao.selectStates(patNo, times);
|
|
|
+ if (null == auditState) {
|
|
|
+ auditState = AuditState.NONE;
|
|
|
+ }
|
|
|
+ switch (auditState) {
|
|
|
+ case NONE:
|
|
|
+ sheet.setAuditState(AuditState.NONE);
|
|
|
+ break;
|
|
|
+ case INITIAL:
|
|
|
+ sheet.setAuditState(AuditState.INITIAL);
|
|
|
+ break;
|
|
|
+ case APPROVED:
|
|
|
sheet.setAuditState(AuditState.APPROVED);
|
|
|
- } else if (auditStates.contains("REJECTED")) {
|
|
|
+ break;
|
|
|
+ case REJECTED:
|
|
|
sheet.setAuditState(AuditState.REJECTED);
|
|
|
- } else {
|
|
|
- sheet.setAuditState(AuditState.INITIAL);
|
|
|
- }
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|