省中医信息添加

docus_webservice_1.1
mill 4 years ago
parent 45a901d1c2
commit 0c472ffd6a

@ -0,0 +1,25 @@
{
"task_count": 4,
"collectList":[
{
"collectsys_code": "13",
"requestUrl": "http://localhost:9302/collect",
"remark": "电生理"
},
{
"collectsys_code": "3",
"requestUrl": "http://localhost:9302/collect",
"remark": "PACS"
},
{
"collectsys_code": "14",
"requestUrl": "http://localhost:9303/collect",
"remark": "内镜"
},
{
"collectsys_code": "4",
"requestUrl": "http://localhost:9304/collect",
"remark": "心电图"
}
]
}

@ -73,6 +73,21 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.5</version>
</dependency>
</dependencies>
<build>

@ -0,0 +1,12 @@
package com.docus.webservice.dto;
import lombok.Data;
@Data
public class CollectList {
private Long id;
//采集器id
private String collectsys_code;
private String requestUrl;
private String remark;
}

@ -0,0 +1,24 @@
package com.docus.webservice.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel("文件库中的省中医病案采集表")
public class AfInterfaceCollect {
private Long id;
@ApiModelProperty(value = "任务流水号")
private String serialnum;
@ApiModelProperty(value = "记账号")
private String jzh;
@ApiModelProperty(value = "任务数")
private Integer taskCount;
@ApiModelProperty(value = "完成数")
private Integer completeCount;
@ApiModelProperty(value = "创建时间")
private Date createTime;
}

@ -0,0 +1,25 @@
package com.docus.webservice.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("文件库中的省中医病案采集-子任务表")
public class AfInterfaceCollectSub {
private Long id;
@ApiModelProperty(value = "af_interface_collect表id")
private Long afInterfaceCollectId;
@ApiModelProperty(value = "采集器id")
private String collectsysCode;
@ApiModelProperty(value = "子任务流水号 同一份文件子任务需一致")
private String serialnumSub;
@ApiModelProperty(value = "记账号")
private String jzh;
@ApiModelProperty(value = "分类名称")
private String assortName;
@ApiModelProperty(value = "状态 0:未发起1成功2失败")
private Integer state;
@ApiModelProperty(value = "请求信息")
private String requestMessage;
}

@ -163,5 +163,19 @@ public class TBasic implements Serializable {
@ApiModelProperty(value = "所在院区")
private String wardPalce;
/**
* yn
* @param isDead
*/
public void setIsDead(String isDead) {
this.isDead = isDead!=null&&isDead.toLowerCase().equals("y")?1:0;
}
public Integer getIsDead() {
return isDead;
}
public void setIsDead(Integer isDead) {
this.isDead = isDead;
}
}

