专病路径取消全增全删
This commit is contained in:
parent
a697410e52
commit
9a1ead4f48
@ -95,4 +95,7 @@ public interface SpecialDiseaseNodeMapper {
|
||||
* @return 专病路径-管理节点信息
|
||||
*/
|
||||
List<PatientSpecialDiseaseNodeVo> selectRouteNodeByRouteId(Long specialDiseaseRouteId);
|
||||
|
||||
|
||||
List<Long> selectSpecialDiseaseRouteIds(Long specialDiseaseRouteId);
|
||||
}
|
||||
|
||||
@ -121,6 +121,7 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
return AjaxResult.error("已发布过的专病路径不能修改!");
|
||||
}
|
||||
}
|
||||
List<Long> longs = specialDiseaseNodeMapper.selectSpecialDiseaseRouteIds(specialDiseaseNode.getSpecialDiseaseRouteId());
|
||||
SpecialDiseaseRoute specialDiseaseRoute = new SpecialDiseaseRoute();
|
||||
BeanUtils.copyBeanProp(specialDiseaseRoute, specialDiseaseNode);
|
||||
specialDiseaseRoute.setUpdateTime(LocalDateTime.now());
|
||||
@ -139,7 +140,8 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
if (CollectionUtils.isEmpty(specialDiseaseNode.getSpecialDiseaseNodeList())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
ArrayList<SpecialDiseaseNodeVO> specialDiseaseNodeVOS = new ArrayList<>();
|
||||
List<SpecialDiseaseNodeVO> specialDiseaseNodeVOS = new ArrayList<>();
|
||||
int i = 0;
|
||||
for (SpecialDiseaseNodeVO diseaseNode : specialDiseaseNode.getSpecialDiseaseNodeList()) {
|
||||
if (StringUtils.isNotBlank(diseaseNode.getRouteNodeName()) && Objects.nonNull(diseaseNode.getRouteNodeDay()) && StringUtils.isNotBlank(diseaseNode.getTaskType()) && StringUtils.isNotBlank(diseaseNode.getTaskSubdivision()) && StringUtils.isNotBlank(diseaseNode.getTaskStatus())) {
|
||||
diseaseNode.setRouteId(specialDiseaseRoute.getId());
|
||||
@ -151,6 +153,10 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
||||
}
|
||||
diseaseNode.setUpdateTime(LocalDateTime.now());
|
||||
diseaseNode.setUpdateBy(SecurityUtils.getUsername());
|
||||
if (CollectionUtils.isNotEmpty(longs) && (i < longs.size()) && Objects.nonNull(longs.get(i))) {
|
||||
diseaseNode.setId(longs.get(i));
|
||||
i++;
|
||||
}
|
||||
specialDiseaseNodeVOS.add(diseaseNode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -652,6 +652,7 @@
|
||||
|
||||
<insert id="insertSpecialDiseaseNodeList">
|
||||
insert into special_disease_node(
|
||||
id,
|
||||
route_id,
|
||||
route_name,
|
||||
route_node_name,
|
||||
@ -698,6 +699,7 @@
|
||||
) values
|
||||
<foreach item="specialDiseaseNodeList" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{specialDiseaseNodeList.id},
|
||||
#{specialDiseaseNodeList.routeId},
|
||||
#{specialDiseaseNodeList.routeName},
|
||||
#{specialDiseaseNodeList.routeNodeName},
|
||||
@ -849,4 +851,10 @@
|
||||
where sdr.id = #{specialDiseaseRouteId} and sdn.node_content like '%data-w-e-type%'
|
||||
and sdn.route_check_status = 'AGREE'
|
||||
</select>
|
||||
|
||||
<select id="selectSpecialDiseaseRouteIds" resultType="java.lang.Long">
|
||||
select id
|
||||
from special_disease_node
|
||||
where route_id = #{routeId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user