Commit 49ae13ad by yuanlin

提交包活干检修安装拆除审核驳回 finished by yuanlin

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@26601 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 3577fcec
...@@ -264,6 +264,30 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService { ...@@ -264,6 +264,30 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService {
if (num == 1) { if (num == 1) {
recordOrderStatus(order, 4); recordOrderStatus(order, 4);
addRepairRecord(order.getId(), orderList, 5); addRepairRecord(order.getId(), orderList, 5);
Integer originalOrderId = tempOrder.getId();
SysOrderDevice orderDevice = new SysOrderDevice();
orderDevice.setOrderId(originalOrderId);
List<SysOrderDevice> orderDeviceList = sysOrderDeviceMapper.getOrderDeviceList(orderDevice);
for (SysOrderDevice sysOrderDevice : orderDeviceList) {
SysOrderDevice oDevice = new SysOrderDevice();
oDevice.setOrderId(order.getId());
oDevice.setDeviceNo(sysOrderDevice.getDeviceNo());
oDevice.setDeviceType(sysOrderDevice.getDeviceType());
oDevice.setInstallLocation(sysOrderDevice.getInstallLocation());
oDevice.setSort(sysOrderDevice.getSort());
sysOrderDeviceMapper.insertSelective(oDevice);
}
List<SysOrderDeviceSupplier> supplierByOrderId = sysOrderDeviceSupplierMapper.getSupplierByOrderId(originalOrderId);
if(CollectionUtils.isNotEmpty(supplierByOrderId)){
for (SysOrderDeviceSupplier sysOrderDeviceSupplier : supplierByOrderId) {
sysOrderDeviceSupplier.setOrderId(order.getId());
sysOrderDeviceSupplier.setSort(-1);
sysOrderDeviceSupplier.setCreateTime(new Date());
}
sysOrderDeviceSupplierMapper.insertBatchSelective(supplierByOrderId);
}
} }
} }
return new DSCResultObject(ResultCodeEnum.DSC_SUCCESS.getCode() + "", ResultCodeEnum.SUCCESS.getMsg()); return new DSCResultObject(ResultCodeEnum.DSC_SUCCESS.getCode() + "", ResultCodeEnum.SUCCESS.getMsg());
...@@ -388,14 +412,12 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService { ...@@ -388,14 +412,12 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService {
if (repairType == BizConstants.CREATE_ORDER_NO_NORMSAL) { if (repairType == BizConstants.CREATE_ORDER_NO_NORMSAL) {
//增加订单进度 //增加订单进度
recordOrderStatus(sysOrder, BizConstants.CREATE_ORDER_NO_NORMSAL,wireLine,wireLess,tiny); recordOrderStatus(sysOrder, BizConstants.CREATE_ORDER_NO_NORMSAL,wireLine,wireLess,tiny);
//添加设备组合
addSysOrderDevice(sysOrder, repairOrderReq);
} else if (repairType == BizConstants.ORDER_REPAIR_ADD) { } else if (repairType == BizConstants.ORDER_REPAIR_ADD) {
//增加订单进度 //增加订单进度
recordOrderStatus(sysOrder, BizConstants.ORDER_REPAIR_ADD,wireLine,wireLess,tiny); recordOrderStatus(sysOrder, BizConstants.ORDER_REPAIR_ADD,wireLine,wireLess,tiny);
//添加设备组合 加装模式不需要关联原设备
addSysOrderDevice(sysOrder, repairOrderReq);
} }
//添加设备组合
addSysOrderDevice(sysOrder, repairOrderReq);
List<DaSouCheDevice> orderDeviceIds = repairOrderReq.getDevList(); List<DaSouCheDevice> orderDeviceIds = repairOrderReq.getDevList();
if (CollectionUtils.isNotEmpty(orderDeviceIds)) { if (CollectionUtils.isNotEmpty(orderDeviceIds)) {
//添加订单设备供应商 //添加订单设备供应商
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<select id="getSupplierByOrderId" resultMap="BaseResultMap"> <select id="getSupplierByOrderId" resultMap="BaseResultMap">
SELECT id, order_id, supplier, supplier_type, choose_supplier FROM sys_order_device_supplier WHERE order_id=#{order_id} SELECT id, order_id, supplier, supplier_type, choose_supplier FROM sys_order_device_supplier WHERE order_id=#{orderId}
</select> </select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!