|
|
@@ -10,6 +10,7 @@ import com.lc.ibps.cloud.entity.APIRequest;
|
|
|
import com.lc.ibps.cloud.entity.APIRequestParameter;
|
|
|
import com.lc.ibps.cloud.entity.APIResult;
|
|
|
import com.lc.ibps.org.api.IPartyEmployeeService;
|
|
|
+import com.lc.ibps.org.party.persistence.entity.DefaultPartyUserPo;
|
|
|
import com.lc.ibps.org.party.persistence.entity.PartyEmployeePo;
|
|
|
import com.lc.ibps.sysdata.dao.CronNotifyDao;
|
|
|
import com.lc.ibps.sysdata.entity.SysDataContextEntity;
|
|
|
@@ -44,37 +45,41 @@ public class CronNotifyServiceImpl implements CronNotifyService {
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public synchronized List<JSONObject> selectCronNotifyData() {
|
|
|
- JSONObject jsonObject = new JSONObject();
|
|
|
- jsonObject.put("userId", ContextUtil.getCurrentUserId()); //当前用户id
|
|
|
- jsonObject.put("orgId", ContextUtil.getCurrentOrgId()); //当前用户部门id
|
|
|
+ //JSONObject jsonObject = new JSONObject();
|
|
|
+ //jsonObject.put("userId", "1166772226624585728"); //当前用户id
|
|
|
+ //jsonObject.put("orgId", ContextUtil.getCurrentOrgId()); //当前用户部门id
|
|
|
|
|
|
- List<JSONObject> json = cronNotifyDao.getCronNotifyData(jsonObject); //查询对应人员的任务 && 后期定时任务改全局
|
|
|
+ List<JSONObject> json = cronNotifyDao.getCronNotifyData(); //查询对应人员的任务 && 后期定时任务改全局
|
|
|
if(json.size()<=0){
|
|
|
return json;
|
|
|
}
|
|
|
HashMap<String, List<String>> map = this.getMap(json); //获取id集合 和 task集合
|
|
|
//根据task开启多个流程任务。
|
|
|
List<String> task = map.get("task");
|
|
|
- List<String> subject = map.get("subject");
|
|
|
|
|
|
if(task!=null && task.size()>0) {
|
|
|
|
|
|
for (int i = 0; i < task.size(); i++) {
|
|
|
if(task.get(i)!=null && !task.get(i).isEmpty() ) {
|
|
|
int index = i;
|
|
|
+ String userId = map.get("userId").get(index);
|
|
|
+ DefaultPartyUserPo user = new DefaultPartyUserPo();
|
|
|
+ user.setUserId(userId);
|
|
|
+ ContextUtil.setCurrentUser(user);
|
|
|
APIResult<Void> result = iBpmInstProvider.startAndName(
|
|
|
this.getParameters(task.get(index),
|
|
|
map.get("fieldName").get(index),
|
|
|
map.get("fieldValue").get(index),
|
|
|
map.get("jsonData").get(index)),
|
|
|
map.get("subject").get(index),
|
|
|
- map.get("userId").get(index),
|
|
|
+ userId,
|
|
|
map.get("userName").get(index));
|
|
|
//devncq
|
|
|
String id = map.get("id").get(index);
|
|
|
String proInstId = (String)result.getVariable("proInstId");
|
|
|
JSONObject jsonObj = new JSONObject();
|
|
|
jsonObj.put("id",id);
|
|
|
+ jsonObj.put("userId", userId);
|
|
|
jsonObj.put("proInstId", proInstId);
|
|
|
if(proInstId!=null)
|
|
|
cronNotifyDao.updateProInstId(jsonObj);
|