| | |
| | | public Response getMaterialVersion(@RequestParam String subModel){ |
| | | return service.getMaterialVersion(subModel); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据物料id查询物料信息",notes = "9.3修改后使用") |
| | | @GetMapping("getMaterialById") |
| | | public Response getMaterialById(@RequestParam int materialId){ |
| | | return service.getMaterialById(materialId); |
| | | } |
| | | } |
| | |
| | | Material getAttachByMaterialId(int materialId); |
| | | ////根据物料型号('-','_'之前的部分)查询物料的历史版本 |
| | | List<Material> getMaterialVersion(@Param("subModel") String subModel); |
| | | //根据物料id查询物料信息 |
| | | Material getMaterialById(int materialId); |
| | | } |
| | |
| | | List list=mapper.getMaterialVersion(subModel); |
| | | return new Response().setII(1,list.size()>0,list,"物料历史版本数据返回"); |
| | | } |
| | | //根据物料id查询物料信息 |
| | | public Response getMaterialById(int materialId) { |
| | | Material material=mapper.getMaterialById(materialId); |
| | | return new Response().setII(1,material!=null,material,"物料历史版本数据返回"); |
| | | } |
| | | } |
| | |
| | | FROM db_doc.tb_material WHERE sub_model LIKE '${subModel}%' |
| | | ORDER BY create_date DESC |
| | | </select> |
| | | <select id="getMaterialById" resultType="com.whyc.pojo.Material"> |
| | | select * from db_doc.tb_material WHERE id = #{materialId} limit 1 |
| | | </select> |
| | | </mapper> |