提交 2b1eeeb3 编写于 作者: liyi_hz2008's avatar liyi_hz2008

Merge branch 'feature/Attendance.needSign.addparam' into 'develop'

[内容管理]删除了多余的代码

See merge request o2oa/o2oa!1201
...@@ -1035,16 +1035,16 @@ public class AttendanceDetailFactory extends AbstractFactory { ...@@ -1035,16 +1035,16 @@ public class AttendanceDetailFactory extends AbstractFactory {
Root<AttendanceDetail> root = cq.from( AttendanceDetail.class); Root<AttendanceDetail> root = cq.from( AttendanceDetail.class);
cq.select(root.get(AttendanceDetail_.id)); cq.select(root.get(AttendanceDetail_.id));
Predicate p = cb.equal( root.get( AttendanceDetail_.recordDateString ), recordDate ); 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); Predicate p_type = cb.lessThan( root.get( AttendanceDetail_.onDutyTime ), deadlineTime);
p = cb.and( p, p_type ); 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); Predicate p_type = cb.lessThan(root.get( AttendanceDetail_.offDutyTime ), deadlineTime);
p = cb.and( p, p_type ); 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); Predicate p_type = cb.lessThan(root.get( AttendanceDetail_.morningOffDutyTime ), deadlineTime);
p = cb.and( p, p_type ); 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); Predicate p_type = cb.lessThan(root.get( AttendanceDetail_.afternoonOnDutyTime ), deadlineTime);
p = cb.and( p, p_type ); p = cb.and( p, p_type );
}else{ }else{
......
...@@ -462,8 +462,8 @@ public class ActionPersistPublishContent extends BaseAction { ...@@ -462,8 +462,8 @@ public class ActionPersistPublishContent extends BaseAction {
@FieldDescribe( "文档操作者身份" ) @FieldDescribe( "文档操作者身份" )
private String identity = null; private String identity = null;
@FieldDescribe( "数据的路径列表." ) // @FieldDescribe( "数据的路径列表." )
private String[] dataPaths = null; // private String[] dataPaths = null;
@FieldDescribe( "启动流程的JobId." ) @FieldDescribe( "启动流程的JobId." )
private String wf_jobId = null; private String wf_jobId = null;
...@@ -974,16 +974,16 @@ public class ActionPersistPublishContent extends BaseAction { ...@@ -974,16 +974,16 @@ public class ActionPersistPublishContent extends BaseAction {
this.readerList = readerList; this.readerList = readerList;
} }
public String[] getDataPaths() { // public String[] getDataPaths() {
if( dataPaths != null && dataPaths.length == 1 && dataPaths[0].equals("null")){ // if( dataPaths != null && dataPaths.length == 1 && dataPaths[0].equals("null")){
return null; // return null;
} // }
return dataPaths; // return dataPaths;
} // }
//
public void setDataPaths(String[] dataPaths) { // public void setDataPaths(String[] dataPaths) {
this.dataPaths = dataPaths; // this.dataPaths = dataPaths;
} // }
public Map<?, ?> getDocData() { public Map<?, ?> getDocData() {
return docData; return docData;
......
...@@ -30,6 +30,7 @@ public class QueueSendDocumentNotify extends AbstractQueue<Document> { ...@@ -30,6 +30,7 @@ public class QueueSendDocumentNotify extends AbstractQueue<Document> {
private static Logger logger = LoggerFactory.getLogger( QueueSendDocumentNotify.class ); private static Logger logger = LoggerFactory.getLogger( QueueSendDocumentNotify.class );
public void execute( Document document ) throws Exception { public void execute( Document document ) throws Exception {
logger.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>QueueSendDocumentNotify:" + document.getTitle() );
if( document == null ) { if( document == null ) {
logger.info("can not send publish notify , document is NULL!" ); logger.info("can not send publish notify , document is NULL!" );
return; return;
...@@ -42,43 +43,16 @@ public class QueueSendDocumentNotify extends AbstractQueue<Document> { ...@@ -42,43 +43,16 @@ public class QueueSendDocumentNotify extends AbstractQueue<Document> {
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) { try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
AppInfo appInfo = emc.find( document.getAppId(), AppInfo.class ); AppInfo appInfo = emc.find( document.getAppId(), AppInfo.class );
CategoryInfo category = emc.find( document.getCategoryId(), CategoryInfo.class ); CategoryInfo category = emc.find( document.getCategoryId(), CategoryInfo.class );
// Boolean sendNotify = false;
if( appInfo != null && category != null ) { 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(); ReviewService reviewService = new ReviewService();
List<String> persons = reviewService.listPermissionPersons( appInfo, category, document ); List<String> persons = reviewService.listPermissionPersons( appInfo, category, document );
if( ListTools.isNotEmpty( persons )) { if( ListTools.isNotEmpty( persons )) {
//有可能是*, 一般是所有的人员标识列表 //有可能是*, 一般是所有的人员标识列表
if( persons.contains( "*" )) { if( persons.contains( "*" )) {
logger.info(">>>>>document.getCreatorTopUnitName()=" + document.getCreatorTopUnitName() ); logger.info(">>>>>document.getCreatorTopUnitName()=" + document.getCreatorTopUnitName() );
List<String> allPersons = listPersonWithUnit( document.getCreatorTopUnitName() ); persons = listPersonWithUnit( document.getCreatorTopUnitName() );
if( ListTools.isNotEmpty( allPersons )) {
for( String person : persons ) {
if( StringUtils.equals( "*" , person ) && allPersons.contains( person )) {
allPersons.add( person );
}
}
}
persons = allPersons;
} }
} }
if( ListTools.isNotEmpty( persons )) { if( ListTools.isNotEmpty( persons )) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册