Преглед изворни кода

Merge branch 'feature/organization.personcard_code_add' into 'develop'

Feature/organization.personcard code add 通讯录二维码与导出vcf

See merge request o2oa/o2oa!233
胡起 пре 5 година
родитељ
комит
874257599b
12 измењених фајлова са 1094 додато и 4 уклоњено
  1. 22 0
      o2server/x_organization_assemble_control/pom.xml
  2. 2 2
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/PermissionSettingFactory.java
  3. 141 0
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/ActionCreateCode.java
  4. 96 0
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/ActionExportPersonalVcf.java
  5. 174 0
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/ActionExportVcf.java
  6. 159 0
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/ActionPersonCode.java
  7. 0 1
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/BaseAction.java
  8. 219 0
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/CodeUtil.java
  9. 46 0
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/MatrixToImageWriter.java
  10. 68 1
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/PersonCardAction.java
  11. 7 0
      o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/staticconfig/FollowConfig.java
  12. 160 0
      o2server/x_organization_assemble_control/src/main/webapp/describe/describe.json

+ 22 - 0
o2server/x_organization_assemble_control/pom.xml

@@ -20,6 +20,19 @@
 			<groupId>o2oa</groupId>
 			<artifactId>x_organization_core_entity</artifactId>
 		</dependency>
+		<dependency>
+			<groupId>com.google.zxing</groupId>
+			<artifactId>core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.google.zxing</groupId>
+			<artifactId>core</artifactId>
+		</dependency>
+		<dependency>
+		    <groupId>com.google.zxing</groupId>
+		    <artifactId>javase</artifactId>
+		    <version>3.3.0</version>
+		</dependency>
 	</dependencies>
 	<build>
 		<plugins>
@@ -135,4 +148,13 @@
 			</plugin>
 		</plugins>
 	</build>
+	<dependencyManagement>
+		<dependencies>
+		<dependency>
+				<groupId>com.google.zxing</groupId>
+				<artifactId>core</artifactId>
+				<version>3.4.0</version>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
 </project>

+ 2 - 2
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/PermissionSettingFactory.java

@@ -68,7 +68,7 @@ public class PermissionSettingFactory extends AbstractFactory {
 	}
 	
 	private PermissionSetting pickObject(String flag) throws Exception {
-		PermissionSetting o = this.entityManagerContainer().flag(flag, PermissionSetting.class);
+		PermissionSetting o = this.entityManagerContainer().flag(flag, PermissionSetting.class); 
 		if (o != null) {
 			this.entityManagerContainer().get(PermissionSetting.class).detach(o);
 		} else {
@@ -102,7 +102,7 @@ public class PermissionSettingFactory extends AbstractFactory {
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaQuery<String> cq = cb.createQuery(String.class);
 		Root<PermissionSetting> root = cq.from(PermissionSetting.class);
-		cq.select(root.get(PermissionSetting_.id)).orderBy(cb.asc(root.get(PermissionSetting_.createTime)));
+		cq.select(root.get(PermissionSetting_.id)).orderBy(cb.asc(root.get(PermissionSetting_.createTime))); 
 		return em.createQuery(cq).getResultList();
 	}
 	/*

+ 141 - 0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/ActionCreateCode.java

@@ -0,0 +1,141 @@
+package com.x.organization.assemble.control.jaxrs.personcard;
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.imageio.ImageIO;
+import org.apache.commons.lang3.StringUtils;
+
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.MultiFormatWriter;
+import com.google.zxing.common.BitMatrix;
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WoFile;
+import com.x.organization.core.entity.PersonCard;
+
+
+
+
+class ActionCreateCode extends BaseAction {
+
+
+	//个人通讯录生成二维码。
+	ActionResult<Wo> qrcode(EffectivePerson effectivePerson, String flag) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			ActionResult<Wo> result = new ActionResult<>();
+			PersonCard personCard = emc.find(flag, PersonCard.class);
+			if (null == personCard) {
+				throw new ExceptionPersonCardNotExist(flag);
+			}
+			
+			String fname = personCard.getId()+".png";
+			String content = "BEGIN:VCARD\n" +
+	        	    "VERSION:3.0\n" +
+	        	    "N:"+personCard.getName()+"\n";
+	        	    
+			if(!personCard.getOfficePhone().equals("")){
+				content = content+"TEL:"+personCard.getOfficePhone()+"\n";
+			}
+			if(!personCard.getMobile().equals("")){
+				content = content+"TEL;CELL:"+personCard.getMobile()+"\n";
+			}
+			if(!personCard.getAddress().equals("")){
+				content = content+"ADR;HOME;POSTAL:;;"+personCard.getAddress()+";;;;\n";
+			}
+			if(!personCard.getGroupType().equals("")){
+				content = content+"ORG:"+personCard.getGroupType()+"\n";
+				//content = content+"TITLE:"+personCard.getGroupType()+"\n";
+			}
+			if(!personCard.getDescription().equals("")){
+				content = content+"NOTE:"+personCard.getDescription()+"\n";
+			}
+			content = content+"END:VCARD";
+						
+			/*content = "BEGIN:VCARD\n" +
+	        	    "VERSION:1.0\n" +
+	        	    "N:李德伟\n" +
+	        	    "EMAIL:1606841559@qq.com\n" +
+	        	    "TEL:12345678912\n" +
+	        	    "TEL;CELL:12345678913\n" +
+	        	    "ADR;HOME;POSTAL:;;文二路391号;杭州市;浙江省;433330;中国\n" +
+	        	    "ORG:济南\n" +
+	        	    "TITLE:软件工程师\n" +
+	        	    "URL:http://blog.csdn.net/lidew521\n" +
+	        	    "NOTE:呼呼测试下吧。。。\n" +
+	        	    "END:VCARD";*/
+			//getBarCode(content,path);
+			
+			Wo wo = new Wo(getBarCodeWo(content), this.contentType(false, fname), this.contentDisposition(false, fname));
+			result.setData(wo);
+			return result;
+		}
+	}
+	
+	/**
+     *二维码实现
+     * @param msg /二维码包含的信息
+     * @param path /二维码存放路径
+     */
+	public static void getBarCode(String msg,String path){
+	        try {
+	            File file=new File(path);
+	            OutputStream ous=new FileOutputStream(file);
+	            if(StringUtils.isEmpty(msg) || ous==null)
+	                return;
+	            String format = "png";
+	            MultiFormatWriter multiFormatWriter = new MultiFormatWriter();  
+	            Map<EncodeHintType,String> map =new HashMap<EncodeHintType, String>();
+	            //设置编码 EncodeHintType类中可以设置MAX_SIZE, ERROR_CORRECTION,CHARACTER_SET,DATA_MATRIX_SHAPE,AZTEC_LAYERS等参数
+	            map.put(EncodeHintType.CHARACTER_SET,"UTF-8");
+	            map.put(EncodeHintType.MARGIN,"1");
+	            //生成二维码
+	            BitMatrix bitMatrix = new MultiFormatWriter().encode(msg, BarcodeFormat.QR_CODE,300,300,map);
+	            MatrixToImageWriter.writeToStream(bitMatrix,format,ous);
+	        }catch (Exception e) {
+	            e.printStackTrace();
+	        }
+	}
+	
+	/**
+     *二维码实现
+     * @param msg /二维码包含的信息
+     */
+	public static byte[] getBarCodeWo(String msg){
+			byte[] bs = null;
+	        try {
+	            String format = "png";
+	            Map<EncodeHintType,String> map =new HashMap<EncodeHintType, String>();
+	            //设置编码 EncodeHintType类中可以设置MAX_SIZE, ERROR_CORRECTION,CHARACTER_SET,DATA_MATRIX_SHAPE,AZTEC_LAYERS等参数
+	            map.put(EncodeHintType.CHARACTER_SET,"UTF-8");
+	            map.put(EncodeHintType.MARGIN,"1");
+	            //生成二维码
+	            BitMatrix bitMatrix = new MultiFormatWriter().encode(msg, BarcodeFormat.QR_CODE,300,300,map);
+	            BufferedImage image = MatrixToImageWriter.toBufferedImage(bitMatrix);
+				ByteArrayOutputStream out = new ByteArrayOutputStream();
+				ImageIO.write(image, "gif", out);
+				bs = out.toByteArray();
+	            
+	        }catch (Exception e) {
+	            e.printStackTrace();
+	        }
+	        return bs;
+	}
+	 
+	public static class Wo extends WoFile {
+
+		public Wo(byte[] bytes, String contentType, String contentDisposition) {
+			super(bytes, contentType, contentDisposition);
+		}
+
+	}
+
+}

