Browse Source

代码修改

suqinyi 3 months ago
parent
commit
410d4d0714

+ 83 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/article/KnowledgeArticleDictDO.java

@ -84,6 +84,32 @@ public class KnowledgeArticleDictDO extends UuidIdentityEntity {
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	private Date releaseTime;
	@Transient
	private String sendDoctorCode;
	@Transient
	private String sendDoctorName;
	@Transient
	private String articleCreateTime;
	@Transient
	private String userFabulous;
	@Transient
	private String userIsRead;
	@Transient
	private String userShare;
	@Transient
	private String userCollection;
	@Transient
	public Integer getBrowseTotal() {
		return browseTotal;
@ -446,4 +472,61 @@ public class KnowledgeArticleDictDO extends UuidIdentityEntity {
	public void setDoctorImage(String doctorImage) {
		this.doctorImage = doctorImage;
	}
	@Transient
	public String getSendDoctorCode() {
		return sendDoctorCode;
	}
	public void setSendDoctorCode(String sendDoctorCode) {
		this.sendDoctorCode = sendDoctorCode;
	}
	@Transient
	public String getSendDoctorName() {
		return sendDoctorName;
	}
	public void setSendDoctorName(String sendDoctorName) {
		this.sendDoctorName = sendDoctorName;
	}
	@Transient
	public String getArticleCreateTime() {
		return articleCreateTime;
	}
	public void setArticleCreateTime(String articleCreateTime) {
		this.articleCreateTime = articleCreateTime;
	}
	@Transient
	public String getUserFabulous() {
		return userFabulous;
	}
	public void setUserFabulous(String userFabulous) {
		this.userFabulous = userFabulous;
	}
	@Transient
	public String getUserIsRead() {
		return userIsRead;
	}
	public void setUserIsRead(String userIsRead) {
		this.userIsRead = userIsRead;
	}
	@Transient
	public String getUserShare() {
		return userShare;
	}
	public void setUserShare(String userShare) {
		this.userShare = userShare;
	}
	@Transient
	public String getUserCollection() {
		return userCollection;
	}
	public void setUserCollection(String userCollection) {
		this.userCollection = userCollection;
	}
}

+ 4 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/ArticleEndpoint.java

@ -17,10 +17,7 @@ import com.yihu.jw.hospital.service.consult.BasePatientBusinessService;
import com.yihu.jw.hospital.service.consult.KnowledgeArticleService;
import com.yihu.jw.hospital.service.consult.KnowledgeArticleUserService;
import com.yihu.jw.hospital.service.consult.KnowledgeCategoryService;
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.ObjEnvelop;
import com.yihu.jw.restmodel.web.*;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import io.swagger.annotations.Api;
@ -33,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * 健康文章
@ -321,6 +319,8 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
        ObjEnvelop objEnvelop = new ObjEnvelop();
        objEnvelop.setObj(result);
        return objEnvelop;
//        Integer count = (Integer)result.get("count");
//         return  PageEnvelop.getSuccessListWithPage("获取成功",(List<Map<String, Object>>)result.get("data"),page,pageSize,Long.parseLong(String.valueOf(count)));
    }

+ 6 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeArticleService.java

@ -8,6 +8,7 @@ import com.yihu.jw.article.dao.KnowledgeArticleUserDao;
import com.yihu.jw.constants.ServiceApi;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.patient.BasePatientBusinessDO;
@ -495,11 +496,15 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
        sql += " order by a.create_time desc " + " LIMIT " + (page - 1) * pageSize + "," + pageSize + "";
        System.out.println("sql-->"+sql);
        System.out.println("countSql-->"+countSql);
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
//        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        List<KnowledgeArticleDictDO> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(KnowledgeArticleDictDO.class));
        Integer count = jdbcTemplate.queryForObject(countSql, Integer.class);
        HashMap<String, Object> resultMap = new HashMap<>();
        resultMap.put("data", list);
        resultMap.put("count", count);
        resultMap.put("page", page);
        resultMap.put("size", pageSize);
        return resultMap;
    }
}

