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