Procházet zdrojové kódy

[华信科] 龙旗对接

zxl před 1 měsícem
rodič
revize
339054f475

+ 0 - 520
src/main/java/com/uas/eis/controller/STKController.java

@@ -1,520 +0,0 @@
-package com.uas.eis.controller;
-
-import cn.hutool.http.HttpRequest;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.uas.eis.dto.stksto.QueryAccountantProjectDto;
-import com.uas.eis.dto.stksto.QueryCashFlowItemsDto;
-import com.uas.eis.dto.stksto.QueryTravellingMerchantDto;
-import com.uas.eis.dto.stksto.StkCommonDto;
-import com.uas.eis.sdk.dto.*;
-import com.uas.eis.sdk.entity.ApiResult;
-import com.uas.eis.sdk.resp.ApiResponse;
-import com.uas.eis.service.RequestSTKService;
-import com.uas.eis.service.STKService;
-import com.uas.eis.utils.HuToolUtils;
-import com.uas.eis.utils.MD5Util;
-import com.uas.eis.utils.STKSignUtil;
-import com.uas.eis.vo.stkVo.AccountantProjectVo;
-import com.uas.eis.vo.stkVo.CashFlowItemsVo;
-import com.uas.eis.vo.stkVo.HttpResultResponse;
-import com.uas.eis.vo.stkVo.TravellingMerchantVo;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.format.DateTimeFormatter;
-import java.time.temporal.TemporalAdjusters;
-import java.util.*;
-
-
-/**
- * @author zhuxl
- * @date 2024-10-12
- */
-@Slf4j
-@RestController
-public class STKController {
-    @Autowired
-    private STKService stkService;
-
-    @Autowired
-    private RequestSTKService requestSTKService;
-
-    /**
-     * 获取科目余额表-总条数
-     */
-    @PostMapping("/api/getAssistBalanceCount")
-    public ApiResult<String> getAssistBalanceCount(HttpServletRequest request, @RequestBody AssistBalanceDTO dto){
-        return stkService.getAssistBalanceCount(request, dto);
-    }
-
-    /**
-     * 获取科目余额表
-     */
-    @RequestMapping(value="/api/getAssistBalance",method=RequestMethod.POST)
-    @ResponseBody
-    public ApiResult<String> getAssistBalance(HttpServletRequest request, @RequestBody AssistBalanceDTO dto){
-        return stkService.getAssistBalance(request, dto);
-    }
-
-
-
-
-    /**
-     * 现金流量表-总条数
-     */
-    @RequestMapping(value="/api/getCashFlowCount",method=RequestMethod.POST)
-    @ResponseBody
-    public ApiResult<String> getCashFlowCount(HttpServletRequest request, @RequestBody AssistBalanceDTO dto){
-        return stkService.getCashFlowCount(request, dto);
-    }
-
-    /**
-     * 现金流量表
-     */
-    @RequestMapping(value="/api/getCashFlow",method=RequestMethod.POST)
-    @ResponseBody
-    public ApiResult<String> getCashFlow(HttpServletRequest request, @RequestBody AssistBalanceDTO dto){
-        return stkService.getCashFlow(request, dto);
-    }
-
-
-
-
-    /**
-     * 新增修改客商信息
-     */
-    @PostMapping(value="/erp/updateCustVend")
-    public ApiResult<String> updateCustVend(@RequestBody UpdateCustVendDTO dto){
-        log.info("进入修改客商");
-        return stkService.updateCustVend( dto);
-    }
-
-    /***
-     * 新增修改客商2
-     * */
-    /*@PostMapping(value="/erp/updateCustVend")
-    public ApiResult updateCustVend(@RequestBody UpdateCustVendDTO dto){
-        Integer page  = 1;
-        Integer size = 500;
-        String result = null;
-        try {
-            HttpResultResponse resultResponse = requestSTKService.updateKSPostParam(page,size,dto);
-            log.info("修改客商返回信息:{}",JSONObject.toJSONString(resultResponse));
-            result = resultResponse.getBody();
-        } catch (Exception e) {
-            e.printStackTrace();
-            log.info("新增修改客商信息异常!");
-        }
-        return new ApiResult();
-    }*/
-
-
-
-    /**
-     * 接口测试
-     * */
-    @PostMapping("/api/getAssistBalanceCountTest")
-    public ApiResult<String> getAssistBalanceCountTest(HttpServletRequest request, @RequestBody AssistBalanceDTO dto){
-        return stkService.getAssistBalanceCountTest(request, dto);
-    }
-
-    /**
-     * 加密生成
-     * */
-    @GetMapping("/erp/md5Test")
-    public Md5TestVo md5Test(){
-        Long timestamp = System.currentTimeMillis();
-        String requestId = UUID.randomUUID().toString();
-        String accessSecret = "SISEMI";
-        String accessKey = "SISEMI";
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("AccessKey",accessKey);
-        params.put("RequestId",requestId);
-        params.put("Timestamp",timestamp);
-        Set<String> keysSet = params.keySet();
-        Object[] keys = keysSet.toArray();
-        Arrays.sort(keys);
-        StringBuilder temp = new StringBuilder();
-        boolean first = true;
-        for (Object key : keys) {
-            if (first) {
-                first = false;
-            } else {
-                temp.append("&");
-            }
-            temp.append(key).append("=");
-            Object value = params.get(key);
-            String valueString = "";
-            if (null != value) {
-                valueString = String.valueOf(value);
-            }
-            temp.append(valueString);
-        }
-        temp.append("&").append("AccessSecret").append("=").append(accessSecret);
-        Md5TestVo vo = new Md5TestVo();
-        vo.setAccessKey(accessKey);
-        vo.setRequestId(requestId);
-        vo.setTimestamp(timestamp);
-        vo.setSignature(MD5Util.encrypt32Up(temp.toString()));
-        return vo;
-    }
-
-
-    /**
-     * 模拟客商数据信息
-     * */
-    @PostMapping("/queryTestList")
-    public List<CustvendDTO> queryTestList(@RequestBody QueryTravellingMerchantDto dto){
-        log.info("请求参数:{}", JSONObject.toJSONString(dto));
-        return requestSTKService.queryList();
-    }
-
-    /**
-     * 获取客商信息接口编码
-     * */
-    @Value("${STK.get_travelling_merchant}")
-    private String GET_TRAVELLING_MERCHANT;
-
-
-    @GetMapping("/queryListTest")
-    public TravellingMerchantVo queryListTest(){
-        QueryTravellingMerchantDto dto = new QueryTravellingMerchantDto();
-        dto.setCode(GET_TRAVELLING_MERCHANT);
-        return requestSTKService.selectTravellingMerchantList(dto,"http://192.168.1.104:8186/eis_cw/queryTestList");
-    }
-
-    @GetMapping("apiPost2")
-    public String apiPost() throws Exception {
-
-        //应用id
-        String appid = "bf00be8b_0387_44f4_b073_50c3c2d6";
-
-        //应用key
-        String appkey = "eb1b6053bdda437c98a93d93013d9fae";
-
-        //接口代码 每个接口的接口代码都不同
-        String apiCode = "vhtITAFq";
-
-        //时间戳
-        String timestamp = Long.toString(System.currentTimeMillis());
-
-        //加签方法的重要参数
-        //若该接口需要传入一些参数  如:name、age等等
-        //则直接在这个位置put即可
-        JSONObject request=new JSONObject(4);
-        request.put("code",apiCode);
-        request.put("s_orgcode","5418");//119030009
-        //request.put("start_time","2022-11-02 09:38:23");
-        //request.put("end_time","2025-01-06 22:04:47");
-        //request.put("jslx","合并口径");
-        //request.put("dwmc","担保集团");
-        request.put("page","1");
-        request.put("size","10");
-        /*request.put("start_time","2024-12-25 09:38:23");
-        request.put("end_time","2024-12-26 22:04:47");*/
-
-
-        String content = request.toString();
-
-        //加签方法第一个参数
-        StringBuilder signBuilder = new StringBuilder("appid").append("=").append(appid).append("&")
-                .append(content).append("&")
-                .append("timestamp").append("=").append(timestamp).append("&")
-                .append("key").append("=").append(appkey);
-
-
-
-
-        //加签
-        String sign = STKSignUtil.HMACSHA256(signBuilder.toString(),appkey);
-
-        System.out.println("原始:"+signBuilder);
-        System.out.println("签名:"+sign);
-        System.out.println("content:"+content);
-
-        //请求数据 (接口地址根据测试环境与正式环境变更)
-        String body = HttpRequest.post("http://192.168.2.179/api/oapigw/api/oapisvc/api/v2/search")
-                .header("appid",appid)  //请求头
-                .header("timestamp", timestamp)
-                .header("sign", sign)
-                .header("Content-Type", "application/json")
-                .body(content)  //请求参数
-                .timeout(20000)  //超时时间
-                .execute().body();
-
-        //JSONObject jsonObject = JSON.parseObject(body);
-
-        //JSONObject dataObject = jsonObject.getJSONObject("data");
-
-        //JSONArray listArray = dataObject.getJSONArray("list");
-
-        System.out.println("返回结果:"+body);
-
-        //System.out.println("返回结果:"+listArray.size());
-        return (body);  //返回结果
-    }
-
-    //现金流测试
-    @GetMapping("apiPostxjl")
-    public String apiPostxjl() throws Exception {
-        //应用id
-        String appid = "bf00be8b_0387_44f4_b073_50c3c2d6";
-
-        //应用key
-        String appkey = "eb1b6053bdda437c98a93d93013d9fae";
-
-        //接口代码 每个接口的接口代码都不同
-        String apiCode = "89edb885a8cf4412b870233fc89fb381";
-
-        //时间戳
-        String timestamp = Long.toString(System.currentTimeMillis());
-
-        //分页内容 自行调整
-        String page = "1";
-        String pageSize = "500";
-
-        //支持  时间字段_start  时间字段_end  的传值  例:UPDATE_TIME
-        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        LocalDateTime begin = LocalDateTime.of(LocalDate.now(), LocalTime.MIN).with(TemporalAdjusters.firstDayOfYear());
-        LocalDateTime end = LocalDateTime.now();
-
-        //加签方法的重要参数
-        JSONObject request=new JSONObject(4);
-        //request.put("code","MJ3ahZ9f");
-        request.put("page",page);
-        request.put("size",pageSize);
-
-        //传入参数  此处案例仅放置了时间,可自行添加
-        JSONObject param=new JSONObject();
-        //param.put("UPDATE_TIME_start","2024-05-09 14:24:06");
-        //param.put("UPDATE_TIME_end","2024-05-09 15:01:28");
-        //param.put("TASKNO","P2022032200000041");
-        //param.put("TASKCODE","202409");
-
-
-        request.put("param",param);
-
-        String content = request.toString();
-
-        //加签方法第一个参数
-        StringBuilder signBuilder = new StringBuilder("appid").append("=").append(appid).append("&")
-                .append(content).append("&")
-                .append("timestamp").append("=").append(timestamp).append("&")
-                .append("key").append("=").append(appkey);
-
-        //加签
-        String sign = STKSignUtil.HMACSHA256(signBuilder.toString(),appkey);
-
-        System.out.println("原始:"+signBuilder);
-        log.info("STK,原始签名:"+signBuilder.toString());
-        System.out.println("签名:"+sign);
-        log.info("STK,加密签名:"+sign);
-        System.out.println("content:"+content);
-
-
-        //请求数据 (接口地址根据测试环境与正式环境变更)
-        /*String body = HttpRequest.post("https://192.168.2.179/api/oapigw/api/oapisvc/automicApi/"+apiCode)
-                .header("appid",appid)  //请求头
-                .header("timestamp", timestamp)
-                .header("sign", sign)
-                .header("Content-Type", "application/json")
-                .body(content)  //请求参数
-                .timeout(20000)  //超时时间
-                .execute().body();
-                )
-                */
-
-        Map<String,String> header = new HashMap<>();
-        header.put("appid",appid);
-        header.put("timestamp", timestamp);
-        header.put("sign", sign);
-        header.put("Content-Type", "application/json");
-        HttpResultResponse resultResponse = HuToolUtils.post("https://192.168.2.179/api/oapigw/api/oapisvc/automicApi/"+apiCode,request, header);
-
-        log.info("示例返回:{}",JSONObject.toJSONString(resultResponse));
-        // System.out.println("返回结果:"+body);
-        //System.out.println(body);
-        return (resultResponse.getBody());  //返回结果
-    }
-
-
-    //科目测试
-    @GetMapping("apiPostkm")
-    public String apiPostkm() throws Exception {
-        //应用id
-        String appid = "bf00be8b_0387_44f4_b073_50c3c2d6";
-
-        //应用key
-        String appkey = "eb1b6053bdda437c98a93d93013d9fae";
-
-        //接口代码 每个接口的接口代码都不同
-        String apiCode = "11e72229359a4fdeb038dd6713dc9330";
-
-        //时间戳
-        String timestamp = Long.toString(System.currentTimeMillis());
-
-        //分页内容 自行调整
-        String page = "1";
-        String pageSize = "500";
-
-        //支持  时间字段_start  时间字段_end  的传值  例:UPDATE_TIME
-        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        LocalDateTime begin = LocalDateTime.of(LocalDate.now(), LocalTime.MIN).with(TemporalAdjusters.firstDayOfYear());
-        LocalDateTime end = LocalDateTime.now();
-
-        //加签方法的重要参数
-        JSONObject request=new JSONObject(4);
-        //request.put("code","MJ3ahZ9f");
-        request.put("page",page);
-        request.put("size",pageSize);
-
-        //传入参数  此处案例仅放置了时间,可自行添加
-        JSONObject param=new JSONObject();
-        //param.put("UPDATE_TIME_start","2024-05-09 14:24:06");
-        //param.put("UPDATE_TIME_end","2024-05-09 15:01:28");
-        //param.put("TASKNO","P2022032200000041");
-        //param.put("TASKCODE","202409");
-
-
-        request.put("param",param);
-
-        String content = request.toString();
-
-        //加签方法第一个参数
-        StringBuilder signBuilder = new StringBuilder("appid").append("=").append(appid).append("&")
-                .append(content).append("&")
-                .append("timestamp").append("=").append(timestamp).append("&")
-                .append("key").append("=").append(appkey);
-
-        //加签
-        String sign = STKSignUtil.HMACSHA256(signBuilder.toString(),appkey);
-
-        System.out.println("原始:"+signBuilder);
-        System.out.println("签名:"+sign);
-        System.out.println("content:"+content);
-
-
-        //请求数据 (接口地址根据测试环境与正式环境变更)
-        String body = HttpRequest.post("https://192.168.2.179/api/oapigw/api/oapisvc/automicApi/"+apiCode)
-                .header("appid",appid)  //请求头
-                .header("timestamp", timestamp)
-                .header("sign", sign)
-                .header("Content-Type", "application/json")
-                .body(content)  //请求参数
-                .timeout(20000)  //超时时间
-                .execute().body();
-
-        // System.out.println("返回结果:"+body);
-        System.out.println(body);
-        return (body);  //返回结果
-    }
-
-
-
-
-    //现金流测试
-    @GetMapping("apiPostxjl2")
-    public CashFlowItemsVo apiPostxjl2() throws Exception {
-        StkCommonDto dto = new StkCommonDto();
-        int pageXjl = 1;
-        dto.setPage(String.valueOf(pageXjl));
-        dto.setSize("500");
-        QueryCashFlowItemsDto dtoParam = new QueryCashFlowItemsDto();
-        HttpResultResponse cashFlowItemsVo = requestSTKService.buildPostParam(1,500,dtoParam);
-        return JSONObject.parseObject(cashFlowItemsVo.getBody(),CashFlowItemsVo.class);
-    }
-
-
-
-
-    //会计科目测试
-    @GetMapping("apiPostkm2")
-    public AccountantProjectVo apiPostkm2() throws Exception {
-        QueryAccountantProjectDto dto = new QueryAccountantProjectDto();
-        int pageKm = 1;
-        dto.setPage(pageKm);
-        dto.setSize(500);
-        AccountantProjectVo accountantProjectVo = new AccountantProjectVo();
-        accountantProjectVo = requestSTKService.getAccountantProject(dto);
-        return accountantProjectVo;
-    }
-
-
-
-
-    //应用id
-    static String appid = "bc81efc8_b2c6_4670_818e_e2710a45";
-
-    //应用key
-    static String appkey = "9a1ae28bc9104deb86f74575acc1c2d6";
-
-    //接口代码
-    static String apiCode = "18c60d85eb0646a080341b64310109f1";
-
-    @GetMapping("insertPost")
-    public static String insertPost() throws Exception {
-        //时间戳
-        String timestamp = Long.toString(System.currentTimeMillis());
-
-        //每一条数据在这里构造,根据实际情况修改
-        JSONObject request=new JSONObject(4);
-        request.put("NAME","紫光展讯通信惠州有限公司");
-        request.put("S_CODE","2024-07-04 17:11:43");
-        request.put("UID_TYPE","01");
-        request.put("UID","91441300MA4WY7CN2T");
-        request.put("CUSTOMER_TYPE","C0201");
-        request.put("IS_VALID","1");
-        request.put("CREATED_ORG","HRORGI0000000001");
-        request.put("CREATED_SYSTEM","ZHONGTAI");
-        request.put("ISTEMPORARY","0");
-        request.put("MDM_CODE",null);
-        request.put("CREAT_AT","2024-07-04 17:11:43");
-        request.put("UPDATE_AT","2024-07-04 17:11:43");
-        request.put("SERIAL","23468156486151");
-
-
-        //param参数构造 并传入你构造的每一条数据参数,此处例:1条
-        JSONObject requestparam=new JSONObject(4);
-        requestparam.put("param",request);
-
-
-        String content = requestparam.toString();
-
-        //加签方法第一个参数
-        StringBuilder signBuilder = new StringBuilder("appid").append("=").append(appid).append("&")
-                .append(content).append("&")
-                .append("timestamp").append("=").append(timestamp).append("&")
-                .append("key").append("=").append(appkey);
-
-        //加签
-        String sign = STKSignUtil.HMACSHA256(signBuilder.toString(),appkey);
-
-        System.out.println("原始:"+signBuilder);
-        System.out.println("签名:"+sign);
-        System.out.println("content:"+content);
-
-        //请求数据(接口地址根据测试环境与正式环境变更)
-        String body = HttpRequest.post("http://10.67.2.187/api/oapigw/api/oapisvc/automicUpsertApi/"+apiCode)
-                .header("appid",appid)  //请求头
-                .header("timestamp", timestamp)
-                .header("sign", sign)
-                .header("Content-Type", "application/json")
-                .body(content)  //请求参数
-                .timeout(20000)  //超时时间
-                .execute().body();
-
-        System.out.println("返回结果:"+body);
-        return (body);  //返回结果
-    }
-
-
-
-
-}

