Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
9f704ea01d
|
@ -1,6 +1,7 @@
|
||||||
package io.renren.common.aspect;
|
package io.renren.common.aspect;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.renren.common.annotation.ActivitiNoticeOperation;
|
import io.renren.common.annotation.ActivitiNoticeOperation;
|
||||||
import io.renren.modules.notice.dto.SysNoticeDTO;
|
import io.renren.modules.notice.dto.SysNoticeDTO;
|
||||||
import io.renren.modules.notice.enums.NoticeStatusEnum;
|
import io.renren.modules.notice.enums.NoticeStatusEnum;
|
||||||
|
@ -200,7 +201,7 @@ public class ActivitiNoticeAspect {
|
||||||
*/
|
*/
|
||||||
private void end_notice(final DelegateExecution execution, final ActivitiNoticeOperation activitiNoticeOperation) {
|
private void end_notice(final DelegateExecution execution, final ActivitiNoticeOperation activitiNoticeOperation) {
|
||||||
Map<String, Object> kv = execution.getVariables();
|
Map<String, Object> kv = execution.getVariables();
|
||||||
logger.error("表单:" + kv.toString());
|
logger.error("表单:" + JSON.toJSONString(kv));
|
||||||
if (work_.contains(ExecutionListener.EVENTNAME_END + kv.get("id").toString())) {
|
if (work_.contains(ExecutionListener.EVENTNAME_END + kv.get("id").toString())) {
|
||||||
logger.error("------------出现重放------------");
|
logger.error("------------出现重放------------");
|
||||||
return;
|
return;
|
||||||
|
@ -229,9 +230,9 @@ public class ActivitiNoticeAspect {
|
||||||
String finalCreator = creator;
|
String finalCreator = creator;
|
||||||
String finalResult = result;
|
String finalResult = result;
|
||||||
Long resourceId = null;
|
Long resourceId = null;
|
||||||
if (kv.containsKey("resourceId")) {
|
if (kv.containsKey("resourceId") && kv.get("resourceId") != null) {
|
||||||
resourceId = Long.valueOf(kv.get("resourceId").toString());
|
resourceId = Long.valueOf(kv.get("resourceId").toString());
|
||||||
} else if (kv.containsKey("id")) {
|
} else if (kv.containsKey("id") && kv.get("id") != null) {
|
||||||
resourceId = Long.valueOf(kv.get("id").toString());
|
resourceId = Long.valueOf(kv.get("id").toString());
|
||||||
}
|
}
|
||||||
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
|
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
|
||||||
|
|
|
@ -78,6 +78,10 @@ public class AbilityCenterController {
|
||||||
return new Result().error("联系管理员添加流程");
|
return new Result().error("联系管理员添加流程");
|
||||||
}
|
}
|
||||||
return new Result().ok(abilityBatchApplicationDTO.getSystem().stream().map(index -> {
|
return new Result().ok(abilityBatchApplicationDTO.getSystem().stream().map(index -> {
|
||||||
|
if (index.get("resourceId") == null) {
|
||||||
|
logger.error("未携带资源id");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请
|
if (tAbilityApplicationService.countUserResourceApply(SecurityUser.getUserId(), Long.valueOf(index.get("resourceId"))) > 0) { // 防止重复发起申请
|
||||||
logger.error("重复发起申请");
|
logger.error("重复发起申请");
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -413,7 +413,7 @@ public class CensusControllerV2 {
|
||||||
HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto);
|
HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto);
|
||||||
result.add(new HashMap<String, Object>() {
|
result.add(new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
put("amount", dataResource.get("rows"));
|
put("amount", (dataResource != null && dataResource.containsKey("rows") && dataResource.get("rows") != null) ? dataResource.get("rows") : 0);
|
||||||
put("type", "总数据数");
|
put("type", "总数据数");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -431,7 +431,7 @@ public class CensusControllerV2 {
|
||||||
});
|
});
|
||||||
result.add(new HashMap<String, Object>() {
|
result.add(new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
List<Map> lists = (List<Map>) dataResource.get("data");
|
List<Map> lists = (dataResource != null && dataResource.containsKey("data") && dataResource.get("data") != null) ? (List<Map>) dataResource.get("data") : new ArrayList<>();
|
||||||
ArrayList<Map> list = new ArrayList<>();
|
ArrayList<Map> list = new ArrayList<>();
|
||||||
lists.forEach(item -> {
|
lists.forEach(item -> {
|
||||||
list.add(new HashMap<String, Object>() {{
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
@ -462,10 +462,22 @@ public class CensusControllerV2 {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
result.add(new HashMap<String, Object>() {
|
||||||
|
{
|
||||||
|
put("amount", 0L);
|
||||||
|
put("type", "总数据数");
|
||||||
|
}
|
||||||
|
});
|
||||||
logger.error("青岛西海岸获取失败");
|
logger.error("青岛西海岸获取失败");
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
logger.error("青岛西海岸失败", exception);
|
logger.error("青岛西海岸失败", exception);
|
||||||
|
result.add(new HashMap<String, Object>() {
|
||||||
|
{
|
||||||
|
put("amount", 0L);
|
||||||
|
put("type", "总数据数");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
OkHttpClient client1 = new OkHttpClient();
|
OkHttpClient client1 = new OkHttpClient();
|
||||||
|
@ -496,13 +508,46 @@ public class CensusControllerV2 {
|
||||||
}).collect(Collectors.toList()));
|
}).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.error("青岛西海岸获取失败");
|
logger.error("青岛西海岸获取失败");
|
||||||
|
result.add(new HashMap<String, Object>() {
|
||||||
|
{
|
||||||
|
put("amount", 0L);
|
||||||
|
put("type", "总申请次数");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
result.add(new HashMap<String, Object>() {
|
||||||
|
{
|
||||||
|
put("amount", 0);
|
||||||
|
put("type", "满足率");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
result.add(new HashMap<String, Object>() {
|
||||||
|
{
|
||||||
|
put("resourceTop5", new ArrayList<>());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
logger.error("青岛西海岸失败", exception);
|
logger.error("青岛西海岸失败", exception);
|
||||||
|
result.add(new HashMap<String, Object>() {
|
||||||
|
{
|
||||||
|
put("amount", 0L);
|
||||||
|
put("type", "总申请次数");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
result.add(new HashMap<String, Object>() {
|
||||||
|
{
|
||||||
|
put("amount", 0);
|
||||||
|
put("type", "满足率");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
result.add(new HashMap<String, Object>() {
|
||||||
|
{
|
||||||
|
put("resourceTop5", new ArrayList<>());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -158,7 +158,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
@CacheEvict(cacheNames = {selectDeptListKey}, allEntries = true)
|
||||||
public void insertWithAttrs(ResourceDTO dto) {
|
public void insertWithAttrs(ResourceDTO dto) {
|
||||||
ResourceEntity resourceEntity = new ResourceEntity();
|
ResourceEntity resourceEntity = new ResourceEntity();
|
||||||
BeanUtils.copyProperties(dto, resourceEntity);
|
BeanUtils.copyProperties(dto, resourceEntity);
|
||||||
|
@ -171,18 +171,22 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
resourceDao.insert(resourceEntity);
|
resourceDao.insert(resourceEntity);
|
||||||
BeanUtils.copyProperties(resourceEntity, dto);
|
BeanUtils.copyProperties(resourceEntity, dto);
|
||||||
List<AttrEntity> attrEntities = dto.getInfoList();
|
List<AttrEntity> attrEntities = dto.getInfoList();
|
||||||
|
List<AttrEntity> attrEntities_ = new ArrayList<>();
|
||||||
if (attrEntities != null) {
|
if (attrEntities != null) {
|
||||||
attrEntities.forEach(item -> {
|
attrEntities.forEach(item -> {
|
||||||
item.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag());
|
item.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag());
|
||||||
item.setDataResourceId(resourceID);
|
item.setDataResourceId(resourceID);
|
||||||
attrDao.insert(item);
|
attrDao.insert(item);
|
||||||
|
attrEntities_.add(item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
resourceEntity.setInfoList(attrEntities_);
|
||||||
|
resourceDao.updateById(resourceEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
@CacheEvict(cacheNames = {selectDeptListKey}, allEntries = true)
|
||||||
public void deleteWithAttrs(JSONObject jsonObject) {
|
public void deleteWithAttrs(JSONObject jsonObject) {
|
||||||
JSONArray jsonArray = jsonObject.getJSONArray("ids");
|
JSONArray jsonArray = jsonObject.getJSONArray("ids");
|
||||||
List<Long> idList = jsonArray.toJavaList(Long.class);
|
List<Long> idList = jsonArray.toJavaList(Long.class);
|
||||||
|
@ -196,7 +200,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
@CacheEvict(cacheNames = {selectDeptListKey}, allEntries = true)
|
||||||
public void updateWithAttrs(ResourceDTO dto) {
|
public void updateWithAttrs(ResourceDTO dto) {
|
||||||
ResourceEntity resourceEntity = new ResourceEntity();
|
ResourceEntity resourceEntity = new ResourceEntity();
|
||||||
BeanUtils.copyProperties(dto, resourceEntity);
|
BeanUtils.copyProperties(dto, resourceEntity);
|
||||||
|
@ -764,7 +768,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
* 同步知识库
|
* 同步知识库
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@CacheEvict(key = selectDeptListKey, allEntries = true)
|
@CacheEvict(cacheNames = {selectDeptListKey}, allEntries = true)
|
||||||
public void KnowledgeBase() {
|
public void KnowledgeBase() {
|
||||||
final List<String> knowledgeUUID = jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库' AND note1 IS NOT NULL FOR UPDATE;", String.class).stream().distinct().collect(Collectors.toList());
|
final List<String> knowledgeUUID = jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库' AND note1 IS NOT NULL FOR UPDATE;", String.class).stream().distinct().collect(Collectors.toList());
|
||||||
final int pageSize = 100;
|
final int pageSize = 100;
|
||||||
|
|
Loading…
Reference in New Issue