Merge remote-tracking branch 'origin/apps_dev' into apps_dev

This commit is contained in:
Mr-wang 2023-09-08 14:19:19 +08:00
commit 572e49ace3
6 changed files with 71 additions and 46 deletions

View File

@ -216,11 +216,12 @@ public class ProcesNumberUtil {
}
if (UtilString.isNotEmpty(levelFour)) {
levelFour = levelFour.substring(levelFour.lastIndexOf(".") + 1, levelFour.length());
} else {
levelFour = "00";
}
levelnum = levelOne + "." + levelTwo + "." + levelThree + "." + levelFour;
if(UtilString.isNotEmpty(levelFour)){
levelnum = levelOne + "." + levelTwo + "." + levelThree + "." + levelFour;
}else{
levelnum = levelOne + "." + levelTwo + "." + levelThree;
}
}
String updateSql = "update BO_ACT_COE_PUBLISH_C set CHANGE_NUMBER = '%s' where ID = '%s'";
@ -336,11 +337,13 @@ public class ProcesNumberUtil {
if (UtilString.isNotEmpty(levelFour)) {
levelFour = levelFour.substring(levelFour.lastIndexOf(".") + 1, levelFour.length());
} else {
levelFour = "00";
}
if(UtilString.isNotEmpty(levelFour)){
levelnum = levelOne + "." + levelTwo + "." + levelThree + "." + levelFour;
}else{
levelnum = levelOne + "." + levelTwo + "." + levelThree;
}
levelnum = levelOne + "." + levelTwo + "." + levelThree + "." + levelFour;
}

View File

@ -3375,6 +3375,7 @@ public class ProcessPublishWeb extends ActionWeb {
if (stopBo != null) {
obj.put("stopFileName", stopBo.getString("STOPFILENAME"));
obj.put("stopFileId", stopBo.getString("STOPFILEID"));
PALRepositoryModel model = PALRepositoryCache.getCache().get(stopBo.getString("STOPFILEID"));
if (model != null) {
obj.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));

View File

@ -631,7 +631,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
//发送消息通知
List<BO> readCountBO=SDK.getBOAPI().query("BO_EU_READ_COUNT").addQuery("PROCESSID=",processExecutionContext.getProcessInstance().getId()).list();
List<BO> readCountBO=SDK.getBOAPI().query("BO_EU_READ_COUNT").addQuery("PROCESSID=",processExecutionContext.getProcessInstance().getId()).addQuery("RESULT=","待处理").list();
if(readCountBO.size()>0){
SDK.getNotificationAPI().sendMessage("admin", "admin", "文件名称:"+processExecutionContext.getProcessInstance().getTitle()+"文件有失败记录,请及时处理!!!");
}
@ -1114,7 +1114,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
//插入实时更新人数表
BO realTimeBO=new BO();
realTimeBO.set("USREID", user);
realTimeBO.set("DEPID", SDK.getORGAPI().getUser(user).getDepartmentId());
realTimeBO.set("DEPID", "");
realTimeBO.set("BUNAME","");
realTimeBO.set("TITLE", processInstance.getTitle());
realTimeBO.set("PROCESSID", processInstance.getId());
@ -1680,9 +1680,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
bo_Read_log.set("TITLE", jsonObject.get("title"));
bo_Read_log.set("PROCESSID", processInstId);
bo_Read_log.set("SENDNUM", arr.size());
String sqly = "SELECT ID FROM BO_ACT_DATAID WHERE PROCESSID = '" + processInstId + "' AND SENDTYPE = '1'";
String sqly = "SELECT ID FROM BO_ACT_DATAID WHERE PROCESSID = '" + processInstId + "'";
List<RowMap> mapsy = DBSql.getMaps(sqly);
String alsqly = "SELECT ID FROM BO_ACT_ALREADY_DATAID WHERE PROCESSID = '" + processInstId + "' AND SENDTYPE = '1'";
String alsqly = "SELECT ID FROM BO_ACT_ALREADY_DATAID WHERE PROCESSID = '" + processInstId + "'";
List<RowMap> almapsy = DBSql.getMaps(alsqly);
bo_Read_log.set("SENDNUMSJ", mapsy.size()+almapsy.size());
BO bo_act_coe_publishs = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true).addQuery("BINDID=", processInstId)

View File