+ 96 - 0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/ActionExportPersonalVcf.java

@@ -0,0 +1,96 @@
+package com.x.organization.assemble.control.jaxrs.personcard;
+
+import java.io.ByteArrayOutputStream;
+
+
+import java.util.Arrays;
+import java.util.List;
+
+
+
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.exception.ExceptionPersonNotExist;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WoFile;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.organization.core.entity.PersonCard;
+
+
+
+class ActionExportPersonalVcf extends BaseAction {
+
+	private static Logger logger = LoggerFactory.getLogger(ActionExportPersonalVcf.class);
+	//导出通讯录vcf
+	ActionResult<Wo> exportPersonalVcf(EffectivePerson effectivePerson, String idList) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			ActionResult<Wo> result = new ActionResult<>();
+			List<String> personIdList = Arrays.asList(idList.split(","));
+			Wo wo = null;
+			if(!personIdList.isEmpty()){
+				ByteArrayOutputStream os = new ByteArrayOutputStream();
+				
+				for (String flag : personIdList) {
+					PersonCard personCard = emc.find(flag, PersonCard.class);
+					if (null == personCard) {
+						throw new ExceptionPersonNotExist(flag);
+					}
+					os.write("BEGIN:VCARD".getBytes());
+					os.write("\r\n".getBytes());
+					os.write("VERSION:3.0".getBytes());
+					os.write("\r\n".getBytes());
+					os.write(("N:"+personCard.getName()+";;;;").getBytes());
+					os.write("\r\n".getBytes());
+					os.write(("FN:"+personCard.getName()).getBytes());
+					os.write("\r\n".getBytes());	    
+					if(personCard.getOfficePhone()!=null && !personCard.getOfficePhone().equals("")){
+						os.write(("TEL:"+personCard.getOfficePhone()).getBytes());
+						os.write(("\r\n").getBytes());
+					}
+					if(personCard.getMobile()!=null && !personCard.getMobile().equals("")){
+						os.write(("TEL;CELL:"+personCard.getMobile()).getBytes());
+						os.write("\r\n".getBytes());
+					}
+					if(personCard.getAddress()!=null && !personCard.getAddress().equals("")){
+						os.write(("ADR;HOME;POSTAL:;;"+personCard.getAddress()).getBytes());
+						os.write("\r\n".getBytes());
+					}
+					if(personCard.getGroupType()!=null && !personCard.getGroupType().equals("")){
+						os.write(("ORG:"+personCard.getGroupType()).getBytes());
+						os.write("\r\n".getBytes());
+					}
+					if(personCard.getDescription()!=null && !personCard.getDescription().equals("")){
+						os.write(("NOTE:"+personCard.getDescription()).getBytes());
+						os.write("\r\n".getBytes());
+					}									
+					os.write("END:VCARD".getBytes());
+					os.write("\r\n".getBytes());
+					
+				}
+				String fileName = "export_personal_contacts"+System.currentTimeMillis()+".vcf";
+				try {
+					wo = new Wo(os.toByteArray(), 
+							this.contentType(false, fileName), 
+							this.contentDisposition(false, fileName));
+				} finally {
+					os.close();
+				}
+				result.setData(wo);
+			}
+
+			return result;
+		}
+	}
+	
+	public static class Wo extends WoFile {
+
+		public Wo(byte[] bytes, String contentType, String contentDisposition) {
+			super(bytes, contentType, contentDisposition);
+		}
+
+	}
+
+}

