From a619299816f2f632c7c6ba3a1bb869e2c212797d Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期五, 19 十二月 2025 14:12:33 +0800
Subject: [PATCH] 对添加巡检单物料编码进行去重
---
StandardPda/MESApplication/Controllers/QC/LljController.cs | 202 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 194 insertions(+), 8 deletions(-)
diff --git a/StandardPda/MESApplication/Controllers/QC/LljController.cs b/StandardPda/MESApplication/Controllers/QC/LljController.cs
index be26b29..69880bb 100644
--- a/StandardPda/MESApplication/Controllers/QC/LljController.cs
+++ b/StandardPda/MESApplication/Controllers/QC/LljController.cs
@@ -1,12 +1,14 @@
-锘縰sing System.Data;
-using System.Dynamic;
-using MES.Service.Dto.service;
+锘縰sing MES.Service.Dto.service;
using MES.Service.Modes;
using MES.Service.service.QC;
using MES.Service.util;
using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
+using System.Data;
+using System.Dynamic;
+using static System.Runtime.InteropServices.JavaScript.JSType;
namespace MESApplication.Controllers.QC;
@@ -207,6 +209,15 @@
var dt = JsonConvert.DeserializeObject<DataTable>(dataDt);
try
{
+ if (!dt.Columns.Contains("id"))
+ {
+ return new ResponseResult
+ {
+ status = 1,
+ message = "璇峰厛閫夋嫨鏁版嵁鍐嶄繚瀛橈紒",
+ data = "璇峰厛閫夋嫨鏁版嵁鍐嶄繚瀛橈紒"
+ };
+ }
new LljService().saveYzxBDlist(id, dt);
var msg = new LljService().YzxImgVerify(id);
@@ -290,12 +301,40 @@
var tbBillList =
new LljService().getFromInfo(id);
resultInfos.tbBillList = tbBillList;
- return new ResponseResult
+ if (resultInfos.tbBillList.Rows.Count>0)
{
- status = 0,
- message = "OK",
- data = resultInfos
- };
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ else
+ {
+ var mj =
+ new LljService().getFromMJCount(id);
+ if (mj>0)
+ {
+ return new ResponseResult
+ {
+ status = 1,
+ message = "璇ョ墿鏂欎负鍏嶆鐗╂枡锛屾棤闇�妫�楠岋紒",
+ data = resultInfos
+ };
+ }
+ else
+ {
+ return new ResponseResult
+ {
+ status = 1,
+ message = "鎵句笉鍒版楠屽崟鎹紝璇风‘璁よ揣鐗╂槸鍚︾鏀讹紒",
+ data = resultInfos
+ };
+ }
+
+ }
+
}
catch (Exception ex)
{
@@ -555,6 +594,30 @@
return ResponseResult.ResponseError(ex);
}
}
+ /// <summary>
+ /// 寮傚父澶勭疆鏁版嵁淇濆瓨
+ /// </summary>
+ /// <param name="sysSubmit">寮傚父澶勭疆鏁版嵁</param>
+ /// <returns></returns>
+ [HttpPost("SaveYcczSubmit")]
+ public ResponseResult SaveYcczSubmit(YCCZSubmit yCCZSubmit)
+ {
+ try
+ {
+ var msg = new LljService().SaveYCCZSubmit(yCCZSubmit);
+
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
/// <summary>
/// 閫佽揣鍗曠鏀跺苟鐢熸垚鍒拌揣鍗�
@@ -580,4 +643,127 @@
return ResponseResult.ResponseError(ex);
}
}
+ /// <summary>
+ /// 閫佽揣鍗曠鏀跺苟鐢熸垚鍒拌揣鍗�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost("SignDelivery2")]
+ public async Task<ResponseResult> SignDelivery2(string id,string c_user)
+ {
+ try
+ {
+ //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = await new LljService().SignDelivery2(id, c_user);
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ /// <summary>
+ /// 鑾峰彇鎼哄浜戞祴璇曠幆澧冪鍚�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpGet("getTestXKYSign")]
+ public async Task<ResponseResult> getTestXKYSign()
+ {
+ try
+ {
+ //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = await new LljService().getTestXKYSign();
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = "OK",
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ /// <summary>
+ /// 鎼哄浜戞敼鍠勬姤鍛婃柊澧�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost("SaveXkyImproveReport")]
+ public async Task<ResponseResult> SaveXkyImproveReport(string id)
+ {
+ try
+ {
+ var msg = await new LljService().SaveXkyImproveReport(id);
+
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ /// <summary>
+ /// 鎼哄浜戞敼鍠勬姤鍛婂鏍�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost("AuditXkyImproveReport")]
+ public async Task<ResponseResult> AuditXkyImproveReport(string id)
+ {
+ try
+ {
+ //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = await new LljService().AuditXkyImproveReport(id);
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 鎵归噺鍒锋柊鏀瑰杽鎶ュ憡渚涘簲鍟嗘湭鍥炲鍗曟嵁
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost("FlushedXkyImproveReport")]
+ public async Task<ResponseResult> FlushedXkyImproveReport(string id="")
+ {
+ try
+ {
+ //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = await new LljService().FlushedXkyImproveReport(id);
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
}
\ No newline at end of file
--
Gitblit v1.9.3