Commit 77261340 by zhengxj

finish 未知订单渠道信息 on 20190423 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@20196 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent bacb891d
...@@ -90,7 +90,7 @@ public class UnknownOrderImpl implements IUnknownOrderService { ...@@ -90,7 +90,7 @@ public class UnknownOrderImpl implements IUnknownOrderService {
// 未知订单:未绑定服务商的订单 // 未知订单:未绑定服务商的订单
Criteria criteria = example.createCriteria().andOrCriteria() Criteria criteria = example.createCriteria().andOrCriteria()
.andActiveStatusNotEqualTo((byte) OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_DELETED.getActiveStatus()) .andActiveStatusNotEqualTo((byte) OrderActiveStatusEnum.ORDER_ACTIVE_STATUS_DELETED.getActiveStatus())
.andChannelIsNotNull().andWorkOrderNoIsNotNull(); .andChannelNotEqualTo("").andWorkOrderNoNotEqualTo("");
example.setOrderByClause("create_time desc"); example.setOrderByClause("create_time desc");
// 订单编号 // 订单编号
if (oueryOrderReq.getOrderSn() != null) { if (oueryOrderReq.getOrderSn() != null) {
...@@ -121,8 +121,8 @@ public class UnknownOrderImpl implements IUnknownOrderService { ...@@ -121,8 +121,8 @@ public class UnknownOrderImpl implements IUnknownOrderService {
if (oueryOrderReq.getOrderChannel() != null) { if (oueryOrderReq.getOrderChannel() != null) {
// //
List<String> channels = sysChannelOrgDao.selectChannel(oueryOrderReq.getOrderChannel()); List<String> channels = sysChannelOrgDao.selectChannel(oueryOrderReq.getOrderChannel());
criteria.andShopIdIsNotNull(); // criteria.andShopIdIsNotNull();
criteria.andMerchantIdIsNull(); // criteria.andMerchantIdIsNull();
if (channels.isEmpty()) { if (channels.isEmpty()) {
logger.info("该渠道id{}下无订单:" + oueryOrderReq.getOrderChannel()); logger.info("该渠道id{}下无订单:" + oueryOrderReq.getOrderChannel());
// 构建互斥条件 // 构建互斥条件
...@@ -139,21 +139,23 @@ public class UnknownOrderImpl implements IUnknownOrderService { ...@@ -139,21 +139,23 @@ public class UnknownOrderImpl implements IUnknownOrderService {
for (SysOrder order : orderList) { for (SysOrder order : orderList) {
// 渠道名称 // 渠道名称
ChannelInfo channelInfo = new ChannelInfo(); ChannelInfo channelInfo = new ChannelInfo();
order.setChannelInfo(channelInfo);
if (oueryOrderReq.getOrderChannel() != null) { if (oueryOrderReq.getOrderChannel() != null) {
int channelId = oueryOrderReq.getOrderChannel(); int channelId = oueryOrderReq.getOrderChannel();
channelInfo.setId(channelId); channelInfo.setId(channelId);
channelInfo.setName(orderChannelDao.selectByPrimaryKey(channelId).getName()); channelInfo.setName(orderChannelDao.selectByPrimaryKey(channelId).getName());
order.setChannelInfo(channelInfo);
} else { } else {
// 根据channel_org关联关系 可得渠道信息 // 根据channel_org关联关系 可得渠道信息
SysChannelOrg channelOrg = new SysChannelOrg(); SysChannelOrg channelOrg = new SysChannelOrg();
channelOrg.setChannel(order.getChannel()); channelOrg.setChannel(order.getChannel());
channelOrg = sysChannelOrgDao.getChannelOrg(channelOrg); channelOrg = sysChannelOrgDao.getChannelOrg(channelOrg);
if (channelOrg.getOrgid() != null) { if (null != channelOrg.getOrgid()) {
SysOrganization SysOrganization = orderChannelDao.selectByPrimaryKey(channelOrg.getOrgid()); SysOrganization SysOrganization = orderChannelDao.selectByPrimaryKey(channelOrg.getOrgid());
if (SysOrganization != null) {
BeanUtils.copyProperties(SysOrganization, channelInfo); BeanUtils.copyProperties(SysOrganization, channelInfo);
} }
} }
}
// 商户名称 // 商户名称
MerchantInfo merchantInfo = new MerchantInfo(); MerchantInfo merchantInfo = new MerchantInfo();
merchantInfo.setName(order.getMerchantName()); merchantInfo.setName(order.getMerchantName());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!