+ 174 - 0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/ActionExportVcf.java

@@ -0,0 +1,174 @@
+package com.x.organization.assemble.control.jaxrs.personcard;
+
+import java.io.ByteArrayOutputStream;
+import java.util.Arrays;
+import java.util.List;
+
+
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+
+
+import com.google.gson.JsonElement;
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.exception.ExceptionEntityNotExist;
+import com.x.base.core.project.exception.ExceptionPersonNotExist;
+import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WoFile;
+import com.x.base.core.project.jaxrs.WoId;
+import com.x.base.core.project.tools.DateTools;
+import com.x.organization.assemble.control.Business;
+import com.x.organization.assemble.control.jaxrs.personcard.ActionExportPersonalVcf.Wo;
+import com.x.organization.assemble.control.staticconfig.FollowConfig;
+import com.x.organization.core.entity.Identity;
+import com.x.organization.core.entity.Identity_;
+import com.x.organization.core.entity.Person;
+import com.x.organization.core.entity.Unit;
+import com.x.organization.core.entity.UnitDuty;
+import com.x.organization.core.entity.UnitDuty_;
+
+
+
+
+class ActionExportVcf extends BaseAction {
+
+
+	//导出通讯录vcf
+	ActionResult<Wo> exportVcf(EffectivePerson effectivePerson, String idList) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			ActionResult<Wo> result = new ActionResult<>();
+			Business business = new Business(emc);
+			List<String> personIdList = Arrays.asList(idList.split(","));
+			Wo wo = null;
+			if(!personIdList.isEmpty()){
+				ByteArrayOutputStream reader = new ByteArrayOutputStream();
+				
+				for (String flag : personIdList) {
+					Person personCard = emc.find(flag, Person.class);
+					if (null == personCard) {
+						throw new ExceptionPersonNotExist(flag);
+					}
+					reader.write("BEGIN:VCARD".getBytes());
+					reader.write("\r\n".getBytes());
+					reader.write("VERSION:3.0".getBytes());
+					reader.write("\r\n".getBytes());
+					reader.write(("N:"+personCard.getName()+";;;;").getBytes());
+					reader.write("\r\n".getBytes());
+					reader.write(("FN:"+personCard.getName()).getBytes());
+					reader.write("\r\n".getBytes());	    
+					if(personCard.getOfficePhone()!=null && !personCard.getOfficePhone().equals("")){
+						reader.write(("TEL:"+personCard.getOfficePhone()).getBytes());
+						reader.write("\r\n".getBytes());
+					}
+					if(personCard.getMobile()!=null && !personCard.getMobile().equals("")){
+						reader.write(("TEL;CELL:"+personCard.getMobile()).getBytes());
+						reader.write("\r\n".getBytes());
+					}
+					/*if(!personCard.getAddress().equals("")){
+						content = content+"ADR;HOME;POSTAL:;;"+personCard.getAddress()+";;;;\n";
+					}*/
+					if(personCard.getMail()!=null && !personCard.getMail().equals("")){
+						reader.write(("EMAIL:"+personCard.getMail()).getBytes());
+						reader.write("\r\n".getBytes());
+					}
+					if(personCard.getQq()!=null && !personCard.getQq().equals("")){
+						reader.write(("X-QQ:"+personCard.getQq()).getBytes());
+						reader.write("\r\n".getBytes());
+					}
+					if(personCard.getWeixin()!=null && !personCard.getWeixin().equals("")){
+						reader.write(("NOTE:微信:"+personCard.getWeixin()).getBytes());
+						reader.write("\r\n".getBytes());
+					}
+					if(personCard.getBirthday()!=null && !personCard.getBirthday().equals("")){
+						reader.write(("BDAY:"+DateTools.formatDate(personCard.getBirthday())).getBytes());
+						reader.write("\r\n".getBytes());
+					}
+					if(personCard.getId()!=null && !personCard.getId().equals("")){
+						List<Identity> identityList = referenceIdentity(business,flag);
+						if(identityList.isEmpty()){
+							if(!personCard.getTopUnitList().isEmpty()){
+								String TopUnitId = personCard.getTopUnitList().get(0);
+								Unit unit = emc.find(flag, Unit.class);
+								if (null == unit) {
+									throw new ExceptionEntityNotExist(flag);
+								}
+								reader.write(("ORG:"+unit.getName()).getBytes());
+								reader.write("\r\n".getBytes());
+							}
+						}else{
+							String orgString = "";
+							String titleString = "";
+							for (Identity identity : identityList) {
+								orgString = orgString.equals("")?identity.getUnitLevelName():orgString +";"+identity.getUnitLevelName();
+								List<UnitDuty> unitdutyList = referenceUnitduty(business,identity.getId());
+								if(!unitdutyList.isEmpty()){
+									for(UnitDuty unitduty : unitdutyList){
+										if(null != unitduty){
+											titleString = titleString.equals("")?unitduty.getName():titleString +";"+unitduty.getName();
+										}
+									}
+								}
+							}
+							if(!orgString.equals("")){
+								reader.write(("ORG:"+orgString).getBytes());
+								reader.write("\r\n".getBytes());
+							}
+							if(!titleString.equals("")){
+								reader.write(("TITLE:"+titleString).getBytes());
+								reader.write("\r\n".getBytes());
+							}
+						}	
+					}
+					
+					reader.write("END:VCARD".getBytes());
+					reader.write("\r\n".getBytes());
+					
+				}
+				String fileName = "export_person_contacts"+System.currentTimeMillis()+".vcf";
+				try {
+					wo = new Wo(reader.toByteArray(), 
+							this.contentType(false, fileName), 
+							this.contentDisposition(false, fileName));
+				} finally {
+					reader.close();
+				}
+				result.setData(wo);
+			}
+
+			return result;
+		}
+	}
+	
+	public static class Wo extends WoFile {
+
+		public Wo(byte[] bytes, String contentType, String contentDisposition) {
+			super(bytes, contentType, contentDisposition);
+		}
+
+	}
+	
+	public List<Identity> referenceIdentity(Business business,String flag) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Identity.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Identity> cq = cb.createQuery(Identity.class);
+		Root<Identity> root = cq.from(Identity.class);
+		Predicate p = cb.equal(root.get(Identity_.person), flag);
+		return em.createQuery(cq.select(root).where(p)).getResultList();
+	}
+	public List<UnitDuty> referenceUnitduty(Business business,String flag) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(UnitDuty.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<UnitDuty> cq = cb.createQuery(UnitDuty.class);
+		Root<UnitDuty> root = cq.from(UnitDuty.class);
+		Predicate p = cb.isMember(flag, root.get(UnitDuty_.identityList));
+		return em.createQuery(cq.select(root).where(p)).getResultList();
+	}
+
+}

