Przeglądaj źródła

上传体征数据添加积分bug

zd_123 7 lat temu
rodzic
commit
b70ff49352

+ 3 - 0
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/common/dao/SignFamilyDao.java

@ -37,4 +37,7 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
	@Query("select a from SignFamily a where a.patient = ?1 and a.type =1 and a.status = 1")
	SignFamily findBySanshiPatientYes(String id);
	@Query("select a from SignFamily a where a.patient = ?1 and a.type =2 and a.status > 0")
	SignFamily findByPatient(String code);
}

+ 6 - 1
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/service/DeviceService.java

@ -503,7 +503,12 @@ public class DeviceService extends BaseService{
            } else {
                //患者信息
                String patientCode = result.getUser();
                SignFamily signFamily = signFamilyDao.findByPatient(patientCode);
                Patient patient = patientDao.findByCode(patientCode);
                String hospital = "";
                if (signFamily!=null){
                    hospital = signFamily.getHospital();
                }
                String flagStr = "";
                if (deviceType==1){
@ -514,7 +519,7 @@ public class DeviceService extends BaseService{
                try {
                    //增加积分
                    if (dataUoloadCount == 0 && "350205".equals(patient.getTown())){
                    if (dataUoloadCount == 0 && "350205".equals(hospital.substring(0,6))){
                        String sql = "select count(*) num from device.wlyy_devices where device_code = '"+deviceSn+"'";
                        Map<String,Object> deviceCountMap = jdbcTemplate.queryForMap(sql);
                        if (Integer.valueOf(String.valueOf(deviceCountMap.get("num")))>0){