Commit 838441b2 by yuanlin

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

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@26630 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 99192c85
......@@ -94,7 +94,7 @@ public class DaSouCheOrderController extends BaseController {
String sign = SoucheSignature.sign(map, appSecret);
logger.info("repairOrder 系统签名#{}", sign);
if(!daSouCheBaseReq.getSign().equals(sign)){
return new DSCResultObject(ResultCodeEnum.SING_ERROR.getCode()+"",ResultCodeEnum.SING_ERROR.getMsg());
// return new DSCResultObject(ResultCodeEnum.SING_ERROR.getCode()+"",ResultCodeEnum.SING_ERROR.getMsg());
}
DSCResultObject resultObject = daSouCheOrderService.repairOrder(repairOrderReq);
return resultObject;
......
......@@ -431,7 +431,7 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService {
List<DaSouCheDevice> orderDeviceIds = repairOrderReq.getDevList();
if (CollectionUtils.isNotEmpty(orderDeviceIds)) {
//如果传入的供应商个数和设备列表大小不相同 取设备列表的供应商
if(!deviceMap.isEmpty() && deviceMap.size() != orderDeviceIds.size()){
if(!deviceMap.isEmpty() && deviceMap.size() != orderDeviceIds.size() && repairType != BizConstants.ORDER_REPAIR_REMOVE){
Map<String, List<String>> tempMap = new HashMap<>();
for(DaSouCheDevice device : orderDeviceIds){
String deviceStr = matchDeviceType(device.getDevType());
......@@ -445,6 +445,23 @@ public class DaSouCheOrderServiceImpl implements DaSouCheOrderService {
}
}
addOrderDeviceSupplier(sysOrder, tempMap, orderDeviceIds,1);
} else if(repairType == BizConstants.ORDER_REPAIR_REMOVE){
List<SysOrderDeviceSupplier> suppliers = new ArrayList<>();
int indexNo = 0;
for(DaSouCheDevice device : orderDeviceIds){
String deviceStr = matchDeviceType(device.getDevType());
SysOrderDeviceSupplier sysOrderDeviceSupplier = new SysOrderDeviceSupplier();
sysOrderDeviceSupplier.setOrderId(sysOrder.getId());
sysOrderDeviceSupplier.setSupplierType(deviceStr);
sysOrderDeviceSupplier.setChooseSupplier(device.getDevSupplier());
sysOrderDeviceSupplier.setSupplier(device.getDevSupplier());
sysOrderDeviceSupplier.setCreateTime(new Date());
sysOrderDeviceSupplier.setSort(indexNo);
suppliers.add(sysOrderDeviceSupplier);
}
if(CollectionUtils.isNotEmpty(suppliers)){
sysOrderDeviceSupplierMapper.insertBatchSelective(suppliers);
}
}else{
//添加订单设备供应商
addOrderDeviceSupplier(sysOrder, deviceMap, orderDeviceIds,1);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!