+ 159 - 0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/ActionPersonCode.java

@@ -0,0 +1,159 @@
+package com.x.organization.assemble.control.jaxrs.personcard;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.util.List;
+
+import java.awt.image.BufferedImage;
+import javax.imageio.ImageIO;
+
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.exception.ExceptionEntityNotExist;
+import com.x.base.core.project.exception.ExceptionPersonNotExist;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WoFile;
+import com.x.base.core.project.jaxrs.WoId;
+import com.x.base.core.project.tools.DateTools;
+import com.x.organization.assemble.control.Business;
+import com.x.organization.assemble.control.jaxrs.personcard.ActionCreateCode.Wo;
+import com.x.organization.assemble.control.staticconfig.FollowConfig;
+import com.x.organization.core.entity.Identity;
+import com.x.organization.core.entity.Identity_;
+import com.x.organization.core.entity.Person;
+import com.x.organization.core.entity.Unit;
+import com.x.organization.core.entity.UnitDuty;
+import com.x.organization.core.entity.UnitDuty_;
+
+import sun.misc.BASE64Decoder;
+
+
+
+
+class ActionPersonCode extends BaseAction {
+
+	//组织里管理_个人生成二维码。
+	ActionResult<Wo> personcode(EffectivePerson effectivePerson, String flag) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			ActionResult<Wo> result = new ActionResult<>();
+			Business business = new Business(emc);
+			Person personCard = emc.find(flag, Person.class);
+			if (null == personCard) {
+				throw new ExceptionPersonNotExist(flag);
+			}
+			
+			String fname = personCard.getId()+".png";
+			String content = "BEGIN:VCARD\n" +
+	        	    "VERSION:3.0\n" +
+	        	    "N:"+personCard.getName()+"\n";
+	        	    
+			if(personCard.getOfficePhone()!=null && !personCard.getOfficePhone().equals("")){
+				content = content+"TEL:"+personCard.getOfficePhone()+"\n";
+			}
+			if(personCard.getMobile()!=null && !personCard.getMobile().equals("")){
+				content = content+"TEL;CELL:"+personCard.getMobile()+"\n";
+			}
+			/*if(!personCard.getAddress().equals("")){
+				content = content+"ADR;HOME;POSTAL:;;"+personCard.getAddress()+";;;;\n";
+			}*/
+			if(personCard.getMail()!=null && !personCard.getMail().equals("")){
+				content = content+"EMAIL:"+personCard.getMail()+"\n";
+			}
+			if(personCard.getQq()!=null && !personCard.getQq().equals("")){
+				content = content+"X-QQ:"+personCard.getQq()+"\n";
+			}
+			if(personCard.getWeixin()!=null && !personCard.getWeixin().equals("")){
+				content = content+"NOTE:微信:"+personCard.getWeixin()+"\n";
+			}
+			if(personCard.getBirthday()!=null && !personCard.getBirthday().equals("")){
+				content = content+"BDAY:"+DateTools.formatDate(personCard.getBirthday())+"\n";
+			}
+			if(personCard.getId()!=null && !personCard.getId().equals("")){
+				List<Identity> identityList = referenceIdentity(business,flag);
+				if(identityList.isEmpty()){
+					if(!personCard.getTopUnitList().isEmpty()){
+						String TopUnitId = personCard.getTopUnitList().get(0);
+						Unit unit = emc.find(flag, Unit.class);
+						if (null == unit) {
+							throw new ExceptionEntityNotExist(flag);
+						}
+						content = content+"ORG:"+unit.getName()+"\n";
+					}
+				}else{
+					String orgString = "";
+					String titleString = "";
+					for (Identity identity : identityList) {
+						orgString = orgString.equals("")?identity.getUnitLevelName():orgString +";"+identity.getUnitLevelName();
+						List<UnitDuty> unitdutyList = referenceUnitduty(business,identity.getId());
+						if(!unitdutyList.isEmpty()){
+							for(UnitDuty unitduty : unitdutyList){
+								if(null != unitduty){
+									titleString = titleString.equals("")?unitduty.getName():titleString +";"+unitduty.getName();
+								}
+							}
+						}
+					}
+					if(!orgString.equals("")){
+						content = content+"ORG:"+orgString+"\n";
+					}
+					if(!titleString.equals("")){
+						content = content+"TITLE:"+titleString+"\n";
+					}
+				}	
+			}
+			 
+			content = content+"END:VCARD";
+			/*
+			File logoFile = null;
+			if(personCard.getIconMdpi()!=null && !personCard.getIconMdpi().equals("")){
+				logoFile = CodeUtil.decoderBase64File(logopath,personCard.getIconMdpi());
+			}
+			
+			 File QrCodeFile = new File(path);
+			CodeUtil.drawLogoQRCode(logoFile, QrCodeFile, content, "");*/
+			
+			BufferedImage logoFile = null;
+			ByteArrayOutputStream QrCodeFile = new ByteArrayOutputStream();
+			if(personCard.getIconMdpi()!=null && !personCard.getIconMdpi().equals("")){
+				byte[] buffer = new BASE64Decoder().decodeBuffer(personCard.getIconMdpi());  
+				ByteArrayInputStream in = new ByteArrayInputStream(buffer);    //将b作为输入流;
+				logoFile = ImageIO.read(in);     //将in作为输入流,读取图片存入image中,而这里in可以为ByteArrayInputStream();
+			}
+			Wo wo = new Wo(CodeUtil.drawLogoQRCodeByte(logoFile, QrCodeFile, content, ""), this.contentType(false, fname), this.contentDisposition(false, fname));
+			result.setData(wo);
+			return result;
+		}
+	}
+	 
+	public static class Wo extends WoFile {
+		public Wo(byte[] bytes, String contentType, String contentDisposition) {
+			super(bytes, contentType, contentDisposition);
+		}
+	}
+	
+	public List<Identity> referenceIdentity(Business business,String flag) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(Identity.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Identity> cq = cb.createQuery(Identity.class);
+		Root<Identity> root = cq.from(Identity.class);
+		Predicate p = cb.equal(root.get(Identity_.person), flag);
+		return em.createQuery(cq.select(root).where(p)).getResultList();
+	}
+	public List<UnitDuty> referenceUnitduty(Business business,String flag) throws Exception {
+		EntityManager em = business.entityManagerContainer().get(UnitDuty.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<UnitDuty> cq = cb.createQuery(UnitDuty.class);
+		Root<UnitDuty> root = cq.from(UnitDuty.class);
+		Predicate p = cb.isMember(flag, root.get(UnitDuty_.identityList));
+		return em.createQuery(cq.select(root).where(p)).getResultList();
+	}
+
+}

