| | |
| | | specification.setFileUrl(specificationHttpUrl+File.separator+file1Name); |
| | | specification.setExcelUrl(specificationHttpUrl+File.separator+file2Name); |
| | | specification.setCreateTime(date); |
| | | specification.setUploadUser(ActionUtil.getUser().getName()); |
| | | //锁定-负责人才能解锁 |
| | | specification.setLockFlag(1); |
| | | mapper.insert(specification); |
| | |
| | | for (TechnicalSpecification t:list) { |
| | | TechnicalSpecification enableTe=getEnableVersion(t); |
| | | if(enableTe!=null){ |
| | | if(enableTe.getOwner()!=t.getOwner()){ |
| | | t.setFlag(0); |
| | | }else{ |
| | | if(enableTe.getOwner().equals(t.getOwner())){ |
| | | t.setFlag(1); |
| | | }else{ |
| | | t.setFlag(0); |
| | | } |
| | | }else { |
| | | t.setFlag(1); |
| | |
| | | wrapper.eq("apply_material_code",t.getApplyMaterialCode()); |
| | | wrapper.eq("apply_model",t.getApplyModel()); |
| | | wrapper.eq("apply_custom_code",t.getApplyCustomCode()); |
| | | wrapper.last("limit1"); |
| | | wrapper.last("limit 1"); |
| | | TechnicalSpecification enableTe=mapper.selectOne(wrapper); |
| | | return enableTe; |
| | | } |
| | |
| | | query.eq("apply_custom_code",applyCustomCode); |
| | | } |
| | | List<TechnicalSpecification> list=mapper.selectList(query); |
| | | //标识每条记录适用机型可用的版本的负责人是不是这条记录的负责人 |
| | | if(list!=null&&list.size()>0){ |
| | | for (TechnicalSpecification t:list) { |
| | | TechnicalSpecification enableTe=getEnableVersion(t); |
| | | if(enableTe!=null){ |
| | | if(enableTe.getOwner().equals(t.getOwner())){ |
| | | t.setFlag(1); |
| | | }else{ |
| | | t.setFlag(0); |
| | | } |
| | | }else { |
| | | t.setFlag(1); |
| | | } |
| | | } |
| | | } |
| | | return new Response().setII(1,list!=null,list,"查询指定技术规格书的所有版本"); |
| | | } |
| | | } |