|
|
@@ -1,15 +1,5 @@
|
|
|
package com.lc.ibps.office.provider;
|
|
|
|
|
|
-import java.util.*;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
-
|
|
|
-import com.lc.ibps.base.framework.table.ICommonDao;
|
|
|
-import org.slf4j.event.Level;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-
|
|
|
import com.lc.ibps.api.base.constants.StateEnum;
|
|
|
import com.lc.ibps.api.base.model.PartyEntity;
|
|
|
import com.lc.ibps.api.base.query.QueryFilter;
|
|
|
@@ -22,6 +12,7 @@ import com.lc.ibps.base.core.util.string.StringUtil;
|
|
|
import com.lc.ibps.base.db.mybatis.Dialect;
|
|
|
import com.lc.ibps.base.framework.id.UniqueIdUtil;
|
|
|
import com.lc.ibps.base.framework.page.PageList;
|
|
|
+import com.lc.ibps.base.framework.table.ICommonDao;
|
|
|
import com.lc.ibps.base.saas.context.TenantContext;
|
|
|
import com.lc.ibps.base.web.context.ContextUtil;
|
|
|
import com.lc.ibps.bpmn.api.constant.TaskType;
|
|
|
@@ -42,16 +33,27 @@ import com.lc.ibps.cloud.entity.APIRequest;
|
|
|
import com.lc.ibps.cloud.entity.APIResult;
|
|
|
import com.lc.ibps.cloud.provider.GenericProvider;
|
|
|
import com.lc.ibps.cloud.utils.RequestUtil;
|
|
|
+import com.lc.ibps.form.data.persistence.entity.DataTemplatePo;
|
|
|
+import com.lc.ibps.form.data.persistence.entity.DatasetPo;
|
|
|
+import com.lc.ibps.form.data.repository.DataTemplateRepository;
|
|
|
+import com.lc.ibps.form.data.repository.DatasetRepository;
|
|
|
import com.lc.ibps.office.api.IBpmReceivedService;
|
|
|
import com.lc.ibps.org.api.IPartyEmployeeService;
|
|
|
import com.lc.ibps.org.api.IPartyEntityService;
|
|
|
import com.lc.ibps.org.party.persistence.entity.PartyEntityPo;
|
|
|
+import com.lc.ibps.org.party.persistence.entity.PartyPositionPo;
|
|
|
import com.lc.ibps.org.party.persistence.vo.ExceptRelationVo;
|
|
|
import com.lc.ibps.org.vo.IdKeyVo;
|
|
|
-
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
+import org.slf4j.event.Level;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.*;
|
|
|
|
|
|
import static java.util.Comparator.comparing;
|
|
|
|
|
|
@@ -81,6 +83,10 @@ public class BpmReceivedProvider extends GenericProvider implements IBpmReceived
|
|
|
private IPartyEntityService partyEntityService;
|
|
|
@Autowired
|
|
|
private IPartyEmployeeService partyEmployeeService;
|
|
|
+ @Autowired
|
|
|
+ private DatasetRepository datasetRepository;
|
|
|
+ @Autowired
|
|
|
+ private DataTemplateRepository dataTemplateRepository;
|
|
|
|
|
|
@Resource
|
|
|
private ICommonDao<?> commonDao;
|
|
|
@@ -137,17 +143,12 @@ public class BpmReceivedProvider extends GenericProvider implements IBpmReceived
|
|
|
bpmTaskRepository.buildInternal(list);
|
|
|
bpmTaskRepository.removeBuildInternal();
|
|
|
}
|
|
|
- // 返回数据集合添加部门ID字段值
|
|
|
- List<Map<String,Object>> deptList = (List<Map<String, Object>>) commonDao.query(" select id_,name_ from ibps_party_org where status_ = 'actived' ");
|
|
|
if (BeanUtils.isNotEmpty(list)){
|
|
|
for (BpmTaskPo bpmTaskPo : list) {
|
|
|
- for (Map<String, Object> deptMap : deptList) {
|
|
|
- if (StringUtil.isNotEmpty(bpmTaskPo.getStartDept())){
|
|
|
- if (bpmTaskPo.getStartDept().equals(deptMap.get("name_"))) {
|
|
|
- bpmTaskPo.setStartDeptId(deptMap.get("id_").toString());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ Map<String,Object> deptId = commonDao.queryOne("select bian_zhi_bu_men_ from "+bpmTaskPo.getFrom()+" where id_ ='"+bpmTaskPo.getBizKey()+"'");
|
|
|
+ Map<String,Object> deptName = commonDao.queryOne("SELECT GROUP_CONCAT(name_ SEPARATOR ',') name_ from ibps_party_position where FIND_IN_SET(id_,'"+deptId.get("bian_zhi_bu_men_")+"')");
|
|
|
+ bpmTaskPo.setStartDept(deptName.get("name_").toString());
|
|
|
+ bpmTaskPo.setStartDeptId(deptId.get("bian_zhi_bu_men_").toString());
|
|
|
}
|
|
|
}
|
|
|
// 按照创建时间降序排序
|