1
yxj
2021-12-15 c8d138de62133c15cd8e09bd9c8055411f64147c
1
6个文件已添加
15个文件已修改
1个文件已删除
1327 ■■■■■ 已修改文件
DBUtility/业务单据/ClsXt_BaseBillMain.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/ClsShowMod.cs 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/bin/x86/Debug.rar 补丁 | 查看 | 原始文档 | blame | 历史
LMES/bin/x86/奥邦Debug.rar 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsSc_ProcessPlanMain.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/博日自动扫码线/ScanlineAPIController.cs 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/生产管理/报工台工序/Sc_MESReturnStepWorkBillController.cs 192 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSc_MESReturnStepWorkBill.cs 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSc_PackUnionBill.cs 383 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/ListModels.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsGy_StockCheckItemBill.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsSc_PackUnionBillMain.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsSc_PackUnionBillSub.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/ÒµÎñµ¥¾Ý/ClsXt_BaseBillMain.cs
@@ -43,5 +43,7 @@
        public Int64 HItemMainID;
        //组织
        public Int64 HPRDORGID;
        //有效状态
        public bool HUseFlag;
    }
}
LMES/ClsShowMod.cs
@@ -3934,6 +3934,12 @@
                        oPt_RadiumCarvingCodeBillList.Show();
                        oMainForm.AddTabPage(oPt_RadiumCarvingCodeBillList);
                        break;
                    case "sc_packunionbill":
                        Sc_PackUnionBill oSc_PackUnionBill = new Sc_PackUnionBill();
                        oSc_PackUnionBill.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
                        oSc_PackUnionBill.ModCaption = gnmc;
                        oSc_PackUnionBill.ShowDialog();
                        break;
                    default:
                        break;
                }
@@ -5728,23 +5734,23 @@
                    //    oSc_PackSplitBillList.Show();
                    //    oMainForm.AddTabPage(oSc_PackSplitBillList);
                    //    break;
                    //case "sc_packunionbill":
                    //    Sc_PackUnionBill oSc_PackUnionBill = new Sc_PackUnionBill();
                    //    oSc_PackUnionBill.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
                    //    oSc_PackUnionBill.ModCaption = gnmc;
                    //    oSc_PackUnionBill.ShowDialog();
                    //    break;
                    //case "sc_packunionbilllist":
                    //    Sc_PackUnionBillList oSc_PackUnionBillList = new Sc_PackUnionBillList();
                    //    oSc_PackUnionBillList.MdiParent = oMain;
                    //    oSc_PackUnionBillList.ModCaption = gnmc;
                    //    oSc_PackUnionBillList.Show();
                    //    oMainForm.AddTabPage(oSc_PackUnionBillList);
                    //    break;
                    case "sc_packunionbill":
                        Sc_PackUnionBill oSc_PackUnionBill = new Sc_PackUnionBill();
                        oSc_PackUnionBill.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
                        oSc_PackUnionBill.ModCaption = gnmc;
                        oSc_PackUnionBill.ShowDialog();
                        break;
                    case "sc_packunionbilllist":
                        Sc_PackUnionBillList oSc_PackUnionBillList = new Sc_PackUnionBillList();
                        oSc_PackUnionBillList.MdiParent = oMain;
                        oSc_PackUnionBillList.ModCaption = gnmc;
                        oSc_PackUnionBillList.Show();
                        oMainForm.AddTabPage(oSc_PackUnionBillList);
                        break;
                    //===========================MES平板系统单据
@@ -5806,20 +5812,20 @@
                        oMES_StationOutBillList.Show();
                        oMainForm.AddTabPage(oMES_StationOutBillList);
                        break;
                    case "sc_packunionbill":
                        Sc_PackUnionBill oSc_PackUnionBill = new Sc_PackUnionBill();
                        oSc_PackUnionBill.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
                        oSc_PackUnionBill.ModCaption = gnmc;
                        oSc_PackUnionBill.ShowDialog();
                        break;
                    case "sc_packunionbilllist":
                        //权限
                        Sc_PackUnionBillList oSc_PackUnionBillList = new Sc_PackUnionBillList();
                        oSc_PackUnionBillList.MdiParent = oMain;
                        oSc_PackUnionBillList.ModCaption = gnmc;
                        oSc_PackUnionBillList.Show();
                        oMainForm.AddTabPage(oSc_PackUnionBillList);
                        break;
                    //case "sc_packunionbill":
                    //    Sc_PackUnionBill oSc_PackUnionBill = new Sc_PackUnionBill();
                    //    oSc_PackUnionBill.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
                    //    oSc_PackUnionBill.ModCaption = gnmc;
                    //    oSc_PackUnionBill.ShowDialog();
                    //    break;
                    //case "sc_packunionbilllist":
                    //    //权限
                    //    Sc_PackUnionBillList oSc_PackUnionBillList = new Sc_PackUnionBillList();
                    //    oSc_PackUnionBillList.MdiParent = oMain;
                    //    oSc_PackUnionBillList.ModCaption = gnmc;
                    //    oSc_PackUnionBillList.Show();
                    //    oMainForm.AddTabPage(oSc_PackUnionBillList);
                    //    break;
                    //case "mes_mesbeginworkbill":
                    //    MES_MESBeginWorkBill oMES_MESBeginWorkBill = new MES_MESBeginWorkBill();
                    //    oMES_MESBeginWorkBill.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
