LAPTOP-KB9HII50\70708 8 ماه پیش
والد
کامیت
0f8d086304

+ 14 - 0
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/controller/ChronicDiseaseController.java

@ -29,6 +29,20 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
    @Autowired
    private DoctorSchemeService doctorSchemeService;
    @GetMapping(value = "isTrack")
    @ApiOperation("是否关注")
    public Envelop isTrack(
            @ApiParam(name = "doctor", value = "医生id") @RequestParam(value = "doctor", required = true) String doctor,
            @ApiParam(name = "patient", value = "居民id") @RequestParam(value = "patient", required = true) String patient
    ) {
        try {
            return ObjEnvelop.getSuccess("取消成功",doctorSchemeService.isTrack(patient,doctor));
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError("取消失败");
        }
    }
    @PostMapping(value = "delTrack")
    @ApiOperation("取消重点关注")
    public Envelop delTrack(

+ 11 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/service/scheme/DoctorSchemeService.java

@ -48,7 +48,6 @@ import java.util.concurrent.Executors;
 * @date 2017/9/13 15:46
 */
@Service
@Transactional
public class DoctorSchemeService {
    private static Logger logger = LoggerFactory.getLogger(DoctorSchemeService.class);
@ -117,6 +116,15 @@ public class DoctorSchemeService {
        }
    }
    //是否关注
    public String isTrack(String patient,String doctor){
        TrackPatient trackPatient = trackPatientDao.findByDoctorCodeAndPatientCode(doctor,patient);
        if(trackPatient==null){
            return "0";
        }
        return trackPatient.getDel();
    }
    //添加重点关注
    public void addTrack(String patient,String doctor){
        synchronized (patient.intern()){
@ -973,7 +981,8 @@ public class DoctorSchemeService {
        String hsql = "SELECT " +
                " i.value1 AS weight, " +
                " i.value2 AS height, " +
                " i.value3 AS BMI " +
                " i.value3 AS BMI, " +
                " i.value4 " +
                " FROM " +
                " wlyy_patient_health_index i " +
                " WHERE " +