Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
陈绍鑫 2024-11-19 18:05:13 +08:00
commit 4981dbff00
9 changed files with 210 additions and 94 deletions

View File

@ -185,32 +185,29 @@ public class WorkloadcfmbillFormPlugin extends AbstractFormPlugin implements Tab
"qeug_unit,qeug_decimalqty,qeug_unitprice,qeug_amounttotal,qeug_artificial,qeug_provisional," + "qeug_unit,qeug_decimalqty,qeug_unitprice,qeug_amounttotal,qeug_artificial,qeug_provisional," +
"qeug_remarks,qeug_contractid,qeug_sheetname,qeug_cumulativepreofpro,qeug_mechanicalunitprice," + "qeug_remarks,qeug_contractid,qeug_sheetname,qeug_cumulativepreofpro,qeug_mechanicalunitprice," +
"qeug_unitpriceofmainmater", new QFilter[]{q3,q4,q5}); "qeug_unitpriceofmainmater", new QFilter[]{q3,q4,q5});
if (recon_contractbills.length > 0) { for (DynamicObject contractsummarylist : recon_contractbills) {
for (int i = 0; i < recon_contractbills.length; i++) { DynamicObject add = BusinessDataServiceHelper.newDynamicObject("qeug_contractsummarylist");
DynamicObject contractsummarylist = recon_contractbills[i]; add.set("qeug_seqs", contractsummarylist.getString("qeug_seqs"));
DynamicObject add = BusinessDataServiceHelper.newDynamicObject("qeug_contractsummarylist"); add.set("qeug_projectnumber", contractsummarylist.getString("qeug_projectnumber").trim());
add.set("qeug_seqs", contractsummarylist.getString("qeug_seqs")); add.set("qeug_projectname", contractsummarylist.getString("qeug_projectname").trim());
add.set("qeug_projectnumber", contractsummarylist.getString("qeug_projectnumber").trim()); add.set("qeug_featuredescript", contractsummarylist.getString("qeug_featuredescript"));
add.set("qeug_projectname", contractsummarylist.getString("qeug_projectname").trim()); add.set("qeug_engincontent", contractsummarylist.getString("qeug_engincontent"));
add.set("qeug_featuredescript", contractsummarylist.getString("qeug_featuredescript")); add.set("qeug_unit", contractsummarylist.getString("qeug_unit"));
add.set("qeug_engincontent", contractsummarylist.getString("qeug_engincontent")); add.set("qeug_decimalqty", contractsummarylist.getBigDecimal("qeug_decimalqty"));
add.set("qeug_unit", contractsummarylist.getString("qeug_unit")); add.set("qeug_unitprice", contractsummarylist.getBigDecimal("qeug_unitprice"));
add.set("qeug_decimalqty", contractsummarylist.getBigDecimal("qeug_decimalqty")); add.set("qeug_amounttotal", contractsummarylist.getBigDecimal("qeug_amounttotal"));
add.set("qeug_unitprice", contractsummarylist.getBigDecimal("qeug_unitprice")); add.set("qeug_artificial", contractsummarylist.getBigDecimal("qeug_artificial"));
add.set("qeug_amounttotal", contractsummarylist.getBigDecimal("qeug_amounttotal")); add.set("qeug_provisional", contractsummarylist.getBigDecimal("qeug_provisional"));
add.set("qeug_artificial", contractsummarylist.getBigDecimal("qeug_artificial")); add.set("qeug_unitpriceofmainmater", contractsummarylist.getBigDecimal("qeug_unitpriceofmainmater"));
add.set("qeug_provisional", contractsummarylist.getBigDecimal("qeug_provisional")); add.set("qeug_mechanicalunitprice", contractsummarylist.getBigDecimal("qeug_mechanicalunitprice"));
add.set("qeug_unitpriceofmainmater", contractsummarylist.getBigDecimal("qeug_unitpriceofmainmater")); add.set("qeug_remarks", contractsummarylist.getString("qeug_remarks"));
add.set("qeug_mechanicalunitprice", contractsummarylist.getBigDecimal("qeug_mechanicalunitprice")); add.set("qeug_contractid", contractsummarylist.getString("qeug_contractid"));
add.set("qeug_remarks", contractsummarylist.getString("qeug_remarks")); add.set("qeug_sheetname", contractsummarylist.getString("qeug_sheetname"));
add.set("qeug_contractid", contractsummarylist.getString("qeug_contractid")); add.set("qeug_cumulativepreofpro", contractsummarylist.getString("qeug_cumulativepreofpro"));//累计完成百分比
add.set("qeug_sheetname", contractsummarylist.getString("qeug_sheetname")); add.set("qeug_workloadcfmid", String.valueOf(this.getModel().getDataEntity().getPkValue()));
add.set("qeug_cumulativepreofpro", contractsummarylist.getString("qeug_cumulativepreofpro"));//累计完成百分比 add.set("enable", "1");//使用状态
add.set("qeug_workloadcfmid",String.valueOf(this.getModel().getDataEntity().getPkValue())); add.set("status", "A");//数据状态
add.set("enable","1");//使用状态 SaveServiceHelper.save(new DynamicObject[]{add});
add.set("status","A");//数据状态
SaveServiceHelper.save(new DynamicObject[]{add});
}
} }
} }

