|
|
|
@ -710,15 +710,23 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
mtOrderLogEntity.setResBody(result); |
|
|
|
|
mtOrderLogEntity.setType(type); |
|
|
|
|
mtOrderLogEntity.setRefCode(refCode); |
|
|
|
|
mtOrderLogService.save(mtOrderLogEntity); |
|
|
|
|
|
|
|
|
|
//把结果字符串转为json对象
|
|
|
|
|
Integer PUSH_STATUS_SUCCESS = 1; |
|
|
|
|
Integer PUSH_STATUS_FAIL = 2; |
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result); |
|
|
|
|
|
|
|
|
|
if (jsonObject == null || jsonObject.isEmpty() || 0 != jsonObject.getInteger("code")) { |
|
|
|
|
mtOrderLogEntity.setPushStatus(PUSH_STATUS_FAIL); |
|
|
|
|
} else { |
|
|
|
|
mtOrderLogEntity.setPushStatus(PUSH_STATUS_SUCCESS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
mtOrderLogService.save(mtOrderLogEntity); |
|
|
|
|
|
|
|
|
|
if (!Objects.isNull(jsonObject)) { |
|
|
|
|
Integer code = jsonObject.getInteger("Result"); |
|
|
|
|
Integer code = mtOrderLogEntity.getPushStatus(); |
|
|
|
|
String message = jsonObject.getString("Message"); |
|
|
|
|
if (0==code) { |
|
|
|
|
if (PUSH_STATUS_SUCCESS.equals(code)) { |
|
|
|
|
logger.info("##########sendMtFactoryData: 物流状态传递成功"); |
|
|
|
|
return Resp.success("物流状态传递成功"); |
|
|
|
|
} else { |
|
|
|
|