Bladeren bron

Merge branch 'dev' of zd_123/wlyy2.0 into dev

huangwenjie 6 jaren geleden
bovenliggende
commit
d33faada1e

+ 1 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/PatientRehabilitationPlanDO.java

@ -152,9 +152,8 @@ public class PatientRehabilitationPlanDO extends UuidIdentityEntityWithOperator
        this.abortReason = abortReason;
    }
    @CreatedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "abort_time", nullable = false, length = 0,updatable = false)
    @Column(name = "abort_time")
    public Date getAbortTime() {
        return abortTime;
    }

+ 9 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/MixEnvelop.java

@ -164,4 +164,13 @@ public class MixEnvelop<T, J> extends Envelop {
        envelop.setStatus(200);
        return envelop;
    }
    public static MixEnvelop getSuccess(String message, Object obj, List objList) {
        MixEnvelop envelop = new MixEnvelop();
        envelop.setMessage(message);
        envelop.setObj(obj);
        envelop.setDetailModelList(objList);
        envelop.setStatus(200);
        return envelop;
    }
}

+ 2 - 2
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java

@ -266,7 +266,7 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
                                              @ApiParam(name = "abortReason", value = "中止原因", required = true)
                                              @RequestParam(value = "abortReason", required = false)String abortReason){
        try {
            if(StringUtils.isEmpty(abortReason)){
            if(status!=0){
                return rehabilitationPlanService.updatePlanStatusById(status,planId);
            }else {
                return rehabilitationPlanService.abortPlanById(planId,abortReason);
@ -313,10 +313,10 @@ public class RehabilitationPlanController extends EnvelopRestEndpoint {
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    }*/
    /**
     * 根据居民code和标签code获取康复计划
     *

+ 3 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/rehabilitation/RehabilitationDetailDao.java

@ -68,4 +68,7 @@ public interface RehabilitationDetailDao extends PagingAndSortingRepository<Reha
    @Query(value ="select p.patient from wlyy_rehabilitation_plan_detail d left join wlyy_patient_rehabilitation_plan p on d.plan_id=p.id where d.id=?1",nativeQuery = true)
    List<String> findPatientById(String planDetailId);
    @Query
    List<RehabilitationDetailDO> findByPlanIdAndStatus(String planId,int status);
}

+ 4 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -1283,7 +1283,10 @@ public class RehabilitationManageService {
        double totalExpense = 0;
        DecimalFormat df = new DecimalFormat("0.00");
        for (Map<String,Object> map : list){
            double expense = Integer.valueOf(String .valueOf(map.get("expense")));
            double expense = 0;
            if (StringUtils.isNotEmpty(String .valueOf(map.get("expense"))) && !"null".equals(String .valueOf(map.get("expense")))){
                expense =Integer.valueOf(String .valueOf(map.get("expense")));
            }
            totalExpense += expense;
            map.put("expense",df.format(expense/100));
        }

+ 2 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationPlanService.java

@ -382,12 +382,13 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
    public MixEnvelop abortPlanById(String planId,String abortReason){
        PatientRehabilitationPlanDO patientRehabilitationPlanDO=patientRehabilitationPlanDao.findById(planId);
        List<RehabilitationDetailDO> detailDOList = rehabilitationDetailDao.findByPlanIdAndStatus(planId,0);
        if(null!=patientRehabilitationPlanDO){
            patientRehabilitationPlanDO.setAbortReason(abortReason);
            patientRehabilitationPlanDO.setAbortTime(new Date());
            patientRehabilitationPlanDO.setStatus(0);
            patientRehabilitationPlanDao.save(patientRehabilitationPlanDO);
            return MixEnvelop.getSuccess(SpecialistMapping.api_success,patientRehabilitationPlanDO);
            return MixEnvelop.getSuccess(SpecialistMapping.api_success,patientRehabilitationPlanDO,detailDOList);
        }
        return MixEnvelop.getError("更新失败!");
    }