| | |
| | | public Response getAttachByMaterialId(@RequestParam int materialId){ |
| | | return service.getAttachByMaterialId(materialId); |
| | | } |
| | | @ApiOperation(value = "根据物料id修改锁定的附件以及原因",notes = "9.3修改后使用") |
| | | @GetMapping("updateAttachRecord") |
| | | public Response updateAttachRecord(@RequestParam int materialId,@RequestParam String lockedFileNames,@RequestParam(required = false) String lockRecords){ |
| | | return service.updateAttachRecord(materialId,lockedFileNames,lockRecords); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据物料型号('-','_'之前的部分)查询物料的历史版本",notes = "9.3修改后使用") |
| | | @GetMapping("getMaterialVersion") |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | |
| | | |
| | | return new Response().set(1,true,"上传完成"); |
| | | } |
| | | //根据物料id修改锁定的附件以及原因 |
| | | public Response updateAttachRecord(int materialId, String lockedFileNames, String lockRecords) { |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.eq("id",materialId); |
| | | wrapper.set("locked_filenames",lockedFileNames); |
| | | if(lockRecords!=null&&!lockRecords.isEmpty()){ |
| | | wrapper.set("lock_records",lockRecords); |
| | | } |
| | | int flag=mapper.update(null,wrapper); |
| | | return new Response().set(1,flag>0,"修改锁定"); |
| | | } |
| | | } |
| | |
| | | <result property="createDate" column="create_date"></result> |
| | | <result property="updateDate" column="update_date"></result> |
| | | <result property="dwgUrl" column="dwg_url"></result> |
| | | <result property="lockedFilenames" column="locked_filenames"></result> |
| | | <result property="lockRecords" column="lock_records"></result> |
| | | <collection property="mproductHistorys" javaType="java.util.ArrayList" ofType="com.whyc.pojo.MaterialProductHistory" column="{id=id}" select="selectMaterialProductHistory"> |
| | | </collection> |
| | | <collection property="products" javaType="java.util.ArrayList" ofType="com.whyc.pojo.Product" column="{id=id}" select="selectMaterialInProduct"> |