| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.consum.base.core.WhBusinessEnum; |
| | | import com.consum.model.po.LWhProcureModel; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @ClassName LWhProcureModelService |
| | | * @Author cy |
| | | * @Date 2023/10/24 |
| | | * @Description |
| | | * @Version 1.0 |
| | | **/ |
| | | @Service |
| | | public class LWhProcureModelService extends BaseServiceImpl { |
| | | import com.consum.base.core.WhBusinessEnum; |
| | | import com.consum.base.pojo.dto.GoodModelInfoDTO; |
| | | import com.consum.base.pojo.response.GoodsTemplateCountVO; |
| | | import com.consum.model.po.LWhProcureModel; |
| | | import com.walker.jdbc.service.BaseService; |
| | | |
| | | private static String GET_MODEL_BY_FORM = "SELECT * FROM L_WH_PROCURE_MODEL WHERE 1=1 "; |
| | | public interface LWhProcureModelService extends BaseService { |
| | | |
| | | List<LWhProcureModel> getModelByForm(WhBusinessEnum businessType, Long businessId); |
| | | |
| | | List<Map<String, Object>> getFfOrderByGoodsIdAndDept(Long goodsTemplateId, Long departmentId); |
| | | |
| | | List<Map<String, Object>> getGoodsUseInfoByFfOrderAndGoodId(Long goodsTemplateId, Long transBusinessId); |
| | | |
| | | /** |
| | | * 通过单据类型 单据ID查询该订单关联的设备型号以及数量 |
| | | * |
| | | * 统计商品型号数量 |
| | | * |
| | | * @param businessId |
| | | * @return |
| | | */ |
| | | public List<LWhProcureModel> getModelByForm(WhBusinessEnum businessType, Long businessId) { |
| | | StringBuilder sql = new StringBuilder(GET_MODEL_BY_FORM); |
| | | HashMap<String, Object> paramts = new HashMap<>(); |
| | | //项目阶段id |
| | | if (businessType != null) { |
| | | sql.append(" and BUSINESS_TYPE=:businessType "); |
| | | paramts.put("businessType", businessType.getValue()); |
| | | } |
| | | if (businessType != null) { |
| | | sql.append(" and BUSINESS_ID=:businessId "); |
| | | paramts.put("businessId", businessId); |
| | | } |
| | | return this.select(sql.toString(), paramts, new LWhProcureModel()); |
| | | } |
| | | List<GoodsTemplateCountVO> getGoodsTemplateCountByBusinessId(Long businessId); |
| | | |
| | | /** |
| | | * 统计采购单物品型号数量 |
| | | * |
| | | * @param businessId |
| | | * @return |
| | | */ |
| | | List<GoodsTemplateCountVO> getProcureCountByBusinessId(Long businessId); |
| | | |
| | | /** |
| | | * 根据业务id查询型号信息列表 |
| | | * |
| | | * @param businessId |
| | | * @param procureGoodId |
| | | * @return |
| | | */ |
| | | List<GoodModelInfoDTO> getGoodsModelListByBusinessId(Long businessId, Long procureGoodId); |
| | | |
| | | List<LWhProcureModel> getModelByForm1(WhBusinessEnum whBusinessEnum, Long whFormProcureId); |
| | | |
| | | |
| | | } |