丽知:新增仅退款插件。

This commit is contained in:
zhengyf 2024-09-25 14:42:23 +08:00
parent 23aa38c58f
commit fa895c85e7
9 changed files with 736 additions and 206 deletions

View File

@ -67,6 +67,10 @@ public class OverallConstant {
prodOverPublic.put("bddefdoclistsaveCode", "8000370061");//自定义档案内容查询
prodOverPublic.put("bddefdoclistsave", "/u8cloud/api/uapbd/bddefdoc/insert");//自定义档案内容查询
//应收单
prodOverPublic.put("arapYsInsertApproveCode", "8000370069");//自定义档案内容查询
prodOverPublic.put("appId", "800037");//数智中台
prodOverPublic.put("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj");//数智中台
prodOverPublic.put("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=");//数智中台
@ -121,7 +125,8 @@ public class OverallConstant {
prodOverAll.put("u8c自定义项档案-存货分类对应收支项目主键", "0001A210000000008FBN");
//中台地址
prodOverAll.put("u8c_url", "http://127.0.0.1:8081/kangarooDataCenterV3/entranceController/externalCallInterface");
// prodOverAll.put("u8c_url", "http://127.0.0.1:8081/kangarooDataCenterV3/entranceController/externalCallInterface");
prodOverAll.put("u8c_url", "http://ufidahz.com.cn:9067/kangarooDataCenterV3/entranceController/externalCallInterface");
}
/**

View File

@ -70,5 +70,15 @@ public class OnlyAfterSalesBEntity extends BaseEntity {
private String reasondesc;
//平台优惠表头的
private String platformDiscounts;
//商家优惠表头的
private String merchantDiscounts;
//达人优惠表头的
private String expertDiscounts;
//支付优惠表头的
private String payDiscounts;
}

View File

@ -33,6 +33,10 @@
<result property="originaldetailid" column="originalDetailId" jdbcType="INTEGER"/>
<result property="reasoncode" column="reasonCode" jdbcType="VARCHAR"/>
<result property="reasondesc" column="reasonDesc" jdbcType="VARCHAR"/>
<result property="platformDiscounts" column="platformDiscounts" jdbcType="VARCHAR"/>
<result property="merchantDiscounts" column="merchantDiscounts" jdbcType="VARCHAR"/>
<result property="expertDiscounts" column="expertDiscounts" jdbcType="VARCHAR"/>
<result property="payDiscounts" column="payDiscounts" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "OnlyAfterSalesBEntity_Base_Column_List">
@ -66,6 +70,10 @@
,originalDetailId
,reasonCode
,reasonDesc
,platformDiscounts
,merchantDiscounts
,expertDiscounts
,payDiscounts
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-OnlyAfterSalesBEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity">
@ -103,6 +111,10 @@
<if test="originaldetailid != null"> and originalDetailId = #{originaldetailid} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="reasondesc != null and reasondesc != ''"> and reasonDesc = #{reasondesc} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
</trim>
@ -143,6 +155,10 @@
<if test="originaldetailid != null"> and originalDetailId = #{originaldetailid} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="reasondesc != null and reasondesc != ''"> and reasonDesc = #{reasondesc} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
</trim>
@ -185,6 +201,10 @@
<if test="originaldetailid != null"> and originalDetailId like concat('%',#{originaldetailid},'%') </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode like concat('%',#{reasoncode},'%') </if>
<if test="reasondesc != null and reasondesc != ''"> and reasonDesc like concat('%',#{reasondesc},'%') </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts like concat('%',#{platformDiscounts},'%') </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts like concat('%',#{merchantDiscounts},'%') </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts like concat('%',#{expertDiscounts},'%') </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts like concat('%',#{payDiscounts},'%') </if>
</trim>
@ -227,6 +247,10 @@
<if test="originaldetailid != null"> or originalDetailId = #{originaldetailid} </if>
<if test="reasoncode != null and reasoncode != ''"> or reasonCode = #{reasoncode} </if>
<if test="reasondesc != null and reasondesc != ''"> or reasonDesc = #{reasondesc} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> or platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> or merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> or expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> or payDiscounts = #{payDiscounts} </if>
</trim>
@ -266,6 +290,10 @@
<if test="originaldetailid != null"> originalDetailId , </if>
<if test="reasoncode != null and reasoncode != ''"> reasonCode , </if>
<if test="reasondesc != null and reasondesc != ''"> reasonDesc , </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> platformDiscounts , </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts , </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts , </if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts , </if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
@ -299,6 +327,10 @@
<if test="originaldetailid != null"> #{originaldetailid} ,</if>
<if test="reasoncode != null and reasoncode != ''"> #{reasoncode} ,</if>
<if test="reasondesc != null and reasondesc != ''"> #{reasondesc} ,</if>
<if test="platformDiscounts != null and platformDiscounts != ''"> #{platformDiscounts} ,</if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> #{merchantDiscounts} ,</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> #{expertDiscounts} ,</if>
<if test="payDiscounts != null and payDiscounts != ''"> #{payDiscounts} ,</if>
</trim>
)
</insert>
@ -380,6 +412,10 @@ update only_after_sales_b set
<if test="originaldetailid != null"> originalDetailId = #{originaldetailid},</if>
<if test="reasoncode != null and reasoncode != ''"> reasonCode = #{reasoncode},</if>
<if test="reasondesc != null and reasondesc != ''"> reasonDesc = #{reasondesc},</if>
<if test="platformDiscounts != null and platformDiscounts != ''"> platformDiscounts = #{platformDiscounts},</if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts = #{merchantDiscounts},</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts = #{expertDiscounts},</if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts = #{payDiscounts},</if>
</trim>
where id = #{id}
</update>
@ -422,6 +458,10 @@ update only_after_sales_b set sts= 'N' ,modify_time = #{modify_time},modify_use
<if test="originaldetailid != null"> and originalDetailId = #{originaldetailid} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="reasondesc != null and reasondesc != ''"> and reasonDesc = #{reasondesc} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
</trim>
</update>

View File

@ -146,5 +146,15 @@ public class OnlyAfterSalesHEntity extends BaseEntity {
/** 处理类型 */
private String processtype;
//平台优惠
private String platformDiscounts;
//商家优惠
private String merchantDiscounts;
//达人优惠
private String expertDiscounts;
//支付优惠
private String payDiscounts;
}

