diff --git a/o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceDetailFactory.java b/o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceDetailFactory.java index 56d5b86b0e1f0c1c3e19f329d7342d9cb409ce9d..b10841009ee373f3f04aac0ca8411e397d16d7b7 100644 --- a/o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceDetailFactory.java +++ b/o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/factory/AttendanceDetailFactory.java @@ -1035,16 +1035,16 @@ public class AttendanceDetailFactory extends AbstractFactory { Root root = cq.from( AttendanceDetail.class); cq.select(root.get(AttendanceDetail_.id)); Predicate p = cb.equal( root.get( AttendanceDetail_.recordDateString ), recordDate ); - if( StringUtils.equalsAnyIgnoreCase("onDuty")){ + if( StringUtils.equalsAnyIgnoreCase("onDuty", type)){ Predicate p_type = cb.lessThan( root.get( AttendanceDetail_.onDutyTime ), deadlineTime); p = cb.and( p, p_type ); - }else if(StringUtils.equalsAnyIgnoreCase("offDuty")){ + }else if(StringUtils.equalsAnyIgnoreCase("offDuty", type)){ Predicate p_type = cb.lessThan(root.get( AttendanceDetail_.offDutyTime ), deadlineTime); p = cb.and( p, p_type ); - }else if(StringUtils.equalsAnyIgnoreCase("morningOffDuty")){ + }else if(StringUtils.equalsAnyIgnoreCase("morningOffDuty", type)){ Predicate p_type = cb.lessThan(root.get( AttendanceDetail_.morningOffDutyTime ), deadlineTime); p = cb.and( p, p_type ); - }else if(StringUtils.equalsAnyIgnoreCase("afternoonOnDuty")){ + }else if(StringUtils.equalsAnyIgnoreCase("afternoonOnDuty", type)){ Predicate p_type = cb.lessThan(root.get( AttendanceDetail_.afternoonOnDutyTime ), deadlineTime); p = cb.and( p, p_type ); }else{ diff --git a/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java b/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java index 70ecd415f6a46c88345d1dbcc550ef12ee8fc67c..0d12cbd9bd5d0a396d8da0c2627710a64aaad35e 100644 --- a/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java +++ b/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishContent.java @@ -462,8 +462,8 @@ public class ActionPersistPublishContent extends BaseAction { @FieldDescribe( "文档操作者身份" ) private String identity = null; - @FieldDescribe( "数据的路径列表." ) - private String[] dataPaths = null; +// @FieldDescribe( "数据的路径列表." ) +// private String[] dataPaths = null; @FieldDescribe( "启动流程的JobId." ) private String wf_jobId = null; @@ -974,16 +974,16 @@ public class ActionPersistPublishContent extends BaseAction { this.readerList = readerList; } - public String[] getDataPaths() { - if( dataPaths != null && dataPaths.length == 1 && dataPaths[0].equals("null")){ - return null; - } - return dataPaths; - } - - public void setDataPaths(String[] dataPaths) { - this.dataPaths = dataPaths; - } +// public String[] getDataPaths() { +// if( dataPaths != null && dataPaths.length == 1 && dataPaths[0].equals("null")){ +// return null; +// } +// return dataPaths; +// } +// +// public void setDataPaths(String[] dataPaths) { +// this.dataPaths = dataPaths; +// } public Map getDocData() { return docData; diff --git a/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/queue/QueueSendDocumentNotify.java b/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/queue/QueueSendDocumentNotify.java index 624cdaaf805cf35e2f0f633fa8691d815314848e..f9765787a1e894e885953f1b38513493ff34a81e 100644 --- a/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/queue/QueueSendDocumentNotify.java +++ b/o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/queue/QueueSendDocumentNotify.java @@ -30,6 +30,7 @@ public class QueueSendDocumentNotify extends AbstractQueue { private static Logger logger = LoggerFactory.getLogger( QueueSendDocumentNotify.class ); public void execute( Document document ) throws Exception { + logger.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>QueueSendDocumentNotify:" + document.getTitle() ); if( document == null ) { logger.info("can not send publish notify , document is NULL!" ); return; @@ -42,43 +43,16 @@ public class QueueSendDocumentNotify extends AbstractQueue { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { AppInfo appInfo = emc.find( document.getAppId(), AppInfo.class ); CategoryInfo category = emc.find( document.getCategoryId(), CategoryInfo.class ); -// Boolean sendNotify = false; + if( appInfo != null && category != null ) { -// //根据栏目和分类配置判断是否需要提醒 -// if(StringUtils.equals( "信息", document.getDocumentType() )) { -// if( category.getSendNotify() == null ) { -// if( appInfo.getSendNotify() == null ) { -// //都为空,默认发送通知 -// sendNotify = true; -// }else { -// sendNotify = appInfo.getSendNotify(); -// } -// }else { -// sendNotify = category.getSendNotify(); -// } -// }else { -// //数据类型,只有分类设置了需要通知,才会有通知,为空和为false都不通知 -// if( category.getSendNotify() ) { -// sendNotify = true; -// } -// } - // if( sendNotify ) { - //计算该文档有多少阅读者 ReviewService reviewService = new ReviewService(); List persons = reviewService.listPermissionPersons( appInfo, category, document ); if( ListTools.isNotEmpty( persons )) { //有可能是*, 一般是所有的人员标识列表 if( persons.contains( "*" )) { logger.info(">>>>>document.getCreatorTopUnitName()=" + document.getCreatorTopUnitName() ); - List allPersons = listPersonWithUnit( document.getCreatorTopUnitName() ); - if( ListTools.isNotEmpty( allPersons )) { - for( String person : persons ) { - if( StringUtils.equals( "*" , person ) && allPersons.contains( person )) { - allPersons.add( person ); - } - } - } - persons = allPersons; + persons = listPersonWithUnit( document.getCreatorTopUnitName() ); + } } if( ListTools.isNotEmpty( persons )) {