| | |
| | | @Override |
| | | public DataTableEntity getApplyDocument(FieldSetEntity fse) throws BaseException { |
| | | |
| | | DataTableEntity product_oa_document = new DataTableEntity(); |
| | | StringBuilder sb = new StringBuilder(); |
| | | sb.append(" select d.*,f.show_name "); |
| | | sb.append(" from product_oa_document d "); |
| | | sb.append(" left join product_sys_staffs f "); |
| | | sb.append(" on d.created_by=f.user_id "); |
| | | List<String> param = new ArrayList<>(); |
| | | if (!ObjectUtil.isNotEmpty(fse.getString("document_name"))) { |
| | | product_oa_document = baseDao.listTable(sb.toString(), param.toArray()); |
| | | String sub_uuid = fse.getString("sub_uuid"); |
| | | String sub_uuid_replace = sub_uuid.replace("\"", ""); |
| | | String[] sub_uuid_split = sub_uuid_replace.split(","); |
| | | String sub_uuids=""; |
| | | for (int i = 0; i < sub_uuid_split.length; i++) { |
| | | |
| | | } else { |
| | | String document_name = fse.getString("document_name"); |
| | | sb.append(" where d.file_name like '%" + document_name + "%'"); |
| | | product_oa_document = baseDao.listTable(sb.toString(), param.toArray()); |
| | | |
| | | |
| | | if(i==sub_uuid_split.length-1){ |
| | | sub_uuids=sub_uuids+"\""+sub_uuid_split[i]+"\""; |
| | | }else { |
| | | sub_uuids=sub_uuids+"\""+sub_uuid_split[i]+"\","; |
| | | } |
| | | } |
| | | return product_oa_document; |
| | | List<String> param = new ArrayList<>(); |
| | | StringBuilder sb=new StringBuilder(); |
| | | sb.append(" SELECT a.*,f.show_name"); |
| | | sb.append(" FROM product_sys_attachments a "); |
| | | sb.append(" LEFT JOIN product_sys_staffs f "); |
| | | sb.append(" on a.created_by =f.user_id "); |
| | | sb.append(" where a.uuid in ("+sub_uuids+")"); |
| | | DataTableEntity product_sys_attachments = baseDao.listTable(sb.toString(),param.toArray()); |
| | | return product_sys_attachments; |
| | | } |
| | | |
| | | @Override |