Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -34,7 +34,9 @@ public class ApplicationConfig {
|
||||
// 设置日期格式为 yyyy/M/d HH:mm:ss,支持多种格式反序列化
|
||||
builder.simpleDateFormat("yyyy/M/d HH:mm:ss");
|
||||
// 添加JavaTimeModule支持,用于LocalDateTime
|
||||
builder.modules(new JavaTimeModule());
|
||||
JavaTimeModule javaTimeModule = new JavaTimeModule();
|
||||
javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
builder.modules(javaTimeModule);
|
||||
builder.serializerByType(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy/M/d HH:mm:ss")));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
||||
String activityName = activityDef != null ? activityDef.getName() : "";
|
||||
|
||||
List<OrganizationLocation> organizationLocationList =
|
||||
organizationLocationService.getOrgLocListByOrgIdAndActivityDefinitionId(orgLoc.getOrganizationId(), orgLoc.getActivityDefinitionId());
|
||||
organizationLocationService.getOrgLocListByActivityDefinitionId(orgLoc.getActivityDefinitionId());
|
||||
organizationLocationList = (orgLoc.getId() != null)
|
||||
? organizationLocationList.stream().filter(item -> !orgLoc.getId().equals(item.getId())).toList()
|
||||
: organizationLocationList;
|
||||
@@ -169,9 +169,11 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
||||
if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(),
|
||||
orgLoc.getStartTime(), orgLoc.getEndTime())) {
|
||||
Organization org = organizationService.getById(organizationLocation.getOrganizationId());
|
||||
String organizationName = org != null ? org.getName() : "未知科室";
|
||||
if (org == null) {
|
||||
continue;
|
||||
}
|
||||
return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime()
|
||||
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + organizationName + "时间冲突");
|
||||
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + org.getName() + "时间冲突");
|
||||
}
|
||||
|
||||
if (orgLocQueryDto.getId() != null) {
|
||||
|
||||
@@ -2192,11 +2192,6 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST,
|
||||
CommonConstants.TableName.WOR_SERVICE_REQUEST, practitionerId, Whether.NO.getCode(),
|
||||
sourceEnum, sourceBillNo);
|
||||
// 手术计费场景:sourceBillNo 不为空时,过滤掉药品(1),保留耗材(2)和诊疗(3/6)
|
||||
if (sourceBillNo != null && !sourceBillNo.isEmpty()) {
|
||||
requestBaseInfo.removeIf(dto -> dto.getAdviceType() != null
|
||||
&& dto.getAdviceType() == 1);
|
||||
}
|
||||
for (RequestBaseDto requestBaseDto : requestBaseInfo) {
|
||||
// 请求状态
|
||||
requestBaseDto
|
||||
|
||||
@@ -23,6 +23,9 @@ public class SurgeryItemDto {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
|
||||
/** 所属科室名称 */
|
||||
private String orgName;
|
||||
|
||||
/** 执行科室ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long positionId;
|
||||
|
||||
@@ -871,6 +871,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 手术项目专用分页查询:仅查手术 + 定价,无库存/草稿库存/取药科室等无关逻辑 -->
|
||||
<!-- 使用 LIMIT/OFFSET 直接查询,避免 MyBatis Plus 分页插件的 COUNT 开销 -->
|
||||
<select id="getSurgeryPage" resultType="com.openhis.web.doctorstation.dto.SurgeryItemDto">
|
||||
SELECT DISTINCT ON (t1.ID)
|
||||
t1.ID AS advice_definition_id,
|
||||
@@ -893,6 +894,7 @@
|
||||
AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')
|
||||
</if>
|
||||
ORDER BY t1.ID, t1.name ASC, t2.ID ASC
|
||||
LIMIT #{limit} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<!-- 检查/检验项目专用分页查询:仅查指定 category_code + 定价,无库存/草稿库存/取药科室等无关逻辑 -->
|
||||
@@ -901,6 +903,7 @@
|
||||
t1.ID AS advice_definition_id,
|
||||
t1.NAME AS advice_name,
|
||||
t1.org_id AS org_id,
|
||||
t3.name AS org_name,
|
||||
t1.org_id AS position_id,
|
||||
t2.ID AS charge_item_definition_id,
|
||||
t2.price AS price,
|
||||
@@ -912,6 +915,9 @@
|
||||
AND t2.delete_flag = '0'
|
||||
AND t2.status_enum = #{statusEnum}
|
||||
AND t2.instance_table = 'wor_activity_definition'
|
||||
LEFT JOIN adm_organization t3
|
||||
ON t3.id = t1.org_id
|
||||
AND t3.delete_flag = '0'
|
||||
WHERE t1.delete_flag = '0'
|
||||
AND t1.category_code = #{categoryCode}
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
|
||||
@@ -57,8 +57,6 @@
|
||||
AND ae.delete_flag = '0'
|
||||
LEFT JOIN adm_patient AS ap ON ap.ID = ae.patient_id
|
||||
AND ap.delete_flag = '0'
|
||||
LEFT JOIN wor_service_request AS wsr ON wsr.prescription_no = drf.prescription_no
|
||||
AND wsr.delete_flag = '0'
|
||||
WHERE drf.delete_flag = '0'
|
||||
AND drf.encounter_id = #{encounterId}
|
||||
AND drf.type_code = #{typeCode}
|
||||
|
||||
@@ -38,4 +38,12 @@ public interface IOrganizationLocationService extends IService<OrganizationLocat
|
||||
*/
|
||||
List<OrganizationLocation> getOrgLocListByOrgIdAndActivityDefinitionId(Long organizationId, Long activityDefinitionId);
|
||||
|
||||
/**
|
||||
* 根据诊疗定义id查询所有执行科室列表(跨科室)
|
||||
*
|
||||
* @param activityDefinitionId 诊疗定义id
|
||||
* @return 执行科室列表
|
||||
*/
|
||||
List<OrganizationLocation> getOrgLocListByActivityDefinitionId(Long activityDefinitionId);
|
||||
|
||||
}
|
||||
@@ -64,4 +64,16 @@ public class OrganizationLocationServiceImpl extends ServiceImpl<OrganizationLoc
|
||||
.eq(OrganizationLocation::getActivityDefinitionId, activityDefinitionId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据诊疗定义id查询所有执行科室列表(跨科室)
|
||||
*
|
||||
* @param activityDefinitionId 诊疗定义id
|
||||
* @return 执行科室列表
|
||||
*/
|
||||
@Override
|
||||
public List<OrganizationLocation> getOrgLocListByActivityDefinitionId(Long activityDefinitionId) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<OrganizationLocation>()
|
||||
.eq(OrganizationLocation::getActivityDefinitionId, activityDefinitionId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -79,11 +79,13 @@ public class OpSchedule extends HisBaseEntity {
|
||||
private String surgerySite;
|
||||
|
||||
/** 入院时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime admissionTime;
|
||||
|
||||
/** 入手术室时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime entryTime;
|
||||
|
||||
/** 手术室编码 */
|
||||
@@ -142,19 +144,23 @@ public class OpSchedule extends HisBaseEntity {
|
||||
private String assistant3Code;
|
||||
|
||||
/** 手术开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/** 手术结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/** 麻醉开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime anesStart;
|
||||
|
||||
/** 麻醉结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime anesEnd;
|
||||
|
||||
/** 手术状态 */
|
||||
|
||||
Reference in New Issue
Block a user