@ -27,8 +27,11 @@ public enum Codes {
//接收三级节点
// PAT_INFO("202","PatInfo"),
//静态文件根元素名
SELECT_COLUMNS("10000","selectColumns")
;
SELECT_COLUMNS("10000","selectColumns"),
//collectList静态文件根元素名
JSON_COLLECTLIST("800","\\dataConfig\\collectList.json"),
JSON_TASK_COUNT("801","task_count"),
JSON_COLLECTLIST_ROOT("802","collectList");
//代码
private String code;
//描述

@ -12,8 +12,8 @@ public interface ITBasicWebService {
* @return
*/
@WebMethod
String savaAndSub(String tbasic);
String OUT_HOS_REG(String tbasic);
@WebMethod
String updateAndSub(String tbasic);
String OUT_HOS_CAN(String tbasic);
}

@ -2,15 +2,18 @@ package com.docus.webservice.handler;
import com.alibaba.fastjson.JSON;
import com.docus.webservice.dto.CollectList;
import com.docus.webservice.dto.SelectColumn;
import com.docus.webservice.entity.AfInterfaceCollect;
import com.docus.webservice.entity.AfInterfaceCollectSub;
import com.docus.webservice.entity.MrReportError;
import com.docus.webservice.entity.TBasic;
import com.docus.webservice.enums.Codes;
import com.docus.webservice.mapper.AfInterfaceCollectMapper;
import com.docus.webservice.service.IMrReportErrorService;
import com.docus.webservice.service.ITBasicService;
import com.docus.webservice.utils.JsonUtils;
import com.docus.webservice.utils.ResultUtils;
import com.docus.webservice.utils.XmlUtils;
import com.docus.webservice.utils.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -18,10 +21,9 @@ import javax.jws.WebService;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import java.util.*;
@WebService
public class TBasicWebService implements ITBasicWebService {
@ -32,6 +34,9 @@ public class TBasicWebService implements ITBasicWebService {
@Autowired
private IMrReportErrorService mrReportErrorService;
@Autowired
private AfInterfaceCollectMapper afInterfaceCollectMapper;
/**
* jar
*
@ -60,41 +65,12 @@ public class TBasicWebService implements ITBasicWebService {
}
@Override
public String savaAndSub(String tbasic) {
XmlUtils xmlUtils;
public String OUT_HOS_REG(String tbasic) {
try {
//解析xml
xmlUtils = new XmlUtils(new ByteArrayInputStream(tbasic.getBytes("UTF-8")));
//解析json映射文件
String json = JsonUtils.readJsonFile(CurrentPath() + Codes.JSON_ADDRESS.getMessage());
Map jsonMap = JSON.parseObject(json, Map.class);
HashMap<String, Object> tBasicMap = new HashMap<>();
HashMap<String, Object> tBasicSubMap = new HashMap<>();
List<SelectColumn> selectColumns = JSON.parseArray(String.valueOf(jsonMap.get(Codes.SELECT_COLUMNS.getMessage())), SelectColumn.class);
String value;
for (SelectColumn selectColumn : selectColumns) {
try {
value = xmlUtils.getElementText(selectColumn.getQualityColumn()) == null ? null : String.valueOf(xmlUtils.getElementText(selectColumn.getQualityColumn()));
} catch (RuntimeException e) {
String message = e.getMessage();
return ResultUtils.fail(message);
}
if (StringUtils.isBlank(value)) {
if (selectColumn.getByNull() == 0) {
insertLog(tbasic);
return ResultUtils.fail(selectColumn.getQualityColumn() + " 字段不能为空值");
} else {
continue;
}
} else {
if (selectColumn.getTableName().equals("t_basic")) {
tBasicMap.put(selectColumn.getColumnName(), value);
}
if (selectColumn.getTableName().equals("t_basic_sub")) {
tBasicSubMap.put(selectColumn.getColumnName(), value);
}
}
}
parseXml(tbasic,tBasicMap,tBasicSubMap);
//处理业务
TBasic tBasic;
if (tBasicMap != null && tBasicMap.size() > 0) {
@ -102,6 +78,7 @@ public class TBasicWebService implements ITBasicWebService {
tBasic.setCreateTime(new Date());
try {
itBasicService.savaAndSub(tBasic, tBasicSubMap);
this.saveAndCall(tBasic);
} catch (RuntimeException e) {
insertLog(tbasic);
return ResultUtils.fail(e.getMessage());
@ -117,44 +94,57 @@ public class TBasicWebService implements ITBasicWebService {
return ResultUtils.success().asXML();
}
@Override
public String updateAndSub(String tbasic) {
XmlUtils xmlUtils;
/**
* xml
* @param tbasic
* @param tBasicMap
* @param tBasicSubMap
*/
private void parseXml(String tbasic, HashMap<String, Object> tBasicMap, HashMap<String, Object> tBasicSubMap) {
XmlUtils xmlUtils = null;
try {
//解析xml
xmlUtils = new XmlUtils(new ByteArrayInputStream(tbasic.getBytes("UTF-8")));
//解析json映射文件
String path = CurrentPath() + Codes.JSON_ADDRESS.getMessage();
String json = JsonUtils.readJsonFile(path);
Map jsonMap = JSON.parseObject(json, Map.class);
HashMap<String, Object> tBasicMap = new HashMap<>();
HashMap<String, Object> tBasicSubMap = new HashMap<>();
List<SelectColumn> selectColumns = JSON.parseArray(String.valueOf(jsonMap.get(Codes.SELECT_COLUMNS.getMessage())), SelectColumn.class);
String value;
for (SelectColumn selectColumn : selectColumns) {
try {
value = xmlUtils.getElementText(selectColumn.getQualityColumn()) == null ? null : String.valueOf(xmlUtils.getElementText(selectColumn.getQualityColumn()));
} catch (RuntimeException e) {
String message = e.getMessage();
return ResultUtils.fail(message);
}
if (StringUtils.isBlank(value)) {
if (selectColumn.getByNull() == 0) {
insertLog(tbasic);
return ResultUtils.fail(selectColumn.getQualityColumn() + " 字段不能为空值");
} else {
continue;
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
//解析json映射文件
String json = JsonUtils.readJsonFile(CurrentPath() + Codes.JSON_ADDRESS.getMessage());
Map jsonMap = JSON.parseObject(json, Map.class);
List<SelectColumn> selectColumns = JSON.parseArray(String.valueOf(jsonMap.get(Codes.SELECT_COLUMNS.getMessage())), SelectColumn.class);
String value;
for (SelectColumn selectColumn : selectColumns) {
try {
value = xmlUtils.getElementText(selectColumn.getQualityColumn()) == null ? null : String.valueOf(xmlUtils.getElementText(selectColumn.getQualityColumn()));
} catch (RuntimeException e) {
String message = e.getMessage();
throw new RuntimeException(message);
}
if (StringUtils.isBlank(value)) {
if (selectColumn.getByNull() == 0) {
insertLog(tbasic);
throw new RuntimeException(selectColumn.getQualityColumn() + " 字段不能为空值");
} else {
if (selectColumn.getTableName().equals("t_basic")) {
tBasicMap.put(selectColumn.getColumnName(), value);
}
if (selectColumn.getTableName().equals("t_basic_sub")) {
tBasicSubMap.put(selectColumn.getColumnName(), value);
}
continue;
}
} else {
if (selectColumn.getTableName().equals("t_basic")) {
tBasicMap.put(selectColumn.getColumnName(), value);
}
if (selectColumn.getTableName().equals("t_basic_sub")) {
tBasicSubMap.put(selectColumn.getColumnName(), value);
}
}
}
}
@Override
public String OUT_HOS_CAN(String tbasic) {
try {
HashMap<String, Object> tBasicMap = new HashMap<>();
HashMap<String, Object> tBasicSubMap = new HashMap<>();
parseXml(tbasic,tBasicMap,tBasicSubMap);
//处理业务
TBasic tBasic;
if (tBasicMap != null && tBasicMap.size() > 0) {
@ -166,8 +156,10 @@ public class TBasicWebService implements ITBasicWebService {
tBasic.setUpdateTime(new Date());
try {
itBasicService.updateAndSub(tBasic, tBasicSubMap);
this.saveAndCall(tBasic);
} catch (RuntimeException e) {
insertLog(tbasic);
e.printStackTrace();
return ResultUtils.fail(e.getMessage());
}
} else {
@ -180,4 +172,54 @@ public class TBasicWebService implements ITBasicWebService {
}
return ResultUtils.success().asXML();
}
public void saveAndCall(TBasic tBasic) throws URISyntaxException {
//解析json映射文件
String json = JsonUtils.readJsonFile(CurrentPath() + Codes.JSON_COLLECTLIST.getMessage());
if (StringUtils.isNotBlank(json)) {
Map jsonMap = JSON.parseObject(json, Map.class);
//任务数
Integer task_count= JSON.parseObject(String.valueOf(jsonMap.get(Codes.JSON_TASK_COUNT.getMessage())), Integer.class);
List<CollectList> collectLists = JSON.parseArray(String.valueOf(jsonMap.get(Codes.JSON_COLLECTLIST_ROOT.getMessage())), CollectList.class);
//添加省中医病案采集
SnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);
AfInterfaceCollect afc=new AfInterfaceCollect();
Long afcId=idWorker.nextId();
afc.setId(afcId);
afc.setJzh(tBasic.getJzh());
afc.setTaskCount(task_count);
afc.setCreateTime(new Date());
afInterfaceCollectMapper.addAfInterfaceCollect(afc);
//添加省中医病案采集-子任务
List<AfInterfaceCollectSub> list=new ArrayList<>();
for (CollectList collectList : collectLists) {
AfInterfaceCollectSub afInterfaceCollectSub = new AfInterfaceCollectSub();
Long afcsId= idWorker.nextId();
afInterfaceCollectSub.setId(afcsId);
afInterfaceCollectSub.setAfInterfaceCollectId(afcId);
afInterfaceCollectSub.setCollectsysCode(collectList.getCollectsys_code());
afInterfaceCollectSub.setJzh(tBasic.getJzh());
collectList.setId(afcsId);
list.add(afInterfaceCollectSub);
}
afInterfaceCollectMapper.addAfInterfaceCollectSub(list);
for (CollectList collectList : collectLists) {
//调用http发送请求
this.sendHttp(collectList,tBasic.getJzh());
}
}
}
private String sendHttp(CollectList collectList,String jzh) throws URISyntaxException {
Map<String, String > params= new HashMap<>();
params.put("empId",jzh);
params.put("collectSubId",String.valueOf(collectList.getId()));
return HttpUtils.get(collectList.getRequestUrl(),params);
}
}

@ -0,0 +1,15 @@
package com.docus.webservice.mapper;
import com.docus.webservice.entity.AfInterfaceCollect;
import com.docus.webservice.entity.AfInterfaceCollectSub;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
public interface AfInterfaceCollectMapper {
int addAfInterfaceCollect(AfInterfaceCollect afInterfaceCollect);
int addAfInterfaceCollectSub(List<AfInterfaceCollectSub> list);
}

@ -0,0 +1,211 @@
package com.docus.webservice.utils;
import com.alibaba.fastjson.JSON;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.*;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Map;
public class HttpUtils {
private static PoolingHttpClientConnectionManager cm;
private static String EMPTY_STR = "";
private static String UTF_8 = "UTF-8";
private static void init() {
if (cm == null) {
cm = new PoolingHttpClientConnectionManager();
cm.setMaxTotal(50);// 整个连接池最大连接数
cm.setDefaultMaxPerRoute(5);// 每路由最大连接数默认值是2
}
}
/**
* HttpClient
*
* @return
*/
private static CloseableHttpClient getHttpClient() {
init();
return HttpClients.custom().setConnectionManager(cm).build();
}
/**
* @param url
* @return
*/
public static String get(String url) {
HttpGet httpGet = new HttpGet(url);
return getResult(httpGet);
}
/**
* @param urlparams
* @return
*/
public static String get(String url, Map<String, String > params) throws URISyntaxException {
URIBuilder ub = new URIBuilder();
ub.setPath(url);
ArrayList<NameValuePair> pairs = covertParams2NVPS(params);
ub.setParameters(pairs);
HttpGet httpGet = new HttpGet(ub.build());
return getResult(httpGet);
}
/**
* @param urlheadersparams
* @return
*/
public static String get(String url, Map<String, Object> headers, Map<String, String> params)
throws URISyntaxException {
URIBuilder ub = new URIBuilder();
ub.setPath(url);
if (params != null) {
ArrayList<NameValuePair> pairs = covertParams2NVPS(params);
ub.setParameters(pairs);
}
HttpGet httpGet = new HttpGet(ub.build());
for (Map.Entry<String, Object> param : headers.entrySet()) {
httpGet.addHeader(param.getKey(), String.valueOf(param.getValue()));
}
return getResult(httpGet);
}
/**
* @param url
* @return
*/
public static String post(String url) {
HttpPost httpPost = new HttpPost(url);
return getResult(httpPost);
}
/**
* @param urlparams
* @return
*/
public static String post(String url, Map<String, String> params) throws UnsupportedEncodingException {
HttpPost httpPost = new HttpPost(url);
httpPost.setEntity(new UrlEncodedFormEntity(covertParams2NVPS(params), "utf-8"));//设置表单提交编码
// httpPost.setEntity(new StringEntity(JSON.toJSONString(params), ContentType.APPLICATION_FORM_URLENCODED));
return getResult(httpPost);
}
public static String post(String url, Object params, Map<String, Object> head) throws UnsupportedEncodingException {
HttpPost httpPost = new HttpPost(url);
System.out.println(params);
httpPost.setEntity(new StringEntity(params.toString()));//设置表单提交编码
if (params != null) {
for (Map.Entry<String, Object> param : head.entrySet()) {
httpPost.addHeader(param.getKey(), String.valueOf(param.getValue()));
}
}
// httpPost.setEntity(new StringEntity(JSON.toJSONString(params), ContentType.APPLICATION_FORM_URLENCODED));
return getResult(httpPost);
}
private static ArrayList<NameValuePair> covertParams2NVPS(Map<String, String> params) {
ArrayList<NameValuePair> pairs = new ArrayList<NameValuePair>();
for (Map.Entry<String, String> param : params.entrySet()) {
if (param.getValue() != null) {
pairs.add(new BasicNameValuePair(param.getKey(), param.getValue()));
}
}
return pairs;
}
/**
* @param urlheadersparams
* @return
*/
public static String post(String url, Map<String, Object> headers, Map<String, Object> params)
throws UnsupportedEncodingException {
HttpPost httpPost = new HttpPost(url);
System.out.println(params);
if (params != null) {
for (Map.Entry<String, Object> param : headers.entrySet()) {
httpPost.addHeader(param.getKey(), String.valueOf(param.getValue()));
}
}
httpPost.setEntity(new StringEntity(JSON.toJSONString(params), ContentType.APPLICATION_JSON));
return getResult(httpPost);
}
/**
* Http
*
* @param request
* @return
*/
private static String getResult(HttpRequestBase request) {
// CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpClient httpClient = getHttpClient();
try {
CloseableHttpResponse response = httpClient.execute(request);
// response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity();
if (entity != null) {
// long len = entity.getContentLength();// -1 表示长度未知
String result = EntityUtils.toString(entity, UTF_8);
response.close();
// httpClient.close();
return result;
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
}
return EMPTY_STR;
}
/**
* Http
*
* @param requestBuilder
* @return
*/
private static String getResult(RequestBuilder requestBuilder) {
// CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpClient httpClient = getHttpClient();
try {
CloseableHttpResponse response = httpClient.execute(requestBuilder.build());
// response.getStatusLine().getStatusCode();
HttpEntity entity = response.getEntity();
if (entity != null) {
// long len = entity.getContentLength();// -1 表示长度未知
String result = EntityUtils.toString(entity, UTF_8);
response.close();
// httpClient.close();
return result;
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
}
return EMPTY_STR;
}
}

@ -0,0 +1,139 @@
package com.docus.webservice.utils;
public class SnowflakeIdWorker {
/**
* (2015-01-01)
*/
private final long twepoch = 1420041600000L;
/**
* id
*/
private final long workerIdBits = 5L;
/**
* id
*/
private final long datacenterIdBits = 5L;
/**
* id31 ()
*/
private final long maxWorkerId = -1L ^ (-1L << workerIdBits);
/**
* id31
*/
private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
/**
* id
*/
private final long sequenceBits = 12L;
/**
* ID12
*/
private final long workerIdShift = sequenceBits;
/**
* id17(12+5)
*/
private final long datacenterIdShift = sequenceBits + workerIdBits;
/**
* 22(5+5+12)
*/
private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
/**
* 4095 (0b111111111111=0xfff=4095)
*/
private final long sequenceMask = -1L ^ (-1L << sequenceBits);
/**
* ID(0~31)
*/
private long workerId;
/**
* ID(0~31)
*/
private long datacenterId;
/**
* (0~4095)
*/
private long sequence = 0L;
/**
* ID
*/
private long lastTimestamp = -1L;
/**
*
* @param workerId ID (0~31)
* @param datacenterId ID (0~31)
*/
public SnowflakeIdWorker(long workerId, long datacenterId) {
if (workerId > maxWorkerId || workerId < 0) {
throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
}
if (datacenterId > maxDatacenterId || datacenterId < 0) {
throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
}
this.workerId = workerId;
this.datacenterId = datacenterId;
}
/**
* ID (线)
* @return SnowflakeId
*/
public synchronized long nextId() {
long timestamp = timeGen();
// 如果当前时间小于上一次ID生成的时间戳说明系统时钟回退过这个时候应当抛出异常
if (timestamp < lastTimestamp) {
throw new RuntimeException(
String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
}
// 如果是同一时间生成的,则进行毫秒内序列
if (lastTimestamp == timestamp) {
sequence = (sequence + 1) & sequenceMask;
// 毫秒内序列溢出
if (sequence == 0) {
//阻塞到下一个毫秒,获得新的时间戳
timestamp = tilNextMillis(lastTimestamp);
}
}
// 时间戳改变,毫秒内序列重置
else {
sequence = 0L;
}
// 上次生成ID的时间截
lastTimestamp = timestamp;
// 移位并通过或运算拼到一起组成64位的ID
return ((timestamp - twepoch) << timestampLeftShift) //
| (datacenterId << datacenterIdShift) //
| (workerId << workerIdShift) //
| sequence;
}
/**
*
* @param lastTimestamp ID
* @return
*/
protected long tilNextMillis(long lastTimestamp) {
long timestamp = timeGen();
while (timestamp <= lastTimestamp) {
timestamp = timeGen();
}
return timestamp;
}
/**
*
* @return ()
*/
protected long timeGen() {
return System.currentTimeMillis();
}
public static void main(String[] args) throws InterruptedException {
SnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);
for (int i = 0; i < 10; i++) {
long id = idWorker.nextId();
Thread.sleep(1);
System.out.println(id);
}
}
}

@ -0,0 +1,17 @@
<?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.webservice.mapper.AfInterfaceCollectMapper">
<insert id="addAfInterfaceCollect" parameterType="com.docus.webservice.entity.AfInterfaceCollect">
insert into docus_archivefile.af_interface_collect (id,jzh,task_count,create_time) values (#{id},#{jzh},#{taskCount},#{createTime})
</insert>
<insert id="addAfInterfaceCollectSub" parameterType="com.docus.webservice.entity.AfInterfaceCollectSub">
insert into docus_archivefile.af_interface_collect_sub (id,af_interface_collect_id,collectsys_code,jzh) values
<foreach collection="list" item="val" index="index" separator=",">
(#{val.id},#{val.afInterfaceCollectId},#{val.collectsysCode},#{val.jzh})
</foreach>
</insert>
</mapper>
Loading…
Cancel
Save