新增自定义档案
This commit is contained in:
parent
33335195dd
commit
685157ee4c
|
@ -58,7 +58,7 @@ public class OverallConstant {
|
|||
prodOverPublic.put("custdocAssign", "/u8cloud/api/uapbd/custdoc/assign");//客商档案分配
|
||||
prodOverPublic.put("custmandocSave", "/u8cloud/api/uapbd/custmandoc/insert");//客商档案新增
|
||||
prodOverPublic.put("bdcorpQuery", "/u8cloud/api/uapbd/bdcorp/query");//公司档案查询
|
||||
prodOverPublic.put("bddefdoclistsave", "/u8cloud/api/uapbd/bddefdoclist/insert");//公司档案查询
|
||||
prodOverPublic.put("bddefdoclistsave", "/u8cloud/api/uapbd/bddefdoc/insert");//自定义档案内容查询
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
start();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -158,7 +159,6 @@ public class CustdocAutoAllotPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
}
|
||||
return shopEntityList;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -121,10 +121,11 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
|||
shopEntity.setLastUpdated_start(startDate);
|
||||
shopEntity.setLastUpdated_end(endDate);
|
||||
shopEntity.setPageNo("1");
|
||||
shopEntity.setPageNo("1");
|
||||
|
||||
List<OfsShopDto> list = queryfromofs(shopEntity);
|
||||
List<OfsShopDto> shopEntities = filterShopEntity(list);
|
||||
implementcustdoc(shopEntities);
|
||||
|
||||
List<OfsShopDto> list1 = filterShopEntityDef(list);
|
||||
implementdef(list1);
|
||||
|
||||
|
@ -156,6 +157,7 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
|||
List<OfsShopDto> shopEntities = filterShopEntity(list);
|
||||
//同步到客商档案
|
||||
implementcustdoc(shopEntities);
|
||||
|
||||
List<OfsShopDto> list1 = filterShopEntityDef(list);
|
||||
//同步到自定义档案
|
||||
implementdef(list1);
|
||||
|
@ -189,13 +191,6 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
}
|
||||
|
||||
public void implement(List<OfsShopDto> shopEntityList){
|
||||
Assert.notNull(shopEntityList, "shopEntityList不能为空");
|
||||
//同步到客商档案
|
||||
implementcustdoc(shopEntityList);
|
||||
//同步到自定义档案
|
||||
implementdef(shopEntityList);
|
||||
}
|
||||
|
||||
|
||||
public void implementcustdoc(List<OfsShopDto> shopEntityList) {
|
||||
|
@ -214,8 +209,6 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
|||
parentvo.setCustshortname(shopEntity.getName());
|
||||
//业务编码
|
||||
parentvo.setDef1(shopEntity.getBizCode());
|
||||
//备注 TODO
|
||||
parentvo.setMemo("");
|
||||
custdocRequestVo.setParentvo(parentvo);
|
||||
//同步u8c
|
||||
HashMap<String, Object> param = new HashMap<>();
|
||||
|
@ -285,8 +278,18 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
|||
DefdocRequestVo defdocRequestVo = new DefdocRequestVo();
|
||||
defdocRequestVo.setDoccode(shopEntity.getBizCode());
|
||||
defdocRequestVo.setDocname(shopEntity.getName());
|
||||
defdocRequestVo.setPk_corp("0001");
|
||||
//店铺自定义档案主键
|
||||
defdocRequestVo.setPk_defdoclist("0001A210000000000XZX");
|
||||
//TOB C
|
||||
defdocRequestVo.setMemo(shopEntity.getBusiness());
|
||||
ArrayList<DefdocRequestVo> requestVos = new ArrayList<>();
|
||||
requestVos.add(defdocRequestVo);
|
||||
HashMap<String, List> map = new HashMap<>();
|
||||
map.put("defdoc", requestVos);
|
||||
|
||||
//同步u8c
|
||||
String jsonString = JSONObject.toJSONString(defdocRequestVo);
|
||||
String jsonString = JSONObject.toJSONString(map);
|
||||
String response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("bddefdoclistsave"), jsonString);
|
||||
System.out.println(response);
|
||||
if (response != null) {
|
||||
|
@ -310,7 +313,7 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
|||
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(cbdocResultVo));
|
||||
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
||||
integrationTaskLivingDetailsEntity.setBusinessDate(businessFormat);
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk("def"+shopEntity.getBizCode());
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk("defdoc"+shopEntity.getBizCode());
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(shopEntity.getName());
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||
|
@ -327,7 +330,7 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
|||
integrationTaskLivingDetailsEntity.setNewTransmitInfo(ErrMessage);
|
||||
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
||||
integrationTaskLivingDetailsEntity.setBusinessDate(businessFormat);
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk("def"+shopEntity.getBizCode());
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk("defdoc"+shopEntity.getBizCode());
|
||||
integrationTaskLivingDetailsEntity.setRootAppBill(shopEntity.getName());
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||
|
@ -374,7 +377,7 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
|||
if (ofsShopDto.getBizCode() != null && !"".equals(ofsShopDto.getBizCode().trim())) {
|
||||
boolean isExis = true;
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk("def"+ofsShopDto.getBizCode());
|
||||
integrationTaskLivingDetailsEntity.setRootAppPk("defdoc"+ofsShopDto.getBizCode());
|
||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
|
||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||
List<IntegrationTaskLivingDetailsEntity> integrationTaskLivingDetailsEntities = iIntegrationTaskLivingDetailsDao.query(integrationTaskLivingDetailsEntity);
|
||||
|
|
|
@ -125,7 +125,6 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
OfsSupplierDto supplierEntity = new OfsSupplierDto();
|
||||
supplierEntity.setClientCode("LETS");
|
||||
supplierEntity.setCompanyCode("LETS");
|
||||
supplierEntity.setPageNo("1");
|
||||
supplierEntity.setLastUpdated_start(startTimeStr);
|
||||
supplierEntity.setLastUpdated_end(endTimeStr);
|
||||
|
@ -151,7 +150,6 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
|||
OfsSupplierDto supplierEntity = new OfsSupplierDto();
|
||||
supplierEntity.setBizCode(code);
|
||||
supplierEntity.setClientCode("LETS");
|
||||
supplierEntity.setCompanyCode("LETS");
|
||||
supplierEntity.setPageNo("1");
|
||||
|
||||
List<OfsSupplierDto> list = queryfromofs(supplierEntity);
|
||||
|
@ -174,7 +172,6 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
|||
supplierDto.setLastUpdated_start(startTime);
|
||||
supplierDto.setLastUpdated_end(endTime);
|
||||
supplierDto.setClientCode("LETS");
|
||||
supplierDto.setCompanyCode("LETS");
|
||||
supplierDto.setPageNo("1");
|
||||
List<OfsSupplierDto> queryfromofs = queryfromofs(supplierDto);
|
||||
//过滤数据
|
||||
|
@ -206,8 +203,7 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
|||
parentvo.setDef1(supplierEntity.getBizCode());
|
||||
|
||||
CustdocEntityDto.setParentvo(parentvo);
|
||||
bankVo.setAccount(supplierEntity.getBankAccount());
|
||||
CustdocEntityDto.setBanks(new ArrayList<BankVo>() {{add(bankVo);}});
|
||||
|
||||
// 同步u8c
|
||||
HashMap<String, Object> param = new HashMap<>();
|
||||
param.put("cbdocvo", CustdocEntityDto);
|
||||
|
|
|
@ -72,7 +72,7 @@ public class ShopTest {
|
|||
//// String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
|
||||
//// shopEntity.setLastUpdated_start("2024-03-10 16:06:57");
|
||||
//// shopEntity.setLastUpdated_end("2024-03-12 16:06:57");
|
||||
// shopEntity.setBizCode("hzz");
|
||||
//// shopEntity.setBizCode("hzz");
|
||||
// InterfaceParamByU8CApiDto interfaceParamDto = new InterfaceParamByU8CApiDto();
|
||||
// interfaceParamDto.setApi("ofs.store.search");
|
||||
// interfaceParamDto.setData(JSON.toJSONString(shopEntity));
|
||||
|
@ -85,27 +85,6 @@ public class ShopTest {
|
|||
// List<OfsShopDto> data = unified.getData();
|
||||
// System.out.println("data = " + data);
|
||||
|
||||
//
|
||||
// OfsSupplierDto shopEntity = new OfsSupplierDto();
|
||||
//// shopEntity.setLastUpdated_start("2021-08-01 00:00:00");
|
||||
// shopEntity.setPageNo("1");
|
||||
// shopEntity.setClientCode("LETS");
|
||||
// shopEntity.setCompanyCode("LETS");
|
||||
// shopEntity.setBizCode("983");
|
||||
// Date currentDate = new Date();
|
||||
//// shopEntity.setLastUpdated_start("2023-07-27 16:06:57");
|
||||
//// shopEntity.setLastUpdated_end("2023-07-28 16:06:57");
|
||||
// InterfaceParamByU8CApiDto interfaceParamDto = new InterfaceParamByU8CApiDto();
|
||||
// interfaceParamDto.setApi("ofs.vendor.search");
|
||||
// interfaceParamDto.setData(JSON.toJSONString(shopEntity));
|
||||
// OfsShopReturnMessageDto unified = null;
|
||||
// try {
|
||||
// unified = (OfsShopReturnMessageDto) ofsUnifiedService.unifiedByU8CApi(interfaceParamDto);
|
||||
// } catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// List<OfsShopDto> data = unified.getData();
|
||||
// System.out.println("data = " + data);
|
||||
|
||||
|
||||
// SupplierEntity supplierEntity = new SupplierEntity();
|
||||
|
@ -122,17 +101,10 @@ public class ShopTest {
|
|||
// } catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
|
||||
// ArrayList<ShopEntity> shopEntities = new ArrayList<>();
|
||||
// ShopEntity shopEntity = new ShopEntity();
|
||||
// shopEntity.setBizCode("intoyou-xhs");
|
||||
// shopEntity.setName("小红书INTO YOU心慕与你旗舰店-自营1test1a1231");
|
||||
// shopEntity.setCustomerCode("testcode211232411");
|
||||
// shopEntities.add(shopEntity);
|
||||
// shopPluginInitializer.implement(shopEntities);
|
||||
// System.out.println("shopEntities = " + shopEntities);
|
||||
//
|
||||
|
||||
////
|
||||
|
||||
// try {
|
||||
// System.out.println("开始推送");
|
||||
// //分配给所有公司
|
||||
|
@ -171,21 +143,22 @@ public class ShopTest {
|
|||
|
||||
// custdocAutoAllotPluginInitializer.start();
|
||||
|
||||
|
||||
shopPluginInitializer.startImplement("test11123");
|
||||
// supplierPluginInitializer.startImplement("test1234");
|
||||
//
|
||||
// OfsShopDto shopEntity = new OfsShopDto();
|
||||
//// shopEntity.setLastUpdated_start("2021-08-01 00:00:00");
|
||||
// shopEntity.setPageNo("1");
|
||||
// shopEntity.setPageSize("500");
|
||||
// shopEntity.setClientCode("LETS");
|
||||
// shopEntity.setBizCode("test123");
|
||||
// Date currentDate = new Date();
|
||||
// Date startTime = DateUtil.offset(currentDate, DateField.MINUTE, -10);
|
||||
// Date endTime = DateUtil.offset(currentDate, DateField.MINUTE, -2);
|
||||
// String startTimeStr = DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss");
|
||||
// String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
|
||||
// shopEntity.setLastUpdated_start("2024-03-10 16:06:57");
|
||||
// shopEntity.setLastUpdated_end("2024-03-12 16:06:57");
|
||||
// shopEntity.setBizCode("test123");
|
||||
// shopEntity.setBizCode("test1234");
|
||||
//// Date currentDate = new Date();
|
||||
//// Date startTime = DateUtil.offset(currentDate, DateField.MINUTE, -10);
|
||||
//// Date endTime = DateUtil.offset(currentDate, DateField.MINUTE, -2);
|
||||
//// String startTimeStr = DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss");
|
||||
//// String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
|
||||
//// shopEntity.setLastUpdated_start("2024-03-10 16:06:57");
|
||||
//// shopEntity.setLastUpdated_end("2024-03-12 16:06:57");
|
||||
// InterfaceParamByU8CApiDto interfaceParamDto = new InterfaceParamByU8CApiDto();
|
||||
// interfaceParamDto.setApi("ofs.store.search");
|
||||
// interfaceParamDto.setData(JSON.toJSONString(shopEntity));
|
||||
|
@ -196,25 +169,25 @@ public class ShopTest {
|
|||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// List<OfsShopDto> data = unified.getData();
|
||||
// shopPluginInitializer.implement(data);
|
||||
//
|
||||
OfsSupplierDto shopEntity = new OfsSupplierDto();
|
||||
// shopEntity.setLastUpdated_start("2021-08-01 00:00:00");
|
||||
shopEntity.setPageNo("1");
|
||||
shopEntity.setClientCode("LETS");
|
||||
shopEntity.setCompanyCode("LETS");
|
||||
// shopEntity.setBizCode("test1234");
|
||||
InterfaceParamByU8CApiDto interfaceParamDto = new InterfaceParamByU8CApiDto();
|
||||
interfaceParamDto.setApi("ofs.vendor.search");
|
||||
interfaceParamDto.setData(JSON.toJSONString(shopEntity));
|
||||
OfsSupplierReturnMessageDto unified = null;
|
||||
try {
|
||||
unified = (OfsSupplierReturnMessageDto) ofsUnifiedService.unifiedByU8CApi(interfaceParamDto);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
List<OfsSupplierDto> data = unified.getData();
|
||||
// shopPluginInitializer.startImplement();
|
||||
|
||||
// OfsSupplierDto shopEntity = new OfsSupplierDto();
|
||||
//// shopEntity.setLastUpdated_start("2021-08-01 00:00:00");
|
||||
// shopEntity.setPageNo("1");
|
||||
// shopEntity.setClientCode("LETS");
|
||||
//// shopEntity.setCompanyCode("LETS");
|
||||
//// shopEntity.setBizCode("test1234");
|
||||
// InterfaceParamByU8CApiDto interfaceParamDto = new InterfaceParamByU8CApiDto();
|
||||
// interfaceParamDto.setApi("ofs.vendor.search");
|
||||
// interfaceParamDto.setData(JSON.toJSONString(shopEntity));
|
||||
// OfsSupplierReturnMessageDto unified = null;
|
||||
// try {
|
||||
// unified = (OfsSupplierReturnMessageDto) ofsUnifiedService.unifiedByU8CApi(interfaceParamDto);
|
||||
// } catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// List<OfsSupplierDto> data = unified.getData();
|
||||
//
|
||||
// supplierPluginInitializer.implement(data);
|
||||
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ public class OfsShopDto {
|
|||
// 货主编码
|
||||
private String companyCode;
|
||||
private Integer status;
|
||||
//业务类型 TOB C
|
||||
private String business;
|
||||
|
||||
|
||||
private String created;
|
||||
|
|
Loading…
Reference in New Issue