Merge branch 'dev' into docker_package
This commit is contained in:
commit
80356dff2d
|
@ -44,7 +44,7 @@ import java.util.concurrent.Executors;
|
|||
@Component
|
||||
public class ActivitiNoticeAspect {
|
||||
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors();
|
||||
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm);
|
||||
private static final ExecutorService executor = Executors.newWorkStealingPool(cpuNUm * 3);
|
||||
private static Logger logger = LoggerFactory.getLogger(ActivitiNoticeAspect.class);
|
||||
@Autowired
|
||||
private SysNoticeService sysNoticeService;
|
||||
|
@ -327,39 +327,47 @@ public class ActivitiNoticeAspect {
|
|||
try {
|
||||
String finalCreator = creator;
|
||||
CompletableFuture.runAsync(() -> { // 发起人
|
||||
SysUserDTO assignee = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
|
||||
logger.error("审核人:" + assignee.getId());
|
||||
String content = "【通知】您发起的流程 " + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核人为:\"" + assignee.getDeptName() + "\"审核负责人\"" + assignee.getRealName() + "\"";
|
||||
logger.info("通知内容:" + content);
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setTitle("流程流转系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(finalCreator);
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
sysNoticeService.save(dto);
|
||||
try {
|
||||
SysUserDTO assignee = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
|
||||
logger.error("审核人:" + assignee.getId());
|
||||
String content = "【通知】您发起的流程 " + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核人为:\"" + assignee.getDeptName() + "\"审核负责人\"" + assignee.getRealName() + "\"";
|
||||
logger.info("通知内容:" + content);
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setTitle("流程流转系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(finalCreator);
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
sysNoticeService.save(dto);
|
||||
} catch (Exception exception) {
|
||||
logger.error("通知发起人失败", exception);
|
||||
}
|
||||
}, executor).thenRunAsync(() -> { // 审批者
|
||||
SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator));
|
||||
String content = "【通知】" + owner.getRealName() + "发起的流程" + activitiNoticeOperation.process() + "已进入审核节点:" + activitiNoticeOperation.value() + ";当前审核人指派为您";
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setTitle("流程流转系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(delegateTask.getAssignee());
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
sysNoticeService.save(dto);
|
||||
try {
|
||||
SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator));
|
||||
String content = "【通知】" + owner.getRealName() + "发起的流程" + activitiNoticeOperation.process() + "已进入审核节点:" + activitiNoticeOperation.value() + ";当前审核人指派为您";
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setTitle("流程流转系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(delegateTask.getAssignee());
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
sysNoticeService.save(dto);
|
||||
} catch (Exception exception) {
|
||||
logger.error("通知审批人失败", exception);
|
||||
}
|
||||
}, executor);
|
||||
} catch (Exception e) {
|
||||
logger.error("发送通知消息异常", e);
|
||||
|
|
|
@ -11,8 +11,6 @@ import io.renren.modules.category.service.CategoryService;
|
|||
import io.renren.modules.resource.dao.AttrDao;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
@ -43,7 +41,6 @@ public class CategoryServiceImpl extends CrudServiceImpl<CategoryDao, Category,
|
|||
}
|
||||
|
||||
@Override
|
||||
@Cacheable(value = getCategoryTreeKey, key = "'getCategoryTree'")
|
||||
public List<CategoryDTO> getCategoryTree() {
|
||||
List<Category> topCategory = categoryDao.selectByParentId(null);
|
||||
List<CategoryDTO> list = new CopyOnWriteArrayList<>();
|
||||
|
@ -87,7 +84,6 @@ public class CategoryServiceImpl extends CrudServiceImpl<CategoryDao, Category,
|
|||
|
||||
@Override
|
||||
@Transactional
|
||||
@CacheEvict(key = getCategoryTreeKey, allEntries = true)
|
||||
public void deleteByIds(JSONObject jsonObject) {
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("ids");
|
||||
//TODO:删除为一级分类时,删除模板保存的文件夹?
|
||||
|
@ -131,7 +127,6 @@ public class CategoryServiceImpl extends CrudServiceImpl<CategoryDao, Category,
|
|||
|
||||
@Override
|
||||
@Transactional
|
||||
@CacheEvict(key = getCategoryTreeKey, allEntries = true)
|
||||
public void update(CategoryDTO categoryDTO) {
|
||||
super.update(categoryDTO);
|
||||
String oldName = categoryDao.selectById(categoryDTO.getId()).getName();
|
||||
|
|
|
@ -1047,7 +1047,7 @@
|
|||
FROM
|
||||
(SELECT a.* FROM tb_data_attr a INNER JOIN tb_data_resource c ON a.data_resource_id = c.id
|
||||
INNER JOIN sys_dept b ON c.dept_id = b.id WHERE c.type =
|
||||
#{resourceType} AND (b.id = #{id} OR INSTR(b.pids,#{id})) ) tdav
|
||||
#{resourceType} AND (b.id = #{id} OR INSTR(b.pids,#{id})) AND c.del_flag = 0) tdav
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
|
||||
';', '' ) ) + 1 )
|
||||
WHERE
|
||||
|
|
Loading…
Reference in New Issue