+ 10 - 16
svr/svr-rehabilitation/src/main/java/com/yihu/rehabilitation/controller/followUp/DoctorFollowUpController.java

@ -443,22 +443,16 @@ public class DoctorFollowUpController  extends EnvelopRestEndpoint {
    @RequestMapping(value = "/findFollowupByMonth",produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
    @ApiOperation("获取访视计划按月日历形式")
    @ResponseBody
    public Envelop findFollowupByMonth(@ApiParam(name = "doctor", value = "医生", defaultValue = "zjm20190214")
                                      @RequestParam(value = "doctor", required = true) String doctor,
                                      @ApiParam(name = "patient", value = "居民")
                                      @RequestParam(value = "patient", required = false) String patient,
                                      @ApiParam(name = "followupClass", value = "随访类别,多类别“,”分割")
                                      @RequestParam(value = "followupClass", required = false) String followupClass,
                                      @ApiParam(name = "patientName", value = "居民姓名")
                                      @RequestParam(value = "patientName", required = false) String patientName,
                                      @ApiParam(value = "开始时间,格式(yyyy-MM-dd)", name = "startDate",required = false)
                                      @RequestParam(value = "startDate", required = false) String startDate,
                                      @ApiParam(value = "结束时间,格式(yyyy-MM-dd)", name = "endDate",required = false)
                                      @RequestParam(value = "endDate", required = false) String endDate,
                                      @ApiParam(name = "flag", value = "区分上门访视(1-是)")
                                      @RequestParam(value = "flag", required = false) String flag,
                                      @ApiParam(name = "type", value = "区分随访计划1、新增随访2、临时随访3、入户随访")
                                      @RequestParam(value = "type", required = false) Integer type){
    public Envelop findFollowupByMonth(
            @ApiParam(name = "doctor", value = "医生", defaultValue = "zjm20190214") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "patient", value = "居民") @RequestParam(value = "patient", required = false) String patient,
            @ApiParam(name = "followupClass", value = "随访类别,多类别“,”分割") @RequestParam(value = "followupClass", required = false) String followupClass,
            @ApiParam(name = "patientName", value = "居民姓名") @RequestParam(value = "patientName", required = false) String patientName,
            @ApiParam(value = "开始时间,格式(yyyy-MM-dd)", name = "startDate",required = false) @RequestParam(value = "startDate", required = false) String startDate,
            @ApiParam(value = "结束时间,格式(yyyy-MM-dd)", name = "endDate",required = false) @RequestParam(value = "endDate", required = false) String endDate,
            @ApiParam(name = "flag", value = "区分上门访视(1-是)") @RequestParam(value = "flag", required = false) String flag,
            @ApiParam(name = "type", value = "区分随访计划1、新增随访2、临时随访3、入户随访") @RequestParam(value = "type", required = false) Integer type
    ){
        try {
            return success("操作成功!",followUpService.findFollowupByMonth(doctor,patient,followupClass,patientName,startDate,endDate,flag,type));
        }catch (Exception e){

+ 13 - 13
svr/svr-rehabilitation/src/main/java/com/yihu/rehabilitation/controller/patient/PatientRehabilitationManageController.java

@ -270,20 +270,20 @@ public class PatientRehabilitationManageController extends EnvelopRestEndpoint {
    }
    @RequestMapping(value = "selectPlanDetailByPlanId", method = RequestMethod.GET)
    @ApiOperation("康复管理-查看其它服务计划")
    public Envelop selectPlanDetailByPlanId(@ApiParam(name = "planId", value = "计划id", required = true)
                                           @RequestParam(value = "planId", required = true) String planId,
                                           @ApiParam(name = "planDetailId", value = "计划详情id", required = true)
                                           @RequestParam(value = "planDetailId", required = true) String planDetailId,
                                           @ApiParam(name = "itemId", value = "服务项目code", required = true)
                                           @RequestParam(value = "itemId", required = true) String itemId) {
        @ApiOperation("康复管理-查看其它服务计划")
        public Envelop selectPlanDetailByPlanId(@ApiParam(name = "planId", value = "计划id", required = true)
        @RequestParam(value = "planId", required = true) String planId,
                @ApiParam(name = "planDetailId", value = "计划详情id", required = true)
                @RequestParam(value = "planDetailId", required = true) String planDetailId,
                @ApiParam(name = "itemId", value = "服务项目code", required = true)
                @RequestParam(value = "itemId", required = true) String itemId) {
        try {
            return success( "请求成功!",rehabilitationManageService.selectPlanDetailByPlan(planId,planDetailId,itemId));
        } catch (Exception e) {
            e.printStackTrace();
            return failed( "请求失败");
        }
            try {
                return success( "请求成功!",rehabilitationManageService.selectPlanDetailByPlan(planId,planDetailId,itemId));
            } catch (Exception e) {
                e.printStackTrace();
                return failed( "请求失败");
            }
    }
    @RequestMapping(value = "selectPlanByPatient", method = RequestMethod.GET)

+ 3 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/common/service/LabelService.java

@ -338,7 +338,8 @@ public class LabelService {
    public List findLabelPatientList(String name, String labelType, String labelCode) {
        String sql = "SELECT\n" +
                "	 a.label_code 'labelCode',a.label_name 'labelName',b.* \n" +
                "	 a.label_code 'labelCode',a.label_name 'labelName', TIMESTAMPDIFF(YEAR, b.birthday, CURDATE()) AS age," +
                "    b.* \n" +
                "FROM\n" +
                "	wlyy_patient_label a\n" +
                "	INNER JOIN base_patient b ON a.patient=b.id\n" +
@ -352,6 +353,7 @@ public class LabelService {
        if (StringUtils.isNotBlank(labelCode)) {
            sql += "  AND a.label_code='" + labelCode + "'";
        }
        System.out.println("sql==>"+sql);
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
        return list;
    }

+ 12 - 9
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/followup/dao/FollowUpDao.java

@ -84,18 +84,20 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
     * 查找所有的随访数据
     */
    @Query("select d.id,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus," +
            "c.id,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode " +
            "from Followup a, BaseDoctorDO d, BaseDoctorDO c " +
            "where a.doctorCode = d.id and a.creater = c.id and a.patientCode = ?1 and a.doctorCode=?2  and a.status > '0'")
            "c.id,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode ," +
            " p.disease,p.diseaseName,q.planId,q.id " +
            "from Followup a, BaseDoctorDO d, BaseDoctorDO c ,ServiceItemPlanDO q ,PatientRehabilitationPlanDO p " +
            "where a.doctorCode = d.id AND a.id = q.relationCode  and q.planId=p.id and a.creater = c.id and a.patientCode = ?1 and a.doctorCode=?2  and a.status > '0'")
    Page<Object> findByPatient(String patient,String doctor, PageRequest pageable);
    /**
     * 查找所有的随访计划(未开始的归类为计划)
     */
    @Query("select d.id,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus," +
            "c.id,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode " +
            "from Followup a, BaseDoctorDO d, BaseDoctorDO c " +
            "where a.doctorCode = d.id and a.creater = c.id and a.patientCode = ?1  and a.doctorCode=?2 and a.status = '2' ")
            "c.id,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode ," +
            " p.disease,p.diseaseName,q.planId,q.id  " +
            "from Followup a, BaseDoctorDO d, BaseDoctorDO c,ServiceItemPlanDO q ,PatientRehabilitationPlanDO p  " +
            "where a.doctorCode = d.id AND a.id = q.relationCode  and q.planId=p.id  and a.creater = c.id and a.patientCode = ?1  and a.doctorCode=?2 and a.status = '2' ")
    Page<Object> findPlanByPatient(String patient,String doctor, PageRequest pageable);
    /**
@ -105,9 +107,10 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
     * @return
     */
    @Query("select d.id,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus," +
            "c.id,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode " +
            "from Followup a, BaseDoctorDO d, BaseDoctorDO c" +
            " where a.doctorCode = d.id and a.creater = c.id and a.patientCode = ?1 and a.doctorCode=?2  and (a.status = '1' or a.status = '3')")
            "c.id,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode, " +
            " p.disease,p.diseaseName,q.planId,q.id  " +
            "from Followup a, BaseDoctorDO d, BaseDoctorDO c , ServiceItemPlanDO q ,PatientRehabilitationPlanDO p  " +
            " where a.doctorCode = d.id  AND a.id = q.relationCode  and q.planId=p.id  and a.creater = c.id and a.patientCode = ?1 and a.doctorCode=?2  and (a.status = '1' or a.status = '3')")
    Page<Object> findRecordByPatient(String patient, String doctor,PageRequest pageable);
    /**

+ 9 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/followup/service/FollowUpService.java

@ -452,6 +452,13 @@ public class FollowUpService {
                followup.put("followupPlanDate", objArr[13] != null ? DateUtil.dateToStrLong((Date) objArr[13]) : "");
                followup.put("followupNextDate", objArr[14] != null ? DateUtil.dateToStrLong((Date) objArr[14]) : "");
                followup.put("prescriptionCode", objArr[17]);
                followup.put("disease", objArr[18]);
                followup.put("diseaseName", objArr[19]);
                followup.put("planId", objArr[20]);
                followup.put("planItemId", objArr[21]);
                followup.put("total", result.getTotalElements());
                array.put(followup);
            }
@ -1503,8 +1510,8 @@ public class FollowUpService {
                " wf.followup_type as followupType,wf.followup_class as followupClass,wf.followup_manager_status as followupManagerStatus,wf.doctor_code as doctorCode,wf.doctor_name as doctorName," +
                "wf.jwdoctor_code as jwdoctorCode,wf.org_code as orgCode,wf.org_name as orgName,wf.jworg_code as jworgCode,wf.patient_code as patientCode,wf.patient_name as patientName,wf.idcard," +
                "wf.data_from as dataFrom,wf.status,wf.followup_content_phone as followupContentPhone,wf.creater,wf.sign_type as signType,wf.admin_team_code as adminTeamCode,wf.sign_code as signCode," +
                "wf.prescription_code as prescriptionCode,wf.type";
        String sql = " from wlyy_followup wf ";
                "wf.prescription_code as prescriptionCode,wf.type, q.plan_id as planId ,q.plan_detail_id  as planDetailId,q.id as planItemId ";
        String sql = " from wlyy_followup wf inner join base_service_item_plan q on wf.id=q.relation_code";
        sql += " where 1=1 and wf.status !=0";
        if (!org.apache.commons.lang.StringUtils.isEmpty(doctor)) {
            sql += " and wf.doctor_code = '" + doctor + "'";

+ 17 - 20
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/rehabilitation/controller/RehabilitationManageController.java

@ -62,12 +62,10 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
    @PostMapping(value = "completePlan")
    @ApiOperation("确认完成服务,填写服务笔记")
    public Envelop completePlan(
            @ApiParam(name = "id", value = "执行计划id", required = true)
            @RequestParam(value = "id", required = true) String id,
            @ApiParam(name = "content", value = "服务完成笔记", required = false)
            @RequestParam(value = "content", required = false) String content,
            @ApiParam(name = "appendixs", value = "附件", required = false)
            @RequestParam(value = "appendixs", required = false) String appendixs) {
            @ApiParam(name = "id", value = "执行计划id", required = true) @RequestParam(value = "id", required = true) String id,
            @ApiParam(name = "content", value = "服务完成笔记", required = false) @RequestParam(value = "content", required = false) String content,
            @ApiParam(name = "appendixs", value = "附件", required = false) @RequestParam(value = "appendixs", required = false) String appendixs
    ) {
        try {
            rehabilitationManageService.completePlan(id,content,appendixs,getUID());
            return Envelop.getSuccess("操作成功");
@ -82,12 +80,10 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
    @GetMapping(value = "rehabilitationDetailInfo")
    @ApiOperation("康复计划服务项列表")
    public Envelop rehabilitationDetailInfo(
            @ApiParam(name = "planId", value = "康复计划id", required = true)
            @RequestParam(value = "planId", required = true) String planId,
            @ApiParam(name = "searchTask", value = "快速查找任务:(1电话/短信关怀,2康复咨询,3健康监测,4上门服务,5康复指导,6康复随访,7康复复诊)", required = false)
            @RequestParam(value = "searchTask", required = false) String searchTask,
            @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false)
            @RequestParam(value = "status", required = false) String status) {
            @ApiParam(name = "planId", value = "康复计划id", required = true) @RequestParam(value = "planId", required = true) String planId,
            @ApiParam(name = "searchTask", value = "快速查找任务:(1电话/短信关怀,2康复咨询,3健康监测,4上门服务,5康复指导,6康复随访,7康复复诊)", required = false) @RequestParam(value = "searchTask", required = false) String searchTask,
            @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false) @RequestParam(value = "status", required = false) String status
    ) {
        try {
            return ListEnvelop.getSuccess("查询成功",rehabilitationManageService.rehabilitationDetailInfo(planId,status,searchTask));
        }catch (ServiceException se){
@ -103,8 +99,7 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
    public Envelop selectPlanDetailByPlanId(
            @ApiParam(name = "planId", value = "康复计划id", required = true) @RequestParam(value = "planId", required = true) String planId,
            @ApiParam(name = "itemId", value = "执行计划id", required = true) @RequestParam(value = "itemId", required = true) String itemId,
            @ApiParam(name = "searchTask", value = "快速查找任务:(1电话/短信关怀,2康复咨询,3健康监测,4上门服务,5康复指导,6康复随访,7康复复诊)", required = true)
            @RequestParam(value = "searchTask", required = true) String searchTask
            @ApiParam(name = "searchTask", value = "快速查找任务:(1电话/短信关怀,2康复咨询,3健康监测,4上门服务,5康复指导,6康复随访,7康复复诊)", required = true) @RequestParam(value = "searchTask", required = true) String searchTask
    ) {
        try {
            return ListEnvelop.getSuccess("查询成功",rehabilitationManageService.selectPlanDetailByPlan(planId, itemId, searchTask));
@ -114,6 +109,9 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
        }
    }
    @GetMapping(value = "findServiceItemPlanDetail")
    @ApiOperation("执行计划详情")
    public Envelop findServiceItemPlanDetail(
@ -318,12 +316,11 @@ public class RehabilitationManageController extends EnvelopRestEndpoint {
    @RequestMapping(value = "saveGuidandceTemplate", method = RequestMethod.POST)
    @ApiOperation("康复管理-保存指导模板")
    public Envelop saveGuidandceTemplate(@ApiParam(name = "type", value = "康复指导类型", required = true)
                              @RequestParam(value = "type", required = true) String type,
                              @ApiParam(name = "content", value = "模板内容", required = true)
                              @RequestParam(value = "content", required = true) String content,
                              @ApiParam(name = "typeName", value = "类型名称", required = true)
                              @RequestParam(value = "typeName", required = true) String typeName) {
    public Envelop saveGuidandceTemplate(
            @ApiParam(name = "type", value = "康复指导类型", required = true) @RequestParam(value = "type", required = true) String type,
            @ApiParam(name = "content", value = "模板内容", required = true) @RequestParam(value = "content", required = true) String content,
            @ApiParam(name = "typeName", value = "类型名称", required = true) @RequestParam(value = "typeName", required = true) String typeName
    ) {
        try {
            rehabilitationGuidanceService.saveGuidandceTemplate(content,type,typeName,getUID());
            return Envelop.getSuccess("保存成功");