Commit dd93660e by yuanlin

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

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@26705 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent a26480eb
......@@ -523,7 +523,7 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService {
List<DaSouCheDevice> orderDeviceIds = repairOrderReq.getDevList();
if (CollectionUtils.isNotEmpty(orderDeviceIds)) {
//如果传入的供应商个数和设备列表大小不相同 取设备列表的供应商
if(deviceMap.size() != orderDeviceIds.size() && repairType != BizConstants.ORDER_REPAIR_REMOVE){
if(deviceMap.size() != orderDeviceIds.size() && repairType != BizConstants.ORDER_REPAIR_REMOVE && repairType != BizConstants.ORDER_REPAIR_ADD){
Map<String, List<String>> tempMap = new HashMap<>();
for(DaSouCheDevice device : orderDeviceIds){
String deviceStr = matchDeviceType(device.getDevType());
......@@ -565,6 +565,8 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService {
sysOrderDeviceSupplierMapper.insertBatchSelective(suppliers);
}
}
} else if (repairType == BizConstants.ORDER_REPAIR_ADD){
addOrderDeviceSupplier(sysOrder, deviceMap, orderDeviceIds,2);
}else{
//添加订单设备供应商
addOrderDeviceSupplier(sysOrder, deviceMap, orderDeviceIds,1);
......@@ -869,7 +871,7 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService {
/**
* 添加订单设备供应商
* 0 安装 1 拆除
* 0 安装 1 拆除 2 加装
*/
private void addOrderDeviceSupplier(SysOrder sysOrder, Map<String, List<String>> deviceMap, List<DaSouCheDevice> orderDeviceIds,int type) {
List<SysOrderDeviceSupplier> suppliers = new ArrayList<>();
......@@ -917,7 +919,7 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService {
}
}
}
if (CollectionUtils.isNotEmpty(orderDeviceIds) && CollectionUtils.isNotEmpty(suppliers)) {
if (CollectionUtils.isNotEmpty(orderDeviceIds) && CollectionUtils.isNotEmpty(suppliers) && type != 2) {
for (DaSouCheDevice daSouCheDevice : orderDeviceIds) {
String matchDeviceType = matchDeviceType(daSouCheDevice.getDevType());
for (SysOrderDeviceSupplier sysOrderDeviceSupplier : suppliers) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!