Browse Source

代码修改

LAPTOP-KB9HII50\70708 1 năm trước cách đây
mục cha
commit
e4ed3e624d

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/BaseBannerService.java

@ -72,7 +72,7 @@ public class BaseBannerService extends BaseJpaService<BaseBannerDO, BaseBannerDa
            map.put("update_time",DateUtil.dateToStrLong(DateUtil.strToDateLong(updateTime)));
            String bannerId = map.get("id").toString();
            String sqlId = "select t.id AS \"id\" from base_banner_doctor t where t.banner_id = '"+bannerId+"'";
            List<Map<String,Object>> listID=hibenateUtils.createSQLQuery(sqlId,0,1);
            List<Map<String,Object>> listID=hibenateUtils.createSQLQuery(sqlId,1,1);
            String bannerGiveId ="";
            if (listID.size()>0){
                bannerGiveId = listID.get(0).get("id").toString();

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -9899,7 +9899,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                "\tp.check_reason as \"checkReason\",\n" +
                "\tp.pay_type as \"payType\"\n" +
                "FROM\n" +
                "\twlyy_prescription P\n" +
                "\twlyy_prescription p\n" +
                "WHERE\n" +
                "\t1 = 1 and  p.check_status not in (3,4) ";
        Map<String, Object> params = new HashedMap();

+ 5 - 1
business/base-service/src/main/java/com/yihu/jw/team/service/TeamService.java

@ -174,7 +174,8 @@ public class TeamService {
    }
    //获取专科团队列表
    public Envelop getTeamList(String type,Integer adminTeamId,String teamName, String dept, Integer page, Integer pageSize, String hospital,String recommend, String recommendDoctorName) {
    public Envelop getTeamList(String type,Integer adminTeamId,String teamName, String dept, Integer page, Integer pageSize,
                               String hospital,String recommend, String recommendDoctor, String recommendDoctorName) {
        String countSql = " select count(t.id) ";
        String sql = "SELECT t.id,t.`name`,t.org_code orgCode,t.org_name orgName,t.dept,t.dept_name deptName,t.recommend_doctor recommendDoctor,d.photo," +
                "t.recommend_doctor_name recommendDoctorName,DATE_FORMAT(t.create_time,'%Y-%m-%d %H:%i:%S') createTime,t.intro,t.recommend,d.job_title_name jobTitleName ";
@ -195,6 +196,9 @@ public class TeamService {
        if(StringUtils.isNotEmpty(teamName)){
            filter += " and t.name like '%"+teamName+"%' ";
        }
        if(StringUtils.isNotEmpty(recommendDoctor)){
            filter += " and t.recommend_doctor = '"+recommendDoctor+"' ";
        }
        if(StringUtils.isNotEmpty(recommendDoctorName)){
            filter += " and t.recommend_doctor_name like '%"+recommendDoctorName+"%' ";
        }

+ 58 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/org/BaseCheckOrgDO.java

@ -0,0 +1,58 @@
package com.yihu.jw.entity.base.org;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by wsl on 2022/12/8
 */
@Entity
@Table(name = "base_check_org")
public class BaseCheckOrgDO extends IdEntity {
    /**
     * 机构code
     */
    private String orgcode;
    /**
     * 考核时间
     */
    private String checkDate;
    /**
     * 考核文件
     */
    private String checkFile;
    public String getOrgcode() {
        return orgcode;
    }
    public void setOrgcode(String orgcode) {
        this.orgcode = orgcode;
    }
    public String getCheckDate() {
        return checkDate;
    }
    public void setCheckDate(String checkDate) {
        this.checkDate = checkDate;
    }
    public String getCheckFile() {
        return checkFile;
    }
    public void setCheckFile(String checkFile) {
        this.checkFile = checkFile;
    }
}

+ 0 - 45
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java

@ -227,51 +227,6 @@ public abstract class EnvelopRestEndpoint extends BaseRestEndPoint {
        }else {
            return failed(e.getMessage(),-10000);
        }
       /* if (e.getClass().equals(DataAccessException.class)) {
            e.printStackTrace();//数据库操作失败
            return null;
        } else if (e.getClass().toString().equals(
                NullPointerException.class.toString())) {
            e.printStackTrace();
            //调用了未经初始化的对象或者是不存在的对象!
            return failed("空指针",170004);
        } else if (e.getClass().equals(IOException.class)) {
            e.printStackTrace();
            //IO异常!
            return null;
        } else if (e.getClass().equals(ClassNotFoundException.class)) {
            e.printStackTrace();//指定的类不存在!
            return null;
        } else if (e.getClass().equals(ArithmeticException.class)) {
            e.printStackTrace();//数学运算异常!
            return null;
        } else if (e.getClass().equals(ArrayIndexOutOfBoundsException.class)) {
            e.printStackTrace();
            //数组下标越界!
            return null;
        } else if (e.getClass().equals(IllegalArgumentException.class)) {
            e.printStackTrace();
            //方法的参数错误!
            return null;
        } else if (e.getClass().equals(ClassCastException.class)) {
            e.printStackTrace();//类型强制转换错误!
            return null;
        } else if (e.getClass().equals(SecurityException.class)) {
            e.printStackTrace();//违背安全原则异常!
            return null;
        } else if (e.getClass().equals(SQLException.class)) {
            e.printStackTrace();//操作数据库异常!
            return null;
        } else if (e.getClass().equals(NoSuchMethodError.class)) {
            e.printStackTrace();//方法末找到异常!
            return null;
        } else if (e.getClass().equals(InternalError.class)) {
            e.printStackTrace();//Java虚拟机发生了内部错误
            return null;
        } else {
            e.printStackTrace();//程序内部错误,操作失败!
            return null;
        }*/
    }
    protected MixEnvelop failedMixEnvelopException(Exception e){
        e.printStackTrace();

+ 11 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/org/BaseCheckOrgDao.java

@ -0,0 +1,11 @@
package com.yihu.jw.base.dao.org;
import com.yihu.jw.entity.base.org.BaseCheckOrgDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by wsl on 2022/12/8
 */
public interface BaseCheckOrgDao extends PagingAndSortingRepository<BaseCheckOrgDO, String>, JpaSpecificationExecutor<BaseCheckOrgDO> {
}

+ 3 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/dict/DictHospitalDeptEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.base.endpoint.dict;
import com.yihu.jw.base.service.dict.DictHospitalDeptService;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.restmodel.base.dict.DictHospitalDeptVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
@ -12,14 +13,12 @@ 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.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.List;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
/**
 * 医院科室字典控制器
 *
@ -50,6 +49,7 @@ public class DictHospitalDeptEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.DictHospitalDept.DELETE)
    @ApiOperation(value = "删除")
    @Transactional
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {

+ 53 - 4
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/org/BaseOrgEndpoint.java

@ -6,10 +6,7 @@ import com.yihu.jw.base.util.ConstantUtils;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.hospital.drugstore.service.BaseDrugStoreService;
import com.yihu.jw.restmodel.base.org.BaseOrgVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.*;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
@ -267,4 +264,56 @@ public class BaseOrgEndpoint extends EnvelopRestEndpoint {
        return success("操作成功");
    }
    @PostMapping(value = "/delCheckOrg")
    @ApiOperation(value = "删除机构考核")
    public Envelop delCheckOrg (
            @ApiParam(name = "id", value = "考核id")
            @RequestParam(value = "id", required = false) String id) throws Exception {
        try {
            baseOrgService.delCheckOrg(id);
            return success("操作成功");
        } catch (Exception e) {
            e.printStackTrace();
            return failedException2(e);
        }
    }
    @GetMapping(value = "/getOrgCheckList")
    @ApiOperation(value = "获取机构考核")
    public ObjEnvelop getOrgCheckList(@ApiParam(name = "orgCode", value = "机构code")
                                      @RequestParam(value = "orgCode", required = false) String orgCode,
                                      @ApiParam(name = "id", value = "考核id")
                                      @RequestParam(value = "id", required = false) String id,
                                      @ApiParam(name = "page" )
                                      @RequestParam(value = "page", required = true) Integer page,
                                      @ApiParam(name = "size")
                                      @RequestParam(value = "size", required = true) Integer size) {
        try {
            JSONObject orgCheckList = baseOrgService.getOrgCheckList(orgCode, id, page, size);
            return success("获取成功!",200,orgCheckList);
        } catch (Exception e) {
            e.printStackTrace();
            return failedObjEnvelopException2(e);
        }
    }
    @PostMapping(value = "/saveOrgCheck")
    @ApiOperation(value = "保存修改机构考核")
    public Envelop saveOrgCheck(@ApiParam(name = "id", value = "考核id")
                                @RequestParam(value = "id", required = false) String id,
                                @ApiParam(name = "orgCode", value = "机构code")
                                @RequestParam(value = "orgCode", required = true) String orgCode,
                                @ApiParam(name = "checkDate", value = "考核时间")
                                @RequestParam(value = "checkDate", required = true) String checkDate,
                                @ApiParam(name = "file", value = "考核文件")
                                @RequestParam(value = "file", required = true) String file){
        try {
            baseOrgService.saveOrgCheck(id, orgCode, checkDate, file);
            return success("保存成功");
        } catch (Exception e) {
            e.printStackTrace();
            return failedException2(e);
        }
    }
}

+ 52 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/service/org/BaseOrgService.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.base.dao.org.BaseCheckOrgDao;
import com.yihu.jw.base.dao.org.BaseOrgUserDao;
import com.yihu.jw.base.service.org.tree.SimpleTree;
import com.yihu.jw.base.service.org.tree.SimpleTreeNode;
@ -11,16 +12,17 @@ import com.yihu.jw.base.service.org.tree.TreeNode;
import com.yihu.jw.base.service.user.UserService;
import com.yihu.jw.base.util.ConstantUtils;
import com.yihu.jw.base.util.JavaBeanUtils;
import com.yihu.jw.entity.base.org.BaseCheckOrgDO;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.org.BaseOrgSaasDO;
import com.yihu.jw.entity.base.org.BaseOrgUserDO;
import com.yihu.jw.entity.base.user.UserDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.mysql.query.BaseJpaService;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -54,7 +56,8 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
    @Autowired
    private BaseOrgDao baseOrgDao;
    @Autowired
    private BaseCheckOrgDao baseCheckOrgDao;
    @Autowired
    private BaseOrgSaasService baseOrgSaasService;
@ -407,5 +410,52 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
        return baseOrgDao.findOrgListBySaasId();
    }
    // 保存修改机构考核
    public void saveOrgCheck(String id ,String orgCode,String checkDate,String file){
        BaseCheckOrgDO baseCheckOrgDO = new BaseCheckOrgDO();
        if (org.apache.commons.lang3.StringUtils.isNotBlank(id)) {
            baseCheckOrgDO.setId(Long.parseLong(id));
        }
        baseCheckOrgDO.setCheckFile(file);
        baseCheckOrgDO.setOrgcode(orgCode);
        baseCheckOrgDO.setCheckDate(checkDate);
        baseCheckOrgDao.save(baseCheckOrgDO);
    }
    //获取机构考核
    public JSONObject getOrgCheckList(String orgCode,String id,Integer page,Integer size){
        JSONObject resultObj =new JSONObject();
        if (page == null) {
            page = 0;
        } else if (page > 0) {
            page = page - 1;
        }
        if (size <= 0) {
            size = 10;
        }
        String sql = "select * from base_check_org where orgCode = '"+orgCode+"'";
        String totalSql = "select count(id) from base_check_org where orgCode = '"+orgCode+"'";
        if (org.apache.commons.lang3.StringUtils.isNotBlank(id)){
            sql += " and id = '"+id+"'";
        }
        sql += " limit "+page+","+size;
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        Integer total = jdbcTemplate.queryForObject(totalSql, Integer.class);
        resultObj.put("total",total);
        resultObj.put("list",list);
        return resultObj;
    }
    public void delCheckOrg(String id){
        String sql = "delete from base_check_org where id='"+id+"'";
        jdbcTemplate.execute(sql);
    }
}

+ 2 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/team/SpecialistTeamEndpoint.java

@ -77,11 +77,12 @@ public class SpecialistTeamEndpoint extends EnvelopRestEndpoint {
                               @RequestParam(required = false) String type,
                               @RequestParam(required = false) Integer adminTeamId,
                               @RequestParam(required = false) String hospital,
                               @RequestParam(required = false) String recommendDoctor,
                               @RequestParam(required = false) String recommendDoctorName,
                               @RequestParam(required = false) Integer page,
                               @RequestParam(required = false) Integer pageSize) {
        try {
            return teamService.getTeamList(type,adminTeamId,teamName,dept,page,pageSize,hospital,recommend,recommendDoctorName);
            return teamService.getTeamList(type,adminTeamId,teamName,dept,page,pageSize,hospital,recommend,recommendDoctor,recommendDoctorName);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("查询失败",-1);

+ 2 - 7
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/DoctorRehabilitaionInfoController.java

@ -188,6 +188,7 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
            @ApiParam(name = "idcard", value = "身份证", required = false) @RequestParam(value = "idcard", required = false) String idcard,
            @ApiParam(name = "doctorId", value = "医生id", required = false) @RequestParam(value = "doctorId", required = false) String doctorId,
            @ApiParam(name = "patientId", value = "居民id", required = false) @RequestParam(value = "patientId", required = false) String patientId,
            @ApiParam(name = "diseaseId", value = "专病id", required = false) @RequestParam(value = "diseaseId", required = false) String diseaseId,
            @ApiParam(name = "finishStatus", value = "空全部 1未完成 2已完成", required = false) @RequestParam(value = "finishStatus", required = false) String finishStatus,
            @ApiParam(name = "page", value = "起始页", required = false) @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
            @ApiParam(name = "pagesize", value = "每页显示数据条数", required = false) @RequestParam(value = "pagesize", required = false, defaultValue = "10") Integer pagesize
@ -195,14 +196,8 @@ public class DoctorRehabilitaionInfoController extends EnvelopRestEndpoint {
        try {
            if (StringUtils.isBlank(doctorId)) {
                doctorId = getUID();
                System.out.println("医生id==>getUID()==>" + getUID());
            }
            System.out.println("参数idcard:" + idcard);
            System.out.println("参数patientId:" + patientId);
            System.out.println("参数finishStatus:" + finishStatus);
            System.out.println("参数page:" + page);
            System.out.println("参数pagesize:" + pagesize);
            List<Map<String, Object>> result = rehabilitationInfoService.getRehabilitationPatientPlan(idcard, doctorId, patientId, finishStatus, page, pagesize);
            List<Map<String, Object>> result = rehabilitationInfoService.getRehabilitationPatientPlan(idcard, doctorId, patientId, finishStatus, page, pagesize,diseaseId);
            return write(200, "请求成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();

+ 16 - 8
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/service/RehabilitationInfoService.java

@ -1097,7 +1097,13 @@ public class RehabilitationInfoService {
    /**
     * 获取所有居民的康复计列表
     */
    public List<Map<String, Object>> getRehabilitationPatientPlan(String idcard, String doctorId, String patientId, String finishStatus, Integer page, Integer pagesize) {
    public List<Map<String, Object>> getRehabilitationPatientPlan(String idcard, String doctorId, String patientId,
                                                                  String finishStatus, Integer page, Integer pagesize,String diseaseId) {
        String sqlTem = "";
        if(StringUtils.isNotBlank(diseaseId)){
            sqlTem += "	and w.disease ='" + diseaseId + "' ";
        }
        String limitSql = " LIMIT " + (page - 1) * pagesize + "," + pagesize;
        String sql = "SELECT * FROM ( " +
                "SELECT DISTINCT \n" +
@ -1105,34 +1111,34 @@ public class RehabilitationInfoService {
                "	   (\n" +
                "		SELECT GROUP_CONCAT(q.`name`) FROM base_disease_hospital q \n" +
                "        INNER JOIN wlyy_patient_rehabilitation_plan w ON q.id = w.disease \n" +
                "		 WHERE 1 = 1 AND w.patient=a.id  GROUP BY w.patient\n" +
                "		 WHERE 1 = 1 AND w.patient=a.id "+sqlTem+" GROUP BY w.patient\n" +
                "	   ) 'diseaseListName',\n" +
                "      (\n" +
                "        SELECT GROUP_CONCAT(DISTINCT w.plan_doctor_name) FROM wlyy_patient_rehabilitation_plan w WHERE a.id = w.patient \n" +
                "        SELECT GROUP_CONCAT(DISTINCT w.plan_doctor_name) FROM wlyy_patient_rehabilitation_plan w WHERE a.id = w.patient \n" +sqlTem+
                "      ) 'planDoctorListName',\n" +
                "	   (\n" +
                "			SELECT count(1) FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE 1 = 1 AND w.patient = a.id \n" +
                "			WHERE 1 = 1 AND w.patient = a.id \n" +sqlTem+
                "		)'itemAllCount',\n" +
                "		(\n" +
                "			SELECT count(1) FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='0'	AND w.patient = a.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='0'	AND w.patient = a.id \n" +sqlTem+
                "		)'unFinishCount',\n" +
                "		(\n" +
                "			SELECT count(1) 	FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='1'	AND w.patient = a.id \n" +
                "			WHERE	1 = 1 	AND e.`status`='1'	AND w.patient = a.id \n" +sqlTem+
                "		)'finishCount',\n" +
                "		(\n" +
                "			SELECT count(1) FROM wlyy_patient_rehabilitation_plan w \n" +
                "			INNER JOIN wlyy_rehabilitation_plan_detail q ON w.id = q.plan_id \n" +
                "           INNER JOIN base_service_item_plan e ON e.plan_detail_id = q.id \n" +
                "			WHERE	1 = 1 	AND e.plan_time=DATE_FORMAT(NOW(),'%Y-%m-%d') AND e.`status`='0'	AND w.patient = a.id \n" +
                "			WHERE	1 = 1 	AND e.plan_time=DATE_FORMAT(NOW(),'%Y-%m-%d') AND e.`status`='0'	AND w.patient = a.id \n" +sqlTem+
                "		)'totayTask'\n" +
                "FROM\n" +
                "	base_patient a\n" +
@ -1149,6 +1155,9 @@ public class RehabilitationInfoService {
            sql += " and  c.doctor is not null  ";
        }
        if(StringUtils.isNotBlank(diseaseId)){
            sql += "	AND b.disease ='" + diseaseId + "' ";
        }
        if (StringUtils.isNotBlank(patientId)) {
            //康复计划状态 [0已中止,1进行中,2已完成]
@ -1172,7 +1181,6 @@ public class RehabilitationInfoService {
            }
        }
        sql += limitSql;
        System.out.println("查询sql==>" + sql);
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        return list;
    }