更新客商同步
This commit is contained in:
parent
db2b5b2b15
commit
821c26bc3a
|
@ -26,4 +26,5 @@ public class ProfilesActiveConstant {
|
||||||
|
|
||||||
public static final String U8C_URL = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
public static final String U8C_URL = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||||
public static final String OFS_URL_TEST = "http://39.98.58.229/api/edi/ofs/in";
|
public static final String OFS_URL_TEST = "http://39.98.58.229/api/edi/ofs/in";
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.hzya.frame.plugin.lets.ofs.entity;
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author
|
* @Author
|
||||||
* @Date 2024/8/6 14:57
|
* @Date 2024/8/6 14:57
|
||||||
|
@ -11,7 +13,7 @@ import lombok.Data;
|
||||||
* @Description: OFS店铺实体类
|
* @Description: OFS店铺实体类
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class ShopEntity extends BaseEntity {
|
public class ShopEntity implements Serializable {
|
||||||
// 店铺业务编码
|
// 店铺业务编码
|
||||||
private String bizCode;
|
private String bizCode;
|
||||||
// 销售平台
|
// 销售平台
|
||||||
|
@ -39,8 +41,10 @@ public class ShopEntity extends BaseEntity {
|
||||||
// 货主编码
|
// 货主编码
|
||||||
private String companyCode;
|
private String companyCode;
|
||||||
private Integer status;
|
private Integer status;
|
||||||
private String created_start;
|
private String lastUpdated_start;
|
||||||
private String created_end;
|
private String lastUpdated_end;
|
||||||
|
|
||||||
|
private String pageNo;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,4 +35,9 @@ public class SupplierEntity {
|
||||||
private String mobile;
|
private String mobile;
|
||||||
//状态
|
//状态
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
private String pageNo;
|
||||||
|
|
||||||
|
private String lastUpdated_start;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,8 +88,9 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
|
||||||
try {
|
try {
|
||||||
//查询要分配的客商
|
//查询要分配的客商
|
||||||
List<CustdocRequestVo> list = queryCustDoc();
|
List<CustdocRequestVo> list = queryCustDoc();
|
||||||
|
List<CustdocRequestVo> requestVoList = filterShopEntity(list);
|
||||||
//推送:自动分配
|
//推送:自动分配
|
||||||
implement(list);
|
implement(requestVoList);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("丽知:U8C->客商基本档案自动分配全公司,start()方法报错:", e);
|
logger.error("丽知:U8C->客商基本档案自动分配全公司,start()方法报错:", e);
|
||||||
|
@ -98,31 +99,6 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 过滤成功日志
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<BdInvbasdocEntity> filter(List<BdInvbasdocEntity> bdInvbasdocEntityList) {
|
|
||||||
List<BdInvbasdocEntity> filterInvbasdocList = new ArrayList<>();
|
|
||||||
for (BdInvbasdocEntity bdInvbasdocEntity : bdInvbasdocEntityList) {
|
|
||||||
String rootAppPk = bdInvbasdocEntity.getPkInvbasdoc();
|
|
||||||
boolean isExis = true;
|
|
||||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
|
||||||
integrationTaskLivingDetailsEntity.setRootAppPk(rootAppPk);
|
|
||||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
|
|
||||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
|
||||||
List<IntegrationTaskLivingDetailsEntity> integrationTaskLivingDetailsEntities = iIntegrationTaskLivingDetailsDao.query(integrationTaskLivingDetailsEntity);
|
|
||||||
if (integrationTaskLivingDetailsEntities == null || integrationTaskLivingDetailsEntities.size() == 0) {
|
|
||||||
isExis = false;
|
|
||||||
}
|
|
||||||
if (!isExis) {
|
|
||||||
filterInvbasdocList.add(bdInvbasdocEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return filterInvbasdocList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询客商基本档案
|
* 查询客商基本档案
|
||||||
|
@ -157,6 +133,7 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
|
||||||
return filterlist;
|
return filterlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//过滤已经分配的
|
||||||
public List<CustdocRequestVo> filterShopEntity(List<CustdocRequestVo> list) {
|
public List<CustdocRequestVo> filterShopEntity(List<CustdocRequestVo> list) {
|
||||||
Assert.notNull(list, "不能为空!");
|
Assert.notNull(list, "不能为空!");
|
||||||
List<CustdocRequestVo> shopEntityList = new ArrayList<>();
|
List<CustdocRequestVo> shopEntityList = new ArrayList<>();
|
||||||
|
@ -190,13 +167,11 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
|
||||||
*/
|
*/
|
||||||
public void implement(List<CustdocRequestVo> list) {
|
public void implement(List<CustdocRequestVo> list) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (CustdocRequestVo custdocRequestVo : list) {
|
for (CustdocRequestVo custdocRequestVo : list) {
|
||||||
String assginjsonString = "";
|
String assginjsonString = "";
|
||||||
String custcode = custdocRequestVo.getParentvo().getCustcode();
|
String custcode = custdocRequestVo.getParentvo().getCustcode();
|
||||||
String createtime = custdocRequestVo.getParentvo().getCreatetime();
|
String createtime = custdocRequestVo.getParentvo().getCreatetime();
|
||||||
String custprop = custdocRequestVo.getParentvo().getCustprop();
|
// String custprop = custdocRequestVo.getParentvo().getCustprop();
|
||||||
try {
|
try {
|
||||||
|
|
||||||
ArrayList<CustDocAssginVo> assginvolist = new ArrayList<>();
|
ArrayList<CustDocAssginVo> assginvolist = new ArrayList<>();
|
||||||
|
@ -222,7 +197,7 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
|
||||||
CustDocAssginVo custDocAssginVo = new CustDocAssginVo();
|
CustDocAssginVo custDocAssginVo = new CustDocAssginVo();
|
||||||
custDocAssginVo.setPk_cubasdoc(custcode);
|
custDocAssginVo.setPk_cubasdoc(custcode);
|
||||||
//TODO
|
//TODO
|
||||||
custDocAssginVo.setCustprop(custprop);
|
// custDocAssginVo.setCustprop(custprop);
|
||||||
custDocAssginVo.setPk_corp(bdCorpEntity.getUnitcode());
|
custDocAssginVo.setPk_corp(bdCorpEntity.getUnitcode());
|
||||||
assginvolist.add(custDocAssginVo);
|
assginvolist.add(custDocAssginVo);
|
||||||
}
|
}
|
||||||
|
@ -237,8 +212,7 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
|
||||||
HashMap<String, List> map = new HashMap<>();
|
HashMap<String, List> map = new HashMap<>();
|
||||||
map.put("custbasvo", assginvolist);
|
map.put("custbasvo", assginvolist);
|
||||||
assginjsonString = JSONObject.toJSONString(map);
|
assginjsonString = JSONObject.toJSONString(map);
|
||||||
// String response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("custdocAssign"), assginjsonString);
|
String response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("custdocAssign"), assginjsonString);
|
||||||
String response = "";
|
|
||||||
System.out.println(response);
|
System.out.println(response);
|
||||||
boolean isSuccess = false;
|
boolean isSuccess = false;
|
||||||
if (response != null && !"".equals(response)) {
|
if (response != null && !"".equals(response)) {
|
||||||
|
@ -246,7 +220,7 @@ String response = "";
|
||||||
if ("success".equals(reusltStrDto.getStatus())) {
|
if ("success".equals(reusltStrDto.getStatus())) {
|
||||||
isSuccess = true;
|
isSuccess = true;
|
||||||
//分配成功去更新状态
|
//分配成功去更新状态
|
||||||
updateDoc(custdocRequestVo);
|
// updateDoc(custdocRequestVo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
|
|
|
@ -155,8 +155,8 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
||||||
//TODO ofs查询店铺信息
|
//TODO ofs查询店铺信息
|
||||||
// shopEntity.setLastUpdated_start(startTimeStr);
|
// shopEntity.setLastUpdated_start(startTimeStr);
|
||||||
// shopEntity.setLastUpdated_end(endTimeStr);
|
// shopEntity.setLastUpdated_end(endTimeStr);
|
||||||
|
shopEntity.setPageNo("1");
|
||||||
// List<ShopEntity> query = shopDao.query(shopEntity);
|
shopEntity.setClientCode("LETS");
|
||||||
List<OfsShopDto> list = queryfromofs(shopEntity);
|
List<OfsShopDto> list = queryfromofs(shopEntity);
|
||||||
|
|
||||||
//过滤数据
|
//过滤数据
|
||||||
|
@ -214,7 +214,7 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
||||||
// parentvo.setDef10("N");
|
// parentvo.setDef10("N");
|
||||||
// //设置还未同步到管理档案
|
// //设置还未同步到管理档案
|
||||||
// parentvo.setDef11("N");
|
// parentvo.setDef11("N");
|
||||||
parentvo.setCustprop("2");
|
// parentvo.setCustprop("2");
|
||||||
custdocRequestVo.setParentvo(parentvo);
|
custdocRequestVo.setParentvo(parentvo);
|
||||||
|
|
||||||
//同步u8c
|
//同步u8c
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.hzya.frame.ttxofs.basics;
|
||||||
|
|
||||||
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUClassSearchResponse;
|
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUClassSearchResponse;
|
||||||
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUSearchResponse;
|
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OFSSKUSearchResponse;
|
||||||
|
import com.hzya.frame.ttxofs.dto.ofsBaseSearch.OfsShopReturnMessageDto;
|
||||||
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
|
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSTranseferOrderSearchResponse;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
|
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
|
||||||
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleReturnMessageDto;
|
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleReturnMessageDto;
|
||||||
|
@ -30,6 +31,9 @@ public class ApiDtoCacheMap {
|
||||||
apiDtoCacheMap.put("ofs.receipt.search", new StockinOrderSearchResponse());//入库单查询
|
apiDtoCacheMap.put("ofs.receipt.search", new StockinOrderSearchResponse());//入库单查询
|
||||||
apiDtoCacheMap.put("ofs.transferOrder.search", new OFSTranseferOrderSearchResponse());//调拨订单
|
apiDtoCacheMap.put("ofs.transferOrder.search", new OFSTranseferOrderSearchResponse());//调拨订单
|
||||||
|
|
||||||
|
apiDtoCacheMap.put("ofs.store.search", new OfsShopReturnMessageDto());//店铺查询
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
apiDtoCacheMap.put("ofs.sku.search", new OFSSKUSearchResponse());//OFS存货档案查询接口
|
apiDtoCacheMap.put("ofs.sku.search", new OFSSKUSearchResponse());//OFS存货档案查询接口
|
||||||
apiDtoCacheMap.put("ofs.inventory.class.search", new OFSSKUClassSearchResponse());//OFS存货分类查询接口
|
apiDtoCacheMap.put("ofs.inventory.class.search", new OFSSKUClassSearchResponse());//OFS存货分类查询接口
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.hzya.frame.ttxofs.dto.ofsBaseSearch;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author sx
|
||||||
|
* @Date 2024/8/15 16:37
|
||||||
|
* @PackageName:com.hzya.frame.ttxofs.dto.ofsBaseSearch
|
||||||
|
* @ClassName: OfsShopDto
|
||||||
|
* @Description: TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OfsShopDto {
|
||||||
|
private String bizCode;
|
||||||
|
// 销售平台
|
||||||
|
private String platformCode;
|
||||||
|
// 店铺名称
|
||||||
|
private String name;
|
||||||
|
// 店主账号
|
||||||
|
private String ownerAccount;
|
||||||
|
// u8货主
|
||||||
|
private String u8CompanyCode;
|
||||||
|
// 运营类型
|
||||||
|
private String operationType;
|
||||||
|
// 业务
|
||||||
|
private String business;
|
||||||
|
// 客户分类编码
|
||||||
|
private String customerClassifyCode;
|
||||||
|
// 客户编码
|
||||||
|
private String customerCode;
|
||||||
|
// 客户管理类型编码
|
||||||
|
private String cmtCode;
|
||||||
|
// 品牌
|
||||||
|
private String brandCode;
|
||||||
|
// 组织
|
||||||
|
private String clientCode;
|
||||||
|
// 货主编码
|
||||||
|
private String companyCode;
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
private String created;
|
||||||
|
private String createdBy;
|
||||||
|
private String lastUpdated;
|
||||||
|
private String lastUpdatedBy;
|
||||||
|
private String pageNo;
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hzya.frame.ttxofs.dto.ofsBaseSearch;
|
||||||
|
|
||||||
|
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author sx
|
||||||
|
* @Date 2024/8/15 17:31
|
||||||
|
* @PackageName:com.hzya.frame.ttxofs.dto.ofsBaseSearch
|
||||||
|
* @ClassName: OfsShopReturnMessageDto
|
||||||
|
* @Description: TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OfsShopReturnMessageDto extends ReturnMessageBasics {
|
||||||
|
private List<OfsShopDto> data;
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.hzya.frame.ttxofs.dto.ofsBaseSearch;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author sx
|
||||||
|
* @Date 2024/8/15 17:12
|
||||||
|
* @PackageName:com.hzya.frame.ttxofs.dto.ofsBaseSearch
|
||||||
|
* @ClassName: OfsSupplierDto
|
||||||
|
* @Description: TODO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OfsSupplierDto {
|
||||||
|
|
||||||
|
//业务编码
|
||||||
|
private String bizCode;
|
||||||
|
//供应商名称
|
||||||
|
private String name;
|
||||||
|
//组织
|
||||||
|
private String clientCode;
|
||||||
|
//货主编码
|
||||||
|
private String companyCode;
|
||||||
|
//地址
|
||||||
|
private String address;
|
||||||
|
//国家
|
||||||
|
private String country;
|
||||||
|
//省
|
||||||
|
private String state;
|
||||||
|
//市
|
||||||
|
private String city;
|
||||||
|
//区
|
||||||
|
private String district;
|
||||||
|
//联系人
|
||||||
|
private String attentionTo;
|
||||||
|
//手机号
|
||||||
|
private String mobile;
|
||||||
|
//状态
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
private String lastUpdated_start;
|
||||||
|
private String lastUpdated_end;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.ttxofs.dto.ofsBaseSearch;
|
||||||
|
|
||||||
|
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OfsSupplierReturnMessageDto extends ReturnMessageBasics {
|
||||||
|
|
||||||
|
private List<OfsSupplierDto> data;
|
||||||
|
}
|
Loading…
Reference in New Issue