| | |
| | | * @return |
| | | */ |
| | | List<PmsProcessBillMaterialsDetail> queryByMaterialNumber(String materialNumber); |
| | | |
| | | /** |
| | | * 物料拉动选择物料使用 |
| | | * 根据热处理毛坯物料查询 |
| | | * @param materialNumber 热处理物料编码 |
| | | * @return |
| | | */ |
| | | List<PmsProcessBillMaterialsDetail> queryByMaterialNumberOnly(String materialNumber); |
| | | } |
| | |
| | | and t1.material_id = t2.id) |
| | | |
| | | </select> |
| | | <select id="queryByMaterialNumberOnly" resultType="org.jeecg.modules.pms.entity.PmsProcessBillMaterialsDetail"> |
| | | select DISTINCT t1.material_number, t1.material_name, t1.production_unit |
| | | from pms_process_bill_materials_detail t1 |
| | | where t1.material_number = #{materialNumber} |
| | | </select> |
| | | </mapper> |
| | |
| | | if (StringUtils.isBlank(materialNumber)) { |
| | | return Collections.emptyList(); |
| | | } |
| | | return this.getBaseMapper().queryByMaterialNumber(materialNumber); |
| | | List<PmsProcessBillMaterialsDetail> list = this.getBaseMapper().queryByMaterialNumber(materialNumber); |
| | | if (CollectionUtil.isEmpty(list)) { |
| | | //如果是热处理,则代表选择排产工单生产的毛坯 |
| | | return this.getBaseMapper().queryByMaterialNumberOnly(materialNumber); |
| | | } |
| | | return list; |
| | | } |
| | | } |