|
|
@@ -138,20 +138,29 @@ public class ClinicSatisfiedService {
|
|
|
public ResultVo<AnalyzeResult> assessmentsAnalyse(ClinicSatisfiedInquiry inquiry) {
|
|
|
QueryWrapper<?> wrapper = makeQueryWrapper(inquiry);
|
|
|
AnalyzeResult result = new AnalyzeResult();
|
|
|
- result.setTotalAssessmentsCount(dao.selectAllClinicSatisfiedCount(wrapper));
|
|
|
+ List<ClinicSatisfiedBody> list = dao.selectAllClinicSatisfiedBodies(wrapper);
|
|
|
+ result.setTotalAssessmentsCount(list.size());
|
|
|
if (!inquiry.getOnlyShowUnsatisfied()) {
|
|
|
inquiry.setOnlyShowUnsatisfied(true);
|
|
|
wrapper = makeQueryWrapper(inquiry);
|
|
|
}
|
|
|
- List<ClinicSatisfiedBody> list = dao.selectUnsatisfiedCount(wrapper);
|
|
|
- result.setTotalUnsatisfiedCount(list.size());
|
|
|
+ result.setTotalUnsatisfiedCount(dao.selectUnsatisfiedCount(wrapper));
|
|
|
result.setTotalUnsatisfiedPercentage(makePercentage(result.getTotalUnsatisfiedCount(),result.getTotalAssessmentsCount()));
|
|
|
+ int totalOptionCount = 0;
|
|
|
+ int totalUnsatisfiedOptionCount = 0;
|
|
|
+ int yjkTotalCount = 0;
|
|
|
int yjkUnsatisfiedCount = 0;
|
|
|
+ int fskTotalCount = 0;
|
|
|
int fskUnsatisfiedCount = 0;
|
|
|
+ int csyxkTotalCount = 0;
|
|
|
int csyxkUnsatisfiedCount = 0;
|
|
|
+ int jykTotalCount = 0;
|
|
|
int jykUnsatisfiedCount = 0;
|
|
|
+ int sfckTotalCount = 0;
|
|
|
int sfckUnsatisfiedCount = 0;
|
|
|
+ int mzyhTotalCount = 0;
|
|
|
int mzyhUnsatisfiedCount = 0;
|
|
|
+ int jzyhTotalCount = 0;
|
|
|
int jzyhUnsatisfiedCount = 0;
|
|
|
|
|
|
int yjkOptionsCount = 0;
|
|
|
@@ -177,35 +186,73 @@ public class ClinicSatisfiedService {
|
|
|
JSONObject jzyhOptionsJson = JSONObject.parseObject("{\"A\": 0,\"B\": 0,\"C\": 0,\"D\": 0,\"E\": 0,\"F\": 0,\"G\": 0}");
|
|
|
|
|
|
for (ClinicSatisfiedBody body : list) {
|
|
|
+ if (StringUtil.notBlank(body.getItem1()) && !body.getItem1().equals("C")) {
|
|
|
+ totalOptionCount += 1;
|
|
|
+ yjkTotalCount += 1;
|
|
|
+ }
|
|
|
if (Objects.equals("B", body.getItem1())) {
|
|
|
yjkUnsatisfiedCount += 1;
|
|
|
+ totalUnsatisfiedOptionCount += 1;
|
|
|
yjkOptionsCount = getOptionsCount(yjkOptionsCount, yjkOptionsJson, body.getItem2());
|
|
|
}
|
|
|
+ if (StringUtil.notBlank(body.getItem3()) && !body.getItem3().equals("C")) {
|
|
|
+ totalOptionCount += 1;
|
|
|
+ fskTotalCount += 1;
|
|
|
+ }
|
|
|
if (Objects.equals("B", body.getItem3())) {
|
|
|
fskUnsatisfiedCount += 1;
|
|
|
+ totalUnsatisfiedOptionCount += 1;
|
|
|
fskOptionsCount = getOptionsCount(fskOptionsCount, fskOptionsJson, body.getItem4());
|
|
|
}
|
|
|
+ if (StringUtil.notBlank(body.getItem5()) && !body.getItem5().equals("C")) {
|
|
|
+ totalOptionCount += 1;
|
|
|
+ csyxkTotalCount += 1;
|
|
|
+ }
|
|
|
if (Objects.equals("B", body.getItem5())) {
|
|
|
csyxkUnsatisfiedCount += 1;
|
|
|
+ totalUnsatisfiedOptionCount += 1;
|
|
|
csyxkOptionsCount = getOptionsCount(csyxkOptionsCount, csyxkOptionsJson, body.getItem6());
|
|
|
}
|
|
|
+ if (StringUtil.notBlank(body.getItem7()) && !body.getItem7().equals("C")) {
|
|
|
+ totalOptionCount += 1;
|
|
|
+ jykTotalCount += 1;
|
|
|
+ }
|
|
|
if (Objects.equals("B", body.getItem7())) {
|
|
|
jykUnsatisfiedCount += 1;
|
|
|
+ totalUnsatisfiedOptionCount += 1;
|
|
|
jykOptionsCount = getOptionsCount(jykOptionsCount, jykOptionsJson, body.getItem8());
|
|
|
}
|
|
|
+ if (StringUtil.notBlank(body.getItem9()) && !body.getItem9().equals("C")) {
|
|
|
+ totalOptionCount += 1;
|
|
|
+ sfckTotalCount += 1;
|
|
|
+ }
|
|
|
if (Objects.equals("B", body.getItem9())) {
|
|
|
sfckUnsatisfiedCount += 1;
|
|
|
+ totalUnsatisfiedOptionCount += 1;
|
|
|
sfckOptionsCount = getOptionsCount(sfckOptionsCount, sfckOptionsJson, body.getItem10());
|
|
|
}
|
|
|
+ if (StringUtil.notBlank(body.getItem11()) && !body.getItem11().equals("C")) {
|
|
|
+ totalOptionCount += 1;
|
|
|
+ mzyhTotalCount += 1;
|
|
|
+ }
|
|
|
if (Objects.equals("B", body.getItem11())) {
|
|
|
mzyhUnsatisfiedCount += 1;
|
|
|
+ totalUnsatisfiedOptionCount += 1;
|
|
|
mzyhOptionsCount = getOptionsCount(mzyhOptionsCount, mzyhOptionsJson, body.getItem12());
|
|
|
}
|
|
|
+ if (StringUtil.notBlank(body.getItem13()) && !body.getItem13().equals("C")) {
|
|
|
+ totalOptionCount += 1;
|
|
|
+ jzyhTotalCount += 1;
|
|
|
+ }
|
|
|
if (Objects.equals("B", body.getItem13())) {
|
|
|
jzyhUnsatisfiedCount += 1;
|
|
|
+ totalUnsatisfiedOptionCount += 1;
|
|
|
jzyhOptionsCount = getOptionsCount(jzyhOptionsCount, jzyhOptionsJson, body.getItem14());
|
|
|
}
|
|
|
}
|
|
|
+ result.setTotalOptionCount(totalOptionCount);
|
|
|
+ result.setTotalUnsatisfiedOptionCount(totalUnsatisfiedOptionCount);
|
|
|
+ result.setTotalUnsatisfiedOptionPercentage(makePercentage(totalUnsatisfiedOptionCount, totalOptionCount));
|
|
|
result.setYjkUnsatisfiedCount(yjkUnsatisfiedCount);
|
|
|
result.setFskUnsatisfiedCount(fskUnsatisfiedCount);
|
|
|
result.setCsyxkUnsatisfiedCount(csyxkUnsatisfiedCount);
|
|
|
@@ -213,13 +260,13 @@ public class ClinicSatisfiedService {
|
|
|
result.setSfckUnsatisfiedCount(sfckUnsatisfiedCount);
|
|
|
result.setMzyhUnsatisfiedCount(mzyhUnsatisfiedCount);
|
|
|
result.setJzyhUnsatisfiedCount(jzyhUnsatisfiedCount);
|
|
|
- result.setYjkUnsatisfiedPercentage(makePercentage(yjkUnsatisfiedCount, result.getTotalAssessmentsCount()));
|
|
|
- result.setFskUnsatisfiedPercentage(makePercentage(fskUnsatisfiedCount, result.getTotalAssessmentsCount()));
|
|
|
- result.setCsyxkUnsatisfiedPercentage(makePercentage(csyxkUnsatisfiedCount, result.getTotalAssessmentsCount()));
|
|
|
- result.setJykUnsatisfiedPercentage(makePercentage(jykUnsatisfiedCount, result.getTotalAssessmentsCount()));
|
|
|
- result.setSfckUnsatisfiedPercentage(makePercentage(sfckUnsatisfiedCount, result.getTotalAssessmentsCount()));
|
|
|
- result.setMzyhUnsatisfiedPercentage(makePercentage(mzyhUnsatisfiedCount, result.getTotalAssessmentsCount()));
|
|
|
- result.setJzyhUnsatisfiedPercentage(makePercentage(jzyhUnsatisfiedCount, result.getTotalAssessmentsCount()));
|
|
|
+ result.setYjkUnsatisfiedPercentage(makePercentage(yjkUnsatisfiedCount, yjkTotalCount));
|
|
|
+ result.setFskUnsatisfiedPercentage(makePercentage(fskUnsatisfiedCount, fskTotalCount));
|
|
|
+ result.setCsyxkUnsatisfiedPercentage(makePercentage(csyxkUnsatisfiedCount, csyxkTotalCount));
|
|
|
+ result.setJykUnsatisfiedPercentage(makePercentage(jykUnsatisfiedCount, jykTotalCount));
|
|
|
+ result.setSfckUnsatisfiedPercentage(makePercentage(sfckUnsatisfiedCount, sfckTotalCount));
|
|
|
+ result.setMzyhUnsatisfiedPercentage(makePercentage(mzyhUnsatisfiedCount, mzyhTotalCount));
|
|
|
+ result.setJzyhUnsatisfiedPercentage(makePercentage(jzyhUnsatisfiedCount, jzyhTotalCount));
|
|
|
|
|
|
result.setYjkUnsatisfiedOption(fillOptionDetails(yjkOptionsCount, yjkOptionsJson, false));
|
|
|
result.setFskUnsatisfiedOption(fillOptionDetails(fskOptionsCount, fskOptionsJson, false));
|