+ 0 - 517
src/main/java/com/uas/eis/service/Impl/RequestSTKServiceImpl.java

@@ -1,517 +0,0 @@
-package com.uas.eis.service.Impl;
-
-import cn.hutool.http.HttpRequest;
-import com.alibaba.fastjson.JSONObject;
-import com.uas.eis.dao.BaseDao;
-import com.uas.eis.dao.SqlRowList;
-import com.uas.eis.dto.stksto.QueryAccountantProjectDto;
-import com.uas.eis.dto.stksto.QueryCashFlowItemsDto;
-import com.uas.eis.dto.stksto.QueryTravellingMerchantDto;
-import com.uas.eis.dto.stksto.StkCommonDto;
-import com.uas.eis.sdk.dto.CustvendDTO;
-import com.uas.eis.sdk.dto.SaveOrChangeCustomerDetailDto;
-import com.uas.eis.sdk.dto.SaveOrChangeCustomerDto;
-import com.uas.eis.sdk.dto.UpdateCustVendDTO;
-import com.uas.eis.service.RequestSTKService;
-import com.uas.eis.utils.HuToolUtils;
-import com.uas.eis.utils.STKSignUtil;
-import com.uas.eis.vo.stkVo.*;
-import lombok.Synchronized;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.jdbc.core.BeanPropertyRowMapper;
-import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.format.DateTimeFormatter;
-import java.time.temporal.TemporalAdjusters;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Service
-@Slf4j
-public class RequestSTKServiceImpl implements RequestSTKService {
-
-
-    @Value("${STK.app_id}")
-    private String STK_APP_ID;
-
-    @Value("${STK.app_key}")
-    private String STK_APP_KEY;
-
-    /** 新增修改客商信息接口地址 */
-    @Value("${STK.save_or_update_url}")
-    private String SAVE_OR_UPDATE_URL;
-
-    /**
-     * 复杂查询接口请求地址
-     * */
-    @Value("${STK.complexity_query_url}")
-    private String COMPLEXITY_QUERY_URL;
-
-    /** 自动化查询接口地址 */
-    @Value("${STK.query_url}")
-    private String QUERY_URL;
-
-    /** 公司组织编码 */
-    @Value("${STK.s_org_code}")
-    private String S_ORG_CODE;
-
-    /**
-     * 获取客商信息接口编码
-     * */
-    @Value("${STK.get_travelling_merchant}")
-    private String GET_TRAVELLING_MERCHANT;
-
-    /** 新增修改客商信息接口请求编码 */
-    @Value("${STK.save_or_update_request_code}")
-    private String SAVE_OR_UPDATE_REQUEST_CODE ;
-
-    /** 查询现金流量项目接口编码 */
-    @Value("${STK.cash_flow_items_request_code}")
-    private String CASH_FLOW_ITEMS_REQUEST_CODE;
-
-    /** 查询会计科目方法编码 */
-    @Value("${STK.accountant_project_request_code}")
-    private String ACCOUNTANT_PROJECT_REQUEST_CODE;
-
-    @Autowired
-    private BaseDao baseDao;
-
-    /**
-     * 获取客商相关数据
-     * */
-    @Override
-    public TravellingMerchantVo selectTravellingMerchantList(QueryTravellingMerchantDto dto, String url){
-
-        dto.setS_orgcode(S_ORG_CODE);
-
-        log.info("请求参数dto,content:"+JSONObject.toJSONString(dto));
-
-        //头部请求参数
-        Map<String,String> headerMap = null;
-        try {
-            headerMap = getHeaderMap(dto);
-        } catch (Exception e) {
-            log.error("STK加密异常:{}",e.getMessage());
-        }
-
-        //请求数据 (接口地址根据测试环境与正式环境变更)
-        HttpResultResponse resultResponse = HuToolUtils.post(url,dto,headerMap);
-        if(!resultResponse.getSuccess()){
-            log.error(resultResponse.getMessage());
-            return null;
-        }
-
-        log.info("STK,获取客商信息返回结果:{}",JSONObject.toJSONString(resultResponse));
-
-        if(StringUtils.isBlank(resultResponse.getBody())){
-            return null;
-        }
-
-        //System.out.println("返回结果:"+listArray.size());
-        return JSONObject.parseObject(resultResponse.getBody(),TravellingMerchantVo.class);  //返回结果
-    }
-
-    @Override
-    public SaveOrChangeCustomerVo saveOrChangeCustomer(List<SaveOrChangeCustomerDetailDto> sourceDataList) {
-        if(CollectionUtils.isEmpty(sourceDataList)){
-            log.info("深投控,新增修改客商信息数据为空");
-            return new SaveOrChangeCustomerVo();
-        }
-
-        //头部请求参数
-        Map<String,String> headerMap = null;
-        try {
-            headerMap = getHeaderMap(sourceDataList);
-        } catch (Exception e) {
-            log.error("STK加密异常:{}",e.getMessage());
-        }
-        //新增修改客商信息对象集合
-        //List<SaveOrChangeCustomerDetailDto> detailDtos = doSaveOrUpdateCustomerParam(sourceDataList);
-
-        //调用深投控新增修改客商信息
-        SaveOrChangeCustomerDto changeCustomerDto = new SaveOrChangeCustomerDto();
-        changeCustomerDto.setParam(sourceDataList);
-        HttpResultResponse resultResponse = HuToolUtils.post(SAVE_OR_UPDATE_URL+SAVE_OR_UPDATE_REQUEST_CODE,changeCustomerDto,headerMap);
-        log.info("深投控,新增修改客商信息,返回结果数据{}",JSONObject.toJSONString(resultResponse));
-        if(!resultResponse.getSuccess()){
-            log.info("深投控,新增修改客商信息数据异常:{}",resultResponse.getMessage());
-        }
-        return JSONObject.parseObject(resultResponse.getBody(), SaveOrChangeCustomerVo.class);
-    }
-
-    @Override
-    public CashFlowItemsVo getCashFlowItems(StkCommonDto dto) {
-        /*StkCommonDto stkCommonDto = new StkCommonDto();
-        stkCommonDto.setParam(dto);*/
-
-        //头部请求参数
-        Map<String,String> headerMap = null;
-        try {
-            headerMap = getHeaderMap(dto);
-        } catch (Exception e) {
-            log.error("STK加密异常:{}",e.getMessage());
-        }
-
-        HttpResultResponse resultResponse = HuToolUtils.post(QUERY_URL+CASH_FLOW_ITEMS_REQUEST_CODE,dto,headerMap);
-        log.info("深投控,现金流项目,返回结果数据{}",JSONObject.toJSONString(resultResponse));
-        if(!resultResponse.getSuccess()){
-            log.info("深投控,现金流项目数据异常:{}",resultResponse.getMessage());
-        }
-        return JSONObject.parseObject(resultResponse.getBody(), CashFlowItemsVo.class);
-    }
-
-    @Override
-    public AccountantProjectVo getAccountantProject(QueryAccountantProjectDto dto) {
-        StkCommonDto stkCommonDto = new StkCommonDto();
-        stkCommonDto.setParam(dto);
-
-        //头部请求参数
-        Map<String,String> headerMap = null;
-        try {
-            headerMap = getHeaderMap(dto);
-        } catch (Exception e) {
-            log.error("STK加密异常:{}",e.getMessage());
-        }
-
-        HttpResultResponse resultResponse = HuToolUtils.post(QUERY_URL+ACCOUNTANT_PROJECT_REQUEST_CODE,stkCommonDto,headerMap);
-        log.info("深投控,会计项目,返回结果数据{}",JSONObject.toJSONString(resultResponse));
-        if(!resultResponse.getSuccess()){
-            log.info("深投控,会计项目数据异常:{}",resultResponse.getMessage());
-        }
-        return JSONObject.parseObject(resultResponse.getBody(),AccountantProjectVo.class);
-    }
-
-    /**
-     * 新增修改客商信息请求参数封装
-     * @Param 数据库查询数据
-     * */
-    private List<SaveOrChangeCustomerDetailDto> doSaveOrUpdateCustomerParam(List<Object> sourceDataList){
-        if(CollectionUtils.isEmpty(sourceDataList)){
-            return new ArrayList<>();
-        }
-        List<SaveOrChangeCustomerDetailDto> detailDtos = new ArrayList<>();
-        sourceDataList.stream().forEach(p->{
-            SaveOrChangeCustomerDetailDto detailDto = new SaveOrChangeCustomerDetailDto();
-
-            // todo 数据处理, 业务数据需要将 List<Object>中的Object换成数据库查询出的对象类型
-
-            detailDtos.add(detailDto);
-        });
-        return detailDtos;
-    }
-
-    @Override
-    public HttpResultResponse buildPostParam(Integer page,Integer size,QueryCashFlowItemsDto dtoParam) throws Exception {
-
-        //时间戳
-        String timestamp = Long.toString(System.currentTimeMillis());
-
-        //加签方法的重要参数
-        JSONObject request=new JSONObject(4);
-        request.put("page",page);
-        request.put("size",size);
-
-        //传入参数  此处案例仅放置了时间,可自行添加
-        JSONObject param=new JSONObject();
-        //param.put("UPDATE_TIME_start","2024-05-09 14:24:06");
-        //param.put("UPDATE_TIME_end","2024-05-09 15:01:28");
-        //param.put("TASKNO","P2022032200000041");
-        //param.put("TASKCODE","202409");
-
-
-        request.put("param",dtoParam);
-
-        String content = request.toString();
-
-        //加签方法第一个参数
-        StringBuilder signBuilder = new StringBuilder("appid").append("=").append(STK_APP_ID).append("&")
-                .append(content).append("&")
-                .append("timestamp").append("=").append(timestamp).append("&")
-                .append("key").append("=").append(STK_APP_KEY);
-
-        //加签
-        String sign = STKSignUtil.HMACSHA256(signBuilder.toString(),STK_APP_KEY);
-
-        log.info("STK,原始签名:"+signBuilder.toString());
-        log.info("STK,加密签名:"+sign);
-
-        Map<String,String> header = new HashMap<>();
-        header.put("appid",STK_APP_ID);
-        header.put("timestamp", timestamp);
-        header.put("sign", sign);
-        header.put("Content-Type", "application/json");
-        HttpResultResponse resultResponse = HuToolUtils.post(QUERY_URL+CASH_FLOW_ITEMS_REQUEST_CODE
-                ,request, header);
-
-        log.info("示例返回:{}",JSONObject.toJSONString(resultResponse));
-        return resultResponse ;
-    }
-
-    @Override
-    public HttpResultResponse buildKMPostParam(Integer page, Integer size, QueryAccountantProjectDto dto) throws Exception {
-        //时间戳
-        String timestamp = Long.toString(System.currentTimeMillis());
-
-        //加签方法的重要参数
-        JSONObject request=new JSONObject(4);
-        request.put("page",page);
-        request.put("size",size);
-
-        //传入参数  此处案例仅放置了时间,可自行添加
-        JSONObject param=new JSONObject();
-        //param.put("UPDATE_TIME_start","2024-05-09 14:24:06");
-        //param.put("UPDATE_TIME_end","2024-05-09 15:01:28");
-        //param.put("TASKNO","P2022032200000041");
-        //param.put("TASKCODE","202409");
-
-
-        request.put("param",dto);
-
-        String content = request.toString();
-
-        //加签方法第一个参数
-        StringBuilder signBuilder = new StringBuilder("appid").append("=").append(STK_APP_ID).append("&")
-                .append(content).append("&")
-                .append("timestamp").append("=").append(timestamp).append("&")
-                .append("key").append("=").append(STK_APP_KEY);
-
-        //加签
-        String sign = STKSignUtil.HMACSHA256(signBuilder.toString(),STK_APP_KEY);
-
-        log.info("STK,原始签名:"+signBuilder.toString());
-        log.info("STK,加密签名:"+sign);
-
-        Map<String,String> header = new HashMap<>();
-        header.put("appid",STK_APP_ID);
-        header.put("timestamp", timestamp);
-        header.put("sign", sign);
-        header.put("Content-Type", "application/json");
-        HttpResultResponse resultResponse = HuToolUtils.post(QUERY_URL+ACCOUNTANT_PROJECT_REQUEST_CODE
-                ,request, header);
-
-        log.info("示例返回:{}",JSONObject.toJSONString(resultResponse));
-        return resultResponse ;
-    }
-
-    @Override
-    public SaveOrChangeCustomerDataVo updateKSPostParam(SaveOrChangeCustomerDetailDto dto) throws Exception {
-        //时间戳
-        String timestamp = Long.toString(System.currentTimeMillis());
-
-        //应用id
-        String appid = "bc81efc8_b2c6_4670_818e_e2710a45";
-
-        //应用key
-        String appkey = "9a1ae28bc9104deb86f74575acc1c2d6";
-
-        //接口代码
-        String apiCode = "8d0109bc472f45cd843d28534d946894";
-
-        //每一条数据在这里构造,根据实际情况修改
-        JSONObject request=new JSONObject(4);
-        /*request.put("NAME","紫光展讯通信惠州有限公司");
-        request.put("S_CODE","2024-07-04 17:11:43");
-        request.put("CREATED_SYSTEM","ZHONGTAI");
-        request.put("UID_TYPE","01");
-        request.put("UID","91441300MA4WY7CN2T");
-        request.put("CUSTOMER_TYPE","C0201");
-        request.put("IS_VALID","1");
-        request.put("CREATED_ORG","HRORGI0000000001");
-        request.put("ISTEMPORARY","0");*/
-
-        /*request.put("MDM_CODE",null);
-        request.put("CREAT_AT","2024-07-04 17:11:43");
-        request.put("UPDATE_AT","2024-07-04 17:11:43");
-        request.put("SERIAL","23468156486151");*/
-
-
-
-        request.put("NAME",dto.getNAME());
-        request.put("S_CODE",dto.getS_CODE());
-        request.put("CREATED_SYSTEM","YOURUAN");
-        request.put("UID_TYPE","01");
-        request.put("UID",dto.getUID());
-        request.put("CUSTOMER_TYPE",dto.getCUSTOMER_TYPE());
-        request.put("IS_VALID","1");
-        request.put("CREATED_ORG",dto.getCREATED_ORG());
-        request.put("ISTEMPORARY","0");
-
-
-        //param参数构造 并传入你构造的每一条数据参数,此处例:1条
-        JSONObject requestparam=new JSONObject(4);
-        requestparam.put("param",request);
-
-
-        String content = requestparam.toString();
-
-        //加签方法第一个参数
-        StringBuilder signBuilder = new StringBuilder("appid").append("=").append(appid).append("&")
-                .append(content).append("&")
-                .append("timestamp").append("=").append(timestamp).append("&")
-                .append("key").append("=").append(appkey);
-
-        //加签
-        String sign = STKSignUtil.HMACSHA256(signBuilder.toString(),appkey);
-
-        System.out.println("原始:"+signBuilder);
-        System.out.println("签名:"+sign);
-        System.out.println("content:"+content);
-
-        //请求数据(接口地址根据测试环境与正式环境变更)
-        String body = HttpRequest.post("http://10.67.2.187/api/oapigw/api/oapisvc/automicUpsertApi/"+apiCode)
-                .header("appid",appid)  //请求头
-                .header("timestamp", timestamp)
-                .header("sign", sign)
-                .header("Content-Type", "application/json")
-                .body(content)  //请求参数
-                .timeout(20000)  //超时时间
-                .execute().body();
-
-        System.out.println("返回结果:"+body);
-        log.info("返回结果:{}",body);
-        return JSONObject.parseObject(body,SaveOrChangeCustomerDataVo.class);
-    }
-
-    /**
-     * 根据属性名获取该类此属性的值
-     * @param fieldName
-     * @param object
-     * @return
-     */
-    private static Object getValueByFieldName(String fieldName,Object object){
-        String firstLetter=fieldName.substring(0,1).toUpperCase();
-        String getter = "get"+firstLetter+fieldName.substring(1);
-        try {
-            Method method = object.getClass().getMethod(getter, new Class[]{});
-            Object value = method.invoke(object, new Object[] {});
-            return value;
-        } catch (Exception e) {
-            return null;
-        }
-
-    }
-
-    @Override
-    public List<CustvendDTO> queryList() {
-        List<CustvendDTO> custvendDTO = new ArrayList<CustvendDTO>();
-        SqlRowList rs = baseDao.queryForRowSet("select * from STK_CUSTVEND_CS");
-        while (rs.next()) {
-            CustvendDTO custvend = baseDao.getJdbcTemplate().queryForObject("select *  from STK_CUSTVEND_CS where id = " + rs.getInt("id"), new BeanPropertyRowMapper<CustvendDTO>(CustvendDTO.class));
-            custvendDTO.add(custvend);
-        }
-        return custvendDTO;
-    }
-
-    @Override
-    public TravellingMerchantVo queryTravelingMerchantList(QueryTravellingMerchantDto dto) throws Exception {
-
-        //时间戳
-        String timestamp = Long.toString(System.currentTimeMillis());
-
-        //加签方法的重要参数
-        //若该接口需要传入一些参数  如:name、age等等
-        //则直接在这个位置put即可
-        JSONObject request=new JSONObject(4);
-        request.put("code",GET_TRAVELLING_MERCHANT);
-        request.put("s_orgcode",S_ORG_CODE);//119030009
-        //request.put("start_time","2022-11-02 09:38:23");
-        //request.put("end_time","2025-01-06 22:04:47");
-        //request.put("jslx","合并口径");
-        //request.put("dwmc","担保集团");
-        request.put("page",dto.getPage());
-        request.put("size",dto.getSize());
-        request.put("start_time",dto.getStart_time());
-        request.put("end_time",dto.getEnd_time());
-
-
-        String content = request.toString();
-
-        //加签方法第一个参数
-        StringBuilder signBuilder = new StringBuilder("appid").append("=").append(STK_APP_ID).append("&")
-                .append(content).append("&")
-                .append("timestamp").append("=").append(timestamp).append("&")
-                .append("key").append("=").append(STK_APP_KEY);
-
-
-
-
-        //加签
-        String sign = STKSignUtil.HMACSHA256(signBuilder.toString(),STK_APP_KEY);
-
-        System.out.println("原始:"+signBuilder);
-        System.out.println("签名:"+sign);
-        System.out.println("content:"+content);
-
-        //请求数据 (接口地址根据测试环境与正式环境变更)
-        String body = HttpRequest.post(COMPLEXITY_QUERY_URL)
-                .header("appid",STK_APP_ID)  //请求头
-                .header("timestamp", timestamp)
-                .header("sign", sign)
-                .header("Content-Type", "application/json")
-                .body(content)  //请求参数
-                .timeout(20000)  //超时时间
-                .execute().body();
-
-        //JSONObject jsonObject = JSON.parseObject(body);
-
-        //JSONObject dataObject = jsonObject.getJSONObject("data");
-
-        //JSONArray listArray = dataObject.getJSONArray("list");
-
-        System.out.println("返回结果:"+body);
-
-        //System.out.println("返回结果:"+listArray.size());
-        return JSONObject.parseObject(body,TravellingMerchantVo.class);  //返回结果
-    }
-
-    /**
-     * POST请求头部参数封装
-     * */
-    public Map<String,String> getHeaderMap(Object dto) throws Exception {
-
-        log.info("STK,加密前参数:{}",JSONObject.toJSONString(dto));
-
-        //时间戳
-        String timestamp = Long.toString(System.currentTimeMillis());
-
-        //获取签名
-        String sign = getSign(dto,timestamp);
-        log.info("STK,加密后的签名:"+sign);
-
-        Map<String,String> headerMap = new HashMap<>();
-        headerMap.put("appid",STK_APP_ID);
-        headerMap.put("timestamp",timestamp);
-        headerMap.put("sign",sign);
-        headerMap.put("Content-Type","application/json");
-        return headerMap;
-    }
-
-    /**
-     * 获取深投控加密参数
-     * */
-    public String getSign(Object dto,String timestamp) throws Exception {
-
-        String content = dto.toString();
-
-        //加签方法第一个参数
-        StringBuilder signBuilder = new StringBuilder("appid").append("=").append(STK_APP_ID).append("&")
-                .append(content).append("&")
-                .append("timestamp").append("=").append(timestamp).append("&")
-                .append("key").append("=").append(STK_APP_KEY);
-        log.info("STK,加密前参数:"+signBuilder.toString());
-        //加签
-        return STKSignUtil.HMACSHA256(signBuilder.toString(),STK_APP_KEY);
-    }
-
-}