View File

@ -38,7 +38,6 @@ public class ContractSummaryListPlugin extends AbstractListPlugin implements ILi
@Override @Override
public void beforeDoOperation(BeforeDoOperationEventArgs args) { public void beforeDoOperation(BeforeDoOperationEventArgs args) {
super.beforeDoOperation(args); super.beforeDoOperation(args);
Map<String, Object> customParams = this.getView().getFormShowParameter().getCustomParams(); Map<String, Object> customParams = this.getView().getFormShowParameter().getCustomParams();
Object Workloadcfmbill_id = customParams.get("Workloadcfmbill_id"); Object Workloadcfmbill_id = customParams.get("Workloadcfmbill_id");

View File

@ -432,7 +432,9 @@ public class BatchEvaluatePageFormPlugin extends AbstractFormPlugin implements P
indexColumnMaxNumber.add(dy.getInt("standardscore")); indexColumnMaxNumber.add(dy.getInt("standardscore"));
break; break;
case "weight": case "weight":
name = name + "(权重制:"+ dy.getBigDecimal("percent")+")"; BigDecimal percent = dy.getBigDecimal("percent");
percent = percent.setScale(2);
name = name + "(权重制:"+ percent +")";
break; break;
case "share": case "share":
name = name + "(份额制:"+ dy.getInt("portion") +")"; name = name + "(份额制:"+ dy.getInt("portion") +")";
@ -499,6 +501,14 @@ public class BatchEvaluatePageFormPlugin extends AbstractFormPlugin implements P
integerProp.setName("qeug_number" + i); integerProp.setName("qeug_number" + i);
integerProp.setDisplayName(new LocaleString(indexNames.get(i)));//标题 integerProp.setDisplayName(new LocaleString(indexNames.get(i)));//标题
integerProp.setScale(2); integerProp.setScale(2);
if ("standard".equals(scoremethod)){
Integer integer = indexColumnMaxNumber.get(i);
int intValue = integer.intValue();
String fw = "[0,"+intValue+"]";
integerProp.setDataScope(fw);
}else {
integerProp.setDataScope("[0,100]");
}
integerProp.setZeroShow(true); integerProp.setZeroShow(true);
entryType.registerSimpleProperty(integerProp); entryType.registerSimpleProperty(integerProp);
} }

View File