+ 0 - 1
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/BaseAction.java

@@ -20,7 +20,6 @@ abstract class BaseAction extends StandardJaxrsAction {
 
 		private static final long serialVersionUID = 8148720363115902733L;
 	}
-	
 	// 初始化信息
 		public PersonCard initDefaultValue(EffectivePerson effectivePerson, PersonCard personCard,PersonCard newCard) {
 		    //System.out.println("personCard_groupType="+personCard.getStatus());

+ 219 - 0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/CodeUtil.java

@@ -0,0 +1,219 @@
+package com.x.organization.assemble.control.jaxrs.personcard;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+import javax.imageio.ImageIO;
+import sun.misc.BASE64Decoder;
+import org.apache.commons.lang3.StringUtils;
+
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.MultiFormatWriter;
+import com.google.zxing.common.BitMatrix;
+
+
+public class CodeUtil {
+	 private static final int QRCOLOR = 0xFF000000; // 默认是黑色
+	 private static final int BGWHITE = 0xFFFFFFFF; // 背景颜色	 
+	 private static final int WIDTH = 300; // 二维码宽
+	 private static final int HEIGHT = 300; // 二维码高
+	 
+	 /**
+	     *生成带logo的二维码图片
+	     * @param logoFile /logo图片文件
+	     * @param codeFile /二维码图片
+	     * @param qrUrl /二维码存储的信息:vcard格式
+	     * @param note /二维码描述信息
+	     */
+	    public static void drawLogoQRCode(File logoFile, File codeFile, String qrUrl, String note) {
+	        try {
+	            MultiFormatWriter multiFormatWriter = new MultiFormatWriter();
+	            // 参数顺序分别为:编码内容,编码类型,生成图片宽度,生成图片高度,设置参数
+	            BitMatrix bm = multiFormatWriter.encode(qrUrl, BarcodeFormat.QR_CODE, WIDTH, HEIGHT, hints);
+	            BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);
+
+	            // 开始利用二维码数据创建Bitmap图片,分别设为黑(0xFFFFFFFF)白(0xFF000000)两色
+	            for (int x = 0; x < WIDTH; x++) {
+	                for (int y = 0; y < HEIGHT; y++) {
+	                    image.setRGB(x, y, bm.get(x, y) ? QRCOLOR : BGWHITE);
+	                }
+	            }
+
+	            int width = image.getWidth();
+	            int height = image.getHeight();
+	            if (Objects.nonNull(logoFile) && logoFile.exists()) {
+	                // 构建绘图对象
+	                Graphics2D g = image.createGraphics();
+	                // 读取Logo图片
+	                BufferedImage logo = ImageIO.read(logoFile);
+	                // 开始绘制logo图片
+	                g.drawImage(logo, width * 2 / 5, height * 2 / 5, width * 2 / 10, height * 2 / 10, null);
+	                g.dispose();
+	                logo.flush();
+	            }
+
+	            // 自定义文本描述
+	            if (StringUtils.isNotEmpty(note)) {
+	                // 新的图片,把带logo的二维码下面加上文字
+	                BufferedImage outImage = new BufferedImage(400, 445, BufferedImage.TYPE_4BYTE_ABGR);
+	                Graphics2D outg = outImage.createGraphics();
+	                // 画二维码到新的面板
+	                outg.drawImage(image, 0, 0, image.getWidth(), image.getHeight(), null);
+	                // 画文字到新的面板
+	                outg.setColor(Color.BLACK);
+	                outg.setFont(new Font("楷体", Font.BOLD, 30)); // 字体、字型、字号
+	                int strWidth = outg.getFontMetrics().stringWidth(note);
+	                if (strWidth > WIDTH) {
+	                    // //长度过长就截取前面部分
+	                    // 长度过长就换行
+	                    String note1 = note.substring(0, note.length() / 2);
+	                    String note2 = note.substring(note.length() / 2, note.length());
+	                    int strWidth1 = outg.getFontMetrics().stringWidth(note1);
+	                    int strWidth2 = outg.getFontMetrics().stringWidth(note2);
+	                    outg.drawString(note1, 200 - strWidth1 / 2, height + (outImage.getHeight() - height) / 2 + 12);
+	                    BufferedImage outImage2 = new BufferedImage(400, 485, BufferedImage.TYPE_4BYTE_ABGR);
+	                    Graphics2D outg2 = outImage2.createGraphics();
+	                    outg2.drawImage(outImage, 0, 0, outImage.getWidth(), outImage.getHeight(), null);
+	                    outg2.setColor(Color.BLACK);
+	                    outg2.setFont(new Font("宋体", Font.BOLD, 30)); // 字体、字型、字号
+	                    outg2.drawString(note2, 200 - strWidth2 / 2,outImage.getHeight() + (outImage2.getHeight() - outImage.getHeight()) / 2 + 5);
+	                    outg2.dispose();
+	                    outImage2.flush();
+	                    outImage = outImage2;
+	                } else {
+	                    outg.drawString(note, 200 - strWidth / 2, height + (outImage.getHeight() - height) / 2 + 12); // 画文字
+	                }
+	                outg.dispose();
+	                outImage.flush();
+	                image = outImage;
+	            }
+
+	            image.flush();
+
+	            ImageIO.write(image, "png", codeFile); // TODO
+	            if (Objects.nonNull(logoFile) && logoFile.exists()) {
+	            	logoFile.delete();
+	            }
+	        } catch (Exception e) {
+	            e.printStackTrace();
+	        }
+	    }
+	    
+	    /**
+	     *生成带logo的二维码图片
+	     * @param logoFile /logo图片文件
+	     * @param codeFile /二维码图片
+	     * @param qrUrl /二维码存储的信息:vcard格式
+	     * @param note /二维码描述信息
+	     */
+	    public static byte[] drawLogoQRCodeByte(BufferedImage logo, ByteArrayOutputStream codeFile, String qrUrl, String note) {
+	    	byte[] bs = null;
+	        try {
+	            MultiFormatWriter multiFormatWriter = new MultiFormatWriter();
+	            // 参数顺序分别为:编码内容,编码类型,生成图片宽度,生成图片高度,设置参数
+	            BitMatrix bm = multiFormatWriter.encode(qrUrl, BarcodeFormat.QR_CODE, WIDTH, HEIGHT, hints);
+	            BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);
+
+	            // 开始利用二维码数据创建Bitmap图片,分别设为黑(0xFFFFFFFF)白(0xFF000000)两色
+	            for (int x = 0; x < WIDTH; x++) {
+	                for (int y = 0; y < HEIGHT; y++) {
+	                    image.setRGB(x, y, bm.get(x, y) ? QRCOLOR : BGWHITE);
+	                }
+	            }
+
+	            int width = image.getWidth();
+	            int height = image.getHeight();
+	            if (Objects.nonNull(logo)) {
+	                // 构建绘图对象
+	                Graphics2D g = image.createGraphics();
+	                // 读取Logo图片
+	                //BufferedImage logo = ImageIO.read(logoFile);
+	                // 开始绘制logo图片
+	                g.drawImage(logo, width * 2 / 5, height * 2 / 5, width * 2 / 10, height * 2 / 10, null);
+	                g.dispose();
+	                logo.flush();
+	            }
+
+	            // 自定义文本描述
+	            if (StringUtils.isNotEmpty(note)) {
+	                // 新的图片,把带logo的二维码下面加上文字
+	                BufferedImage outImage = new BufferedImage(400, 445, BufferedImage.TYPE_4BYTE_ABGR);
+	                Graphics2D outg = outImage.createGraphics();
+	                // 画二维码到新的面板
+	                outg.drawImage(image, 0, 0, image.getWidth(), image.getHeight(), null);
+	                // 画文字到新的面板
+	                outg.setColor(Color.BLACK);
+	                outg.setFont(new Font("楷体", Font.BOLD, 30)); // 字体、字型、字号
+	                int strWidth = outg.getFontMetrics().stringWidth(note);
+	                if (strWidth > WIDTH) {
+	                    // //长度过长就截取前面部分
+	                    // 长度过长就换行
+	                    String note1 = note.substring(0, note.length() / 2);
+	                    String note2 = note.substring(note.length() / 2, note.length());
+	                    int strWidth1 = outg.getFontMetrics().stringWidth(note1);
+	                    int strWidth2 = outg.getFontMetrics().stringWidth(note2);
+	                    outg.drawString(note1, 200 - strWidth1 / 2, height + (outImage.getHeight() - height) / 2 + 12);
+	                    BufferedImage outImage2 = new BufferedImage(400, 485, BufferedImage.TYPE_4BYTE_ABGR);
+	                    Graphics2D outg2 = outImage2.createGraphics();
+	                    outg2.drawImage(outImage, 0, 0, outImage.getWidth(), outImage.getHeight(), null);
+	                    outg2.setColor(Color.BLACK);
+	                    outg2.setFont(new Font("宋体", Font.BOLD, 30)); // 字体、字型、字号
+	                    outg2.drawString(note2, 200 - strWidth2 / 2,outImage.getHeight() + (outImage2.getHeight() - outImage.getHeight()) / 2 + 5);
+	                    outg2.dispose();
+	                    outImage2.flush();
+	                    outImage = outImage2;
+	                } else {
+	                    outg.drawString(note, 200 - strWidth / 2, height + (outImage.getHeight() - height) / 2 + 12); // 画文字
+	                }
+	                outg.dispose();
+	                outImage.flush();
+	                image = outImage;
+	            }
+
+	            image.flush();
+
+	            ImageIO.write(image, "png", codeFile); // TODO
+	            bs = codeFile.toByteArray();
+	        } catch (Exception e) {
+	            e.printStackTrace();
+	        }
+	        return bs;
+	    }
+	    
+	    // 用于设置QR二维码参数
+	    private static Map<EncodeHintType, Object> hints = new HashMap<EncodeHintType, Object>() {
+	        private static final long serialVersionUID = 1L;
+	        {
+	            //put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);// 设置QR二维码的纠错级别(H为最高级别)具体级别信息
+	            put(EncodeHintType.CHARACTER_SET, "utf-8");// 设置编码方式
+	            put(EncodeHintType.MARGIN, 1);
+	        }
+	    };
+	    
+	    /**
+	     * 将base64字符解码保存文件
+	     *
+	     * @param base64Code
+	     * @param targetPath
+	     * @throws Exception
+	     */
+	    public static File decoderBase64File(String targetPath, String base64Code) throws Exception {
+	    	System.out.println("base64Code="+base64Code);
+	    	System.out.println("targetPath="+targetPath);
+		    byte[] buffer = new BASE64Decoder().decodeBuffer(base64Code);  
+		    FileOutputStream out = new FileOutputStream(targetPath);  
+		    out.write(buffer);  
+		    out.close();  
+		    File file = new File(targetPath);
+		    return file;
+	    }
+}

