| | |
| | | import com.whyc.mapper.MaterialMapper; |
| | | import com.whyc.mapper.ProductBomHistoryMapper; |
| | | import com.whyc.mapper.ProductHistoryMapper; |
| | | import com.whyc.mapper.ProductMapper; |
| | | import com.whyc.pojo.*; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.apache.poi.hssf.usermodel.*; |
| | |
| | | //将没有管理BOM的dwg文件拷贝下载 |
| | | fileDirName=fileDirName+File.separator+withOutDwg; |
| | | File start = new File(fileDirName); |
| | | if(!start.exists()) { |
| | | start.mkdir(); |
| | | } |
| | | String[] filePath = start.list();//获取该文件夹下的所有文件名字 |
| | | if(filePath.length>=0){ |
| | | for(String temp : filePath) { |
| | | ProductBomHistory p=new ProductBomHistory(); |
| | | p.setId(-1); |
| | | p.setProductId(productId); |
| | | p.setParentCode(pHistory.getParentModel()); |
| | | p.setVersion(version); |
| | | p.setDwgUrl(withOutDwg+File.separator+temp); |
| | | list.add(p); |
| | | String[] files =new String[]{}; |
| | | if(start.exists()) { |
| | | files= start.list();//获取该文件夹下的所有文件名字 |
| | | if(files.length>=0){ |
| | | for(int i=0;i<files.length;i++) { |
| | | files[i]=withOutDwg+File.separator+files[i]; |
| | | } |
| | | } |
| | | } |
| | | return new Response().setIII(1,list.size()>0?true:false,list,listsoft,"返回物料信息及关联物料"); |
| | | return new Response().setIIII(1,list.size()>0?true:false,list,listsoft,files,"返回物料信息及关联物料"); |
| | | } |
| | | //历史产品下载(产品id和版本<下载的版本>) |
| | | public void downloadProductHistory(HttpServletRequest req, HttpServletResponse resp, int productId, int version) { |
| | |
| | | return bomHis; |
| | | } |
| | | |
| | | public void insertBatch(List<ProductBomHistory> bomHistoryList) { |
| | | mapper.insertBatchSomeColumn(bomHistoryList); |
| | | } |
| | | } |