|
|
@ -390,7 +390,7 @@ public class ItemAccountsServiceImpl implements ItemAccountsService { |
|
|
|
errorList.add(convert); |
|
|
|
} |
|
|
|
ItemAccountsDO itemAccountsDO = validateItemAndTypeAndLocation(item.getItemNumber(), item.getType(), item.getLocationNumber());//查询重复数据
|
|
|
|
if(mode != 2){// 如果存在,判断是否允许更新
|
|
|
|
if(mode != 2 && itemAccountsDO!=null){// 如果存在,判断是否允许更新
|
|
|
|
ItemAccountsDO itemAccountsDO1 = ItemAccountsConvert.INSTANCE.convert1(item); |
|
|
|
itemAccountsDO1.setId(itemAccountsDO.getId()); |
|
|
|
//itemAccountsMapper.updateById(itemAccountsDO1);
|
|
|
@ -434,6 +434,7 @@ public class ItemAccountsServiceImpl implements ItemAccountsService { |
|
|
|
transactionCreateReqVO.setOperator(null); |
|
|
|
transactionCreateReqVO.setCreator(getLoginUserId().toString()); |
|
|
|
transactionCreateReqVO.setAssociatedNumber(null); |
|
|
|
transactionCreateReqVO.setType(item.getType()); |
|
|
|
if(itemAccountsDO1.getType().equals(ItemAccountStatusEnum.NEW.getCode())){//新到货
|
|
|
|
transactionCreateReqVO.setInventoryAction(TransactionEnum.NEW_IN.getCode()); |
|
|
|
transactionCreateReqVO.setDescribes("备件导入新到货入库");//描述
|
|
|
@ -446,10 +447,10 @@ public class ItemAccountsServiceImpl implements ItemAccountsService { |
|
|
|
transactionCreateReqVO.setInventoryAction(TransactionEnum.IN_IN.getCode()); |
|
|
|
transactionCreateReqVO.setDescribes("备件导入账外入库");//描述
|
|
|
|
} |
|
|
|
transactionCreateReqVO.setType(itemAccountsDO1.getType()); |
|
|
|
//transactionCreateReqVO.setType(itemAccountsDO1.getType());
|
|
|
|
list.add(transactionCreateReqVO); |
|
|
|
} |
|
|
|
transactionService.create(list); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
ItemAccountsErrorVO convert = ItemAccountsConvert.INSTANCE.convert(item); |
|
|
|
convert.setImportStatus("失败"); |
|
|
@ -461,6 +462,7 @@ public class ItemAccountsServiceImpl implements ItemAccountsService { |
|
|
|
if(!errorList.isEmpty() && !updatePart) { |
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//不需要捕获异常
|
|
|
|
} |
|
|
|
transactionService.create(list); |
|
|
|
return errorList; |
|
|
|
} |
|
|
|
|
|
|
|