Commit 39e1b98306ca7e6a185be1c625441b61b3438585
1 parent
b2cf1a2d97
Exists in
master
and in
1 other branch
commit
Showing 1 changed file with 132 additions and 84 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
39e1b98
| ... | ... | @@ -48,8 +48,7 @@ |
| 48 | 48 | * @since BME V100R001C40B104 |
| 49 | 49 | */ |
| 50 | 50 | @Component |
| 51 | -public class BabyEarFacade | |
| 52 | -{ | |
| 51 | +public class BabyEarFacade { | |
| 53 | 52 | |
| 54 | 53 | //日志调测器 |
| 55 | 54 | private static final Logger logger = LoggerFactory.getLogger(BabyEarFacade.class); |
| 56 | 55 | |
| 57 | 56 | |
| ... | ... | @@ -85,15 +84,16 @@ |
| 85 | 84 | private ChildrenPersonService childrenPersonService; |
| 86 | 85 | @Autowired |
| 87 | 86 | private PersonService personService; |
| 87 | + | |
| 88 | 88 | //处理儿童person信息 |
| 89 | - private PersonModel handBabyPerson(BabyModel baby){ | |
| 89 | + private PersonModel handBabyPerson(BabyModel baby) { | |
| 90 | 90 | //跟距母親的證件號查詢兒童person信息 |
| 91 | 91 | PersonModelQuery personModelQuery = new PersonModelQuery(); |
| 92 | 92 | personModelQuery.setYn(YnEnums.YES.getId()); |
| 93 | 93 | personModelQuery.setCardNo(baby.getMcertNo()); |
| 94 | 94 | personModelQuery.setType(2); |
| 95 | - List<PersonModel> babyP= personService.queryPersons(personModelQuery); | |
| 96 | - if(CollectionUtils.isNotEmpty(babyP)){ | |
| 95 | + List<PersonModel> babyP = personService.queryPersons(personModelQuery); | |
| 96 | + if (CollectionUtils.isNotEmpty(babyP)) { | |
| 97 | 97 | return babyP.get(0); |
| 98 | 98 | } |
| 99 | 99 | PersonModel babyPerson = new PersonModel(); |
| 100 | 100 | |
| 101 | 101 | |
| 102 | 102 | |
| ... | ... | @@ -106,16 +106,69 @@ |
| 106 | 106 | babyPerson.setModified(new Date()); |
| 107 | 107 | return personService.addPerson(babyPerson); |
| 108 | 108 | } |
| 109 | + | |
| 110 | + private ChildrenPerson fillChildren(BabyModel baby) { | |
| 111 | + ChildrenPerson childrenPerson = new ChildrenPerson(); | |
| 112 | + childrenPerson.setAddressCity(baby.getCityId()); | |
| 113 | + childrenPerson.setAddressArea(baby.getAreaId()); | |
| 114 | + childrenPerson.setAddressDetail(baby.getAddress()); | |
| 115 | + childrenPerson.setAddressProvince(baby.getProvinceId()); | |
| 116 | + childrenPerson.setAddressStreet(baby.getStreetId()); | |
| 117 | + childrenPerson.setBasePapersNumber(baby.getMcertNo()); | |
| 118 | + childrenPerson.setBaseWomanBirth(baby.getMbirth()); | |
| 119 | + //母亲证件类型 | |
| 120 | + childrenPerson.setBasePapersType(baby.getMcertTypeId()); | |
| 121 | + childrenPerson.setBirthday(baby.getBirth()); | |
| 122 | + childrenPerson.setContactWomanWay(baby.getMphone()); | |
| 123 | + childrenPerson.setCreateTime(baby.getCreated()); | |
| 124 | + //母亲文化成都 | |
| 125 | + childrenPerson.setDegree(baby.getmLevelId()); | |
| 126 | + childrenPerson.setDoctorId(baby.getBuildDoctor()); | |
| 127 | + childrenPerson.setGender(baby.getSex()); | |
| 128 | + childrenPerson.setMotherId(baby.getParentId()); | |
| 129 | + childrenPerson.setName(baby.getName()); | |
| 130 | + childrenPerson.setPapersNum(baby.getCardNo()); | |
| 131 | + childrenPerson.setOccupation(baby.getFproTypeId()); | |
| 132 | + return childrenPerson; | |
| 133 | + } | |
| 134 | + | |
| 135 | + private void addMysqlBabyRecord(BabyModel baby) { | |
| 136 | + ChildrenPerson childrenPerson = fillChildren(baby); | |
| 137 | + //同时写mysql表 | |
| 138 | + childrenPersonService.addChildrenPerson(childrenPerson); | |
| 139 | + String mysqlBabyId = childrenPerson.getId(); | |
| 140 | + | |
| 141 | + ChildrenFather childrenFather = new ChildrenFather(); | |
| 142 | + childrenFather.setName(baby.getFname()); | |
| 143 | + childrenFather.setOccupation(baby.getFproTypeId()); | |
| 144 | + childrenFather.setBirthday(baby.getFbirth()); | |
| 145 | + childrenFather.setContactWay(baby.getFphone()); | |
| 146 | + childrenFather.setEducationDegree(baby.getfLevelId()); | |
| 147 | + childrenFather.setCreateTime(baby.getCreated()); | |
| 148 | + childrenFather.setChildId(mysqlBabyId); | |
| 149 | + childrenFatherService.addChildrenFather(childrenFather); | |
| 150 | + | |
| 151 | + ChildrenRecord childrenRecord = new ChildrenRecord(); | |
| 152 | + childrenRecord.setChildId(mysqlBabyId); | |
| 153 | + childrenRecord.setCreateTime(baby.getCreated()); | |
| 154 | + childrenRecord.setBirthHospital(baby.getHospitalId()); | |
| 155 | + childrenRecord.setRemark(baby.getMremark()); | |
| 156 | + childrenRecord.setHeight(Float.valueOf(baby.getBabyHeight())); | |
| 157 | +// childrenRecord.setBirthNum(baby.get); | |
| 158 | +// childrenRecord.setChildbirthType(baby.get); | |
| 159 | + childrenRecordService.addChildrenRecord(childrenRecord); | |
| 160 | + } | |
| 161 | + | |
| 162 | + | |
| 109 | 163 | /** |
| 110 | 164 | * 增加听力筛查建档 |
| 111 | 165 | * |
| 112 | 166 | * @param babyEarAddRequest 增加听筛请求 |
| 113 | - * | |
| 114 | 167 | * @return 操作是否成功 |
| 115 | 168 | */ |
| 116 | - public BaseResponse addOrUpdateBabyEar(BabyEarAddRequest babyEarAddRequest,Integer userId){ | |
| 169 | + public BaseResponse addOrUpdateBabyEar(BabyEarAddRequest babyEarAddRequest, Integer userId) { | |
| 117 | 170 | //获取儿童信息 |
| 118 | - IBasicRequestConvert<BabyModel> convert= babyEarAddRequest.getBase(); | |
| 171 | + IBasicRequestConvert<BabyModel> convert = babyEarAddRequest.getBase(); | |
| 119 | 172 | //儿童基本信息 |
| 120 | 173 | BabyModel baby = convert.convertToDataModel(); |
| 121 | 174 | //儿童出生信息 |
| 122 | 175 | |
| 123 | 176 | |
| 124 | 177 | |
| 125 | 178 | |
| 126 | 179 | |
| 127 | 180 | |
| 128 | 181 | |
| 129 | 182 | |
| 130 | 183 | |
| 131 | 184 | |
| 132 | 185 | |
| 133 | 186 | |
| 134 | 187 | |
| 135 | 188 | |
| 136 | 189 | |
| 137 | 190 | |
| 138 | 191 | |
| 139 | 192 | |
| ... | ... | @@ -123,65 +176,66 @@ |
| 123 | 176 | //儿童家庭信息 |
| 124 | 177 | BabyPatientExtendEarFamily babyPatientExtendEarFamily = babyEarAddRequest.getPatientExtendEarFamily(); |
| 125 | 178 | //母亲信息 |
| 126 | - BabyPatientExtendEarMother babyPatientExtendEarMother= babyEarAddRequest.getPatientExtendEarMother(); | |
| 127 | - String hId= autoMatchFacade.getHospitalId(userId); | |
| 179 | + BabyPatientExtendEarMother babyPatientExtendEarMother = babyEarAddRequest.getPatientExtendEarMother(); | |
| 180 | + String hId = autoMatchFacade.getHospitalId(userId); | |
| 128 | 181 | |
| 129 | - if(null!=baby){ | |
| 182 | + if (null != baby) { | |
| 130 | 183 | //处理儿童person信息 |
| 131 | - String pid = handBabyPerson(baby).getId(); | |
| 184 | + String pid = handBabyPerson(baby).getId(); | |
| 132 | 185 | String id = babyEarAddRequest.getBase().getId(); |
| 133 | 186 | String babyPatientId = baby.getId(); |
| 134 | - if(StringUtils.isEmpty(baby.getId())){ | |
| 187 | + if (StringUtils.isEmpty(baby.getId())) { | |
| 135 | 188 | baby.setPid(pid); |
| 136 | - babyPatientId=babyService.addOneBaby(baby).getId(); | |
| 189 | + babyPatientId = babyService.addOneBaby(baby).getId(); | |
| 190 | + addMysqlBabyRecord(baby); | |
| 137 | 191 | } |
| 138 | - BabyPatientExtendEar babyPatientExtendEar =new BabyPatientExtendEar(); | |
| 139 | - if(StringUtils.isEmpty( id)){ | |
| 192 | + BabyPatientExtendEar babyPatientExtendEar = new BabyPatientExtendEar(); | |
| 193 | + if (StringUtils.isEmpty(id)) { | |
| 140 | 194 | babyPatientExtendEar.setCreateDate(new Date()); |
| 141 | 195 | babyPatientExtendEar.setCreateHospitalId(hId); |
| 142 | 196 | babyPatientExtendEar.setCreateUserId(userId + ""); |
| 143 | 197 | babyPatientExtendEar.setPersonId(pid); |
| 144 | 198 | babyPatientExtendEar.setLastUpdateDate(new Date()); |
| 145 | 199 | babyPatientExtendEar.setLastUpdateHospitalId(hId); |
| 146 | - babyPatientExtendEar.setLastUpdateUserId(userId+""); | |
| 200 | + babyPatientExtendEar.setLastUpdateUserId(userId + ""); | |
| 147 | 201 | babyPatientExtendEar.setStatus(1); |
| 148 | 202 | babyPatientExtendEar.setBabyPatientId(babyPatientId); |
| 149 | 203 | babyPatientExtendEarService.addBabyPatientExtendEar(babyPatientExtendEar); |
| 150 | - }else{ | |
| 204 | + } else { | |
| 151 | 205 | babyPatientExtendEar.setId(id); |
| 152 | 206 | babyPatientExtendEar.setLastUpdateDate(new Date()); |
| 153 | 207 | babyPatientExtendEar.setLastUpdateHospitalId(hId); |
| 154 | - babyPatientExtendEar.setLastUpdateUserId(userId+""); | |
| 208 | + babyPatientExtendEar.setLastUpdateUserId(userId + ""); | |
| 155 | 209 | babyPatientExtendEarService.updateBabyPatientExtendEar(babyPatientExtendEar); |
| 156 | 210 | } |
| 157 | 211 | |
| 158 | - if(StringUtils.isEmpty(babyPatientExtendEarBirth.getBabyPatientId())){ | |
| 212 | + if (StringUtils.isEmpty(babyPatientExtendEarBirth.getBabyPatientId())) { | |
| 159 | 213 | babyPatientExtendEarBirth.setBabyPatientId(babyPatientId); |
| 160 | 214 | } |
| 161 | - if(null!=babyPatientExtendEarBirth) | |
| 215 | + if (null != babyPatientExtendEarBirth) | |
| 162 | 216 | babyPatientExtendEarBirth.setBabyPatientId(babyPatientId); |
| 163 | - if(null!=babyPatientExtendEarFamily){ | |
| 217 | + if (null != babyPatientExtendEarFamily) { | |
| 164 | 218 | babyPatientExtendEarFamily.setBabyPatientId(babyPatientId); |
| 165 | 219 | } |
| 166 | - if(null!=babyPatientExtendEarMother) { | |
| 220 | + if (null != babyPatientExtendEarMother) { | |
| 167 | 221 | babyPatientExtendEarMother.setBabyPatientId(babyPatientId); |
| 168 | 222 | } |
| 169 | 223 | //判断是否是新增 |
| 170 | - if(StringUtils.isEmpty(((AbstracUuidEntity)babyPatientExtendEarBirth).getId())){ | |
| 224 | + if (StringUtils.isEmpty(((AbstracUuidEntity) babyPatientExtendEarBirth).getId())) { | |
| 171 | 225 | babyPatientExtendEarBirthService.addBabyPatientExtendEarBirth(babyPatientExtendEarBirth); |
| 172 | - }else{ | |
| 226 | + } else { | |
| 173 | 227 | babyPatientExtendEarBirthService.updateBabyPatientExtendEarBirth(babyPatientExtendEarBirth); |
| 174 | 228 | } |
| 175 | 229 | //判断是否是新增 |
| 176 | - if(StringUtils.isEmpty(((AbstracUuidEntity)babyPatientExtendEarFamily).getId())){ | |
| 230 | + if (StringUtils.isEmpty(((AbstracUuidEntity) babyPatientExtendEarFamily).getId())) { | |
| 177 | 231 | babyPatientExtendEarFamilyService.addBabyPatientExtendEarFamily(babyPatientExtendEarFamily); |
| 178 | - }else{ | |
| 232 | + } else { | |
| 179 | 233 | babyPatientExtendEarFamilyService.updateBabyPatientExtendEarFamily(babyPatientExtendEarFamily); |
| 180 | 234 | } |
| 181 | 235 | //判断是否是新增 |
| 182 | - if(StringUtils.isEmpty(((AbstracUuidEntity)babyPatientExtendEarMother).getId())){ | |
| 236 | + if (StringUtils.isEmpty(((AbstracUuidEntity) babyPatientExtendEarMother).getId())) { | |
| 183 | 237 | babyPatientExtendEarMotherService.addBabyPatientExtendEarMother(babyPatientExtendEarMother); |
| 184 | - }else{ | |
| 238 | + } else { | |
| 185 | 239 | babyPatientExtendEarMotherService.updateBabyPatientExtendEarMother(babyPatientExtendEarMother); |
| 186 | 240 | } |
| 187 | 241 | } |
| 188 | 242 | |
| 189 | 243 | |
| 190 | 244 | |
| ... | ... | @@ -193,17 +247,17 @@ |
| 193 | 247 | * |
| 194 | 248 | * @param babyId |
| 195 | 249 | */ |
| 196 | - public BaseResponse findBabyEarById(String babyId){ | |
| 250 | + public BaseResponse findBabyEarById(String babyId) { | |
| 197 | 251 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
| 198 | - BabyModel babyModel = babyService.getOneBabyById(babyId); | |
| 199 | - if(null!=babyModel){ | |
| 252 | + BabyModel babyModel = babyService.getOneBabyById(babyId); | |
| 253 | + if (null != babyModel) { | |
| 200 | 254 | //兒童信息 |
| 201 | 255 | BabyEarResult babyEarResult = new BabyEarResult(); |
| 202 | - BabyEarBase babyEarBase =new BabyEarBase(babyModel); | |
| 256 | + BabyEarBase babyEarBase = new BabyEarBase(babyModel); | |
| 203 | 257 | BabyPatientExtendEarQuery babyPatientExtendEarQuery = new BabyPatientExtendEarQuery(); |
| 204 | 258 | babyPatientExtendEarQuery.setBabyPatientId(babyModel.getId()); |
| 205 | - List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(babyPatientExtendEarQuery); | |
| 206 | - if(CollectionUtils.isNotEmpty(babyPatientExtendEars)){ | |
| 259 | + List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(babyPatientExtendEarQuery); | |
| 260 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEars)) { | |
| 207 | 261 | babyEarBase.setId(babyPatientExtendEars.get(0).getId()); |
| 208 | 262 | } |
| 209 | 263 | |
| ... | ... | @@ -211,7 +265,7 @@ |
| 211 | 265 | BabyPatientExtendEarMotherQuery babyPatientExtendEarMotherQuery = new BabyPatientExtendEarMotherQuery(); |
| 212 | 266 | babyPatientExtendEarMotherQuery.setBabyPatientId(babyId); |
| 213 | 267 | List<BabyPatientExtendEarMother> babyPatientExtendEarMothers = babyPatientExtendEarMotherService.queryBabyPatientExtendEarMother(babyPatientExtendEarMotherQuery); |
| 214 | - if(CollectionUtils.isNotEmpty(babyPatientExtendEarMothers)){ | |
| 268 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarMothers)) { | |
| 215 | 269 | babyEarResult.setPatientExtendEarMother(babyPatientExtendEarMothers.get(0)); |
| 216 | 270 | } |
| 217 | 271 | |
| 218 | 272 | |
| 219 | 273 | |
| 220 | 274 | |
| 221 | 275 | |
| 222 | 276 | |
| 223 | 277 | |
| ... | ... | @@ -219,42 +273,40 @@ |
| 219 | 273 | BabyPatientExtendEarFamilyQuery babyPatientExtendEarFamilyQuery = new BabyPatientExtendEarFamilyQuery(); |
| 220 | 274 | babyPatientExtendEarFamilyQuery.setBabyPatientId(babyId); |
| 221 | 275 | |
| 222 | - List<BabyPatientExtendEarFamily> babyPatientExtendEarFamilies= babyPatientExtendEarFamilyService.queryBabyPatientExtendEarFamily(babyPatientExtendEarFamilyQuery); | |
| 223 | - if(CollectionUtils.isNotEmpty(babyPatientExtendEarFamilies)){ | |
| 276 | + List<BabyPatientExtendEarFamily> babyPatientExtendEarFamilies = babyPatientExtendEarFamilyService.queryBabyPatientExtendEarFamily(babyPatientExtendEarFamilyQuery); | |
| 277 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarFamilies)) { | |
| 224 | 278 | babyEarResult.setPatientExtendEarFamily(babyPatientExtendEarFamilies.get(0)); |
| 225 | 279 | } |
| 226 | 280 | |
| 227 | 281 | BabyPatientExtendEarBirthQuery babyPatientExtendEarBirthQuery = new BabyPatientExtendEarBirthQuery(); |
| 228 | 282 | babyPatientExtendEarBirthQuery.setBabyPatientId(babyId); |
| 229 | - List<BabyPatientExtendEarBirth> babyPatientExtendEarBirths= babyPatientExtendEarBirthService.queryBabyPatientExtendEarBirth(babyPatientExtendEarBirthQuery); | |
| 283 | + List<BabyPatientExtendEarBirth> babyPatientExtendEarBirths = babyPatientExtendEarBirthService.queryBabyPatientExtendEarBirth(babyPatientExtendEarBirthQuery); | |
| 230 | 284 | |
| 231 | - if(CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)){ | |
| 285 | + if (CollectionUtils.isNotEmpty(babyPatientExtendEarBirths)) { | |
| 232 | 286 | babyEarResult.setBabyBirth(babyPatientExtendEarBirths.get(0)); |
| 233 | 287 | } |
| 234 | 288 | babyEarResult.setBase(babyEarBase); |
| 235 | 289 | objectResponse.setData(babyEarResult); |
| 236 | 290 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 237 | - }else{ | |
| 291 | + } else { | |
| 238 | 292 | objectResponse.setErrorcode(ErrorCodeConstants.BUSINESS_ERROR).setErrormsg("没有对应的儿童"); |
| 239 | 293 | } |
| 240 | 294 | return objectResponse; |
| 241 | 295 | } |
| 242 | 296 | |
| 243 | 297 | |
| 244 | - | |
| 245 | - | |
| 246 | 298 | /** |
| 247 | 299 | * 删除儿童听筛记录 |
| 248 | 300 | * |
| 249 | 301 | * @param babyEarId 儿童听筛id |
| 250 | 302 | * @return |
| 251 | 303 | */ |
| 252 | - public BaseResponse deleteBabyEar(String babyEarId){ | |
| 253 | - BabyPatientExtendEarQuery babyPatientExtendEarQuery=new BabyPatientExtendEarQuery(); | |
| 304 | + public BaseResponse deleteBabyEar(String babyEarId) { | |
| 305 | + BabyPatientExtendEarQuery babyPatientExtendEarQuery = new BabyPatientExtendEarQuery(); | |
| 254 | 306 | babyPatientExtendEarQuery.setId(babyEarId); |
| 255 | 307 | babyPatientExtendEarQuery.setStatus(YnEnums.YES.getId()); |
| 256 | - List<BabyPatientExtendEar> allPatientEar= babyPatientExtendEarService.queryBabyPatientExtendEar(babyPatientExtendEarQuery); | |
| 257 | - if(CollectionUtils.isNotEmpty(allPatientEar)){ | |
| 308 | + List<BabyPatientExtendEar> allPatientEar = babyPatientExtendEarService.queryBabyPatientExtendEar(babyPatientExtendEarQuery); | |
| 309 | + if (CollectionUtils.isNotEmpty(allPatientEar)) { | |
| 258 | 310 | BabyPatientExtendEar babyPatientExtendEar = new BabyPatientExtendEar(); |
| 259 | 311 | babyPatientExtendEar.setStatus(YnEnums.NO.getId()); |
| 260 | 312 | babyPatientExtendEar.setId(babyEarId); |
| 261 | 313 | |
| 262 | 314 | |
| 263 | 315 | |
| 264 | 316 | |
| 265 | 317 | |
| ... | ... | @@ -266,32 +318,32 @@ |
| 266 | 318 | |
| 267 | 319 | /** |
| 268 | 320 | * 查看一条听力筛查 |
| 269 | - * @param babyEarSrcId 听力筛查id | |
| 270 | 321 | * |
| 322 | + * @param babyEarSrcId 听力筛查id | |
| 271 | 323 | * @return |
| 272 | 324 | */ |
| 273 | - public BaseObjectResponse findOneBabyEarSrc(String babyEarSrcId){ | |
| 274 | - BabyPatientExtendEarScreen babyPatientExtendEarScreen= babyPatientExtendEarScreenService.getBabyPatientExtendEarScreen(babyEarSrcId); | |
| 275 | - BaseObjectResponse baseObjectResponse=new BaseObjectResponse(); | |
| 276 | - if(null!=babyPatientExtendEarScreen){ | |
| 277 | - baseObjectResponse.setData(buildBabyEarResult(babyPatientExtendEarScreen)); | |
| 325 | + public BaseObjectResponse findOneBabyEarSrc(String babyEarSrcId) { | |
| 326 | + BabyPatientExtendEarScreen babyPatientExtendEarScreen = babyPatientExtendEarScreenService.getBabyPatientExtendEarScreen(babyEarSrcId); | |
| 327 | + BaseObjectResponse baseObjectResponse = new BaseObjectResponse(); | |
| 328 | + if (null != babyPatientExtendEarScreen) { | |
| 329 | + baseObjectResponse.setData(buildBabyEarResult(babyPatientExtendEarScreen)); | |
| 278 | 330 | baseObjectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 279 | 331 | baseObjectResponse.setErrormsg("成功"); |
| 280 | - }else { | |
| 332 | + } else { | |
| 281 | 333 | baseObjectResponse.setErrorcode(ErrorCodeConstants.BUSINESS_ERROR); |
| 282 | 334 | baseObjectResponse.setErrormsg("无效记录"); |
| 283 | 335 | } |
| 284 | 336 | return baseObjectResponse; |
| 285 | 337 | } |
| 286 | 338 | |
| 287 | - public Map buildBabyEarResult(BabyPatientExtendEarScreen babyPatientExtendEarScreen){ | |
| 288 | - Map<String,String> data=new HashMap<>(); | |
| 339 | + public Map buildBabyEarResult(BabyPatientExtendEarScreen babyPatientExtendEarScreen) { | |
| 340 | + Map<String, String> data = new HashMap<>(); | |
| 289 | 341 | data.put("id", babyPatientExtendEarScreen.getId()); |
| 290 | 342 | data.put("babyId", babyPatientExtendEarScreen.getBabyId()); |
| 291 | - data.put("screenType", babyPatientExtendEarScreen.getScreenType()==1?"初筛":"复筛");//1= 2= | |
| 292 | - data.put("checkHospitalId",babyPatientExtendEarScreen.getCheckHospitalId()); | |
| 293 | - data.put("checkHospital",organizationService.getOrganization(Integer.valueOf(babyPatientExtendEarScreen.getCheckHospitalId())).getName()); | |
| 294 | - data.put("screenDate",DateUtil.getYmd(babyPatientExtendEarScreen.getScreenDate())); | |
| 343 | + data.put("screenType", babyPatientExtendEarScreen.getScreenType() == 1 ? "初筛" : "复筛");//1= 2= | |
| 344 | + data.put("checkHospitalId", babyPatientExtendEarScreen.getCheckHospitalId()); | |
| 345 | + data.put("checkHospital", organizationService.getOrganization(Integer.valueOf(babyPatientExtendEarScreen.getCheckHospitalId())).getName()); | |
| 346 | + data.put("screenDate", DateUtil.getYmd(babyPatientExtendEarScreen.getScreenDate())); | |
| 295 | 347 | data.put("highRiskCause", HighRiskEnum.getTitle(babyPatientExtendEarScreen.getHighRiskCause())); |
| 296 | 348 | data.put("oaeLeft", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getOaeLeft())); |
| 297 | 349 | data.put("oaeRight", BabyEarResultEnums.getTitle(babyPatientExtendEarScreen.getOaeRight())); |
| 298 | 350 | |
| 299 | 351 | |
| 300 | 352 | |
| 301 | 353 | |
| 302 | 354 | |
| 303 | 355 | |
| 304 | 356 | |
| 305 | 357 | |
| 306 | 358 | |
| 307 | 359 | |
| 308 | 360 | |
| ... | ... | @@ -306,60 +358,56 @@ |
| 306 | 358 | data.put("gjb3Slc26a42168", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb3Slc26a42168())); |
| 307 | 359 | |
| 308 | 360 | data.put("gjb3Slc26a4Ivs7", DeafEnums.getTitle(babyPatientExtendEarScreen.getGjb3Slc26a4Ivs7())); |
| 309 | - data.put("processOptionType", babyPatientExtendEarScreen.getProcessOptionType()==1?"复筛":"诊断");//1=复筛 2=诊断 | |
| 361 | + data.put("processOptionType", babyPatientExtendEarScreen.getProcessOptionType() == 1 ? "复筛" : "诊断");//1=复筛 2=诊断 | |
| 310 | 362 | data.put("processOptionDesc", babyPatientExtendEarScreen.getProcessOptionDesc()); |
| 311 | - data.put("guidOpinion",babyPatientExtendEarScreen.getGuidOpinion()); | |
| 312 | - data.put("checkDoctorId",babyPatientExtendEarScreen.getCheckDoctorId()); | |
| 313 | - data.put("checkDoctor",usersService.getUsers(Integer.valueOf(babyPatientExtendEarScreen.getCheckDoctorId())).getName()); | |
| 314 | - data.put("referralDate",DateUtil.getYmd(babyPatientExtendEarScreen.getReferralDate())); | |
| 315 | - return data; | |
| 363 | + data.put("guidOpinion", babyPatientExtendEarScreen.getGuidOpinion()); | |
| 364 | + data.put("checkDoctorId", babyPatientExtendEarScreen.getCheckDoctorId()); | |
| 365 | + data.put("checkDoctor", usersService.getUsers(Integer.valueOf(babyPatientExtendEarScreen.getCheckDoctorId())).getName()); | |
| 366 | + data.put("referralDate", DateUtil.getYmd(babyPatientExtendEarScreen.getReferralDate())); | |
| 367 | + return data; | |
| 316 | 368 | } |
| 317 | 369 | |
| 318 | 370 | |
| 319 | - | |
| 320 | - | |
| 321 | - | |
| 322 | - | |
| 323 | 371 | /** |
| 324 | 372 | * 刪除一個產曬 |
| 373 | + * | |
| 325 | 374 | * @return |
| 326 | 375 | */ |
| 327 | - public BaseResponse delOneBabyEarSrc(String id,Integer userId){ | |
| 328 | - if(StringUtils.isEmpty(id)){ | |
| 329 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("id不能为空"); | |
| 376 | + public BaseResponse delOneBabyEarSrc(String id, Integer userId) { | |
| 377 | + if (StringUtils.isEmpty(id)) { | |
| 378 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("id不能为空"); | |
| 330 | 379 | } |
| 331 | - BabyPatientExtendEarScreen babyPatientExtendEarScreen =new BabyPatientExtendEarScreen(); | |
| 380 | + BabyPatientExtendEarScreen babyPatientExtendEarScreen = new BabyPatientExtendEarScreen(); | |
| 332 | 381 | babyPatientExtendEarScreen.setId(id); |
| 333 | 382 | babyPatientExtendEarScreen.setStatus(1); |
| 334 | 383 | babyPatientExtendEarScreen.setLastUpdateHospitalId(autoMatchFacade.getHospitalId(userId)); |
| 335 | 384 | babyPatientExtendEarScreen.setLastUpdateUserId(userId + ""); |
| 336 | 385 | babyPatientExtendEarScreen.setLastUpdateDate(new Date()); |
| 337 | 386 | babyPatientExtendEarScreenService.updateBabyPatientExtendEarScreen(babyPatientExtendEarScreen); |
| 338 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 387 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 339 | 388 | } |
| 340 | 389 | |
| 341 | 390 | |
| 342 | - | |
| 343 | 391 | /** |
| 344 | 392 | * 增加产晒 |
| 345 | 393 | * |
| 346 | 394 | * @return |
| 347 | 395 | */ |
| 348 | - public BaseResponse addOneBabyEarSrc(BabyScreenAddRequest babyScreenAddRequest,Integer userId){ | |
| 349 | - BabyPatientExtendEarScreen babyPatientExtendEarScreen =babyScreenAddRequest.convertToDataModel(); | |
| 350 | - if(null!=babyPatientExtendEarScreen){ | |
| 351 | - String hId= autoMatchFacade.getHospitalId(userId); | |
| 352 | - if(StringUtils.isEmpty(babyPatientExtendEarScreen.getId())){ | |
| 396 | + public BaseResponse addOneBabyEarSrc(BabyScreenAddRequest babyScreenAddRequest, Integer userId) { | |
| 397 | + BabyPatientExtendEarScreen babyPatientExtendEarScreen = babyScreenAddRequest.convertToDataModel(); | |
| 398 | + if (null != babyPatientExtendEarScreen) { | |
| 399 | + String hId = autoMatchFacade.getHospitalId(userId); | |
| 400 | + if (StringUtils.isEmpty(babyPatientExtendEarScreen.getId())) { | |
| 353 | 401 | babyPatientExtendEarScreen.setCreateDate(new Date()); |
| 354 | 402 | babyPatientExtendEarScreen.setCreateUserId(userId + ""); |
| 355 | 403 | babyPatientExtendEarScreen.setCreateHospitalId(hId); |
| 356 | 404 | babyPatientExtendEarScreen.setLastUpdateDate(new Date()); |
| 357 | - babyPatientExtendEarScreen.setLastUpdateUserId(userId+""); | |
| 405 | + babyPatientExtendEarScreen.setLastUpdateUserId(userId + ""); | |
| 358 | 406 | babyPatientExtendEarScreen.setLastUpdateHospitalId(hId); |
| 359 | 407 | babyPatientExtendEarScreenService.addBabyPatientExtendEarScreen(babyPatientExtendEarScreen); |
| 360 | - }else{ | |
| 408 | + } else { | |
| 361 | 409 | babyPatientExtendEarScreen.setLastUpdateDate(new Date()); |
| 362 | - babyPatientExtendEarScreen.setLastUpdateUserId(userId+""); | |
| 410 | + babyPatientExtendEarScreen.setLastUpdateUserId(userId + ""); | |
| 363 | 411 | babyPatientExtendEarScreen.setLastUpdateHospitalId(hId); |
| 364 | 412 | babyPatientExtendEarScreenService.updateBabyPatientExtendEarScreen(babyPatientExtendEarScreen); |
| 365 | 413 | } |