This commit is contained in:
ZhangYingJie 2025-04-17 16:17:34 +08:00
parent afbbbb485f
commit a70872d9c2
20 changed files with 587 additions and 1 deletions

View File

@ -0,0 +1,12 @@
package com.syjiaer.clinic.server.common.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface NotNull {
String value() default "字段不能为空";
}

View File

@ -0,0 +1,55 @@
package com.syjiaer.clinic.server.entity.item;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <p>
*
* </p>
*
* @author NiuZiYuan
* @since 2025-04-17
*/
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("item_group")
@ApiModel(value = "ItemGroup对象", description = "")
public class ItemGroup implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("自增主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("项目名称")
private String name;
@ApiModelProperty("售价")
private BigDecimal unitPrice;
@ApiModelProperty("进货价")
private BigDecimal purchaseUnitPrice;
@ApiModelProperty("诊疗项目(小)")
private String itemJson;
@ApiModelProperty("商品表ids")
private String goodsIds;
@ApiModelProperty("逻辑删除")
private Integer delFlag;
}

View File

@ -0,0 +1,17 @@
package com.syjiaer.clinic.server.entity.item.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class ItemGroupParam {
@ApiModelProperty("项目分组id")
private Integer id;
@ApiModelProperty("项目名称")
private String name;
@ApiModelProperty("项目ids")
private List<Integer> ids;
}

View File

@ -0,0 +1,78 @@
package com.syjiaer.clinic.server.entity.organization;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.syjiaer.clinic.server.common.annotations.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 成员表
* </p>
*
* @author NiuZiYuan
* @since 2025-04-11
*/
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("organization_member")
@ApiModel(value = "OrganizationMember对象", description = "成员表")
public class OrganizationMember implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("自增主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("成员名称")
@NotNull("请输入姓名")
private String name;
@ApiModelProperty("成员电话")
@NotNull("请输入手机号")
private String tel;
@ApiModelProperty("医保人员代码")
private String socialMemberCode;
@ApiModelProperty("0 医生 1 护士 2 ")
@NotNull("请输入角色")
private Integer role;
@ApiModelProperty("电子签名")
@NotNull("请上传电子签名")
private String electronicSignature;
@ApiModelProperty("性别")
private String gender;
@ApiModelProperty("年龄")
private String age;
@ApiModelProperty("创建时间")
private LocalDateTime createDatetime;
@ApiModelProperty("身份证号")
private String idCardNumber;
@ApiModelProperty("所属科室")
@NotNull("请输入所属科室")
private Integer sectionId;
@ApiModelProperty("备注")
private String memo;
@ApiModelProperty("逻辑删除")
private Integer delFlag;
}

View File

@ -0,0 +1,106 @@
package com.syjiaer.clinic.server.entity.organization;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.syjiaer.clinic.server.common.annotations.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* <p>
* 科室
* </p>
*
* @author NiuZiYuan
* @since 2025-04-09
*/
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("organization_section")
@ApiModel(value = "OrganizationSection对象", description = "科室")
public class OrganizationSection implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("自增主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("科室编码")
private String code;
@ApiModelProperty("科室名称")
@NotNull("请输入科室名称")
private String name;
@ApiModelProperty("科别")
@NotNull("请输入科别")
private String caty;
@ApiModelProperty("开始日期")
@NotNull("请输入开始日期")
private LocalDate beginDate;
@ApiModelProperty("结束日期")
private LocalDate endDate;
@ApiModelProperty("简介")
private String info;
@ApiModelProperty("负责人姓名")
@NotNull("请输入负责人姓名")
private String resperName;
@ApiModelProperty("负责人电话")
@NotNull("请输入负责人电话")
private String resperTel;
@ApiModelProperty("医疗服务范围")
private String medServScp;
@ApiModelProperty("成立时间")
@NotNull("请输入成立时间")
private LocalDate creationDate;
@ApiModelProperty("批准床位数量")
@NotNull("请输入批准床位数量")
private Integer bedCnt;
@ApiModelProperty("医保认可床位数量")
private Integer socialBedCnt;
@ApiModelProperty("医师人数")
@NotNull("请输入医师人数")
private Integer drPsncnt;
@ApiModelProperty("药师人数")
@NotNull("请输入药师人数")
private Integer pharPsncnt;
@ApiModelProperty("护士人数")
@NotNull("请输入护士人数")
private Integer nursPsncnt;
@ApiModelProperty("技师人数")
@NotNull("请输入技师人数")
private Integer tecnPsncnt ;
@ApiModelProperty("备注")
private String memo;
@ApiModelProperty("逻辑删除")
private Integer delFlag;
@ApiModelProperty("创建时间")
private LocalDateTime createDatetime;
}

