Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -136,9 +136,11 @@ public class SurgicalScheduleAppServiceImpl implements ISurgicalScheduleAppServi
|
||||
}
|
||||
}
|
||||
|
||||
LoginUser loginUser = new LoginUser();
|
||||
//获取当前登录用户信息
|
||||
loginUser = SecurityUtils.getLoginUser();
|
||||
// Bug #432 修复:获取当前登录用户信息,增加null校验防止NPE
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return R.fail("用户未登录或登录已过期");
|
||||
}
|
||||
// 当前登录用户ID
|
||||
Long userId = loginUser.getUserId();
|
||||
|
||||
|
||||
@@ -1144,7 +1144,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
|
||||
chargeItem.setQuantityValue(adviceSaveDto.getQuantity()); // 数量
|
||||
chargeItem.setQuantityUnit(adviceSaveDto.getUnitCode()); // 单位
|
||||
chargeItem.setUnitPrice(adviceSaveDto.getUnitPrice()); // 单价
|
||||
// #415 价格非负验证
|
||||
BigDecimal unitPrice = adviceSaveDto.getUnitPrice();
|
||||
if (unitPrice != null && unitPrice.compareTo(BigDecimal.ZERO) < 0) {
|
||||
unitPrice = unitPrice.abs(); // 负数取绝对值
|
||||
}
|
||||
chargeItem.setUnitPrice(unitPrice); // 单价
|
||||
chargeItem.setTotalPrice(adviceSaveDto.getTotalPrice()); // 总价
|
||||
|
||||
// 显式设置tenantId、createBy和createTime字段,防止自动填充机制失效
|
||||
@@ -1616,7 +1621,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
|
||||
chargeItem.setQuantityValue(adviceSaveDto.getQuantity()); // 数量
|
||||
chargeItem.setQuantityUnit(adviceSaveDto.getUnitCode()); // 单位
|
||||
chargeItem.setUnitPrice(adviceSaveDto.getUnitPrice()); // 单价
|
||||
// #415 价格非负验证
|
||||
BigDecimal unitPrice = adviceSaveDto.getUnitPrice();
|
||||
if (unitPrice != null && unitPrice.compareTo(BigDecimal.ZERO) < 0) {
|
||||
unitPrice = unitPrice.abs(); // 负数取绝对值
|
||||
}
|
||||
chargeItem.setUnitPrice(unitPrice); // 单价
|
||||
chargeItem.setTotalPrice(adviceSaveDto.getTotalPrice()); // 总价
|
||||
|
||||
// 显式设置审计字段,防止自动填充机制失效
|
||||
@@ -1842,7 +1852,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
chargeItem.setEncounterDiagnosisId(adviceSaveDto.getEncounterDiagnosisId()); // 就诊诊断id
|
||||
chargeItem.setQuantityValue(adviceSaveDto.getQuantity()); // 数量
|
||||
chargeItem.setQuantityUnit(adviceSaveDto.getUnitCode()); // 单位
|
||||
chargeItem.setUnitPrice(adviceSaveDto.getUnitPrice()); // 单价
|
||||
// #415 价格非负验证
|
||||
BigDecimal unitPrice = adviceSaveDto.getUnitPrice();
|
||||
if (unitPrice != null && unitPrice.compareTo(BigDecimal.ZERO) < 0) {
|
||||
unitPrice = unitPrice.abs(); // 负数取绝对值
|
||||
}
|
||||
chargeItem.setUnitPrice(unitPrice); // 单价
|
||||
chargeItem.setTotalPrice(adviceSaveDto.getTotalPrice()); // 总价
|
||||
|
||||
iChargeItemService.saveOrUpdate(chargeItem);
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
AND T2.delete_flag = '0'
|
||||
WHERE
|
||||
T1.delete_flag = '0'
|
||||
<if test="chargeItemContext == 1 ">
|
||||
<if test="chargeItemContext == 1">
|
||||
AND T1.instance_table = #{MED_MEDICATION_DEFINITION}
|
||||
</if>
|
||||
<if test="chargeItemContext == 2 ">
|
||||
<if test="chargeItemContext == 2">
|
||||
AND T1.instance_table = #{ADM_DEVICE_DEFINITION}
|
||||
</if>
|
||||
<if test="chargeItemContext == 3 ">
|
||||
<if test="chargeItemContext == 3">
|
||||
AND (T1.instance_table = #{WOR_ACTIVITY_DEFINITION} OR T1.instance_table = #{ADM_HEALTHCARE_SERVICE})
|
||||
</if>
|
||||
GROUP BY T1.tenant_id,
|
||||
|
||||
Reference in New Issue
Block a user