| | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.LocalFileUtil; |
| | | import com.vci.ubcs.starter.util.UBCSSqlKeyword; |
| | | import com.vci.ubcs.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.ubcs.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.ubcs.starter.web.enumpck.UserSecretEnum; |
| | |
| | | CodeClassifyTemplateVO templateVO = engineService.getUsedTemplateByClassifyOid(exportAttrDTO.getCodeClassifyOid()); |
| | | //先查询数据 |
| | | String btmTypeId = classifyFullInfo.getTopClassifyVO().getBtmTypeId(); |
| | | Map<String, Object> conditionMap = exportAttrDTO.getConditionMap(); |
| | | Map<String, String> conditionMap = exportAttrDTO.getConditionMap(); |
| | | if(conditionMap == null){ |
| | | conditionMap = new HashMap<>(); |
| | | } |
| | |
| | | conditionMap.put("codeclsfpath","*" + exportAttrDTO.getCodeClassifyOid() + "*"); |
| | | conditionMap.put("lastr", "1"); |
| | | conditionMap.put("lastv", "1"); |
| | | UBCSSqlKeyword.buildSqlwhere(conditionMap); |
| | | |
| | | // 查询出表名 |
| | | |
| | | |
| | | String countSql = "select count(*) from " + VciBaseUtil.getTableName(btmTypeId) +" where 1=1" + |
| | | " and lastr = '1'" + |
| | | " and lastv='1'" + |
| | | " and codeclsfpath like '%" + exportAttrDTO.getCodeClassifyOid() + "%'"; |
| | | |
| | | //先查询总数 |
| | | int total = 0; |
| | | if(exportAttrDTO.getEndPage()!=null && exportAttrDTO.getEndPage()>0 |
| | |
| | | thisPage.setOrder(exportAttrDTO.getOrder()); |
| | | thisPage.addDefaultDesc("createTime"); |
| | | |
| | | total += boService.queryCount(btmTypeId, conditionMap); |
| | | total += commonsMapper.queryCountBySql(countSql); |
| | | } |
| | | }else{ |
| | | |
| | | total=boService.queryCount(btmTypeId, conditionMap); |
| | | total = commonsMapper.queryCountBySql(countSql); |
| | | } |
| | | List<String> selectFieldList = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(exportAttrDTO.getAttrIdIndexMap())){ |
| | |
| | | LocalFileUtil.deleteTempFile(file,true); |
| | | return zipFileName; |
| | | } |
| | | |
| | | private |
| | | |
| | | |
| | | /** |
| | | * 查询数据并导出到excel |