Selaa lähdekoodia

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	common/common-entity/sql记录
yeshijie 3 vuotta sitten
vanhempi
commit
ccebae5a7b

+ 29 - 1
common/common-entity/sql记录

@ -1433,4 +1433,32 @@ CREATE TABLE `device_data_push_log` (
) ENGINE=InnoDB AUTO_INCREMENT=449 DEFAULT CHARSET=utf8mb4 COMMENT='设备项目推送数据日志';
) ENGINE=InnoDB AUTO_INCREMENT=449 DEFAULT CHARSET=utf8mb4 COMMENT='设备项目推送数据日志';
--2021-09-07
--2021-09-07
alter table base_patient modify column archive_type  tinyint(2) DEFAULT NULL COMMENT '档案类型 1老人 2新生儿';
alter table base_patient modify column archive_type  tinyint(2) DEFAULT NULL COMMENT '档案类型 1老人 2新生儿';
CREATE TABLE `base_doctor_service_permissions` (
  `id` varchar(50) NOT NULL,
  `org_code` varchar(50) DEFAULT NULL,
  `org_name` varchar(50) DEFAULT NULL,
  `doctor` varchar(50) DEFAULT NULL,
  `doctor_name` varchar(50) DEFAULT NULL,
  `service1` tinyint(1) DEFAULT NULL,
  `service2` tinyint(1) DEFAULT NULL,
  `service3` tinyint(1) DEFAULT NULL,
  `service4` tinyint(1) DEFAULT NULL,
  `service5` tinyint(1) DEFAULT NULL,
  `service6` tinyint(1) DEFAULT NULL,
  `service7` tinyint(1) DEFAULT NULL,
  `service8` tinyint(1) DEFAULT NULL,
  `service9` tinyint(1) DEFAULT NULL,
  `service10` tinyint(1) DEFAULT NULL,
  `service11` tinyint(1) DEFAULT NULL,
  `service12` tinyint(1) DEFAULT NULL,
  `service13` tinyint(1) DEFAULT NULL,
  `service14` tinyint(1) DEFAULT NULL,
  `service15` tinyint(1) DEFAULT NULL,
  `service16` tinyint(1) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index1` (`doctor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生服务权限表';

+ 224 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/care/common/DoctorServicePermissionsDO.java

@ -0,0 +1,224 @@
package com.yihu.jw.entity.care.common;
import com.yihu.jw.entity.UuidIdentityEntityWithCreateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created with IntelliJ IDEA.
 * 医生服务权限表
 * @Author: yeshijie
 * @Date: 2021/9/7
 * @Description:
 */
@Entity
@Table(name="base_doctor_service_permissions")
public class DoctorServicePermissionsDO extends UuidIdentityEntityWithCreateTime{
    private String orgCode;
    private String orgName;
    private String doctor;
    private String doctorName;
    /**
     * 1有权限 0无权限
     * 1签约管理
     2待办工作
     3我的评价
     4我的居民
     5代预约
     6能力评估
     7生活照料
     8紧急救助
     9人文关怀
     10安防监护
     11我的服务
     12通讯录
     */
    private Integer sevice1;
    private Integer sevice2;
    private Integer sevice3;
    private Integer sevice4;
    private Integer sevice5;
    private Integer sevice6;
    private Integer sevice7;
    private Integer sevice8;
    private Integer sevice9;
    private Integer sevice10;
    private Integer sevice11;
    private Integer sevice12;
    /**
     * 备用字段
     */
    private Integer sevice13;
    private Integer sevice14;
    private Integer sevice15;
    private Integer sevice16;
    @Column(name = "org_code")
    public String getOrgCode() {
        return orgCode;
    }
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
    @Column(name = "org_name")
    public String getOrgName() {
        return orgName;
    }
    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }
    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }
    @Column(name = "sevice1")
    public Integer getSevice1() {
        return sevice1;
    }
    public void setSevice1(Integer sevice1) {
        this.sevice1 = sevice1;
    }
    @Column(name = "sevice2")
    public Integer getSevice2() {
        return sevice2;
    }
    public void setSevice2(Integer sevice2) {
        this.sevice2 = sevice2;
    }
    @Column(name = "sevice3")
    public Integer getSevice3() {
        return sevice3;
    }
    public void setSevice3(Integer sevice3) {
        this.sevice3 = sevice3;
    }
    @Column(name = "sevice4")
    public Integer getSevice4() {
        return sevice4;
    }
    public void setSevice4(Integer sevice4) {
        this.sevice4 = sevice4;
    }
    @Column(name = "sevice5")
    public Integer getSevice5() {
        return sevice5;
    }
    public void setSevice5(Integer sevice5) {
        this.sevice5 = sevice5;
    }
    @Column(name = "sevice6")
    public Integer getSevice6() {
        return sevice6;
    }
    public void setSevice6(Integer sevice6) {
        this.sevice6 = sevice6;
    }
    @Column(name = "sevice7")
    public Integer getSevice7() {
        return sevice7;
    }
    public void setSevice7(Integer sevice7) {
        this.sevice7 = sevice7;
    }
    @Column(name = "sevice8")
    public Integer getSevice8() {
        return sevice8;
    }
    public void setSevice8(Integer sevice8) {
        this.sevice8 = sevice8;
    }
    @Column(name = "sevice9")
    public Integer getSevice9() {
        return sevice9;
    }
    public void setSevice9(Integer sevice9) {
        this.sevice9 = sevice9;
    }
    @Column(name = "sevice10")
    public Integer getSevice10() {
        return sevice10;
    }
    public void setSevice10(Integer sevice10) {
        this.sevice10 = sevice10;
    }
    @Column(name = "sevice11")
    public Integer getSevice11() {
        return sevice11;
    }
    public void setSevice11(Integer sevice11) {
        this.sevice11 = sevice11;
    }
    @Column(name = "sevice12")
    public Integer getSevice12() {
        return sevice12;
    }
    public void setSevice12(Integer sevice12) {
        this.sevice12 = sevice12;
    }
    @Column(name = "sevice13")
    public Integer getSevice13() {
        return sevice13;
    }
    public void setSevice13(Integer sevice13) {
        this.sevice13 = sevice13;
    }
    @Column(name = "sevice14")
    public Integer getSevice14() {
        return sevice14;
    }
    public void setSevice14(Integer sevice14) {
        this.sevice14 = sevice14;
    }
    @Column(name = "sevice15")
    public Integer getSevice15() {
        return sevice15;
    }
    public void setSevice15(Integer sevice15) {
        this.sevice15 = sevice15;
    }
    @Column(name = "sevice16")
    public Integer getSevice16() {
        return sevice16;
    }
    public void setSevice16(Integer sevice16) {
        this.sevice16 = sevice16;
    }
}