+ 0 - 457
src/main/java/com/uas/eis/service/Impl/STKServiceImpl.java

@@ -1,457 +0,0 @@
-package com.uas.eis.service.Impl;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.serializer.SerializerFeature;
-import com.uas.eis.core.config.SpObserver;
-import com.uas.eis.dao.BaseDao;
-import com.uas.eis.dao.SqlRowList;
-import com.uas.eis.sdk.dto.*;
-import com.uas.eis.sdk.entity.ApiResult;
-import com.uas.eis.sdk.resp.ApiResponse;
-import com.uas.eis.service.RequestSTKService;
-import com.uas.eis.service.STKService;
-import com.uas.eis.utils.*;
-import com.uas.eis.vo.stkVo.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
-import org.springframework.util.StringUtils;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * @author zhuxl
- * @date 2024-10-12
- */
-@Service
-public class STKServiceImpl implements STKService {
-    private final Logger logger = LoggerFactory.getLogger(this.getClass());
-    @Autowired
-    private BaseDao baseDao;
-
-    @Autowired
-    private RequestSTKService requestSTKService;
-
-    @Override
-    public ApiResult<String> getAssistBalanceCount(HttpServletRequest request, AssistBalanceDTO dto) {
-        String yearmonth = dto.getYearMonth();
-        boolean bool = baseDao.checkIf("PeriodsDetail", "pd_code='MONTH-A' and pd_status=99 and pd_detno='"+yearmonth+"'");
-        if (bool) {
-            int batch_no = baseDao.getSeqId("STK_ASSISTBALANCE2_SEQ");
-            String res = baseDao.callProcedure("SP_INSER_ASSISTBALANCE",
-                    new Object[] {batch_no,yearmonth});
-            if (res != null && !res.trim().equals("")) {
-                return ApiResponse.successRsp("1",res,request.getHeader("RequestId"),null);
-            }else{
-                int count = baseDao.getCount("select count(1)  from STK_ASSISTBALANCE where FPERIODNAME='" + yearmonth + "'");
-                BalanceCountDTO balanceCountDTO = new BalanceCountDTO();
-                balanceCountDTO.setYearMonth(yearmonth);
-                balanceCountDTO.setBatch_no(batch_no);
-                balanceCountDTO.setCount(count);
-                String s = JSON.toJSONString(balanceCountDTO, SerializerFeature.WriteMapNullValue);
-                return ApiResponse.successRsp("1",null,request.getHeader("RequestId"),s);
-            }
-        }else{
-            return ApiResponse.successRsp("2001","当前期间未结账!",request.getHeader("RequestId"),null);
-        }
-    }
-
-    @Override
-    public ApiResult<String> getAssistBalance(HttpServletRequest request, AssistBalanceDTO dto) {
-        String yearmonth = dto.getYearMonth();
-        String batch_no = dto.getBatch_no();
-        int pageNum = Integer.valueOf(dto.getPageNum());
-        int pageSize = Integer.valueOf(dto.getPageSize());
-        int start = ((pageNum - 1) * pageSize + 1);
-        int end = pageNum * pageSize;
-        boolean bool = baseDao.checkIf("PeriodsDetail", "pd_code='MONTH-A' and pd_status=99 and pd_detno='"+yearmonth+"'");
-        if (bool) {
-            List<BalanceDTO> balanceDTO = baseDao.query("SELECT fid,fssno,fsoid,forgunitno,forgunitname,fperiodname,fcurrencyname,forginalcname,faccountno,faccountname," +
-                    "     fassistgrptype,fassistgrpno1,fassistgrpname1," +
-                    "     fassistgrpno2,fassistgrpname2," +
-                    "     fbeginbalancefor,fbeginbalancelocal," +
-                    "     fcreditfor,fcreditlocal,fdebitfor,fdebitlocal," +
-                    "     fendbalancefor,fendbalancelocal," +
-                    "     fyearpnlfor,fyearpnllocal," +
-                    "     fyeardebitfor,fyeardebitlocal,fyearcreditfor,fyearcreditlocal," +
-                    "     faccoccurfor,faccoccurlocal," +
-                    "     to_char(fmodifytime,'yyyy-mm-dd hh24:mi:ss') fmodifytime,to_char(flockintime,'yyyy-mm-dd hh24:mi:ss') flockintime," +
-                    "     fdisablelabel,fdatamode,fbilltype,batch_no from stk_assistbalance " +
-                    "WHERE batch_no ="+batch_no+" and FPERIODNAME = '"+yearmonth +"' and QUERYDETNO >= " +start+ " and QUERYDETNO <= " + end, BalanceDTO.class);
-
-            //String s = JSON.toJSONString(rs.getResultList(), SerializerFeature.WriteMapNullValue);
-            String s = JSON.toJSONString(balanceDTO, SerializerFeature.WriteMapNullValue);
-            return ApiResponse.successRsp("1",null,request.getHeader("RequestId"),s);
-        }else{
-            return ApiResponse.successRsp("2001","当前期间未结账!",request.getHeader("RequestId"),null);
-        }
-    }
-
-    @Override
-    public ApiResult<String> getCashFlowCount(HttpServletRequest request, AssistBalanceDTO dto) {
-        String yearmonth = dto.getYearMonth();
-        boolean bool = baseDao.checkIf("PeriodsDetail", "pd_code='MONTH-A' and pd_status=99 and pd_detno='"+yearmonth+"'");
-        if (bool) {
-            int batch_no = baseDao.getSeqId("STK_CASHFLOW2_SEQ");
-            String res = baseDao.callProcedure("SP_INSER_CASHFLOW",
-                    new Object[] {batch_no,yearmonth});
-            if (res != null && !res.trim().equals("")) {
-                return ApiResponse.successRsp("2001",res,request.getHeader("RequestId"),null);
-            }else{
-                int count = baseDao.getCount("select count(1)  from STK_CASHFLOW where FPERIODNAME='" + yearmonth + "'");
-                BalanceCountDTO balanceCountDTO = new BalanceCountDTO();
-                balanceCountDTO.setYearMonth(yearmonth);
-                balanceCountDTO.setBatch_no(batch_no);
-                balanceCountDTO.setCount(count);
-                String s = JSON.toJSONString(balanceCountDTO, SerializerFeature.WriteMapNullValue);
-                return ApiResponse.successRsp("1",null,request.getHeader("RequestId"),s);
-            }
-        }else{
-            return ApiResponse.successRsp("2001","当前期间未结账!",request.getHeader("RequestId"),null);
-        }
-    }
-
-    @Override
-    public ApiResult<String> getCashFlow(HttpServletRequest request, AssistBalanceDTO dto) {
-        String yearmonth = dto.getYearMonth();
-        String batch_no = dto.getBatch_no();
-        int pageNum = Integer.valueOf(dto.getPageNum());
-        int pageSize = Integer.valueOf(dto.getPageSize());
-        int start = ((pageNum - 1) * pageSize + 1);
-        int end = pageNum * pageSize;
-        boolean bool = baseDao.checkIf("PeriodsDetail", "pd_code='MONTH-A' and pd_status=99 and pd_detno='"+yearmonth+"'");
-        if (bool) {
-            List<CashFlowDTO> cashFlowDTO = baseDao.query("SELECT fid,fssno,fsoid,forgunitno,forgunitname,fperiodname,fcurrencyname,forginalcname,faccountno,faccountname," +
-                    "     fassistgrptype,fassistgrpno1,fassistgrpname1," +
-                    "     fassistgrpno2,fassistgrpname2," +
-                    "     fytdamt,fytdlocalamt," +
-                    "     fmodifytime,flockintime,fdisablelabel,fdatamode,batch_no from STK_CASHFLOW " +
-                    "WHERE batch_no ="+batch_no+" and FPERIODNAME = '"+yearmonth +"' and QUERYDETNO >= " +start+ " and QUERYDETNO <= " + end, CashFlowDTO.class);
-
-            //String s = JSON.toJSONString(rs.getResultList(), SerializerFeature.WriteMapNullValue);
-            String s = JSON.toJSONString(cashFlowDTO, SerializerFeature.WriteMapNullValue);
-            return ApiResponse.successRsp("1",null,request.getHeader("RequestId"),s);
-        }else{
-            return ApiResponse.successRsp("2001","当前期间未结账!",request.getHeader("RequestId"),null);
-        }
-    }
-
-
-
-    @Override
-    public ApiResult<String> updateCustVend(UpdateCustVendDTO dto) {
-        int vid = dto.getVid();
-        String vtype = dto.getVtype();
-        //查询出的新增,变更数据
-        List<SaveOrChangeCustomerDetailDto> sourceDataList = new ArrayList<>();
-        if ("客户".equals(vtype)) {
-            SqlRowList cust = baseDao
-                    .queryForRowSet("select CU_CODE,CU_NAME,UID_TYPE,CU_BUSINESSCODE,NVL(CUSTOMER_TYPE,'C0201') CUSTOMER_TYPE,IS_VALID,nvl(CREATED_ORG,CU_CODE) CREATED_ORG,CREATED_SYSTEM,ISTEMPORARY " +
-                            "from Customer left join STK_CUSTVEND on cu_businesscode = uid2 where cu_id="
-                            + vid + "");
-            while (cust.next()) {
-                SaveOrChangeCustomerDetailDto sourcedao = new SaveOrChangeCustomerDetailDto();
-                sourcedao.setS_CODE(cust.getString("CU_CODE"));
-                sourcedao.setNAME(cust.getString("CU_NAME"));
-                sourcedao.setUID_TYPE(cust.getString("UID_TYPE"));
-                sourcedao.setUID(cust.getString("CU_BUSINESSCODE"));
-                sourcedao.setCUSTOMER_TYPE(cust.getString("CUSTOMER_TYPE"));
-                sourcedao.setIS_VALID(cust.getString("IS_VALID"));
-                sourcedao.setCREATED_ORG(cust.getString("CREATED_ORG"));
-                sourcedao.setCREATED_SYSTEM(cust.getString("CREATED_SYSTEM"));
-                sourcedao.setISTEMPORARY(cust.getString("ISTEMPORARY"));
-                sourceDataList.add(sourcedao);
-            }
-
-        }else{
-            SqlRowList vend = baseDao
-                    .queryForRowSet("select VE_CODE,VE_NAME,UID_TYPE,VE_WEBSERVER,NVL(CUSTOMER_TYPE,'S0201') CUSTOMER_TYPE,IS_VALID,nvl(CREATED_ORG,VE_CODE) CREATED_ORG,CREATED_SYSTEM,ISTEMPORARY " +
-                            "from Vendor left join STK_CUSTVEND on ve_webserver = uid2 where ve_id="
-                            + vid + "");
-            while (vend.next()) {
-                SaveOrChangeCustomerDetailDto sourcedao = new SaveOrChangeCustomerDetailDto();
-                sourcedao.setS_CODE(vend.getString("VE_CODE"));
-                sourcedao.setNAME(vend.getString("VE_NAME"));
-                sourcedao.setUID_TYPE(vend.getString("UID_TYPE"));
-                sourcedao.setUID(vend.getString("VE_WEBSERVER"));
-                sourcedao.setCUSTOMER_TYPE(vend.getString("CUSTOMER_TYPE"));
-                sourcedao.setIS_VALID(vend.getString("IS_VALID"));
-                sourcedao.setCREATED_ORG(vend.getString("CREATED_ORG"));
-                sourcedao.setCREATED_SYSTEM(vend.getString("CREATED_SYSTEM"));
-                sourcedao.setISTEMPORARY(vend.getString("ISTEMPORARY"));
-                sourceDataList.add(sourcedao);
-            }
-        }
-        List<SaveOrChangeCustomerDataVo> changeCustomerVos = new ArrayList<>();
-        //调用深投控api接口
-        for(SaveOrChangeCustomerDetailDto detailDto : sourceDataList){
-            SaveOrChangeCustomerDataVo saveOrChangeCustomerVo = null;
-            try {
-                logger.info("开始调用客商api");
-                saveOrChangeCustomerVo = requestSTKService.updateKSPostParam(detailDto);
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-            changeCustomerVos.add(saveOrChangeCustomerVo);
-        }
-
-        ApiResult result = new ApiResult();
-        return result.setData(changeCustomerVos);
-    }
-
-
-    @Override
-    public ApiResult<String> getAssistBalanceCountTest(HttpServletRequest request, AssistBalanceDTO dto) {
-        //取yearMonth
-        String yearMonth = dto.getYearMonth();
-        System.out.println("body参数打印:"+dto.getYearMonth());
-        //获取header参数
-        Map<String,String> headerMap = getHeaderParams(request);
-        System.out.println("header参数:【AccessKey:"+headerMap.get("AccessKey")+",Timestamp:"+headerMap.get("Timestamp")
-        +",RequestId:"+headerMap.get("RequestId")+",Signature:"+headerMap.get("Signature")+"】");
-        return null;
-    }
-
-
-
-    //客商信息
-    @Override
-    public void getCustvend(TravellingMerchantVo travellingMerchantVo , Boolean isdelete) {
-        if(null == travellingMerchantVo.getData() || CollectionUtils.isEmpty(travellingMerchantVo.getData().getList())){
-            return ;
-        }
-        List<CustvendDTO> custvendDTOS = travellingMerchantVo.getData().getList();
-        /*List<String> sqls = new ArrayList<>();
-        if (isdelete) {
-            sqls.add("delete from STK_CUSTVEND");
-        }*/
-        for (int i = 0; i < custvendDTOS.size(); i++) {
-            List<String> sqls = new ArrayList<>();
-            sqls.add("delete from STK_CUSTVEND where id = " + custvendDTOS.get(i).getId());
-            /*String regBizsCope = "to_clob("+StringUtil.splitAndConcat(custvendDTOS.get(i).getReg_bizscope(), 1333, "'", "'", ")||to_clob(")+")";
-            if (StringUtils.isEmpty(custvendDTOS.get(i).getReg_bizscope()) ||custvendDTOS.get(i).getReg_bizscope().length()==0) {
-                regBizsCope = "''";
-            }*/
-            String val = custvendDTOS.get(i).getName();
-            if (val.contains("'")) {
-                val = val.replaceAll("'", "''");
-            }
-            sqls.add("insert into STK_CUSTVEND(ID,S_ID,S_CODE,NAME,UID_TYPE,UID2,CUSTOMER_TYPE,IS_VALID,CREATED_ORG,CREATED_SYSTEM,ISTEMPORARY,MDM_CODE,REG_COUNTRY, " +
-                    "REG_PLACE,REG_REP,REG_CAPTIAL,REG_PERIOD,REG_BIZSCOPE," +
-                    "REG_FOUNDEDDATE," +
-                    "REG_URL,REG_ADDRESS," +
-                    "CREAT_TIME," +
-                    "UPDATE_TIME,SERIAL) " +
-                    "values ("+custvendDTOS.get(i).getId()+","+custvendDTOS.get(i).getS_id()+",'"+custvendDTOS.get(i).getS_code()+"','"+val+"'" +
-                    ",'"+custvendDTOS.get(i).getUid_type()+"','"+custvendDTOS.get(i).getUid()+"','"+custvendDTOS.get(i).getCustomer_type()+"','"+custvendDTOS.get(i).getIs_valid()+"'" +
-                    ",'"+custvendDTOS.get(i).getCreated_org()+"','"+custvendDTOS.get(i).getCreated_system()+"','"+custvendDTOS.get(i).getIstemporary()+"','"+custvendDTOS.get(i).getMdm_code()+"','"+custvendDTOS.get(i).getReg_country()+"'" +
-                    ",'"+custvendDTOS.get(i).getReg_place()+"','"+custvendDTOS.get(i).getReg_rep()+"','"+custvendDTOS.get(i).getReg_captial()+"','"+custvendDTOS.get(i).getReg_period()+"',' '" +
-                    ",case when '"+custvendDTOS.get(i).getReg_foundeddate()+"' = 'null' then null else to_date(to_char(to_timestamp('"+custvendDTOS.get(i).getReg_foundeddate()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    ",'"+custvendDTOS.get(i).getReg_url()+"','"+custvendDTOS.get(i).getReg_address()+"'" +
-                    ",case when '"+custvendDTOS.get(i).getCreat_time()+"' = 'null' then null else to_date(to_char(to_timestamp('"+custvendDTOS.get(i).getCreat_time()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    ",case when '"+custvendDTOS.get(i).getUpdate_time()+"' = 'null' then null else to_date(to_char(to_timestamp('"+custvendDTOS.get(i).getUpdate_time()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end,'"+custvendDTOS.get(i).getSerial()+"')");
-            sqls.add("update STK_CUSTVEND set UID_TYPENAME = case when UID_TYPE = '01' then '统一社会信用代码' when UID_TYPE = '02' then '邓氏编码' " +
-                    "when UID_TYPE = '03' then '身份证号码(大陆)' when UID_TYPE = '04' then '护照号码(包括港澳身份证号码)'  when UID_TYPE = '06' then '身份证护照组合' " +
-                    "when UID_TYPE = '99' then '其他编码' end where id = " + custvendDTOS.get(i).getId());
-            sqls.add("update STK_CUSTVEND set CUSTOMER_TYPENAME = case when CUSTOMER_TYPE = 'C0201' then '单位客户' when CUSTOMER_TYPE = 'C0202' then '个人客户' " +
-                    "when CUSTOMER_TYPE = 'S0201' then '单位供应商' when CUSTOMER_TYPE = 'S0202' then '个人供应商' end where id = " + custvendDTOS.get(i).getId());
-            sqls.add("update STK_CUSTVEND set IS_VALIDNAME = case when IS_VALID = '1' then '有效' else '无效' end, " +
-                    "ISTEMPORARYNAME = case when ISTEMPORARY = '1' then '是' else '否' end where id = " + custvendDTOS.get(i).getId());
-            baseDao.execute(sqls);
-        }
-    }
-
-    //客商信息(当天)
-    @Override
-    public void getCustvendDay(TravellingMerchantVo travellingMerchantVo , Boolean isdelete) {
-        if(null == travellingMerchantVo.getData() || CollectionUtils.isEmpty(travellingMerchantVo.getData().getList())){
-            return ;
-        }
-        List<CustvendDTO> custvendDTOS = travellingMerchantVo.getData().getList();
-        List<String> sqls = new ArrayList<>();
-        for (int i = 0; i < custvendDTOS.size(); i++) {
-            sqls.add("delete from STK_CUSTVEND where id = " + custvendDTOS.get(i).getId());
-            String val = custvendDTOS.get(i).getName();
-            if (val.contains("'")) {
-                val = val.replaceAll("'", "''");
-            }
-            sqls.add("insert into STK_CUSTVEND(ID,S_ID,S_CODE,NAME,UID_TYPE,UID2,CUSTOMER_TYPE,IS_VALID,CREATED_ORG,CREATED_SYSTEM,ISTEMPORARY,MDM_CODE,REG_COUNTRY, " +
-                    "REG_PLACE,REG_REP,REG_CAPTIAL,REG_PERIOD,REG_BIZSCOPE," +
-                    "REG_FOUNDEDDATE," +
-                    "REG_URL,REG_ADDRESS," +
-                    "CREAT_TIME," +
-                    "UPDATE_TIME,SERIAL) " +
-                    "values ("+custvendDTOS.get(i).getId()+","+custvendDTOS.get(i).getS_id()+",'"+custvendDTOS.get(i).getS_code()+"','"+val+"'" +
-                    ",'"+custvendDTOS.get(i).getUid_type()+"','"+custvendDTOS.get(i).getUid()+"','"+custvendDTOS.get(i).getCustomer_type()+"','"+custvendDTOS.get(i).getIs_valid()+"'" +
-                    ",'"+custvendDTOS.get(i).getCreated_org()+"','"+custvendDTOS.get(i).getCreated_system()+"','"+custvendDTOS.get(i).getIstemporary()+"','"+custvendDTOS.get(i).getMdm_code()+"','"+custvendDTOS.get(i).getReg_country()+"'" +
-                    ",'"+custvendDTOS.get(i).getReg_place()+"','"+custvendDTOS.get(i).getReg_rep()+"','"+custvendDTOS.get(i).getReg_captial()+"','"+custvendDTOS.get(i).getReg_period()+"',' '" +
-                    ",case when '"+custvendDTOS.get(i).getReg_foundeddate()+"' = 'null' then null else to_date(to_char(to_timestamp('"+custvendDTOS.get(i).getReg_foundeddate()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    ",'"+custvendDTOS.get(i).getReg_url()+"','"+custvendDTOS.get(i).getReg_address()+"'" +
-                    ",case when '"+custvendDTOS.get(i).getCreat_time()+"' = 'null' then null else to_date(to_char(to_timestamp('"+custvendDTOS.get(i).getCreat_time()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    ",case when '"+custvendDTOS.get(i).getUpdate_time()+"' = 'null' then null else to_date(to_char(to_timestamp('"+custvendDTOS.get(i).getUpdate_time()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end,'"+custvendDTOS.get(i).getSerial()+"')");
-            sqls.add("update STK_CUSTVEND set UID_TYPENAME = case when UID_TYPE = '01' then '统一社会信用代码' when UID_TYPE = '02' then '邓氏编码' " +
-                    "when UID_TYPE = '03' then '身份证号码(大陆)' when UID_TYPE = '04' then '护照号码(包括港澳身份证号码)'  when UID_TYPE = '06' then '身份证护照组合' " +
-                    "when UID_TYPE = '99' then '其他编码' end where id = " + custvendDTOS.get(i).getId());
-            sqls.add("update STK_CUSTVEND set CUSTOMER_TYPENAME = case when CUSTOMER_TYPE = 'C0201' then '单位客户' when CUSTOMER_TYPE = 'C0202' then '个人客户' " +
-                    "when CUSTOMER_TYPE = 'S0201' then '单位供应商' when CUSTOMER_TYPE = 'S0202' then '个人供应商' end where id = " + custvendDTOS.get(i).getId());
-            sqls.add("update STK_CUSTVEND set IS_VALIDNAME = case when IS_VALID = '1' then '有效' else '无效' end, " +
-                    "ISTEMPORARYNAME = case when ISTEMPORARY = '1' then '是' else '否' end where id = " + custvendDTOS.get(i).getId());
-        }
-        baseDao.execute(sqls);
-    }
-
-
-
-    //获取现金流
-    @Override
-    public void getCashFlowItems(CashFlowItemsVo cashFlowItemsVo , Boolean isdelete) {
-        if(null == cashFlowItemsVo.getData()){
-            return ;
-        }
-        List<CashFlowItemsDataVo> cashFlowItemsDataVo = cashFlowItemsVo.getData().getList();
-        List<String> sqls = new ArrayList<>();
-        if (isdelete) {
-            sqls.add("delete from STK_CASHFLOWDJ");
-        }
-        for (int i = 0; i < cashFlowItemsDataVo.size(); i++) {
-            sqls.add("delete from STK_CASHFLOWDJ where id = " + cashFlowItemsDataVo.get(i).getID());
-            sqls.add("insert into STK_CASHFLOWDJ(ID,NUMBER2,CODE,NAME,LONGNUMBER,LEVEL2,FULLNAME,ISLEAF,CTRLSTRATEGY,SOURCEDATA,BITINDEX,SRCINDEX," +
-                    "TYPE,DIRECTION,ISDEALACTIVITY,ISEXCHANGERATE,ISPREFIT,NOTICE,CHECKITEMHELP,ISASSIST,ISSCHEDULEITEM,MODIFIER_NUMBER," +
-                    "MODIFIER_NAME,CREATEORG_NUMBER,ORG_NUMBER,ORG_NAME,USEORG_NUMBER,USEORG_NAME,STATUS,ENABLE," +
-                    "CREATE_TIME," +
-                    "UPDATE_IME," +
-                    "SOURCE,ASSISTENTRY) " +
-                    "values ("+cashFlowItemsDataVo.get(i).getID()+",'"+cashFlowItemsDataVo.get(i).getNUMBER()+"','"+cashFlowItemsDataVo.get(i).getCODE()+"','"+cashFlowItemsDataVo.get(i).getNAME()+"'" +
-                    ",'"+cashFlowItemsDataVo.get(i).getLONGNUMBER()+"','"+cashFlowItemsDataVo.get(i).getLEVEL()+"','"+cashFlowItemsDataVo.get(i).getFULLNAME()+"','"+cashFlowItemsDataVo.get(i).getISLEAF()+"'" +
-                    ",'"+cashFlowItemsDataVo.get(i).getCTRLSTRATEGY()+"','"+cashFlowItemsDataVo.get(i).getSOURCEDATA()+"','"+cashFlowItemsDataVo.get(i).getBITINDEX()+"','"+cashFlowItemsDataVo.get(i).getSRCINDEX()+"'" +
-                    ",'"+cashFlowItemsDataVo.get(i).getTYPE()+"','"+cashFlowItemsDataVo.get(i).getDIRECTION()+"','"+cashFlowItemsDataVo.get(i).getISDEALACTIVITY()+"','"+cashFlowItemsDataVo.get(i).getISEXCHANGERATE()+"','"+cashFlowItemsDataVo.get(i).getISPREFIT()+"','"+cashFlowItemsDataVo.get(i).getNOTICE()+"'" +
-                    ",'"+cashFlowItemsDataVo.get(i).getCHECKITEMHELP()+"','"+cashFlowItemsDataVo.get(i).getISASSIST()+"','"+cashFlowItemsDataVo.get(i).getISSCHEDULEITEM()+"','"+cashFlowItemsDataVo.get(i).getMODIFIER_NUMBER()+"'" +
-                    ",'"+cashFlowItemsDataVo.get(i).getMODIFIER_NAME()+"','"+cashFlowItemsDataVo.get(i).getCREATEORG_NUMBER()+"','"+cashFlowItemsDataVo.get(i).getORG_NUMBER()+"','"+cashFlowItemsDataVo.get(i).getORG_NAME()+"'" +
-                    ",'"+cashFlowItemsDataVo.get(i).getUSEORG_NUMBER()+"','"+cashFlowItemsDataVo.get(i).getUSEORG_NAME()+"','"+cashFlowItemsDataVo.get(i).getSTATUS()+"','"+cashFlowItemsDataVo.get(i).getENABLE()+"'" +
-                    ",case when '"+cashFlowItemsDataVo.get(i).getCREATE_TIME()+"' = 'null' then null else to_date(to_char(to_timestamp('"+cashFlowItemsDataVo.get(i).getCREATE_TIME()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    ",case when '"+cashFlowItemsDataVo.get(i).getUPDATE_IME()+"' = 'null' then null else to_date(to_char(to_timestamp('"+cashFlowItemsDataVo.get(i).getUPDATE_IME()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    //",'"+cashFlowItemsDataVo.get(i).getSOURCE()+"','"+cashFlowItemsDataVo.get(i).getASSISTENTRY()+"')");
-                    ",'"+cashFlowItemsDataVo.get(i).getSOURCE()+"','')");
-        }
-        baseDao.execute(sqls);
-    }
-
-
-    //获取会计科目
-    @Override
-    public void getAccountantProject(AccountantProjectVo accountantProjectVo , Boolean isdelete) {
-        if(null == accountantProjectVo.getData()){
-            return ;
-        }
-        List<AccountantProjectDataVo> accountantProjectDataVo = accountantProjectVo.getData().getList();
-        List<String> sqls = new ArrayList<>();
-        if (isdelete) {
-            sqls.add("delete from STK_CATEGORYDJ");
-        }
-        for (int i = 0; i < accountantProjectDataVo.size(); i++) {
-            sqls.add("delete from STK_CATEGORYDJ where id = " + accountantProjectDataVo.get(i).getID());
-            sqls.add("insert into STK_CATEGORYDJ(ID,S_ID,S_NUMBER,CODE,NAME,PARENTID,S_PARENTNUM,PARENTCODE,PARENTNAME,LONGNUMBER,LONGNAME,LEVEL2,ISLEAF,ACCOUNTTABLENUMBER,ACCOUNTTABLENAME,ACCOUNTTYPENUMBER,ACCOUNTTYPENAME," +
-                    "PLTYPE,DC,ACCRUALDIRECTION,ISCASH,ISBANK,ISCASHEQUIVALENT,ACNOTICE,ISCHANGECURRENCY,BW,ISQTY,ISASSIST,NOCURRENCYRADIO,DESCURRENCYRADIO,ALLCURRENCYRADIO,ACCTCURRENCY,HELPCODE,ISALLOWCA,ORGCONTROLLEVEL,ISMANUAL,ACCHECK,ISJOURNAL," +
-                    "STARTDATE," +
-                    "ENDDATE," +
-                    "MREUTYPENUMBER,MREUTYPENAME,MEASUREUNITCNUM,MEASUREUNITNAME,CREATEORGCODE,CREATEORGNAME,ORG_NUMBER,ORG_NAME,USEORG_NUMBER,USEORG_NAME,CTRLSTRATEGY,STATUS,ENABLE," +
-                    "CREATE_TIME," +
-                    "UPDATE_TIME," +
-                    "DISABLEDATE," +
-                    "SOURCE,ENTRYCHECKITEM,ENTRYCURRENCY) " +
-                    "values ("+accountantProjectDataVo.get(i).getID()+",'"+accountantProjectDataVo.get(i).getS_ID()+"','"+accountantProjectDataVo.get(i).getS_NUMBER()+"','"+accountantProjectDataVo.get(i).getCODE()+"','"+accountantProjectDataVo.get(i).getNAME()+"'" +
-                    ",'"+accountantProjectDataVo.get(i).getPARENTID()+"','"+accountantProjectDataVo.get(i).getS_PARENTNUM()+"','"+accountantProjectDataVo.get(i).getPARENTCODE()+"','"+accountantProjectDataVo.get(i).getPARENTNAME()+"'" +
-                    ",'"+accountantProjectDataVo.get(i).getLONGNUMBER()+"','"+accountantProjectDataVo.get(i).getLONGNAME()+"','"+accountantProjectDataVo.get(i).getLEVEL()+"','"+accountantProjectDataVo.get(i).getISLEAF()+"'" +
-                    ",'"+accountantProjectDataVo.get(i).getACCOUNTTABLENUMBER()+"','"+accountantProjectDataVo.get(i).getACCOUNTTABLENAME()+"','"+accountantProjectDataVo.get(i).getACCOUNTTYPENUMBER()+"','"+accountantProjectDataVo.get(i).getACCOUNTTYPENAME()+"'" +
-                    ",'"+accountantProjectDataVo.get(i).getPLTYPE()+"','"+accountantProjectDataVo.get(i).getDC()+"','"+accountantProjectDataVo.get(i).getACCRUALDIRECTION()+"','"+accountantProjectDataVo.get(i).getISCASH()+"','"+accountantProjectDataVo.get(i).getISBANK()+"'" +
-                    ",'"+accountantProjectDataVo.get(i).getISCASHEQUIVALENT()+"','"+accountantProjectDataVo.get(i).getACNOTICE()+"','"+accountantProjectDataVo.get(i).getISCHANGECURRENCY()+"','"+accountantProjectDataVo.get(i).getBW()+"','"+accountantProjectDataVo.get(i).getISQTY()+"'" +
-                    ",'"+accountantProjectDataVo.get(i).getISASSIST()+"','"+accountantProjectDataVo.get(i).getNOCURRENCYRADIO()+"','"+accountantProjectDataVo.get(i).getDESCURRENCYRADIO()+"','"+accountantProjectDataVo.get(i).getALLCURRENCYRADIO()+"','"+accountantProjectDataVo.get(i).getACCTCURRENCY()+"','"+accountantProjectDataVo.get(i).getHELPCODE()+"'" +
-                    ",'"+accountantProjectDataVo.get(i).getISALLOWCA()+"','"+accountantProjectDataVo.get(i).getORGCONTROLLEVEL()+"','"+accountantProjectDataVo.get(i).getISMANUAL()+"','"+accountantProjectDataVo.get(i).getACCHECK()+"','"+accountantProjectDataVo.get(i).getISJOURNAL()+"'" +
-                    ",case when '"+accountantProjectDataVo.get(i).getSTARTDATE()+"' = 'null' then null else to_date(to_char(to_timestamp('"+accountantProjectDataVo.get(i).getSTARTDATE()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    ",case when '"+accountantProjectDataVo.get(i).getENDDATE()+"' = 'null' then null else to_date(to_char(to_timestamp('"+accountantProjectDataVo.get(i).getENDDATE()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    ",'"+accountantProjectDataVo.get(i).getMREUTYPENUMBER()+"','"+accountantProjectDataVo.get(i).getMREUTYPENAME()+"','"+accountantProjectDataVo.get(i).getMEASUREUNITCNUM()+"','"+accountantProjectDataVo.get(i).getMEASUREUNITNAME()+"','"+accountantProjectDataVo.get(i).getCREATEORGCODE()+"'" +
-                    ",'"+accountantProjectDataVo.get(i).getCREATEORGNAME()+"','"+accountantProjectDataVo.get(i).getORG_NUMBER()+"','"+accountantProjectDataVo.get(i).getORG_NAME()+"','"+accountantProjectDataVo.get(i).getUSEORG_NUMBER()+"','"+accountantProjectDataVo.get(i).getUSEORG_NAME()+"'" +
-                    ",'"+accountantProjectDataVo.get(i).getCTRLSTRATEGY()+"','"+accountantProjectDataVo.get(i).getSTATUS()+"','"+accountantProjectDataVo.get(i).getENABLE()+"'" +
-                    ",case when '"+accountantProjectDataVo.get(i).getCREATE_TIME()+"' = 'null' then null else to_date(to_char(to_timestamp('"+accountantProjectDataVo.get(i).getCREATE_TIME()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    ",case when '"+accountantProjectDataVo.get(i).getUPDATE_TIME()+"' = 'null' then null else to_date(to_char(to_timestamp('"+accountantProjectDataVo.get(i).getUPDATE_TIME()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    ",case when '"+accountantProjectDataVo.get(i).getDISABLEDATE()+"' = 'null' then null else to_date(to_char(to_timestamp('"+accountantProjectDataVo.get(i).getDISABLEDATE()+"','yyyy-mm-dd hh24:mi:ssxff'),'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') end" +
-                    //",'"+accountantProjectDataVo.get(i).getSOURCE()+"','"+accountantProjectDataVo.get(i).getENTRYCHECKITEM()+"','"+accountantProjectDataVo.get(i).getENTRYCURRENCY()+"')");
-                    ",'"+accountantProjectDataVo.get(i).getSOURCE()+"','','"+accountantProjectDataVo.get(i).getENTRYCURRENCY()+"')");
-        }
-        baseDao.execute(sqls);
-    }
-
-    /**
-     * 获取客商数据前,先删除客商信息(暂时)
-     * */
-    @Override
-    public void delete(){
-        baseDao.execute("delete from STK_CUSTVEND");
-    }
-
-
-    private Map<String, JSONArray> getData(HttpServletRequest request){
-        Map<String, JSONArray> map = new HashMap<>();
-        try {
-            String data = PSHttpUtils.readRaw(request.getInputStream());
-            JSONObject jsonObject = JSON.parseObject(data);
-            Object data1 = jsonObject.get("Data");
-            JSONObject jsonObject1 = JSON.parseObject(StringUtil.nvl(data1,""));
-            Object page1 = jsonObject1.get("Page1");
-            Object page2 = jsonObject1.get("Page2");
-            JSONArray jsonArray = JSON.parseArray(StringUtil.nvl(page1, ""));
-            map.put("main",jsonArray);
-            JSONArray jsonArray1 = JSON.parseArray(StringUtil.nvl(page2, ""));
-            map.put("detail",jsonArray1);
-        } catch (IOException e) {
-            logger.info("参数解析异常信息:"+e.getMessage());
-            e.printStackTrace();
-        }
-        return map;
-    }
-
-
-    /**
-     * 获取header参数
-     * */
-    public Map<String,String> getHeaderParams(HttpServletRequest request){
-        String accessKey = request.getHeader("AccessKey");
-        String timestamp = request.getHeader("Timestamp");
-        String requestId = request.getHeader("RequestId");
-        String signature = request.getHeader("Signature");
-        Map<String,String> headerMap = new HashMap<>();
-        if(!StringUtils.isEmpty(accessKey)){
-            headerMap.put("AccessKey",accessKey);
-        }
-        if(!StringUtils.isEmpty(timestamp)){
-            headerMap.put("Timestamp",timestamp);
-        }
-        if(!StringUtils.isEmpty(requestId)){
-            headerMap.put("RequestId",requestId);
-        }
-        if(!StringUtils.isEmpty(signature)){
-            headerMap.put("Signature",signature);
-        }
-        return headerMap;
-    }
-
-    private JSONObject getJsonData(HttpServletRequest request){
-        JSONObject jsonObject=null;
-        try {
-            String data = PSHttpUtils.readRaw(request.getInputStream());
-            jsonObject = JSON.parseObject(data);
-        } catch (IOException e) {
-            logger.info("参数解析异常信息:"+e.getMessage());
-            e.printStackTrace();
-        }
-        return jsonObject;
-    }
-
-}

+ 0 - 78
src/main/java/com/uas/eis/service/STKService.java

@@ -1,78 +0,0 @@
-package com.uas.eis.service;
-
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.uas.eis.sdk.dto.AssistBalanceDTO;
-import com.uas.eis.sdk.dto.CustvendDTO;
-import com.uas.eis.sdk.dto.UpdateCustVendDTO;
-import com.uas.eis.sdk.entity.ApiResult;
-import com.uas.eis.vo.stkVo.AccountantProjectVo;
-import com.uas.eis.vo.stkVo.CashFlowItemsVo;
-import com.uas.eis.vo.stkVo.TravellingMerchantVo;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author zhuxl
- * @date 2024-10-12
- */
-public interface STKService {
-    /**
-     * 获取科目余额表-总条数
-     */
-    ApiResult<String> getAssistBalanceCount(HttpServletRequest request, AssistBalanceDTO dto);
-
-
-    /**
-     * 获取科目余额表
-     */
-    ApiResult<String> getAssistBalance(HttpServletRequest request, AssistBalanceDTO dto);
-
-
-    /**
-     * 现金流量表-总条数
-     */
-    ApiResult<String> getCashFlowCount(HttpServletRequest request, AssistBalanceDTO dto);
-
-
-    /**
-     * 现金流量表
-     */
-    ApiResult<String> getCashFlow(HttpServletRequest request, AssistBalanceDTO dto);
-
-
-    /**
-     * 客户供应商修改
-     */
-    ApiResult<String> updateCustVend( UpdateCustVendDTO dto);
-
-    /**
-     * 接口测试
-     * */
-    ApiResult<String> getAssistBalanceCountTest(HttpServletRequest request, AssistBalanceDTO dto);
-
-    /**
-     * 获取客商信息
-     * */
-    void getCustvend(TravellingMerchantVo travellingMerchantVo , Boolean isdelete);
-
-    /**
-     * 获取客商信息(当天)
-     * */
-    void getCustvendDay(TravellingMerchantVo travellingMerchantVo , Boolean isdelete);
-
-    /**
-     * 获取现金流
-     * */
-    void getCashFlowItems(CashFlowItemsVo cashFlowItemsVo , Boolean isdelete);
-
-    /**
-     * 获取会计科目
-     * */
-    void getAccountantProject(AccountantProjectVo accountantProjectVo , Boolean isdelete);
-
-    void delete();
-}

+ 0 - 293
src/main/java/com/uas/eis/task/STKTask.java

@@ -1,293 +0,0 @@
-package com.uas.eis.task;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.uas.eis.dto.stksto.QueryAccountantProjectDto;
-import com.uas.eis.dto.stksto.QueryCashFlowItemsDto;
-import com.uas.eis.dto.stksto.QueryTravellingMerchantDto;
-import com.uas.eis.dto.stksto.StkCommonDto;
-import com.uas.eis.sdk.dto.CustvendDTO;
-import com.uas.eis.service.RequestSTKService;
-import com.uas.eis.service.STKService;
-import com.uas.eis.vo.stkVo.AccountantProjectVo;
-import com.uas.eis.vo.stkVo.CashFlowItemsVo;
-import com.uas.eis.vo.stkVo.HttpResultResponse;
-import com.uas.eis.vo.stkVo.TravellingMerchantVo;
-import lombok.extern.slf4j.Slf4j;
-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.web.bind.annotation.ResponseBody;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-
-@Slf4j
-@Component
-public class STKTask {
-
-    /**
-     * 获取客商状态反馈信息
-     * */
-    @Value("${STK.get_travelling_merchant_status}")
-    private String GET_TRAVELLING_MERCHANT_STATUS;
-
-    @Autowired
-    RequestSTKService requestSTKService;
-
-    @Autowired
-    private STKService stkService;
-
-    /*@Scheduled(cron = "0 55 22 * * ?")
-    public void getSellerOrders(){
-        log.info("开始获取深投控客商状态信息=========start=============");
-        Date date = new Date();
-
-        QueryTravellingMerchantDto dto = new QueryTravellingMerchantDto();
-        dto.setCode(GET_TRAVELLING_MERCHANT);
-        dto.setPage(1);
-        dto.setSize(500);
-
-        TravellingMerchantVo travellingMerchantVo = new TravellingMerchantVo();
-        Boolean exception = false;
-        try{
-            travellingMerchantVo =  requestSTKService.selectTravellingMerchantList(dto,COMPLEXITY_QUERY_URL);
-        }catch (Exception e){
-            log.info("获取客商信息数据异常:{}",e.getMessage());
-            exception = true;
-        }
-        log.info("定时任务获取深投控客商信息数据结果:{}", JSONObject.toJSONString(travellingMerchantVo));
-        //第一次删除STK_CUSTVEND的数据
-        stkService.getCustvend(travellingMerchantVo, true);
-        if (travellingMerchantVo.getData().getHasNextPage()){
-            Boolean isBreak = true;
-            while(isBreak) {
-                if(!exception){
-                    dto.setPage(travellingMerchantVo.getData().getNextPage());
-                }
-                log.info("while循环获取客商数据,查询参数:{}",JSONObject.toJSONString(dto));
-                try{
-                    travellingMerchantVo = requestSTKService.selectTravellingMerchantList(dto, COMPLEXITY_QUERY_URL);
-                }catch (Exception e){
-                    log.info("获取客商信息数据异常:{}",e.getMessage());
-                    exception = true;
-                }
-                stkService.getCustvend(travellingMerchantVo, false);
-                if (!travellingMerchantVo.getData().getHasNextPage() || dto.getSize() > travellingMerchantVo.getData().getEndRow()){
-                    isBreak = false;
-                }
-            }
-        }
-        log.info("定时任务获取深投控客商信息数据结果2:{}", JSONObject.toJSONString(travellingMerchantVo));
-
-        log.info("开始获取深投控客商状态信息,结束:"+((System.currentTimeMillis()-date.getTime())/1000));
-    }*/
-
-    //客商获取
-    //@Scheduled(cron = "0 39 18 * * ?")
-    public void queryCustVendQuartz(){
-        log.info("开始获取深投控客商状态信息=========start=============");
-        Date date = new Date();
-
-        QueryTravellingMerchantDto dto = new QueryTravellingMerchantDto();
-        dto.setPage(1);
-        dto.setSize(1000);
-
-        //第一次删除STK_CUSTVEND的数据
-        stkService.delete();
-        //是否跳出循环
-        Boolean isBreak = true;
-        //是否发生异常
-        Boolean exception = false;
-        //异常跳过次数
-        Integer num = 0;
-        while(isBreak) {
-            if(num >=5){
-                break;
-            }
-            log.info("while循环获取客商数据,查询参数:{}",JSONObject.toJSONString(dto));
-            TravellingMerchantVo travellingMerchantVo = new TravellingMerchantVo();
-            try{
-                travellingMerchantVo = requestSTKService.queryTravelingMerchantList(dto);
-                if(travellingMerchantVo.getCode() != 200){
-                    num = num +1;
-                    continue;
-                }
-                //获取到客商数据,数据入库
-                stkService.getCustvend(travellingMerchantVo, false);
-                exception = false;
-            }catch (Exception e){
-                log.info("获取客商信息数据异常:{}",e.getMessage());
-                exception = true;
-                num = num +1;
-            }
-            //判断没发生异常,且是最后一页条件判断==》没有下页编码,或者返回的数据量小于每次查询的每页数量
-            if (!exception && null != travellingMerchantVo && null != travellingMerchantVo.getData() && dto.getSize() > travellingMerchantVo.getData().getEndRow()){
-                isBreak = false;
-            }
-            if(!exception){
-                dto.setPage(travellingMerchantVo.getData().getNextPage());
-            }
-            //log.info("定时任务获取深投控客商信息数据结果2:{}", JSONObject.toJSONString(travellingMerchantVo));
-        }
-        log.info("isBreak,结束:"+isBreak);
-        log.info("num,结束:"+num);
-        log.info("开始获取深投控客商状态信息,结束:"+((System.currentTimeMillis()-date.getTime())/1000));
-    }
-
-    //客商获取(当天)
-    @Scheduled(cron = "0 50 23 * * ?")
-    public void queryCustVendDayQuartz(){
-        log.info("开始获取深投控客商状态信息=========start=============");
-        Date date = new Date();
-
-        Calendar start=Calendar.getInstance();
-
-        int month=start.get(Calendar.MONTH) + 1;
-        log.info("开始时间:"+start.get(Calendar.YEAR)+"-"+month+"-"+start.get(Calendar.DAY_OF_MONTH)+" 00:00:00");
-        log.info("结束时间:"+start.get(Calendar.YEAR)+"-"+month+"-"+start.get(Calendar.DAY_OF_MONTH)+" 23:59:59");
-        QueryTravellingMerchantDto dto = new QueryTravellingMerchantDto();
-        dto.setPage(1);
-        dto.setSize(1000);
-        dto.setStart_time(start.get(Calendar.YEAR)+"-"+month+"-"+start.get(Calendar.DAY_OF_MONTH)+" 00:00:00");
-        dto.setEnd_time(start.get(Calendar.YEAR)+"-"+month+"-"+start.get(Calendar.DAY_OF_MONTH)+" 23:59:59");
-
-        //是否跳出循环
-        Boolean isBreak = true;
-        //是否发生异常
-        Boolean exception = false;
-        //异常跳过次数
-        Integer num = 0;
-        while(isBreak) {
-            if(num >=5){
-                break;
-            }
-            log.info("while循环获取客商数据,查询参数:{}",JSONObject.toJSONString(dto));
-            TravellingMerchantVo travellingMerchantVo = new TravellingMerchantVo();
-            try{
-                travellingMerchantVo = requestSTKService.queryTravelingMerchantList(dto);
-                if(travellingMerchantVo.getCode() != 200){
-                    num = num +1;
-                    continue;
-                }
-                //获取到客商数据,数据入库
-                stkService.getCustvendDay(travellingMerchantVo, false);
-                exception = false;
-            }catch (Exception e){
-                log.info("获取客商信息数据异常:{}",e.getMessage());
-                exception = true;
-                num = num +1;
-            }
-            //判断没有异常切hasNextPage是true
-            if (!exception && !travellingMerchantVo.getData().getHasNextPage()){
-            //判断没发生异常,且是最后一页条件判断==》没有下页编码,或者返回的数据量小于每次查询的每页数量
-            //if (!exception && null != travellingMerchantVo && null != travellingMerchantVo.getData() && dto.getSize() > travellingMerchantVo.getData().getEndRow()){
-                isBreak = false;
-            }
-            if(!exception){
-                dto.setPage(travellingMerchantVo.getData().getNextPage());
-            }
-            log.info("定时任务获取深投控客商信息数据结果2:{}", JSONObject.toJSONString(travellingMerchantVo));
-        }
-        log.info("开始获取深投控客商状态信息,结束:"+((System.currentTimeMillis()-date.getTime())/1000));
-    }
-
-
-    //现金流项目
-    @Scheduled(cron = "0 00 02 * * ?")
-    public void queryCashFlowItems(){
-        //StkCommonDto dto = new StkCommonDto();
-        QueryCashFlowItemsDto dtoParam = new QueryCashFlowItemsDto();
-        /*dto.setPage(String.valueOf(pageXjl));
-        dto.setSize("500");
-        dto.setParam(dtoParam);*/
-        Integer page = 1;
-        Integer size = 1000;
-        //是否跳出循环
-        Boolean isBreak = true;
-        //是否发生异常
-        Boolean exception = false;
-        //异常跳过次数
-        Integer num = 0;
-        while(isBreak) {
-            if (num >= 5) {
-                break;
-            }
-            CashFlowItemsVo cashFlowItemsVo = new CashFlowItemsVo();
-            try {
-                HttpResultResponse resultResponse = requestSTKService.buildPostParam(page,size,dtoParam);
-                cashFlowItemsVo = JSONObject.parseObject(resultResponse.getBody(),CashFlowItemsVo.class);
-                if (cashFlowItemsVo.getCode() != 200) {
-                    num = num + 1;
-                    continue;
-                }
-                //获取到现金流项目,数据入库
-                stkService.getCashFlowItems(cashFlowItemsVo, false);
-                exception = false;
-            }catch (Exception e){
-                log.info("获取现金流异常:{}",e.getMessage());
-                exception = true;
-                num = num +1;
-            }
-            //判断没发生异常,且是最后一页条件判断==》没有下页编码,或者当前页数等于返回页数
-            if (!exception && null != cashFlowItemsVo && page >= cashFlowItemsVo.getPages()){
-                isBreak = false;
-            }
-
-            if(!exception){
-                page = page +1;
-            }
-        }
-    }
-
-
-    //获取会计科目
-    @Scheduled(cron = "0 00 03 * * ?")
-    public void queryAccountantProject() {
-        QueryAccountantProjectDto dto = new QueryAccountantProjectDto();
-        Integer page = 1;
-        Integer size = 1000;
-        //是否跳出循环
-        Boolean isBreak = true;
-        //是否发生异常
-        Boolean exception = false;
-        //异常跳过次数
-        Integer num = 0;
-        while (isBreak) {
-            if (num >= 5) {
-                break;
-            }
-            log.info("while循环会计科目,查询参数:{}", JSONObject.toJSONString(dto));
-            HttpResultResponse resultResponse = new HttpResultResponse();
-            AccountantProjectVo accountantProjectVo = null;
-            try {
-                resultResponse = requestSTKService.buildKMPostParam(page, size ,dto);
-                accountantProjectVo = JSONObject.parseObject(resultResponse.getBody(),AccountantProjectVo.class);
-                if (accountantProjectVo.getCode() != 200) {
-                    num = num + 1;
-                    continue;
-                }
-                //获取到现金流项目,数据入库
-                stkService.getAccountantProject(accountantProjectVo, false);
-                exception = false;
-            } catch (Exception e) {
-                log.info("获取现金流异常:{}", e.getMessage());
-                exception = true;
-                num = num + 1;
-            }
-            //判断没发生异常,且是最后一页条件判断==》没有下页编码,或者当前页数等于返回页数
-            if (!exception && null != accountantProjectVo && null != accountantProjectVo.getData() && page >= accountantProjectVo.getPages()) {
-                isBreak = false;
-            }
-
-            if (!exception) {
-                page = page + 1;
-            }
-        }
-    }
-
-
-}

+ 2 - 23
src/main/resources/application-dev.yml

@@ -2,7 +2,7 @@ spring:
     datasource:
         type: com.alibaba.druid.pool.DruidDataSource
         driverClassName: oracle.jdbc.OracleDriver
-        username: SZSI_P
+        username: LHWX_HK_P
         password: select!#%*(
         url: jdbc:oracle:thin:@127.0.0.1:1521:orcl
         initialSize: 1
@@ -22,32 +22,11 @@ server:
     tomcat:
         uri_encoding: UTF-8
     context-path:
-        /eis_cw
+        /eis_lq
     port: 8186
 
 action:
     api_action: /EIS/api,/EIS/mes,/EIS/erp
     public_actions: /EIS/logout,/EIS/hello1
 
-STK:
-    s_org_code: 5418
-    app_id: bc81efc8_b2c6_4670_818e_e2710a45
-    app_key: 9a1ae28bc9104deb86f74575acc1c2d6
-    #获取客商信息接口编码
-    get_travelling_merchant: AZTrgG8P
-    #获取客商状态反馈信息接口编码
-    get_travelling_merchant_status: nMy1haj6
-    #自动化查询接口
-    query_url: https://192.168.2.179/api/oapigw/api/oapisvc/automicApi/
-    #自动化新增或变更类接口地址
-    save_or_update_url: http://192.168.2.179/api/oapigw/api/oapisvc/automicUpsertApi/
-    #复杂查询接口地址
-    complexity_query_url: https://192.168.2.179/api/oapigw/api/oapisvc/api/v2/search
-
-    #新增修改客商信息接口编码
-    save_or_update_request_code: 18c60d85eb0646a080341b64310109f1
-    #现金流量项目查询方法编码
-    cash_flow_items_request_code: 22224aed3e87474988304a542544604a
-    #会计科目查询方法code
-    accountant_project_request_code: 4e2085d2cdd04b35bf5fac1c85acab32
 

+ 2 - 24
src/main/resources/application-prod.yml

@@ -2,7 +2,7 @@ spring:
     datasource:
         type: com.alibaba.druid.pool.DruidDataSource
         driverClassName: oracle.jdbc.OracleDriver
-        username: SZSI_P
+        username: LHWX_HK_P
         password: select!#%*(
         url: jdbc:oracle:thin:@127.0.0.1:1521:orcl
         initialSize: 1
@@ -22,31 +22,9 @@ server:
     tomcat:
         uri_encoding: UTF-8
     context-path:
-        /eis_cw
+        /eis_lq
     port: 8186
 
 action:
     api_action: /EIS/api,/EIS/mes,/EIS/erp
     public_actions: /EIS/logout,/EIS/hello1
-
-STK:
-    s_org_code: 5418
-    app_id: bf00be8b_0387_44f4_b073_50c3c2d6
-    app_key: eb1b6053bdda437c98a93d93013d9fae
-    #获取客商信息接口编码
-    get_travelling_merchant: vhtITAFq
-    #获取客商状态反馈信息接口编码
-    get_travelling_merchant_status: WT3uRr4V
-    #自动化查询接口
-    query_url: https://192.168.2.179/api/oapigw/api/oapisvc/automicApi/
-    #自动化新增或变更类接口地址
-    save_or_update_url: http://192.168.2.179/api/oapigw/api/oapisvc/automicUpsertApi/
-    #复杂查询接口地址
-    complexity_query_url: https://192.168.2.179/api/oapigw/api/oapisvc/api/v2/search
-
-    #新增修改客商信息接口编码
-    save_or_update_request_code: 18c60d85eb0646a080341b64310109f1
-    #现金流量项目查询方法编码
-    cash_flow_items_request_code: 89edb885a8cf4412b870233fc89fb381
-    #会计科目查询方法code
-    accountant_project_request_code: 11e72229359a4fdeb038dd6713dc9330

+ 0 - 3
src/test/java/com/uas/eis/UasEisApplicationTests.java

@@ -4,7 +4,6 @@ package com.uas.eis;
 import com.alibaba.fastjson.JSONObject;
 import com.uas.eis.dao.*;
 import com.uas.eis.sdk.entity.ApiResult;
-import com.uas.eis.service.STKService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,8 +16,6 @@ import java.util.*;
 public class UasEisApplicationTests {
 	@Autowired
 	private BaseDao baseDao;
-	@Autowired
-	private STKService stkService;
 
 
 	@Test