| | |
| | | query.eq("lock_flag",lockFlag); |
| | | } |
| | | 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()!=t.getOwner()){ |
| | | t.setFlag(0); |
| | | }else{ |
| | | t.setFlag(1); |
| | | } |
| | | }else { |
| | | t.setFlag(1); |
| | | } |
| | | } |
| | | } |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list!=null,pageInfo,"查询技术规格书"); |
| | | } |
| | | //查询每条记录适用机型可用的版本 |
| | | public TechnicalSpecification getEnableVersion(TechnicalSpecification t){ |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("apply_material_code",t.getApplyMaterialCode()); |
| | | wrapper.eq("apply_model",t.getApplyModel()); |
| | | wrapper.eq("apply_custom_code",t.getApplyCustomCode()); |
| | | wrapper.last("limit1"); |
| | | TechnicalSpecification enableTe=mapper.selectOne(wrapper); |
| | | return enableTe; |
| | | } |
| | | |
| | | //查询指定技术规格书的所有版本 |
| | | public Response getVersionByInfo(String applyMaterialCode, String applyModel, String applyCustomCode) { |
| | | QueryWrapper<TechnicalSpecification> query = Wrappers.query(); |