From 073ac235b4e0121f623b700070000eee796e3ee6 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 16 六月 2022 09:11:33 +0800
Subject: [PATCH] 提料计划报表 工艺路线和工序流转卡维护
---
WebAPI/Controllers/CJGL/Cj_CallGoodsBillBackController.cs | 100 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 99 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_CallGoodsBillBackController.cs b/WebAPI/Controllers/CJGL/Cj_CallGoodsBillBackController.cs
index ecdce91..18e425f 100644
--- a/WebAPI/Controllers/CJGL/Cj_CallGoodsBillBackController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_CallGoodsBillBackController.cs
@@ -5,6 +5,7 @@
using System.Web;
using System.Web.Http;
using WebAPI.Models;
+using Newtonsoft.Json;
namespace WebAPI.Controllers.CJGL
{
@@ -15,6 +16,21 @@
DataSet ds;
#region 鍙枡閫�鏂欏崟鍒楄〃
+ public class CallGoodsBill {
+ public DateTime HBeginDate; //閫�鏂欐棩鏈�
+ public DateTime HEndDate;
+ public string HBillNo;//鎶ュ簾鍗曞彿
+ public string MaterialNumber;//鐗╂枡浠g爜
+ public string MaterialName;//鐗╂枡鍚嶇О
+ public string MaterialModel;//瑙勬牸鍨嬪彿
+ public string HDeptName;//鐢熶骇杞﹂棿
+ public string ProcMul;//宸ユ
+ public string Hmaker;//褰撳墠鐢ㄦ埛
+ public int HOrgID;//缁勭粐
+ public string HPZStatus;//鍝佽川纭
+ public string HCKStatus;//浠撳簱鎺ユ敹
+ }
+
[Route("Cj_CallGoodsBillBack/CallGoodsBillBackMainList")]
[HttpGet]
public object CallGoodsBillMainList(string sWhere, string user)
@@ -31,7 +47,89 @@
return objJsonResult;
}
- ds = oCN.RunProcReturn("select * from h_v_IF_JIT_CallGoodsBillBackMainList where 1=1 " + sWhere + " order by hmainid desc", "h_v_IF_JIT_CallGoodsBillBackMainList");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message =null;
+ objJsonResult.data = new DataTable();
+ return objJsonResult;
+ }
+
+ CallGoodsBill ca = JsonConvert.DeserializeObject<CallGoodsBill>(sWhere);
+ ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoodsBillList_Query '{ca.HBillNo}','{ca.MaterialNumber}','{ca.MaterialName}','{ca.MaterialModel}'," +
+ $"'{ca.ProcMul}','{ca.HDeptName}',{ca.HOrgID},'{ca.Hmaker}','{ca.HPZStatus}','{ca.HCKStatus}','{ca.HBeginDate}','{ca.HEndDate.AddDays(1).AddSeconds(-1)}'", "h_p_JIT_BackGoodsBillList_Query");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍙枡閫�鏂欏崟 鍒犻櫎
+ [Route("Cj_CallGoodsBillBack/DelCallGoodsBill")]
+ [HttpGet]
+ public object DelCallGoodsBill(string HInterID, string HEntryID, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_CallGoodsBillBack_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡璇㈡潈闄�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoodsBillList_Delete {HInterID},{HEntryID} ", "h_p_JIT_BackGoodsBillList_Delete");
+
+ objJsonResult.code = ds.Tables[0].Rows[0][0].ToString();
+ objJsonResult.count = int.Parse(ds.Tables[0].Rows[0][0].ToString());
+ objJsonResult.Message = ds.Tables[0].Rows[0][1].ToString();
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍙枡鍗曞垪琛� (榛樿鏌ヨ)
+ [Route("Cj_CallGoodsBillBack/JIT_BackGoodsList")]
+ [HttpGet]
+ public object JIT_BackGoodsList(string HInterID, string user)
+ {
+ try
+ {
+ if (HInterID == null || HInterID.Equals(""))
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = null;
+ objJsonResult.data = new DataTable();
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoods_Load '{HInterID}'", "h_p_JIT_BackGoods_Load");
objJsonResult.code = "1";
objJsonResult.count = 1;
--
Gitblit v1.9.1