View File

@ -0,0 +1,18 @@
package com.syjiaer.clinic.server.mapper.item;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.syjiaer.clinic.server.entity.item.ItemGroup;
/**
* <p>
* Mapper 接口
* </p>
*
* @author NiuZiYuan
* @since 2025-04-17
*/
public interface ItemGroupMapper extends BaseMapper<ItemGroup> {
}

View File

@ -0,0 +1,18 @@
package com.syjiaer.clinic.server.mapper.organization;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
/**
* <p>
* 成员表 Mapper 接口
* </p>
*
* @author NiuZiYuan
* @since 2025-04-11
*/
public interface OrganizationMemberMapper extends BaseMapper<OrganizationMember> {
}

View File

@ -0,0 +1,18 @@
package com.syjiaer.clinic.server.mapper.organization;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
/**
* <p>
* 科室 Mapper 接口
* </p>
*
* @author NiuZiYuan
* @since 2025-04-09
*/
public interface OrganizationSectionMapper extends BaseMapper<OrganizationSection> {
}

View File

@ -0,0 +1,106 @@
package com.syjiaer.clinic.server.service.item;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.syjiaer.clinic.server.common.exception.MessageException;
import com.syjiaer.clinic.server.common.vo.Page;
import com.syjiaer.clinic.server.common.vo.Result;
import com.syjiaer.clinic.server.entity.item.Item;
import com.syjiaer.clinic.server.entity.item.ItemGroup;
import com.syjiaer.clinic.server.entity.item.param.ItemGroupParam;
import com.syjiaer.clinic.server.mapper.item.ItemGroupMapper;
import com.syjiaer.clinic.server.mapper.item.ItemMapper;
import com.syjiaer.clinic.server.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.List;
@Service
public class ItemGroupService extends BaseService {
@Autowired
private ItemMapper itemMapper;
@Autowired
private ItemGroupMapper itemGroupMapper;
/*
* 获取项目组列表
* @param pageNum 页码
* @param pageSize 页面大小
* @param name 项目组名称
*/
public Page<ItemGroup> getItemGroupList(int pageNum, int pageSize, String name) {
QueryWrapper<ItemGroup> queryWrapper = new QueryWrapper<>();
if (name != null && !name.isEmpty()) {
queryWrapper.like("name", name);
}
queryWrapper.eq("del_flag", 0);
return pageHelper(pageNum, pageSize, queryWrapper, itemGroupMapper);
}
/*
* 获取项目组详情
* @param id 项目组id
*/
public ItemGroup getItemGroupById(int id) {
return itemGroupMapper.selectById(id);
}
/*
* 保存/修改项目组
* @param itemGroupParam 项目组参数
*/
public void saveItemGroup(ItemGroupParam itemGroupParam) {
if(itemGroupParam == null || itemGroupParam.getIds() ==null || itemGroupParam.getIds().isEmpty()){
throw new MessageException("ids不能为空");
}
ItemGroup itemGroup = getItemGroup(itemGroupParam);
if (itemGroupParam.getId() != null) {
itemGroup.setId(itemGroupParam.getId());
itemGroupMapper.updateById(itemGroup);
}
itemGroupMapper.insert(itemGroup);
}
/*
* 获取项目组
* @param itemGroupParam 项目组参数
*/
private ItemGroup getItemGroup(ItemGroupParam itemGroupParam) {
ItemGroup itemGroup = new ItemGroup();
BigDecimal unitPrice = new BigDecimal(0);
BigDecimal purchaseUnitPrice = new BigDecimal(0);
itemGroup.setName(itemGroupParam.getName());
List<Integer> ids = itemGroupParam.getIds();
QueryWrapper<Item> queryWrapper = new QueryWrapper<>();
queryWrapper.in("id", ids).eq("del_flag", 0);
List<Item> list = itemMapper.selectList(queryWrapper);
JSONArray jsonArray = new JSONArray();
for (Item item : list) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("id", item.getId());
jsonObject.put("name", item.getItemName());
jsonObject.put("unit", item.getUnit());
jsonObject.put("itemSocialCode", item.getItemSocialCode());
jsonObject.put("unitPrice", item.getUnitPrice());
jsonObject.put("purchaseUnitPrice", item.getPurchaseUnitPrice());
unitPrice = unitPrice.add(item.getUnitPrice());
purchaseUnitPrice = purchaseUnitPrice.add(item.getPurchaseUnitPrice());
jsonArray.add(jsonObject);
}
itemGroup.setItemJson(jsonArray.toJSONString());
itemGroup.setUnitPrice(unitPrice);
itemGroup.setPurchaseUnitPrice(purchaseUnitPrice);
return itemGroup;
}
/*
* 删除项目组
* @param id 项目组id
*/
public void delete(int id) {
ItemGroup itemGroup = itemGroupMapper.selectById(id);
if(itemGroup ==null){
throw new MessageException("id不存在");
}
itemGroup.setDelFlag(1);
itemGroupMapper.updateById(itemGroup);
}
}

View File

@ -0,0 +1,70 @@
package com.syjiaer.clinic.server.service.item;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.syjiaer.clinic.server.common.exception.MessageException;
import com.syjiaer.clinic.server.common.vo.Page;
import com.syjiaer.clinic.server.common.vo.Result;
import com.syjiaer.clinic.server.entity.item.Item;
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
import com.syjiaer.clinic.server.mapper.item.ItemMapper;
import com.syjiaer.clinic.server.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
@Service
public class ItemService extends BaseService {
@Autowired
private ItemMapper itemMapper;
/*
* 获取项目列表
* @param pageNum 页码
* @param pageSize 页面大小
* @param name 项目名称
* @param tel 手机号
*/
public Page<Item> getItemList(int pageNum, int pageSize, String name, String tel) {
QueryWrapper<Item> queryWrapper = new QueryWrapper<>();
if (name != null && !name.isEmpty()) {
queryWrapper.like("name", name);
}
if (tel != null && !tel.isEmpty()) {
queryWrapper.eq("tel", tel);
}
queryWrapper.eq("del_flag", 0);
return pageHelper(pageNum, pageSize, queryWrapper, itemMapper);
}
/*
* 根据id获取项目信息
* @param id 项目id
*/
public Item getItemById(int id) {
return itemMapper.selectById(id);
}
/*
* 创建项目
* @param item 项目信息
*/
public void createItem(Item item) {
if (item == null) {
throw new MessageException("item参数为空");
}
ManagerUser managerUser = getManagerUser();
item.setCreateDatetime(LocalDateTime.now());
item.setCreateBy(managerUser.getName());
itemMapper.insert(item);
}
/*
* 更新项目信息
* @param item 项目信息
*/
public void updateItem(Item item) {
if (item == null) {
throw new MessageException("item参数为空");
}
item.setUpdateBy(getManagerUser().getName());
item.setUpdateDatetime(LocalDateTime.now());
itemMapper.updateById(item);
}
}

View File

@ -0,0 +1,37 @@
package com.syjiaer.clinic.server.service.organization;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.syjiaer.clinic.server.common.exception.MessageException;
import com.syjiaer.clinic.server.common.vo.Page;
import com.syjiaer.clinic.server.common.vo.Result;
import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
import com.syjiaer.clinic.server.mapper.organization.OrganizationMemberMapper;
import com.syjiaer.clinic.server.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class OrganizationMemberService extends BaseService {
@Autowired
private OrganizationMemberMapper organizationMemberMapper;
public Page<OrganizationMember> list(int pageNum, int pageSize, String name, String tel) {
QueryWrapper<OrganizationMember> queryWrapper = new QueryWrapper<>();
if (name != null && !name.isEmpty()) {
queryWrapper.like("name", name);
}
if (tel != null && !tel.isEmpty()) {
queryWrapper.eq("tel", tel);
}
queryWrapper.eq("del_flag", 0);
Page<OrganizationMember> pageResult = pageHelper(pageNum, pageSize, queryWrapper, organizationMemberMapper);
return pageResult;
}
public Result<?> add() {
OrganizationMember organizationMember = parmsUtil.getObjectWithCheck("data", OrganizationMember.class);
if(organizationMember ==null){
throw new MessageException("data参数为空");
}
iOrganizationMemberService.add(organizationMember);
return success();
}
}

View File