@ -386,6 +386,14 @@ public class OutputWordUtil {
for (int z= 0; z < rows.getCells().get(j).getParagraphs().getCount();z++){
Paragraph p = rows.getCells().get(j).getParagraphs().get(z);
p.getFormat().setLineSpacing(12f);//设置边距为1.0
for (int k = 0; k < p.getItems().getCount(); k++) {
DocumentObject item = p.getItems().get(k);
if (item instanceof TextRange) {
TextRange textRange = (TextRange) item;
textRange.getCharacterFormat().setFontName("宋体");
textRange.getCharacterFormat().setFontSize(10.5f);
}
}
}
}
@ -409,7 +417,7 @@ public class OutputWordUtil {
TextRange tr2 = paragraph2.appendText("修订记录");
tr2.getCharacterFormat().setBold(true);
tr2.getCharacterFormat().setFontName("宋体");
tr2.getCharacterFormat().setFontSize(12);
tr2.getCharacterFormat().setFontSize(12f);
paragraph2.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式
@ -437,16 +445,14 @@ public class OutputWordUtil {
//添加表格
Table table = section.addTable(true);
table.resetCells(data.length + 1, header.length);
//table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Window);
TableRow row = table.getRows().get(0);
row.isHeader(true);
row.setHeightType(TableRowHeightType.Auto);
row.setHeightType(TableRowHeightType.Exactly);
for (int i = 0; i < header.length; i++) {
row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽
if(i==0){
/*if(i==0){
row.getCells().get(0).setWidth(40);
}else if(i==1){
row.getCells().get(1).setWidth(60);
@ -462,15 +468,15 @@ public class OutputWordUtil {
row.getCells().get(6).setWidth(50);
}else if(i==7){
row.getCells().get(7).setWidth(80);
}
}*/
Paragraph p = row.getCells().get(i).addParagraph();
p.getFormat().setHorizontalAlignment(Center);
TextRange txtRange = p.appendText(header[i]);
//txtRange.getCharacterFormat().setFontName("宋体"); // 设置字体名称
txtRange.getCharacterFormat().setBold(true);
txtRange.getCharacterFormat().setFontName("宋体");
txtRange.getCharacterFormat().setFontSize(10.5f);
}
@ -488,7 +494,7 @@ public class OutputWordUtil {
for (int c = 0; c < data[r].length; c++) {
dataRow.getCells().get(c).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽
if(c==0){
/* if(c==0){
dataRow.getCells().get(0).setWidth(40);
}else if(c==1){
dataRow.getCells().get(1).setWidth(60);
@ -504,12 +510,13 @@ public class OutputWordUtil {
dataRow.getCells().get(6).setWidth(50);
}else if(c==7){
dataRow.getCells().get(7).setWidth(80);
}
}*/
//dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
TextRange text =dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
text.getCharacterFormat().setFontName("宋体");
text.getCharacterFormat().setFontSize(10.5f);
}
}
@ -712,7 +719,7 @@ public class OutputWordUtil {
TextRange tr = paragraph1.appendText("相关文件");
tr.getCharacterFormat().setBold(true);
tr.getCharacterFormat().setFontName("宋体");
tr.getCharacterFormat().setFontSize(12);
tr.getCharacterFormat().setFontSize(12f);
//tr.applyCharacterFormat(format); //应用字体格式
paragraph1.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式
@ -736,20 +743,26 @@ public class OutputWordUtil {
//添加表格
Table table = section.addTable(true);
table.resetCells(data.length + 1, header.length);
table.getTableFormat().isAutoResized(true);
table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Window);
TableRow row = table.getRows().get(0);
row.isHeader(true);
row.setHeight(20);
row.setHeightType(TableRowHeightType.Auto);
row.setHeightType(TableRowHeightType.Exactly);
for (int i = 0; i < header.length; i++) {
row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽
row.getCells().get(0).setWidth(150);
row.getCells().get(1).setWidth(500);
//row.getCells().get(0).setWidth(50);
//row.getCells().get(1).setWidth(150);
Paragraph p = row.getCells().get(i).addParagraph();
p.getFormat().setHorizontalAlignment(Center);
TextRange txtRange = p.appendText(header[i]);
txtRange.getCharacterFormat().setBold(true);
txtRange.getCharacterFormat().setFontName("宋体");
txtRange.getCharacterFormat().setFontSize(10.5f);
}
@ -757,21 +770,23 @@ public class OutputWordUtil {
for (int r = 0; r < data.length; r++) {
TableRow dataRow = table.getRows().get(r + 1);
dataRow.setHeight(25);
dataRow.setHeightType(TableRowHeightType.Auto);
dataRow.setHeightType(TableRowHeightType.Exactly);
dataRow.getRowFormat().setBackColor(Color.white);
for (int c = 0; c < data[r].length; c++) {
dataRow.getCells().get(c).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽
dataRow.getCells().get(0).setWidth(150);
dataRow.getCells().get(1).setWidth(500);
//dataRow.getCells().get(0).setWidth(50);
//dataRow.getCells().get(1).setWidth(150);
//dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
TextRange text =dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
text.getCharacterFormat().setFontName("宋体");
text.getCharacterFormat().setFontSize(10.5f);
}
}
Paragraph paragraph_blank = section.addParagraph();
}
@ -824,7 +839,7 @@ public class OutputWordUtil {
TextRange tr = paragraph1.appendText("外部相关文件");
tr.getCharacterFormat().setBold(true);
tr.getCharacterFormat().setFontName("宋体");
tr.getCharacterFormat().setFontSize(12);
tr.getCharacterFormat().setFontSize(12f);
//tr.applyCharacterFormat(format); //应用字体格式
paragraph1.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式
@ -848,20 +863,22 @@ public class OutputWordUtil {
//添加表格
Table table = section.addTable(true);
table.resetCells(data.length + 1, header.length);
table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Window);
TableRow row = table.getRows().get(0);
row.isHeader(true);
row.setHeight(20);
row.setHeightType(TableRowHeightType.Auto);
row.setHeightType(TableRowHeightType.Exactly);
for (int i = 0; i < header.length; i++) {
row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽
row.getCells().get(0).setWidth(150);
row.getCells().get(1).setWidth(500);
//row.getCells().get(0).setWidth(150);
//row.getCells().get(1).setWidth(500);
Paragraph p = row.getCells().get(i).addParagraph();
p.getFormat().setHorizontalAlignment(Center);
TextRange txtRange = p.appendText(header[i]);
txtRange.getCharacterFormat().setBold(true);
txtRange.getCharacterFormat().setFontName("宋体");
txtRange.getCharacterFormat().setFontSize(10.5f);
}
@ -869,16 +886,16 @@ public class OutputWordUtil {
for (int r = 0; r < data.length; r++) {
TableRow dataRow = table.getRows().get(r + 1);
dataRow.setHeight(25);
dataRow.setHeightType(TableRowHeightType.Auto);
dataRow.getRowFormat().setBackColor(Color.white);
dataRow.setHeightType(TableRowHeightType.Exactly);
for (int c = 0; c < data[r].length; c++) {
dataRow.getCells().get(c).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽
dataRow.getCells().get(0).setWidth(150);
dataRow.getCells().get(1).setWidth(500);
//dataRow.getCells().get(0).setWidth(150);
//dataRow.getCells().get(1).setWidth(500);
//dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
TextRange text =dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
text.getCharacterFormat().setFontName("宋体");
text.getCharacterFormat().setFontSize(10.5f);
}
}
@ -915,7 +932,7 @@ public class OutputWordUtil {
TextRange tr2 = paragraph2.appendText("支持文件");
tr2.getCharacterFormat().setBold(true);
tr2.getCharacterFormat().setFontName("宋体");
tr2.getCharacterFormat().setFontSize(12);
tr2.getCharacterFormat().setFontSize(12f);
paragraph2.applyStyle(BuiltinStyle.Body_Text); //应用标题1样式
@ -938,36 +955,40 @@ public class OutputWordUtil {
Table table = section.addTable(true);
table.resetCells(data.length + 1, header.length);
table.autoFit(AutoFitBehaviorType.Auto_Fit_To_Window);
TableRow row = table.getRows().get(0);
row.isHeader(true);
row.setHeight(20);
//row.setHeight(20);
row.setHeightType(TableRowHeightType.Auto);
for (int i = 0; i < header.length; i++) {
row.getCells().get(i).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽
row.getCells().get(0).setWidth(150);
row.getCells().get(1).setWidth(500);
//row.getCells().get(0).setWidth(150);
//row.getCells().get(1).setWidth(500);
Paragraph p = row.getCells().get(i).addParagraph();
p.getFormat().setHorizontalAlignment(Center);
TextRange txtRange = p.appendText(header[i]);
txtRange.getCharacterFormat().setBold(true);
txtRange.getCharacterFormat().setFontName("宋体");
txtRange.getCharacterFormat().setFontSize(10.5f);
}
//将数据添加到其余行
for (int r = 0; r < data.length; r++) {
TableRow dataRow = table.getRows().get(r + 1);
dataRow.setHeight(25);
//dataRow.setHeight(25);
dataRow.setHeightType(TableRowHeightType.Auto);
dataRow.getRowFormat().setBackColor(Color.white);
for (int c = 0; c < data[r].length; c++) {
dataRow.getCells().get(c).getCellFormat().setVerticalAlignment(VerticalAlignment.Middle);
//设置固定列宽
dataRow.getCells().get(0).setWidth(150);
dataRow.getCells().get(1).setWidth(500);
//dataRow.getCells().get(0).setWidth(150);
//dataRow.getCells().get(1).setWidth(500);
//dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
TextRange text =dataRow.getCells().get(c).addParagraph().appendText(data[r][c]);
text.getCharacterFormat().setFontName("宋体");
text.getCharacterFormat().setFontSize(10.5f);
}
}
Paragraph paragraph_blank = section.addParagraph();