dev
This commit is contained in:
parent
d18f956331
commit
8a68ede5a4
|
|
@ -2,6 +2,8 @@ package com.syjiaer.clinic.server.common.util;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
|
@ -9,4 +11,18 @@ public class StringUtil {
|
||||||
public String generateRandomId() {
|
public String generateRandomId() {
|
||||||
return UUID.randomUUID().toString();
|
return UUID.randomUUID().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCode(String tag) {
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|
||||||
|
// 定义日期时间格式
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
|
||||||
|
|
||||||
|
// 格式化日期时间为字符串
|
||||||
|
String formattedDateTime = now.format(formatter);
|
||||||
|
|
||||||
|
|
||||||
|
String code = tag+formattedDateTime;
|
||||||
|
return code;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,23 +3,21 @@ package com.syjiaer.clinic.server.entity.organization;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.syjiaer.clinic.server.common.annotations.NotNull;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 成员表
|
* 成员表
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author NiuZiYuan
|
* @author NiuZiYuan
|
||||||
* @since 2025-04-11
|
* @since 2025-04-17
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|
@ -36,22 +34,18 @@ public class OrganizationMember implements Serializable {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
@ApiModelProperty("成员名称")
|
@ApiModelProperty("成员名称")
|
||||||
@NotNull("请输入姓名")
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty("成员电话")
|
@ApiModelProperty("成员电话")
|
||||||
@NotNull("请输入手机号")
|
|
||||||
private String tel;
|
private String tel;
|
||||||
|
|
||||||
@ApiModelProperty("医保人员代码")
|
@ApiModelProperty("医保人员代码")
|
||||||
private String socialMemberCode;
|
private String socialMemberCode;
|
||||||
|
|
||||||
@ApiModelProperty("0 医生 1 护士 2 ")
|
@ApiModelProperty("0 医生 1 护士 2 ")
|
||||||
@NotNull("请输入角色")
|
|
||||||
private Integer role;
|
private Integer role;
|
||||||
|
|
||||||
@ApiModelProperty("电子签名")
|
@ApiModelProperty("电子签名")
|
||||||
@NotNull("请上传电子签名")
|
|
||||||
private String electronicSignature;
|
private String electronicSignature;
|
||||||
|
|
||||||
@ApiModelProperty("性别")
|
@ApiModelProperty("性别")
|
||||||
|
|
@ -67,12 +61,10 @@ public class OrganizationMember implements Serializable {
|
||||||
private String idCardNumber;
|
private String idCardNumber;
|
||||||
|
|
||||||
@ApiModelProperty("所属科室")
|
@ApiModelProperty("所属科室")
|
||||||
@NotNull("请输入所属科室")
|
|
||||||
private Integer sectionId;
|
private Integer sectionId;
|
||||||
|
|
||||||
@ApiModelProperty("备注")
|
@ApiModelProperty("备注")
|
||||||
private String memo;
|
private String memo;
|
||||||
|
|
||||||
@ApiModelProperty("逻辑删除")
|
private Boolean delFlag;
|
||||||
private Integer delFlag;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,22 @@ import com.syjiaer.clinic.server.service.BaseService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* 组织成员
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class OrganizationMemberService extends BaseService {
|
public class OrganizationMemberService extends BaseService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrganizationMemberMapper organizationMemberMapper;
|
private OrganizationMemberMapper organizationMemberMapper;
|
||||||
|
/*
|
||||||
|
* 获取成员列表
|
||||||
|
* @param pageNum 页码
|
||||||
|
* @param pageSize 每页数量
|
||||||
|
* @param name 姓名
|
||||||
|
* @param tel 电话
|
||||||
|
*/
|
||||||
public Page<OrganizationMember> list(int pageNum, int pageSize, String name, String tel) {
|
public Page<OrganizationMember> list(int pageNum, int pageSize, String name, String tel) {
|
||||||
QueryWrapper<OrganizationMember> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<OrganizationMember> queryWrapper = new QueryWrapper<>();
|
||||||
if (name != null && !name.isEmpty()) {
|
if (name != null && !name.isEmpty()) {
|
||||||
|
|
@ -26,12 +38,47 @@ public class OrganizationMemberService extends BaseService {
|
||||||
Page<OrganizationMember> pageResult = pageHelper(pageNum, pageSize, queryWrapper, organizationMemberMapper);
|
Page<OrganizationMember> pageResult = pageHelper(pageNum, pageSize, queryWrapper, organizationMemberMapper);
|
||||||
return pageResult;
|
return pageResult;
|
||||||
}
|
}
|
||||||
public Result<?> add() {
|
/*
|
||||||
OrganizationMember organizationMember = parmsUtil.getObjectWithCheck("data", OrganizationMember.class);
|
* 保存/修改成员信息
|
||||||
|
* @param organizationMember 成员信息
|
||||||
|
*/
|
||||||
|
public void save(OrganizationMember organizationMember) {
|
||||||
if(organizationMember ==null){
|
if(organizationMember ==null){
|
||||||
throw new MessageException("data参数为空");
|
throw new MessageException("data参数为空");
|
||||||
}
|
}
|
||||||
iOrganizationMemberService.add(organizationMember);
|
organizationMember.setCreateDatetime(LocalDateTime.now());
|
||||||
return success();
|
organizationMemberMapper.insertOrUpdate(organizationMember);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* 删除成员信息
|
||||||
|
* @param id 成员id
|
||||||
|
*/
|
||||||
|
public void delete(int id) {
|
||||||
|
OrganizationMember organizationMember = organizationMemberMapper.selectById(id);
|
||||||
|
if(organizationMember ==null){
|
||||||
|
throw new MessageException("id不存在");
|
||||||
|
}
|
||||||
|
organizationMember.setDelFlag(true);
|
||||||
|
organizationMemberMapper.updateById(organizationMember);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* 根据id获取成员信息
|
||||||
|
* @param id 成员id
|
||||||
|
*/
|
||||||
|
public OrganizationMember get(int id) {
|
||||||
|
QueryWrapper<OrganizationMember> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("del_flag", false).eq("id", id);
|
||||||
|
OrganizationMember organizationMember = organizationMemberMapper.selectOne(queryWrapper);
|
||||||
|
return organizationMember;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* 获取医生列表
|
||||||
|
*/
|
||||||
|
public List<OrganizationMember> doctorList() {
|
||||||
|
QueryWrapper<OrganizationMember> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("role", 0)
|
||||||
|
.eq("del_flag", false);
|
||||||
|
List<OrganizationMember> organizationMembers = organizationMemberMapper.selectList(queryWrapper);
|
||||||
|
return organizationMembers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
package com.syjiaer.clinic.server.service.organization;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||||
|
import com.syjiaer.clinic.server.common.util.StringUtil;
|
||||||
|
import com.syjiaer.clinic.server.common.vo.Page;
|
||||||
|
import com.syjiaer.clinic.server.common.vo.Result;
|
||||||
|
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
||||||
|
import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
||||||
|
import com.syjiaer.clinic.server.service.BaseService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 组织科室
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OrganizationSectionService extends BaseService {
|
||||||
|
@Autowired
|
||||||
|
private StringUtil stringUtil;
|
||||||
|
@Autowired
|
||||||
|
private OrganizationSectionMapper organizationSectionMapper;
|
||||||
|
|
||||||
|
public Page<OrganizationSection> list(int pageNum, int pageSize, String name, String caty, String resperName, String resperTel) {
|
||||||
|
QueryWrapper<OrganizationSection> queryWrapper = new QueryWrapper<>();
|
||||||
|
if (name != null && !name.isEmpty()) {
|
||||||
|
queryWrapper.like("name", name);
|
||||||
|
}
|
||||||
|
if (caty != null && !caty.isEmpty()) {
|
||||||
|
queryWrapper.eq("caty", caty);
|
||||||
|
}
|
||||||
|
if (resperName != null && !resperName.isEmpty()) {
|
||||||
|
queryWrapper.like("resper_name", resperName);
|
||||||
|
}
|
||||||
|
if (resperTel != null && !resperTel.isEmpty()) {
|
||||||
|
queryWrapper.eq("resper_tel", resperTel);
|
||||||
|
}
|
||||||
|
queryWrapper.eq("del_flag", 0);
|
||||||
|
Page<OrganizationSection> pageResult = pageHelper(pageNum, pageSize, queryWrapper, organizationSectionMapper);
|
||||||
|
return pageResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void save(OrganizationSection organizationSection) {
|
||||||
|
if (organizationSection == null) {
|
||||||
|
throw new MessageException("organizationSection参数为空");
|
||||||
|
}
|
||||||
|
if (organizationSection.getId() == null) {
|
||||||
|
organizationSection.setCreateDatetime(LocalDateTime.now());
|
||||||
|
//生成编码
|
||||||
|
organizationSection.setCode(stringUtil.getCode("S"));
|
||||||
|
}
|
||||||
|
organizationSectionMapper.insertOrUpdate(organizationSection);
|
||||||
|
}
|
||||||
|
public void delete(int id) {
|
||||||
|
QueryWrapper<OrganizationSection> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("del_flag", 0).eq("id", id);
|
||||||
|
OrganizationSection organizationSection = organizationSectionMapper.selectOne(queryWrapper);
|
||||||
|
if(organizationSection == null){
|
||||||
|
throw new MessageException("id不存在");
|
||||||
|
}
|
||||||
|
organizationSectionMapper.updateById(organizationSection);
|
||||||
|
}
|
||||||
|
public OrganizationSection get(int id) {
|
||||||
|
QueryWrapper<OrganizationSection> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("del_flag", 0).eq("id", id);
|
||||||
|
OrganizationSection organizationSection = organizationSectionMapper.selectOne(queryWrapper);
|
||||||
|
return organizationSection;
|
||||||
|
}
|
||||||
|
public List<JSONObject> allList() {
|
||||||
|
QueryWrapper<OrganizationSection> organizationSectionQueryWrapper = new QueryWrapper<>();
|
||||||
|
organizationSectionQueryWrapper.eq("del_flag", 0);
|
||||||
|
List<OrganizationSection> organizationSections = organizationSectionMapper.selectList(organizationSectionQueryWrapper);
|
||||||
|
List<JSONObject> list = organizationSections.stream().map(organizationSection -> {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("id", organizationSection.getId());
|
||||||
|
jsonObject.put("name", organizationSection.getName());
|
||||||
|
return jsonObject;
|
||||||
|
}).toList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,7 +16,9 @@ import java.time.format.DateTimeFormatter;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
/*
|
||||||
|
* 医保限价
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SocialDirectoryLimitService {
|
public class SocialDirectoryLimitService {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,9 @@ import java.time.format.DateTimeFormatter;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
/*
|
||||||
|
* 自付比例
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SocialDirectorySelfService {
|
public class SocialDirectorySelfService {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,9 @@ import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
/*
|
||||||
|
* 医保目录
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SocialDirectoryService extends BaseService {
|
public class SocialDirectoryService extends BaseService {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,9 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
/*
|
||||||
|
* 目录有效期
|
||||||
|
*/
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SocialDirectoryUpinfoService {
|
public class SocialDirectoryUpinfoService {
|
||||||
|
|
@ -31,7 +34,7 @@ public class SocialDirectoryUpinfoService {
|
||||||
* @param updtTime 更新时间
|
* @param updtTime 更新时间
|
||||||
* @param pageNum 页码
|
* @param pageNum 页码
|
||||||
*/
|
*/
|
||||||
public Map<String, Object> getInfo(String updtTime, int pageNum) {
|
public Map<String, Object> updateSocial(String updtTime, int pageNum) {
|
||||||
if (updtTime == null) {
|
if (updtTime == null) {
|
||||||
throw new MessageException("updtTime不能为空");
|
throw new MessageException("updtTime不能为空");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@ import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
/*
|
||||||
|
* 目录版本号日志
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SocialDirectoryVersionService {
|
public class SocialDirectoryVersionService {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package com.syjiaer.clinic.server.service.social;
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
/*
|
||||||
|
* 医保进销存上报
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SocialUploadService {
|
public class SocialInventoryUploadService {
|
||||||
}
|
}
|
||||||
|
|
@ -12,7 +12,9 @@ import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
/*
|
||||||
|
* 医保用户
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SocialUserService {
|
public class SocialUserService {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue