|
|
@@ -10,6 +10,8 @@ import java.util.Set;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
+import org.activiti.engine.impl.util.json.JSONArray;
|
|
|
+import org.activiti.engine.impl.util.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -293,6 +295,27 @@ public class BpmApproveServiceImpl extends BpmApprovalServiceImpl {
|
|
|
po.setQualfieds(JacksonUtil.toJsonString(result));
|
|
|
po.setQualifiedExecutor(result);
|
|
|
}
|
|
|
+
|
|
|
+ if (StringUtil.isEmpty(auditor) && StringUtil.isNotEmpty(po.getQualfieds())) {
|
|
|
+ JSONArray jsonArray = new JSONArray(po.getQualfieds());
|
|
|
+ StringBuilder userId = new StringBuilder();
|
|
|
+ StringBuilder userName = new StringBuilder();
|
|
|
+ for (int i = 0; i < jsonArray.length(); i++) {
|
|
|
+ JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
+ String id = jsonObject.getString("id");
|
|
|
+ userId.append(id).append(",");
|
|
|
+ APIResult<PartyEntityPo> entityResult = partyEntityService.getByIdPartyType(id, null);
|
|
|
+ if(entityResult.isSuccess()) {
|
|
|
+ if(BeanUtils.isNotEmpty(entityResult.getData())) {
|
|
|
+ userName.append(entityResult.getData().getName()).append(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ userId.deleteCharAt(userId.length() - 1);
|
|
|
+ userName.deleteCharAt(userName.length() - 1);
|
|
|
+ po.setAuditor(userId.toString());
|
|
|
+ po.setAuditorName(userName.toString());
|
|
|
+ }
|
|
|
|
|
|
// 设置节点颜色
|
|
|
po.setNodeColor(colorMap.get(po.getStatus()));
|