commit
This commit is contained in:
+19
-3
@@ -134,7 +134,7 @@ public class MedicalFoundationAuditController {
|
||||
@At
|
||||
@SLog(tag = "医院补助-互管会审核", msg = "修改了一条住院记录")
|
||||
@SaCheckPermission("medicalMutualAid.medical.foundationAudit")
|
||||
public Result updateCost(String data){
|
||||
public Result updateCost(String data) {
|
||||
List<MedicalApplyCost> applyCosts = Json.fromJsonAsList(MedicalApplyCost.class, data);
|
||||
medicalApplyService.updateIgnoreNull(applyCosts);
|
||||
return Result.success();
|
||||
@@ -145,14 +145,30 @@ public class MedicalFoundationAuditController {
|
||||
@SLog(tag = "医院补助-互管会审核", msg = "互管会审核了一条记录")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("medicalMutualAid.medical.foundationAudit")
|
||||
public Result executeTask(@Param("data") String param, String id){
|
||||
public Result executeTask(@Param("data") String param) {
|
||||
if (StrUtil.isBlank(param)) {
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
Dict args = Json.fromJson(Dict.class, param);
|
||||
String loveSubsidyMoney = args.getStr("tf_loveSubsidyMoney");
|
||||
String forecastSubsidyMoney = args.getStr("tf_forecastSubsidyMoney");
|
||||
if (args.getInt("submitType") == 1) {
|
||||
|
||||
medicalApplyService.update(Chain.make("loveSubsidyMoney", loveSubsidyMoney)
|
||||
.add("forecastSubsidyMoney", forecastSubsidyMoney),
|
||||
Cnd.where("id", "=", args.getStr("id")));
|
||||
}
|
||||
flowCommonService.executeTask(args);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("预测补助金额")
|
||||
@SaCheckPermission("medicalMutualAid.medical.foundationAudit")
|
||||
public Result calcMedicalMoney(String id, String diseaseId) {
|
||||
NutMap nutMap = medicalApplyService.calcMedicalMoney(id, diseaseId);
|
||||
return Result.success(nutMap);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+127
-120
@@ -6,6 +6,7 @@ import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.flow.enums.ProcessInstanceStateEnum;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.medical.model.MedicalApply;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.medical.model.MedicalApplyCost;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.medical.model.MedicalDiseaseType;
|
||||
@@ -21,6 +22,7 @@ import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
@@ -133,13 +135,14 @@ public class MedicalApplyServiceImpl extends BaseServiceImpl<MedicalApply> imple
|
||||
|
||||
@Override
|
||||
public NutMap calcMedicalMoney(String applyId, String diseaseId) {
|
||||
int year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
|
||||
MedicalSetting medicalSetting = dao().fetch(MedicalSetting.class);
|
||||
|
||||
MedicalApply apply = dao().fetch(MedicalApply.class, applyId);
|
||||
MedicalDiseaseType applyDiseaseType = dao().fetch(MedicalDiseaseType.class, Cnd.where(MedicalDiseaseType::getId, "=", apply.getDiseaseId()));
|
||||
List<MedicalApplyCost> costs = dao().query(MedicalApplyCost.class, Cnd.where("applyId", "=", apply.getId()));
|
||||
//获取申请信息
|
||||
NutMap applyInfo = this.getApplyInfo(applyId);
|
||||
//获取申请疾病类型
|
||||
MedicalDiseaseType applyDiseaseType = dao().fetch(MedicalDiseaseType.class, Cnd.where(MedicalDiseaseType::getId, "=", applyInfo.getString("diseaseId")));
|
||||
//获取申请住院信息
|
||||
List<MedicalApplyCost> costs = dao().query(MedicalApplyCost.class, Cnd.where("applyId", "=", applyId));
|
||||
//个人承担费用
|
||||
BigDecimal singleBearMoney = costs.stream()
|
||||
.map(MedicalApplyCost::getSingleBearMoney)
|
||||
@@ -162,7 +165,7 @@ public class MedicalApplyServiceImpl extends BaseServiceImpl<MedicalApply> imple
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
//可能此次申请人退休变号了,所以也要把旧号的申请记录一起查出来
|
||||
Sys_user currentUser = dao().fetch(Sys_user.class, apply.getUserId());
|
||||
Sys_user currentUser = dao().fetch(Sys_user.class, applyInfo.getString("userId"));
|
||||
List<String> allUserIds = Lang.list(currentUser.getId());
|
||||
|
||||
if (StrUtil.isNotBlank(currentUser.getOldLoginName())) {
|
||||
@@ -176,16 +179,10 @@ public class MedicalApplyServiceImpl extends BaseServiceImpl<MedicalApply> imple
|
||||
//是否首次申请 爱心互助基金 重大疾病
|
||||
boolean isFirstApply = applyRecords.stream().filter(v -> v.getBoolean("isMajorDiseases")).toList().isEmpty();
|
||||
|
||||
//是否重疾
|
||||
Boolean isMajorDiseases = applyDiseaseType.getIsMajorDiseases();
|
||||
if (StrUtil.isNotBlank(diseaseId)) {
|
||||
MedicalDiseaseType diseaseType = dao().fetch(MedicalDiseaseType.class, Cnd.where(MedicalDiseaseType::getId, "=", diseaseId));
|
||||
isMajorDiseases = diseaseType.getIsMajorDiseases();
|
||||
}
|
||||
|
||||
List<NutMap> applyRecordList = applyRecords.stream().filter(applyRecord -> {
|
||||
int applyYear = DateUtil.year(DateUtil.parse(applyRecord.getString("applyTime")));
|
||||
if (!applyRecord.getString("id").equals(apply.getId()) && applyYear == DateUtil.thisYear()) {
|
||||
if (!applyRecord.getString("id").equals(applyId) && applyYear == DateUtil.thisYear()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -193,68 +190,36 @@ public class MedicalApplyServiceImpl extends BaseServiceImpl<MedicalApply> imple
|
||||
|
||||
//今年获得的补助(重疾)
|
||||
BigDecimal subsidMoneyCurrentYear999 = applyRecordList.stream()
|
||||
.map(a -> a.getString("loveSubsidyMoney")) // 获取 String
|
||||
.filter(Objects::nonNull) // 过滤 null
|
||||
.filter(s -> !s.trim().isEmpty()) // 过滤空字符串(可选但推荐)
|
||||
.map(BigDecimal::new) // 安全构造 BigDecimal
|
||||
.filter(s -> s.getBoolean("isMajorDiseases"))
|
||||
.map(a -> a.getString("loveSubsidyMoney") + a.getString("subsidyMoney"))
|
||||
.map(BigDecimal::new)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
//今年获得的补助(普疾)
|
||||
long subsidMoneyCurrentYear000 = applyRecords.stream().filter(v -> !v.getId().equals(apply.getId()) && !v.getMajorDisease() && v.getApplyTime().substring(0, 4).equals(String.valueOf(year))).mapToLong(v -> (long) (v.getLoveSubsidyMoney() + v.getSubsidyMoney())).sum();
|
||||
BigDecimal subsidMoneyCurrentYear000 = applyRecordList.stream()
|
||||
.filter(s -> !s.getBoolean("isMajorDiseases"))
|
||||
.map(a -> a.getString("loveSubsidyMoney") + a.getString("subsidyMoney"))
|
||||
.map(BigDecimal::new)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
//历年来所获全部补助
|
||||
long allMoney = applyRecords.stream().mapToLong(v -> (long) (v.getSubsidyMoney() + v.getLoveSubsidyMoney())).sum();
|
||||
BigDecimal allMoney = applyRecords.stream()
|
||||
.map(a -> a.getString("loveSubsidyMoney") + a.getString("subsidyMoney"))
|
||||
.map(BigDecimal::new)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
//是否超过历年所获补助限额
|
||||
Boolean isBeyondAllMoney = allMoney > medicalSetting.getPreviousYearMaxMoney();
|
||||
|
||||
int currentYear = Calendar.getInstance().get(Calendar.YEAR);
|
||||
Boolean isBeyondAllMoney = allMoney.compareTo(medicalSetting.getPreviousYearMaxMoney()) > 0;
|
||||
|
||||
|
||||
//近十年是否有申请记录
|
||||
boolean hasApplyInTenYears = applyRecords.stream().filter(v -> !v.getId().equals(apply.getId())).anyMatch(v -> {
|
||||
String applyYear = v.getApplyTime().substring(0, 4);
|
||||
return (currentYear - 10) < Integer.parseInt(applyYear);
|
||||
});
|
||||
|
||||
//近十五年是否有申请记录
|
||||
boolean hasApplyInFifteenYears = applyRecords.stream().filter(v -> !v.getId().equals(apply.getId())).anyMatch(v -> {
|
||||
String applyYear = v.getApplyTime().substring(0, 4);
|
||||
return (currentYear - 15) < Integer.parseInt(applyYear);
|
||||
});
|
||||
|
||||
//是否连续缴纳十年
|
||||
/* String sqlx = """
|
||||
SELECT
|
||||
count(1)
|
||||
FROM
|
||||
`aid_fund_member_pay`
|
||||
WHERE
|
||||
`year` BETWEEN @YearAgo
|
||||
AND @currentYear
|
||||
AND payed = 1
|
||||
AND userid = @userid
|
||||
""";
|
||||
Sql sqlTen = Sqls.create(sqlx).setParam("currentYear", currentYear).setParam("YearAgo", currentYear - 10).setParam("userid", apply.getApplyUser());
|
||||
Sql sqlFif = Sqls.create(sqlx).setParam("currentYear", currentYear).setParam("YearAgo", currentYear - 15).setParam("userid", apply.getApplyUser());
|
||||
*/
|
||||
Sys_user user = baseService.dao().fetch(Sys_user.class, ShiroUtil.getUserId());
|
||||
Sys_user user = dao().fetch(Sys_user.class, SecurityUtil.getUserId());
|
||||
|
||||
boolean fullTenYears = DateUtil.thisYear() - Integer.parseInt(user.getAidFundDeductTime()) >= 10;
|
||||
boolean fullFifYears = DateUtil.thisYear() - Integer.parseInt(user.getAidFundDeductTime()) >= 15;
|
||||
|
||||
//补助比例
|
||||
double ratio = medicalSetting.getSubsidyRatio();
|
||||
// if (fullFifYears) {
|
||||
// ratio += medicalSetting.getFifteenYearNeverAddSubsidyRatio();
|
||||
// } else if (fullTenYears) {
|
||||
// ratio += medicalSetting.getTenYearNeverAddSubsidyRatio();
|
||||
// }
|
||||
// if (!hasApplyInFifteenYears) {
|
||||
// ratio += medicalSetting.getFifteenYearNeverAddSubsidyRatio();
|
||||
// } else if (!hasApplyInTenYears) {
|
||||
// ratio += medicalSetting.getTenYearNeverAddSubsidyRatio();
|
||||
// }
|
||||
|
||||
|
||||
// 连续缴满15年 或者是 连续缴满10年
|
||||
if (fullFifYears) {
|
||||
@@ -264,99 +229,114 @@ public class MedicalApplyServiceImpl extends BaseServiceImpl<MedicalApply> imple
|
||||
}
|
||||
|
||||
|
||||
// double sumMoney = majorDisease ? personExpenseMoney + outpatientServiceMoney : personExpenseMoney;
|
||||
//是否重疾
|
||||
Boolean isMajorDiseases = applyDiseaseType.getIsMajorDiseases();
|
||||
if (StrUtil.isNotBlank(diseaseId)) {
|
||||
MedicalDiseaseType diseaseType = dao().fetch(MedicalDiseaseType.class, Cnd.where(MedicalDiseaseType::getId, "=", diseaseId));
|
||||
isMajorDiseases = diseaseType.getIsMajorDiseases();
|
||||
}
|
||||
|
||||
//普通疾病不包含门诊费用 重大疾病包含门诊费
|
||||
//门诊费用 + 自费 + 个人承担
|
||||
double v = 0;
|
||||
BigDecimal allMedicalMoney;
|
||||
|
||||
|
||||
if (majorDisease) {
|
||||
if (isMajorDiseases) {
|
||||
//如果是重大疾病
|
||||
v = personExpenseMoney + singleBearMoney + outpatientServiceMoney + bxyMoney;
|
||||
allMedicalMoney = personExpenseMoney.add(singleBearMoney).add(outpatientServiceMoney).add(bxyMoney);
|
||||
} else {
|
||||
//个人承担费用
|
||||
singleBearMoney = costs.stream().filter(c -> c.getSingleBearMoney() >= 10000).mapToDouble(MedicalApplyCost::getSingleBearMoney).sum();
|
||||
singleBearMoney = costs.stream()
|
||||
.map(MedicalApplyCost::getSingleBearMoney)
|
||||
.filter(amount -> amount.compareTo(BigDecimal.valueOf(10000)) >= 0) // >= 10000
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
//自费
|
||||
personExpenseMoney = costs.stream().filter(c -> c.getSingleBearMoney() >= 10000).mapToDouble(MedicalApplyCost::getPersonExpenseMoney).sum();
|
||||
v = personExpenseMoney + singleBearMoney + outpatientServiceMoney + bxyMoney;
|
||||
personExpenseMoney = costs.stream()
|
||||
.map(MedicalApplyCost::getPersonExpenseMoney)
|
||||
.filter(amount -> amount.compareTo(BigDecimal.valueOf(10000)) >= 0) // >= 10000
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
allMedicalMoney = personExpenseMoney.add(singleBearMoney).add(outpatientServiceMoney).add(bxyMoney);
|
||||
}
|
||||
v = v * (ratio / 100);
|
||||
|
||||
// double v = (personExpenseMoney + singleBearMoney + (majorDisease ? outpatientServiceMoney : 0)) * (ratio / 100);
|
||||
allMedicalMoney = allMedicalMoney
|
||||
.multiply(BigDecimal.valueOf(ratio))
|
||||
.divide(BigDecimal.valueOf(100), 10, RoundingMode.HALF_UP);
|
||||
|
||||
//每年最多补多少钱
|
||||
if (majorDisease) {
|
||||
if (medicalSetting.getMaxYearInDiseaseMoney() - subsidMoneyCurrentYear999 < v) {
|
||||
v = medicalSetting.getMaxYearInDiseaseMoney() - subsidMoneyCurrentYear999;
|
||||
|
||||
if (isMajorDiseases) {
|
||||
BigDecimal maxYearInDiseaseMoney = medicalSetting.getMaxYearInDiseaseMoney();
|
||||
//最大补助金额减去今年已获得
|
||||
BigDecimal availableLimit = maxYearInDiseaseMoney.subtract(subsidMoneyCurrentYear999);
|
||||
if (allMedicalMoney.compareTo(availableLimit) > 0) {
|
||||
allMedicalMoney = availableLimit;
|
||||
}
|
||||
} else {
|
||||
if (medicalSetting.getMaxYearNotInDiseaseMoney() - subsidMoneyCurrentYear000 < v) {
|
||||
v = medicalSetting.getMaxYearNotInDiseaseMoney() - subsidMoneyCurrentYear000;
|
||||
BigDecimal maxYearNotInDiseaseMoney = medicalSetting.getMaxYearNotInDiseaseMoney();
|
||||
//最大补助金额减去今年已获得
|
||||
BigDecimal availableLimit = maxYearNotInDiseaseMoney.subtract(subsidMoneyCurrentYear000);
|
||||
if (allMedicalMoney.compareTo(availableLimit) > 0) {
|
||||
allMedicalMoney = availableLimit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//是否重疾
|
||||
if (majorDisease) {
|
||||
// 连续缴满15年并且未申请并且补助金额等于年度最大金额
|
||||
if (fullFifYears && applyRecords.isEmpty() && v == medicalSetting.getMaxYearInDiseaseMoney()) {
|
||||
double fifteenYearNeverAddSubsidyRatio = medicalSetting.getFifteenYearNeverAddSubsidyRatio() / 100.0;
|
||||
v = (v + v * fifteenYearNeverAddSubsidyRatio);
|
||||
} else if (fullTenYears && applyRecords.isEmpty() && v == medicalSetting.getMaxYearInDiseaseMoney()) {
|
||||
// 连续缴满10年并且未申请并且补助金额等于年度最大金额
|
||||
double tenYearNeverAddSubsidyRatio = medicalSetting.getTenYearNeverAddSubsidyRatio() / 100.0;
|
||||
v = (v + v * tenYearNeverAddSubsidyRatio);
|
||||
}
|
||||
} else {
|
||||
//不是重疾
|
||||
// 连续缴满15年并且未申请并且补助金额等于年度最大金额
|
||||
if (fullFifYears && applyRecords.isEmpty() && v == medicalSetting.getMaxYearNotInDiseaseMoney()) {
|
||||
double fifteenYearNeverAddSubsidyRatio = medicalSetting.getFifteenYearNeverAddSubsidyRatio() / 100.0;
|
||||
v = (v + v * fifteenYearNeverAddSubsidyRatio);
|
||||
} else if (fullTenYears && applyRecords.isEmpty() && v == medicalSetting.getMaxYearNotInDiseaseMoney()) {
|
||||
// 连续缴满10年并且未申请并且补助金额等于年度最大金额
|
||||
double tenYearNeverAddSubsidyRatio = medicalSetting.getTenYearNeverAddSubsidyRatio() / 100.0;
|
||||
v = (v + v * tenYearNeverAddSubsidyRatio);
|
||||
// 根据是否为重大疾病,确定对应的年度补助上限
|
||||
BigDecimal maxYearMedicalMoney = isMajorDiseases
|
||||
? medicalSetting.getMaxYearInDiseaseMoney() // 重大疾病年度最高补助金额
|
||||
: medicalSetting.getMaxYearNotInDiseaseMoney(); // 非重大疾病年度最高补助金额
|
||||
|
||||
// 判断是否满足“从未申请 + 补助金额恰好等于年度上限”的上浮条件
|
||||
boolean isEligibleForBonus = applyRecords.isEmpty()
|
||||
&& allMedicalMoney.compareTo(maxYearMedicalMoney) == 0;
|
||||
|
||||
// 若满足条件,根据连续缴费年限应用对应上浮比例
|
||||
if (isEligibleForBonus) {
|
||||
if (fullFifYears) {
|
||||
// 连续缴满15年且从未申请:应用15年专属上浮比例(如10%)
|
||||
double ratioPercent = medicalSetting.getFifteenYearNeverAddSubsidyRatio(); // 例如返回 10.0 表示 10%
|
||||
BigDecimal ratioFactor = BigDecimal.valueOf(ratioPercent).divide(BigDecimal.valueOf(100), 10, RoundingMode.HALF_UP);
|
||||
allMedicalMoney = allMedicalMoney.multiply(BigDecimal.ONE.add(ratioFactor)).setScale(2, RoundingMode.HALF_UP);
|
||||
} else if (fullTenYears) {
|
||||
// 连续缴满10年且从未申请:应用10年专属上浮比例(如5%)
|
||||
double ratioPercent = medicalSetting.getTenYearNeverAddSubsidyRatio(); // 例如返回 5.0 表示 5%
|
||||
BigDecimal ratioFactor = BigDecimal.valueOf(ratioPercent).divide(BigDecimal.valueOf(100), 10, RoundingMode.HALF_UP);
|
||||
allMedicalMoney = allMedicalMoney.multiply(BigDecimal.ONE.add(ratioFactor)).setScale(2, RoundingMode.HALF_UP);
|
||||
}
|
||||
// 注意:15年条件优先于10年,若同时满足,仅执行15年分支
|
||||
}
|
||||
|
||||
|
||||
if (isBeyondAllMoney) {
|
||||
// if (v > medicalSetting.getBeyondMaxQuotaMoney()) {
|
||||
// v = medicalSetting.getBeyondMaxQuotaMoney();
|
||||
// }
|
||||
v = 10000;
|
||||
allMedicalMoney = new BigDecimal("10000");
|
||||
}
|
||||
if (allMedicalMoney.compareTo(BigDecimal.ZERO) < 0) {
|
||||
allMedicalMoney = BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
if (v < 0) {
|
||||
v = 0;
|
||||
// 规则1:首次申请的重大疾病患者,若个人自付不足5000元,不给予常规补助(由爱心基金覆盖)
|
||||
if (applyInfo.getInt("applyNum") == 1
|
||||
&& applyDiseaseType.getIsMajorDiseases()
|
||||
&& singleBearMoney != null
|
||||
&& singleBearMoney.compareTo(new BigDecimal("5000")) < 0) {
|
||||
allMedicalMoney = BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 第一次申请未满5000 补助金额为0 爱心基金为5000
|
||||
*/
|
||||
if (apply.getApplyNum() == 1 && apply.getMajorDisease() && singleBearMoney < 5000) {
|
||||
v = 0;
|
||||
}
|
||||
|
||||
//如果是普通疾病并且多次住院中,个人自付如果没有超过一万的设为0
|
||||
if (!apply.getMajorDisease() && costs.stream().noneMatch(c -> c.getSingleBearMoney() >= 10000)) {
|
||||
v = 0;
|
||||
// 规则2:普通疾病患者,只有当至少有一次住院自付 ≥ 10000元时才给予补助;否则补助为0
|
||||
if (!applyDiseaseType.getIsMajorDiseases()
|
||||
&& costs.stream().noneMatch(c -> {
|
||||
BigDecimal bear = c.getSingleBearMoney();
|
||||
return bear != null && bear.compareTo(new BigDecimal("10000")) >= 0;
|
||||
})) {
|
||||
allMedicalMoney = BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
NutMap nutMap = new NutMap();
|
||||
|
||||
if (apply.getStateId() == 4800) {
|
||||
nutMap.put("loveSubsidyMoney", apply.getLoveSubsidyMoney());
|
||||
if (Objects.equals(applyInfo.getString("state"), ProcessInstanceStateEnum.FINISHED.getCode())) {
|
||||
nutMap.put("loveSubsidyMoney", applyInfo.getString("loveSubsidyMoney"));
|
||||
} else {
|
||||
nutMap.put("loveSubsidyMoney", (long) (isFirstApply && majorDisease ? medicalSetting.getLoveMoney() : 0));
|
||||
nutMap.put("loveSubsidyMoney", (isFirstApply && isMajorDiseases ? medicalSetting.getLoveMoney() : 0));
|
||||
}
|
||||
|
||||
DecimalFormat format = new DecimalFormat("######0.00");
|
||||
|
||||
nutMap.put("forecastSubsidyMoney", format.format(v));
|
||||
nutMap.put("forecastSubsidyMoney", allMedicalMoney.setScale(2, RoundingMode.HALF_UP));
|
||||
|
||||
return nutMap;
|
||||
}
|
||||
@@ -388,4 +368,31 @@ public class MedicalApplyServiceImpl extends BaseServiceImpl<MedicalApply> imple
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取申请信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public NutMap getApplyInfo(String id) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.state,
|
||||
type.isMajorDiseases
|
||||
FROM
|
||||
medical_apply info
|
||||
LEFT JOIN medical_disease_type type ON info.diseaseId = type.id
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("info.id", "=", id);
|
||||
sql.setCondition(cnd);
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
dao().execute(sql);
|
||||
return (NutMap) sql.getResult();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user