制度正文附件导入重复覆盖

This commit is contained in:
lihongyu 2022-09-30 12:53:15 +08:00
parent afabcb990d
commit ea338a7a8d

View File

@ -125,6 +125,10 @@ public class ReadTable {
DCPluginProfile dcProfilepdfdoc = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration"); DCPluginProfile dcProfilepdfdoc = DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.datamigration", "migration");
//将文件挂载到附件里面 //将文件挂载到附件里面
DCContext dcContextorigin = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, fileName); DCContext dcContextorigin = new DCContext(userContext, dcProfilepdfdoc, "com.actionsoft.apps.coe.pal.datamigration", groupValue, fileValue, fileName);
StringBuffer sql = new StringBuffer();
//删除已有xml文件
sql.append("delete from ").append(UpfileModel.DATABASE_ENTITY).append(" WHERE SHAPEID = '" + shpId + "'");
int update = DBSql.update(sql.toString());
InputStream originfile = SDK.getDCAPI().read(dcContextorigin); InputStream originfile = SDK.getDCAPI().read(dcContextorigin);
try { try {
boolean writeFileTodisk = new ReadWordUtil().writeFileTodisk(userContext, shpId, fileName, originfile, id, "s"); boolean writeFileTodisk = new ReadWordUtil().writeFileTodisk(userContext, shpId, fileName, originfile, id, "s");