| | |
| | | import com.consum.base.pojo.response.FormInventoryGoodsVO; |
| | | import com.consum.model.po.LWhFormInventoryGoods; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description 盘点单物品 |
| | |
| | | Integer inventoryCount = inventoryGoods.getInventoryCount(); |
| | | Integer realNum = inventoryGoods.getRealNum(); |
| | | if (realNum != null) { |
| | | int errorCount = realNum - inventoryCount ; |
| | | int errorCount = realNum - inventoryCount; |
| | | lWhFormInventoryGoods.setInventoryCounts(realNum); |
| | | lWhFormInventoryGoods.setErrorCounts(Math.abs(errorCount)); |
| | | //盘点结果(1=正常;2=盘盈;3=盘亏) |
| | | lWhFormInventoryGoods.setInventoryResult((errorCount > 0) ? 2 : (errorCount < 0) ? 3 : 1); |
| | | goodsList.add(lWhFormInventoryGoods); |
| | | // TODO 批量更新 |
| | | this.update(lWhFormInventoryGoods); |
| | | // goodsList.add(lWhFormInventoryGoods); |
| | | } |
| | | |
| | | } |
| | | return this.updateBatch(goodsList); |
| | | return 1; |
| | | } |
| | | |
| | | /** |