Browse Source

代码修改

liubing 4 years ago
parent
commit
8bfbaea2d2

+ 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;
    }
}

+ 2 - 2
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;

+ 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 specialistService.createPatientInSpeciaRelation(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);
}