parent
ea109c3b39
commit
5c8481ef33
|
@ -100,7 +100,7 @@ public class GenericEventConsumer {
|
||||||
//获取用户详情
|
//获取用户详情
|
||||||
String userRes = getUserById(String.valueOf(userIds.get(i)));
|
String userRes = getUserById(String.valueOf(userIds.get(i)));
|
||||||
//保存钉钉用户到mdm
|
//保存钉钉用户到mdm
|
||||||
String userMdmRes = createUser(userRes);
|
String userMdmRes = createUser(userRes,eventType);
|
||||||
}
|
}
|
||||||
}else if ("dept".equals(type)){
|
}else if ("dept".equals(type)){
|
||||||
JSONArray deptIdArr = bizData.getJSONArray("deptId");
|
JSONArray deptIdArr = bizData.getJSONArray("deptId");
|
||||||
|
@ -153,14 +153,15 @@ public class GenericEventConsumer {
|
||||||
}
|
}
|
||||||
|
|
||||||
//保存用户到mdm
|
//保存用户到mdm
|
||||||
private static String createUser(String userRes) {
|
private static String createUser(String userRes,String eventType) {
|
||||||
JsonResultEntity jsonResult = JSONObject.parseObject(userRes,JsonResultEntity.class);
|
JsonResultEntity jsonResult = JSONObject.parseObject(userRes,JsonResultEntity.class);
|
||||||
if (jsonResult.isFlag()){
|
if (jsonResult.isFlag()){
|
||||||
shade.com.alibaba.fastjson2.JSONObject attribute = (shade.com.alibaba.fastjson2.JSONObject) jsonResult.getAttribute();
|
shade.com.alibaba.fastjson2.JSONObject attribute = (shade.com.alibaba.fastjson2.JSONObject) jsonResult.getAttribute();
|
||||||
String attrStr = attribute.toString();
|
String attrStr = attribute.toString();
|
||||||
OapiV2UserGetResponse rsp = JSONObject.parseObject(attrStr, OapiV2UserGetResponse.class);
|
OapiV2UserGetResponse rsp = JSONObject.parseObject(attrStr, OapiV2UserGetResponse.class);
|
||||||
if (rsp.isSuccess()){
|
if (rsp.isSuccess()){
|
||||||
OapiV2UserGetResponse.UserGetResponse userInfo = rsp.getResult();
|
String result = attribute.getString("result");
|
||||||
|
OapiV2UserGetResponse.UserGetResponse userInfo = com.alibaba.fastjson.JSONObject.parseObject(result,OapiV2UserGetResponse.UserGetResponse.class);
|
||||||
//OapiV2UserGetResponse.UserGetResponse userInfo = dingtalkService.getUserById(userIds.getString(i));
|
//OapiV2UserGetResponse.UserGetResponse userInfo = dingtalkService.getUserById(userIds.getString(i));
|
||||||
Map<String,Object> mdmMap = new LinkedHashMap<>();
|
Map<String,Object> mdmMap = new LinkedHashMap<>();
|
||||||
mdmMap.put("mdmCode",DDUSERMDMCODE);
|
mdmMap.put("mdmCode",DDUSERMDMCODE);
|
||||||
|
@ -175,6 +176,8 @@ public class GenericEventConsumer {
|
||||||
userMap.put("title",userInfo.getTitle());
|
userMap.put("title",userInfo.getTitle());
|
||||||
userMap.put("email",userInfo.getEmail());
|
userMap.put("email",userInfo.getEmail());
|
||||||
userMap.put("org_email",userInfo.getOrgEmail());
|
userMap.put("org_email",userInfo.getOrgEmail());
|
||||||
|
userMap.put("event_type",eventType);
|
||||||
|
userMap.put("dept_id_list",userInfo.getDeptIdList());
|
||||||
if (null != userInfo.getHiredDate()){
|
if (null != userInfo.getHiredDate()){
|
||||||
userMap.put("hired_date", DateUtil.date(userInfo.getHiredDate()));
|
userMap.put("hired_date", DateUtil.date(userInfo.getHiredDate()));
|
||||||
}
|
}
|
||||||
|
@ -203,8 +206,6 @@ public class GenericEventConsumer {
|
||||||
JsonResultEntity jsonResult = JSONObject.parseObject(deptRes,JsonResultEntity.class);
|
JsonResultEntity jsonResult = JSONObject.parseObject(deptRes,JsonResultEntity.class);
|
||||||
if (jsonResult.isFlag()){
|
if (jsonResult.isFlag()){
|
||||||
shade.com.alibaba.fastjson2.JSONObject attribute = (shade.com.alibaba.fastjson2.JSONObject) jsonResult.getAttribute();
|
shade.com.alibaba.fastjson2.JSONObject attribute = (shade.com.alibaba.fastjson2.JSONObject) jsonResult.getAttribute();
|
||||||
String attrStr = attribute.toString();
|
|
||||||
OapiV2DepartmentGetResponse rsp = JSONObject.parseObject(attrStr,OapiV2DepartmentGetResponse.class);
|
|
||||||
String result = attribute.getString("result");
|
String result = attribute.getString("result");
|
||||||
OapiV2DepartmentGetResponse.DeptGetResponse deptInfo = com.alibaba.fastjson.JSONObject.parseObject(result,OapiV2DepartmentGetResponse.DeptGetResponse.class);
|
OapiV2DepartmentGetResponse.DeptGetResponse deptInfo = com.alibaba.fastjson.JSONObject.parseObject(result,OapiV2DepartmentGetResponse.DeptGetResponse.class);
|
||||||
//OapiV2DepartmentGetResponse.DeptGetResponse deptInfo = dingtalkService.getDeptById(deptIdArr.getLong(i));
|
//OapiV2DepartmentGetResponse.DeptGetResponse deptInfo = dingtalkService.getDeptById(deptIdArr.getLong(i));
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class DeliveryOrderPluginServiceImpl extends KjsPluginBaseService impleme
|
||||||
DeliveryOrderDTO deliveryOrderDTO = DeliveryMapper.INSTANCE.deliveryEntityToDto(order);
|
DeliveryOrderDTO deliveryOrderDTO = DeliveryMapper.INSTANCE.deliveryEntityToDto(order);
|
||||||
//发货单表体entity转dto
|
//发货单表体entity转dto
|
||||||
List<DeliveryDetailDTO> deliveryDetailList = DeliveryMapper.INSTANCE.deliveryDetailListToDto(detailList);
|
List<DeliveryDetailDTO> deliveryDetailList = DeliveryMapper.INSTANCE.deliveryDetailListToDto(detailList);
|
||||||
deliveryOrderDTO.setItesm(deliveryDetailList);
|
deliveryOrderDTO.setItems(deliveryDetailList);
|
||||||
String reqParams = JSONObject.toJSONString(deliveryOrderDTO);
|
String reqParams = JSONObject.toJSONString(deliveryOrderDTO);
|
||||||
logger.info("发货单请求参数:{}",reqParams);
|
logger.info("发货单请求参数:{}",reqParams);
|
||||||
//调用wms接口
|
//调用wms接口
|
||||||
|
|
|
@ -51,6 +51,7 @@ public class KjsPluginBaseService {
|
||||||
taskLivingDetailsService.saveLogToFail(taskLivingDetail);
|
taskLivingDetailsService.saveLogToFail(taskLivingDetail);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
taskLivingDetail.setId(integration_task_living_details_id);
|
||||||
if (flag){
|
if (flag){
|
||||||
//如果是重试 成功调这个方法
|
//如果是重试 成功调这个方法
|
||||||
taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
|
taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
|
||||||
|
|
|
@ -75,8 +75,10 @@ public class MomOrderPluginServiceImpl extends KjsPluginBaseService implements I
|
||||||
//查询生产订单明细表
|
//查询生产订单明细表
|
||||||
MomOrderDetailEntity detailEntity = new MomOrderDetailEntity();
|
MomOrderDetailEntity detailEntity = new MomOrderDetailEntity();
|
||||||
detailEntity.setMoId(order.getMoId());
|
detailEntity.setMoId(order.getMoId());
|
||||||
detailEntity.setStartTime(startTime);
|
if (StrUtil.isEmpty(id)){
|
||||||
detailEntity.setEndTime(endTime);
|
detailEntity.setStartTime(startTime);
|
||||||
|
detailEntity.setEndTime(endTime);
|
||||||
|
}
|
||||||
detailEntity.setDataSourceCode(datasourceCode);
|
detailEntity.setDataSourceCode(datasourceCode);
|
||||||
List<MomOrderDetailEntity> detailList = momOrderDetailService.query(detailEntity);
|
List<MomOrderDetailEntity> detailList = momOrderDetailService.query(detailEntity);
|
||||||
//表头转换dto
|
//表头转换dto
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class DeliveryOrderDTO {
|
||||||
private String cmemo;
|
private String cmemo;
|
||||||
//子表
|
//子表
|
||||||
@JSONField(ordinal = 12)
|
@JSONField(ordinal = 12)
|
||||||
private List<DeliveryDetailDTO> itesm;
|
private List<DeliveryDetailDTO> items;
|
||||||
|
|
||||||
public String getDlid() {
|
public String getDlid() {
|
||||||
return dlid;
|
return dlid;
|
||||||
|
@ -145,11 +145,11 @@ public class DeliveryOrderDTO {
|
||||||
this.cmemo = cmemo;
|
this.cmemo = cmemo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DeliveryDetailDTO> getItesm() {
|
public List<DeliveryDetailDTO> getItems() {
|
||||||
return itesm;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItesm(List<DeliveryDetailDTO> itesm) {
|
public void setItems(List<DeliveryDetailDTO> items) {
|
||||||
this.itesm = itesm;
|
this.items = items;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue