Commit 992d1997 by wubh

包活干V1.9.1-修改:大搜车驳回单问题

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@28045 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 3baec909
......@@ -468,8 +468,8 @@ public class DscOrderServiceImpl implements DscOrderService {
*/
private void addRejectedOrderDevice(SysServiceItem serviceItem, Integer origOrderId,
SysOrder newOrder) {
if (newOrder.getOrderType() != BizConstants.ORDER_TYPE_INSTALL) {
// 如果是驳回安装单则不需要插入设备数据
//if (newOrder.getOrderType() != BizConstants.ORDER_TYPE_INSTALL) {
// // 如果是驳回安装单则不需要插入设备数据
List<SysServiceItemDeviceConfig> configList = serviceItemDeviceConfigMapper
.getDeviceConfigList(serviceItem.getId());
for (SysServiceItemDeviceConfig deviceConfig : configList) {
......@@ -491,7 +491,7 @@ public class DscOrderServiceImpl implements DscOrderService {
}
}
}
}
//}
}
/**
......
......@@ -3939,16 +3939,24 @@ public class OrderServiceImpl implements IOrderService {
sysOrderStatus.setRemark(orderDeviceReq.getInstallRemark());
orderStatusMapper.insertSelective(sysOrderStatus);
}
//插入订单设备列表
for (SysOrderDevice sysOrderDevice : orderDeviceList) {
SysOrderDevice orderDevice = new SysOrderDevice();
orderDevice.setOrderId(orderId);
orderDevice.setDeviceNo(sysOrderDevice.getDeviceNo());
orderDevice.setDeviceType(sysOrderDevice.getDeviceType());
orderDevice.setInstallLocation(sysOrderDevice.getInstallLocation());
orderDevice.setSort(sysOrderDevice.getSort());
orderDeviceMapper.insertSelective(orderDevice);
// 如果渠道不为大搜车,则直接插入设备
// 如果渠道是大搜车,并且对应工单只有一个订单,则插入设备
// 如果是大搜车,且工单号对应多个订单(普通安装单和驳回安装单),则不插入设备
if (!BizConstants.DA_SOU_CHE.equalsIgnoreCase(order.getChannel())
|| orderMapper.queryOrderByWorkOrderNo(order.getWorkOrderNo()).size() == 1) {
//插入订单设备列表
for (SysOrderDevice sysOrderDevice : orderDeviceList) {
SysOrderDevice orderDevice = new SysOrderDevice();
orderDevice.setOrderId(orderId);
orderDevice.setDeviceNo(sysOrderDevice.getDeviceNo());
orderDevice.setDeviceType(sysOrderDevice.getDeviceType());
orderDevice.setInstallLocation(sysOrderDevice.getInstallLocation());
orderDevice.setSort(sysOrderDevice.getSort());
orderDeviceMapper.insertSelective(orderDevice);
}
}
//同步设备到渠道(E盾)
ResultObject resultObject = new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg());
if (BizConstants.GLSX_EDUN.equalsIgnoreCase(order.getChannel())
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!