Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
# Conflicts: # openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/PurchaseInventoryInitDto.java
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 用户管理Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BizUser extends HisBaseEntity {
|
||||
|
||||
/** 用户ID */
|
||||
// @TableId(type = IdType.ASSIGN_ID)
|
||||
private Long userId;
|
||||
|
||||
/** 部门ID */
|
||||
private Long deptId;
|
||||
|
||||
/** 用户账号 */
|
||||
private String userName;
|
||||
|
||||
/** 用户昵称 */
|
||||
private String nickName;
|
||||
|
||||
/** 用户类型 */
|
||||
private String userType;
|
||||
|
||||
/** 用户邮箱 */
|
||||
private String email;
|
||||
|
||||
/** 手机号码 */
|
||||
private String phonenumber;
|
||||
|
||||
/** 用户性别 */
|
||||
private String sex;
|
||||
|
||||
/** 用户头像 */
|
||||
private String avatar;
|
||||
|
||||
/** 密码 */
|
||||
private String password;
|
||||
|
||||
/** 帐号状态(0正常 1停用) */
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 最后登录IP */
|
||||
private String loginIp;
|
||||
|
||||
/** 最后登录时间 */
|
||||
private Date loginDate;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 用户角色Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user_role")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BizUserRole {
|
||||
|
||||
/** 用户ID */
|
||||
private Long userId;
|
||||
|
||||
/** 角色ID */
|
||||
private Long roleId;
|
||||
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class ChargeItem extends HisBaseEntity {
|
||||
private Long costOrgId;
|
||||
|
||||
/** 数量 */
|
||||
private Long quantityValue;
|
||||
private Integer quantityValue;
|
||||
|
||||
/** 单位 */
|
||||
private String quantityUnit;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ChargeItemDefinition extends HisBaseEntity {
|
||||
private String title;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 机构ID */
|
||||
private Long orgId;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
private String wbStr;
|
||||
|
||||
/** 器材分类 */
|
||||
private DeviceCategory categoryEnum;
|
||||
private String categoryCode;
|
||||
|
||||
/** 器材种类 */
|
||||
private String typeCode;
|
||||
@@ -87,11 +87,14 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 生产厂家 */
|
||||
private String manufacturerText;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplyId;
|
||||
|
||||
@@ -101,9 +104,6 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
/** 适用范围 */
|
||||
private String jurisdiction;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long ruleId;
|
||||
|
||||
/** 器材版本 */
|
||||
private String version;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -40,8 +41,9 @@ public class OrganizationLocation extends HisBaseEntity {
|
||||
/** 默认执行科室 */
|
||||
private Long defOrganizationId;
|
||||
|
||||
/** 药品类别 */
|
||||
private String medCategoryCode;
|
||||
/** 发放类别 */
|
||||
@Dict(dictCode = "distribution_category_code")
|
||||
private String distributionCategoryCode;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
@@ -80,6 +80,9 @@ public class Practitioner extends HisBaseEntity {
|
||||
/** 医保码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 机构id */
|
||||
private Long orgId;
|
||||
|
||||
/** 系统用户id */
|
||||
private Long userId;
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -26,6 +28,7 @@ public class Supplier extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 编号 */
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.BizUser;
|
||||
|
||||
/**
|
||||
* 用户管理Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface BizUserMapper extends BaseMapper<BizUser> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import com.openhis.administration.domain.BizUserRole;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.BizUser;
|
||||
|
||||
/**
|
||||
* 用户角色Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface BizUserRoleMapper extends BaseMapper<BizUserRole> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.BizUserRole;
|
||||
|
||||
/**
|
||||
* 用户角色Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IBizUserRoleService extends IService<BizUserRole> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.BizUser;
|
||||
|
||||
/**
|
||||
* 用户管理Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IBizUserService extends IService<BizUser> {
|
||||
|
||||
}
|
||||
@@ -43,4 +43,11 @@ public interface IChargeItemService extends IService<ChargeItem> {
|
||||
* @return 收费信息
|
||||
*/
|
||||
List<ChargeItem> getChargeItemInfo(List<Long> chargeItemIdList);
|
||||
|
||||
/**
|
||||
* 更新收费状态:已退费
|
||||
*
|
||||
* @param chargeItemIdList 收费id列表
|
||||
*/
|
||||
void updateRefundChargeStatus(List<Long> chargeItemIdList);
|
||||
}
|
||||
@@ -9,4 +9,15 @@ import com.openhis.administration.domain.OrganizationLocation;
|
||||
* @author system
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
public interface IOrganizationLocationService extends IService<OrganizationLocation> {}
|
||||
public interface IOrganizationLocationService extends IService<OrganizationLocation> {
|
||||
|
||||
/**
|
||||
* 查询机构位置关系
|
||||
*
|
||||
* @param orgId 机构id
|
||||
* @param categoryCode 发放类型
|
||||
* @return机构位置关系
|
||||
*/
|
||||
OrganizationLocation getOrgLocByOrgIdAndCategoryCode(Long orgId, String categoryCode);
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.openhis.administration.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机构管理Service接口
|
||||
*
|
||||
@@ -27,4 +29,11 @@ public interface IOrganizationService extends IService<Organization> {
|
||||
*/
|
||||
boolean inactiveOrg(Long orgId);
|
||||
|
||||
/**
|
||||
* 获取机构下拉列表
|
||||
*
|
||||
* @param classEnum 机构分类
|
||||
* @return 机构下拉列表
|
||||
*/
|
||||
List<Organization> getList(Integer classEnum);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.BizUserRole;
|
||||
import com.openhis.administration.mapper.BizUserRoleMapper;
|
||||
import com.openhis.administration.service.IBizUserRoleService;
|
||||
|
||||
/**
|
||||
* 用户角色Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class BizUserRoleServiceImpl extends ServiceImpl<BizUserRoleMapper, BizUserRole> implements IBizUserRoleService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.BizUser;
|
||||
import com.openhis.administration.mapper.BizUserMapper;
|
||||
import com.openhis.administration.service.IBizUserService;
|
||||
|
||||
/**
|
||||
* 用户管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class BizUserServiceImpl extends ServiceImpl<BizUserMapper, BizUser> implements IBizUserService {
|
||||
|
||||
}
|
||||
@@ -31,6 +31,7 @@ public class ChargeItemDefDetailServiceImpl extends ServiceImpl<ChargeItemDefApp
|
||||
if (baseMapper.selectById(chargeItemDefDetail.getId()) == null) {
|
||||
return false;
|
||||
} else {
|
||||
//todo deleteFlag=1
|
||||
return baseMapper.updateById(chargeItemDefDetail) > 0;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.ChargeItem;
|
||||
import com.openhis.administration.mapper.ChargeItemMapper;
|
||||
import com.openhis.administration.service.IChargeItemService;
|
||||
import com.openhis.common.enums.ChargeItemStatus;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
@@ -56,8 +57,8 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
*/
|
||||
@Override
|
||||
public boolean updateAccountType(Long encounterId, Long accountId) {
|
||||
int update = baseMapper.update(null, new LambdaUpdateWrapper<ChargeItem>()
|
||||
.eq(ChargeItem::getEncounterId, encounterId).set(ChargeItem::getAccountId, accountId));
|
||||
int update = baseMapper.update(new ChargeItem().setAccountId(accountId),
|
||||
new LambdaUpdateWrapper<ChargeItem>().eq(ChargeItem::getEncounterId, encounterId));
|
||||
return update > 0;
|
||||
}
|
||||
|
||||
@@ -71,4 +72,15 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
public List<ChargeItem> getChargeItemInfo(List<Long> chargeItemIdList) {
|
||||
return baseMapper.selectBatchIds(chargeItemIdList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新收费状态:已退费
|
||||
*
|
||||
* @param chargeItemIdList 收费id列表
|
||||
*/
|
||||
@Override
|
||||
public void updateRefundChargeStatus(List<Long> chargeItemIdList) {
|
||||
baseMapper.update(new ChargeItem().setStatusEnum(ChargeItemStatus.REFUNDED.getValue()),
|
||||
new LambdaUpdateWrapper<ChargeItem>().in(ChargeItem::getId, chargeItemIdList));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
import com.openhis.administration.mapper.OrganizationLocationMapper;
|
||||
@@ -17,4 +20,20 @@ import com.openhis.administration.service.IOrganizationLocationService;
|
||||
public class OrganizationLocationServiceImpl extends ServiceImpl<OrganizationLocationMapper, OrganizationLocation>
|
||||
implements IOrganizationLocationService {
|
||||
|
||||
/**
|
||||
* 查询机构位置关系
|
||||
*
|
||||
* @param orgId 机构id
|
||||
* @param categoryCode 发放类型
|
||||
* @return机构位置关系
|
||||
*/
|
||||
@Override
|
||||
public OrganizationLocation getOrgLocByOrgIdAndCategoryCode(Long orgId, String categoryCode) {
|
||||
OrganizationLocation organizationLocation = baseMapper
|
||||
.selectOne(new LambdaQueryWrapper<OrganizationLocation>().eq(OrganizationLocation::getOrganizationId, orgId)
|
||||
.eq(OrganizationLocation::getDistributionCategoryCode, categoryCode)
|
||||
.lt(OrganizationLocation::getStartTime, new Date()).gt(OrganizationLocation::getEndTime, new Date()));
|
||||
return organizationLocation;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
@@ -27,8 +30,8 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
*/
|
||||
@Override
|
||||
public boolean activeOrg(Long orgId) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId)
|
||||
.set(Organization::getActiveFlag, AccountStatus.ACTIVE.getValue()));
|
||||
int updateCount = baseMapper.update(new Organization().setActiveFlag(AccountStatus.ACTIVE.getValue()),
|
||||
new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -40,9 +43,20 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
*/
|
||||
@Override
|
||||
public boolean inactiveOrg(Long orgId) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId)
|
||||
.set(Organization::getActiveFlag, AccountStatus.INACTIVE.getValue()));
|
||||
int updateCount = baseMapper.update(new Organization().setActiveFlag(AccountStatus.INACTIVE.getValue()),
|
||||
new LambdaUpdateWrapper<Organization>().eq(Organization::getId, orgId));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机构下拉列表
|
||||
*
|
||||
* @param classEnum 机构分类
|
||||
* @return 机构下拉列表
|
||||
*/
|
||||
@Override
|
||||
public List<Organization> getList(Integer classEnum) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Organization>()
|
||||
.select(Organization::getId, Organization::getName).eq(Organization::getClassEnum, classEnum));
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.openhis.document.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -26,12 +25,15 @@ public class Emr extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 患者ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
|
||||
/** 就诊ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/** 病历信息 */
|
||||
@@ -43,5 +45,4 @@ public class Emr extends HisBaseEntity {
|
||||
/** 记录人 */
|
||||
private Long recordId;
|
||||
|
||||
|
||||
}
|
||||
@@ -3,11 +3,14 @@ package com.openhis.document.domain;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -26,18 +29,20 @@ public class EmrTemplate extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 模板名称 */
|
||||
private String templateName;
|
||||
|
||||
/** 模板类型 */
|
||||
private String templateCode;
|
||||
private String templateTypeCode;
|
||||
|
||||
/** 使用范围 */
|
||||
private String useScopeCode;
|
||||
|
||||
/** 个人/科室ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/** 病历内容 */
|
||||
|
||||
@@ -6,8 +6,8 @@ import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -31,6 +31,9 @@ public class PaymentRecDetail extends HisBaseEntity {
|
||||
/** 先前支付明细id */
|
||||
private Long predecessorId;
|
||||
|
||||
/** 付款id */
|
||||
private Long reconciliationId;
|
||||
|
||||
/** 付款类型 */
|
||||
private Integer targetEnum;
|
||||
|
||||
@@ -73,5 +76,4 @@ public class PaymentRecDetail extends HisBaseEntity {
|
||||
/** 单笔交易结果 */
|
||||
private Integer resultEnum;
|
||||
|
||||
|
||||
}
|
||||
@@ -6,8 +6,8 @@ import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -88,5 +88,6 @@ public class PaymentReconciliation extends HisBaseEntity {
|
||||
/** 就诊ID */
|
||||
private Long encounterId;
|
||||
|
||||
|
||||
/** 结算时间 */
|
||||
private Date billDate;
|
||||
}
|
||||
@@ -16,8 +16,8 @@ public interface IPaymentReconciliationService extends IService<PaymentReconcili
|
||||
/**
|
||||
* 根据支付id获取对应收费项目的id列表
|
||||
*
|
||||
* @param paymentId 支付id
|
||||
* @param paymentIdList 支付id列表
|
||||
* @return 收费项目的id列表
|
||||
*/
|
||||
List<Long> getChargeItemIdListByPayment(Long paymentId);
|
||||
List<Long> getChargeItemIdListByPayment(List<Long> paymentIdList);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.financial.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -30,21 +31,28 @@ public class PaymentReconciliationServiceImpl extends ServiceImpl<PaymentReconci
|
||||
/**
|
||||
* 根据支付id获取对应收费项目的id列表
|
||||
*
|
||||
* @param paymentId 支付id
|
||||
* @param paymentIdList 支付id列表
|
||||
* @return 收费项目的id列表
|
||||
*/
|
||||
@Override
|
||||
public List<Long> getChargeItemIdListByPayment(Long paymentId) {
|
||||
public List<Long> getChargeItemIdListByPayment(List<Long> paymentIdList) {
|
||||
|
||||
// 根据支付id获取支付信息
|
||||
PaymentReconciliation paymentReconciliation =
|
||||
paymentReconciliationMapper.selectOne(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||
.select(PaymentReconciliation::getChargeItemIds).eq(PaymentReconciliation::getId, paymentId));
|
||||
if (paymentReconciliation == null) {
|
||||
List<PaymentReconciliation> paymentReconciliationList =
|
||||
paymentReconciliationMapper.selectList(new LambdaQueryWrapper<PaymentReconciliation>()
|
||||
.select(PaymentReconciliation::getChargeItemIds).in(PaymentReconciliation::getId, paymentIdList));
|
||||
if (paymentReconciliationList.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
// 拆解所有的chargeItemId,拼装成一个集合
|
||||
List<String> chargeItemIdList = paymentReconciliationList.stream().map(PaymentReconciliation::getChargeItemIds)
|
||||
.collect(Collectors.toList());
|
||||
List<Long> chargeItemIds = new ArrayList<>();
|
||||
for (String chargeItemId : chargeItemIdList) {
|
||||
chargeItemIds.addAll(Arrays.stream(chargeItemId.split(CommonConstants.Common.COMMA)).map(Long::parseLong)
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
// 将收费项目集合转换成列表
|
||||
return Arrays.stream(paymentReconciliation.getChargeItemIds().split(CommonConstants.Common.COMMA))
|
||||
.map(Long::parseLong).collect(Collectors.toList());
|
||||
return chargeItemIds;
|
||||
}
|
||||
}
|
||||
@@ -92,4 +92,10 @@ public class Medication extends HisBaseEntity {
|
||||
/** DDD单位 */
|
||||
private String dddUnitCode;
|
||||
|
||||
/** 单次最小用药频次 */
|
||||
private String minRateCode;
|
||||
|
||||
/** 单次最大用药频次 */
|
||||
private String maxRateCode;
|
||||
|
||||
}
|
||||
@@ -99,6 +99,9 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 生产厂商文本 */
|
||||
private String manufacturerText;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplyId;
|
||||
|
||||
@@ -136,7 +139,7 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
private String nationalDrugCode;
|
||||
|
||||
/** 拆分属性 */
|
||||
private String partAttribute;
|
||||
private Integer partAttributeEnum;
|
||||
|
||||
/** 抗生素分类 */
|
||||
private String antibioticCode;
|
||||
@@ -153,4 +156,7 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
/** 基药标识 */
|
||||
private Integer basicFlag;
|
||||
|
||||
/** 住院临时医嘱拆分属性 */
|
||||
private Integer thoPartAttributeEnum;
|
||||
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class MedicationDetail extends HisBaseEntity {
|
||||
private String wbStr;
|
||||
|
||||
/** 药品分类 */
|
||||
private Integer categoryCode;
|
||||
private String categoryCode;
|
||||
|
||||
/** 商品名称 */
|
||||
private String merchandiseName;
|
||||
@@ -164,4 +164,40 @@ public class MedicationDetail extends HisBaseEntity {
|
||||
/** 产品特性 */
|
||||
private Integer characteristic;
|
||||
|
||||
/** 所在位置 */
|
||||
private Long locationId;
|
||||
|
||||
/** 贯标国家编码 */
|
||||
private String nationalDrugCode;
|
||||
|
||||
/** 拆分属性 */
|
||||
private Integer partAttributeEnum;
|
||||
|
||||
/** DDD值 */
|
||||
private String dddCode;
|
||||
|
||||
/** DDD单位 */
|
||||
private String dddUnitCode;
|
||||
|
||||
/** 单次最小用药频次 */
|
||||
private String minRateCode;
|
||||
|
||||
/** 单次最大用药频次 */
|
||||
private String maxRateCode;
|
||||
/** 抗生素分类 */
|
||||
private String antibioticCode;
|
||||
/** 权限限制 */
|
||||
private Integer restrictedEnum;
|
||||
/** 是否自制 */
|
||||
private Integer selfFlag;
|
||||
/** 是否抗生素 */
|
||||
private Integer antibioticFlag;
|
||||
/** 基药标识 */
|
||||
private Integer basicFlag;
|
||||
/** 生产厂商文本 */
|
||||
private String manufacturerText;
|
||||
/** 用量限定 */
|
||||
private BigDecimal usageLimit;
|
||||
/** 住院临时医嘱拆分属性 */
|
||||
private Integer thoPartAttributeEnum;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class MedicationRequest extends HisBaseEntity {
|
||||
private Long id;
|
||||
|
||||
/** 药品请求编码 */
|
||||
private String bus_no;
|
||||
private String busNo;
|
||||
|
||||
/** 处方号 */
|
||||
private String prescriptionNo;
|
||||
@@ -82,15 +82,25 @@ public class MedicationRequest extends HisBaseEntity {
|
||||
/** 开方医生 */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 发放药房 */
|
||||
/** 所在位置 */
|
||||
private Long locationId;
|
||||
|
||||
/** 发放科室 */
|
||||
/**
|
||||
* 发放药房
|
||||
*/
|
||||
private Long performLocation;
|
||||
|
||||
/** 开方人科室 */
|
||||
private Long orgId;
|
||||
|
||||
/** 就诊id */
|
||||
private Long encounterId;
|
||||
|
||||
/**
|
||||
* 诊断ID
|
||||
*/
|
||||
private Long conditionId;
|
||||
|
||||
/** 支持用药信息 */
|
||||
private String supportInfo;
|
||||
|
||||
|
||||
@@ -20,11 +20,4 @@ public interface IMedicationDefinitionService extends IService<MedicationDefinit
|
||||
*/
|
||||
boolean addMedication(MedicationDetail medicationDetail);
|
||||
|
||||
/**
|
||||
* 新增医保药品目录
|
||||
*
|
||||
* @param medicationDetail
|
||||
* @return
|
||||
*/
|
||||
boolean addYbMedicatione(MedicationDetail medicationDetail);
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.openhis.medication.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.medication.domain.MedicationDispense;
|
||||
import com.openhis.medication.domain.MedicationRequest;
|
||||
|
||||
/**
|
||||
* 药品发放管理Service接口
|
||||
@@ -11,4 +14,18 @@ import com.openhis.medication.domain.MedicationDispense;
|
||||
*/
|
||||
public interface IMedicationDispenseService extends IService<MedicationDispense> {
|
||||
|
||||
/**
|
||||
* 新增草稿状态的药品发放信息
|
||||
*
|
||||
* @param medicationRequestList 药品请求信息
|
||||
*/
|
||||
void addMedicationDispense(List<MedicationRequest> medicationRequestList);
|
||||
|
||||
/**
|
||||
* 更新未发放药品状态:停止发放
|
||||
*
|
||||
* @param medDisIdList 发放id列表
|
||||
* @param refund 停止原因:退费
|
||||
*/
|
||||
void updateStopDispenseStatus(List<Long> medDisIdList, Integer refund);
|
||||
}
|
||||
@@ -32,6 +32,4 @@ public interface IMedicationService extends IService<Medication> {
|
||||
// 新增药品目录
|
||||
boolean addMedication(MedicationDetail medicationDetail);
|
||||
|
||||
// 新增医保药品目录
|
||||
boolean addYbMedicatione(MedicationDetail medicationDetail);
|
||||
}
|
||||
@@ -60,8 +60,5 @@ public class MedicationDefinitionServiceImpl extends ServiceImpl<MedicationDefin
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addYbMedicatione(MedicationDetail medicationDetail) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +1,15 @@
|
||||
package com.openhis.medication.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.openhis.common.enums.DispenseStatus;
|
||||
import com.openhis.medication.domain.MedicationDispense;
|
||||
import com.openhis.medication.domain.MedicationRequest;
|
||||
import com.openhis.medication.mapper.MedicationDispenseMapper;
|
||||
import com.openhis.medication.service.IMedicationDispenseService;
|
||||
|
||||
@@ -14,6 +20,72 @@ import com.openhis.medication.service.IMedicationDispenseService;
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispenseMapper, MedicationDispense> implements IMedicationDispenseService {
|
||||
public class MedicationDispenseServiceImpl extends ServiceImpl<MedicationDispenseMapper, MedicationDispense>
|
||||
implements IMedicationDispenseService {
|
||||
|
||||
/**
|
||||
* 新增草稿状态的药品发放信息
|
||||
*
|
||||
* @param medicationRequestList 药品请求信息
|
||||
*/
|
||||
@Override
|
||||
public void addMedicationDispense(List<MedicationRequest> medicationRequestList) {
|
||||
for (MedicationRequest medicationRequest : medicationRequestList) {
|
||||
MedicationDispense medicationDispense = new MedicationDispense();
|
||||
// 药品发放id
|
||||
medicationDispense.setBusNo(medicationRequest.getBusNo());
|
||||
// 药品发放状态
|
||||
medicationDispense.setStatusEnum(DispenseStatus.DRAFT.getValue());
|
||||
// 状态变更时间
|
||||
medicationDispense.setStatusChangedTime(DateUtils.getNowDate());
|
||||
// 发药类型
|
||||
medicationDispense.setDispenseEnum(medicationRequest.getCategoryEnum());
|
||||
// 药品编码
|
||||
medicationDispense.setMedicationId(medicationRequest.getMedicationId());
|
||||
// 请求数量
|
||||
medicationDispense.setQuantity(medicationRequest.getQuantity());
|
||||
// 请求单位编码
|
||||
medicationDispense.setUnitCode(medicationRequest.getUnitCode());
|
||||
// 产品批号
|
||||
medicationDispense.setLotNumber(medicationRequest.getLotNumber());
|
||||
// 患者id
|
||||
medicationDispense.setPatientId(medicationRequest.getPatientId());
|
||||
// 就诊id
|
||||
medicationDispense.setEncounterId(medicationRequest.getEncounterId());
|
||||
// 支持用药信息
|
||||
medicationDispense.setSupportInfo(medicationRequest.getSupportInfo());
|
||||
// 发药人
|
||||
medicationDispense.setPractitionerId(medicationRequest.getPractitionerId());
|
||||
// 发放药房
|
||||
medicationDispense.setLocationId(medicationRequest.getPerformOrg());
|
||||
// 药品请求id
|
||||
medicationDispense.setMedReqId(medicationRequest.getId());
|
||||
// 已发药数量
|
||||
medicationDispense.setDispenseQuantity(0);
|
||||
// 用法
|
||||
medicationDispense.setMethodCode(medicationRequest.getMethodCode());
|
||||
// 用药频次
|
||||
medicationDispense.setFrequencyCode(medicationRequest.getRateCode());
|
||||
// 单次剂量
|
||||
medicationDispense.setDose(medicationRequest.getDose());
|
||||
// 剂量单位
|
||||
medicationDispense.setDoseUnitCode(medicationRequest.getDoseUnitCode());
|
||||
// 单次最大剂量
|
||||
medicationDispense.setMaxUnit(medicationRequest.getMaxDose());
|
||||
baseMapper.insert(medicationDispense);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新未发放药品状态:停止发放
|
||||
*
|
||||
* @param medDisIdList 发放id列表
|
||||
* @param refund 停止原因:退费
|
||||
*/
|
||||
@Override
|
||||
public void updateStopDispenseStatus(List<Long> medDisIdList, Integer refund) {
|
||||
baseMapper.update(
|
||||
new MedicationDispense().setStatusEnum(DispenseStatus.STOPPED.getValue()).setNotPerformedReasonEnum(refund),
|
||||
new LambdaUpdateWrapper<MedicationDispense>().in(MedicationDispense::getId, medDisIdList));
|
||||
}
|
||||
}
|
||||
@@ -83,14 +83,4 @@ public class MedicationServiceImpl extends ServiceImpl<MedicationMapper, Medicat
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品目录
|
||||
*
|
||||
* @param medicationDetail
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean addYbMedicatione(MedicationDetail medicationDetail) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
private Long id;
|
||||
|
||||
/** 目录类别 */
|
||||
private Integer categoryEnum;
|
||||
private String categoryCode;
|
||||
|
||||
/** 编码 */
|
||||
private String busNo;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class DeviceRequest extends HisBaseEntity {
|
||||
private String prescriptionNo;
|
||||
|
||||
/** 相关诊疗项目 */
|
||||
private Integer activityId;
|
||||
private Long activityId;
|
||||
|
||||
/** 组套id */
|
||||
private Long packageId;
|
||||
@@ -82,6 +82,9 @@ public class DeviceRequest extends HisBaseEntity {
|
||||
/** 默认器材房 */
|
||||
private Long locationId;
|
||||
|
||||
/** 发放耗材房 */
|
||||
private Long performLocation;
|
||||
|
||||
/** 就诊id */
|
||||
private Long encounterId;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ServiceRequest extends HisBaseEntity {
|
||||
private Long activityId;
|
||||
|
||||
/** 数量 */
|
||||
private BigDecimal quantity;
|
||||
private Integer quantity;
|
||||
|
||||
/** 单位 */
|
||||
private String unitCode;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.openhis.workflow.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.workflow.domain.DeviceDispense;
|
||||
|
||||
@@ -11,4 +13,11 @@ import com.openhis.workflow.domain.DeviceDispense;
|
||||
*/
|
||||
public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
|
||||
/**
|
||||
* 更新未发放耗材状态:停止发放
|
||||
*
|
||||
* @param devDisIdList 发放id列表
|
||||
* @param refund 停止原因:退费
|
||||
*/
|
||||
void updateStopDispenseStatus(List<Long> devDisIdList, Integer refund);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.openhis.workflow.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.workflow.domain.ServiceRequest;
|
||||
|
||||
@@ -12,13 +13,18 @@ import com.openhis.workflow.domain.ServiceRequest;
|
||||
*/
|
||||
public interface IServiceRequestService extends IService<ServiceRequest> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询服务申请管理中basedOnId相同的个数
|
||||
*
|
||||
* @param basedOnId 请求基于什么的ID
|
||||
* @return basedOnId相同的个数
|
||||
*/
|
||||
Long countServiceRequestByBasedOnId(Long basedOnId) ;
|
||||
Long countServiceRequestByBasedOnId(Long basedOnId);
|
||||
|
||||
/**
|
||||
* 更新执行诊疗状态:停止
|
||||
*
|
||||
* @param serReqIdList 服务请求id列表
|
||||
*/
|
||||
void updateStopRequestStatus(List<Long> serReqIdList);
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.openhis.workflow.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.common.enums.DispenseStatus;
|
||||
import com.openhis.workflow.domain.DeviceDispense;
|
||||
import com.openhis.workflow.mapper.DeviceDispenseMapper;
|
||||
import com.openhis.workflow.service.IDeviceDispenseService;
|
||||
@@ -14,6 +18,19 @@ import com.openhis.workflow.service.IDeviceDispenseService;
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper, DeviceDispense> implements IDeviceDispenseService {
|
||||
public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper, DeviceDispense>
|
||||
implements IDeviceDispenseService {
|
||||
|
||||
/**
|
||||
* 更新未发放耗材状态:停止发放
|
||||
*
|
||||
* @param devDisIdList 发放id列表
|
||||
* @param refund 停止原因:退费
|
||||
*/
|
||||
@Override
|
||||
public void updateStopDispenseStatus(List<Long> devDisIdList, Integer refund) {
|
||||
baseMapper.update(
|
||||
new DeviceDispense().setStatusEnum(DispenseStatus.STOPPED.getValue()).setNotPerformedReasonEnum(refund),
|
||||
new LambdaUpdateWrapper<DeviceDispense>().in(DeviceDispense::getId, devDisIdList));
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.openhis.workflow.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.common.enums.RequestStatus;
|
||||
import com.openhis.workflow.domain.ServiceRequest;
|
||||
import com.openhis.workflow.mapper.ServiceRequestMapper;
|
||||
import com.openhis.workflow.service.IServiceRequestService;
|
||||
@@ -20,9 +22,6 @@ import com.openhis.workflow.service.IServiceRequestService;
|
||||
public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper, ServiceRequest>
|
||||
implements IServiceRequestService {
|
||||
|
||||
@Autowired
|
||||
private ServiceRequestMapper serviceRequestMapper;
|
||||
|
||||
/**
|
||||
* 查询服务申请管理中basedOnId相同的个数
|
||||
*
|
||||
@@ -33,6 +32,17 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
public Long countServiceRequestByBasedOnId(Long basedOnId) {
|
||||
LambdaQueryWrapper<ServiceRequest> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ServiceRequest::getBasedOnId, basedOnId);
|
||||
return serviceRequestMapper.selectCount(queryWrapper);
|
||||
return baseMapper.selectCount(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新执行诊疗状态:停止
|
||||
*
|
||||
* @param serReqIdList 服务请求id列表
|
||||
*/
|
||||
@Override
|
||||
public void updateStopRequestStatus(List<Long> serReqIdList) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.STOPPED.getValue()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList));
|
||||
}
|
||||
}
|
||||
@@ -53,10 +53,10 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<SupplyRequest> agreeRequest(String busNo, LoginUser loginUser, Date now) {
|
||||
// 更新单据状态
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, now).set(SupplyRequest::getApproverId, loginUser.getUserId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.AGREE.getValue()));
|
||||
baseMapper.update(
|
||||
new SupplyRequest().setApprovalTime(now).setApproverId(loginUser.getPractitionerId())
|
||||
.setStatusEnum(SupplyStatus.AGREE.getValue()),
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
// 返回单据详情
|
||||
return this.getSupplyByBusNo(busNo);
|
||||
}
|
||||
@@ -69,10 +69,9 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
*/
|
||||
@Override
|
||||
public boolean submitApproval(String busNo) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.APPROVAL.getValue())
|
||||
.set(SupplyRequest::getApplyTime, DateUtils.getNowDate()));
|
||||
int updateCount = baseMapper.update(
|
||||
new SupplyRequest().setApplyTime(DateUtils.getNowDate()).setStatusEnum(SupplyStatus.APPROVAL.getValue()),
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -84,8 +83,8 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
*/
|
||||
@Override
|
||||
public boolean withdrawApproval(String busNo) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>()
|
||||
.eq(SupplyRequest::getBusNo, busNo).set(SupplyRequest::getStatusEnum, SupplyStatus.WITHDRAW.getValue()));
|
||||
int updateCount = baseMapper.update(new SupplyRequest().setStatusEnum(SupplyStatus.WITHDRAW.getValue()),
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -99,10 +98,10 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean rejectRequest(String busNo, LoginUser loginUser, Date now) {
|
||||
// 更新单据状态
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, now).set(SupplyRequest::getApproverId, loginUser.getUserId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.REJECT.getValue()));
|
||||
int updateCount = baseMapper.update(
|
||||
new SupplyRequest().setApprovalTime(now).setApproverId(loginUser.getPractitionerId())
|
||||
.setStatusEnum(SupplyStatus.REJECT.getValue()),
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.administration.mapper.BizUserMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.administration.mapper.BizUserRoleMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user