瀏覽代碼

绑定判断居民是否为海沧区

zd_123 7 年之前
父節點
當前提交
46233472fa

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/device/PatientDeviceLogService.java

@ -74,7 +74,7 @@ public class PatientDeviceLogService extends BaseService {
                "  SELECT sf.name, pd.* FROM wlyy_patient_device_log pd" +
                "  LEFT JOIN wlyy_sign_family sf ON pd.patient = sf.patient" +
                "  WHERE" +
                "   pd.is_del = 1 and (sf.doctor= '" +doctor+"' or sf.doctor_health = '"+doctor+"'"+
                "   pd.is_del = 1 and (sf.doctor= '" +doctor+"' or sf.doctor_health = '"+doctor+"')"+
                "  ORDER BY" +
                "  create_time DESC) a" +
                " GROUP BY a.device_sn) b" +

+ 6 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/device/DoctorDeviceController.java

@ -8,9 +8,11 @@ import com.yihu.wlyy.entity.device.vo.DeviceWxMessageDTO;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.entity.wechat.WechatTemplateConfig;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.PatientDeviceDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
import com.yihu.wlyy.service.app.device.DeviceDetailService;
import com.yihu.wlyy.service.app.device.DeviceWxMessageService;
@ -87,6 +89,8 @@ public class DoctorDeviceController extends BaseController {
	private DeviceWxMessageService deviceWxMessageService;
	@Autowired
	private PatientDeviceDao patientDeviceDao;
	@Autowired
	private SignFamilyDao signFamilyDao;
	@Autowired
	private JmsTemplate jmsTemplate;
@ -144,8 +148,9 @@ public class DoctorDeviceController extends BaseController {
			//修改设备表中{"1":"0", "2":"0"}绑定次数 和其他绑定信息,
			deviceDetailService.updateAfterBinding(device,new Date(),flag);
			Patient patient = patientDao.findByCode(device.getUser());
			SignFamily signFamily = signFamilyDao.findSignByPatient(patient.getCode(),2);
			//调用增加积分接口  海沧区的居民才能添加积分
			if (flag && "350205".equals(patient.getTown())){
			if (flag && "350205".equals(signFamily.getHospital().substring(0,6))){
				String flagStr ="";
				if ("1".equals(device.getCategoryCode())){
					flagStr="GLU_BIND";

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/device/PatientDeviceController.java

@ -236,7 +236,8 @@ public class PatientDeviceController extends BaseController {
            }
            //修改设备表中{"1":"0", "2":"0"}的绑定次数 和其他绑定信息
            deviceDetailService.updateAfterBinding(device,new Date(),flag);
            if (flag && "350205".equals(patient.getTown())){
            SignFamily signFamily = signFamilyDao.findSignByPatient(patient.getCode());
            if (flag && "350205".equals(signFamily.getHospital().substring(0,6))){
                String flagStr ="";
                if ("1".equals(device.getCategoryCode())){
                    flagStr="GLU_BIND";