@ -99,10 +99,10 @@ public class ContractListDateFilterPlugin extends AbstractBillPlugIn implements
contractEntries.remove(deleteEntry); contractEntries.remove(deleteEntry);
} }
} }
this.getView().updateView("contract_entry");
} }
this.getView().updateView("contract_entry");
if (contractEntries.isEmpty()) { if (contractEntries.isEmpty()) {
this.getView().showTipNotification(ResManager.loadKDString("没有符合条件的合同,请检查。", "EvalPlanEdit_13", "repc-resm-formplugin", new Object[0])); this.getView().showTipNotification(ResManager.loadKDString("没有符合条件的合同,请检查。", "EvalPlanEdit_13", "repc-resm-formplugin", new Object[0]));
Tab tabap = (Tab) this.getView().getControl("tabap"); Tab tabap = (Tab) this.getView().getControl("tabap");

View File

@ -29,6 +29,7 @@ public class PortraitBasicsFormPlugin extends AbstractFormPlugin {
String qeug_orgnumberes = supplier1.getString("qeug_orgnumberes");//组织机构代码 String qeug_orgnumberes = supplier1.getString("qeug_orgnumberes");//组织机构代码
String qeug_regstatuses = supplier1.getString("qeug_regstatuses");//经营状态 String qeug_regstatuses = supplier1.getString("qeug_regstatuses");//经营状态
String qeug_linkman = supplier1.getString("qeug_linkman");//外部联系人 String qeug_linkman = supplier1.getString("qeug_linkman");//外部联系人
String qeug_recommender = supplier1.getString("qeug_recommender");//内部推荐人
this.getView().getModel().setValue("qeug_controllingperson", qeug_controllingperses); this.getView().getModel().setValue("qeug_controllingperson", qeug_controllingperses);
@ -36,11 +37,13 @@ public class PortraitBasicsFormPlugin extends AbstractFormPlugin {
this.getView().getModel().setValue("qeug_orgnumber", qeug_orgnumberes); this.getView().getModel().setValue("qeug_orgnumber", qeug_orgnumberes);
this.getView().getModel().setValue("qeug_regstatus", qeug_regstatuses); this.getView().getModel().setValue("qeug_regstatus", qeug_regstatuses);
this.getView().getModel().setValue("qeug_linkman", qeug_linkman); this.getView().getModel().setValue("qeug_linkman", qeug_linkman);
this.getView().getModel().setValue("qeug_recommender", qeug_recommender);
this.getView().updateView("qeug_controllingperson"); this.getView().updateView("qeug_controllingperson");
this.getView().updateView("qeug_regnumber"); this.getView().updateView("qeug_regnumber");
this.getView().updateView("qeug_orgnumber"); this.getView().updateView("qeug_orgnumber");
this.getView().updateView("qeug_regstatus"); this.getView().updateView("qeug_regstatus");
this.getView().updateView("qeug_linkman"); this.getView().updateView("qeug_linkman");
this.getView().updateView("qeug_recommender");
// this.getView().updateView(); // this.getView().updateView();
} }

View File

@ -47,31 +47,38 @@ public class TycQzSupplierFormPlugin extends AbstractFormPlugin {
public void beforeItemClick(BeforeItemClickEvent evt) { public void beforeItemClick(BeforeItemClickEvent evt) {
if (evt.getItemKey().equals("qeug_preaudit")) { if (evt.getItemKey().equals("qeug_preaudit")) {
DynamicObject regSupplier = BusinessDataServiceHelper.loadSingle(this.getModel().getDataEntity().getPkValue(), "resm_regsupplier"); try {
String socode = regSupplier.getString("societycreditcode"); DynamicObject regSupplier = BusinessDataServiceHelper.loadSingle(this.getModel().getDataEntity().getPkValue(), "resm_regsupplier");
String personType = regSupplier.getString("persontype"); String socode = regSupplier.getString("societycreditcode");
if (!PersontypeEnum.PERSONAL.getVal().equals(personType) && StringUtils.isEmpty(socode)) { String personType = regSupplier.getString("persontype");
this.getView().showMessage(ResManager.loadKDString("社会统一信用代码不能为空。", "ImportRegSupplierList_2", "repc-resm-formplugin", new Object[0])); if (!PersontypeEnum.PERSONAL.getVal().equals(personType) && StringUtils.isEmpty(socode)) {
this.getView().showMessage(ResManager.loadKDString("社会统一信用代码不能为空。", "ImportRegSupplierList_2", "repc-resm-formplugin", new Object[0]));
evt.setCancel(true);
return;
}
OperationResult result = OperationServiceHelper.executeOperate("save", "resm_regsupplier", new DynamicObject[]{regSupplier}, OperateOption.create());
if (!result.isSuccess()) {
evt.setCancel(true);
StringJoiner joiner = new StringJoiner("\n");
result.getAllErrorOrValidateInfo().forEach((info) -> {
joiner.add(info.getMessage());
});
this.getView().showMessage(joiner.toString());
return;
}
boolean isSuccess = SupplierAptUtils.checkAptitudeFile(this.getView(), regSupplier);
if (!isSuccess) {
evt.setCancel(true);
return;
}
}catch (Exception e){
this.getView().showMessage(ResManager.loadKDString("请先保存", "ImportRegSupplierList_2", "repc-resm-formplugin", new Object[0]));
evt.setCancel(true); evt.setCancel(true);
return;
} }
OperationResult result = OperationServiceHelper.executeOperate("save", "resm_regsupplier", new DynamicObject[]{regSupplier}, OperateOption.create());
if (!result.isSuccess()) {
evt.setCancel(true);
StringJoiner joiner = new StringJoiner("\n");
result.getAllErrorOrValidateInfo().forEach((info) -> {
joiner.add(info.getMessage());
});
this.getView().showMessage(joiner.toString());
return;
}
boolean isSuccess = SupplierAptUtils.checkAptitudeFile(this.getView(), regSupplier);
if (!isSuccess) {
evt.setCancel(true);
return;
}
} }
} }

View File

@ -35,7 +35,8 @@ public class RegisteredFinishregOPPlugin extends AbstractOperationServicePlugIn
regSupplier.set("qeug_orgnumberes",resp_registered.getString("qeug_orgnumberes"));//组织机构代码 regSupplier.set("qeug_orgnumberes",resp_registered.getString("qeug_orgnumberes"));//组织机构代码
regSupplier.set("qeug_regstatuses",resp_registered.getString("qeug_regstatuses"));//经营状态 regSupplier.set("qeug_regstatuses",resp_registered.getString("qeug_regstatuses"));//经营状态
regSupplier.set("qeug_linkman",resp_registered.getString("qeug_linkman"));//外部联系人 regSupplier.set("qeug_linkman",resp_registered.getString("qeug_linkman"));//外部联系人
regSupplier.set("recommender",resp_registered.getDynamicObject("recommender"));//外部联系人 // regSupplier.set("recommender",resp_registered.getDynamicObject("recommender"));//外部联系人
regSupplier.set("qeug_recommender",resp_registered.getDynamicObject("qeug_recommender"));//内部推荐人
SaveServiceHelper.save(new DynamicObject[]{regSupplier}); SaveServiceHelper.save(new DynamicObject[]{regSupplier});
DobeDWUtils.saveLog("注册供应商", DobeDWUtils.saveLog("注册供应商",
"注册供应商",null, null, "注册供应商",null, null,

View File

@ -0,0 +1,88 @@
package shkd.repc.task;
import kd.bos.context.RequestContext;
import kd.bos.dataentity.OperateOption;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.entity.operate.OperateOptionConst;
import kd.bos.entity.operate.result.OperationResult;
import kd.bos.exception.KDException;
import kd.bos.form.IFormView;
import kd.bos.logging.Log;
import kd.bos.logging.LogFactory;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.schedule.executor.AbstractTask;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.QueryServiceHelper;
import kd.bos.servicehelper.operation.OperationServiceHelper;
import kd.bos.servicehelper.operation.SaveServiceHelper;
import kd.sdk.plugin.Plugin;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class DobeAutoEvaluateTask extends AbstractTask implements Plugin {
private static Log log = LogFactory.getLog(DobeDWaccountTask.class);
/**
* 自动评估超时的我的评估
* @param requestContext
* @param map
* @throws KDException
*/
@Override
public void execute(RequestContext requestContext, Map<String, Object> map) throws KDException {
//todo:查询所有评估状态未完成且已经超时的我的评估
QFilter eval_QF = new QFilter("billstatus", QCP.equals,"A");//提交评分状态为未完成
// 德必集团-2024-三季度-定期评估任务7
// eval_QF.and("evaltask.name",QCP.equals,"德必集团-2024-三季度-定期评估任务【7】");
eval_QF.and("evalenddate",QCP.less_equals,new Date());//当前日期超过评估截止日期
DynamicObjectCollection queries = QueryServiceHelper.query("resm_myeval_new", "id", eval_QF.toArray());
for (DynamicObject query : queries) {
long evalId = query.getLong("id");//获取评估单主键
DynamicObject resm_myeval_new = BusinessDataServiceHelper.loadSingle(evalId, "resm_myeval_new");//加载评估单完整数据
String myevalname = resm_myeval_new.getDynamicObject("evaltask").getString("name");
DynamicObject evalscheme = resm_myeval_new.getDynamicObject("evalscheme");
DynamicObject resm_evalschemef7 = BusinessDataServiceHelper.loadSingle(evalscheme.getPkValue(), "resm_evalschemef7");
String scoremethod = resm_evalschemef7.getString("scoremethod");//计分方式
BigDecimal evalscore = new BigDecimal(80);//初始化评估得分
DynamicObjectCollection entry_stadardscore = resm_myeval_new.getDynamicObjectCollection("entry_stadardscore");//标准项
if ("weight".equals(scoremethod) || "share".equals(scoremethod)){//当评分制为权重制或者份额制时评分为100分的80%,即固定为80分
for (DynamicObject dy : entry_stadardscore) {
dy.set("std_score", new BigDecimal(80));
}
}else if ("standard".equals(scoremethod)){//当评分制为标准分时评分为标准分的80%
for (DynamicObject dy : entry_stadardscore) {
BigDecimal std_standardscore = dy.getBigDecimal("std_standardscore");//获取标准分
std_standardscore = std_standardscore.multiply(new BigDecimal(0.8));
dy.set("std_inputscore",std_standardscore);
dy.set("std_score",std_standardscore);
}
}
resm_myeval_new.set("evalscore",evalscore);
SaveServiceHelper.save(new DynamicObject[]{resm_myeval_new});
OperateOption option= OperateOption.create();
//已经验权执行操作服务时不需要再次验权
option.setVariableValue(OperateOptionConst.ISHASRIGHT, String.valueOf(true));
// 跳过系统默认的特殊数据权限
option.setVariableValue(OperateOptionConst.SKIPCHECKPERMISSION,String.valueOf(true));
OperationResult operationResult = OperationServiceHelper.executeOperate("submit", "resm_myeval_new", new DynamicObject[]{resm_myeval_new}, option);
boolean success = operationResult.isSuccess();
if (!success) {
String message = operationResult.getMessage();
String allErrorInfo = operationResult.getValidateResult().getValidateErrors().get(0).getAllErrorInfo().get(0).getMessage();
log.info("评估任务:" + myevalname +message +"-"+ allErrorInfo);
}
}
}
}

View File

@ -22,22 +22,24 @@ import java.util.*;
import static shkd.utils.OAUtils.*; import static shkd.utils.OAUtils.*;
public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler { public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
private static final Log logger = LogFactory.getLog(todoZyTaskServiceHandler.class); private static final Log logger = LogFactory.getLog(todoZyTaskServiceHandler.class);
/** /**
* 通过人员id获取人员信息 * 通过人员id获取人员信息
* @param userIds 人员id集合 *
* @param userIds 人员id集合
* @param approvers 人员信息集合 * @param approvers 人员信息集合
*/ */
private List<DynamicObject> getApprovers(List<Long> userIds,List<DynamicObject> approvers){ private List<DynamicObject> getApprovers(List<Long> userIds, List<DynamicObject> approvers) {
for (Long userId : userIds) { for (Long userId : userIds) {
DynamicObject user = BusinessDataServiceHelper.loadSingle(userId, "bos_user"); DynamicObject user = BusinessDataServiceHelper.loadSingle(userId, "bos_user");
approvers.add(user); approvers.add(user);
} }
return approvers; return approvers;
} }
@Override @Override
public void createToDo(MessageContext messageContext, ToDoInfo toDoInfo) { public void createToDo(MessageContext messageContext, ToDoInfo toDoInfo) {
System.out.println("createToDo"); System.out.println("createToDo");
@ -62,7 +64,7 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
// 节点名称 // 节点名称
String executionName = ""; String executionName = "";
DynamicObject execution = BusinessDataServiceHelper.loadSingle(executionId, "wf_execution"); DynamicObject execution = BusinessDataServiceHelper.loadSingle(executionId, "wf_execution");
if(execution != null){ if (execution != null) {
executionName = execution.getString("activityname");// 节点名称 executionName = execution.getString("activityname");// 节点名称
} }
//获取Url //获取Url
@ -99,19 +101,19 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
if (StringUtils.isNotEmpty(oaToken)) { if (StringUtils.isNotEmpty(oaToken)) {
//todo OA人员绑定接口 //todo OA人员绑定接口
thirdpartyUser(approversLists, oaToken,billNo); thirdpartyUser(approversLists, oaToken, billNo);
HashMap<String, Object> thirdPartyMap = new HashMap<>(); HashMap<String, Object> thirdPartyMap = new HashMap<>();
thirdPartyMap.put("oaToken",oaToken); thirdPartyMap.put("oaToken", oaToken);
thirdPartyMap.put("approversLists",approversLists); thirdPartyMap.put("approversLists", approversLists);
thirdPartyMap.put("taskId",taskId); thirdPartyMap.put("taskId", taskId);
thirdPartyMap.put("title",title); thirdPartyMap.put("title", title);
thirdPartyMap.put("startName",startName); thirdPartyMap.put("startName", startName);
thirdPartyMap.put("createDateStr",createDateStr); thirdPartyMap.put("createDateStr", createDateStr);
thirdPartyMap.put("url",url); thirdPartyMap.put("url", url);
thirdPartyMap.put("url1",url1); thirdPartyMap.put("url1", url1);
thirdPartyMap.put("billNo",billNo); thirdPartyMap.put("billNo", billNo);
thirdPartyMap.put("startNumber",startNumber);//发起人 thirdPartyMap.put("startNumber", startNumber);//发起人
//推送OA待办新增接口 //推送OA待办新增接口
thirdParty(thirdPartyMap); thirdParty(thirdPartyMap);
@ -132,13 +134,13 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
String decisionType = ""; String decisionType = "";
if (operationLogByTaskId.size() > 0) { if (operationLogByTaskId.size() > 0) {
decisionType = ServiceFactory.getService(WorkflowService.class).getTaskService().getOperationLogByTaskId(taskId).get(0).getDecisionType(); decisionType = ServiceFactory.getService(WorkflowService.class).getTaskService().getOperationLogByTaskId(taskId).get(0).getDecisionType();
}else { } else {
return; return;
} }
String subState = "0"; String subState = "0";
//驳回 //驳回
if("reject".equals(decisionType)){ if ("reject".equals(decisionType)) {
subState = "3"; subState = "3";
} }
@ -153,11 +155,11 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
if (StringUtils.isNotEmpty(oaToken)) { if (StringUtils.isNotEmpty(oaToken)) {
HashMap<String, Object> updateStateMap = new HashMap<>(); HashMap<String, Object> updateStateMap = new HashMap<>();
updateStateMap.put("oaToken",oaToken); updateStateMap.put("oaToken", oaToken);
updateStateMap.put("taskId",taskId); updateStateMap.put("taskId", taskId);
updateStateMap.put("state","1"); updateStateMap.put("state", "1");
updateStateMap.put("subState",subState); updateStateMap.put("subState", subState);
updateStateMap.put("billNo",billNo); updateStateMap.put("billNo", billNo);
//推送OA待办变更接口 //推送OA待办变更接口
updatePendingState(updateStateMap); updatePendingState(updateStateMap);
@ -196,11 +198,11 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
if (StringUtils.isNotEmpty(oaToken)) { if (StringUtils.isNotEmpty(oaToken)) {
HashMap<String, Object> updateStateMap = new HashMap<>(); HashMap<String, Object> updateStateMap = new HashMap<>();
updateStateMap.put("oaToken",oaToken); updateStateMap.put("oaToken", oaToken);
updateStateMap.put("taskId",taskId); updateStateMap.put("taskId", taskId);
updateStateMap.put("state","1"); updateStateMap.put("state", "1");
updateStateMap.put("subState",subState); updateStateMap.put("subState", subState);
updateStateMap.put("billNo",billNo); updateStateMap.put("billNo", billNo);
//推送OA待办变更接口 //推送OA待办变更接口
updatePendingState(updateStateMap); updatePendingState(updateStateMap);
@ -211,9 +213,20 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
@Override @Override
public void sendMessage(MessageContext messageContext, MessageInfo message) { public void sendMessage(MessageContext messageContext, MessageInfo message) {
super.sendMessage(messageContext, message); super.sendMessage(messageContext, message);
//获取单据编码 //https://developer.kingdee.com/article/195641480978054400?productLineId=29&lang=zh-CN
// String billNo = messageContext.getBillNo(); //JSONObject.parseObject(String.valueOf(message.getParams().get("messageContext")));
String billNo =message.getNestBillno();
Map<String, Object> params = message.getParams();
String billNo = "";
Long taskId = 0L;
if (params != null) {
String messagContext = String.valueOf(params.get("messageContext"));
JSONObject jsonObject = JSONObject.parseObject(messagContext);
if (null != jsonObject) {
billNo = jsonObject.getString("billNo");//获取单据编码
taskId = jsonObject.getLong("taskId");//获取当前任务ID
}
}
//消息内容 //消息内容
String content = message.getContent(); String content = message.getContent();
//消息时间 //消息时间
@ -222,9 +235,7 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
Date createDate = message.getSendTime(); Date createDate = message.getSendTime();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String createDateStr = sdf.format(createDate); String createDateStr = sdf.format(createDate);
//获取当前任务ID
// Long taskId = messageContext.getTaskId();
Long taskId = message.getId();
//获取审批人集合 //获取审批人集合
List<DynamicObject> approvers = new ArrayList<>(); List<DynamicObject> approvers = new ArrayList<>();
@ -260,15 +271,15 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
if (StringUtils.isNotEmpty(oaToken)) { if (StringUtils.isNotEmpty(oaToken)) {
HashMap<String, Object> thirdPartyMap = new HashMap<>(); HashMap<String, Object> thirdPartyMap = new HashMap<>();
thirdPartyMap.put("oaToken",oaToken); thirdPartyMap.put("oaToken", oaToken);
thirdPartyMap.put("approversLists",approversLists); thirdPartyMap.put("approversLists", approversLists);
thirdPartyMap.put("taskId",taskId); thirdPartyMap.put("taskId", taskId);
thirdPartyMap.put("content",content); thirdPartyMap.put("content", content);
thirdPartyMap.put("createDateStr",createDateStr); thirdPartyMap.put("createDateStr", createDateStr);
thirdPartyMap.put("url",url); thirdPartyMap.put("url", url);
thirdPartyMap.put("url1",url1); thirdPartyMap.put("url1", url1);
thirdPartyMap.put("billNo",billNo); thirdPartyMap.put("billNo", billNo);
thirdPartyMap.put("startNumber",startNumber);//发起人 thirdPartyMap.put("startNumber", startNumber);//发起人
//推送OA消息新增接口 //推送OA消息新增接口
thirdpartyMessage(thirdPartyMap); thirdpartyMessage(thirdPartyMap);