| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public List<ReviseLog> reviseLoc(ReviseLogParams revise, Long loginUserId) { |
| | | LocRevise locRevise = locReviseService.getById(revise.getReviseId()); |
| | | if (Objects.isNull(locRevise)) { |
| | |
| | | BeanUtils.copyProperties(item, reviseLog); |
| | | reviseLog.setAreaId(locRevise.getAreaId()) |
| | | .setReviseId(locRevise.getId()) |
| | | .setCreateBy(loginUserId) |
| | | .setUpdateBy(loginUserId) |
| | | .setReviseCode(locRevise.getCode()) ; |
| | | if (!reviseLogService.save(reviseLog)) { |
| | | throw new RuntimeException("调整单明细保存失败!!"); |
| | | } |
| | | }); |
| | | |
| | | return items; |
| | | } |
| | | } |