View File

@ -70,6 +70,10 @@
<result property="refundedat" column="refundedAt" jdbcType="TIMESTAMP"/>
<result property="status" column="status" jdbcType="VARCHAR"/>
<result property="processtype" column="processType" jdbcType="VARCHAR"/>
<result property="platformDiscounts" column="platformDiscounts" jdbcType="VARCHAR"/>
<result property="merchantDiscounts" column="merchantDiscounts" jdbcType="VARCHAR"/>
<result property="expertDiscounts" column="expertDiscounts" jdbcType="VARCHAR"/>
<result property="payDiscounts" column="payDiscounts" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "OnlyAfterSalesHEntity_Base_Column_List">
@ -140,6 +144,10 @@
,refundedAt
,status
,processType
,platformDiscounts
,merchantDiscounts
,expertDiscounts
,payDiscounts
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-OnlyAfterSalesHEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity">
@ -214,6 +222,10 @@
<if test="refundedat != null"> and refundedAt = #{refundedat} </if>
<if test="status != null and status != ''"> and status = #{status} </if>
<if test="processtype != null and processtype != ''"> and processType = #{processtype} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
</trim>
@ -291,6 +303,10 @@
<if test="refundedat != null"> and refundedAt = #{refundedat} </if>
<if test="status != null and status != ''"> and status = #{status} </if>
<if test="processtype != null and processtype != ''"> and processType = #{processtype} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
</trim>
@ -370,7 +386,10 @@
<if test="refundedat != null"> and refundedAt like concat('%',#{refundedat},'%') </if>
<if test="status != null and status != ''"> and status like concat('%',#{status},'%') </if>
<if test="processtype != null and processtype != ''"> and processType like concat('%',#{processtype},'%') </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts like concat('%',#{platformDiscounts},'%') </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts like concat('%',#{merchantDiscounts},'%') </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts like concat('%',#{expertDiscounts},'%') </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts like concat('%',#{payDiscounts},'%') </if>
</trim>
@ -449,6 +468,10 @@
<if test="refundedat != null"> or refundedAt = #{refundedat} </if>
<if test="status != null and status != ''"> or status = #{status} </if>
<if test="processtype != null and processtype != ''"> or processType = #{processtype} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> or platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> or merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> or expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> or payDiscounts = #{payDiscounts} </if>
</trim>
@ -525,6 +548,10 @@
<if test="refundedat != null"> refundedAt , </if>
<if test="status != null and status != ''"> status , </if>
<if test="processtype != null and processtype != ''"> processType , </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> platformDiscounts , </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts , </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts , </if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts , </if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
@ -595,6 +622,10 @@
<if test="refundedat != null"> #{refundedat} ,</if>
<if test="status != null and status != ''"> #{status} ,</if>
<if test="processtype != null and processtype != ''"> #{processtype} ,</if>
<if test="platformDiscounts != null and platformDiscounts != ''"> #{platformDiscounts} ,</if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> #{merchantDiscounts} ,</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> #{expertDiscounts} ,</if>
<if test="payDiscounts != null and payDiscounts != ''"> #{payDiscounts} ,</if>
</trim>
)
</insert>
@ -750,6 +781,10 @@ update only_after_sales_h set
<if test="refundedat != null"> refundedAt = #{refundedat},</if>
<if test="status != null and status != ''"> status = #{status},</if>
<if test="processtype != null and processtype != ''"> processType = #{processtype},</if>
<if test="platformDiscounts != null and platformDiscounts != ''"> platformDiscounts = #{platformDiscounts},</if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts = #{merchantDiscounts},</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts = #{expertDiscounts},</if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts = #{payDiscounts},</if>
</trim>
where id = #{id}
</update>
@ -829,6 +864,10 @@ update only_after_sales_h set sts= 'N' ,modify_time = #{modify_time},modify_use
<if test="refundedat != null"> and refundedAt = #{refundedat} </if>
<if test="status != null and status != ''"> and status = #{status} </if>
<if test="processtype != null and processtype != ''"> and processType = #{processtype} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
</trim>
</update>

View File

@ -15,16 +15,20 @@ import com.hzya.frame.plugin.lets.dao.IOnlyAfterSalesBDao;
import com.hzya.frame.plugin.lets.dao.IOnlyAfterSalesHDao;
import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity;
import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.ofsvo.QueryReturnOrderRequestVO;
import com.hzya.frame.plugin.lets.u8cdto.ArapDjzbVO;
import com.hzya.frame.plugin.lets.u8cdto.BillVO;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.OfsOrderAfterSalesAmountAllocationUtil;
import com.hzya.frame.plugin.lets.util.QueryU8CEntityUtil;
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
import com.hzya.frame.plugin.lets.util.pushData.Attribute;
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
import com.hzya.frame.plugin.lets.util.pushData.ZTResult;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchData;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchDetails;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchHeader;
@ -35,18 +39,19 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
/**
* add by zyd
* O售后订单(仅退款) -> U8C红字应收单
*
* <p>
* returnType:0 不退货
* exchangeType:0 不换货
* refundInd:1 退款
*
* <p>
* 按天推送
*
* @Date2024/9/21 17:19
@ -102,6 +107,9 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
@Autowired
private IOnlyAfterSalesBDao onlyAfterSalesBDao;
@Autowired
private OfsOrderAfterSalesAmountAllocationUtil ofsOrderAfterSalesAmountAllocationUtil;
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
@ -172,21 +180,48 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
Assert.state(false, "丽知:售后订单(仅退款):{} --->U8C红字应收单未查询到OFS售后订单(仅退款)", ofsCode);
}
//过滤原始表
List<RerturnGoodsOrderSearchData> filterOriginalOrders = filterOriginal(returnGoodsOrders);
//底表存数据库
saveOrUpdate(returnGoodsOrders);
if (filterOriginalOrders.size() != 0) {
save(filterOriginalOrders);
}
// save(returnGoodsOrders);
//过滤日志
List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders = filterData(returnGoodsOrders);
if (filterReturnGoodsOrders == null || filterReturnGoodsOrders.size() == 0) {
Assert.state(false, "丽知:售后订单(仅退款):{} --->U8C红字应收单该售后订单(仅退款)已被推送成功,请勿重新推送", ofsCode);
}
//推送
// implement(filterReturnGoodsOrders);
implement(filterReturnGoodsOrders);
} catch (Exception e) {
logger.error("丽知:售后订单(仅退款)--->U8C红字应收单,start(String ofsCode)方法报错:" + e);
}
}
/**
* 过滤元数据底表只过滤表头
*
* @param returnGoodsOrders
* @return
*/
private List<RerturnGoodsOrderSearchData> filterOriginal(List<RerturnGoodsOrderSearchData> returnGoodsOrders) {
List<RerturnGoodsOrderSearchData> filterOriginal = new ArrayList<>();
for (RerturnGoodsOrderSearchData goodsOrder : returnGoodsOrders) {
OnlyAfterSalesHEntity onlyAfterSalesHEntity = new OnlyAfterSalesHEntity();
onlyAfterSalesHEntity.setCode(goodsOrder.getHeader().getCode());
List<OnlyAfterSalesHEntity> query = onlyAfterSalesHDao.query(onlyAfterSalesHEntity);
if (query.size() != 0) {
continue;
} else {
filterOriginal.add(goodsOrder);
}
}
return filterOriginal;
}
public void start(String startTime, String endTime) {
try {
Date business_start = DateUtil.parse(startTime);
@ -206,13 +241,22 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
}
/**
* 过滤成功日志
* 单据号+skuCode
* 过滤成功日志,并且过滤子表退款金额==0的数据
*/
public List<RerturnGoodsOrderSearchData> filterData(List<RerturnGoodsOrderSearchData> returnGoodsOrders) {
List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders = new ArrayList<>();
for (RerturnGoodsOrderSearchData returnGoodsOrder : returnGoodsOrders) {
RerturnGoodsOrderSearchHeader header = returnGoodsOrder.getHeader();
String rootAppPk=header.getCode();
List<RerturnGoodsOrderSearchDetails> filterDetails=new ArrayList<>();
List<RerturnGoodsOrderSearchDetails> details = returnGoodsOrder.getDetails();
for (RerturnGoodsOrderSearchDetails detail : details) {
if(detail.getTotalAmount()==null||"0".equals(detail.getTotalAmount())||0==Double.parseDouble(detail.getTotalAmount())){
continue;
}
String rootAppPk = header.getCode()+"_"+detail.getSkuCode();
boolean isExis = true;
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setRootAppPk(rootAppPk);
@ -223,6 +267,13 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
isExis = false;
}
if (!isExis) {
filterDetails.add(detail);
}
}
if(filterDetails.size()==0){
continue;
}else {
returnGoodsOrder.setDetails(filterDetails);
filterReturnGoodsOrders.add(returnGoodsOrder);
}
}
@ -231,109 +282,272 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
/**
* 具体实现推送U8C红字应收单
*
* <p>
* 公司+店铺+仓库+SKU+收发类别+部门 分组
*
* <p>
* 因为优惠金额在表头先按单据便利一变具体分摊金额拆到每行在去汇总
*
*/
public void implement(List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders){
public void implement(List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders) throws Exception {
//分摊分摊后的子表
List<RerturnGoodsOrderSearchDetails> allDetail = new ArrayList<>();
List<RerturnGoodsOrderSearchHeader> allHeader = new ArrayList<>();
//分摊
for (RerturnGoodsOrderSearchData filterReturnGoodsOrder : filterReturnGoodsOrders) {
ofsOrderAfterSalesAmountAllocationUtil.tocSalesAmountAllocation(filterReturnGoodsOrder);
System.out.println(filterReturnGoodsOrder);
//查询部门
String refOrderCode = filterReturnGoodsOrder.getHeader().getRefOrderCode();
SaleOrderMessageDto ofsSaleOrder = getOfsOrder(refOrderCode);
String deptCode = "002";
if (ofsSaleOrder != null) {
// Assert.state(false,"根据仅退款:{},查询销售订单:{},失败!未查询到对应销售订单",filterReturnGoodsOrder.getHeader().getCode(),refOrderCode);
if(ofsSaleOrder.getData().get(0).getHeader().getDepartmentType()!=null&&!"".equals((ofsSaleOrder.getData().get(0).getHeader().getDepartmentType()))){
deptCode = ofsSaleOrder.getData().get(0).getHeader().getDepartmentType();
}
}
filterReturnGoodsOrder.getHeader().setSaleDeptCode(deptCode);
allHeader.add(filterReturnGoodsOrder.getHeader());
allDetail.addAll(filterReturnGoodsOrder.getDetails());
}
//分摊后的明细
List<RerturnGoodsOrderSearchDetails> ofsDetails=new ArrayList<>();
//分组公司+店铺+部门+单据日期,仅退款没有仓库固不去
Map<String, List<RerturnGoodsOrderSearchHeader>> collect =
allHeader.stream().collect(Collectors.groupingBy(index -> index.getCompanyCode() + "_" + index.getStoreCode() + "_" + index.getSaleDeptCode() + "_" + index.getCreated().substring(0,10)));
collect.forEach((k, v) -> {
String[] split = k.split("_");//[0]公司 [1]店铺 [2]部门 [3]单据日期
//v:header列表, header.code == details.returnOrderCode
String mapStr = "";
String format = "";//暂时取创建时间refundAt没返回
String response = "";
// String ofsCode = v.get(0).getCode();
// String ofsId = v.get(0).getId();
//日志记录使用
List<RerturnGoodsOrderSearchDetails> logDetails=new ArrayList<>();
try {
ArapDjzbVO arapDjzbVO = new ArapDjzbVO();
//主表 在表头先
ArapDjzbVO.Parentt parentvo = new ArapDjzbVO.Parentt();
//djrq 单据日期
format = split[3];//暂时取创建时间refundAt没返回
format = "2024-09-25";
parentvo.setDjrq(format);
//dwbm 公司
parentvo.setDwbm(split[0]);
//lrr 录入人
parentvo.setLrr(OverallConstant.getOverAllValue("u8cApiZdrCode"));
//wldx 往来对象标识 (0 客户 2部门 3业务员)
parentvo.setWldx("2");
//hbbm 客商==店铺
parentvo.setHbbm(split[1]);
//deptid 部门
parentvo.setDeptid(split[2]);
//ywybm 业务员编码 ,不传喽
// for (RerturnGoodsOrderSearchData returnGoodsOrder : filterReturnGoodsOrders) {
// System.out.println(returnGoodsOrder);
//
// String mapStr = "";
// String format = "";//暂时取创建时间refundAt没返回
// String response = "";
// String ofsCode = returnGoodsOrder.getHeader().getCode();
// String ofsId = returnGoodsOrder.getHeader().getId();
//
// try {
//
// ArapDjzbVO arapDjzbVO = new ArapDjzbVO();
// //主表 在表头先
// RerturnGoodsOrderSearchHeader header = returnGoodsOrder.getHeader();
// ArapDjzbVO.Parentt parentvo = new ArapDjzbVO.Parentt();
//
// //djrq 单据日期
// format = returnGoodsOrder.getHeader().getCreated();//暂时取创建时间refundAt没返回
// parentvo.setDjrq(format.substring(0,10));
// //dwbm 公司
// parentvo.setDwbm(header.getCompanyCode());
// //lrr 录入人
// parentvo.setLrr(OverallConstant.getOverAllValue("u8cApiZdrCode"));
//
// //wldx 往来对象标识 (0 客户 2部门 3业务员)
// //hbbm 客商
// //deptid 部门
// //ywybm 业务员编码
//
//
// //shr 审核人
// parentvo.setShr(OverallConstant.getOverAllValue("u8cApiZdrCode"));
// //shrq 审核日
// parentvo.setShrq(format.substring(0,10));
// //scomment 备注 returnNote 客服备注 sellerNote 卖家备注
//shr 审核人
parentvo.setShr(OverallConstant.getOverAllValue("u8cApiZdrCode"));
//shrq 审核日
parentvo.setShrq(format);
//scomment 备注 returnNote 客服备注 sellerNote 卖家备注
//parentvo.setScomment(header.getReturnNote());
//
//
// //zyx1店铺
// parentvo.setZyx1(header.getStoreCode());
// //zyx2来源平台
// parentvo.setZyx2(header.getSourcePlatformCode());
// //zyx3 收发类别 ????
//
//
// //子表
// List<ArapDjzbVO.Childrenn> children=new ArrayList<>();
// List<RerturnGoodsOrderSearchDetails> details = returnGoodsOrder.getDetails();
// for (RerturnGoodsOrderSearchDetails ofsDetail : details) {
// ArapDjzbVO.Childrenn childrenn = new ArapDjzbVO.Childrenn();
//
// //cinventoryid 存货
//
// //jfbbje jfybje 借方本币金额/借方原币金额
// //jfbbsj jfybsj存货 借方本币税金/借方原币税金
// //wbfbbje jfybwsje 借方本币无税金额/借方原币无税金额
//
//
//
// //zyx4 平台优惠
// //zyx5 支付优惠
// //zyx6 达人优惠
// //zyx7 商家优惠
// children.add(childrenn);
// }
// arapDjzbVO.setParentvo(parentvo);
// arapDjzbVO.setChildren(children);
// System.out.println(arapDjzbVO);
// mapStr="{\"djzbvo\":["+ JSONUtil.toJsonStr(arapDjzbVO) +"]}";
//
//
//
//
// }catch (Exception e){
// e.printStackTrace();
// logger.error("推送U8C丽知售后订单(仅退款)--->U8C红字应收单失败失败原因" + e);
// //失败
// }
//
// }
//djlxbm 单据类型编码交易类型编码使用此字段如D0D1D2
parentvo.setDjlxbm("D0");
//xslxbm 业务流程
parentvo.setXslxbm("JTK");//TOC仅退款
//zyx1店铺
parentvo.setZyx1(split[1]);
//zyx2来源平台
parentvo.setZyx2(v.get(0).getSourcePlatformCode());
//zyx3 收发类别 销售出库写死SALES
parentvo.setZyx3("SALES");
//子表,需要通过多个主表的id找到多个子表,且退货金额==0的不要
List<ArapDjzbVO.Childrenn> children=new ArrayList<>();
List<RerturnGoodsOrderSearchDetails> ofsDetails=new ArrayList<>();
for (RerturnGoodsOrderSearchHeader rerturnGoodsOrderSearchHeader : v) {
allDetail.stream().forEach(index->{
if(rerturnGoodsOrderSearchHeader.getCode().equals(index.getReturnOrderCode())&&index.getTotalAmount()!=null&&!"0".equals(index.getTotalAmount())){
ofsDetails.add(index);
}
});
}
logDetails.addAll(ofsDetails);
for (RerturnGoodsOrderSearchDetails ofsDetail : ofsDetails) {
ArapDjzbVO.Childrenn childrenn = new ArapDjzbVO.Childrenn();
//cinventoryid 存货
childrenn.setCinventoryid(ofsDetail.getSkuCode());
//jfbbje jfybje 借方本币金额/借方原币金额
childrenn.setJfbbje("-"+ofsDetail.getTotalAmount());
childrenn.setJfybje("-"+ofsDetail.getTotalAmount());
//jfbbsj jfybsj 借方本币税金/借方原币税金 默认0.13
BigDecimal sj=new BigDecimal(ofsDetail.getTotalAmount()).multiply(new BigDecimal(0.13)).setScale(2, RoundingMode.FLOOR);
childrenn.setJfbbsj("-"+String.valueOf(sj));
childrenn.setJfybsj("-"+String.valueOf(sj));
//wbfbbje jfybwsje 借方本币无税金额/借方原币无税金额
BigDecimal ws=new BigDecimal(ofsDetail.getTotalAmount()).subtract(sj);
childrenn.setWbfbbje("-"+ws);
childrenn.setJfybwsje("-"+ws);
//zyx4 平台优惠
childrenn.setZyx4(String.valueOf(ofsDetail.getShareTargetPlatformDiscounts()));
//zyx5 支付优惠
childrenn.setZyx5(String.valueOf(ofsDetail.getShareTargetPlatformDiscounts()));
//zyx6 达人优惠
childrenn.setZyx6(String.valueOf(ofsDetail.getShareTargetPlatformDiscounts()));
//zyx7 商家优惠
childrenn.setZyx7(String.valueOf(ofsDetail.getShareTargetPlatformDiscounts()));
children.add(childrenn);
}
arapDjzbVO.setParentvo(parentvo);
arapDjzbVO.setChildren(children);
System.out.println(arapDjzbVO);
mapStr="{\"djzbvo\":["+ JSONUtil.toJsonStr(arapDjzbVO) +"]}";
System.out.println(mapStr);
//推送
ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("arapYsInsertApproveCode"), mapStr);
//两层判断,一层中台转发,一层u8c返回
if ("false".equals(ztResult.getFlag())) {
//转发失败
response = JSONUtil.toJsonStr(ztResult.getAttribute());
Assert.state(false, "丽知:售后订单(仅退款)--->U8C红字应收单中台转发失败,失败原因:{}", ztResult.getAttribute());
}
Attribute attribute = ztResult.getAttribute();
System.out.println(attribute);
boolean isSuccess = false;
String djbh = "";
String vouchid = "";
if ("success".equals(attribute.getStatus())) {
isSuccess = true;
String data = attribute.getData();
ArapDjzb arapDj = resultDataHandle(data);
System.out.println(arapDj);
djbh = arapDj.getParentvo().getDjbh();
vouchid = arapDj.getParentvo().getVouchid();
}
if (!isSuccess) {
Assert.state(false, "推送U8C--> 丽知:售后订单(仅退款)--->U8C红字应收单 失败 接口返回结果:{} 接口入参:{}", response, mapStr);
}
//成功 批量新增 ofsDetails
for (RerturnGoodsOrderSearchDetails ofsDetail : ofsDetails) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr);
integrationTaskLivingDetailsEntity.setNewTransmitInfo(response);
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(format);
integrationTaskLivingDetailsEntity.setRootAppPk(ofsDetail.getReturnOrderCode()+"_"+ofsDetail.getSkuCode());
integrationTaskLivingDetailsEntity.setRootAppBill(ofsDetail.getReturnOrderCode());//仅退款单号
integrationTaskLivingDetailsEntity.setNewSystemNumber(djbh);
integrationTaskLivingDetailsEntity.setNewSystemPrimary(vouchid);
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
}
} catch (Exception e) {
logger.error("推送U8C丽知售后订单(仅退款)--->U8C红字应收单失败失败原因" + e);
//失败
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
String ErrMessage="";
if (reusltStrDto != null) {
ErrMessage = "推送U8C丽知OFS调整入库(组装入库)--->U8C组装订单失败失败原因" + reusltStrDto.getErrormsg();
}else {
ErrMessage = "推送U8C丽知OFS调整入库(组装入库)--->U8C组装订单失败失败原因" + e.getMessage();
}
//失败 批量新增 ofsDetails
for (RerturnGoodsOrderSearchDetails logDetail : logDetails) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr);
integrationTaskLivingDetailsEntity.setNewTransmitInfo(ErrMessage);
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(format);
integrationTaskLivingDetailsEntity.setRootAppPk(logDetail.getReturnOrderCode()+"_"+logDetail.getSkuCode());
integrationTaskLivingDetailsEntity.setRootAppBill(logDetail.getReturnOrderCode());
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
}
}
});
// //分摊后的明细
// List<RerturnGoodsOrderSearchDetails> ofsDetailsAll=new ArrayList<>();
//
//
// for (RerturnGoodsOrderSearchData returnGoodsOrder : filterReturnGoodsOrders) {
//
// RerturnGoodsOrderSearchHeader ofsHeader = returnGoodsOrder.getHeader();
//
// //平台优惠 platformDiscounts
// BigDecimal platform = new BigDecimal(ofsHeader.getPlatformDiscounts());
// //商家优惠 merchantDiscounts
// BigDecimal merchant = new BigDecimal(ofsHeader.getMerchantDiscounts());
// //达人优惠 expertDiscounts
// BigDecimal expert = new BigDecimal(ofsHeader.getExpertDiscounts());
// //支付优惠 payDiscounts
// BigDecimal pay = new BigDecimal(ofsHeader.getPayDiscounts());
//
// List<RerturnGoodsOrderSearchDetails> ofsDetails = returnGoodsOrder.getDetails();
// ofsDetails.stream().forEach(detail->{//表头的四个优惠放到表体
//// detail.setOriginalTargetPlatformDiscounts(platform);
//// detail.setOriginalTargetMerchantDiscounts(merchant);
//// detail.setOriginalTargetExpertDiscounts(expert);
//// detail.setOriginalTargetPayDiscounts(pay);
// detail.setOriginalTargetPlatformDiscounts(BigDecimal.valueOf(4));
// detail.setOriginalTargetMerchantDiscounts(BigDecimal.valueOf(5));
// detail.setOriginalTargetExpertDiscounts(BigDecimal.valueOf(6));
// detail.setOriginalTargetPayDiscounts(BigDecimal.valueOf(7));
// });
//
// //总金额
// BigDecimal totalCount = new BigDecimal(0);
// for (RerturnGoodsOrderSearchDetails ofsDetail : ofsDetails) {
// //请求数量*商品零售价
// BigDecimal count=new BigDecimal(ofsDetail.getRequestQty()).multiply(new BigDecimal(ofsDetail.getMsrPrice()));
// totalCount.add(count);
// }
//
// //分摊总比重1最后货品时分摊比例= 1-之前的
// BigDecimal ratioSurplus= new BigDecimal(1);
// for (int i = 0; i < ofsDetails.size(); i++) {
// if(i!=ofsDetails.size()){//最后一个直接取
// //给存货分摊比例,总金额/数量*单价
// BigDecimal ratio
// = totalCount.divide(new BigDecimal(ofsDetails.get(i).getRequestQty()).multiply(new BigDecimal(ofsDetails.get(i).getMsrPrice())));
// ratioSurplus.subtract(ratio);
// }
// //四个分摊优惠 按零售价摊
// //shareTargetPlatformDiscounts 分摊平台优惠
//// ofsDetails.get(i).setShareTargetPlatformDiscounts();
// //shareTargetMerchantDiscounts 分摊商家优惠
// //shareTargetExpertDiscounts 分摊达人优惠
// //shareTargetPayDiscounts 分摊支付优惠
//
//
// }
// }
//
System.out.println(1);
}
/**
* ofs仅退款数据存中台mysql数据库
* 表头表体分别存忽略大小写 BeanUtil.copyPropreties(a,b,Copyoptions.create().ignoreCase())
*
* @param returnGoodsOrders
*/
public void saveOrUpdate(List<RerturnGoodsOrderSearchData> returnGoodsOrders){
public void save(List<RerturnGoodsOrderSearchData> returnGoodsOrders) {
// List<OnlyAfterSalesHEntity> allH=new ArrayList<>();
// List<OnlyAfterSalesBEntity> allB=new ArrayList<>();
for (RerturnGoodsOrderSearchData returnGoodsOrder : returnGoodsOrders) {
@ -354,15 +568,43 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
onlyAfterSalesBEntity.setId(null);
onlyAfterSalesBEntity.setHid(HId);
onlyAfterSalesBEntity.setOfsid(detail.getId());
//四个优惠platformDiscounts 平台优惠merchantDiscounts 商家优惠expertDiscounts 达人优惠payDiscounts 支付优惠
onlyAfterSalesBEntity.setPlatformDiscounts(header.getPlatformDiscounts());
onlyAfterSalesBEntity.setMerchantDiscounts(header.getMerchantDiscounts());
onlyAfterSalesBEntity.setExpertDiscounts(header.getExpertDiscounts());
onlyAfterSalesBEntity.setPayDiscounts(header.getPayDiscounts());
onlyAfterSalesBDao.save(onlyAfterSalesBEntity);
}
}
}
/**
* 查询OFS销售订单
*/
public SaleOrderMessageDto getOfsOrder(String code) throws Exception {
Long pageSize = 200L;
Long pageNo = 1L;
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setPageNo(pageNo);
queryOfsSoSaleOutVo.setPageSize(pageSize);
queryOfsSoSaleOutVo.setCode(code);
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
interfaceParamDto.setApi("ofs.salesOrder.search");
interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo));
SaleOrderMessageDto saleOrderMessageDto = (SaleOrderMessageDto) ofsUnifiedService.unified(interfaceParamDto);
if (saleOrderMessageDto.getData().size() == 0) {
return null;
}
return saleOrderMessageDto;
}
/**
* 查询ofs仅退款订单 销售退货单查询ofs.returnOrder. search)
*
* <p>
* 查询条件refundedAt_startrefundedAt_endcode
* returnType:0 不退货
* exchangeType:0 不换货
@ -400,6 +642,21 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
}
return all;
}
private ArapDjzb resultDataHandle(String resultData) {
try {
if (resultData != null && !"".equals(resultData)) {
if (resultData.contains("[")) {
resultData = resultData.substring(1, resultData.length() - 1);
}
return JSON.parseObject(resultData, ArapDjzb.class);
}
} catch (Exception e) {
e.printStackTrace();
logger.error("解析返回参数失败的错误", e);
//如果解析失败记录原因但是不能影响结果的记录
}
return null;
}
}

View File

@ -0,0 +1,163 @@
package com.hzya.frame.plugin.lets.u8cdto;
import lombok.Data;
import java.util.List;
/**
* 单据主表-应收应付
*/
@Data
public class ArapDjzb {
private Parentt parentvo;
private List<Childrenn> childrenvo;
@Data
public static class Parentt {
private String bfyhzh;//本方银行帐号付结单:付款银行账号;收结单:收款银行账号
private String bzbm;//币种
private String deinvdate;//开票日期
private String deptid;//部门
private String dfyhzh;//对方银行账号付结单:收款银行账号;收结单:付款银行账号
private String djbh;//单据号
private String djlxbm;//单据类型编码交易类型编码使用此字段如D0D1D2
private String djrq;//单据日期
private String dwbm;//公司
private String effectdate;//起算日期
private String feinvstatus;//开票状态
private String finvoicetype;//发票类型0 增值税专用发票 1 增值税普通发票 2 营业税发票 3 收据 4 其他发票 5 增值税电子普通发票
private String hbbm;//客商
private String isreded;//红冲
private String isselectedpay;//选择付款(1选择付款 0非选择付款)
private String kmbm;//科目编码v5.1开始传科目编码之前只能传主键
private String lrr;//录入人
private String lybz;//来源标志0 应收系统 1应付系统 3 销售系统 4 采购系统 5 资金结算 6 网上银行 8 票据管理 9 协同单据 10 信贷系统 11 汇兑损益系统 12 项目管理 13 全面预算 14 签字确认 15 发运管理 16 内部交易 17 外部交换平台 18 资金计息 19 库存管理
private String pj_jsfs;//结算方式
private String pj_num;//票据号
private String pk_glorgbook;//账簿编码v5.1开始支持
private String prepay;//预收付款标志
private String qcbz;//期初
private String scomment;//备注
private String shr;//审核人审批时必填
private String shrq;//审核日期审批时必填
private String szxmid;//收支项目
private String tradertype;//交易对象类型0 客商 1 部门 2 人员 3 散户
private String veinvcode;//发票代码
private String veinvnumber;//发票号码
private String vouchid;//表头主键(修改必填)
private String wldx;//往来对象标识(0 客户 1供应商 2部门 3业务员 )
private String xslxbm;//业务流程
private String ywybm;//业务员编码
private String zgyf;//暂估应付标志
private String zyx1;//自定义项1档案类型的传pk
private String zyx10;//自定义项10档案类型的传pk
private String zyx11;//自定义11档案类型的传pk
private String zyx12;//自定义12档案类型的传pk
private String zyx13;//自定义13档案类型的传pk
private String zyx14;//自定义14档案类型的传pk
private String zyx15;//自定义15档案类型的传pk
private String zyx16;//自定义16档案类型的传pk
private String zyx17;//自定义17档案类型的传pk
private String zyx18;//自定义18档案类型的传pk
private String zyx19;//自定义19档案类型的传pk
private String zyx2;//自定义项2档案类型的传pk
private String zyx20;//自定义20档案类型的传pk
private String zyx21;//自定义项21档案类型的传pk
private String zyx22;//自定义项22档案类型的传pk
private String zyx23;//自定义项23档案类型的传pk
private String zyx24;//自定义项24档案类型的传pk
private String zyx25;//自定义项25档案类型的传pk
private String zyx26;//自定义项26档案类型的传pk
private String zyx27;//自定义项27档案类型的传pk
private String zyx28;//自定义项28档案类型的传pk
private String zyx29;//自定义项29档案类型的传pk
private String zyx3;//自定义项3档案类型的传pk
private String zyx30;//自定义项30档案类型的传pk
private String zyx4;//自定义项4档案类型的传pk
private String zyx5;//自定义项5档案类型的传pk
private String zyx6;//自定义项6档案类型的传pk
private String zyx7;//自定义项7档案类型的传pk
private String zyx8;//自定义项8档案类型的传pk
private String zyx9;//自定义项9档案类型的传pk
}
@Data
public static class Childrenn {
private String bankrollprojet;//计划项目编码5.1开始支持
private String bfyhzh;//本方银行帐号
private String cashitem;//现金流量项目
private String cinventoryid;//存货
private String cksqsh;//源头单据表体主键
private String ddh;//订单号
private String ddhh;//上层来源单据表体主键
private String ddlx;//上层来源单据表头主键
private String deptid;//部门
private String dfbbje;//贷方本币金额
private String dfbbsj;//贷方本币税金
private String dfbbwsje;//贷方本币无税金额
private String dfshl;//贷方数量
private String dfybje;//贷方原币金额(应付收款时必填
private String dfybsj;//贷方原币税金
private String dfybwsje;//贷方原币无税金额
private String dfyhzh;//对方银行帐号
private String dj;//单价
private String fb_oid;//表体主键(修改必填)
private String fph;//发票号
private String hbbm;//合作伙伴客商编码
private String hsdj;//含税单价
private String item_bill_pk;//事项审批单PK
private String jfbbje;//借方本币金额
private String jfbbsj;//借方本币税金
private String jfshl;//借方数量
private String jfybje;//借方原币金额应收付款时必填注意传参时加双引号
private String jfybsj;//借方原币税金
private String jfybwsje;//借方原币无税金额
private String jobid;//专项
private String jsfsbm;//上层来源单据类型应付单类型D1应收单类型D0
private String kmbm;//科目编码v5.1开始传科目编码之前只能传主键
private String kslb;//扣税类别
private String notetype;//票据类型5.0sp添加
private String occupationmny;//预占用核销原币余额
private String ordercusmandoc;//订单客商
private String ph;//源头单据类型
private String sfkxyh;//收付款协议
private String sl;//税率
private String szxmid;//收支项目
private String wbfbbje;//借方本币无税金额
private String wldx;//往来对象标识(0 客户 1供应商 2部门 3业务员 )
private String xyzh;//源头单据表头主键
private String ywybm;//业务员编码5.0及以上支持
private String zy;//摘要
private String zyx1;//自定义项1档案类型的传pk
private String zyx10;//自定义项10档案类型的传pk
private String zyx11;//自定义项11档案类型的传pk
private String zyx12;//自定义项12档案类型的传pk
private String zyx13;//自定义项13档案类型的传pk
private String zyx14;//自定义项14档案类型的传pk
private String zyx15;//自定义项15档案类型的传pk
private String zyx16;//自定义项16档案类型的传pk
private String zyx17;//自定义项17档案类型的传pk
private String zyx18;//自定义项18档案类型的传pk
private String zyx19;//自定义项19档案类型的传pk
private String zyx2;//自定义项2档案类型的传pk
private String zyx20;//自定义项20档案类型的传pk
private String zyx21;//自定义项21档案类型的传pk
private String zyx22;//自定义项22档案类型的传pk
private String zyx23;//自定义项23档案类型的传pk
private String zyx24;//自定义项24档案类型的传pk
private String zyx25;//自定义项25档案类型的传pk
private String zyx26;//自定义项26档案类型的传pk
private String zyx27;//自定义项27档案类型的传pk
private String zyx28;//自定义项28档案类型的传pk
private String zyx29;//自定义项29档案类型的传pk
private String zyx3;//自定义项3档案类型的传pk
private String zyx30;//自定义项30档案类型的传pk
private String zyx4;//自定义项4档案类型的传pk
private String zyx5;//自定义项5档案类型的传pk
private String zyx6;//自定义项6档案类型的传pk
private String zyx7;//自定义项7档案类型的传pk
private String zyx8;//自定义项8档案类型的传pk
private String zyx9;//自定义项9档案类型的传pk
}
}

View File

@ -131,7 +131,9 @@ public class TransferTest {
////////////////////////////////////////////////////////////////////////////////////仅退款
@Test
public void t80(){
refundOnlyPluginInitializer.start("LETS-RO2024091900000001");
// refundOnlyPluginInitializer.start("LETS-RO2024091900000001");
// refundOnlyPluginInitializer.start("LETS-RO2023060900005007");
refundOnlyPluginInitializer.start("LETS-RO2023082300000045");
}
////////////////////////////////////////////////////////////////////////////////////仅退款

View File

@ -72,4 +72,8 @@ public class RerturnGoodsOrderSearchHeader {
private String expertDiscounts;
//支付优惠
private String payDiscounts;
//部门-来自销售订单
private String saleDeptCode;
private String saleDeptDame;
}