reciver)
{
var result = await DoSendMailSywg(enid, reciver);
@@ -1038,6 +1106,7 @@ namespace YLErp.Web.Controllers
contractRecord.ContractVersion = contractVersion;
contractRecord.FileType = FileTypeEnum.Pdf;
contractRecord.Status = ContractStatusEnum.Draft;
+ contractRecord.SourceType = 1; // 系统生成
contractRecord.Paths = outPath.ToString();
contractRecord.FileName = outputFileName.Replace(".xlsx", ".pdf");
contractRecord.Type = ContractTypeEnum.Trade;
@@ -1431,6 +1500,7 @@ namespace YLErp.Web.Controllers
contractRecord.ContractVersion = contractVersion;
contractRecord.FileType = FileTypeEnum.Pdf;
contractRecord.Status = ContractStatusEnum.Draft;
+ contractRecord.SourceType = 1; // 系统生成
contractRecord.Paths = Path.Combine(DocumentPathConvert.ConvertToUrlPath(outPath), outputFileName.Replace(".xlsx", ".pdf"));
contractRecord.FileName = outputFileName.Replace(".xlsx", ".pdf");
contractRecord.Type = ContractTypeEnum.Trade;
diff --git a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml
index b991654a..1e4ee463 100644
--- a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml
+++ b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml
@@ -420,14 +420,13 @@
|
-
-
+
|
-
+
|
-
+
|
{{item.underlying!=null?item.underlying.QuoteUnitString:''}}
diff --git a/YLErpWeb/Views/TradeConfirmBook/Index.cshtml b/YLErpWeb/Views/TradeConfirmBook/Index.cshtml
index e0b3c72f..a20e7056 100644
--- a/YLErpWeb/Views/TradeConfirmBook/Index.cshtml
+++ b/YLErpWeb/Views/TradeConfirmBook/Index.cshtml
@@ -25,7 +25,9 @@
IsZheQi = PS.Config.Is浙期,
IsAutoSealAfterGeneratedBook = PS.GetErpConfig().IsAutoSealAfterGeneratedBook,
canGenerate = CurUser.结算管理_交易确认书生成,
- canSendEmail = CurUser.结算管理_交易确认书邮件发送
+ canSendEmail = CurUser.结算管理_交易确认书邮件发送,
+ // 标识为互换确认书页面
+ isSwapPage = true
};
var tradeTypes = ConsTrade.AllTradeTypes.Except(new List { "场内期权", "股票" }).Concat(new List { "黑箱结构" });
}
diff --git a/YLErpWeb/WebAPI/Controllers/TradeOAJobController.cs b/YLErpWeb/WebAPI/Controllers/TradeOAJobController.cs
new file mode 100644
index 00000000..93f24305
--- /dev/null
+++ b/YLErpWeb/WebAPI/Controllers/TradeOAJobController.cs
@@ -0,0 +1,92 @@
+using System.Text.Json;
+using YLErp.Helpers;
+using YLErp.Modules.TradeModule;
+
+namespace YLErp.Web.WebAPI.Controllers
+{
+ ///
+ /// OA用印状态同步定时任务接口(无鉴权,供PowerJob等外部调度系统调用)
+ ///
+ [ApiController]
+ public class TradeOAJobController : ControllerBase
+ {
+ private static readonly IYcLogger logger = LogFactory.GetLogger();
+
+ ///
+ /// 同步OA用印状态
+ ///
+ ///
+ /// 无需鉴权,建议通过内网限制或Nginx限制来源IP。
+ /// 可选:在请求Header中携带 X-Job-Api-Key 进行简单校验。
+ ///
+ [HttpPost]
+ [Route("api/job/tradeContract/syncOAStampStatus")]
+ public JsonResult SyncOAStampStatus()
+ {
+ try
+ {
+ // 可选:简单 API Key 校验
+ var configKey = AppManager.GetConfiguration()["JobConfig:ApiKey"];
+ if (!string.IsNullOrEmpty(configKey))
+ {
+ var requestKey = Request.Headers["X-Job-Api-Key"].FirstOrDefault();
+ if (configKey != requestKey)
+ {
+ return JsonError(401, "Invalid API Key");
+ }
+ }
+
+ logger.Info("开始执行OA用印状态同步任务");
+
+ // 使用系统用户身份执行
+ var systemUser = new OptUserInfo(0, "系统用印同步", OptUserFrom.System);
+ var service = new TradeOAService(systemUser);
+
+ var results = service.SyncOAStampStatus();
+
+ var successCount = results.Count(r => r.Success);
+ var failCount = results.Count(r => !r.Success);
+
+ logger.Info($"OA用印状态同步任务完成,共处理 {results.Count} 条,成功 {successCount} 条,失败 {failCount} 条");
+
+ return JsonSuccess(new
+ {
+ total = results.Count,
+ successCount,
+ failCount,
+ executeTime = DateTime.Now,
+ details = results.Select(r => new { r.TradeId, r.Success, r.Message }).ToList()
+ });
+ }
+ catch (Exception ex)
+ {
+ logger.Error($"OA用印状态同步任务异常: {ex.Message}", ex);
+ return JsonError($"同步OA用印状态失败: {ex.Message}");
+ }
+ }
+
+ #region JSON消息处理
+
+ private static readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions
+ {
+ PropertyNamingPolicy = JsonNamingPolicy.CamelCase
+ };
+
+ private JsonResult JsonSuccess(object data, string msg = null)
+ {
+ return new JsonResult(new ApiResult { code = 0, msg = msg, data = data }, _jsonOptions);
+ }
+
+ private JsonResult JsonError(string msg)
+ {
+ return new JsonResult(new ApiResult { code = 1, msg = msg, data = null }, _jsonOptions);
+ }
+
+ private JsonResult JsonError(int code, string msg)
+ {
+ return new JsonResult(new ApiResult { code = code, msg = msg, data = null }, _jsonOptions);
+ }
+
+ #endregion
+ }
+}
diff --git a/YLErpWeb/appsettings.dev.json b/YLErpWeb/appsettings.dev.json
index 4593237d..5efcd87b 100644
--- a/YLErpWeb/appsettings.dev.json
+++ b/YLErpWeb/appsettings.dev.json
@@ -15,7 +15,7 @@
"AppSettings": {
"VirtualPathRoot": "",
"UseRightAligned": "",
- "PluginFolder": "D:\\shenzhengpoc\\zszq-trs\\Plugins\\build\\ZheShang\\Debug\\net6.0\\"
+ "PluginFolder": "D:\\workspace\\glms\\zszq-trs\\Plugins\\YLErp.Plugins.GuoLian\\obj\\Debug\\net6.0"
},
"LibreOffice": {
"ExePath": "",
@@ -76,10 +76,12 @@
"MaxThreadPercent": 0.6, //占系统资源最多60%的线程数量
"oa_confg": {
"BaseUrl": "http://ip:port",
- "SystemKey": "M001", //OA系统key
- "ObjectClass": "ZSZQ_ZDNX", //OA文件类别
- "Urgent": 1, //紧急程度,1一般 2紧急 3加急
- "Issend": 1 //流程是否自动发送,0不发送,1自动发送下一步
+ "SubUrl": "",
+ "UploadUrl": "/api/oa/upload", // OA附件上传接口路径
+ "SystemToken": "your-system-token", // OA系统鉴权Token
+ "SystemName": "OTC_TRADE", // 调用方系统标识
+ "IsNextFlow": 0
+
},
"GeneralSSO": {
"enable": true, //是否启用通用SSO登录
diff --git a/YLErpWeb/wwwroot/Scripts/app/trade/tradeConfirmBook.js b/YLErpWeb/wwwroot/Scripts/app/trade/tradeConfirmBook.js
index 727d32fd..3ebbf788 100644
--- a/YLErpWeb/wwwroot/Scripts/app/trade/tradeConfirmBook.js
+++ b/YLErpWeb/wwwroot/Scripts/app/trade/tradeConfirmBook.js
@@ -88,10 +88,7 @@ const colModelGrid = (new function () {
sortable: false,
formatter: function (cellValue, options, rowObject) {
var html = "";
- if (cellValue) {
- if (!page.isWuChan) {
- html += "";
- }
+ if (cellValue) {
html += "";
} else {
html = "";
@@ -420,7 +417,7 @@ function __initJqGrid() {
onJqgridPaging: typeof onJqgridPaging !== 'undefined' ? onJqgridPaging : void 0
};
var grid = jQuery('#listGrid').jqGrid({
- url: page.isOptionPage ? '/TradeConfirmBook/OptionQuery' : '/trade/tradeConfirmEmailQuery',
+ url: page.isOptionPage ? '/TradeConfirmBook/OptionQuery' : (page.isSwapPage ? '/TradeConfirmBook/SwapQuery' : '/trade/tradeConfirmEmailQuery'),
datatype: page.initEmptyView ? 'local' : 'json',
height: 'auto',
width: '90%',
diff --git a/YLerpbase.sln b/YLerpbase.sln
index a9b1bc83..ab0cdf50 100644
--- a/YLerpbase.sln
+++ b/YLerpbase.sln
@@ -35,6 +35,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YLErp.Cache", "Framework\YL
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YLErp.Plugins.ZheShang", "Plugins\YLErp.Plugins.ZheShang\YLErp.Plugins.ZheShang.csproj", "{C94D2467-B0E8-48CA-B60D-CD660B73AE90}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YLErp.Plugins.GuoLian", "Plugins\YLErp.Plugins.GuoLian\YLErp.Plugins.GuoLian.csproj", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -86,6 +88,10 @@ Global
{C94D2467-B0E8-48CA-B60D-CD660B73AE90}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C94D2467-B0E8-48CA-B60D-CD660B73AE90}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C94D2467-B0E8-48CA-B60D-CD660B73AE90}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -100,6 +106,7 @@ Global
{DB3402A2-7121-4F5A-9F0F-A258EC582370} = {F315B5D3-F4FE-43E5-AF22-AF92978A71BE}
{5665673C-1157-444F-AABC-2A873D8E4703} = {F315B5D3-F4FE-43E5-AF22-AF92978A71BE}
{C94D2467-B0E8-48CA-B60D-CD660B73AE90} = {5981434D-792E-4528-AFC8-7EB8AFD9F80C}
+ {A1B2C3D4-E5F6-7890-ABCD-EF1234567890} = {5981434D-792E-4528-AFC8-7EB8AFD9F80C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28638B67-A6D3-4355-8ADB-EACEE98510B0}
|