wangzhinan 11 місяців тому
батько
коміт
0aebe97129

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/rehabilitation/ServiceItemPlanDao.java

@ -20,7 +20,7 @@ public interface ServiceItemPlanDao extends PagingAndSortingRepository<ServiceIt
    ServiceItemPlanDO findByRelationCode(String relationCode);
    ServiceItemPlanDO findByPlanIdAndPlanDetailIdAndPlanTime(String planId,String planDetailId,Date planTime);
    ServiceItemPlanDO findByPlanIdAndPlanDetailIdAndPlanTime(String planId,String planDetailId,String planTime);
    ServiceItemPlanDO findByRelationCodeAndRelationType(String relationCode,String relationType);

+ 3 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/followup/controller/DoctorFollowUpController.java

@ -189,12 +189,12 @@ public class DoctorFollowUpController extends BaseController {
                                @RequestParam(value = "followupClass", required = true) String followupClass,
                                @ApiParam(name = "followupManagerStatus", value = "随访管理状态【字典FOLLOWUP_MANAGER_STATUS】", defaultValue = "1")
                                @RequestParam(value = "followupManagerStatus", required = false) String followupManagerStatus,
                                @ApiParam(name = "plandate", value = "下次随访时间", defaultValue = "2016-12-14 20:00:00")
                                @RequestParam(value = "plandate", required = false) String plandate,
                                @ApiParam(name = "planDate", value = "下次随访时间", defaultValue = "2016-12-14 20:00:00")
                                @RequestParam(value = "planDate", required = false) String planDate,
                                @ApiParam(name = "prescriptioncode", value = "续方CODE", defaultValue = "")
                                    @RequestParam(value = "prescriptioncode", required = false) String prescriptioncode) {
        try {
            Followup followup = followUpService.startFollowup( id, followupNo, date, followupType, followupClass, followupManagerStatus,plandate,prescriptioncode);
            Followup followup = followUpService.startFollowup( id, followupNo, date, followupType, followupClass, followupManagerStatus,planDate,prescriptioncode);
//            followUpService.getNotStartFollowup(getUID(), followup.getFollowupPlanDate());
            return write(200, "开始随访记录成功!");
        } catch (ServiceException se) {

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

@ -648,23 +648,25 @@ public class FollowUpService {
    public Followup startFollowup(String id, String followupNo, String date, String followupType, String followupClass, String followupManagerStatus, String plandate, String prescriptioncode) throws Exception {
        Followup followup = followupDao.findById(Long.valueOf(id)).orElse(null);
        if (followup != null) {
            ServiceItemPlanDO itemPlanDO = serviceItemPlanDao.findByRelationCode(id);
            System.out.println("22222222222222222"+JSON.toJSONString(itemPlanDO));
            ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findByPlanIdAndPlanDetailIdAndPlanTime(itemPlanDO.getPlanId(), itemPlanDO.getPlanDetailId(), DateUtil.dateToStrLong(followup.getFollowupNextDate()));
            System.out.println("111111111111111111"+JSON.toJSONString(serviceItemPlanDO));
            if (StringUtils.isNoneBlank(plandate)) {
                followup.setFollowupNextDate(DateUtil.strToDate(plandate));
                Followup nextFollowup = followupDao.findById(Long.valueOf(serviceItemPlanDO.getRelationCode())).orElse(null);
                System.out.println("333333333333333333"+JSON.toJSONString(nextFollowup));
                nextFollowup.setFollowupDate(DateUtil.strToDateLong(plandate));
                nextFollowup.setFollowupPlanDate(DateUtil.strToDateLong(plandate));
                serviceItemPlanDO.setPlanTime(plandate);
                followupDao.save(nextFollowup);
                serviceItemPlanDao.save(serviceItemPlanDO);
            }
            if (followup.getStatus().compareTo("2") == 0) {
                followup.setFollowupNo(followupNo);
                followup.setFollowupDate(DateUtil.strToDate(date));
                //计划下次随访时间--huangwenjie.2017.10.19
                if (StringUtils.isNoneBlank(plandate)) {
                    ServiceItemPlanDO itemPlanDO = serviceItemPlanDao.findByRelationCode(id);
                    ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findByPlanIdAndPlanDetailIdAndPlanTime(itemPlanDO.getPlanId(), itemPlanDO.getPlanDetailId(), followup.getFollowupNextDate());
                    followup.setFollowupNextDate(DateUtil.strToDate(plandate));
                    Followup nextFollowup = followupDao.findById(Long.valueOf(serviceItemPlanDO.getRelationCode())).orElse(null);
                    nextFollowup.setFollowupDate(DateUtil.strToDate(plandate));
                    nextFollowup.setFollowupPlanDate(DateUtil.strToDate(plandate));
                    serviceItemPlanDO.setPlanTime(plandate);
                    followupDao.save(nextFollowup);
                    serviceItemPlanDao.save(serviceItemPlanDO);
                }
                followup.setFollowupType(followupType);
                followup.setFollowupClass(followupClass);
                followup.setFollowupManagerStatus(followupManagerStatus);

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

@ -966,7 +966,7 @@ public class RehabilitationInfoService {
            //wlyy_rehabilitation_patient_info的id
            filterSql += " and d.id='" + downPatientId + "' ";
        }
        if (StringUtils.isBlank(doctorId)) {
        if (StringUtils.isBlank(status)) {
            //看全部数据
            filterSql += "	AND (d.create_user = '" + doctorId + "'  OR ISNULL(  d.create_user  ) ) " +
                    "	    AND ( ISNULL( d.type ) OR d.type = 2 ) ORDER BY d.create_time DESC ";