| | |
| | | package com.product.administration.service; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.product.admin.service.UserService; |
| | | import com.product.administration.config.CmnConst; |
| | | import com.product.administration.service.ide.ICooperatesService; |
| | | import com.product.common.lang.StringUtils; |
| | | import com.product.core.config.CoreConst; |
| | | import com.product.core.dao.BaseDao; |
| | | import com.product.core.entity.DataTableEntity; |
| | | import com.product.core.entity.FieldMetaEntity; |
| | | import com.product.core.entity.FieldSetEntity; |
| | | import com.product.core.exception.BaseException; |
| | | import com.product.core.permission.PermissionService; |
| | |
| | | import com.product.core.spring.context.SpringMVCContextHolder; |
| | | import com.product.core.transfer.Transactional; |
| | | import com.product.core.websocket.service.WebsocketMesssageServiceThread; |
| | | import com.product.module.sys.service.UserService; |
| | | import com.product.util.BaseUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.stereotype.Component; |
| | | import com.product.tool.flow.service.FlowCoordinationService; |
| | | |
| | |
| | | * @author: ZhouJie |
| | | * @Description: 协同办公 |
| | | */ |
| | | @Component |
| | | @Service |
| | | public class CooperatesService extends AbstractBaseService implements ICooperatesService { |
| | | @Autowired |
| | |
| | | @Autowired |
| | | QueryFilterService queryFilterService; |
| | | @Autowired |
| | | @Qualifier("userOperService") |
| | | UserService userService; |
| | | |
| | | /** |
| | |
| | | FieldSetEntity fse = baseDao.getFieldSetEntity(CmnConst.PRODUCT_OA_COOPERATES, fs.getString(CmnConst.UUID), true); |
| | | DataTableEntity copsub = fse.getSubDataTable(CmnConst.PRODUCT_OA_COOPERATE_SUB); |
| | | baseDao.loadPromptData(copsub); |
| | | |
| | | for (int i = 0; i <copsub.getRows() ; i++) { |
| | | String userId = copsub.getString(i, "created_by_save_value"); |
| | | String userAvatar = userService.getUserAvatar(userId); |
| | | if (!StringUtils.isEmpty(userAvatar)) { |
| | | copsub.setFieldValue(i, "avatar", userAvatar); |
| | | } |
| | | } |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | stringBuilder.append(" select ifnull(concat(tricode,'-',receiver) ,receiver) code,uuid,title,cooperate_uuid,grade,receiver as id,receiver,sender, "); |
| | | stringBuilder.append(" receiver_name,(select user_name FROM product_sys_users where user_id=receiver) label,sender_name,status, "); |
| | |
| | | if (!StringUtils.isEmpty(queryFilter)) { |
| | | str.append(" and ").append(queryFilter); |
| | | } |
| | | str.append(" ) a"); |
| | | str.append(" order by start_time desc) a"); |
| | | DataTableEntity dt = baseDao.listTable(str.toString(), new Object[]{user_id, 2}, fs.getInteger(CmnConst.PAGESIZE), fs.getInteger(CmnConst.CPAGE)); |
| | | dt.getMeta().addAliasTable("product_oa_cooperates", "lc"); |
| | | dt.getMeta().addAliasTable("product_oa_cooperate_flow_node", "lcn"); |