Merge branch 'dev-zhouc' into test
This commit is contained in:
commit
2df8e38c06
@ -22,18 +22,15 @@ import java.util.EventObject;
|
|||||||
* @Created by ZZSLL
|
* @Created by ZZSLL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SalesContractEdit extends AbstractBillPlugIn implements BeforeF7SelectListener
|
public class SalesContractEdit extends AbstractBillPlugIn implements BeforeF7SelectListener {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public void afterDoOperation(AfterDoOperationEventArgs e)
|
public void afterDoOperation(AfterDoOperationEventArgs e) {
|
||||||
{
|
|
||||||
super.afterDoOperation(e);
|
super.afterDoOperation(e);
|
||||||
IFormView view = this.getView();
|
IFormView view = this.getView();
|
||||||
IDataModel model = this.getModel();
|
IDataModel model = this.getModel();
|
||||||
DynamicObject dataEntity = model.getDataEntity();
|
DynamicObject dataEntity = model.getDataEntity();
|
||||||
String operateKey = e.getOperateKey();
|
String operateKey = e.getOperateKey();
|
||||||
if ("save".equals(operateKey))
|
if ("save".equals(operateKey)) {
|
||||||
{
|
|
||||||
String billno = dataEntity.getString("billno");
|
String billno = dataEntity.getString("billno");
|
||||||
boolean isLastCharLetter = billno.matches(".*[A-Za-z]$");
|
boolean isLastCharLetter = billno.matches(".*[A-Za-z]$");
|
||||||
if (isLastCharLetter) return;
|
if (isLastCharLetter) return;
|
||||||
@ -42,6 +39,13 @@ public class SalesContractEdit extends AbstractBillPlugIn implements BeforeF7Se
|
|||||||
view.updateView("billno");
|
view.updateView("billno");
|
||||||
SaveServiceHelper.save(new DynamicObject[]{model.getDataEntity(true)});
|
SaveServiceHelper.save(new DynamicObject[]{model.getDataEntity(true)});
|
||||||
}
|
}
|
||||||
|
if ("signature".equals(operateKey)) {
|
||||||
|
view.invokeOperation("refresh");
|
||||||
|
}
|
||||||
|
if ("dosign".equals(operateKey)) {
|
||||||
|
// view.invokeOperation("refresh");
|
||||||
|
view.showSuccessNotification("合同盖章完成!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -52,6 +56,7 @@ public class SalesContractEdit extends AbstractBillPlugIn implements BeforeF7Se
|
|||||||
yem_internationalrate.addBeforeF7SelectListener(this);
|
yem_internationalrate.addBeforeF7SelectListener(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeF7Select(BeforeF7SelectEvent e) {
|
public void beforeF7Select(BeforeF7SelectEvent e) {
|
||||||
IDataModel model = this.getModel();
|
IDataModel model = this.getModel();
|
||||||
|
@ -0,0 +1,189 @@
|
|||||||
|
package com.yem.wm.es.salescontrac.op;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.yem.ia.intebilllogon.Utils.ObjectToJsonUtils;
|
||||||
|
import com.yem.wm.utils.YEM;
|
||||||
|
import com.yem.wm.utils.YunzhijiaUtils;
|
||||||
|
import kd.bos.dataentity.OperateOption;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.entity.EntityMetadataCache;
|
||||||
|
import kd.bos.entity.ExtendedDataEntity;
|
||||||
|
import kd.bos.entity.MainEntityType;
|
||||||
|
import kd.bos.entity.operate.result.OperationResult;
|
||||||
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||||
|
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||||
|
import kd.bos.entity.plugin.args.BeforeOperationArgs;
|
||||||
|
import kd.bos.entity.validate.ErrorLevel;
|
||||||
|
import kd.bos.entity.validate.ValidationErrorInfo;
|
||||||
|
import kd.bos.exception.KDBizException;
|
||||||
|
import kd.bos.exception.KDException;
|
||||||
|
import kd.bos.id.ID;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.servicehelper.AttachmentServiceHelper;
|
||||||
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhouc
|
||||||
|
* @date 2024/9/20 16:30
|
||||||
|
* @className SalesContracSignatureOp
|
||||||
|
* @description 框架合同 合同签章申请服务插件
|
||||||
|
*/
|
||||||
|
public class SalesContracSignatureOp extends AbstractOperationServicePlugIn {
|
||||||
|
@Override
|
||||||
|
public void onPreparePropertys(PreparePropertysEventArgs e) {
|
||||||
|
super.onPreparePropertys(e);
|
||||||
|
List<String> fieldKeys = e.getFieldKeys();
|
||||||
|
fieldKeys.add("yem_sigforminstid");
|
||||||
|
fieldKeys.add("yem_sigflowinstid");
|
||||||
|
fieldKeys.add("yem_sigstatus");
|
||||||
|
fieldKeys.add("yem_siguser");
|
||||||
|
fieldKeys.add("yem_sigdatetime");
|
||||||
|
fieldKeys.add("yem_sigmag");
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void beforeExecuteOperationTransaction(BeforeOperationArgs e) {
|
||||||
|
super.beforeExecuteOperationTransaction(e);
|
||||||
|
List<ExtendedDataEntity> selectedRows = e.getSelectedRows();
|
||||||
|
ArrayList<ExtendedDataEntity> ArrayList = new ArrayList<>();
|
||||||
|
for (ExtendedDataEntity selectedRow : selectedRows) {
|
||||||
|
DynamicObject dynamicObject = selectedRow.getDataEntity();
|
||||||
|
Object pkid = dynamicObject.getPkValue();
|
||||||
|
boolean yem_sigstatus = dynamicObject.getBoolean("yem_sigstatus");
|
||||||
|
List<Map<String, Object>> attachments = AttachmentServiceHelper.getAttachments(dynamicObject.getDynamicObjectType().getName(), pkid, "yem_approval");
|
||||||
|
if (attachments.size() > 0 && !yem_sigstatus) {
|
||||||
|
JSONObject json = GetintebilllogonJson(pkid, dynamicObject);
|
||||||
|
DynamicObject yem_billtype = BusinessDataServiceHelper.loadSingle("bos_entityobject", new QFilter[]{new QFilter("number", QCP.equals, dynamicObject.getDynamicObjectType().getName())});
|
||||||
|
MainEntityType entityType = EntityMetadataCache.getDataEntityType("yem_ialog");
|
||||||
|
DynamicObject yemIalog = new DynamicObject(entityType);
|
||||||
|
try {
|
||||||
|
String s = YunzhijiaUtils.doPost(YunzhijiaUtils.yzjurl + "/cmmpapi/cmmp/flowCreate.do?tokenId=0C89F5DBEB704C1F8671721B148E8224", json.toString());
|
||||||
|
System.out.println(s);
|
||||||
|
JSONObject retJson = JSONObject.parseObject(s);
|
||||||
|
Boolean success = retJson.getBoolean("success");
|
||||||
|
if (success) {
|
||||||
|
// dynamicObject.set("yem_synfalt",null);
|
||||||
|
JSONObject data = retJson.getJSONObject("data");
|
||||||
|
String formInstId = data.getString("formInstId");//表单定义ID
|
||||||
|
String flowInstId = data.getString("flowInstId");//流程实例ID
|
||||||
|
dynamicObject = BusinessDataServiceHelper.loadSingle(dynamicObject.get("id"), dynamicObject.getDynamicObjectType().getName());
|
||||||
|
dynamicObject.set("yem_sigforminstid", formInstId);
|
||||||
|
dynamicObject.set("yem_sigflowinstid", flowInstId);
|
||||||
|
dynamicObject.set("yem_sigstatus", true);
|
||||||
|
dynamicObject.set("yem_siguser", YEM.getCurrentUserId());
|
||||||
|
dynamicObject.set("yem_sigdatetime", new Date());
|
||||||
|
dynamicObject.set("yem_sigmag", "同步云之家成功!");
|
||||||
|
SaveServiceHelper.update(dynamicObject, OperateOption.create());
|
||||||
|
// 根据实体名构建元数据并创建DynamicObject
|
||||||
|
yemIalog.getDataEntityType().getPrimaryKey().setValueFast(yemIalog, ID.genLongId());
|
||||||
|
yemIalog.set("billno", dynamicObject.get("billno"));//单据编号
|
||||||
|
yemIalog.set("yem_billtype", yem_billtype);//单据类型
|
||||||
|
yemIalog.set("yem_success", success);//是否成功
|
||||||
|
yemIalog.set("yem_req", json.toString());//请求参数
|
||||||
|
yemIalog.set("billstatus", "A");//请求参数
|
||||||
|
yemIalog.set("yem_response", s);//返回参数
|
||||||
|
yemIalog.set("yem_flowinstid", flowInstId);//流程实例ID
|
||||||
|
yemIalog.set("yem_forminstid", formInstId);//表单实例ID
|
||||||
|
} else {
|
||||||
|
// 根据实体名构建元数据并创建DynamicObject
|
||||||
|
yemIalog.getDataEntityType().getPrimaryKey().setValueFast(yemIalog, ID.genLongId());
|
||||||
|
yemIalog.set("billstatus", "A");//请求参数
|
||||||
|
yemIalog.set("billno", dynamicObject.get("billno"));//单据编号yemIalog.set("yem_billtype", yem_billtype);//单据类型
|
||||||
|
yemIalog.set("yem_success", false);//是否成功
|
||||||
|
yemIalog.set("yem_req", json.toString());//请求参数
|
||||||
|
yemIalog.set("yem_response", s);//返回参数
|
||||||
|
addErrMessage(operationResult, dynamicObject, "云之家生成流程异常:" + s);
|
||||||
|
dynamicObject.set("yem_sigforminstid", null);
|
||||||
|
dynamicObject.set("yem_sigflowinstid", null);
|
||||||
|
dynamicObject.set("yem_sigstatus", false);
|
||||||
|
dynamicObject.set("yem_sigmag", "同步失败,请查看《智能审批日志》日志!");
|
||||||
|
dynamicObject.set("yem_siguser", YEM.getCurrentUserId());
|
||||||
|
dynamicObject.set("yem_sigdatetime", new Date());
|
||||||
|
SaveServiceHelper.update(dynamicObject, OperateOption.create());
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
yemIalog.getDataEntityType().getPrimaryKey().setValueFast(yemIalog, ID.genLongId());
|
||||||
|
yemIalog.set("billstatus", "A");//请求参数
|
||||||
|
yemIalog.set("billno", dynamicObject.get("billno"));//单据编号
|
||||||
|
yemIalog.set("yem_billtype", yem_billtype);//单据类型
|
||||||
|
yemIalog.set("yem_success", false);//是否成功
|
||||||
|
yemIalog.set("yem_req", json.toString());//请求参数
|
||||||
|
if (ex instanceof KDException) {
|
||||||
|
yemIalog.set("yem_error", ((KDException) ex).getStackTraceMessage());//异常信息
|
||||||
|
addErrMessage(operationResult, dynamicObject, "云之家接口调用异常:" + ((KDException) ex).getStackTraceMessage());
|
||||||
|
} else {
|
||||||
|
yemIalog.set("yem_error", ex.toString());//异常信息
|
||||||
|
addErrMessage(operationResult, dynamicObject, "云之家接口调用异常:" + ex.toString());
|
||||||
|
}
|
||||||
|
dynamicObject.set("yem_sigforminstid", null);
|
||||||
|
dynamicObject.set("yem_sigflowinstid", null);
|
||||||
|
dynamicObject.set("yem_sigstatus", false);
|
||||||
|
dynamicObject.set("yem_sigmag", "同步失败,请查看《智能审批日志》日志!");
|
||||||
|
dynamicObject.set("yem_siguser", YEM.getCurrentUserId());
|
||||||
|
dynamicObject.set("yem_sigdatetime", new Date());
|
||||||
|
SaveServiceHelper.update(dynamicObject, OperateOption.create());
|
||||||
|
}
|
||||||
|
SaveServiceHelper.save(new DynamicObject[]{yemIalog});
|
||||||
|
} else {
|
||||||
|
addErrMessage(operationResult, dynamicObject, "当前订单未上传国贸经理签批附件、当期订单已同步至云之家,禁止执行合同签章申请!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前单据入参
|
||||||
|
*
|
||||||
|
* @param pkid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public JSONObject GetintebilllogonJson(Object pkid, DynamicObject dynamicObject) {
|
||||||
|
JSONObject Object = new JSONObject();
|
||||||
|
QFilter qFilter = new QFilter("yem_isdisable", QCP.equals, false);
|
||||||
|
qFilter.and(new QFilter("billno", QCP.equals, "WXHT-YZJ"));
|
||||||
|
DynamicObject yem_ia_intebilllogon = BusinessDataServiceHelper.loadSingle("yem_ia_intebilllogon", "id", qFilter.toArray());
|
||||||
|
if (yem_ia_intebilllogon != null) {
|
||||||
|
long intebilllogonID = yem_ia_intebilllogon.getLong("id");
|
||||||
|
//查询单据注册数据
|
||||||
|
DynamicObject data = BusinessDataServiceHelper.loadSingle(intebilllogonID, "yem_ia_intebilllogon");
|
||||||
|
if (data != null && pkid != null && pkid != "") {
|
||||||
|
Object = ObjectToJsonUtils.ToJson(data, pkid, dynamicObject.getDynamicObjectType().getName(), ObjectToJsonUtils.getpostcreator());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.operationResult.addErrorInfo(new ValidationErrorInfo("", pkid,
|
||||||
|
0, 0, "err", "合同签章申请", "未读取启用的《智能审批单据注册》,请修改后重试!", ErrorLevel.Error));
|
||||||
|
}
|
||||||
|
return Object;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向操作结果,添加一条错误提示
|
||||||
|
*
|
||||||
|
* @param operationResult 操作结果参数
|
||||||
|
* @param dataEntity 校验数据
|
||||||
|
* @param errMsg 异常信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private static void addErrMessage(OperationResult operationResult, DynamicObject dataEntity, String errMsg) {
|
||||||
|
operationResult.setSuccess(false);
|
||||||
|
// Object pkId = dataEntity.getPkValue();
|
||||||
|
// int rowIndex = 0;
|
||||||
|
// ErrorLevel errorLevel = ErrorLevel.Error;
|
||||||
|
//
|
||||||
|
// ValidationErrorInfo errInfo = new ValidationErrorInfo("",
|
||||||
|
// pkId, 0, rowIndex,
|
||||||
|
// "BeforeExecuteOperationTransactionSample",
|
||||||
|
// "接口调用异常",
|
||||||
|
// "单据编号:【" + dataEntity.get("billno") + "】" + errMsg,
|
||||||
|
// errorLevel);
|
||||||
|
// operationResult.setMessage("合同签章申请失败!");
|
||||||
|
// operationResult.addErrorInfo(errInfo);
|
||||||
|
throw new KDBizException("单据编号:【" + dataEntity.get("billno") + "】" + errMsg);
|
||||||
|
}
|
||||||
|
}
|
@ -48,7 +48,7 @@ public class SalesOrderAutoSignOp extends AbstractOperationServicePlugIn {
|
|||||||
// Word中的书签名称
|
// Word中的书签名称
|
||||||
final String BOOKMARK = "ensign";
|
final String BOOKMARK = "ensign";
|
||||||
// 修改Word后上传的附件面板
|
// 修改Word后上传的附件面板
|
||||||
final String UPLOAD_ATTACHMENT_KEY = "attachmentpanel";
|
final String UPLOAD_ATTACHMENT_KEY = "yem_approval";
|
||||||
|
|
||||||
for (DynamicObject dynamicObject : entities) {
|
for (DynamicObject dynamicObject : entities) {
|
||||||
String formId = dynamicObject.getDataEntityType().getName();
|
String formId = dynamicObject.getDataEntityType().getName();
|
||||||
@ -104,6 +104,7 @@ public class SalesOrderAutoSignOp extends AbstractOperationServicePlugIn {
|
|||||||
AttachmentDto attDao = AttachmentServiceHelper.getAttachmentInfoByAttPk(attachment.get("attPkId"));
|
AttachmentDto attDao = AttachmentServiceHelper.getAttachmentInfoByAttPk(attachment.get("attPkId"));
|
||||||
String fileUrl = attDao.getResourcePath();
|
String fileUrl = attDao.getResourcePath();
|
||||||
String filename = attDao.getFilename();
|
String filename = attDao.getFilename();
|
||||||
|
if (filename.endsWith(".docx") || filename.endsWith(".doc")) {
|
||||||
validatorFileExtension(filename);
|
validatorFileExtension(filename);
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
FileServiceFactory.getAttachmentFileService().download(fileUrl, out, null);
|
FileServiceFactory.getAttachmentFileService().download(fileUrl, out, null);
|
||||||
@ -133,6 +134,7 @@ public class SalesOrderAutoSignOp extends AbstractOperationServicePlugIn {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验是否是Word文件
|
* 检验是否是Word文件
|
||||||
|
@ -105,7 +105,11 @@ public class SalesOrderAutoSignOp extends AbstractOperationServicePlugIn {
|
|||||||
AttachmentDto attDao = AttachmentServiceHelper.getAttachmentInfoByAttPk(attachment.get("attPkId"));
|
AttachmentDto attDao = AttachmentServiceHelper.getAttachmentInfoByAttPk(attachment.get("attPkId"));
|
||||||
String fileUrl = attDao.getResourcePath();
|
String fileUrl = attDao.getResourcePath();
|
||||||
String filename = attDao.getFilename();
|
String filename = attDao.getFilename();
|
||||||
validatorFileExtension(filename);
|
/**
|
||||||
|
* 2024-09-20 增加只校验 word文件
|
||||||
|
*/
|
||||||
|
if(filename.endsWith(".docx")|| filename.endsWith(".doc")){
|
||||||
|
// validatorFileExtension(filename);
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
FileServiceFactory.getAttachmentFileService().download(fileUrl, out, null);
|
FileServiceFactory.getAttachmentFileService().download(fileUrl, out, null);
|
||||||
InputStream in = new ByteArrayInputStream(out.toByteArray());
|
InputStream in = new ByteArrayInputStream(out.toByteArray());
|
||||||
@ -134,6 +138,7 @@ public class SalesOrderAutoSignOp extends AbstractOperationServicePlugIn {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验是否是Word文件
|
* 检验是否是Word文件
|
||||||
|
@ -200,7 +200,74 @@ public class YZJAuditController {
|
|||||||
CustomApiResult<Object> ces = CustomApiResult.success("调用成功");
|
CustomApiResult<Object> ces = CustomApiResult.success("调用成功");
|
||||||
return ces;
|
return ces;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 云之家框架合同 合同签章回写
|
||||||
|
*
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
@ApiPostMapping("/SalescontracCallback")
|
||||||
|
public CustomApiResult<Object> SalescontracCallback(@NotNull @ApiParam("参数") String data) throws IOException {
|
||||||
|
try {
|
||||||
|
JSONObject json = JSONObject.parseObject(data);
|
||||||
|
// JSONObject data1 = json.getJSONObject("data");
|
||||||
|
JSONObject basicInfo = json.getJSONObject("basicInfo");
|
||||||
|
String formCodeId = basicInfo.getString("formCodeId");
|
||||||
|
//通过表单定义ID获取模板
|
||||||
|
String formInstId = basicInfo.getString("formInstId");
|
||||||
|
ArrayList<QFilter> qFilters = new ArrayList<>();
|
||||||
|
qFilters.add(new QFilter("yem_yzjid", QCP.equals, formCodeId));
|
||||||
|
qFilters.add(new QFilter("yem_isdisable", QCP.equals, false));
|
||||||
|
DynamicObject yem_ia_intebilllogon = BusinessDataServiceHelper.loadSingle("yem_ia_intebilllogon", qFilters.toArray(new QFilter[0]));
|
||||||
|
if (yem_ia_intebilllogon != null) {
|
||||||
|
yem_ia_intebilllogon = BusinessDataServiceHelper.loadSingle(yem_ia_intebilllogon.getLong("id"), "yem_ia_intebilllogon");
|
||||||
|
} else {
|
||||||
|
return CustomApiResult.success("调用成功");
|
||||||
|
}
|
||||||
|
//单据类型
|
||||||
|
String bos_entityobjectnum = yem_ia_intebilllogon.getString("yem_formid.number");
|
||||||
|
//获取单据
|
||||||
|
DynamicObject billObj = BusinessDataServiceHelper.loadSingle(bos_entityobjectnum, new QFilter[]{new QFilter("yem_sigforminstid", QCP.equals, formInstId)});
|
||||||
|
if (billObj != null) {
|
||||||
|
billObj = BusinessDataServiceHelper.loadSingle(billObj.get("id"), bos_entityobjectnum);
|
||||||
|
//通过表单实例ID获取日志对象 yem_sigforminstid
|
||||||
|
DynamicObject ialog = BusinessDataServiceHelper.loadSingle("yem_ialog", new QFilter[]{new QFilter("yem_forminstid", QCP.equals, billObj.get("yem_sigforminstid"))});
|
||||||
|
ialog.set("yem_writeback", data);
|
||||||
|
SaveServiceHelper.save(new DynamicObject[]{ialog});
|
||||||
|
//TODO 调用云之家获取审批结果接口
|
||||||
|
JSONObject reqjson = new JSONObject();
|
||||||
|
reqjson.put("flowInstId", billObj.get("yem_sigflowinstid"));
|
||||||
|
String retStr = YunzhijiaUtils.doPost(YunzhijiaUtils.yzjurl + "/gateway/yun/common/approve", reqjson.toString());
|
||||||
|
JSONObject retJson = JSONObject.parseObject(retStr);
|
||||||
|
//状态码 FINISH:同意已完成
|
||||||
|
// DISAGRE:不同意已完成
|
||||||
|
// RUNNING:待审批
|
||||||
|
// SUSPEND:挂起
|
||||||
|
// RETURNED:待提交(审批人退回到发起节点)
|
||||||
|
// TOSUBMIT:待提交(发起人自己撤回)
|
||||||
|
// ABANDON:废弃
|
||||||
|
// DELETE:已删除
|
||||||
|
//驳回更新 合同签章同步状态
|
||||||
|
if ("DISAGREE".equals(retJson.getString("data"))) {
|
||||||
|
billObj.set("yem_sigstatus", false);//合同签章同步状态
|
||||||
|
billObj.set("yem_sigmag", null);//合同签章同步说明
|
||||||
|
billObj.set("yem_sigforminstid", null);//合同签章云之家表单实例id
|
||||||
|
billObj.set("yem_sigflowinstid", null);//合同签章云之家流程实例id
|
||||||
|
SaveServiceHelper.save(new DynamicObject[]{billObj});
|
||||||
|
} else {
|
||||||
|
return CustomApiResult.success("根据云之家审批示例ID获取到的状态为【" + retJson.getString("data") + "】,无需更新!");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return CustomApiResult.fail("501", "未获取到框架合同合同签章云之家表单实例id为【" + formInstId + "】的数据!");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
CustomApiResult<Object> fail = CustomApiResult.fail("501", e.getMessage());
|
||||||
|
return fail;
|
||||||
|
}
|
||||||
|
CustomApiResult<Object> ces = CustomApiResult.success("调用成功");
|
||||||
|
return ces;
|
||||||
|
}
|
||||||
|
|
||||||
private String result(OperationResult result, String operation) {
|
private String result(OperationResult result, String operation) {
|
||||||
if (!result.isSuccess()) {
|
if (!result.isSuccess()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user