Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
f97dea2d99
|
@ -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});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -77,7 +77,10 @@ public class PushOASupplierOPPlugin extends AbstractOperationServicePlugIn {
|
|||
|
||||
String code = official_supplier.getString("qeug_oacode");
|
||||
String name = official_supplier.getString("name");
|
||||
String taxpayerid = official_supplier.getString("tx_register_no");
|
||||
String taxpayerid = official_supplier.getString("tx_register_no");//纳税人识别号
|
||||
String societycreditcode = official_supplier.getString("societycreditcode");//统一社会信用代码
|
||||
String artificialpersoncard = official_supplier.getString("artificialpersoncard");//法人代表身份证号码
|
||||
String persontype = official_supplier.getString("persontype");//法人类型
|
||||
String shortname = official_supplier.getString("simplename");
|
||||
String legalbody = official_supplier.getString("artificialperson");
|
||||
Date createTime = official_supplier.getDate("createtime");
|
||||
|
@ -89,7 +92,13 @@ public class PushOASupplierOPPlugin extends AbstractOperationServicePlugIn {
|
|||
customerBody = new JSONObject();
|
||||
customerBody.put("code", code);//"客户编码:传递OA回执的code,如果没有则为空,OA判断新增后返回code",
|
||||
customerBody.put("name", name);//"客户名称",
|
||||
customerBody.put("taxpayerid", taxpayerid);//"纳税人登记号/身份证号 唯一值不可变",
|
||||
//PERSONAL 个人
|
||||
if ("PERSONAL".equals(persontype)) {
|
||||
customerBody.put("taxpayerid", artificialpersoncard);//"纳税人登记号/身份证号 唯一值不可变",
|
||||
}else {
|
||||
customerBody.put("taxpayerid", societycreditcode);//"纳税人登记号/身份证号 唯一值不可变",
|
||||
|
||||
}
|
||||
customerBody.put("shortname", shortname);//"客户简称",
|
||||
customerBody.put("custprop", "0");//"客户类型:默认0",
|
||||
customerBody.put("enablestate", "2");//"客户状态:默认2",
|
||||
|
@ -118,7 +127,7 @@ public class PushOASupplierOPPlugin extends AbstractOperationServicePlugIn {
|
|||
}
|
||||
custBankaccBody.put("accname", entry_bank.getString("accountname"));//"银行账号名称",
|
||||
custBankaccBody.put("pk_banktype", "");//todo:"银行类别:例如招商银行",
|
||||
String persontype = entry_bank.getString("persontype");//法人类型
|
||||
// String persontype = entry_bank.getString("persontype");//法人类型
|
||||
//法人企业 LEGALENTERPRISE
|
||||
//非法人企业 UNINCORPORATED
|
||||
//非企业单位 NONENTERPRISE
|
||||
|
|
|
@ -34,9 +34,10 @@ public class RegisteredFinishregOPPlugin extends AbstractOperationServicePlugIn
|
|||
regSupplier.set("qeug_regnumberes",resp_registered.getString("qeug_regnumberes"));//企业注册号
|
||||
regSupplier.set("qeug_orgnumberes",resp_registered.getString("qeug_orgnumberes"));//组织机构代码
|
||||
regSupplier.set("qeug_regstatuses",resp_registered.getString("qeug_regstatuses"));//经营状态
|
||||
|
||||
regSupplier.set("qeug_linkman",resp_registered.getString("qeug_linkman"));//外部联系人
|
||||
// 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});
|
||||
DobeDWUtils.saveLog("注册供应商",
|
||||
"注册供应商",null, null,
|
||||
|
|
|
@ -242,7 +242,9 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
|
|||
List<Long> userIds = message.getUserIds(); // 审批人ID集合
|
||||
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
|
||||
String startNumber = "";
|
||||
String startName = "";
|
||||
|
|
Loading…
Reference in New Issue