+ 46 - 0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/MatrixToImageWriter.java

@@ -0,0 +1,46 @@
+package com.x.organization.assemble.control.jaxrs.personcard;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+
+import com.google.zxing.common.BitMatrix;
+
+public class MatrixToImageWriter {
+    private static final int BLACK = 0xFF000000;
+    private static final int WHITE = 0xFFFFFFFF;
+ 
+    private MatrixToImageWriter() {
+    }
+ 
+    public static BufferedImage toBufferedImage(BitMatrix matrix) {
+        int width = matrix.getWidth();
+        int height = matrix.getHeight();
+        BufferedImage image = new BufferedImage(width, height,
+                BufferedImage.TYPE_INT_RGB);
+        for (int x = 0; x < width; x++) {
+            for (int y = 0; y < height; y++) {
+                image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE);
+            }
+        }
+        return image;
+    }
+    public static void writeToFile(BitMatrix matrix, String format, File file)
+            throws IOException {
+        BufferedImage image = toBufferedImage(matrix);
+        if (!ImageIO.write(image, format, file)) {
+            throw new IOException("Could not write an image of format "
+                    + format + " to " + file);
+        }
+    }
+    public static void writeToStream(BitMatrix matrix, String format,
+            OutputStream stream) throws IOException {
+        BufferedImage image = toBufferedImage(matrix);
+        if (!ImageIO.write(image, format, stream)) {
+            throw new IOException("Could not write an image of format " + format);
+        }
+    }
+}

