修改5分钟刷新一下完整性,不完整的查任务视图提供的文件路径并下载,增加根据时间区间刷新完整性接口

docus-active-query-service_1.3
zengwh 3 years ago
parent c9d5000e2c
commit 3d9bcecd4e

@ -10,7 +10,7 @@
//
"downurl":"WEB_ADDRESS",
//id
"assortid":"15E7FE7803F545CB81390BC88E725240",
"assortid":"",
//id
"collectorid":"14",
//( 1:2)
@ -18,7 +18,7 @@
//(1:2ftp3)
"filestoragetype":1,
//
"uploadConnector":"http://192.168.1.107:9291/api/downplatform/report",
"uploadConnector":"http://127.0.0.1:9291/api/downplatform/report",
//doubleBasic
"basicDirectory":["Msg","ReportInfo"],
//

@ -0,0 +1 @@
{"lastTime":"2022-04-09 00:00:00"}

@ -147,6 +147,11 @@
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.0.9</version>
</dependency>
</dependencies>
<build>

@ -1,17 +1,25 @@
package com.docus.bgts.config;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.docus.bgts.entity.TableJsonRead;
import com.docus.bgts.enums.Codes;
import com.docus.bgts.facade.IBgtsService;
import com.docus.bgts.facade.IMzSyncService;
import com.docus.bgts.utils.FileUtils;
import com.docus.bgts.utils.HttpUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@ -21,6 +29,9 @@ public class MyScheduling {
private String beatUrl;
public static String syncFlag;
private final String tempfilePrefix="dataConfig\\temp";
private final String tempDataFileName="collectTimeTemp";
private final String lastTimeStr="lastTime";
static {
syncFlag=FileUtils.getJsonByName("syncFlag").toString();
@ -35,7 +46,7 @@ public class MyScheduling {
private Logger logger = LogManager.getLogger(MyScheduling.class);
//5分钟执行一次
@Scheduled(fixedRate = 1000 * 60 * 5)
/*@Scheduled(fixedRate = 1000 * 60 * 5)
public void beat() {
Map<String, String> params = new HashMap<>();
params.put("code", String.valueOf(FileUtils.getJsonByName("collectorid")));
@ -45,13 +56,13 @@ public class MyScheduling {
e.printStackTrace();
logger.info("心跳推送出错,可能是住院服务没有开启");
}
}
}*/
/**
*
* 10
*/
@Scheduled(fixedRate = 1000 * 60 * 10)
/*@Scheduled(fixedRate = 1000 * 60 * 10)
public void collect() {
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
String isStartCollect = String.valueOf(FileUtils.getJsonByName("isStartCollect"));
@ -62,19 +73,47 @@ public class MyScheduling {
return;
}
bgtsService.timerCollect();
}
}*/
/**
*
*/
@Scheduled(fixedRate = 1000 * 60 * 30)
@Scheduled(fixedRate = 1000 * 5 * 60)
public void syncIntegrality() {
if (null == syncFlag || "0".equals(syncFlag)) {
} else {
mzSyncService.addSyncIntegrality();
//获取最后时间
String lastDate = getLastDate();
if(StringUtils.isNotBlank(lastDate)) {
Date date = new Date();
boolean flag = mzSyncService.addSyncIntegrality(lastDate, null);
if(flag) {
refreshLastDate(date);
}
}else{
logger.info("采集时间为空");
}
}
}
/**
*
* @return
*/
private String getLastDate(){
TableJsonRead tableJsonRead = new TableJsonRead();
Map<String,String> map = tableJsonRead.Read(tempfilePrefix, tempDataFileName,Map.class);
return map.get(lastTimeStr);
}
/**
*
*/
private void refreshLastDate(Date lastDate){
String lastTime = DateUtil.format(lastDate, "yyyy-MM-dd HH:mm:ss");
TableJsonRead tableJsonRead = new TableJsonRead();
Map<String, String> map = new HashMap<>();
map.put(lastTimeStr, lastTime);
tableJsonRead.Save(tempfilePrefix, tempDataFileName, JSON.toJSONString(map));
}
}

@ -50,6 +50,10 @@ public class BgtsController {
public void syncIntegrality(){
mzSyncService.syncIntegrality();
}
@GetMapping("/addSyncIntegrality")
public void addSyncIntegrality(@RequestParam("startDate")String startDate,String endDate){
mzSyncService.addSyncIntegrality(startDate,endDate);
}
@ApiOperation("采集接口")

@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel("文件详情")
public class MzSyncDetails {
@ -11,4 +13,12 @@ public class MzSyncDetails {
private String serialnum;
@ApiModelProperty("文件标题")
private String fileTitle;
@ApiModelProperty("文件url")
private String fileUrl;
@ApiModelProperty("分类名称")
private String assortName;
@ApiModelProperty("采集器标识")
private String collectid;
@ApiModelProperty("创建时间")
private Date createTime;
}

@ -0,0 +1,95 @@
package com.docus.bgts.entity;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.util.StringUtils;
import java.io.*;
public class TableJsonRead {
/**
*
* @param path
* @param fileName
* @return
*/
public <T> T Read(String path,String fileName,Class<T> clazz){
String currentPath=CurrentPath();
path = currentPath+"\\"+path;
StringBuilder sb = new StringBuilder();
T dto =null;
File file = new File(path+"\\"+fileName);
try {
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
BufferedReader bufferedReader = null;
bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
String line;
while (!StringUtils.isEmpty(line = bufferedReader.readLine())) {
sb.append(line);
}
if (sb.length() > 0) {
ObjectMapper objectMapper = new ObjectMapper();
//dto = (T)JSONObject.parse(sb.toString());
dto= objectMapper.readValue(sb.toString(), clazz);
//dto = objectMapper.convertValue(o, new TypeReference<T>() { });
}
bufferedReader.close();
}
return dto;
}
catch (Exception ex){
ex.printStackTrace();
return null;
}
}
/**
* jar
* @return
*/
private String CurrentPath(){
File dir = new File(".");
String currentpath ="";
try {
currentpath = dir.getCanonicalPath();
} catch (IOException e) {
e.printStackTrace();
}
return currentpath;
}
/**
* json
* @param path
* @param fileName
* @param data json
* @return
*/
public void Save(String path,String fileName,String data){
String currentPath=CurrentPath();
path = currentPath+"\\"+path;
FileWriter fwriter = null;
try {
fwriter = new FileWriter(path+"\\"+fileName);
fwriter.write(data);
} catch (IOException ex) {
ex.printStackTrace();
} finally {
try {
fwriter.flush();
fwriter.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
}

@ -0,0 +1,46 @@
package com.docus.bgts.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author
* @since 2021-04-20
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ZdAssort对象", description="病案分类")
public class ZdAssort implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@ApiModelProperty(value = "分类id")
private String assortId;
@ApiModelProperty(value = "分类名称")
private String assortName;
@ApiModelProperty(value = "分类排序")
private Integer assortSort;
@ApiModelProperty(value = "是否启用 1是0否")
private Integer effective;
@ApiModelProperty(value = "是否校验 1是0否")
private Integer isCheck;
@ApiModelProperty(value = "代码分类")
private String assortCode;
@ApiModelProperty(value = "等级")
private Integer level;
}

@ -1,5 +1,7 @@
package com.docus.bgts.facade;
import java.util.Date;
public interface IMzSyncService {
/**
*
@ -9,5 +11,5 @@ public interface IMzSyncService {
/**
*
*/
void addSyncIntegrality();
boolean addSyncIntegrality(String startDate, String endDate);
}

@ -49,8 +49,7 @@ public interface AfCollectAddMapper extends BaseMapper<AfCollectAdd> {
* jzh
* @param front
* @param later
* @param newSyncTime
* @return
*/
List<String> listJzhAndAdd(@Param("front") int front,@Param("later") int later,@Param("newSyncTime") String newSyncTime);
List<String> listJzhAndAdd(@Param("front") int front,@Param("later") int later,@Param("startDate") String startDate,@Param("endDate")String endDate);
}

@ -0,0 +1,18 @@
package com.docus.bgts.mapper.dbmysql;
import com.docus.bgts.entity.MzSync;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*
* @author
* @since 2021-04-23
*/
public interface TScanAssortMapper {
List<MzSync> selectFilesByJzhs(@Param("jzhs") List<String> jzhs);
}

@ -0,0 +1,30 @@
package com.docus.bgts.mapper.dbmysql;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.docus.bgts.entity.ZdAssort;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*
* @author
* @since 2021-04-20
*/
public interface ZdAssortMapper extends BaseMapper<ZdAssort> {
/**
*
* @param assortName
* @return
*/
List<ZdAssort> selectAll(@Param("assortName") String assortName);
/**
* zdAssort
* @param zdAssort
*/
void insertZdAssort(@Param("zdAssort") ZdAssort zdAssort);
}

@ -1,22 +1,29 @@
package com.docus.bgts.service;
import com.docus.bgts.entity.MzSync;
import com.alibaba.fastjson.JSON;
import com.docus.bgts.entity.*;
import com.docus.bgts.enums.Codes;
import com.docus.bgts.facade.IAfCollectTaskService;
import com.docus.bgts.facade.IMzSyncService;
import com.docus.bgts.mapper.dbmysql.ZdAssortMapper;
import com.docus.bgts.mapper.dbmysql.AfCollectAddMapper;
import com.docus.bgts.mapper.dbmysql.TScanAssortMapper;
import com.docus.bgts.mapper.dboracle.MzSyncMapper;
import com.docus.bgts.utils.FileUtils;
import com.docus.bgts.utils.HttpUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.io.UnsupportedEncodingException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
*
@ -35,7 +42,6 @@ public class MzSyncService implements IMzSyncService {
*
*/
private String newSyncTime;
{
tableName = String.valueOf(FileUtils.getJsonByName("syncTableName"));
tableNamespaces = String.valueOf(FileUtils.getJsonByName("syncTableNamespaces"));
@ -49,14 +55,45 @@ public class MzSyncService implements IMzSyncService {
@Autowired
MzSyncMapper mzSyncMapper;
@Autowired
TScanAssortMapper tScanAssortMapper;
@Autowired
IAfCollectTaskService afCollectTaskService;
@Autowired
ZdAssortMapper zdAssortMapper;
private final Logger log = LoggerFactory.getLogger(getClass());
/**
* url
* @param str
* @return
*/
private String subStrUrl(String str) {
int beginIndex = str.indexOf("http");
int lastIndex = str.lastIndexOf(".pdf");
if (lastIndex == -1){
lastIndex = str.lastIndexOf(".jpg");
}
if(lastIndex == -1){
log.info("不存在pdf或jpg:"+ str);
return null;
}
String newStr = str.substring(beginIndex, lastIndex+4);
return newStr;
}
@Override
public void addSyncIntegrality() {
public boolean addSyncIntegrality(String startDate,String endDate) {
//定义是否更新采集时间
boolean flag = true;
log.info("增量完整性同步开始");
long startTime = System.currentTimeMillis();
//获取分页数
Integer pageSize = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("pageSize")));
int count = 0;
List<String> jzhs;
int front;
int later;
@ -64,13 +101,17 @@ public class MzSyncService implements IMzSyncService {
for (int i = 0; ; i++) {
front = i * pageSize;
later = pageSize;
jzhs = afCollectAddMapper.listJzhAndAdd(front, later, newSyncTime);
jzhs = afCollectAddMapper.listJzhAndAdd(front, later, startDate,endDate);
count += jzhs.size();
if (jzhs.size() == 0) {
if(i == 0){
flag = false;
}
break;
} else {
mzSyncs = mzSyncMapper.listMzSync(jzhs, front, later, tableName, tableNamespaces);
//完整性检验写入
integralityBySyncs(mzSyncs);
integralityBySyncs(mzSyncs,jzhs);
}
if (mzSyncs.size() != 0) {
log.info("本次成功同步数:" + mzSyncs.size());
@ -78,6 +119,7 @@ public class MzSyncService implements IMzSyncService {
}
long endTime = System.currentTimeMillis();
log.info("增量完整性同步结束,程序执行时间为:" + (endTime - startTime) + "毫秒");
return flag;
}
/**
@ -103,7 +145,7 @@ public class MzSyncService implements IMzSyncService {
} else {
mzSyncs = mzSyncMapper.listMzSync(jzhs, front, later, tableName, tableNamespaces);
//完整性检验写入
integralityBySyncs(mzSyncs);
integralityBySyncs(mzSyncs,jzhs);
}
if (mzSyncs.size() != 0) {
log.info("本次成功同步数:" + mzSyncs.size());
@ -119,10 +161,11 @@ public class MzSyncService implements IMzSyncService {
*
* @param mzSyncs
*/
private void integralityBySyncs(List<MzSync> mzSyncs ,List<String>) {
private void integralityBySyncs(List<MzSync> mzSyncs,List<String> jzhs) {
StringBuilder sql;
if (mzSyncs.size() != 0) {
List<Map> maps = afCollectAddMapper.integrality(mzSyncs);
//List<Map> maps = afCollectAddMapper.integrality(mzSyncs);
List<Map> maps = verifyIntegrity(mzSyncs,jzhs);
System.out.println(maps);
sql = new StringBuilder();
for (Map map : maps) {
@ -133,7 +176,6 @@ public class MzSyncService implements IMzSyncService {
sql.append(" where jzh=");
sql.append("'");
sql.append(map.get("jzh"));
sql.append("jzh");
sql.append("'");
sql.append(";");
}
@ -141,4 +183,177 @@ public class MzSyncService implements IMzSyncService {
afCollectAddMapper.dynamicSql(sql.toString());
}
}
/**
*
* @param mzSyncs
* @param jzhs
* @return
*/
private List<Map> verifyIntegrity(List<MzSync> mzSyncs, List<String> jzhs) {
List<Map> maps = new ArrayList<>();
//根据记账号集合查询文件表有效的文件集合
List<MzSync> fileList = tScanAssortMapper.selectFilesByJzhs(jzhs);
//遍历按记账号分组的任务视图
for(MzSync mzSync : mzSyncs){
//定义返回map
Map map = new HashMap();
//获取jzh
String jzh = mzSync.getJzh();
//遍历任务试图文件集合
List<MzSyncDetails> mzSyncDetails = mzSync.getMzSyncDetails();
//定义缺失文件集合
StringBuilder faultFileTitles = new StringBuilder();
for(MzSyncDetails mzSyncDetail : mzSyncDetails){
//获取文件名称
String fileTitle = mzSyncDetail.getFileTitle();
//获取文件序列号
String serialnum = mzSyncDetail.getSerialnum();
//定义是否存在
boolean flag = false;
if(!CollectionUtils.isEmpty(fileList)){
for(MzSync obj : fileList){
//获取jzh
String jzh1 = obj.getJzh();
if(jzh1.equals(jzh)){
List<MzSyncDetails> mzSyncDetails1 = obj.getMzSyncDetails();
for(MzSyncDetails vo : mzSyncDetails1){
//获取文件序列号
String serialnum1 = vo.getSerialnum();
if(vo.getFileTitle().equals(fileTitle) && serialnum1.equals(serialnum)){
flag = true;
mzSyncDetail.setCollectid(vo.getCollectid());
break;
}
}
}
}
}
//遍历文件
if(!flag){
if(StringUtils.isNotBlank(faultFileTitles)){
faultFileTitles.append(",");
}
faultFileTitles.append(fileTitle + "缺失");
//调下载服务
updateFile(jzh,mzSyncDetail);
}
}
if(StringUtils.isBlank(faultFileTitles)){
faultFileTitles = new StringBuilder("完整");
}
map.put("jzh",jzh);
map.put("file_title",faultFileTitles.toString());
maps.add(map);
}
return maps;
}
/**
*{
* "assortid": "string",
* "collectorid": "string",
* "ip": "string",
* "patient": {
* "jzh": "string"
* },
* "scanfiles": [
* {
* "downurl": "string",
* "filesource": 0,
* "filestoragetype": 0,
* "filetitle": "string",
* "filetype": 0,
* "serialnum": "string",
* "taskid": 0
* }
* ],
* "scanusercode": "string",
* "scanusername": "string"
* }
*/
private void updateFile(String jzh,MzSyncDetails mzSyncDetail) {
ReportDownDto reportDownDto;
ReportDownScanFileDto reportDownScanFileDto;
ReportDownPatientDto reportDownPatientDto;
//临时资料存储
String serialnum;
String filetitle;
String downurl;
String collectorid = "";
String assortid = getAssortid(mzSyncDetail.getAssortName());
reportDownDto = new ReportDownDto();
reportDownDto.setAssortid(assortid);
//获取基本数据信息
List<ReportDownScanFileDto> reportDownDtoArr = new ArrayList<>();
reportDownPatientDto = new ReportDownPatientDto();
reportDownPatientDto.setJzh(jzh);
log.info("患者主索引号:" + jzh);
reportDownDto.setPatient(reportDownPatientDto);
filetitle = mzSyncDetail.getFileTitle();
downurl = mzSyncDetail.getFileUrl();
//特殊处理url
downurl = subStrUrl(downurl);
if(StringUtils.isBlank(downurl)){
return;
}
//获取采集流水号
serialnum = mzSyncDetail.getSerialnum();
collectorid = mzSyncDetail.getCollectid();
reportDownScanFileDto = new ReportDownScanFileDto();
reportDownScanFileDto.setDownurl(downurl);
reportDownScanFileDto.setFiletitle(filetitle);
reportDownScanFileDto.setSerialnum(serialnum);
reportDownScanFileDto.setFilesource(1);
reportDownScanFileDto.setFilestoragetype(1);
reportDownDtoArr.add(reportDownScanFileDto);
reportDownDto.setCollectorid(collectorid);
reportDownDto.setScanfiles(reportDownDtoArr);
afCollectTaskService.insert(reportDownDto);
String post = "";
log.info("--------执行上传功能----------");
Map params = JSON.parseObject(JSON.toJSONString(reportDownDto), Map.class);
Map<String, Object> headMap = new HashMap<>();
headMap.put("Content-Type", "application/json");
try {
post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.UPLOAD.getMessage())), headMap, params);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
// String post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.UPLOAD.getMessage())), map, headMap);
if (StringUtils.isBlank(post)) {
log.info("--------上传时出现错误,可能是文件服务没有启动----------");
throw new RuntimeException("上传时出现错误,可能是文件服务没有启动");
}
Map resMap = JSON.parseObject(post, Map.class);
if (String.valueOf(resMap.get("code")).equals("500")) {
throw new RuntimeException(String.valueOf(resMap.get("msg")));
} else {
log.info("----------执行成功-----------");
}
}
/**
* id
*
* @return
*/
private String getAssortid(String assortName) {
String assortId = String.valueOf(FileUtils.getJsonByName("assortid"));
if (StringUtils.isBlank(assortId)) {
List<ZdAssort> zdAssorts = zdAssortMapper.selectAll(assortName);
if (CollectionUtils.isEmpty(zdAssorts)) {
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
ZdAssort zdAssort = new ZdAssort();
zdAssort.setAssortName(assortName);
zdAssort.setAssortId(uuid);
zdAssort.setEffective(1);
zdAssortMapper.insertZdAssort(zdAssort);
assortId = uuid;
} else {
assortId = zdAssorts.get(0).getAssortId();
}
}
return assortId;
}
}

@ -54,7 +54,14 @@
docus_medicalrecord.t_basic a
JOIN t_scan_assort b ON a.patient_id = b.patient_id
WHERE
b.create_time >= #{newSyncTime}
<choose>
<when test="endDate != null and endDate != ''">
b.create_time BETWEEN #{startDate} AND #{endDate} + '23:59:59'
</when>
<otherwise>
b.create_time >= #{startDate}
</otherwise>
</choose>
AND a.jzh IS NOT NULL
GROUP BY
jzh

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.docus.bgts.mapper.dbmysql.TScanAssortMapper">
<!--根据记账号集合查询文件信息集合-->
<select id="selectFilesByJzhs" resultMap="mzSyncAnddeI">
SELECT
jzh,
file_title,
source serialnum
FROM
t_scan_assort
INNER JOIN docus_medicalrecord.t_basic t_basic ON t_scan_assort.patient_id = t_basic.patient_id
WHERE
t_scan_assort.is_del != 1
AND jzh IN <foreach collection="jzhs" item="jzh" close=")" open="(" separator=",">#{jzh}</foreach>
</select>
<resultMap id="mzSyncAnddeI" type="com.docus.bgts.entity.MzSync">
<result property="jzh" column="jzh"></result>
<collection property="mzSyncDetails" ofType="com.docus.bgts.entity.MzSyncDetails">
<result property="serialnum" column="serialnum"></result>
<result property="fileTitle" column="file_title"></result>
<result property="fileUrl" column="fileUrl"></result>
</collection>
</resultMap>
</mapper>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.docus.bgts.mapper.dbmysql.ZdAssortMapper">
<resultMap id="BaseResultMap" type="com.docus.bgts.entity.ZdAssort">
</resultMap>
<select id="selectAll" resultMap="BaseResultMap">
SELECT
assort_id,
assort_name
FROM
zd_assort
WHERE
effective = 1
<if test="assortName != null and assortName != ''">
AND assort_name = #{assortName}
</if>
</select>
<insert id="insertZdAssort">
insert into zd_assort(assort_id,assort_name,effective) values(#{zdAssort.assortId},#{zdAssort.assortName},#{zdAssort.effective})
</insert>
</mapper>

@ -9,24 +9,30 @@
(SELECT "NAVICAT_TABLE".*, ROWNUM "NAVICAT_ROWNUM"
FROM
(SELECT
a.DOCUMENT_TOPIC as assortName,
a.DOCUMENT_TITLE as file_title,
a.UNIQUE_ID as serialnum,
<foreach collection="jzhs" item="jzh" close=")" open="(" separator=",">
#{jzh} as jzh,
a.VISITING_SERIAL_NUMBER as jzh,
a.ARCHIVED_URL as fileUrl,
a.DOCUMENT_PRODUCER as collectid,
ROWID "NAVICAT_ROWID"
FROM "${tableNamespace}"."${tableName}" a
where VISITING_SERIAL_NUMBER in
<foreach collection="jzhs" item="jzh" close=")" open="(" separator=",">
#{jzh}
</foreach>
) "NAVICAT_TABLE"
)
</select>
<resultMap id="mzSyncAnddeI" type="com.docus.bgts.entity.MzSync">
<result property="jzh" column="jzh"></result>
<collection property="mzSyncDetails" ofType="com.docus.bgts.entity.MzSyncDetails">
<result property="assortName" column="assortName"></result>
<result property="serialnum" column="serialnum"></result>
<result property="fileTitle" column="file_title"></result>
<result property="fileUrl" column="fileUrl"></result>
<result property="collectid" column="collectid"></result>
</collection>
</resultMap>
</mapper>
Loading…
Cancel
Save