@ -23,6 +23,11 @@ public class SocialDirectoryLimitService {
private SocialRequest socialRequest; private SocialRequest socialRequest;
@Autowired @Autowired
private SocialDirectoryLimitMapper socialDirectoryLimitMapper; private SocialDirectoryLimitMapper socialDirectoryLimitMapper;
/*
* 获取医保限价数据
* @param updtTime 更新时间
* @param page 页码
*/
public Map<String, Object> getInfo(String updtTime, int page) { public Map<String, Object> getInfo(String updtTime, int page) {
if (updtTime == null || updtTime.trim().isEmpty()) { if (updtTime == null || updtTime.trim().isEmpty()) {
// 处理参数为空的情况这里假设返回一个错误结果 // 处理参数为空的情况这里假设返回一个错误结果

View File

@ -23,6 +23,11 @@ public class SocialDirectorySelfService {
private SocialRequest socialRequest; private SocialRequest socialRequest;
@Autowired @Autowired
private SocialDirectorySelfMapper socialDirectorySelfMapper; private SocialDirectorySelfMapper socialDirectorySelfMapper;
/*
* 获取自费比例信息
* @param updtTime 更新时间
* @param page 页码
*/
public Map<String, Object> getInfo(String updtTime, int page) { public Map<String, Object> getInfo(String updtTime, int page) {
if (updtTime == null) { if (updtTime == null) {
throw new MessageException("updtTime不能为空"); throw new MessageException("updtTime不能为空");

View File

@ -27,7 +27,12 @@ public class SocialDirectoryUpinfoService {
private Logger logger = Logger.getLogger(this.getClass().getName()); private Logger logger = Logger.getLogger(this.getClass().getName());
public Map<String, Object> getInfo(String updtTime, int page_num) { /*
* 获取医保有效期信息
* @param updtTime 更新时间
* @param page_num 页码
*/
public Map<String, Object> getSocialDirectoryUpinfoInfo(String updtTime, int page_num) {
if (updtTime == null) { if (updtTime == null) {
throw new MessageException("updtTime不能为空"); throw new MessageException("updtTime不能为空");
} }

View File

@ -16,6 +16,10 @@ public class SocialDirectoryVersionService {
@Autowired @Autowired
private SocialDirectoryVersionMapper socialDirectoryVersionMapper; private SocialDirectoryVersionMapper socialDirectoryVersionMapper;
/*
* 获取当前版本
* @param type 类型
*/
public SocialDirectoryVersion getCurrent(int type) { public SocialDirectoryVersion getCurrent(int type) {
Integer[] type_list = {1301, 1302, 1305, 1306, 1307, 1309, 1314, 1315, 1320, 1321}; Integer[] type_list = {1301, 1302, 1305, 1306, 1307, 1309, 1314, 1315, 1320, 1321};
//判断type在数组中 //判断type在数组中
@ -41,6 +45,12 @@ public class SocialDirectoryVersionService {
return socialDirectoryVersion; return socialDirectoryVersion;
} }
/*
* 获取版本列表
* @param pageNum 页码
* @param pageSize 每页数量
* @param type 类型
*/
public Page<SocialDirectoryVersion> list(int pageNum, int pageSize, int type) { public Page<SocialDirectoryVersion> list(int pageNum, int pageSize, int type) {
Integer[] type_list = {1301, 1302, 1305, 1306, 1307, 1309}; Integer[] type_list = {1301, 1302, 1305, 1306, 1307, 1309};
//判断type在数组中 //判断type在数组中

View File

@ -0,0 +1,7 @@
package com.syjiaer.clinic.server.service.social;
import org.springframework.stereotype.Service;
@Service
public class SocialUploadService {
}

View File

@ -19,6 +19,10 @@ public class SocialUserService {
private SocialRequest socialRequest; private SocialRequest socialRequest;
@Autowired @Autowired
private SocialUserMapper socialUserMapper; private SocialUserMapper socialUserMapper;
/*
* 获取社保信息
* @param im1101
*/
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public OM1101 getCustomSocialInfo(IM1101 im1101) { public OM1101 getCustomSocialInfo(IM1101 im1101) {
if (im1101 == null) { if (im1101 == null) {

View File

@ -0,0 +1,5 @@
<?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.syjiaer.clinic.server.mapper.item.ItemGroupMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.syjiaer.clinic.server.mapper.organization.OrganizationMemberMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper">
</mapper>