丽知:修改公司对应
This commit is contained in:
parent
6417c9c1fd
commit
fb2e87ac07
|
@ -2,10 +2,18 @@ package com.hzya.frame.plugin.lets.dingtalk.utils;
|
|||
|
||||
import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenResponseBody;
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetAttachmentSpaceResponse;
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessCodeByNameResponse;
|
||||
import com.dingtalk.api.response.OapiUserListidResponse;
|
||||
import com.dingtalk.api.response.OapiV2UserGetResponse;
|
||||
import com.dingtalk.api.response.OapiV2UserGetbymobileResponse;
|
||||
|
||||
/**
|
||||
* 获取审批钉盘空间信息,spaceId:20852670637
|
||||
* 名称 : 模板名称: 空间id:
|
||||
* 特殊业务处理(新) PROC-AC33FC85-FB44-49FC-B926-1D966AE3BBD2 25354825296
|
||||
* 采购付款申请(新) PROC-EC6B5BD2-DE3C-456E-9591-6F7B377E39E4 25354984089
|
||||
* 采购付款申请(店群专用) PROC-285CCF2B-524F-4055-BE62-FC31F490C654 25354973072
|
||||
*/
|
||||
public class Test {
|
||||
public static void main(String[] args) throws Exception {
|
||||
String appKey="ding5qfifcktfqfjlem0";
|
||||
|
@ -20,17 +28,27 @@ public class Test {
|
|||
// System.out.println(userIdList);
|
||||
|
||||
//根据手机号查询用户详情,userid:6715600736721738
|
||||
// OapiV2UserGetbymobileResponse userByMobile = DingTalkUtils.getUserByMobile(tokenBody.getAccessToken(), "13783530043");
|
||||
// System.out.println(userByMobile.getBody());
|
||||
OapiV2UserGetbymobileResponse userByMobile = DingTalkUtils.getUserByMobile(tokenBody.getAccessToken(), "13783530043");
|
||||
System.out.println(userByMobile.getResult().getUserid());
|
||||
|
||||
//查询用户详情,unionId:xXpSQXdGCyYNcQXxrgezOwiEiE
|
||||
// OapiV2UserGetResponse userById = DingTalkUtils.getUserById(tokenBody.getAccessToken(), "6715600736721738");
|
||||
// System.out.println(userById.getBody());
|
||||
OapiV2UserGetResponse userById = DingTalkUtils.getUserById(tokenBody.getAccessToken(), "6715600736721738");
|
||||
System.out.println(userById.getBody());
|
||||
|
||||
//获取审批钉盘空间信息,spaceId:20852670637
|
||||
// GetAttachmentSpaceResponse processDingPanSpaceInfo = DingTalkUtils.getProcessDingPanSpaceInfo(tokenBody.getAccessToken(), "6715600736721738");
|
||||
// System.out.println(processDingPanSpaceInfo.getBody().getResult().getSpaceId());
|
||||
|
||||
//获取模板code,通过名称
|
||||
// GetProcessCodeByNameResponse processCode = DingTalkUtils.getProcessCode(tokenBody.getAccessToken(), "特殊业务处理(新)");
|
||||
// System.out.println(processCode.getBody().getResult().getProcessCode());//PROC-AC33FC85-FB44-49FC-B926-1D966AE3BBD2
|
||||
// GetProcessCodeByNameResponse processCode1 = DingTalkUtils.getProcessCode(tokenBody.getAccessToken(), "采购付款申请(新)");
|
||||
// System.out.println(processCode1.getBody().getResult().getProcessCode());//PROC-EC6B5BD2-DE3C-456E-9591-6F7B377E39E4
|
||||
// GetProcessCodeByNameResponse processCode2 = DingTalkUtils.getProcessCode(tokenBody.getAccessToken(), "采购付款申请(店群专用)");
|
||||
// System.out.println(processCode2.getBody().getResult().getProcessCode());//PROC-285CCF2B-524F-4055-BE62-FC31F490C654
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4ADto;
|
|||
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4IDto;
|
||||
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||
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;
|
||||
|
@ -97,6 +98,8 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
@Autowired
|
||||
private IBdRdclDao iBdRdclDao;
|
||||
@Autowired
|
||||
private QueryU8CEntityUtil queryU8CEntityUtil;
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
|
@ -282,7 +285,9 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
parentvo.setVuserdef19(ofsCode);
|
||||
|
||||
//pk_corp--公司
|
||||
parentvo.setPk_corp(ofsHeader.getCompanyCode());
|
||||
String corpCode = queryU8CEntityUtil.queryBdDefDocByPkDefDocList(ofsHeader.getCompanyCode());
|
||||
parentvo.setPk_corp(corpCode);
|
||||
|
||||
//pk_calbody--库存组织PK
|
||||
parentvo.setPk_calbody(ofsHeader.getCompanyCode());
|
||||
//cwarehouseid--仓库
|
||||
|
|
|
@ -299,9 +299,11 @@ public class AdjustInZZPluginInitializer extends PluginBaseEntity {
|
|||
SpecialbillVO specialbillVO = new SpecialbillVO();
|
||||
SpecialbillVO.Parentvo parentvo = new SpecialbillVO.Parentvo();
|
||||
|
||||
//pk_corp 公司
|
||||
BdCorpEntity bdCorpEntity = queryU8CEntityUtil.queryBdCorpByUnitCode(ofsHeader.getCompanyCode());
|
||||
//pk_corp 公司,公司转换
|
||||
String corpCode = queryU8CEntityUtil.queryBdDefDocByPkDefDocList(ofsHeader.getCompanyCode());
|
||||
BdCorpEntity bdCorpEntity = queryU8CEntityUtil.queryBdCorpByUnitCode(corpCode);
|
||||
Assert.notNull(bdCorpEntity,"根据公司编码:{},未查询到公司主键,请检查U8C公司档案",ofsHeader.getCompanyCode());
|
||||
|
||||
parentvo.setPk_corp(bdCorpEntity.getPkCorp());
|
||||
//dbilldate 单据日期
|
||||
format = ofsHeader.getCreated();
|
||||
|
@ -413,7 +415,13 @@ public class AdjustInZZPluginInitializer extends PluginBaseEntity {
|
|||
logger.error("推送U8C,丽知:OFS调整入库(组装入库)--->U8C组装订单失败,失败原因:" + e);
|
||||
//失败
|
||||
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
||||
String ErrMessage = "推送U8C,丽知:OFS调整入库(组装入库)--->U8C组装订单失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
|
||||
String ErrMessage="";
|
||||
if (reusltStrDto != null) {
|
||||
ErrMessage = "推送U8C,丽知:OFS调整入库(组装入库)--->U8C组装订单失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
}else {
|
||||
ErrMessage=e.getMessage();
|
||||
}
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
|
||||
integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr);
|
||||
|
|
|
@ -397,8 +397,13 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
e.printStackTrace();
|
||||
logger.error("推送U8C,丽知:OFS调整出库--->U8C其它出库失败,失败原因:" + e);
|
||||
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
||||
String ErrMessage = "";
|
||||
if(reusltStrDto==null){
|
||||
ErrMessage=e.getMessage();
|
||||
}else {
|
||||
ErrMessage = "推送U8C,丽知:OFS调整出库--->U8C其它出库失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
}
|
||||
|
||||
String ErrMessage = "推送U8C,丽知:OFS调整出库--->U8C其它出库失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
|
||||
//失败
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
|
|
|
@ -296,10 +296,14 @@ public class OtherInPluginInitializer extends PluginBaseEntity {
|
|||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
logger.error("推送U8C--> 丽知:其他出库单自动审核失败,失败原因:" + e);
|
||||
|
||||
//失败
|
||||
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
||||
String ErrMessage = "推送U8C--> 丽知:其他出库单自动审核失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
String ErrMessage="";
|
||||
if (reusltStrDto != null) {
|
||||
ErrMessage = "推送U8C--> 丽知:其他出库单自动审核失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
}else {
|
||||
ErrMessage=e.getMessage();
|
||||
}
|
||||
//失败
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
|
||||
integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr);
|
||||
|
|
|
@ -304,7 +304,12 @@ public class OtherOutPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
//失败
|
||||
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
||||
String ErrMessage = "推送U8C--> 丽知:其他出库单自动审核失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
String ErrMessage="";
|
||||
if (reusltStrDto != null) {
|
||||
ErrMessage = "推送U8C--> 丽知:其他出库单自动审核失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
}else {
|
||||
ErrMessage=e.getMessage();
|
||||
}
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
|
||||
integrationTaskLivingDetailsEntity.setRootAppNewData(mapStr);
|
||||
|
|
|
@ -374,7 +374,12 @@ public class SKUPluginInitializer extends PluginBaseEntity {
|
|||
logger.error("推送U8C,丽知:OFS货品档案--->U8C货品档案失败,失败原因:" + e);
|
||||
//失败
|
||||
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
||||
String ErrMessage = "推送U8C,丽知:OFS货品档案--->U8C货品档案失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
String ErrMessage="";
|
||||
if (reusltStrDto != null) {
|
||||
ErrMessage = "推送U8C,丽知:OFS货品档案--->U8C货品档案失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||
}else {
|
||||
ErrMessage=e.getMessage();
|
||||
}
|
||||
//失败
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
|
||||
|
|
|
@ -401,7 +401,8 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
|
|||
// format = "2024-09-30";
|
||||
parentvo.setDjrq(format);
|
||||
//dwbm 公司
|
||||
parentvo.setDwbm(split[0]);
|
||||
String corpCode = queryU8CEntityUtil.queryBdDefDocByPkDefDocList(split[0]);
|
||||
parentvo.setDwbm(corpCode);
|
||||
//lrr 录入人
|
||||
parentvo.setLrr(OverallConstant.getOverAllValue("u8cApiZdrCode"));
|
||||
//wldx 往来对象标识 (0 客户 2部门 3业务员)
|
||||
|
@ -610,6 +611,18 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 公司转换
|
||||
* @param allHeader
|
||||
*/
|
||||
public void transCorp(List<RerturnGoodsOrderSearchHeader> allHeader){
|
||||
if(allHeader.size()==0){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据店铺区分tob toc业务流程
|
||||
* TOC仅退款:JTK TOB仅退款:BJTK
|
||||
|
|
|
@ -21,6 +21,7 @@ import com.hzya.frame.plugin.lets.u8cdto.BillVO;
|
|||
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO;
|
||||
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||
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;
|
||||
|
@ -103,6 +104,10 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
@Autowired
|
||||
private IIcGeneralBDao icGeneralBDao;
|
||||
|
||||
@Autowired
|
||||
private QueryU8CEntityUtil queryU8CEntityUtil;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
|
@ -297,9 +302,10 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
//cwarehouseid 仓库
|
||||
parentvo.setCwarehouseid(ofsTransferHeader.getFacilityCode());
|
||||
//pk_calbody 库存组织
|
||||
parentvo.setPk_calbody(ofsTransferHeader.getCompanyCode());
|
||||
String corpCode = queryU8CEntityUtil.queryBdDefDocByPkDefDocList(ofsTransferHeader.getCompanyCode());
|
||||
parentvo.setPk_calbody(corpCode);
|
||||
//pk_corp 公司
|
||||
parentvo.setPk_corp(ofsTransferHeader.getCompanyCode());
|
||||
parentvo.setPk_corp(corpCode);
|
||||
//pk_defdoc19 自定义项19(ofs调拨订单号)
|
||||
parentvo.setVuserdef19(ofsSourceOrderCode);
|
||||
|
||||
|
|
|
@ -298,19 +298,21 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
//cbiztypeid 业务流程编码
|
||||
parentvo.setCbiztypeid("to01");
|
||||
//coutcbid 调出组织编码 对应OFS->原库存地点公司
|
||||
parentvo.setCoutcbid(ofsTranseferOrder.getHeader().getCompanyCode());
|
||||
String corpCode = queryU8CEntityUtil.queryBdDefDocByPkDefDocList(ofsTranseferOrder.getHeader().getCompanyCode());
|
||||
parentvo.setCoutcbid(corpCode);
|
||||
|
||||
//coutcorpid 调出公司编码 对应OFS->原库存地点公司
|
||||
parentvo.setCoutcorpid(ofsTranseferOrder.getHeader().getCompanyCode());
|
||||
parentvo.setCoutcorpid(corpCode);
|
||||
|
||||
//coutwhid 调出仓库编码 对应OFS->原库存地点
|
||||
parentvo.setCoutwhid(ofsTranseferOrder.getHeader().getFacilityCode());
|
||||
|
||||
//cincbid 调入组织编码 对应OFS->目标库存地点公司
|
||||
parentvo.setCincbid(ofsTranseferOrder.getHeader().getToCompanyCode());
|
||||
String toCorpCode = queryU8CEntityUtil.queryBdDefDocByPkDefDocList(ofsTranseferOrder.getHeader().getToCompanyCode());
|
||||
parentvo.setCincbid(toCorpCode);
|
||||
|
||||
//cincorpid 调入公司编码 对应OFS->目标库存地点公司
|
||||
parentvo.setCincorpid(ofsTranseferOrder.getHeader().getToCompanyCode());
|
||||
parentvo.setCincorpid(toCorpCode);
|
||||
|
||||
//cinwhid 调入仓库编码 对应OFS->目标库存地点
|
||||
parentvo.setCinwhid(ofsTranseferOrder.getHeader().getToFacilityCode());
|
||||
|
|
|
@ -73,7 +73,7 @@ DING:
|
|||
#采购付款申请(店群专用)
|
||||
PURCHASE_PAYMENT_REQUEST_SHOP: PROC-285CCF2B-524F-4055-BE62-FC31F490C654
|
||||
#审批表单空间
|
||||
APPROVE_FILE_SPAC:
|
||||
APPROVE_FILE_SPACE:
|
||||
#特殊业务处理(新)
|
||||
SPECIAL_SERVICE_PROCESSING: 25354825296
|
||||
#采购付款申请(新)
|
||||
|
|
|
@ -30,7 +30,7 @@ public class BaseTest {
|
|||
@Test
|
||||
public void t01(){
|
||||
// skuPluginInitializer.start("test0717001");
|
||||
skuPluginInitializer.start("3664454000268");
|
||||
skuPluginInitializer.start("DYYM1018-1");
|
||||
// skuPluginInitializer.start("6971229882248");
|
||||
}
|
||||
@Test
|
||||
|
|
|
@ -81,7 +81,7 @@ public class TransferTest {
|
|||
@Test
|
||||
public void t31(){
|
||||
// adjustInPluginInitializer.start("LETS-RE2024091100000001");
|
||||
adjustInPluginInitializer.start("LETS-RE2024092000000012");
|
||||
adjustInPluginInitializer.start("LETS-RE2024102400000004");
|
||||
}
|
||||
@Test
|
||||
public void t32(){
|
||||
|
@ -95,7 +95,7 @@ public class TransferTest {
|
|||
}
|
||||
@Test
|
||||
public void t41(){
|
||||
adjustOutPluginInitializer.start("LETS-SH2024101800017063");
|
||||
adjustOutPluginInitializer.start("LETS-SH2024102100023564");
|
||||
}
|
||||
@Test
|
||||
public void t42(){
|
||||
|
@ -133,13 +133,13 @@ public class TransferTest {
|
|||
public void t80(){
|
||||
// refundOnlyPluginInitializer.start("LETS-RO2024091900000001");
|
||||
// refundOnlyPluginInitializer.start("LETS-RO2023060900005007");
|
||||
refundOnlyPluginInitializer.start("LETS-RO2024102100038835");
|
||||
refundOnlyPluginInitializer.start("LETS-RO2024101800001577");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void t81(){
|
||||
// refundOnlyPluginInitializer.start("2023-08-20","2023-08-25");
|
||||
refundOnlyPluginInitializer.start("2024-09-30","2024-09-30");
|
||||
refundOnlyPluginInitializer.start("2024-10-24","2024-10-24");
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////仅退款
|
||||
|
||||
|
|
Loading…
Reference in New Issue