+ 68 - 1
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/jaxrs/personcard/PersonCardAction.java

@@ -69,6 +69,7 @@ public class PersonCardAction extends StandardJaxrsAction {
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
+	
 	@JaxrsMethodDescribe(value = "更新个人名片.", action = ActionUpdate.class)
 	@PUT
 	@Path("{flag}")
@@ -176,6 +177,72 @@ public class PersonCardAction extends StandardJaxrsAction {
 		}
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
-
 	
+	@JaxrsMethodDescribe(value = "个人通讯录生成二维码", action = ActionCreateCode.class) 
+	@GET
+	@Path("createQR/{cardId}")
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void code(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("名片id") @PathParam("cardId") String cardId) {
+		ActionResult<ActionCreateCode.Wo> result = new ActionResult<>(); 
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionCreateCode().qrcode(effectivePerson, cardId);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);  
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "组织人员生成二维码", action = ActionPersonCode.class) 
+	@GET
+	@Path("createCode/{cardId}")
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void personcode(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("名片id") @PathParam("cardId") String cardId) {
+		ActionResult<ActionPersonCode.Wo> result = new ActionResult<>(); 
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionPersonCode().personcode(effectivePerson, cardId);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);  
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "导出组织通讯录vcf", action = ActionExportVcf.class) 
+	@GET
+	@Path("listVCf/{idList}")
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listVCf(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("名片id组") @PathParam("idList") String idList) {
+		ActionResult<ActionExportVcf.Wo> result = new ActionResult<>(); 
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionExportVcf().exportVcf(effectivePerson, idList);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);  
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+	
+	@JaxrsMethodDescribe(value = "导出个人通讯录vcf", action = ActionExportPersonalVcf.class) 
+	@GET
+	@Path("listPersonalVCf/{idList}")
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listPersonalVCf(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("名片id组") @PathParam("idList") String idList) {
+		ActionResult<ActionExportPersonalVcf.Wo> result = new ActionResult<>(); 
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionExportPersonalVcf().exportPersonalVcf(effectivePerson, idList);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);  
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
 }

