diff --git a/dxhy-core/src/main/java/com/dxhy/core/dao/GsClientMapper.java b/dxhy-core/src/main/java/com/dxhy/core/dao/GsClientMapper.java new file mode 100644 index 00000000..aa4d5827 --- /dev/null +++ b/dxhy-core/src/main/java/com/dxhy/core/dao/GsClientMapper.java @@ -0,0 +1,27 @@ +package com.dxhy.core.dao; + + +import com.dxhy.core.entity.GsClient; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface GsClientMapper { + int deleteByPrimaryKey(Integer id); + + int deleteAll(); + + int insert(GsClient record); + + int insertSelective(GsClient record); + + int insertList(@Param("list") List recordList); + + GsClient selectByPrimaryKey(Integer id); + + List selectByGsdm(String gsdm); + + int updateByPrimaryKeySelective(GsClient record); + + int updateByPrimaryKey(GsClient record); +} \ No newline at end of file diff --git a/dxhy-core/src/main/java/com/dxhy/core/entity/EsOutput.java b/dxhy-core/src/main/java/com/dxhy/core/entity/EsOutput.java new file mode 100644 index 00000000..2c7bcab9 --- /dev/null +++ b/dxhy-core/src/main/java/com/dxhy/core/entity/EsOutput.java @@ -0,0 +1,32 @@ +package com.dxhy.core.entity; + +import lombok.Data; + +/** + * @Description: PO输出参数 + * @Author liufeilong + * @Date 2023-02-06 + **/ +@Data +public class EsOutput { + /** + * 外围系统数据唯一标识 + */ + private String BSKEY; + /** + * SAP数据唯一标识 + */ + private String SAPKEY; + /** + * 数据处理标识(S:成功,E:失败) + */ + private String ZTYPE; + /** + * 数据处理描述 + */ + private String ZMESSAGE; + /** + * 业务报文 + */ + private Object ZDATA; +} diff --git a/dxhy-core/src/main/java/com/dxhy/core/entity/GsClient.java b/dxhy-core/src/main/java/com/dxhy/core/entity/GsClient.java new file mode 100644 index 00000000..804ab320 --- /dev/null +++ b/dxhy-core/src/main/java/com/dxhy/core/entity/GsClient.java @@ -0,0 +1,19 @@ +package com.dxhy.core.entity; + +import lombok.Data; + +import java.util.Date; + +@Data +public class GsClient { + private Integer id; + + private String gsdm; + + private String gsmc; + + private String client; + + private Date createTime; + +} \ No newline at end of file diff --git a/dxhy-core/src/main/java/com/dxhy/core/entity/PoCommonResponseParam.java b/dxhy-core/src/main/java/com/dxhy/core/entity/PoCommonResponseParam.java new file mode 100644 index 00000000..be26e600 --- /dev/null +++ b/dxhy-core/src/main/java/com/dxhy/core/entity/PoCommonResponseParam.java @@ -0,0 +1,16 @@ +package com.dxhy.core.entity; + +import lombok.Data; + +/** + * @Description: PO接口公共响应参数 + * @Author liufeilong + * @Date 2023-02-06 + **/ +@Data +public class PoCommonResponseParam { + /** + * ES_OUTPUT + */ + private EsOutput ES_OUTPUT; +} diff --git a/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/PoolPaperServiceImpl.java b/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/PoolPaperServiceImpl.java index 687543b5..52b0cf06 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/PoolPaperServiceImpl.java +++ b/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/PoolPaperServiceImpl.java @@ -5,7 +5,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.dxhy.common.util.StringHelper; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -35,6 +37,7 @@ import com.github.pagehelper.PageInfo; */ @SuppressWarnings("AlibabaMethodTooLong") +@Slf4j @Service public class PoolPaperServiceImpl extends MpBaseServiceImpl implements PoolPaperService { @@ -179,7 +182,9 @@ public class PoolPaperServiceImpl extends MpBaseServiceImpl pageList = super.baseMapper.listAddTaxInvoice(pramsMap); + log.info("pageList={}",pageList.size()); PageInfo pageInfo = new PageInfo<>(pageList); + log.info("pageInfo={}",pageInfo); json.put("hasNext", pageInfo.isHasNextPage()); json.put("nextPage", pageInfo.getNextPage()); List returnList = new ArrayList<>(); diff --git a/dxhy-core/src/main/java/com/dxhy/core/task/SdnyClientTask.java b/dxhy-core/src/main/java/com/dxhy/core/task/SdnyClientTask.java new file mode 100644 index 00000000..dad62fa6 --- /dev/null +++ b/dxhy-core/src/main/java/com/dxhy/core/task/SdnyClientTask.java @@ -0,0 +1,136 @@ +package com.dxhy.core.task; + +import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONObject; +import com.dxhy.common.constant.DbConstant; +import com.dxhy.common.controller.AbstractController; +import com.dxhy.common.datasource.config.DynamicContextHolder; +import com.dxhy.core.dao.ConfirmDao; +import com.dxhy.core.dao.GsClientMapper; +import com.dxhy.core.entity.EsOutput; +import com.dxhy.core.entity.GsClient; +import com.dxhy.core.entity.PoCommonResponseParam; +import com.dxhy.core.job.entity.SNSAPObject; +import com.dxhy.core.job.entity.ScheduleJobEntity; +import com.dxhy.core.job.service.InvoiceInterfaceService; +import com.dxhy.core.job.service.ScheduleJobService; +import com.dxhy.core.util.HttpUtils; +import com.dxhy.core.util.JsonUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.*; + +/** + * @author fth + * @date 2018年04月13日 下午10:57:22 + */ +@SuppressWarnings({"rawtypes", "DuplicatedCode"}) +@Component("sdnyClientTask") +@Slf4j +public class SdnyClientTask extends AbstractController { + + private static final String LOGGER_MSG = "(SAP获取公司client)"; + + @Value("${sdny.snYxUrl}") + private String snYxUrl; + + @Value("${po.userName}") + private String userName; + + @Value("${po.password}") + private String password; + + @Resource + private GsClientMapper gsClientMapper; + + @Resource + private InvoiceInterfaceService invoiceInterfaceService; + @Resource + private ConfirmDao confirmDao; + @Resource + private ScheduleJobService scheduleJobService; + + /** + * 核心线程池大小 + */ + private int corePoolSize = 10; + /** + * 最大线程池大小 + */ + + private int maximumPoolSize = 20; + + /** + * @throws InterruptedException 异常 + * @Desc 发票获取接口 + */ + + public void getSdnyClient() throws InterruptedException { + log.info("获取山东能源Client定时任务开始"); + DynamicContextHolder.push(DbConstant.BASICS_READ); + ScheduleJobEntity scheduleJobEntity = scheduleJobService.queryByBeanName("sdnyClientTask", "getSdnyClient"); + if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) { + try { + scheduleJobEntity.setJobStatus("1"); + DynamicContextHolder.push(DbConstant.BASICS_WRITE); + scheduleJobService.updateById(scheduleJobEntity); + // 准备请求参数 + // 需判断 设置不认证状态 + + List list = new ArrayList<>(); + long startTime = System.currentTimeMillis(); + SNSAPObject object = new SNSAPObject(); + object.setSYSID("FPXT"); + object.setIFYWID("FI846"); + object.setBSKEY(UUID.randomUUID().toString().replace("-", "")); + object.setZFILED5("200"); + object.setZDATA(""); + + //推送到SAP + log.info("推送山能数据:{}", JSONObject.toJSONString(object)); + JSONObject request = new JSONObject(); + request.put("IS_INPUT", object); + + log.info("{}获取公司client入参:{}", LOGGER_MSG, request.toJSONString()); + String result = HttpUtils.sendPo(snYxUrl, request.toJSONString(), userName, password); + log.info("{}获取公司client出参:{}", LOGGER_MSG, result); + PoCommonResponseParam poCommonResponseParam = JsonUtils.getInstance().parseObject(result, PoCommonResponseParam.class); + EsOutput es_output = poCommonResponseParam.getES_OUTPUT(); + String ztype = es_output.getZTYPE(); + String zmessage = es_output.getZMESSAGE(); + Object zdata = es_output.getZDATA(); + if ("s".equals(ztype)) { + List> gsClientList = JsonUtils.getInstance().parseObject(zdata.toString(), List.class); + gsClientList.stream().forEach(f -> { + GsClient gsClient = new GsClient(); + gsClient.setGsdm(ObjectUtil.isNull(f.get("BUKRS")) ? "" : f.get("BUKRS").toString()); + gsClient.setGsmc(ObjectUtil.isNull(f.get("BUTXT")) ? "" : f.get("BUTXT").toString()); + gsClient.setClient(ObjectUtil.isNull(f.get("MANDT")) ? "" : f.get("MANDT").toString()); + gsClient.setCreateTime(new Date()); + list.add(gsClient); + }); + } else { + log.error("{}client:{},获取公司client出错:{}", LOGGER_MSG, "200", zmessage); + } + log.info("{}删除gs_client表数据", LOGGER_MSG); + gsClientMapper.deleteAll(); + log.info("{}插入gs_client表", LOGGER_MSG); + gsClientMapper.insertList(list); + long endTime = System.currentTimeMillis(); + log.debug("{}任务结束,耗时:{}", LOGGER_MSG, endTime - startTime); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + log.info("获取山东能源Client定时任务--重置执行状态"); + scheduleJobEntity.setJobStatus("0"); + DynamicContextHolder.push(DbConstant.BASICS_WRITE); + scheduleJobService.updateById(scheduleJobEntity); + } + } + } + +} \ No newline at end of file diff --git a/dxhy-core/src/main/java/com/dxhy/core/thread/PoolAddTaxThread.java b/dxhy-core/src/main/java/com/dxhy/core/thread/PoolAddTaxThread.java index ba3ceaa9..f7bf54ff 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/thread/PoolAddTaxThread.java +++ b/dxhy-core/src/main/java/com/dxhy/core/thread/PoolAddTaxThread.java @@ -197,6 +197,7 @@ public class PoolAddTaxThread extends BaseThread { pramsMap.put("inAccountStatus", inAccountStatus); pramsMap.put("company", company); pramsMap.put("invoiceSource",prams.getString("invoiceSource")); + log.info("传入的参数为:{}",pramsMap); // 导出文件名 StringBuilder ftpFileName = new StringBuilder(); ftpFileName.append(fileNamePrefix); @@ -224,6 +225,7 @@ public class PoolAddTaxThread extends BaseThread { StringBuilder excelFile = new StringBuilder(); excelFile.append(fileService.getLocalPathDefault()); excelFile.append(ftpFileName.toString()); + log.info("导出的文件名字为:{}",excelFile.toString()); File filePath = new File(getFilePath(excelFile.toString())); if (!filePath.exists()) { filePath.mkdirs(); @@ -386,8 +388,9 @@ public class PoolAddTaxThread extends BaseThread { String titleColumn = datas[var12]; titles.add(Collections.singletonList(titleColumn)); } - + log.info("导出文件的标头为:{}",titles); writeTable.setHead(titles); + List> list = new ArrayList<>(); for (String[] strings : dataList) { diff --git a/dxhy-core/src/main/java/com/dxhy/core/util/HttpUtils.java b/dxhy-core/src/main/java/com/dxhy/core/util/HttpUtils.java new file mode 100644 index 00000000..877357a4 --- /dev/null +++ b/dxhy-core/src/main/java/com/dxhy/core/util/HttpUtils.java @@ -0,0 +1,88 @@ +package com.dxhy.core.util; + +import cn.hutool.http.HttpRequest; +import lombok.extern.slf4j.Slf4j; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * @author ZSC-DXHY + */ +@Slf4j +public class HttpUtils { + + private static final String LOGGER_MSG = "(请求http访问)"; + + /** + * 执行post请求 + * + * @param url + * @param paramMap + * @return + * @throws IOException + */ + public static String doPost(String url, Map paramMap) { + Map requestMap = new HashMap<>(paramMap); + long startTime = System.currentTimeMillis(); + String body = HttpRequest.post(url).form(requestMap).timeout(300000).execute().body(); + long endTime = System.currentTimeMillis(); + log.debug("{}以Map调用post请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime); + return body; + } + + public static String doPost(String url, String request) { + long startTime = System.currentTimeMillis(); + String body = HttpRequest.post(url).body(request).timeout(300000).execute().body(); + long endTime = System.currentTimeMillis(); + log.debug("{}以字符串调用post请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime); + return body; + } + + public static String doPostWithHeader(String url, String data, Map header) { + long startTime = System.currentTimeMillis(); + String body = HttpRequest.post(url).addHeaders(header).body(data).timeout(300000).execute().body(); + long endTime = System.currentTimeMillis(); + log.debug("{}带head调用post请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime); + return body; + } + + public static String doPostFormWithHeader(String url, Map paramMap, Map header) { + Map requestMap = new HashMap<>(paramMap); + long startTime = System.currentTimeMillis(); + String body = HttpRequest.post(url).addHeaders(header).form(requestMap).timeout(300000).execute().body(); + long endTime = System.currentTimeMillis(); + log.debug("{}带head和form调用post请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime); + return body; + } + + public static String doGetWithHeader(String url, Map header) { + long startTime = System.currentTimeMillis(); + String body = HttpRequest.get(url).addHeaders(header).timeout(300000).execute().body(); + long endTime = System.currentTimeMillis(); + log.debug("{}带head调用get请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime); + return body; + } + + public static String doGet(String url, String request) { + long startTime = System.currentTimeMillis(); + String body = HttpRequest.get(url).body(request).timeout(300000).execute().body(); + long endTime = System.currentTimeMillis(); + log.debug("{}以字符串调用get请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime); + return body; + } + + //请求山能PO + public static String sendPo(String url, String request,String userName,String password) { + long startTime = System.currentTimeMillis(); + HttpRequest httpRequest = new HttpRequest(url); + httpRequest.basicAuth(userName,password); + String body = httpRequest.body(request).timeout(300000).execute().body(); + long endTime = System.currentTimeMillis(); + log.debug("{}以字符串调用post请求url:{},耗时:{}", LOGGER_MSG, url, endTime - startTime); + return body; + } + +} + diff --git a/dxhy-core/src/main/java/com/dxhy/core/util/JsonUtils.java b/dxhy-core/src/main/java/com/dxhy/core/util/JsonUtils.java new file mode 100644 index 00000000..0dfa262c --- /dev/null +++ b/dxhy-core/src/main/java/com/dxhy/core/util/JsonUtils.java @@ -0,0 +1,90 @@ +package com.dxhy.core.util; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.serializer.SerializeConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer; +import com.alibaba.fastjson.util.TypeUtils; + +import java.sql.Timestamp; +import java.util.Date; +import java.util.List; + +/** + * @author: chendognzhi + * @Date: 2017年10月17日 + * @Description: json转换工具 + */ +public class JsonUtils { + private JsonUtils() { + } + + private static final SerializeConfig SERIALIZE_CONFIG = new SerializeConfig(); + + static { + SERIALIZE_CONFIG.put(Date.class, new SimpleDateFormatSerializer("yyyy-MM-dd HH:mm:ss")); + SERIALIZE_CONFIG.put(Timestamp.class, new SimpleDateFormatSerializer("yyyy-MM-dd HH:mm:ss")); + /** + * 设置json格式化第一个字母大写 + */ + TypeUtils.compatibleWithJavaBean = true; + } + + private static final JsonUtils HELPER = new JsonUtils(); + + public static JsonUtils getInstance() { + return HELPER; + } + + /** + * parseObject(json转换为java bean) + */ + public T parseObject(String text, Class clazz) { + return JSON.parseObject(text, clazz); + } + + /** + * toJsonString(对象转换为json字符串) + */ + public String toJsonString(T obj) { + return toJsonString(obj, SERIALIZE_CONFIG); + } + + /** + * toJsonString(对象转换为自定义格式的json字符串) + */ + public String toJsonString(T obj, SerializeConfig serializeConfig) { + return JSON.toJSONString(obj, serializeConfig, SerializerFeature.DisableCircularReferenceDetect); + } + + /** + * 把json串转为指定的对象 + */ + public T fromJson(String str, Class clazz) { + return JSON.parseObject(str, clazz); + } + + /** + * 把对象转换 为json字符串 null的字符串转换为"" + */ + + public String toJsonStringNullToEmpty(T obj) { + return JSON.toJSONString(obj, SerializerFeature.WriteNullStringAsEmpty); + } + + /** + * json字符串转list + */ + public List jsonToList(String text, Class clazz) { + + return JSON.parseArray(text, clazz); + } + + /** + * json字符串转list + */ + public List listBeanCopy(Object text, Class clazz) { + return JSON.parseArray(JSON.toJSONString(text), clazz); + } + +} diff --git a/dxhy-core/src/main/resources/mapper/GsClientMapper.xml b/dxhy-core/src/main/resources/mapper/GsClientMapper.xml new file mode 100644 index 00000000..a5324ea4 --- /dev/null +++ b/dxhy-core/src/main/resources/mapper/GsClientMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + id, gsdm, gsmc, client, create_time + + + + + delete from gs_client + where id = #{id,jdbcType=INTEGER} + + + delete from gs_client + + + insert into gs_client (id, gsdm, gsmc, + client, create_time) + values (#{id,jdbcType=INTEGER}, #{gsdm,jdbcType=VARCHAR}, #{gsmc,jdbcType=VARCHAR}, + #{client,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}) + + + insert into gs_client + + + id, + + + gsdm, + + + gsmc, + + + client, + + + create_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{gsdm,jdbcType=VARCHAR}, + + + #{gsmc,jdbcType=VARCHAR}, + + + #{client,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + + + update gs_client + + + gsdm = #{gsdm,jdbcType=VARCHAR}, + + + gsmc = #{gsmc,jdbcType=VARCHAR}, + + + client = #{client,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update gs_client + set gsdm = #{gsdm,jdbcType=VARCHAR}, + gsmc = #{gsmc,jdbcType=VARCHAR}, + client = #{client,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + insert into gs_client (gsdm,gsmc,client,create_time) + values + + (#{item.gsdm,jdbcType=VARCHAR}, #{item.gsmc,jdbcType=VARCHAR}, + #{item.client,jdbcType=VARCHAR},#{item.createTime,jdbcType=TIMESTAMP}) + + + \ No newline at end of file diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java b/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java index ee913bab..9b4d8a5e 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java @@ -14,6 +14,7 @@ import com.dxhy.common.util.InvoiceUtil; import com.dxhy.common.util.UserInfoUtil; import com.dxhy.common.utils.R; import com.dxhy.erp.dao.CustomsRecordDao; +import com.dxhy.erp.dao.GsClientMapper; import com.dxhy.erp.dao.RecordInvoiceDao; import com.dxhy.erp.dao.TdxSaleRecordInvoiceDao; import com.dxhy.erp.entity.*; @@ -52,6 +53,9 @@ public class SDNYMainProcessController extends AbstractController { @Value("${sdny.environment}") private String environment; + @Resource + private GsClientMapper gsClientMapper; + @Resource private InvoiceQueryService invoiceQueryService; @@ -375,6 +379,7 @@ public class SDNYMainProcessController extends AbstractController { String dbName = "business"; String company = "BIGB"; String taxNo = "9111112222333344DD"; + String orgCode = "1010"; // // 入参统一在入口处理 // String userid = getLoginName(); @@ -409,7 +414,12 @@ public class SDNYMainProcessController extends AbstractController { object.setZFILED2(""); object.setZFILED3(""); object.setZFILED4(""); - object.setZFILED5(environment); + List gsClients = gsClientMapper.selectByGsdm(orgCode); + if(gsClients != null && gsClients.size() > 0) { + object.setZFILED5(gsClients.get(0).getClient()); + }else{ + object.setZFILED5(environment); + } List sapInvoiceInfos = new ArrayList<>(); if (invoiceInfoList != null && invoiceInfoList.size() > 0) { for (SNInvoice invoice : invoiceInfoList) { diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/dao/GsClientMapper.java b/dxhy-erp/src/main/java/com/dxhy/erp/dao/GsClientMapper.java new file mode 100644 index 00000000..9782db98 --- /dev/null +++ b/dxhy-erp/src/main/java/com/dxhy/erp/dao/GsClientMapper.java @@ -0,0 +1,27 @@ +package com.dxhy.erp.dao; + + +import com.dxhy.erp.entity.GsClient; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface GsClientMapper { + int deleteByPrimaryKey(Integer id); + + int deleteAll(); + + int insert(GsClient record); + + int insertSelective(GsClient record); + + int insertList(@Param("list") List recordList); + + GsClient selectByPrimaryKey(Integer id); + + List selectByGsdm(String gsdm); + + int updateByPrimaryKeySelective(GsClient record); + + int updateByPrimaryKey(GsClient record); +} \ No newline at end of file diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/entity/GsClient.java b/dxhy-erp/src/main/java/com/dxhy/erp/entity/GsClient.java new file mode 100644 index 00000000..c5211347 --- /dev/null +++ b/dxhy-erp/src/main/java/com/dxhy/erp/entity/GsClient.java @@ -0,0 +1,19 @@ +package com.dxhy.erp.entity; + +import lombok.Data; + +import java.util.Date; + +@Data +public class GsClient { + private Integer id; + + private String gsdm; + + private String gsmc; + + private String client; + + private Date createTime; + +} \ No newline at end of file diff --git a/dxhy-erp/src/main/resources/mapper/GsClientMapper.xml b/dxhy-erp/src/main/resources/mapper/GsClientMapper.xml new file mode 100644 index 00000000..1dad4035 --- /dev/null +++ b/dxhy-erp/src/main/resources/mapper/GsClientMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + id, gsdm, gsmc, client, create_time + + + + + delete from gs_client + where id = #{id,jdbcType=INTEGER} + + + delete from gs_client + + + insert into gs_client (id, gsdm, gsmc, + client, create_time) + values (#{id,jdbcType=INTEGER}, #{gsdm,jdbcType=VARCHAR}, #{gsmc,jdbcType=VARCHAR}, + #{client,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}) + + + insert into gs_client + + + id, + + + gsdm, + + + gsmc, + + + client, + + + create_time, + + + + + #{id,jdbcType=INTEGER}, + + + #{gsdm,jdbcType=VARCHAR}, + + + #{gsmc,jdbcType=VARCHAR}, + + + #{client,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + + + update gs_client + + + gsdm = #{gsdm,jdbcType=VARCHAR}, + + + gsmc = #{gsmc,jdbcType=VARCHAR}, + + + client = #{client,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update gs_client + set gsdm = #{gsdm,jdbcType=VARCHAR}, + gsmc = #{gsmc,jdbcType=VARCHAR}, + client = #{client,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + insert into gs_client (gsdm,gsmc,client,create_time) + values + + (#{item.gsdm,jdbcType=VARCHAR}, #{item.gsmc,jdbcType=VARCHAR}, + #{item.client,jdbcType=VARCHAR},#{item.createTime,jdbcType=TIMESTAMP}) + + + \ No newline at end of file