根据物料型号('-','_'之前的部分)查询物料的历史版本
| | |
| | | public Response getAttachByMaterialId(@RequestParam int materialId){ |
| | | return service.getAttachByMaterialId(materialId); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据物料型号('-','_'之前的部分)查询物料的历史版本",notes = "9.3修改后使用") |
| | | @GetMapping("getMaterialVersion") |
| | | public Response getMaterialVersion(@RequestParam String subModel){ |
| | | return service.getMaterialVersion(subModel); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.whyc.pojo.Material; |
| | | import com.whyc.pojo.ProductBom; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | List<Material> getListByCodeAndModelList2(List<ProductBom> bomList); |
| | | //根据物料id查询返回附件文件夹下所有的文件列表 |
| | | Material getAttachByMaterialId(int materialId); |
| | | ////根据物料型号('-','_'之前的部分)查询物料的历史版本 |
| | | List<Material> getMaterialVersion(@Param("subModel") String subModel); |
| | | } |
| | |
| | | } |
| | | return new Response().setII(1,flag,list,"文件列表返回"); |
| | | } |
| | | //根据物料型号('-','_'之前的部分)查询物料的历史版本 |
| | | public Response getMaterialVersion(String subModel) { |
| | | List list=mapper.getMaterialVersion(subModel); |
| | | return new Response().setII(1,list.size()>0,list,"物料历史版本数据返回"); |
| | | } |
| | | } |
| | |
| | | <select id="getAttachByMaterialId" resultType="com.whyc.pojo.Material"> |
| | | select * from db_doc.tb_material WHERE id = #{materialId} limit 1 |
| | | </select> |
| | | <select id="getMaterialVersion" resultType="material"> |
| | | SELECT distinct * |
| | | FROM db_doc.tb_material WHERE sub_model LIKE '${subModel}%' |
| | | ORDER BY create_date DESC |
| | | </select> |
| | | </mapper> |