LMES/bin/x86/Debug.rar
Binary files differ
LMES/bin/x86/°Â°îDebug.rar
Binary files differ
Model/³µ¼ä¹ÜÀí/ClsSc_ProcessPlanMain.cs
@@ -22,5 +22,12 @@
        public string HInnerBillNo;//    varchar(50)   --内部单据号
        public bool HCloseType;//      bit          --关闭类型   ï¼ˆé»˜è®¤ä¸º0)   
        
        public int HWorkerID;
        public int HProcNo;
        public int HProcID;
        public int HGroupID;
        public int HDeptID;
        public int HQty;
    }
}
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -732,6 +732,12 @@
                    {
                        omodel.Sc_MESBeginWorkBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //==========返工单
                    //自动审核
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Sc_MESReturnWorkBill_AutoCheck")
                    {
                        omodel.Sc_MESReturnWorkBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //==========结班单
                    //自动审核
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Sc_MESEndWorkBill_AutoCheck")
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -205,6 +205,8 @@
        //开班单
        public string Sc_MESBeginWorkBill_AutoCheck; //自动审核
        //返工单
        public string Sc_MESReturnWorkBill_AutoCheck; //自动审核
        //结班单
        public string Sc_MESEndWorkBill_AutoCheck; //自动审核
        //停工挂起单
WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
@@ -92,7 +92,7 @@
                    return objJsonResult;
                }
               
                bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
                if (IsDete)
                {
                    objJsonResult.code = "0";
WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs
@@ -90,7 +90,7 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (oBill.omodel.HChecker != "")
                if (oBill.omodel.HChecker != ""&& oBill.omodel.HChecker != null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -99,7 +99,7 @@
                    return objJsonResult;
                }
                bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
                if (IsDete)
                {
                    objJsonResult.code = "0";
WebAPI/Controllers/²©ÈÕ×Ô¶¯É¨ÂëÏß/ScanlineAPIController.cs
@@ -17,6 +17,7 @@
    {
        private jsonScanline objJsonResult = new jsonScanline();
        public DataSet ds = new DataSet();
        public DataSet ds0 = new DataSet();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        #region ç”Ÿæˆç®±ç æŽ¥å£
@@ -66,13 +67,7 @@
        }
        #endregion
        #region æŠ¥å·¥å¹³å°å¼€å·¥å•保存/编辑
        /// <summary>
        /// å¼€å·¥å•
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        #region ç®±æ¡ç ç»‘定关系提交接口
        [Route("packagebarcode/pack")]
        [HttpPost]
        public object pack([FromBody] JObject msg)
@@ -81,6 +76,159 @@
            {
                JavaScriptSerializer js = new JavaScriptSerializer();   //实例化一个能够序列化数据的类
                ScanLineCode list = js.Deserialize<ScanLineCode>(msg.ToString());    //将json数据转化为对象类型并赋值给list
                if (list.billno != "" && list.billno != null)  //任务单号,非必须,非空则校验barcodes里barcode是否由此任务单制作生成的
                {
                    ds = oCN.RunProcReturn("Select HBarCode barcode from Gy_BarCodeBill where HSourceBillNo='" + list.billno.ToString().Trim()+"'  Order by HItemID ", "Gy_BarCodeBill");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.status = -1;
                        objJsonResult.msg = "当前订单无绑定条码!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    List<string> NameList = (from r in ds.Tables[0].AsEnumerable() select r.Field<string>("barcode")).ToList();
                    List<string> NameList1= list.barcodes.Select(t => t.barcode).ToList();
                    var strList = NameList1.Except(NameList).ToList();  //判断提交数据中条码是否存在于订单中
                    if (strList.Count > 0)
                    {
                        string Str=String.Join(",", strList.ToArray());
                        objJsonResult.status = -1;
                        objJsonResult.msg = "条码:"+ Str.ToString()+" ä¸åŒ…含在订单:"+list.billno+"中!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                DLL.ClsSc_PackUnionBill oBill = new DLL.ClsSc_PackUnionBill();
                //判断箱码是否存在
                bool IsBarCodePack = oBill.IsBarCodePack(list.packagebarcode);
                if (IsBarCodePack == false)
                {
                    objJsonResult.status = -1;
                    objJsonResult.msg = "箱码已存在,不能重复绑定!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Models.ClsSc_PackUnionBillMain oItem = new ClsSc_PackUnionBillMain();
                oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                oItem.HBillType = "3783";
                oItem.HBillSubType = "3783";
                oItem.HDate= DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
                oItem.HBillNo = DBUtility.ClsPub.CreateBillCode(oItem.HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                oItem.HBillStatus = 1;
                oItem.HCheckItemNowID = 0;
                oItem.HCheckItemNextID = 0;
                oItem.HCheckFlowID = 0;
                oItem.HRemark = "自动包装线生辰箱条码";
                oItem.HBacker = "";
                oItem.HBackDate = "";
                oItem.HMaker = "";
                oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                oItem.HChecker = "";
                oItem.HCheckDate = "";
                oItem.HUpDater = "";
                oItem.HUpDateDate = "";
                oItem.HCloseMan = "";
                oItem.HCloseDate = "";
                oItem.HCloseType = false;
                oItem.HDeleteMan = "";
                oItem.HDeleteDate = "";
                oItem.HICMOInterID = 0;
                oItem.HICMOBillNo = "";
                oItem.HBarCode_Pack= list.packagebarcode;
                oItem.HMaterID = 0;
                oItem.HUnitID = 0;
                oItem.HUseFlag =false;   //有效状态
                oBill.omodel = oItem;
                for (int i = 0; i < list.barcodes.Count; i++)
                {
                    //判断条码是否存在
                    bool IsBarCode = oBill.IsBarCodePack(list.barcodes[i].barcode);
                    if (IsBarCodePack == false)
                    {
                        objJsonResult.status = -1;
                        objJsonResult.msg = "条码已存在,不能重复绑定!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    Models.ClsSc_PackUnionBillSub oItemSub = new ClsSc_PackUnionBillSub();
                    ds0 = oCN.RunProcReturn("Select HBarCode,HMaterID,HUnitID,HQty,HSourceID,HGroupID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType from Gy_BarCodeBill where HSourceBillNo='" + list.billno.ToString().Trim() + "' and HBarCode='" + list.barcodes[i].barcode + "'  Order by HItemID ", "Gy_BarCodeBill");
                    oItemSub.HEntryID = i+1;
                    oItemSub.HMaterID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HMaterID"].ToString());
                    oItemSub.HUnitID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HUnitID"].ToString());
                    oItemSub.HQty = DBUtility.ClsPub.isDoule(ds0.Tables[0].Rows[0]["HQty"].ToString());
                    oItemSub.HSourceID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HSourceID"].ToString());
                    oItemSub.HEquipID = 0;
                    oItemSub.HGroupID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HGroupID"].ToString());
                    oItemSub.HWorkerID = 0;
                    oItemSub.HBarCode = list.barcodes[i].barcode;
                    oItemSub.HBarCode_Pack = list.packagebarcode;
                    oItemSub.HCloseMan = "";
                    oItemSub.HCloseType = false;
                    oItemSub.HRemark = "";
                    oItemSub.HSourceInterID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HSourceInterID"].ToString());
                    oItemSub.HSourceEntryID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HSourceEntryID"].ToString());
                    oItemSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds0.Tables[0].Rows[0]["HSourceBillNo"].ToString());
                    oItemSub.HSourceBillType = DBUtility.ClsPub.isStrNull(ds0.Tables[0].Rows[0]["HSourceBillType"].ToString());
                    oItemSub.HRelationQty = 0;
                    oItemSub.HRelationMoney = 0;
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                if (bResult)
                {
                    objJsonResult.status = 0;
                    objJsonResult.msg = "success";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.status = -1;
                    objJsonResult.msg = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.status =-1;
                objJsonResult.msg = e.Message;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç®±æ¡ç å–消绑定关系
        [Route("packagebarcode/cancel")]
        [HttpPost]
        public object cancel(string packagebarcode)
        {
            try
            {
                //
                oCN.BeginTran();
                //删除子表
                oCN.RunProc("Delete From Sc_PackUnionBillSub  where HBarCode_Pack=" + packagebarcode.ToString());
                //删除主表
                oCN.RunProc("Delete From Sc_PackUnionBillMain  where HBarCode_Pack=" + packagebarcode.ToString());
                //删除条码档案表
                oCN.RunProc("Delete From Gy_BarCodeBill  where HBarCode=" + packagebarcode.ToString());
                oCN.Commit();
                objJsonResult.status = 0;
                objJsonResult.msg = "success";
@@ -89,8 +237,8 @@
            }
            catch (Exception e)
            {
                objJsonResult.status =-1;
                objJsonResult.msg = "success";
                objJsonResult.status = -1;
                objJsonResult.msg = e.Message;
                objJsonResult.data = null;
                return objJsonResult;
            }
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_StockCheckItemBillController.cs
New file
@@ -0,0 +1,254 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.基础资料.基础资料
{
    public class Gy_StockCheckItemBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        private json objJsonResult = new json();
        public DataSet ds = new DataSet();
        public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        public Models.ClsGy_StockCheckItemBill BillNew0 = new Models.ClsGy_StockCheckItemBill();
        #region ç›˜ç‚¹æ–¹æ¡ˆåˆ—表
        [Route("Gy_StockCheckItemBill/Get_StockCheckItemList")]
        [HttpGet]
        public object Get_StockCheckItemList(string sWhere)
        {
            try
            {
                ds = StockCheckItemList(sWhere);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询数据异常,请与管理员联系!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        public static DataSet StockCheckItemList(string sWhere)
        {
            string sql1 = string.Format(@"select * from h_v_Gy_StockCheckItemList");
            if (sWhere == null || sWhere.Equals(""))
            {
                return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + " order by hitemid desc", "h_v_Gy_StockCheckItemList");
            }
            else
            {
                string sql = sql1 + sWhere + "order by hitemid desc";
                return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Gy_StockCheckItemList");
            }
        }
        #endregion
        #region [盘点方案删除功能]
        [Route("Gy_StockCheckItemBill/set_DeleteBill")]
        [HttpGet]
        public object set_DeleteBill(string HItemID)
        {
            Int64 lngBillKey = 0;
            lngBillKey = DBUtility.ClsPub.isLong(HItemID);
            if (lngBillKey == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据ID为空!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            ds = oCn.RunProcReturn("select * from Gy_StockCheckItem where HItemID=" + lngBillKey, "Gy_StockCheckItem");
            if (ds != null)
            {
                oCn.RunProc("Delete from Gy_StockCheckItem where HItemID=" + lngBillKey);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "此单据不存在,请查看是否重复删除";
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region [编辑显示表头]
        [Route("Gy_StockCheckItemBill/GetStockCheckItemByID")]
        [HttpGet]
        public object GetStockCheckItemByID(string HID)
        {
            Int64 lngBillKey = 0;
            lngBillKey = DBUtility.ClsPub.isLong(HID);
            if (lngBillKey == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据ID为空!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            ds = oCn.RunProcReturn("select * from Gy_StockCheckItem where HItemID=" + lngBillKey, "Gy_ConkReason");
            if (ds != null)
            {
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "此单据不存在";
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ä¿å­˜ç›˜ç‚¹æ–¹æ¡ˆ
        [Route("Gy_StockCheckItemBill/SaveGy_StockCheckItem")]
        [HttpPost]
        public object SaveGy_StockCheckItem([FromBody] JObject msg)
        {
            var _value = msg["msg"].ToString();
            string msg2 = _value.ToString();
            string[] sArray = msg2.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg1 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();//当前人
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            ListModels oListModels = new ListModels();
            try
            {
                Models.ClsGy_StockCheckItemBill oBill = new Models.ClsGy_StockCheckItemBill();
                List<Models.ClsGy_StockCheckItemBill> lsmain = new List<Models.ClsGy_StockCheckItemBill>();
                msg1 = msg1.Replace("\\", "");
                msg1 = msg1.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Gy_StockCheckItem(msg1);
                foreach (Models.ClsGy_StockCheckItemBill oItem in lsmain)
                {
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!代码不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (oItem.HName.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!名称不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    //得到短代码
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItem.HShortNumber = sShortNumber;//短代码
                    oItem.HEndFlag = true;//末级标志
                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级
                    oBill = oItem;
                }
                //保存
                //保存完毕后处理
                if (oBill.HItemID == 0)
                {
                    oCn.RunProc("Insert into Gy_StockCheckItem " +
                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                    ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HMakeEmp,HEndDate,HOrgID) " +
                    " Values('" + oBill.HNumber + "','" + oBill.HName + "','" + oBill.HHelpCode + "','" + oBill.HShortNumber + "'," + oBill.HParentID.ToString() +
                    "," + oBill.HLevel.ToString() + "," + Convert.ToString(oBill.HEndFlag ? 1 : 0) + "," + Convert.ToString(oBill.HStopflag ? 1 : 0) + ",'" + oBill.HRemark +
                    "','" + oBill.HUseFlag + "',getdate(),'" + msg3 + "','" + oBill.HEndDate.ToString() + "'," + oBill.HOrgID.ToString()+
                    ")", ref DBUtility.ClsPub.sExeReturnInfo);
                    //修改上级为非末级代码
                    oCn.RunProc("Update Gy_StockCheckItem set HEndflag=0 where HItemID=" + oBill.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单");
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    oCN.RunProc("UpDate Gy_StockCheckItem set  " +
                    " HNumber='" + oBill.HNumber + "'" +  //固定赋值===============
                    ",HName='" + oBill.HName + "'" +
                    ",HShortNumber='" + oBill.HShortNumber + "'" +
                    ",HHelpCode='" + oBill.HHelpCode + "'" +
                    ",HUseFlag='" + oBill.HUseFlag + "'" +
                    ",HRemark='" + oBill.HRemark + "'" +
                    ",HEndDate='" + oBill.HEndDate + "'" +
                    ",HModifyTime=getdate()" +
                    ",HModifyEmp='" + msg3 + "'" +
                    ",HStopflag=" + Convert.ToString(oBill.HStopflag ? 1 : 0) +
                    " where HItemID=" + oBill.HItemID.ToString());
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "修改成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/Sc_MESReturnStepWorkBillController.cs
@@ -1,4 +1,6 @@
using System;
using DBUtility;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
@@ -72,17 +74,17 @@
        #endregion
        #region[返工单编辑时获取表头数据]
        [Route("Sc_MESBeginStepWorkBill/Sc_MESBeginStepWorkBillListCheckDetai")]
        [Route("Sc_MESReturnStepWorkBill/Sc_MESReturnStepWorkBillListCheckDetai")]
        [HttpGet]
        public ApiResult<DataSet> Sc_MESBeginStepWorkBillListCheckDetai(string HID)
        public ApiResult<DataSet> Sc_MESReturnStepWorkBillListCheckDetai(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_MESBeginWorkBillList_NEW  where hmainid= " + HID + " ", "h_v_Sc_MESBeginWorkBillList_NEW");
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_MESReturnWorkBillList  where hmainid= " + HID + " ", "h_v_Sc_MESReturnWorkBillList");
            if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
                return new ApiResult<DataSet> { code = -1, msg = "不存在开工单号" };
                return new ApiResult<DataSet> { code = -1, msg = "不存在返工单号" };
            return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet };
        }
@@ -99,7 +101,7 @@
        {
            DBUtility.ClsPub.CurUserName = UserName;
            //编辑权限
            if (!DBUtility.ClsPub.Security_Log_second("MES_MESReturnWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
            if (!DBUtility.ClsPub.Security_Log_second("Sc_ProcessPlan_Drop", 1, true, DBUtility.ClsPub.CurUserName))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
@@ -181,7 +183,7 @@
        [HttpGet]
        public object AuditReturnStepProcessReportList(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "MES_MESReturnWorkBill_Check";
            string ModRightNameCheck = "Sc_ProcessPlan_Check";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
@@ -308,6 +310,182 @@
        }
        #endregion
        #region è¿”工单保存/编辑
        /// <summary>
        /// è¿”工单
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("Sc_MESReturnStepWorkBill/SaveGetMESReturnStepWorkFrom")]
        [HttpPost]
        public object SaveGetMESReturnStepWorkFrom([FromBody] JObject msg)
        {
            var _value = msg["msg"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string UserName = sArray[1].ToString();
            string refSav = sArray[2].ToString();
            DBUtility.ClsPub.CurUserName = UserName;
            //保存权限
            if (!DBUtility.ClsPub.Security_Log_second("Sc_ProcessPlan_Edit", 1, true, DBUtility.ClsPub.CurUserName))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无保存权限!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            //判断会计期是否合理
            string s = "";
            int sYear = 0;
            int sPeriod = 0;
            if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = s;
                objJsonResult.data = null;
                return objJsonResult;
            }
            ListModels oListModels = new ListModels();
            try
            {
                DLL.ClsSc_MESReturnStepWorkBill oBill = new DLL.ClsSc_MESReturnStepWorkBill();
                List<Model.ClsSc_ProcessPlanMain> lsmain = new List<Model.ClsSc_ProcessPlanMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Gy_MESReturnWorkFrom(msg2);
                foreach (Model.ClsSc_ProcessPlanMain oItem in lsmain)
                {
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据号重复!不允许保存!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    if (refSav == "Update")
                    {
                        if (BillOld.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据有误!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据已经被审核,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (BillOld.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据处于不可编辑状态,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = s + ",不允许修改";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    DBUtility.ClsPub.CurUserName = oItem.HMaker;
                    oItem.HBillType = "3718";
                    oItem.HBillSubType = "3718";
                    oItem.HBillStatus = 1;   //单据状态(1未审,2审核通过,3关闭,4作废,5审核退回,6审核中,7已阅,8已回复,9结案,10验证,11下达,12开工,13申请审批,15申请检验,16 åˆ¤å®šåˆæ ¼ï¼Œ17判定不合格)
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    if (bResult)
                    {
                        objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //返回主ID
                        //系统参数  è‡ªåŠ¨å®¡æ ¸
                        string sReturn = "";
                        if (oSystemParameter.ShowBill(ref sReturn) == true)
                        {
                            if (oSystemParameter.omodel.Sc_ICMOBillWorkQtyStatus_AutoCheck == "Y") //系统参数  è‡ªåŠ¨å®¡æ ¸
                            {
                                objJsonResult.Verify = "Y";
                            }
                            else
                            {
                                objJsonResult.Verify = "N";
                            }
                        }
                    }
                }
                else
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                    objJsonResult.Verify = "N";
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.Message;
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
    }
}
WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs
@@ -12,7 +12,7 @@
        public ClsSb_EquipDotCheckRuleBill()
        {
            base.MvarItemKeySub = "ClsSb_EquipDotCheckRuleBillSub";
            base.MvarItemKeySub = "Sb_EquipDotCheckRuleBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
@@ -42,7 +42,7 @@
                //
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate Sb_EquipMaintainPlanBillMain set  " +
                oCn.RunProc("UpDate Sb_EquipMaintainRuleBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                ",HDate='" + omodel.HDate + "'" +
                ",HYear='" + omodel.HYear.ToString() + "'" +
@@ -83,7 +83,7 @@
                //插入配件子表
                foreach (Models.ClsSb_EquipMaintainRuleBillSub oSub in DetailColl_Mater)
                {
                    oCn.RunProc("Insert into Sb_EquipMaintainRuleBillSub " +
                    string sql = "Insert into Sb_EquipMaintainRuleBillSub " +
                      " (HInterID,HEntryID," +
                      "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
                      "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
@@ -92,8 +92,9 @@
                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
                      ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                      "," + oSub.HQty.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
                      ") ");
                      "," + oSub.HQty.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + ",0" +
                      ") ";
                    oCn.RunProc(sql);
                }
                sReturn = "修改单据成功!";
                oCn.Commit();
WebAPI/DLL/ClsSc_MESReturnStepWorkBill.cs
@@ -22,5 +22,106 @@
            base.HBillSubType = "3718";
        }
        #region å›ºå®šä»£ç 
        ~ClsSc_MESReturnStepWorkBill()
        {
            DetailColl = null;
        }
        #endregion   è‡ªå®šä¹‰æ–¹æ³•
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate Sc_ProcessPlanMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                ",HDate='" + omodel.HDate + "'" +
                ",HYear='" + omodel.HYear.ToString() + "'" +
                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                ",HBillStatus='" + omodel.HBillStatus + "'" +
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
                ",HUpDateDate=getdate()" +
                //========================================
                //",HSupID=" + omodel.HSupID.ToString() +
                //",HEmpID=" + omodel.HEmpID.ToString() +
                ",HICMOInterID=" + omodel.HICMOInterID.ToString() +
                ",HICMOBillNo='" + omodel.HICMOBillNo + "'" +
                ",HMaterID=" + omodel.HMaterID.ToString() +
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //插入子表
                omodel.HInterID = lngBillKey;
                //插入子表
                oCn.RunProc("Insert Into Sc_ProcessPlanSub " +
                    "(HInterID,HEntryID,HBillNo" +
                    ",HICMOInterID,HICMOBillNo,HProcNo,HProcID" +
                    ",HGroupID,HDeptID,HWorkerID,HQty,HPlanBeginDate" +
                    ") " +
                    " values(" + omodel.HInterID.ToString() + ",0,'" + omodel.HBillNo +
                    "'," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "','" + omodel.HProcNo + "'," + omodel.HProcID.ToString() + "," + omodel.HGroupID.ToString() +
                    "," + omodel.HDeptID.ToString() + "," + omodel.HWorkerID.ToString() + "," + omodel.HQty.ToString() + ",'" + omodel.HPlanBeginDate.ToString() +
                     "') ");
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
                oCn.RunProc("Insert Into Sc_ProcessPlanMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark" +
                ",HICMOInterID,HICMOBillNo,HMaterID" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
                "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," +  omodel.HMaterID.ToString() +
                 ") ");
                //插入子表
                oCn.RunProc("Insert Into Sc_ProcessPlanSub " +
                    "(HInterID,HEntryID,HBillNo" +
                    ",HICMOInterID,HICMOBillNo,HProcNo,HProcID" +
                    ",HGroupID,HDeptID,HWorkerID,HQty,HPlanBeginDate" +
                    ") " +
                    " values(" + omodel.HInterID.ToString() + ",0,'" + omodel.HBillNo +
                    "'," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "','" + omodel.HProcNo + "'," + omodel.HProcID.ToString() + "," + omodel.HGroupID.ToString() +
                    "," + omodel.HDeptID.ToString() + "," + omodel.HWorkerID.ToString() + "," + omodel.HQty.ToString() + ",'" + omodel.HPlanBeginDate.ToString() +
                     "') ");
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
    }
}
WebAPI/DLL/ClsSc_PackUnionBill.cs
New file
@@ -0,0 +1,383 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace WebAPI.DLL
{
    public class ClsSc_PackUnionBill : DBUtility.ClsXt_BaseBill
    {
        public Models.ClsSc_PackUnionBillMain omodel = new Models.ClsSc_PackUnionBillMain();
        public List<Models.ClsSc_PackUnionBillSub> DetailColl = new List<Models.ClsSc_PackUnionBillSub>();
        public ClsSc_PackUnionBill()
        {
            base.MvarItemKeySub = "Sc_PackUnionBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey = "Sc_PackUnionBillMain";
            base.MvarReportTitle = "生产包装单";
            base.BillType = "3783";
        }
        #region å›ºå®šä»£ç 
        ~ClsSc_PackUnionBill()
        {
            DetailColl = null;
        }
        #endregion   è‡ªå®šä¹‰æ–¹æ³•
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate Sc_PackUnionBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +
                ",HDate='" + omodel.HDate + "'" +
                ",HICMOInterID=" + omodel.HICMOInterID + "" +
                ",HICMOBillNo='" + omodel.HICMOBillNo + "'" +
                ",HBarCode_Pack='" + omodel.HBarCode_Pack + "'" +
                ",HMaterID=" + omodel.HMaterID + "" +
                ",HUnitID=" + omodel.HUnitID + "" +
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpdater='" + DBUtility.ClsPub.CurUserName + "'" +
                ",HUpdateDate='" + DBUtility.ClsPub.GetServerDate(-1) + "'" +
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                //DeleteRelation(ref sReturn, lngBillKey);
                ////删除子表
                DeleteBillSub(lngBillKey);
                ////插入子表
                omodel.HInterID = lngBillKey;
                foreach (Models.ClsSc_PackUnionBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into Sc_PackUnionBillSub " +
                      " (HInterID,HEntryID,HMaterID,HUnitID,HQty,HSourceID" +
                      ",HEquipID,HGroupID,HWorkerID,HScanDate,HBarCode,HBarCode_Pack" +
                      ",HCloseMan,HCloseType,HRemark" +
                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney)" +
                      " values("
                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HSourceID.ToString() + "" +
                      "," + oSub.HEquipID.ToString() + "," + oSub.HGroupID.ToString() + "," + oSub.HWorkerID.ToString() + ",'" + oSub.HScanDate.ToShortDateString() + "','" + oSub.HBarCode + "','" + oSub.HBarCode_Pack + "'" +
                      ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                      ") ");
                }
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
                oCn.RunProc("Insert Into Sc_PackUnionBillMain   " +
                "(HYear,HPeriod,HBillType,HInterID" +
                ",HDate,HBillNo,HBillStatus,HRemark,HICMOInterID" +
                ",HICMOBillNo,HBarCode_Pack,HMaterID,HUnitID" +
                ",HMaker,HMakeDate" +
                ") " +
                " values(" + omodel.HYear + "," + omodel.HPeriod + ",'" + this.BillType + "'," + omodel.HInterID + "" +
                ",'" + omodel.HDate + "','" + omodel.HBillNo.ToString() + "'," + omodel.HBillStatus + ",'" + omodel.HRemark + "'," + omodel.HICMOInterID + "" +
                ",'" + omodel.HICMOBillNo.ToString() + "','" + omodel.HBarCode_Pack.ToString() + "'," + omodel.HMaterID + "," + omodel.HUnitID + "" +
                ",'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'" +
                ") ");
                ////插入子表
                string HSourceInterID = "0";
                string HSourceEntryID = "0";
                string HSourceBillNo = "0";
                string HSourceBillType = "0";
                string HMaterID = "0";
                string HUnitID = "0";
                double HQty = 0;
                foreach (Models.ClsSc_PackUnionBillSub oSub in DetailColl)
                {
                    HSourceInterID = oSub.HSourceInterID.ToString();
                    HSourceEntryID = oSub.HSourceEntryID.ToString();
                    HSourceBillNo = oSub.HSourceBillNo.ToString();
                    HSourceBillType = oSub.HSourceBillType.ToString();
                    HMaterID = oSub.HMaterID.ToString();
                    HUnitID = oSub.HUnitID.ToString();
                    oCn.RunProc("Insert into Sc_PackUnionBillSub " +
                      " (HInterID,HEntryID,HMaterID,HUnitID,HQty,HSourceID" +
                      ",HEquipID,HGroupID,HWorkerID,HBarCode,HBarCode_Pack" +
                      ",HCloseMan,HCloseType,HRemark" +
                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney)" +
                      " values("
                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HSourceID.ToString() + "" +
                      "," + oSub.HEquipID.ToString() + "," + oSub.HGroupID.ToString() + "," + oSub.HWorkerID.ToString() + ",'" + oSub.HBarCode + "','" + oSub.HBarCode_Pack + "'" +
                      ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                      ") ");
                    HQty += oSub.HQty;
                }
                //箱码插入条码档案表
                oCn.RunProc("insert into Gy_BarCodeBill(HInterID,HEntryID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HBatchNo,HMakeDate " +
                             ",HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HUseFlag, HStopflag, HSupID, HGroupID, HPrintQty)" +
                             "values('" + HSourceInterID + "', 1, '" + omodel.HBarCode_Pack + "', '箱号条码', '" + HMaterID + "', '" + HUnitID + "','" + HQty + "', '', getdate()" +
                             ", '" + HSourceInterID + "', '" + HSourceEntryID + "', '" + HSourceBillNo + "', '" + HSourceBillType + "', 1, 0, 0, 0, 0)");
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //显示单据
        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //查询主表
                DataSet Ds;
                Ds = oCn.RunProcReturn("Select * from Sc_PackUnionBillMain Where HInterID=" + lngBillKey.ToString(), "Sc_PackUnionBillMain");
                if (Ds.Tables[0].Rows.Count == 0)
                {
                    sReturn = "单据未找到!";
                    return false;
                }
                //赋值
                omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
                omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
                omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
                omodel.HDate = Convert.ToDateTime(Ds.Tables[0].Rows[0]["HDate"]);
                omodel.HBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillNo"]);
                omodel.HRemark = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                //
                omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]);
                omodel.HICMOBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HICMOBillNo"]);
                omodel.HBarCode_Pack = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBarCode_Pack"]);
                omodel.HMaterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID"]);
                omodel.HUnitID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HUnitID"]);
                //
                omodel.HBacker = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBacker"]);
                omodel.HBackDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBackDate"]);
                omodel.HChecker = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HChecker"]);
                omodel.HCheckDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCheckDate"]);
                omodel.HMaker = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaker"]);
                omodel.HMakeDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMakeDate"]);
                omodel.HUpDateDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HUpDateDate"]);
                omodel.HUpDater = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HUpDater"]);
                omodel.HCloseDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCloseDate"]);
                omodel.HCloseMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCloseMan"]);
                omodel.HDeleteDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDeleteDate"]);
                omodel.HDeleteMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDeleteMan"]);
                //循环
                DataSet DsSub;
                DsSub = oCn.RunProcReturn("Select * from Sc_PackUnionBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sc_PackUnionBillSub");
                DetailColl.Clear();//清空
                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
                {
                    Models.ClsSc_PackUnionBillSub oSub = new Models.ClsSc_PackUnionBillSub();
                    oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
                    oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
                    oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
                    oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
                    oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]);
                    oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]);
                    oSub.HEquipID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEquipID"]);
                    oSub.HGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HGroupID"]);
                    oSub.HWorkerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWorkerID"]);
                    oSub.HScanDate = Convert.ToDateTime(DsSub.Tables[0].Rows[i]["HScanDate"]);
                    oSub.HBarCode = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBarCode"]);
                    oSub.HBarCode_Pack =DBUtility.ClsPub.isStrNull( DsSub.Tables[0].Rows[i]["HBarCode_Pack"]);
                    oSub.HRemark = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HRemark"]);
                    oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
                    oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
                    //
                    oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
                    oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
                    oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSourceBillType"]);
                    oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSourceBillNo"]);
                    oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
                    oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
                    DetailColl.Add(oSub);
                }
                sReturn = "显示单据成功!";
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                throw (e);
            }
        }
        /// <summary>
        ///  æ¡ç æ‰«æè®°å½•,新增到包装单子表(状态为 0  ä¸´æ—¶è®°å½•)
        /// </summary>
        /// <param name="DetailColl"></param>
        /// <param name="sReturn"></param>
        /// <returns></returns>
        public bool AddBill_PDA(Model.ClsSc_PackUnionBillSub oSub, ref string sReturn)
        {
            try
            {
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                ////插入子表
                oCn.RunProc("Insert into Sc_PackUnionBillSub " +
                  " (HInterID,HEntryID,HMaterID,HUnitID,HQty,HSourceID" +
                  ",HEquipID,HGroupID,HWorkerID,HScanDate,HBarCode,HBarCode_Pack" +
                  ",HCloseMan,HCloseType,HRemark,HStatus" +
                  ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney)" +
                  " values("
                  + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HSourceID.ToString() + "" +
                  "," + oSub.HEquipID.ToString() + "," + oSub.HGroupID.ToString() + "," + oSub.HWorkerID.ToString() + ",getdate(),'" + oSub.HBarCode + "','" + oSub.HBarCode_Pack + "'" +
                  ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "',0" +
                  "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                  ") ");
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //条码扫描记录,新增到包装单
        public bool AddBill_PDA(Model.ClsSc_PackUnionBillMain omodel, ref string sReturn)
        {
            try
            {
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //修改子表状态为 1  , æœ‰æ•ˆæ•°æ®
                oCn.RunProc("update Sc_PackUnionBillSub set HStatus=1 where HInterID=" + omodel.HInterID.ToString());
                //主表
                oCn.RunProc("Insert Into Sc_PackUnionBillMain   " +
                "(HYear,HPeriod,HBillType,HInterID" +
                ",HDate,HBillNo,HBillStatus,HRemark,HICMOInterID" +
                ",HICMOBillNo,HBarCode_Pack,HMaterID,HUnitID" +
                ",HMaker,HMakeDate" +
                ") " +
                " values(" + omodel.HYear + "," + omodel.HPeriod + ",'" + this.BillType + "'," + omodel.HInterID + "" +
                ",getdate(),'" + omodel.HBillNo.ToString() + "'," + omodel.HBillStatus + ",'" + omodel.HRemark + "'," + omodel.HICMOInterID + "" +
                ",'" + omodel.HICMOBillNo.ToString() + "','" + omodel.HBarCode_Pack.ToString() + "'," + omodel.HMaterID + "," + omodel.HUnitID + "" +
                ",'" + omodel.HMaker + "',getdate()" +
                ") ");
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //根据代码返回项目信息
        public DataSet GetInfoByID_View(long HInterID, string sWhere)
        {
            DataSet DS;
            try
            {
                DS = oCn.RunProcReturn("Select * from h_v_Sc_PackUnionBillSub Where HInterID=" + HInterID.ToString() + " " + sWhere, "h_v_Sc_PackUnionBillSub", ref DBUtility.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count == 0)
                    return null;
                else
                {
                    return DS;
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //判断条码临时表中是否存在
        public bool IsBarCodePack(string HBarCode_Pack)
        {
            DataSet DS;
            try
            {
                DS = oCn.RunProcReturn("Select * from Sc_PackUnionBillMain Where  HBarCode_Pack='" + HBarCode_Pack + "'", "Sc_PackUnionBillMain", ref DBUtility.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count == 0)
                    return true;       //不存在相同条码
                else
                {
                    return false;
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //判断条码临时表中是否存在
        public bool IsBarCode(string sBarCode)
        {
            DataSet DS;
            try
            {
                DS = oCn.RunProcReturn("Select * from Sc_PackUnionBillSub Where  HBarCode='" + sBarCode + "'", "Sc_PackUnionBillSub", ref DBUtility.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count == 0)
                    return true;       //不存在相同条码
                else
                {
                    return false;
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //审核包装单(如果子表中的条码不在条码档案中 åˆ™ï¼Œåœ¨æ¡£æ¡ˆä¸­è‡ªåŠ¨ç”Ÿæˆï¼‰
        public bool CheckBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                oCn.BeginTran();
                string HChecker =DBUtility.ClsPub.CurUserName;
                //string HCheckDate = DBUtility.ClsPub.GetServerDate(-1);
                oCn.RunProc("Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate=getdate() Where HInterID=" + lngBillKey.ToString());
                oCn.RunProc("exec h_p_WMS_PackUnionToBarCode   " + lngBillKey.ToString() ); //更新条码档案
                sReturn = "";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
    }
}
WebAPI/ListModels.cs
@@ -583,6 +583,18 @@
        }
        /// <summary>
        /// å¤„理新盘点方案表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Models.ClsGy_StockCheckItemBill> getObjectByJson_Gy_StockCheckItem(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Models.ClsGy_StockCheckItemBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_StockCheckItemBill>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增模具保养记录表主表的json
        /// </summary>
        /// <param name="jsonString"></param>
@@ -1653,7 +1665,19 @@
            List<Models.ClsSc_MESBeginWorkBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsSc_MESBeginWorkBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// æŠ¥å·¥å¹³å°è¿”工单主表json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsSc_ProcessPlanMain> getObjectByJson_Gy_MESReturnWorkFrom(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsSc_ProcessPlanMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ProcessPlanMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// æŠ¥å·¥å¹³å°äº§é‡æ±‡æŠ¥ä¸»è¡¨json
        /// </summary>
WebAPI/Models/ClsGy_StockCheckItemBill.cs
New file
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class ClsGy_StockCheckItemBill : DBUtility.ClsGy_Base_Model
    {
        //public int HItemID;              // int                     //主键 int
        //public string HNumber;          //         varchar(50)        //代码
        //public string HName;            // varchar(50)        //名称
        //public string HShortNumber;     // varchar(50)        //短代码
        //public int HParentID;           // int           //父级ID int
        //public int HLevel;              //         int            //等级    int
        //public bool HEndFlag;           //            bit            //末级标志 bit
        //public bool HStopflag;          //       bit            //禁用标志 bit
        //public string HRemark;          //         varchar(500)        //备注 varchar(50)
        //public string HHelpCode;        // varchar(20)        //助记码  varchar(20)
        //public string HUseFlag;         // varchar(10)        //使用状态(未检测,未使用,已使用)
        //public DateTime HMakeTime;      // datetime            //建立时间(getdate())
        public string HMakeEmp;         // varchar(100)        //创建人
        public string HCheckEmp;        // varchar(100)        //审核人
        public DateTime HCheckTime;     // datetime            //审核时间
        public string HModifyEmp;       // varchar(100)        //修改人
        public DateTime HModifyTime;    // datetime            //修改时间
        public string HStopEmp;         // varchar(100)        //禁用人
        public DateTime HStopTime;      // datetime            //禁用时间
        public DateTime HEndDate;
        public int HOrgID;
    }
}
WebAPI/Models/ClsSc_PackUnionBillMain.cs
New file
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WebAPI.Models
{
    public class ClsSc_PackUnionBillMain : DBUtility.ClsXt_BaseBillMain
    {
        public Int64 HICMOInterID;
        public string HICMOBillNo;
        public string HBarCode_Pack;
        public Int64 HMaterID;
        public Int64 HUnitID;
    }
}
WebAPI/Models/ClsSc_PackUnionBillSub.cs
New file
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WebAPI.Models
{
    public class ClsSc_PackUnionBillSub : DBUtility.ClsXt_BaseBillSub
    {
        //============
        public Int64 HMaterID;
        public Int64 HUnitID;
        public double HQty;
        public Int64 HErpClsID;
        public Int64 HSourceID;
        public Int64 HEquipID;
        public Int64 HGroupID;
        public Int64 HWorkerID;
        public DateTime HScanDate;
        public string HBatchNo;
        public string HBarCode;
        public string HBarCode_Pack;
    }
}
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -18,25 +18,25 @@
      <publishTime>02/22/2013 08:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>12/10/2021 14:08:52</publishTime>
      <publishTime>12/14/2021 15:46:52</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>12/10/2021 14:08:52</publishTime>
      <publishTime>12/14/2021 15:46:52</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>12/10/2021 14:08:44</publishTime>
      <publishTime>12/14/2021 15:46:49</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>12/10/2021 14:08:44</publishTime>
      <publishTime>12/14/2021 15:46:49</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 14:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>12/10/2021 14:08:24</publishTime>
      <publishTime>12/14/2021 15:46:43</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>12/10/2021 14:08:24</publishTime>
      <publishTime>12/14/2021 15:46:43</publishTime>
    </File>
    <File Include="bin/Interop.gregn6Lib.dll">
      <publishTime>08/25/2021 10:28:25</publishTime>
@@ -60,10 +60,10 @@
      <publishTime>07/25/2012 11:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>12/10/2021 14:08:25</publishTime>
      <publishTime>12/14/2021 15:46:44</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>12/10/2021 14:08:25</publishTime>
      <publishTime>12/14/2021 15:46:44</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>08/19/2021 09:44:01</publishTime>
@@ -72,22 +72,22 @@
      <publishTime>08/03/2014 20:33:56</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>12/10/2021 14:08:00</publishTime>
      <publishTime>12/14/2021 15:46:39</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>12/10/2021 14:08:00</publishTime>
      <publishTime>12/14/2021 15:46:39</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>12/10/2021 14:08:01</publishTime>
      <publishTime>12/14/2021 15:46:40</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>12/10/2021 14:08:01</publishTime>
      <publishTime>12/14/2021 15:46:40</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>12/10/2021 14:08:02</publishTime>
      <publishTime>12/14/2021 15:46:41</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>12/10/2021 14:08:02</publishTime>
      <publishTime>12/14/2021 15:46:41</publishTime>
    </File>
    <File Include="bin/stdole.dll">
      <publishTime>05/09/2021 13:35:37</publishTime>
@@ -189,10 +189,10 @@
      <publishTime>11/24/2014 11:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>12/10/2021 14:09:14</publishTime>
      <publishTime>12/14/2021 15:47:00</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>12/10/2021 14:09:14</publishTime>
      <publishTime>12/14/2021 15:47:00</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/17/2013 17:03:52</publishTime>
@@ -363,7 +363,7 @@
      <publishTime>08/06/2021 22:57:28</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>12/10/2021 14:12:34</publishTime>
      <publishTime>12/14/2021 15:49:27</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/WebAPI.csproj
@@ -449,8 +449,11 @@
    <Compile Include="DLL\ClsSc_MouldOtherOutBill.cs" />
    <Compile Include="DLL\ClsSc_MouldOtherInBill.cs" />
    <Compile Include="DLL\ClsSc_MouldMoveStockStepOutBill.cs" />
    <Compile Include="DLL\ClsSc_PackUnionBill.cs" />
    <Compile Include="DLL\工资管理\ClsPay_GroupBalBill.cs" />
    <Compile Include="DLL\工资管理\ClsPay_WorkTimesBill.cs" />
    <Compile Include="Models\ClsSc_PackUnionBillMain.cs" />
    <Compile Include="Models\ClsSc_PackUnionBillSub.cs" />
    <Compile Include="Models\jsonScanline.cs" />
    <Compile Include="Models\ScanLineCode.cs" />
    <Compile Include="Models\工资管理\ClsPay_GroupBalBillEmp.cs" />