Browse Source

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

叶仕杰 4 years ago
parent
commit
0459a546b1

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

@ -147,7 +147,7 @@ public class RehabilitationTemplateDetailDO extends UuidIdentityEntityWithOperat
        return expense;
    }
    public void setExpense(String name) {
    public void setExpense(Integer name) {
        this.expense = expense;
    }
}

+ 4 - 4
common/common-entity/src/main/java/com/yihu/jw/entity/util/TransforSqlUtl.java

@ -10,7 +10,7 @@ public class TransforSqlUtl {
    public static String wlyySpecialistPatientRelationLike(String sql,String ...replaceName){
        for (String tmp :replaceName){
            String str = "AES_DECRYPT(from_base64("+replaceName+"),'jkzl2021ZJXL*#%a')";
            String str = "AES_DECRYPT(from_base64("+tmp+"),'jkzl2021ZJXL*#%a')";
            sql = sql.replaceAll(tmp,str);
        }
        return  sql;
@ -18,7 +18,7 @@ public class TransforSqlUtl {
    public static String wlyySpecialistPatientRelationReplay(String sql,String ...replaceName){
        for (String tmp :replaceName){
            String str = "CAST(AES_DECRYPT(from_base64("+replaceName+"),'jkzl2021ZJXL*#%a') AS CHAR ) ";
            String str = "CAST(AES_DECRYPT(from_base64("+tmp+"),'jkzl2021ZJXL*#%a') AS CHAR ) ";
            sql = sql.replaceAll(tmp,str);
        }
        return  sql;
@ -95,8 +95,8 @@ public class TransforSqlUtl {
    }
    public static String wlyy_plan_detail_appointmentAppDoctorName(String sql){
        String str = "*,CAST(AES_DECRYPT(from_base64(a.doctor_name),'jkzl2021ZJXL*#%a') AS CHAR ) ";
        return sql.replace("*",str);
        String str = "CAST(AES_DECRYPT(from_base64(a.doctor_name),'jkzl2021ZJXL*#%a') AS CHAR ) ";
        return sql.replace("a.doctor_name",str);
    }
    public static String wlyy_rehabilitation_operate_recordsDoctorName(String sql){

+ 8 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistController.java

@ -2,6 +2,7 @@ package com.yihu.jw.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.dao.SpecialistPatientRelationDao;
import com.yihu.jw.entity.specialist.SpecialistPatientRelationDO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
@ -17,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -35,6 +37,8 @@ public class SpecialistController extends EnvelopRestEndpoint {
    private Tracer tracer;
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Autowired
    private SpecialistPatientRelationDao specialistPatientRelationDao;
    @PostMapping(value = SpecialistMapping.specialist.createSpecialistRelation)
    @ApiOperation(value = "创建专科医生与患者匹配关系")
@ -462,6 +466,10 @@ public class SpecialistController extends EnvelopRestEndpoint {
            }
//            specialistPatientRelationDO.setDoctor(getUID());
//            specialistPatientRelationDO.setDoctorName(getUNAME());
            List<SpecialistPatientRelationDO> list = specialistPatientRelationDao.findListByTeamAndPatient(specialistPatientRelationDO.getTeamCode(),specialistPatientRelationDO.getPatient());
            if (list.size()>0){
                return ObjEnvelop.getSuccess("success", list.get(0));
            }
            return specialistService.createPatientInSpeciaRelation(specialistPatientRelationDO);
        }catch (Exception e){
            e.printStackTrace();

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

@ -35,4 +35,7 @@ public interface SpecialistPatientRelationDao extends PagingAndSortingRepository
    @Query("select p from SpecialistPatientRelationDO p where p.teamCode=?1 and p.patient=?2 and p.doctor=?3 and p.status>=0 and p.status >=0 and p.signStatus=1")
    List<SpecialistPatientRelationDO> findListByTeamCodeAndPatientAndDoctor(Integer teamCode,String patient,String doctor);
    @Query("select p from SpecialistPatientRelationDO p where p.teamCode=?1 and p.patient=?2 and p.status>=0 and p.status >=0 and p.signStatus=1")
    List<SpecialistPatientRelationDO> findListByTeamAndPatient(Integer teamCode,String patient);
}

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

@ -632,7 +632,7 @@ public class RehabilitationManageService {
                " LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id " +
                " LEFT JOIN wlyy_specialist.wlyy_plan_detail_appointment a on d.id=.a.rehabilitation_plan_detail_id " +
                " where d.id = '"+planDetailId+"'";
        sql = TransforSqlUtl.wlyy_patient_rehabilitation_planName(sql);
        sql = TransforSqlUtl.wlyy_patient_rehabilitation_planName2(sql);
        sql = TransforSqlUtl.wlyy_patient_rehabilitation_planCreateName(sql);
        sql = TransforSqlUtl.wlyy_plan_detail_appointmentAppDoctorName(sql);
        sql = TransforSqlUtl.wlyy_rehabilitation_plan_detailDoctorName(sql);
@ -730,10 +730,13 @@ public class RehabilitationManageService {
            resultMap.put("recordFlag",temp.getFlag());
            resultMap.put("recordId",temp.getId());
            JSONArray imgs = new JSONArray();
            if (temp.getRelationRecordImg()!=null&&StringUtils.isNotEmpty(temp.getRelationRecordImg())){
                imgs.put(temp.getRelationRecordImg());
                resultMap.put("relationRecordImg",(temp.getRelationRecordImg()!=null&&StringUtils.isNotEmpty(temp.getRelationRecordImg()))?(new JSONArray(temp.getRelationRecordImg())):null);//json格式
            }
            else{
                resultMap.put("relationRecordImg",imgs);
            }
            resultMap.put("relationRecordImg",imgs);
         /*   if(itemType!=1&&itemType!=0){*/
                resultMap.put("relationRecordCode",temp.getRelationRecordCode());
                resultMap.put("completeTimeShort",DateUtil.dateToStr(completeTime,"yyyy/MM/dd"));