| | |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description 盘点 |
| | |
| | | @Autowired |
| | | private BaseWarehouseServiceImpl baseWarehouseService; |
| | | @Autowired |
| | | private FinSysTenantUserServiceImpl finSysTenantUserService; |
| | | @Autowired |
| | | private LWhFormInventoryGoodsServiceImpl inventoryGoodsService; |
| | | @Autowired |
| | | private BaseGoodsTemplateServiceImpl baseGoodsTemplateService; |
| | | @Autowired |
| | | private LWhGoodsService lWhGoodsService; |
| | | @Autowired |
| | |
| | | } |
| | | |
| | | |
| | | public void saveInventory(FormInventoryVO dto, Long id) { |
| | | public List<FormInventoryGoodsVO> saveInventory(FormInventoryVO dto, Long id) { |
| | | //1.根据盘点单id查询盘点单 |
| | | LWhFormInventory lWhFormInventory = this.get(new LWhFormInventory(id)); |
| | | if (lWhFormInventory == null) { |
| | |
| | | if (CollectionUtils.isEmpty(formInventoryGoodsList)) { |
| | | log.error("盘点单物品为空"); |
| | | } |
| | | int num = inventoryGoodsService.add(formInventoryGoodsList, id); |
| | | if (num != formInventoryGoodsList.size()) { |
| | | log.error("更新盘点单物品失败"); |
| | | } |
| | | List<FormInventoryGoodsVO> result = inventoryGoodsService.add(formInventoryGoodsList, id); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | |
| | | * @author 卢庆阳 |
| | | * @date 2023/10/31 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int updateInventoryInfo(LWhFormInventoryParam dto, Integer state, S_user_core currentUser, FinSysTenantUser sysInfo) { |
| | | //1.根据盘点单id查询盘点单 |
| | | LWhFormInventory lWhFormInventory = this.get(new LWhFormInventory(dto.getId())); |
| | |
| | | log.error("盘点单物品为空"); |
| | | return 0; |
| | | } |
| | | int i = this.inventoryGoodsService.updateInventoryGoods(inventoryGoodsList); |
| | | System.out.println(i); |
| | | this.inventoryGoodsService.updateInventoryGoods(inventoryGoodsList); |
| | | //修改盘点单 |
| | | if (state == 2) { |
| | | //完成盘点时设置完成盘点时间 |
| | |
| | | formInventoryVO.setWarehouseName(inventory.getWarehouseName()); |
| | | |
| | | String sql = |
| | | "select bgm.id,bgt.id baseGoodsTemplateId,bgt.GOODS_NAME goodsTemplateName,bgm.MODEL_NAME baseGoodsModelsName,bgt.CLASSIFICATION type,bgm.UNIT " |
| | | "select bgt.id baseGoodsTemplateId,bgt.GOODS_NAME goodsTemplateName,bgm.MODEL_NAME baseGoodsModelsName,bgt.CLASSIFICATION type,bgm.UNIT " |
| | | + "from base_goods_models bgm left join base_goods_template bgt on bgm.GOODS_TEMPLATES_ID = bgt.id " |
| | | + "where bgt.AGENCY_ID = :agencyId"; |
| | | HashMap<String, Object> param = new HashMap<>(); |