+ 17 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/doctor/DoctorServicePermissionsDao.java

@ -0,0 +1,17 @@
package com.yihu.jw.base.dao.doctor;
import com.yihu.jw.entity.care.common.DoctorServicePermissionsDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/9/7
 * @Description:
 */
public interface DoctorServicePermissionsDao extends PagingAndSortingRepository<DoctorServicePermissionsDO, String>, JpaSpecificationExecutor<DoctorServicePermissionsDO> {
}

+ 97 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/doctor/DoctorServicePermissionsEndpoint.java

@ -0,0 +1,97 @@
package com.yihu.jw.base.endpoint.doctor;
import com.yihu.jw.base.service.doctor.DoctorServicePermissionsService;
import com.yihu.jw.entity.care.common.DoctorServicePermissionsDO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/9/7
 * @Description:
 */
@RestController
@RequestMapping(value = "doctorServicePermissions",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "医生服务权限管理", description = "医生服务权限管理", tags = {"wlyy基础服务 - 医生服务权限管理"})
public class DoctorServicePermissionsEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private DoctorServicePermissionsService permissionsService;
    @PostMapping(value = "create")
    @ApiOperation(value = "创建")
    public ObjEnvelop<DoctorServicePermissionsDO> create (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        DoctorServicePermissionsDO permissionsDO = toEntity(jsonData, DoctorServicePermissionsDO.class);
        permissionsDO = permissionsService.save(permissionsDO);
        return success(permissionsDO);
    }
    @PostMapping(value = "delete")
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        permissionsService.delete(ids.split(","));
        return success("删除成功");
    }
    @PostMapping(value = "update")
    @ApiOperation(value = "更新")
    public ObjEnvelop<DoctorServicePermissionsDO> update (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        DoctorServicePermissionsDO permissionsDO = toEntity(jsonData, DoctorServicePermissionsDO.class);
        if (null == permissionsDO.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        permissionsDO = permissionsService.save(permissionsDO);
        return success(permissionsDO);
    }
    @GetMapping(value = "page")
    @ApiOperation(value = "获取分页")
    public PageEnvelop<DoctorServicePermissionsDO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<DoctorServicePermissionsDO> permissionsDOs = permissionsService.search(fields, filters, sorts, page, size);
        int count = (int)permissionsService.getCount(filters);
        return success(permissionsDOs, count, page, size, DoctorServicePermissionsDO.class);
    }
    @GetMapping(value = "list")
    @ApiOperation(value = "获取列表")
    public ListEnvelop<DoctorServicePermissionsDO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<DoctorServicePermissionsDO> permissionsDOs = permissionsService.search(fields, filters, sorts);
        return success(permissionsDOs, DoctorServicePermissionsDO.class);
    }
}

+ 23 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/DoctorServicePermissionsService.java

@ -0,0 +1,23 @@
package com.yihu.jw.base.service.doctor;
import com.yihu.jw.base.dao.doctor.DoctorServicePermissionsDao;
import com.yihu.jw.entity.care.common.DoctorServicePermissionsDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/9/7
 * @Description:
 */
@Service
public class DoctorServicePermissionsService  extends BaseJpaService<DoctorServicePermissionsDO, DoctorServicePermissionsDao> {
    @Autowired
    private DoctorServicePermissionsDao doctorServicePermissionsDao;
}