画像修改

This commit is contained in:
zhangheng 2024-07-04 17:44:58 +08:00
parent d2615383e7
commit 83d6294f8b
6 changed files with 51 additions and 17 deletions

View File

@ -11,18 +11,12 @@ import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO;
import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService;
import com.xinelu.manage.vo.labelfieldcontent.LabelField;
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldAndPartitionDict;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 标签字段内容信息Controller
@ -102,8 +96,8 @@ public class LabelFieldContentController extends BaseController {
* 分组信息
*/
@GetMapping("/groupingContent")
public AjaxResult groupingContent() {
return labelFieldContentService.groupingContent();
public AjaxResult groupingContent(Long patientId) {
return labelFieldContentService.groupingContent(patientId);
}
/**

View File

@ -116,4 +116,13 @@ public interface LabelFieldContentMapper {
* @return int
*/
int updateContentRemarkLabelFieldContentList(List<GroupingValue> labelFieldContentList);
/**
* 查询画像sn
*
* @param taskPartitionDictIds 细分id
* @param patientId 患者id
* @return LabelFieldContent
*/
List<LabelFieldContent> selectLabelFieldContentPortraitSn(@Param("taskPartitionDictIds") List<Long> taskPartitionDictIds, @Param("patientId") Long patientId);
}

View File

@ -72,7 +72,7 @@ public interface ILabelFieldContentService {
*
* @return LabelFieldInfo
*/
AjaxResult groupingContent();
AjaxResult groupingContent(Long patientId);
/**
* 画像查询

View File

@ -171,7 +171,7 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
* @return LabelFieldInfo
*/
@Override
public AjaxResult groupingContent() {
public AjaxResult groupingContent(Long patientId) {
//创建全部选项 TaskPartitionDictId =0为全部
List<LabelFieldInfo> labelFieldInfoList = new ArrayList<>();
LabelFieldInfo labelFieldInfo = new LabelFieldInfo();
@ -181,12 +181,20 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
//任务细分表数据
List<LabelFieldInfo> labelFieldInfos = labelFieldInfoMapper.taskPartitionDictIdList();
if (CollectionUtils.isNotEmpty(labelFieldInfos)) {
List<Long> collect = labelFieldInfos.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getTaskPartitionDictId())).map(LabelFieldInfo::getTaskPartitionDictId).distinct().collect(Collectors.toList());
List<LabelFieldContent> labelFieldContents = labelFieldContentMapper.selectLabelFieldContentPortraitSn(collect,patientId);
if (CollectionUtils.isNotEmpty(labelFieldContents)) {
for (LabelFieldInfo fieldInfo : labelFieldInfos) {
List<String> collect1 = labelFieldContents.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getFieldId()) && fieldInfo.getTaskPartitionDictId().equals(item.getFieldId())).map(LabelFieldContent::getPortraitSn).distinct().collect(Collectors.toList());
fieldInfo.setFieldSort(collect1.size());
}
}
labelFieldInfoList.addAll(labelFieldInfos);
}
//未分组选项 TaskPartitionDictId =null 为未分组
LabelFieldInfo labelFieldInfoTow = new LabelFieldInfo();
labelFieldInfoTow.setTaskPartitionDictName("未分组");
labelFieldInfoList.add(labelFieldInfoTow);
LabelFieldInfo labelFieldInfoTwo = new LabelFieldInfo();
labelFieldInfoTwo.setTaskPartitionDictName("未分组");
labelFieldInfoList.add(labelFieldInfoTwo);
return AjaxResult.success(labelFieldInfoList);
}

View File

@ -71,6 +71,9 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService {
*/
@Override
public List<LabelFieldTreeVO> labelFieldList(Long taskPartitionDictId, String fieldType) {
if (Objects.isNull(taskPartitionDictId)) {
return new ArrayList<>();
}
int i = 1;
//查询细分
List<LabelFieldVO> labelFieldList = labelFieldInfoMapper.selectLabelFieldList(taskPartitionDictId, fieldType);

View File

@ -431,4 +431,24 @@
where id = #{labelFieldContentList.labelFieldContentId}
</foreach>
</update>
<select id="selectLabelFieldContentPortraitSn"
resultType="com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent">
select
lfi.task_partition_dict_id fieldId,
lfc.portrait_sn
from label_field_content lfc
LEFT JOIN label_field_info lfi ON lfc.field_id = lfi.id
<where>
<if test="taskPartitionDictIds != null and taskPartitionDictIds.size() > 0">
lfi.task_partition_dict_id in
<foreach item="taskPartitionDictIds" collection="taskPartitionDictIds" open="(" separator="," close=")">
#{taskPartitionDictIds}
</foreach>
</if>
<if test="patientId != null">
AND patient_id = #{patientId}
</if>
</where>
</select>
</mapper>