店铺,供应商同步到u8c客商
This commit is contained in:
parent
b997373f1f
commit
17af2e3a73
|
@ -214,7 +214,7 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
||||||
// parentvo.setCustprop("0");
|
// parentvo.setCustprop("0");
|
||||||
BdCubasdocEntity.setParentvo(parentvo);
|
BdCubasdocEntity.setParentvo(parentvo);
|
||||||
|
|
||||||
//TODO 同步u8c
|
//同步u8c
|
||||||
HashMap<String, Object> param = new HashMap<>();
|
HashMap<String, Object> param = new HashMap<>();
|
||||||
param.put("cbdocvo", BdCubasdocEntity);
|
param.put("cbdocvo", BdCubasdocEntity);
|
||||||
String jsonString = JSONObject.toJSONString(param);
|
String jsonString = JSONObject.toJSONString(param);
|
||||||
|
@ -228,62 +228,13 @@ public class ShopPluginInitializer extends PluginBaseEntity {
|
||||||
isSuccess = true;
|
isSuccess = true;
|
||||||
taskNumber = cbdocResultVo.getTaskNumber();
|
taskNumber = cbdocResultVo.getTaskNumber();
|
||||||
String data = cbdocResultVo.getData();
|
String data = cbdocResultVo.getData();
|
||||||
// CustdocRequestVo BdCubasdocEntity1 = JSONObject.parseObject(data, CustdocRequestVo.class);
|
|
||||||
// List list = JSONObject.parseObject(data, List.class);
|
|
||||||
// Object o = list.get(0);
|
|
||||||
// CustdocRequestVo BdCubasdocEntity1 = JSONObject.parseObject(JSONObject.toJSONString(o), CustdocRequestVo.class);
|
|
||||||
//
|
|
||||||
// //分配给所有公司
|
|
||||||
// CustDocAssginVo custDocAssginVo = new CustDocAssginVo();
|
|
||||||
// custDocAssginVo.setAssignallcorps("Y");
|
|
||||||
// //分配给所有的公司
|
|
||||||
//// custDocAssginVo.setCustprop("0");
|
|
||||||
// //客户基本档案主键
|
|
||||||
// custDocAssginVo.setPk_cubasdoc(BdCubasdocEntity1.getParentvo().getPk_cubasdoc());
|
|
||||||
// //公司主键
|
|
||||||
//// custDocAssginVo.setPk_corp(BdCubasdocEntity1.getParentvo().getPk_corp());
|
|
||||||
// custDocAssginVo.setCustprop("2");
|
|
||||||
// HashMap<String, Object> assginHashMap = new HashMap<>();
|
|
||||||
// assginHashMap.put("custbasvo", custDocAssginVo);
|
|
||||||
// String assginjsonString = JSONObject.toJSONString(assginHashMap);
|
|
||||||
// String assignresponse = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("custdocAssign"), assginjsonString);
|
|
||||||
// CbdocResultVo cbdocResultVo1 = JSONObject.parseObject(assignresponse, CbdocResultVo.class);
|
|
||||||
// if (!"success".equals(cbdocResultVo1.getStatus())) {
|
|
||||||
// isSuccess = false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
//生成客商管理档案
|
|
||||||
//TODO 设置属性
|
|
||||||
|
|
||||||
//地区名称:丽知商城客商?
|
|
||||||
// parentvo.setPk_areacl("F");
|
|
||||||
//
|
|
||||||
// parentvo.setCustprop(BdCubasdocEntity1.getParentvo().getCustprop());
|
|
||||||
// CustmandocRequestVo custmandocRequestVo = new CustmandocRequestVo();
|
|
||||||
// custmandocRequestVo.setParentvo(parentvo);
|
|
||||||
// BdCumandocEntity BdCumandocEntity = new BdCumandocEntity();
|
|
||||||
// BdCumandocEntity.setCustflag("0");
|
|
||||||
// BdCumandocEntity BdCumandocEntity1 = new BdCumandocEntity();
|
|
||||||
// BdCumandocEntity1.setCustflag("4");
|
|
||||||
// List<BdCumandocEntity> custmandocEntities = new ArrayList<>();
|
|
||||||
// custmandocEntities.add(BdCumandocEntity);
|
|
||||||
// custmandocEntities.add(BdCumandocEntity1);
|
|
||||||
// custmandocRequestVo.setChildrenvo(custmandocEntities);
|
|
||||||
// HashMap<String, Object> mandocparam = new HashMap<>();
|
|
||||||
// mandocparam.put("billvo", custmandocRequestVo);
|
|
||||||
// String mandocjsonString = JSONObject.toJSONString(mandocparam);
|
|
||||||
// String mandocresponse = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("custmandocSave"), mandocjsonString);
|
|
||||||
// CbdocResultVo mandoccbdocResultVo = JSONObject.parseObject(mandocresponse, CbdocResultVo.class);
|
|
||||||
// if (!"success".equals(mandoccbdocResultVo.getStatus())) {
|
|
||||||
// isSuccess = false;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
Assert.state(false, "同步到U8C失败,原因:{} 接口入参:{} {}", JSON.toJSONString(cbdocResultVo), JSON.toJSONString(OverallConstant.getOverAllValue("custdocSave")), JSON.toJSONString(BdCubasdocEntity));
|
Assert.state(false, "同步到U8C失败,原因:{} 接口入参:{} {}", JSON.toJSONString(cbdocResultVo), JSON.toJSONString(OverallConstant.getOverAllValue("custdocSave")), JSON.toJSONString(BdCubasdocEntity));
|
||||||
}
|
}
|
||||||
//TODO 根据返回结果记录日志
|
// 根据返回结果记录日志
|
||||||
//成功
|
//成功
|
||||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
|
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
SupplierEntity supplierEntity = new SupplierEntity();
|
SupplierEntity supplierEntity = new SupplierEntity();
|
||||||
|
|
||||||
//TODO ofs查询店铺信息
|
//TODO ofs查询供应商信息
|
||||||
// List<ShopEntity> query = shopDao.query(shopEntity);
|
// List<ShopEntity> query = shopDao.query(shopEntity);
|
||||||
List<SupplierEntity> query = null;
|
List<SupplierEntity> query = null;
|
||||||
//过滤数据
|
//过滤数据
|
||||||
|
@ -167,6 +167,7 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
shopEntity.setCreated_start(start);
|
shopEntity.setCreated_start(start);
|
||||||
shopEntity.setCreated_end(end);
|
shopEntity.setCreated_end(end);
|
||||||
//TODO ofs查询供应商信息
|
//TODO ofs查询供应商信息
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("丽知:OFS供应商档案--->U8C客商档案,startImplement(String startTime, String endTime)方法报错:", e);
|
logger.error("丽知:OFS供应商档案--->U8C客商档案,startImplement(String startTime, String endTime)方法报错:", e);
|
||||||
}
|
}
|
||||||
|
@ -183,14 +184,14 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
BdCubasdocEntity parentvo = new BdCubasdocEntity();
|
BdCubasdocEntity parentvo = new BdCubasdocEntity();
|
||||||
CustdocRequestVo BdCubasdocEntity = new CustdocRequestVo();
|
CustdocRequestVo BdCubasdocEntity = new CustdocRequestVo();
|
||||||
try {
|
try {
|
||||||
//TODO 设置parentvo
|
//T 设置parentvo
|
||||||
// parentvo.setPk_areacl("");
|
// parentvo.setPk_areacl("");
|
||||||
parentvo.setCustname(supplierEntity.getName());
|
parentvo.setCustname(supplierEntity.getName());
|
||||||
parentvo.setCustshortname(supplierEntity.getName());
|
parentvo.setCustshortname(supplierEntity.getName());
|
||||||
parentvo.setCustcode(supplierEntity.getCompanyCode());
|
parentvo.setCustcode(supplierEntity.getCompanyCode());
|
||||||
|
|
||||||
BdCubasdocEntity.setParentvo(parentvo);
|
BdCubasdocEntity.setParentvo(parentvo);
|
||||||
//TODO 同步u8c
|
// 同步u8c
|
||||||
HashMap<String, Object> param = new HashMap<>();
|
HashMap<String, Object> param = new HashMap<>();
|
||||||
param.put("cbdocvo", BdCubasdocEntity);
|
param.put("cbdocvo", BdCubasdocEntity);
|
||||||
|
|
||||||
|
@ -242,7 +243,7 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
// list.add(BdCumandocEntity1);
|
// list.add(BdCumandocEntity1);
|
||||||
// custmandocRequestVo.setChildrenvo(list);
|
// custmandocRequestVo.setChildrenvo(list);
|
||||||
|
|
||||||
//TODO 设置属性
|
// 设置属性
|
||||||
HashMap<String, Object> mandocparam = new HashMap<>();
|
HashMap<String, Object> mandocparam = new HashMap<>();
|
||||||
mandocparam.put("billvo", custmandocRequestVo);
|
mandocparam.put("billvo", custmandocRequestVo);
|
||||||
String mandocjsonString = JSONObject.toJSONString(mandocparam);
|
String mandocjsonString = JSONObject.toJSONString(mandocparam);
|
||||||
|
@ -255,7 +256,7 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
Assert.state(false, "推送U8C,原因:{} 接口入参:{} {}", JSON.toJSONString(cbdocResultVo), JSON.toJSONString(OverallConstant.getOverAllValue("custdocSave")), JSON.toJSONString(BdCubasdocEntity));
|
Assert.state(false, "推送U8C,原因:{} 接口入参:{} {}", JSON.toJSONString(cbdocResultVo), JSON.toJSONString(OverallConstant.getOverAllValue("custdocSave")), JSON.toJSONString(BdCubasdocEntity));
|
||||||
}
|
}
|
||||||
//TODO 根据返回结果记录日志
|
// 根据返回结果记录日志
|
||||||
//成功
|
//成功
|
||||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||||
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
|
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
|
||||||
|
@ -268,6 +269,7 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||||
//TODO 更新供应商状态
|
//TODO 更新供应商状态
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ import java.util.ArrayList;
|
||||||
* @Date 2024/8/8 9:09
|
* @Date 2024/8/8 9:09
|
||||||
* @PackageName:com.hzya.frame.plugin.lets.plugin.base
|
* @PackageName:com.hzya.frame.plugin.lets.plugin.base
|
||||||
* @ClassName: ShopTest
|
* @ClassName: ShopTest
|
||||||
* @Description: TODO
|
* @Description:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
|
|
Loading…
Reference in New Issue