产值确认值改变计算比例,待办消息优化,注册完成时将信息携带到潜在供应商,
This commit is contained in:
parent
4981dbff00
commit
2d302f91d3
|
@ -0,0 +1,35 @@
|
||||||
|
package shkd.repc.recon.opplugin;
|
||||||
|
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||||
|
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||||
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
|
||||||
|
public class WorkloadcfSubmitOPPlugin extends AbstractOperationServicePlugIn {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||||||
|
super.afterExecuteOperationTransaction(e);
|
||||||
|
|
||||||
|
String operationKey = e.getOperationKey();
|
||||||
|
if ("submit".equals(operationKey)){
|
||||||
|
DynamicObject[] dataEntities = e.getDataEntities();
|
||||||
|
DynamicObject dataEntity = dataEntities[0];
|
||||||
|
BigDecimal latestoriprice = dataEntity.getBigDecimal("latestoriprice"); // 合同最新造价
|
||||||
|
BigDecimal sumworkloadamt = dataEntity.getBigDecimal("sumworkloadamt"); // 累计已完成产值(含税)
|
||||||
|
|
||||||
|
BigDecimal result = BigDecimal.ZERO; // 初始化结果
|
||||||
|
if (latestoriprice != null && latestoriprice.compareTo(BigDecimal.ZERO) != 0) { // 确保价格不为0且不为null
|
||||||
|
if (sumworkloadamt != null && sumworkloadamt.compareTo(BigDecimal.ZERO) != 0) { // 确保累计已完成产值不为0且不为null
|
||||||
|
// 计算: (sumworkloadamt / latestoriprice) * 100
|
||||||
|
result = sumworkloadamt.divide(latestoriprice, 2, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)); // 四舍五入到10位小数, 乘以100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataEntity.set("qeug_czzb", result); // 累计已完成产值占比
|
||||||
|
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -34,9 +34,10 @@ public class RegisteredFinishregOPPlugin extends AbstractOperationServicePlugIn
|
||||||
regSupplier.set("qeug_regnumberes",resp_registered.getString("qeug_regnumberes"));//企业注册号
|
regSupplier.set("qeug_regnumberes",resp_registered.getString("qeug_regnumberes"));//企业注册号
|
||||||
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"));//内部推荐人
|
regSupplier.set("qeug_recommender",resp_registered.getString("qeug_recommender"));//内部推荐人
|
||||||
SaveServiceHelper.save(new DynamicObject[]{regSupplier});
|
SaveServiceHelper.save(new DynamicObject[]{regSupplier});
|
||||||
DobeDWUtils.saveLog("注册供应商",
|
DobeDWUtils.saveLog("注册供应商",
|
||||||
"注册供应商",null, null,
|
"注册供应商",null, null,
|
||||||
|
|
|
@ -242,7 +242,9 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
|
||||||
List<Long> userIds = message.getUserIds(); // 审批人ID集合
|
List<Long> userIds = message.getUserIds(); // 审批人ID集合
|
||||||
List<DynamicObject> approversLists = getApprovers(userIds, approvers);
|
List<DynamicObject> approversLists = getApprovers(userIds, approvers);
|
||||||
//获取任务创建人 // 信息发送人
|
//获取任务创建人 // 信息发送人
|
||||||
Long startUserId = message.getSenderId();
|
// ServiceFactory.getService(WorkflowService.class).getTaskService().getOperationLogByTaskId(taskId).get(0).getDecisionType();
|
||||||
|
Long startUserId = ServiceFactory.getService(WorkflowService.class).getTaskService().getOperationLogByTaskId(taskId).get(0).getOwnerId();
|
||||||
|
// Long startUserId = message.getSenderId();
|
||||||
// Long startUserId = messageContext.getStartUserId(); // 审批实例发起人id
|
// Long startUserId = messageContext.getStartUserId(); // 审批实例发起人id
|
||||||
String startNumber = "";
|
String startNumber = "";
|
||||||
String startName = "";
|
String startName = "";
|
||||||
|
|
Loading…
Reference in New Issue