超声增加查看视频和插入图片方法
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled

This commit is contained in:
lxd 2024-09-05 11:39:21 +08:00
parent b0b5c56acd
commit 2be0ed2de0
7 changed files with 84 additions and 32 deletions

View File

@ -8,18 +8,8 @@ import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.service.dicomworklist.DicomworklistService;
import cn.iocoder.yudao.module.system.service.org.OrgUnitService;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import com.fasterxml.jackson.databind.SerializationFeature;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.apache.http.entity.ContentType;
import cn.hutool.core.date.DateTime;
import cn.iocoder.yudao.module.ultrasoniccom.controller.admin.ultrasonic.medicalimg.insimagescreenshotVO;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.devicevo.DeviceVO;
import cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.devicevo.deviceupVO;
import cn.iocoder.yudao.module.applyregistration.dal.dataobject.applyform.ApplyformDO;
import cn.iocoder.yudao.module.applyregistration.dal.device.DeviceDO;
import cn.iocoder.yudao.module.ultrasoniccom.controller.admin.ultrasonic.medicalimg.medicalimgVO;
import cn.iocoder.yudao.module.ultrasoniccom.controller.admin.ultrasonic.medicalimg.upmedicalimgVO;
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.medicalimg.medicalimgDO;
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicDO;
@ -29,9 +19,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission;
import cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.ApplyformController;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
@ -43,8 +31,6 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
@ -114,8 +100,7 @@ public class ultrasonicController {
.filter(ultrasonicDO -> Objects.equals(ultrasonicDO.getPrivateDoctorId(), user.getDoctorID()))
.collect(Collectors.toList());
}
else// 共有
} else// 共有
{
// 筛选条件
filteredList = filteredList.stream()
@ -172,8 +157,7 @@ public class ultrasonicController {
parent.children = new ArrayList<>(); // 初始化 parent.children 列表
}
parent.children.add(tree);
}
else if(privateId!=null && !privateId.isEmpty())//判断是否是私有模版 私有的直接加到树里面
} else if (privateId != null && !privateId.isEmpty())//判断是否是私有模版 私有的直接加到树里面
{
treeList.add(tree);
}
@ -199,6 +183,15 @@ public class ultrasonicController {
return success(BeanUtils.toBean(devicelist, medicalimgDO.class));
}
@GetMapping("/GetImageVideo")
@Operation(summary = "获取图片表视频")
public CommonResult<String> GetImageVideo(@RequestParam("regID") String regId) {
//当前登陆用户
AdminUserDO user = userService.getUser(getLoginUserId());
String imgurl = medicalimgService.GetImagevideo(user.getOrgId(), regId);
return success(imgurl);
}
@PutMapping("/examineimageupdate")
@Operation(summary = "超声审核更新图片数据")
@ -348,5 +341,26 @@ public class ultrasonicController {
return success(strJson);
}
@PostMapping("/insimagescreenshot")
@Operation(summary = "插入视频截屏图像")
public int InsImageScreenshot(@RequestBody insimagescreenshotVO insimagescreenshotVO) {
//当前时间
LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
//当前登陆用户
AdminUserDO user = userService.getUser(getLoginUserId());
// 生成随机 UUID
UUID randomUUID = UUID.randomUUID();
medicalimgDO medicalimgDO = new medicalimgDO();
medicalimgDO.setId(randomUUID.toString());
medicalimgDO.setImgUrl(insimagescreenshotVO.getImagebase());
medicalimgDO.setCreatePerson(user.getUsername());
medicalimgDO.setCreateDate(dateTime);
medicalimgDO.setRegId(insimagescreenshotVO.getID());
medicalimgDO.setOrgId(user.getOrgId());
medicalimgDO.setSelected("0");
medicalimgDO.setImgType("1");
return medicalimgService.insimage(medicalimgDO);
}
}

View File

@ -92,4 +92,7 @@ public class medicalimgDO {
*/
@TableField("selected")
private String selected;
@TableField("imgType")
private String imgType;
}

View File

@ -1,7 +1,6 @@
package cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.medicalimg;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicDO;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -16,4 +15,6 @@ public interface medicalimgMapper extends BaseMapperX<medicalimgDO> {
List<medicalimgDO> getmedicalimgist(@Param("orgId") String orgId,@Param("regId") String regId,@Param("select") String select);
List<medicalimgDO> getmedicalimgist(UserDataDocumentFactory UserDataDocumentFactory);
String GetImageVideo(@Param("orgId") String orgId,@Param("regId") String regId);
}

View File

@ -16,4 +16,9 @@ public interface medicalimgService extends IService<medicalimgDO> {
void updatePatientexamlist(@Valid medicalimgVO medicalimgVO);
int insimage(medicalimgDO medicalimgDO);
String GetImagevideo(String orgId,String regId);
}

View File

@ -12,6 +12,7 @@ import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.util.List;
import java.util.UUID;
@Service
@Validated
@ -32,4 +33,14 @@ public class medicalimgServiceImpl extends ServiceImpl<medicalimgMapper, medical
medicalimgDO updateObj = BeanUtils.toBean(updateReqVO, medicalimgDO.class);
medicalimgMapper.updateById(updateObj);
}
@Override
public int insimage(medicalimgDO medicalimgDO) {
return medicalimgMapper.insert(medicalimgDO);
}
@Override
public String GetImagevideo(String orgId,String regId) {
return medicalimgMapper.GetImageVideo(orgId,regId);
}
}

View File

@ -25,4 +25,6 @@ public interface ultrasonicService extends IService<ultrasonicDO> {
List<medicalimgDO> getmedicalimgist(@Param("orgId") String orgId, @Param("regId") String regId,@Param("select") String select);
void updatePatientexamlist(@Valid medicalimgVO medicalimgVO);
}

View File

@ -14,7 +14,7 @@
WHERE
<trim prefixOverrides="and | or">
<if test="orgId != null or regId != null">
AND (isDelete != '1' OR isDelete IS NULL)
AND (isDelete != '1' OR isDelete IS NULL) AND imgType='1'
</if>
<if test="orgId != null">
AND orgId = #{orgId}
@ -27,6 +27,22 @@
</if>
</trim>
</select>
<select id="GetImageVideo" resultType="java.lang.String">
SELECT imgUrl FROM tb_medicalimg
WHERE
<trim prefixOverrides="and | or">
<if test="orgId != null or regId != null">
AND (isDelete != '1' OR isDelete IS NULL) AND imgType='2'
</if>
<if test="orgId != null">
AND orgId = #{orgId}
</if>
<if test="regId != null">
AND regId = #{regId}
</if>
</trim>
</select>
<!-- @Param("NameList")-->