按需采集pacs需求不一样

master
zengwh 5 years ago
parent 792e59fc60
commit f4082898a3

@ -24,7 +24,7 @@ public interface ArchiveOtherExtMapper {
List<ArchiveOtherExtVo> selectAllByIds(@Param("ids") String ids);
//int updateSubmit(@Param("ids")String ids);
int updateSubmit(@Param("ids")String ids);
/**
* ids
@ -52,4 +52,6 @@ public interface ArchiveOtherExtMapper {
* @return
*/
String selectMaxETimeByNursingAndJzh(@Param("patientId")String patientId);
List<ArchiveOtherExt> selectListBySysFlagAndIds(@Param("sysFlag")Integer sysFlag,@Param("ids")String ids);
}

@ -170,6 +170,18 @@ public class ArchiveOtherExtService {
}else{
notExistTemp = idsTemp;
}
//查询是否存在pacs集合
List<ArchiveOtherExt> pacsOtherExts = archiveOtherExtMapper.selectListBySysFlagAndIds(3, idsTemp);
if(!CollectionUtils.isEmpty(pacsOtherExts)){
StringBuilder pacsIds = new StringBuilder();
for(ArchiveOtherExt obj : pacsOtherExts){
if(StringUtils.isNotBlank(pacsIds)){
pacsIds.append(",");
}
pacsIds.append("'").append(obj.getId()).append("'");
}
archiveOtherExtMapper.updateSubmit(pacsIds.toString());
}
//不存在的部门批量添加
//查询other_ext记录
if(StringUtils.isNotBlank(notExistTemp)) {

@ -503,7 +503,7 @@
CONVERT(varchar(19),eTime,120) etimeStr
from archive_other_ext where id in (${ids})
</select>
<!--&lt;!&ndash;批量更新statusFlag = 0&ndash;&gt;
<!--批量更新statusFlag = 0-->
<update id="updateSubmit">
update archive_other_ext
set statusFlag = 0,T2 = '1801-02-03'
@ -512,7 +512,7 @@
ID in (${ids})
</if>
</where>
</update>-->
</update>
<!--根据ids字段的查询与同步更新比较时间比较较晚时间的集合-->
<select id="selectAllByIdsAndSubmitTime" resultMap="BaseResultMap">
SELECT
@ -612,4 +612,16 @@
<select id="selectMaxETimeByNursingAndJzh" resultType="java.lang.String">
select top 1 convert(varchar(19),eTime,120) eTime from archive_other_ext where sysFlag = 1 and jzh = #{patientId} order by eTime desc
</select>
<!--根据sysFlag和id集合查询记录-->
<select id="selectListBySysFlagAndIds" resultMap="BaseResultMap">
select id from archive_other_ext
<where>
<if test="sysFlag != null">
and sysFlag = #{sysFlag}
</if>
<if test="ids != null and ids != ''">
and id in (${ids})
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save