+ 7 - 0
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/staticconfig/FollowConfig.java

@@ -0,0 +1,7 @@
+package com.x.organization.assemble.control.staticconfig;
+
+public final class FollowConfig {
+	public static final String QRPATH = "/data/appdevServer/servers/webServer/QRcode/";
+	public static final String LOGOPATH = "/data/appdevServer/servers/webServer/QRcode/";
+	public static final String VCFPATH = "/data/appdevServer/servers/webServer/QRcode/";
+}

+ 160 - 0
o2server/x_organization_assemble_control/src/main/webapp/describe/describe.json

@@ -8664,6 +8664,46 @@
             }
           ]
         },
+        {
+          "name": "code",
+          "className": "com.x.organization.assemble.control.jaxrs.personcard.ActionCreateCode",
+          "description": "个人通讯录生成二维码",
+          "type": "GET",
+          "path": "jaxrs/personcard/createQR/{cardId}",
+          "contentType": "application/json",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "cardId",
+              "type": "String",
+              "description": "名片id"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "contentDisposition",
+              "type": "String",
+              "isCollection": false,
+              "description": "说明"
+            },
+            {
+              "name": "contentType",
+              "type": "String",
+              "isCollection": false,
+              "description": "类型"
+            },
+            {
+              "name": "bytes",
+              "type": "byte[]",
+              "isCollection": false,
+              "description": "字节内容."
+            }
+          ]
+        },
         {
           "name": "create",
           "className": "com.x.organization.assemble.control.jaxrs.personcard.ActionCreate",
@@ -8938,6 +8978,86 @@
             }
           ]
         },
+        {
+          "name": "listPersonalVCf",
+          "className": "com.x.organization.assemble.control.jaxrs.personcard.ActionExportPersonalVcf",
+          "description": "导出个人通讯录vcf",
+          "type": "GET",
+          "path": "jaxrs/personcard/listPersonalVCf/{idList}",
+          "contentType": "application/json",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "idList",
+              "type": "String",
+              "description": "名片id组"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "contentDisposition",
+              "type": "String",
+              "isCollection": false,
+              "description": "说明"
+            },
+            {
+              "name": "contentType",
+              "type": "String",
+              "isCollection": false,
+              "description": "类型"
+            },
+            {
+              "name": "bytes",
+              "type": "byte[]",
+              "isCollection": false,
+              "description": "字节内容."
+            }
+          ]
+        },
+        {
+          "name": "listVCf",
+          "className": "com.x.organization.assemble.control.jaxrs.personcard.ActionExportVcf",
+          "description": "导出组织通讯录vcf",
+          "type": "GET",
+          "path": "jaxrs/personcard/listVCf/{idList}",
+          "contentType": "application/json",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "idList",
+              "type": "String",
+              "description": "名片id组"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "contentDisposition",
+              "type": "String",
+              "isCollection": false,
+              "description": "说明"
+            },
+            {
+              "name": "contentType",
+              "type": "String",
+              "isCollection": false,
+              "description": "类型"
+            },
+            {
+              "name": "bytes",
+              "type": "byte[]",
+              "isCollection": false,
+              "description": "字节内容."
+            }
+          ]
+        },
         {
           "name": "mylist",
           "className": "com.x.organization.assemble.control.jaxrs.personcard.ActionList",
@@ -9069,6 +9189,46 @@
             }
           ]
         },
+        {
+          "name": "personcode",
+          "className": "com.x.organization.assemble.control.jaxrs.personcard.ActionPersonCode",
+          "description": "组织人员生成二维码",
+          "type": "GET",
+          "path": "jaxrs/personcard/createCode/{cardId}",
+          "contentType": "application/json",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "cardId",
+              "type": "String",
+              "description": "名片id"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "contentDisposition",
+              "type": "String",
+              "isCollection": false,
+              "description": "说明"
+            },
+            {
+              "name": "contentType",
+              "type": "String",
+              "isCollection": false,
+              "description": "类型"
+            },
+            {
+              "name": "bytes",
+              "type": "byte[]",
+              "isCollection": false,
+              "description": "字节内容."
+            }
+          ]
+        },
         {
           "name": "update",
           "className": "com.x.organization.assemble.control.jaxrs.personcard.ActionUpdate",