| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.constant.UserOperation; |
| | | import com.whyc.dto.FileDirPath; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.ZipUtils; |
| | | import com.whyc.mapper.ProductBomMapper; |
| | | import com.whyc.pojo.DocUser; |
| | | import com.whyc.pojo.ProductBom; |
| | | import com.whyc.pojo.ProductBomApproving; |
| | | import com.whyc.pojo.ProductBomHistory; |
| | |
| | | |
| | | @Autowired(required = false) |
| | | private ProductBomMapper mapper; |
| | | |
| | | @Autowired |
| | | private DocLogService logService; |
| | | //图纸分类检索 |
| | | public Response searchCadDrawer(ProductBom productBom,int pageCurr,int pageSize) { |
| | | PageHelper.startPage(pageCurr,pageSize); |
| | |
| | | public void downloadCadDrawer(HttpServletRequest req, HttpServletResponse resp, ArrayList<String> pictureUrls) { |
| | | String fileDirName = FileDirPath.getFileDirName(); |
| | | String rootFace=fileDirName+ File.separator+"downLoad"; |
| | | String pictureName=""; |
| | | //将选中的文件存入指定目录下打包下载 |
| | | if(pictureUrls!=null&&pictureUrls.size()>0){ |
| | | for (String picUrl:pictureUrls) { |
| | | pictureName+=picUrl.substring(picUrl.lastIndexOf("\\")+1)+","; |
| | | File sourceFile=new File(fileDirName+ File.separator+picUrl); |
| | | copyFile(sourceFile,rootFace); |
| | | } |
| | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | //记录日志 |
| | | DocUser docUser= ActionUtil.getUser(); |
| | | String operationDetail="具体图纸为:"+pictureName.substring(0,pictureName.lastIndexOf(",")); |
| | | String opreationMsg="执行了文件打包下载操作"; |
| | | String terminalIp=req.getRemoteAddr(); |
| | | logService.recordOperationLog(docUser.getId(),docUser.getName(), UserOperation.TYPE_DOWNLOAD.getType(),new Date(),terminalIp,opreationMsg,operationDetail); |
| | | |
| | | } |
| | | //根据子件code获取最终的信息 |
| | | public Response getBomBySubcode(String scode) { |