| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.consum.base.core.utils.IdUtil; |
| | | import com.consum.base.core.utils.LockManage; |
| | | import com.consum.model.po.LGoodsUserRecord; |
| | | import com.consum.model.po.LWhFormTransfer; |
| | | import com.consum.model.po.LWhProcureModelUser; |
| | | import com.consum.model.po.LWhProcureModelUserRecord; |
| | | import com.walker.infrastructure.utils.NumberGenerator; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName LGoodsUserRecordCoreService |
| | |
| | | // 将所有物品设置为未分发 |
| | | List<Long> srappedGoodsIds = lWhGoodsService.queryScrappedGoodsIds(inWarehouseType, inWarehouseId, transBusinessId, null, null, null, null); |
| | | lWhGoodsService.modGoodsTransfering(srappedGoodsIds, null, null, null, 3); |
| | | // 删除该调拨单旧有使用记录 |
| | | lGoodsUserRecordService.delete(new LGoodsUserRecord(), "where TRANS_BUSINESS_ID =" + transBusinessId, new HashMap<>()); |
| | | // 设置旧的LAST_RECORD= 0 |
| | | lGoodsUserRecordService.updSetNotLast(srappedGoodsIds); |
| | | //插入新的 |
| | |
| | | } |
| | | for (Long toUserGoodsId : toUserGoodsIds) { |
| | | LGoodsUserRecord tmp = new LGoodsUserRecord(); |
| | | tmp.setId(NumberGenerator.getLongSequenceNumber()); |
| | | tmp.setId(IdUtil.generateId()); |
| | | tmp.setWhGoodsId(toUserGoodsId); |
| | | tmp.setRecordType(1); |
| | | tmp.setTransBusinessId(transBusinessId); |
| | |
| | | return true; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(IdUtil.generateId()); |
| | | System.out.println(NumberGenerator.getLongSequenceNumber() ); |
| | | } |
| | | } |