1. 注释掉 IA_PERIODACCOUNT 表的更新和删除操作相关代码。
2. 新增 letsofs 配置项到 application-lets.yml 和 application-letsprod.yml 文件中。 3. 在 OfsOrderAfterSalesAmountAllocationUtilTest 中添加 OfsUnifiedService 的测试方法。 4. 在 OfsUnifiedServiceImpl 中注入 letsofs 相关配置项,并在 unified 方法中使用这些配置。 5. 新增OfsUnifiedServiceImplTest 类用于测试 unified 方法。
This commit is contained in:
parent
4f9932f15c
commit
3bb8865e4a
buildpackage/src
main
java/com/hzya/frame/plugin/lets/entity
resources
test/java/com/hzya/frame/plugin/lets/util
service/src
main/java/com/hzya/frame/ttxofs/service/impl
test/java/com/hzya/frame/ttxofs/service/impl
|
@ -529,66 +529,66 @@
|
||||||
VFREE9 = values(VFREE9),
|
VFREE9 = values(VFREE9),
|
||||||
VPRODUCEBATCH = values(VPRODUCEBATCH)</insert>
|
VPRODUCEBATCH = values(VPRODUCEBATCH)</insert>
|
||||||
<!--通过主键修改方法-->
|
<!--通过主键修改方法-->
|
||||||
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.IaPeriodaccountEntity" >
|
<!--<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.IaPeriodaccountEntity" >-->
|
||||||
update IA_PERIODACCOUNT set
|
<!--update IA_PERIODACCOUNT set-->
|
||||||
<trim suffix="" suffixOverrides=",">
|
<!--<trim suffix="" suffixOverrides=",">-->
|
||||||
<if test="caccountmonth != null and caccountmonth != ''"> CACCOUNTMONTH = #{caccountmonth},</if>
|
<!-- <if test="caccountmonth != null and caccountmonth != ''"> CACCOUNTMONTH = #{caccountmonth},</if>-->
|
||||||
<if test="caccountyear != null and caccountyear != ''"> CACCOUNTYEAR = #{caccountyear},</if>
|
<!-- <if test="caccountyear != null and caccountyear != ''"> CACCOUNTYEAR = #{caccountyear},</if>-->
|
||||||
<if test="cagentid != null and cagentid != ''"> CAGENTID = #{cagentid},</if>
|
<!-- <if test="cagentid != null and cagentid != ''"> CAGENTID = #{cagentid},</if>-->
|
||||||
<if test="castunitid != null and castunitid != ''"> CASTUNITID = #{castunitid},</if>
|
<!-- <if test="castunitid != null and castunitid != ''"> CASTUNITID = #{castunitid},</if>-->
|
||||||
<if test="ccustomvendorid != null and ccustomvendorid != ''"> CCUSTOMVENDORID = #{ccustomvendorid},</if>
|
<!-- <if test="ccustomvendorid != null and ccustomvendorid != ''"> CCUSTOMVENDORID = #{ccustomvendorid},</if>-->
|
||||||
<if test="cdeptid != null and cdeptid != ''"> CDEPTID = #{cdeptid},</if>
|
<!-- <if test="cdeptid != null and cdeptid != ''"> CDEPTID = #{cdeptid},</if>-->
|
||||||
<if test="cemployeeid != null and cemployeeid != ''"> CEMPLOYEEID = #{cemployeeid},</if>
|
<!-- <if test="cemployeeid != null and cemployeeid != ''"> CEMPLOYEEID = #{cemployeeid},</if>-->
|
||||||
<if test="cinventoryid != null and cinventoryid != ''"> CINVENTORYID = #{cinventoryid},</if>
|
<!-- <if test="cinventoryid != null and cinventoryid != ''"> CINVENTORYID = #{cinventoryid},</if>-->
|
||||||
<if test="coperatorid != null and coperatorid != ''"> COPERATORID = #{coperatorid},</if>
|
<!-- <if test="coperatorid != null and coperatorid != ''"> COPERATORID = #{coperatorid},</if>-->
|
||||||
<if test="cprojectid != null and cprojectid != ''"> CPROJECTID = #{cprojectid},</if>
|
<!-- <if test="cprojectid != null and cprojectid != ''"> CPROJECTID = #{cprojectid},</if>-->
|
||||||
<if test="cprojectphase != null and cprojectphase != ''"> CPROJECTPHASE = #{cprojectphase},</if>
|
<!-- <if test="cprojectphase != null and cprojectphase != ''"> CPROJECTPHASE = #{cprojectphase},</if>-->
|
||||||
<if test="crdcenterid != null and crdcenterid != ''"> CRDCENTERID = #{crdcenterid},</if>
|
<!-- <if test="crdcenterid != null and crdcenterid != ''"> CRDCENTERID = #{crdcenterid},</if>-->
|
||||||
<if test="cstockrdcenterid != null and cstockrdcenterid != ''"> CSTOCKRDCENTERID = #{cstockrdcenterid},</if>
|
<!-- <if test="cstockrdcenterid != null and cstockrdcenterid != ''"> CSTOCKRDCENTERID = #{cstockrdcenterid},</if>-->
|
||||||
<if test="cvendorid != null and cvendorid != ''"> CVENDORID = #{cvendorid},</if>
|
<!-- <if test="cvendorid != null and cvendorid != ''"> CVENDORID = #{cvendorid},</if>-->
|
||||||
<if test="cwarehouseid != null and cwarehouseid != ''"> CWAREHOUSEID = #{cwarehouseid},</if>
|
<!-- <if test="cwarehouseid != null and cwarehouseid != ''"> CWAREHOUSEID = #{cwarehouseid},</if>-->
|
||||||
<if test="cwarehousemanagerid != null and cwarehousemanagerid != ''"> CWAREHOUSEMANAGERID = #{cwarehousemanagerid},</if>
|
<!-- <if test="cwarehousemanagerid != null and cwarehousemanagerid != ''"> CWAREHOUSEMANAGERID = #{cwarehousemanagerid},</if>-->
|
||||||
<if test="cwp != null and cwp != ''"> CWP = #{cwp},</if>
|
<!-- <if test="cwp != null and cwp != ''"> CWP = #{cwp},</if>-->
|
||||||
<if test="dr != null and dr != ''"> DR = #{dr},</if>
|
<!-- <if test="dr != null and dr != ''"> DR = #{dr},</if>-->
|
||||||
<if test="fpricemodeflag != null and fpricemodeflag != ''"> FPRICEMODEFLAG = #{fpricemodeflag},</if>
|
<!-- <if test="fpricemodeflag != null and fpricemodeflag != ''"> FPRICEMODEFLAG = #{fpricemodeflag},</if>-->
|
||||||
<if test="nabassistnum != null and nabassistnum != ''"> NABASSISTNUM = #{nabassistnum},</if>
|
<!-- <if test="nabassistnum != null and nabassistnum != ''"> NABASSISTNUM = #{nabassistnum},</if>-->
|
||||||
<if test="nabmny != null and nabmny != ''"> NABMNY = #{nabmny},</if>
|
<!-- <if test="nabmny != null and nabmny != ''"> NABMNY = #{nabmny},</if>-->
|
||||||
<if test="nabnum != null and nabnum != ''"> NABNUM = #{nabnum},</if>
|
<!-- <if test="nabnum != null and nabnum != ''"> NABNUM = #{nabnum},</if>-->
|
||||||
<if test="nabplanedmny != null and nabplanedmny != ''"> NABPLANEDMNY = #{nabplanedmny},</if>
|
<!-- <if test="nabplanedmny != null and nabplanedmny != ''"> NABPLANEDMNY = #{nabplanedmny},</if>-->
|
||||||
<if test="nabvarymny != null and nabvarymny != ''"> NABVARYMNY = #{nabvarymny},</if>
|
<!-- <if test="nabvarymny != null and nabvarymny != ''"> NABVARYMNY = #{nabvarymny},</if>-->
|
||||||
<if test="ndrawsummny != null and ndrawsummny != ''"> NDRAWSUMMNY = #{ndrawsummny},</if>
|
<!-- <if test="ndrawsummny != null and ndrawsummny != ''"> NDRAWSUMMNY = #{ndrawsummny},</if>-->
|
||||||
<if test="ninassistnum != null and ninassistnum != ''"> NINASSISTNUM = #{ninassistnum},</if>
|
<!-- <if test="ninassistnum != null and ninassistnum != ''"> NINASSISTNUM = #{ninassistnum},</if>-->
|
||||||
<if test="ninmny != null and ninmny != ''"> NINMNY = #{ninmny},</if>
|
<!-- <if test="ninmny != null and ninmny != ''"> NINMNY = #{ninmny},</if>-->
|
||||||
<if test="ninnum != null and ninnum != ''"> NINNUM = #{ninnum},</if>
|
<!-- <if test="ninnum != null and ninnum != ''"> NINNUM = #{ninnum},</if>-->
|
||||||
<if test="ninplanedmny != null and ninplanedmny != ''"> NINPLANEDMNY = #{ninplanedmny},</if>
|
<!-- <if test="ninplanedmny != null and ninplanedmny != ''"> NINPLANEDMNY = #{ninplanedmny},</if>-->
|
||||||
<if test="ninvarymny != null and ninvarymny != ''"> NINVARYMNY = #{ninvarymny},</if>
|
<!-- <if test="ninvarymny != null and ninvarymny != ''"> NINVARYMNY = #{ninvarymny},</if>-->
|
||||||
<if test="noutassistnum != null and noutassistnum != ''"> NOUTASSISTNUM = #{noutassistnum},</if>
|
<!-- <if test="noutassistnum != null and noutassistnum != ''"> NOUTASSISTNUM = #{noutassistnum},</if>-->
|
||||||
<if test="noutmny != null and noutmny != ''"> NOUTMNY = #{noutmny},</if>
|
<!-- <if test="noutmny != null and noutmny != ''"> NOUTMNY = #{noutmny},</if>-->
|
||||||
<if test="noutnum != null and noutnum != ''"> NOUTNUM = #{noutnum},</if>
|
<!-- <if test="noutnum != null and noutnum != ''"> NOUTNUM = #{noutnum},</if>-->
|
||||||
<if test="noutplanedmny != null and noutplanedmny != ''"> NOUTPLANEDMNY = #{noutplanedmny},</if>
|
<!-- <if test="noutplanedmny != null and noutplanedmny != ''"> NOUTPLANEDMNY = #{noutplanedmny},</if>-->
|
||||||
<if test="noutvarymny != null and noutvarymny != ''"> NOUTVARYMNY = #{noutvarymny},</if>
|
<!-- <if test="noutvarymny != null and noutvarymny != ''"> NOUTVARYMNY = #{noutvarymny},</if>-->
|
||||||
<if test="pkCorp != null and pkCorp != ''"> PK_CORP = #{pkCorp},</if>
|
<!-- <if test="pkCorp != null and pkCorp != ''"> PK_CORP = #{pkCorp},</if>-->
|
||||||
<if test="ts != null and ts != ''"> TS = #{ts},</if>
|
<!-- <if test="ts != null and ts != ''"> TS = #{ts},</if>-->
|
||||||
<if test="vbatch != null and vbatch != ''"> VBATCH = #{vbatch},</if>
|
<!-- <if test="vbatch != null and vbatch != ''"> VBATCH = #{vbatch},</if>-->
|
||||||
<if test="vfree1 != null and vfree1 != ''"> VFREE1 = #{vfree1},</if>
|
<!-- <if test="vfree1 != null and vfree1 != ''"> VFREE1 = #{vfree1},</if>-->
|
||||||
<if test="vfree10 != null and vfree10 != ''"> VFREE10 = #{vfree10},</if>
|
<!-- <if test="vfree10 != null and vfree10 != ''"> VFREE10 = #{vfree10},</if>-->
|
||||||
<if test="vfree2 != null and vfree2 != ''"> VFREE2 = #{vfree2},</if>
|
<!-- <if test="vfree2 != null and vfree2 != ''"> VFREE2 = #{vfree2},</if>-->
|
||||||
<if test="vfree3 != null and vfree3 != ''"> VFREE3 = #{vfree3},</if>
|
<!-- <if test="vfree3 != null and vfree3 != ''"> VFREE3 = #{vfree3},</if>-->
|
||||||
<if test="vfree4 != null and vfree4 != ''"> VFREE4 = #{vfree4},</if>
|
<!-- <if test="vfree4 != null and vfree4 != ''"> VFREE4 = #{vfree4},</if>-->
|
||||||
<if test="vfree5 != null and vfree5 != ''"> VFREE5 = #{vfree5},</if>
|
<!-- <if test="vfree5 != null and vfree5 != ''"> VFREE5 = #{vfree5},</if>-->
|
||||||
<if test="vfree6 != null and vfree6 != ''"> VFREE6 = #{vfree6},</if>
|
<!-- <if test="vfree6 != null and vfree6 != ''"> VFREE6 = #{vfree6},</if>-->
|
||||||
<if test="vfree7 != null and vfree7 != ''"> VFREE7 = #{vfree7},</if>
|
<!-- <if test="vfree7 != null and vfree7 != ''"> VFREE7 = #{vfree7},</if>-->
|
||||||
<if test="vfree8 != null and vfree8 != ''"> VFREE8 = #{vfree8},</if>
|
<!-- <if test="vfree8 != null and vfree8 != ''"> VFREE8 = #{vfree8},</if>-->
|
||||||
<if test="vfree9 != null and vfree9 != ''"> VFREE9 = #{vfree9},</if>
|
<!-- <if test="vfree9 != null and vfree9 != ''"> VFREE9 = #{vfree9},</if>-->
|
||||||
<if test="vproducebatch != null and vproducebatch != ''"> VPRODUCEBATCH = #{vproducebatch},</if>
|
<!-- <if test="vproducebatch != null and vproducebatch != ''"> VPRODUCEBATCH = #{vproducebatch},</if>-->
|
||||||
</trim>
|
<!--</trim>-->
|
||||||
where = #{}
|
<!--where = #{}-->
|
||||||
</update>
|
<!--</update>-->
|
||||||
<!-- 逻辑删除 -->
|
<!-- 逻辑删除 -->
|
||||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.IaPeriodaccountEntity" >
|
<!--<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.IaPeriodaccountEntity" >-->
|
||||||
update IA_PERIODACCOUNT set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
<!--update IA_PERIODACCOUNT set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}-->
|
||||||
where = #{}
|
<!--where = #{}-->
|
||||||
</update>
|
<!--</update>-->
|
||||||
<!-- 多条件逻辑删除 -->
|
<!-- 多条件逻辑删除 -->
|
||||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.IaPeriodaccountEntity" >
|
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.IaPeriodaccountEntity" >
|
||||||
update IA_PERIODACCOUNT set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
update IA_PERIODACCOUNT set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||||
|
@ -646,9 +646,9 @@ update IA_PERIODACCOUNT set sts= 'N' ,modify_time = #{modify_time},modify_user_
|
||||||
</trim>
|
</trim>
|
||||||
</update>
|
</update>
|
||||||
<!--通过主键删除-->
|
<!--通过主键删除-->
|
||||||
<delete id="entity_delete">
|
<!--<delete id="entity_delete">-->
|
||||||
delete from IA_PERIODACCOUNT where = #{}
|
<!-- delete from IA_PERIODACCOUNT where = #{}-->
|
||||||
</delete>
|
<!--</delete>-->
|
||||||
|
|
||||||
<!--查询指定存货的结存价(成本价)-->
|
<!--查询指定存货的结存价(成本价)-->
|
||||||
<select id="queryBalancePrice" parameterType="com.hzya.frame.plugin.lets.entity.IaPeriodaccountEntity" resultMap="get-IaPeriodaccountEntity-result">
|
<select id="queryBalancePrice" parameterType="com.hzya.frame.plugin.lets.entity.IaPeriodaccountEntity" resultMap="get-IaPeriodaccountEntity-result">
|
||||||
|
|
|
@ -36,4 +36,9 @@ cbs8:
|
||||||
#电子回单下载临时存放位置
|
#电子回单下载临时存放位置
|
||||||
elec_path: /Users/xiangerlin/Downloads/
|
elec_path: /Users/xiangerlin/Downloads/
|
||||||
OA:
|
OA:
|
||||||
data_source_code: yc_oa
|
data_source_code: yc_oa
|
||||||
|
|
||||||
|
letsofs:
|
||||||
|
url: http://39.98.58.229/api/edi/u8c/ofs/in
|
||||||
|
appKey: 1023142858
|
||||||
|
secret: 382e4a2584027a36ac9431103
|
|
@ -38,3 +38,7 @@ cbs8:
|
||||||
OA:
|
OA:
|
||||||
data_source_code: yc_oa
|
data_source_code: yc_oa
|
||||||
|
|
||||||
|
letsofs:
|
||||||
|
url: http://39.98.168.188:30002/api/edi/u8c/ofs/in
|
||||||
|
appKey: 2097046829
|
||||||
|
secret: 35282f251476a3af4f00c7b36
|
|
@ -5,6 +5,7 @@ import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
|
||||||
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchData;
|
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchData;
|
||||||
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchDetails;
|
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchDetails;
|
||||||
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchHeader;
|
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchHeader;
|
||||||
|
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -38,6 +39,14 @@ public class OfsOrderAfterSalesAmountAllocationUtilTest {
|
||||||
@Autowired
|
@Autowired
|
||||||
private AfterSalesOrderUtil afterSalesOrderUtil;
|
private AfterSalesOrderUtil afterSalesOrderUtil;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OfsUnifiedService ofsUnifiedService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test01() throws Exception {
|
||||||
|
ofsUnifiedService.unified(null);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void tocSalesAmountAllocation() {
|
public void tocSalesAmountAllocation() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -27,6 +27,7 @@ import org.apache.http.message.BasicNameValuePair;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
@ -47,9 +48,21 @@ public class OfsUnifiedServiceImpl implements OfsUnifiedService {
|
||||||
|
|
||||||
Logger logger = LoggerFactory.getLogger(OfsUnifiedServiceImpl.class);
|
Logger logger = LoggerFactory.getLogger(OfsUnifiedServiceImpl.class);
|
||||||
|
|
||||||
|
@Value("${letsofs.url}")
|
||||||
|
private String letsofsurl;
|
||||||
|
|
||||||
|
@Value("${letsofs.appKey}")
|
||||||
|
private String letsofsappKey;
|
||||||
|
|
||||||
|
@Value("${letsofs.secret}")
|
||||||
|
private String letsofssecret;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReturnMessageBasics unified(InterfaceParamDto interfaceParamDto) throws Exception {
|
public ReturnMessageBasics unified(InterfaceParamDto interfaceParamDto) throws Exception {
|
||||||
//从缓存中得到实体类
|
//从缓存中得到实体类
|
||||||
|
interfaceParamDto.setBashHttpUrl(letsofsurl);
|
||||||
|
interfaceParamDto.setAppKey(letsofsappKey);
|
||||||
|
interfaceParamDto.setSecret(letsofssecret);
|
||||||
interfaceParamDto.setTimestamp(String.valueOf(System.currentTimeMillis()));
|
interfaceParamDto.setTimestamp(String.valueOf(System.currentTimeMillis()));
|
||||||
ReturnMessageBasics returnMessageBasics = ApiDtoCacheMap.apiDtoCacheMap.get(interfaceParamDto.getApi());
|
ReturnMessageBasics returnMessageBasics = ApiDtoCacheMap.apiDtoCacheMap.get(interfaceParamDto.getApi());
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.hzya.frame.ttxofs.service.impl;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:liuyang
|
||||||
|
* @Package:com.hzya.frame.ttxofs.service.impl
|
||||||
|
* @Project:kangarooDataCenterV3
|
||||||
|
* @name:OfsUnifiedServiceImplTest
|
||||||
|
* @Date:2024/10/18 11:38
|
||||||
|
* @Filename:OfsUnifiedServiceImplTest
|
||||||
|
*/
|
||||||
|
public class OfsUnifiedServiceImplTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void unified() {
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue