1.印章管理员逻辑优化(取消甲方类型条件)
2.待办逻辑优化(处理方法变更为已办) 3.定标生成合同携带采购方式,税率null,甲方,业务体系 S
This commit is contained in:
parent
8fe433e092
commit
9fd115b6ac
|
@ -131,33 +131,35 @@ public class IWorkParticipantPlugin implements IWorkflowPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleContractBill(DynamicObject entity, List<Long> currentApprover) {
|
private void handleContractBill(DynamicObject entity, List<Long> currentApprover) {
|
||||||
String partyatype = entity.getString("partyatype"); // 甲方类别
|
// String partyatype = entity.getString("partyatype"); // 甲方类别
|
||||||
if ("qeug_recon_developer".equals(partyatype)) {
|
// if ("qeug_recon_developer".equals(partyatype)) {
|
||||||
DynamicObject dynamicObject = entity.getDynamicObject("multitypepartya"); // 甲方
|
DynamicObject dynamicObject = entity.getDynamicObject("multitypepartya"); // 甲方
|
||||||
addApprover(currentApprover, dynamicObject, "qeug_userfield2", "印章管理员");
|
addApprover(currentApprover, dynamicObject, "qeug_userfield2", "印章管理员");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handlePayReqBill(DynamicObject entity, List<Long> currentApprover) {
|
private void handlePayReqBill(DynamicObject entity, List<Long> currentApprover) {
|
||||||
DynamicObject contractbill = entity.getDynamicObject("contractbill"); // 付款申请_获取选择的合同
|
DynamicObject contractbill = entity.getDynamicObject("contractbill"); // 付款申请_获取选择的合同
|
||||||
if (contractbill != null) {
|
if (contractbill != null) {
|
||||||
contractbill = BusinessDataServiceHelper.loadSingle(contractbill.getPkValue(), "recon_contractbill");
|
contractbill = BusinessDataServiceHelper.loadSingle(contractbill.getPkValue(), "recon_contractbill");
|
||||||
String partyatype1 = contractbill.getString("partyatype"); // 甲方类别
|
// String partyatype1 = contractbill.getString("partyatype"); // 甲方类别
|
||||||
if ("qeug_recon_developer".equals(partyatype1)) {
|
// if ("qeug_recon_developer".equals(partyatype1)) {
|
||||||
DynamicObject dynamicObject = contractbill.getDynamicObject("multitypepartya"); // 甲方
|
DynamicObject dynamicObject = contractbill.getDynamicObject("multitypepartya"); // 甲方
|
||||||
addApprover(currentApprover, dynamicObject, "qeug_userfield", "园区会计");
|
addApprover(currentApprover, dynamicObject, "qeug_userfield", "园区会计");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addApprover(List<Long> currentApprover, DynamicObject dynamicObject, String field, String role) {
|
public static void addApprover(List<Long> currentApprover, DynamicObject dynamicObject, String field, String role) {
|
||||||
if (dynamicObject != null) {
|
if (dynamicObject != null) {
|
||||||
dynamicObject = BusinessDataServiceHelper.loadSingle(dynamicObject.getPkValue(), "qeug_recon_developer");
|
dynamicObject = BusinessDataServiceHelper.loadSingle(dynamicObject.getPkValue(), "qeug_recon_developer");
|
||||||
DynamicObject approver = dynamicObject.getDynamicObject(field);
|
if (null != dynamicObject) {
|
||||||
if (approver != null) {
|
DynamicObject approver = dynamicObject.getDynamicObject(field);
|
||||||
Long id = approver.getLong("id");
|
if (approver != null) {
|
||||||
currentApprover.add(id);
|
Long id = approver.getLong("id");
|
||||||
logger.info("添加参与人(" + role + "):" + id + " " + approver.getString("name"));
|
currentApprover.add(id);
|
||||||
|
logger.info("添加参与人(" + role + "):" + id + " " + approver.getString("name"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,11 +41,11 @@ public class IWorkParticipantsPlugin implements IWorkflowPlugin {
|
||||||
DynamicObject contractbill = entity.getDynamicObject("contractbill"); // 付款申请_获取选择的合同
|
DynamicObject contractbill = entity.getDynamicObject("contractbill"); // 付款申请_获取选择的合同
|
||||||
if (contractbill != null) {
|
if (contractbill != null) {
|
||||||
contractbill = BusinessDataServiceHelper.loadSingle(contractbill.getPkValue(), "recon_contractbill");
|
contractbill = BusinessDataServiceHelper.loadSingle(contractbill.getPkValue(), "recon_contractbill");
|
||||||
String partyatype1 = contractbill.getString("partyatype"); // 甲方类别
|
// String partyatype1 = contractbill.getString("partyatype"); // 甲方类别
|
||||||
if ("qeug_recon_developer".equals(partyatype1)) {
|
// if ("qeug_recon_developer".equals(partyatype1)) {
|
||||||
DynamicObject dynamicObject = contractbill.getDynamicObject("multitypepartya"); // 甲方
|
DynamicObject dynamicObject = contractbill.getDynamicObject("multitypepartya"); // 甲方
|
||||||
addApprover(currentApprover, dynamicObject, "qeug_userfield1", "资金出纳");
|
addApprover(currentApprover, dynamicObject, "qeug_userfield1", "资金出纳");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,132 @@
|
||||||
package shkd.repc.recon.formplugin;
|
package shkd.repc.recon.formplugin;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.shaded.com.google.common.collect.Lists;
|
||||||
import kd.bos.bill.AbstractBillPlugIn;
|
import kd.bos.bill.AbstractBillPlugIn;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.dataentity.metadata.IDataEntityType;
|
||||||
|
import kd.bos.entity.datamodel.IDataModel;
|
||||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||||
|
import kd.bos.form.IFormView;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
|
|
||||||
import java.util.EventObject;
|
import java.util.EventObject;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ContractProjectFormPlugin extends AbstractBillPlugIn {
|
public class ContractProjectFormPlugin extends AbstractBillPlugIn {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterCreateNewData(EventObject e) {
|
||||||
|
super.afterCreateNewData(e);
|
||||||
|
|
||||||
|
IFormView parentView = this.getView().getParentView();
|
||||||
|
if (null != parentView) {
|
||||||
|
parentView = parentView.getParentView();
|
||||||
|
if (null != parentView) {
|
||||||
|
IDataModel model = parentView.getModel();
|
||||||
|
DynamicObject dataEntity = model.getDataEntity();
|
||||||
|
IDataEntityType dataEntityType = dataEntity.getDataEntityType();
|
||||||
|
String name = dataEntityType.getName();
|
||||||
|
if ("rebm_decision".equals(name)) {
|
||||||
|
DynamicObject org = (DynamicObject)this.getView().getModel().getValue("org");
|
||||||
|
DynamicObject contractbill = this.getView().getModel().getDataEntity();
|
||||||
|
contractbill = BusinessDataServiceHelper.loadSingle(contractbill.getPkValue(), "recon_contractbill");
|
||||||
|
|
||||||
|
if (null != org) {
|
||||||
|
String qeugCombofield = org.getString("qeug_combofield");//业务体系
|
||||||
|
contractbill.set("qeug_combofield",qeugCombofield);
|
||||||
|
contractbill.set("partyatype","qeug_recon_developer");//甲方类别:财务组织
|
||||||
|
org = BusinessDataServiceHelper.loadSingle(org.getPkValue(),"bos_org");
|
||||||
|
DynamicObject qeug_recon_orgrelation = BusinessDataServiceHelper.loadSingle("qeug_recon_orgrelation",
|
||||||
|
new QFilter[]{new QFilter("number", QCP.equals, org.getString("number"))});
|
||||||
|
if (null != qeug_recon_orgrelation) {
|
||||||
|
//行政与财务组织对应关系
|
||||||
|
qeug_recon_orgrelation = BusinessDataServiceHelper.loadSingle(qeug_recon_orgrelation.getPkValue(),"qeug_recon_orgrelation");
|
||||||
|
//甲方
|
||||||
|
DynamicObject qeug_recon_developer = BusinessDataServiceHelper.loadSingle("qeug_recon_developer",
|
||||||
|
new QFilter[]{new QFilter("number", QCP.equals, qeug_recon_orgrelation.getString("qeug_companynumber"))});
|
||||||
|
if (null != qeug_recon_developer) {
|
||||||
|
contractbill.set("multitypepartya",qeug_recon_developer);//甲方
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DynamicObject bidproject = contractbill.getDynamicObject("bidproject");//定标名称
|
||||||
|
if (null != bidproject) {
|
||||||
|
DynamicObject bidmode = bidproject.getDynamicObject("bidmode");//采购方式
|
||||||
|
if (null != bidmode) {
|
||||||
|
contractbill.set("qeug_bidmode",bidmode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contractbill.set("bd_taxrate",null);//税率
|
||||||
|
SaveServiceHelper.save(new DynamicObject[]{contractbill});
|
||||||
|
this.getView().invokeOperation("refresh");
|
||||||
|
DynamicObject qeugBidmode = contractbill.getDynamicObject("qeug_bidmode");
|
||||||
|
if (null == qeugBidmode) {
|
||||||
|
this.getView().updateView("qeug_bidmode");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterBindData(EventObject e) {
|
public void afterBindData(EventObject e) {
|
||||||
super.afterBindData(e);
|
super.afterBindData(e);
|
||||||
//根据组织携带项目
|
//根据组织携带项目
|
||||||
updateRenovationProject();
|
updateRenovationProject();
|
||||||
|
|
||||||
|
IFormView parentView = this.getView().getParentView();
|
||||||
|
if (null != parentView) {
|
||||||
|
parentView = parentView.getParentView();
|
||||||
|
if (null != parentView) {
|
||||||
|
IDataModel model = parentView.getModel();
|
||||||
|
DynamicObject dataEntity = model.getDataEntity();
|
||||||
|
IDataEntityType dataEntityType = dataEntity.getDataEntityType();
|
||||||
|
String name = dataEntityType.getName();
|
||||||
|
if ("rebm_decision".equals(name)) {
|
||||||
|
DynamicObject org = (DynamicObject)this.getView().getModel().getValue("org");
|
||||||
|
DynamicObject contractbill = this.getView().getModel().getDataEntity();
|
||||||
|
contractbill = BusinessDataServiceHelper.loadSingle(contractbill.getPkValue(), "recon_contractbill");
|
||||||
|
|
||||||
|
if (null != org) {
|
||||||
|
String qeugCombofield = org.getString("qeug_combofield");//业务体系
|
||||||
|
contractbill.set("qeug_combofield",qeugCombofield);
|
||||||
|
contractbill.set("partyatype","qeug_recon_developer");//甲方类别:财务组织
|
||||||
|
org = BusinessDataServiceHelper.loadSingle(org.getPkValue(),"bos_org");
|
||||||
|
DynamicObject qeug_recon_orgrelation = BusinessDataServiceHelper.loadSingle("qeug_recon_orgrelation",
|
||||||
|
new QFilter[]{new QFilter("number", QCP.equals, org.getString("number"))});
|
||||||
|
if (null != qeug_recon_orgrelation) {
|
||||||
|
//行政与财务组织对应关系
|
||||||
|
qeug_recon_orgrelation = BusinessDataServiceHelper.loadSingle(qeug_recon_orgrelation.getPkValue(),"qeug_recon_orgrelation");
|
||||||
|
//甲方
|
||||||
|
DynamicObject qeug_recon_developer = BusinessDataServiceHelper.loadSingle("qeug_recon_developer",
|
||||||
|
new QFilter[]{new QFilter("number", QCP.equals, qeug_recon_orgrelation.getString("qeug_companynumber"))});
|
||||||
|
if (null != qeug_recon_developer) {
|
||||||
|
contractbill.set("multitypepartya",qeug_recon_developer);//甲方
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
DynamicObject bidproject = contractbill.getDynamicObject("bidproject");//定标名称
|
||||||
|
if (null != bidproject) {
|
||||||
|
DynamicObject bidmode = bidproject.getDynamicObject("bidmode");//采购方式
|
||||||
|
if (null != bidmode) {
|
||||||
|
contractbill.set("qeug_bidmode",bidmode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contractbill.set("bd_taxrate",null);//税率
|
||||||
|
SaveServiceHelper.save(new DynamicObject[]{contractbill});
|
||||||
|
|
||||||
|
DynamicObject qeugBidmode = (DynamicObject)this.getView().getModel().getValue("qeug_bidmode");
|
||||||
|
if (null == qeugBidmode) {
|
||||||
|
this.getView().invokeOperation("refresh");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -151,20 +151,20 @@ public class todoZyTaskServiceHandler extends AbstractMessageServiceHandler {
|
||||||
//获取当前任务ID
|
//获取当前任务ID
|
||||||
Long taskId = messageContext.getTaskId();
|
Long taskId = messageContext.getTaskId();
|
||||||
//获取任务步骤
|
//获取任务步骤
|
||||||
Long executionId = messageContext.getExecutionId();
|
// Long executionId = messageContext.getExecutionId();
|
||||||
List<OperationLogEntity> operationLogByTaskId = ServiceFactory.getService(WorkflowService.class).getTaskService().getOperationLogByTaskId(taskId);
|
// List<OperationLogEntity> operationLogByTaskId = ServiceFactory.getService(WorkflowService.class).getTaskService().getOperationLogByTaskId(taskId);
|
||||||
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";
|
||||||
}
|
// }
|
||||||
|
|
||||||
//获取流程实例ID
|
//获取流程实例ID
|
||||||
Long processInstanceId = messageContext.getProcessInstanceId();
|
Long processInstanceId = messageContext.getProcessInstanceId();
|
||||||
|
|
Loading…
Reference in New Issue