diff --git a/platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java b/platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java index 8ef3ffd..abdbcec 100644 --- a/platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java +++ b/platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java @@ -498,6 +498,45 @@ public class Patients extends BaseModel { //his病人ID private String patientHId; + //血糖筛查结果 + private String glucm;//空腹 + private String gluthree;//60分钟血糖 + private String glufour;//120分钟血糖 + //产筛结果 + private String nipt;//唐氏筛查/无创DNA检测 + + public String getGlucm() { + return glucm; + } + + public void setGlucm(String glucm) { + this.glucm = glucm; + } + + public String getGluthree() { + return gluthree; + } + + public void setGluthree(String gluthree) { + this.gluthree = gluthree; + } + + public String getGlufour() { + return glufour; + } + + public void setGlufour(String glufour) { + this.glufour = glufour; + } + + public String getNipt() { + return nipt; + } + + public void setNipt(String nipt) { + this.nipt = nipt; + } + public String getVillageId() { return villageId; } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java index d51ac79..2484931 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java @@ -662,6 +662,14 @@ public class PregnantBuildController extends BaseController { } + @RequestMapping(value = "/deleteVideo", method = RequestMethod.POST) + @ResponseBody + public BaseResponse deleteVideo(@RequestParam(value="fileName") String fileName){ + return bookbuildingFacade.deleteVideo(fileName); + + } + + /** * 图片上次 * diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java index 1abdedf..4a8386b 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java @@ -3463,6 +3463,30 @@ public class BookbuildingFacade { return patientId; } + public BaseResponse deleteVideo(String fileName){ + BaseObjectResponse objectResponse = new BaseObjectResponse(); + try { + String arrays[]= fileName.split("/id_photo"); + if (arrays.length>1){ + File file = new File(BASE_IMG_PATH +arrays[1]); + file.delete(); + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); + objectResponse.setErrormsg("成功"); + return objectResponse; + }else { + objectResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR); + objectResponse.setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION); + return objectResponse; + } + }catch (Exception e){ + ExceptionUtils.catchException(e, "上传文件发生异常"); + objectResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR); + objectResponse.setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION); + return objectResponse; + } + + } + public BaseResponse uploadVideo(String fileName, MultipartFile file, int chunk, int chunks) { @@ -3477,6 +3501,7 @@ public class BookbuildingFacade { tempsDir.mkdirs(); } //储存为临时文件 + System.out.println(tempsDir.getAbsolutePath()+"/"+fileName+".part"+ chunk); File tempFile = new File(tempsDir.getAbsolutePath()+"/"+fileName+".part"+ chunk); file.transferTo(tempFile); //检查分片是否下载完成 diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java index 66017b0..a5f4640 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java @@ -213,6 +213,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient Map result = getWeightRangeIsNormal(patients, pw); pw.setIsNormal(result.get("isNormal")); pw.setIsUp(Integer.parseInt(result.get("isUp"))); + pw.setType(patients.getType()); if(null!=patientWeight.getIsPrint()){ pw.setIsPrint(patientWeight.getIsPrint()); } @@ -256,6 +257,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient } else { patientWeight.setOperaterId(userId.toString()); patientWeight.setModified(new Date()); + patientWeight.setType(patients.getType()); patientWeightService2.update(Query.query(Criteria.where("id").is(patientWeight.getId())), patientWeight); return RespBuilder.buildSuccess(patientWeight.getId()); } @@ -1405,6 +1407,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient dayWeights2.add(m); } pw.setDayWeights2(dayWeights2); + pw.setType(patients.getType()); pw.setModified(new Date()); patientWeightService2.update(Query.query(Criteria.where("id").is(pw.getId())), pw); return RespBuilder.buildSuccess(pw); @@ -1427,6 +1430,7 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient patientWeight.setBmi(getBmi(patientWeight.getBeforeWeight(), patientWeight.getBeforeHeight())); } patientWeight.setYn("1"); + patientWeight.setType(patients.getType()); patientWeight.setPid(patients.getPid()); patientWeight.setDayWeights(dayWeights); patientWeight.setId(null); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FileUtils.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FileUtils.java index 20a5306..7419265 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FileUtils.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FileUtils.java @@ -19,7 +19,7 @@ public class FileUtils { * @param chunks * @return */ - public int successChunks(String fileName,int chunks){ + public synchronized int successChunks(String fileName,int chunks){ int chunksNow = successChunksCount.get(fileName)==null ? 0 : successChunksCount.get(fileName); chunksNow ++; if(chunks==chunksNow){ @@ -41,6 +41,7 @@ public class FileUtils { */ public boolean mergeChunks(String sourceDirPath, String destDirPath,String fileName,int chunks) throws Exception{ + //创建目标目录 File destDir = new File(destDirPath); if(!destDir.exists()){ @@ -53,7 +54,6 @@ public class FileUtils { //循环将每个分片的数据写入目标文件 byte[] fileBuffer = new byte[1024];//文件读写缓存 int readBytesLength = 0;//每次读取字节数 - System.out.println(("开始合并文件="+fileName)); for(int i=0; i