添加【根据物料id获取供应商信息】接口
This commit is contained in:
parent
1747b4cf08
commit
523270820b
|
|
@ -3,7 +3,9 @@ package com.nu.modules.pad.invoicing.api;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.*;
|
||||
import com.nu.modules.invoicing.api.IInvoicingApi;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -207,4 +209,15 @@ public class InvoicingApi {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="根据物料id获取供应商信息", notes="根据物料id获取供应商信息")
|
||||
@GetMapping(value = "/getGysListByWlId")
|
||||
public Result<Map<String,Object>> getGysListByWlId(MaterialInfoEntity materialInfoEntity) {
|
||||
if(StringUtils.isEmpty(materialInfoEntity.getWlId())){
|
||||
return Result.error("请选择物料");
|
||||
}
|
||||
Map<String,Object> pageList = invoicingApi.getGysListByWlId(materialInfoEntity);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,4 +48,6 @@ public interface IInvoicingApi {
|
|||
List<Map<String, Object>> getWaringMaterialTreeData(MaterialCategoryEntity configMaterialCategory);
|
||||
|
||||
Map<String, Object> getTreeDataWlnum(MaterialCategoryEntity configMaterialCategory);
|
||||
|
||||
Map<String, Object> getGysListByWlId(MaterialInfoEntity materialInfoEntity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,4 +192,6 @@ public class ConfigMaterialInfo implements Serializable {
|
|||
//综合搜索
|
||||
@TableField(exist = false)
|
||||
private String keyWord;
|
||||
@TableField(exist = false)
|
||||
private String suppliersName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,4 +27,6 @@ public interface ConfigMaterialInfoMapper extends BaseMapper<ConfigMaterialInfo>
|
|||
ConfigMaterialInfo queryWlInfoByWlId(@Param("wlId") String wlId,@Param("nuId") String nuId);
|
||||
|
||||
List<ConfigMaterialInfo> getTreeDataWlnum(@Param(Constants.WRAPPER) QueryWrapper<ConfigMaterialInfo> queryWrapper);
|
||||
|
||||
ConfigMaterialInfo getGysListByWlId(@Param("wlId") String wlId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,4 +65,12 @@
|
|||
left join nu_config_material_info b on b.id = a.wl_id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getGysListByWlId" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo">
|
||||
select a.id,a.suppliers,GROUP_CONCAT(b.suppliers_name) as suppliers_name from nu_config_material_info a
|
||||
left join nu_config_suppliers_info b on FIND_IN_SET(b.id,a.suppliers)
|
||||
where a.id = #{wlId}
|
||||
GROUP BY a.id,a.suppliers
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -558,4 +558,15 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
map.put("totalSize",list.size());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getGysListByWlId(MaterialInfoEntity materialInfoEntity) {
|
||||
ConfigMaterialInfo info = configMaterialInfoMapper.getGysListByWlId(materialInfoEntity.getWlId());
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
if (info != null){
|
||||
map.put("suppliers",info.getSuppliers());
|
||||
map.put("suppliers_dictText",info.getSuppliersName());
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue