yangle
2022-07-28 61afd41b3b2e3511a9c597ddd8e171c96b0253a7
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
14个文件已添加
7个文件已修改
595 ■■■■■ 已修改文件
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_PckSplitBillController.cs 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_ProcessMangementController.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/工资管理/Pay_MonthlySalaryReportController.cs 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/工资管理/Pay_PieceRateWageReportController.cs 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/动态列/OptionListModel.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637933914348556956.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637933914350426996.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637933914350477009.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637933921042282724.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637933921048423377.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637933921048453385.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637933921055483894.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637933921056103923.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdInBill/Log/637933921056113939.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Sc_MouldProdOutBill/Log/637933914368426726.log 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Vlog/webapi20220714.txt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -176,6 +176,10 @@
                    {
                        omodel.Kf_MateOutBillCheck_WHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MateOutBillCheck_MultilineCtl")     //校验-多行相同物料自动拆分换行匹配
                    {
                        omodel.Kf_MateOutBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //生产退料单
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MateOutBackBill_AutoCheck")
                    {
@@ -488,6 +492,10 @@
                    {
                        omodel.Kf_MoveStockBillCheck_WHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MoveStockBillCheck_MultilineCtl")     //校验-多行相同物料自动拆分换行匹配
                    {
                        omodel.Kf_MoveStockBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //补料单
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MateReplenishOutBill_AutoCheck")
                    {
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -31,6 +31,7 @@
        public string Kf_MateOutBill_BillTypeOneScan;//本单据类型内只允许一次扫码(唯一码,含缓存列表)
        public string Kf_MateOutBillCheck_MustQtyCtl;   //校验数量控制
        public string Kf_MateOutBillCheck_WHSPCtl;   //校验-是否校对仓库仓位
        public string Kf_MateOutBillCheck_MultilineCtl; //校验-多行相同物料自动拆分换行匹配
        //生产退料
        public string Kf_MateOutBackBill_AutoCheck;
        public string Kf_MateOutBackBill_ERPMode;
@@ -122,6 +123,7 @@
        public string Kf_MoveStockBill_BillTypeOneScan;//本单据类型内只允许一次扫码(唯一码,含缓存列表)
        public string Kf_MoveStockBillCheck_MustQtyCtl;   //校验数量控制
        public string Kf_MoveStockBillCheck_WHSPCtl;   //校验-是否校对仓库仓位
        public string Kf_MoveStockBillCheck_MultilineCtl; //校验-多行相同物料自动拆分换行匹配
        //补料单
        public string Kf_MateReplenishOutBill_AutoCheck;
        public string Kf_MateReplenishOutBill_ERPMode;
WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -78,6 +78,106 @@
            }
        }
        [Route("Cg_POOrderBill/list3")]
        [HttpGet]
        public object list3(string sWhere, string user)
        {
            try
            {
                List<string> optionList = new List<string>();
                string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 ";
                ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
                if (ds != null)
                {
                    foreach (DataColumn item in ds.Tables[0].Columns)
                    {
                        optionList.Add(@"{ field: 'hmainid', title: '"+ item.ToString() + "', sort: true, hide: false }");
                    }
                    string option = string.Join(",",optionList);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = optionList.ToArray();
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "初始化表格失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                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 = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        [Route("Cg_POOrderBill/list2")]
        [HttpGet]
        public object list2(string sWhere, string user)
        {
            try
            {
                List<OptionListModel> optionList = new List<OptionListModel>();
                string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 ";
                ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
                if (ds != null)
                {
                    foreach (DataColumn item in ds.Tables[0].Columns)
                    {
                        optionList.Add(new OptionListModel
                        {
                            field = item.ToString(),
                            title = item.ToString(),
                            sort = true,
                            hide = false,
                        });
                    }
                    string option = string.Join(",", optionList);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = optionList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "初始化表格失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                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 = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// é‡‡è´­è®¢å• åˆ†é…
        ///参数:string sql。
@@ -201,13 +301,13 @@
        /// </summary>
        [Route("Cg_POOrderBill/Resynchronize")]
        [HttpGet]
        public object Resynchronize(string HBillNo,string HBillType)
        public object Resynchronize(string HBillNo, string HBillType)
        {
            try
            {
                oCN.BeginTran();
                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','"+ HBillType + "'", "h_p_WMS_ERPSourceBillToLocal");
                DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','" + HBillType + "'", "h_p_WMS_ERPSourceBillToLocal");
                if (DS == null)
                {
                    objJsonResult.code = "0";
@@ -325,7 +425,7 @@
                        else
                            fidList.Add(dr["FID"].ToString() + dr["HINTERID"].ToString());
                        DataRow[] drs = dt.Select("FID = " + dr["FID"].ToString() + " and HINTERID = "+dr["HINTERID"].ToString());
                        DataRow[] drs = dt.Select("FID = " + dr["FID"].ToString() + " and HINTERID = " + dr["HINTERID"].ToString());
                        JObject model = new JObject();
                        model.Add("FBILLTYPEID", new JObject() { ["Fnumber"] = "SLD01_SYS" }); //单据类型
@@ -561,4 +661,5 @@
        //
    }
}
WebAPI/Controllers/Sc_PckSplitBillController.cs
@@ -366,5 +366,82 @@
            }
        }
        #region ç”Ÿäº§é¢†æ–™æ‹†ç åˆ—表
        [Route("Sc_PckSplit/Get_PPickingBillList")]
        [HttpGet]
        public Object Get_PPickingBillList(string sWhere)
        {
            try
            {
                string sql1 = string.Format(@"select * from h_v_Kf_ICStockBillList where HBillType='1204' " + sWhere);
                 DataSet ds=oCn.RunProcReturn(sql1, "h_v_Kf_ICStockBillList");
                if (ds.Tables[0].Rows.Count == 0 || ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询失败!" + DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "暂无数据";
                    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 äº§çº¿å…³é”®ä»¶ç»‘定SN号查询
        [Route("Sc_PckSplit/Get_PHPCruxBillList")]
        [HttpGet]
        public Object Get_PHPCruxBillList(string HBarCode)
        {
            try
            {
                string sql1 = string.Format(@"select a.HMaterID,m.HName HMaterName,m.HModel HMaterSpec,a.HQtyMust,0 HQty,'"+ HBarCode + "' as HCPM from Sc_PPBomBillSub a left join Gy_Material m on a.HMaterID=m.HItemID where HICMOEntryID=(select HSourceEntryID from Gy_BarCodeBill where HBarCode='"+HBarCode+"')");
                DataSet ds = oCn.RunProcReturn(sql1, "Sc_PPBomBillSub");
                if (ds.Tables[0].Rows.Count == 0 || ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询失败!" + DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    //先存进临时表再返回数据
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "暂无数据";
                    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
    }
}
WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -223,7 +223,8 @@
                foreach (DataRow item in ds.Tables[0].Rows)
                {
                    JObject FentityModel = new JObject();
                    FentityModel.Add("FReportType", new JObject() { ["Fnumber"] = "1" });//生产汇报类型
                    FentityModel.Add("FIsNew", false);//  æºå•类型
                    FentityModel.Add("FReportType", dr1["FREPORTTYPENUMBER"].ToString());//生产汇报类型
                    FentityModel.Add("FSrcBillType", "PRD_MO");//  æºå•类型 
                    FentityModel.Add("FProductType", "1");//  äº§å“ç±»åž‹ 
                    FentityModel.Add("FSrcBillNo", item["任务单"].ToString());//  æºå•编号 
@@ -251,6 +252,7 @@
                    FentityModel.Add("FBomId", new JObject() { ["Fnumber"] = dr1["FBOMNUM"].ToString() }); //BOM版本:FBomId(必填项)
                    FentityModel.Add("FCostRate", dr1["FCostRate"].ToString());// æˆæœ¬æƒé‡
                    FentityModel.Add("FISBACKFLUSH", dr1["FISBACKFLUSH"].ToString() == "1" ? true : false);// å€’冲领料
                    //批号
                    //FFLOWID FFLOWLINEID FRULEID FSTABLENAME
                    //f6e6eec3 - 5267 - 4f02 - 8593 - b633da508a72    3   PRD_MO2MORPT T_PRD_MOENTRY
                    //业务流程图:FEntity_Link_FFlowId
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_StockCheckItemBillController.cs
@@ -211,7 +211,7 @@
                    ")", 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 = "保存成功!";
@@ -290,7 +290,7 @@
        }
        #endregion
        #region ç›˜ç‚¹åˆ†æžåˆ—表
        [Route("Gy_StockCheckItemBill/Get_InventoryAnalysisList")]
@@ -304,9 +304,9 @@
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                //判断是否选择盘点方案,是=>(用盘点方案子表做对比),否=>(用器具档案做对比)
                if (sID==null|| sID == "")
                if (sID == null || sID == "")
                {
                    if (sWhere=="pk")
                    if (sWhere == "pk")
                    {
                        sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK");
                    }
@@ -319,7 +319,7 @@
                {
                    if (sWhere == "pk")
                    {
                        sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK2 WHERE HInterID="+ sID);
                        sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisPK  '{sID}'");
                    }
                    else
                    {
@@ -449,6 +449,10 @@
                string msg2 = sArray[0].ToString();//表格数据
                string user = sArray[1].ToString();//user
                string userID = sArray[2].ToString();//userID
                string sName = sArray[3].ToString();//盘点方案
                //查询盘点方案创建日期
                DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem");
                string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString();
                //转化格式
                ListModels oListModels = new ListModels();
@@ -461,7 +465,6 @@
                {
                    var HBarCode = item.HBarCode;
                    var HItemID = item.HItemID;
                    string HDate = item.HMakeDate;
                    string HBillNo = "";
                    Int64 HInterID = 0;//显示的字段
                    DataSet ds1 = new DataSet();
@@ -478,9 +481,9 @@
                    ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                    ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
                    ") " +
                    " values('3814','3814'," + HInterID + ",'" + HBillNo + "','" + HDate+"'"+
                    ", '" + user + "',getdate()" +
                    ", " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
                    " values('3814','3814'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                    ", '" + user + "','" + HDate+
                    "', " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
                    ", 0," + dr["HDeptID"].ToString() + ",' ',0" +
                    ") ";
                    string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub   (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
@@ -498,7 +501,7 @@
                    oCn.RunProc("update Sc_MouldStockBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID);
                    oCn.Commit();
                }
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "审核成功!";
@@ -533,6 +536,10 @@
                string msg2 = sArray[0].ToString();//表格数据
                string user = sArray[1].ToString();//user
                string userID = sArray[2].ToString();//userID
                string sName = sArray[3].ToString();//盘点方案
                //查询盘点方案创建日期
                DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem");
                string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString();
                //转化格式
                ListModels oListModels = new ListModels();
@@ -546,7 +553,6 @@
                    var HBarCode = item.HBarCode;
                    var HItemID = item.HItemID;
                    string HBillNo = "";
                    string HDate = item.HMakeDate;
                    Int64 HInterID = 0;//显示的字段
                    DataSet ds1 = new DataSet();
                    ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain");
@@ -562,11 +568,11 @@
                    ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
                    ") " +
                    " values('3827','3827'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                    ", '" + user + "',getdate()" +
                    ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + ",isnull('" + dr["HNowSupID"].ToString() + "',0),0,0,0,0" +
                    ", '" + user + "','" +HDate+
                    "', " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + ",isnull('" + dr["HNowSupID"].ToString() + "',0),0,0,0,0" +
                    ", 0," + dr["HDeptID"].ToString() + ",'',0" +
                    ") ";
                    string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub   (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
                    HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID,
                    HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID,
@@ -574,7 +580,7 @@
                    "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," +
                    "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0"
                    + ",0,0,0," + userID + ",0,100005,'')");
                    //主表
                    oCn.BeginTran();
                    oCn.RunProc(sql);
@@ -582,7 +588,7 @@
                    oCn.RunProc("update Sc_MouldStockBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID);
                    oCn.Commit();
                }
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "审核成功!";
@@ -617,6 +623,11 @@
                string msg2 = sArray[0].ToString();//表格数据
                string user = sArray[1].ToString();//user
                string userID = sArray[2].ToString();//userID
                string sName = sArray[3].ToString();//盘点方案
                //查询盘点方案创建日期
                DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem");
                string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString();
                //转化格式
                ListModels oListModels = new ListModels();
@@ -629,34 +640,58 @@
                    var HBarCode = item.HBarCode;
                    var HItemID = item.HItemID;
                    string HBillNo = "";
                    string HDate = item.HMakeDate;
                    string sql, sql1;
                    Int64 HInterID = 0;//显示的字段
                    HInterID = DBUtility.ClsPub.CreateBillID("3828", ref DBUtility.ClsPub.sExeReturnInfo);
                    HBillNo = DBUtility.ClsPub.CreateBillCode("3828", ref DBUtility.ClsPub.sExeReturnInfo, true);
                    DataSet ds1 = new DataSet();
                    ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain");
                    ds1 = oCn.RunProcReturn("select top 1 * from Sc_MouldStockBillMain_Temp where HBarCode='" + HBarCode + "' and HItemID='" + HItemID + "'", "Sc_MouldStockBillMain_Temp");
                    DataRow dr = ds.Tables[0].Rows[0];
                    DataRow dr1 = ds1.Tables[0].Rows[0];
                    HInterID = DBUtility.ClsPub.CreateBillID("3832", ref DBUtility.ClsPub.sExeReturnInfo);
                    HBillNo = DBUtility.ClsPub.CreateBillCode("3832", ref DBUtility.ClsPub.sExeReturnInfo, true);
                    string sql = "Insert Into Sc_MouldStockBillMain   " +
                    "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                    ",HMaker,HMakeDate" +
                    ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                    ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
                    ") " +
                    " values('3832','3832'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                    ", '" + user + "',getdate()" +
                    ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
                    ", 0," + dr["HDeptID"].ToString() + ",' ',0" +
                    ") ";
                    string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub   (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
                    if (HItemID == 0)
                    {
                        sql = "Insert Into Sc_MouldStockBillMain   " +
                   "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                   ",HMaker,HMakeDate,HRemark" +
                   ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                   ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
                   ") " +
                   " values('3828','3828'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                   ", '" + user + "','"+ HDate + "','" + sName + "'" +
                   ",0,0," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
                   ", 0," + dr["HDeptID"].ToString() + ",' ',0" +
                   ") ";
                        sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub   (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
                    HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID,
                    HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID,
                    HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," +
                    "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," +
                    "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0"
                    + ",0,0,0," + userID + ",0,100005,'')");
                    HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," +
                   "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + ",0,0," +
                   "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + ",0,0,0,0"
                   + ",0,0,0," + userID + ",0,100005,'')");
                    }
                    else
                    {
                        ds1 = oCn.RunProcReturn("select top 1 * from Sc_MouldStockBillMain_Temp where HBarCode='" + HBarCode + "' and HItemID='" + HItemID + "'", "Sc_MouldStockBillMain_Temp");
                        DataRow dr1 = ds1.Tables[0].Rows[0];
                        sql = "Insert Into Sc_MouldStockBillMain   " +
                       "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                       ",HMaker,HMakeDate,HRemark" +
                       ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                       ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
                       ") " +
                       " values('3832','3832'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                       ", '" + user + "',getdate()" + ",'" + sName + "'" +
                       ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
                       ", 0," + dr["HDeptID"].ToString() + ",' ',0" +
                       ") ";
                        sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub   (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
                    HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID,
                    HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID,
                    HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," +
                       "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," +
                       "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0"
                       + ",0,0,0," + userID + ",0,100005,'')");
                    }
                    //主表
                    oCn.BeginTran();
@@ -699,6 +734,10 @@
                string msg2 = sArray[0].ToString();//表格数据
                string user = sArray[1].ToString();//user
                string userID = sArray[2].ToString();//userID
                string sName = sArray[3].ToString();//盘点方案
                //查询盘点方案创建日期
                DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem");
                string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString();
                //转化格式
                ListModels oListModels = new ListModels();
@@ -711,7 +750,6 @@
                    var HBarCode = item.HBarCode;
                    var HItemID = item.HItemID;
                    string HBillNo = "";
                    string HDate = item.HMakeDate;
                    Int64 HInterID = 0;//显示的字段
                    DataSet ds1 = new DataSet();
                    ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain");
@@ -728,8 +766,8 @@
                    ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
                    ") " +
                    " values('3802','3802'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                    ", '" + user + "',getdate()" +
                    ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
                    ", '" + user + "','" +HDate+
                    "', " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
                    ", 0," + dr["HDeptID"].ToString() + ",' ',0" +
                    ") ";
                    string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub   (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
@@ -747,7 +785,7 @@
                    oCn.RunProc("update Sc_MouldStockBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID);
                    oCn.Commit();
                }
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "审核成功!";
@@ -774,12 +812,17 @@
        public object MakeProdBack([FromBody] JObject msg)
        {
            try
            {   var _value = msg["msg"].ToString();
            {
                var _value = msg["msg"].ToString();
                string msg1 = _value.ToString();
                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
                string msg2 = sArray[0].ToString();//表格数据
                string user = sArray[1].ToString();//user
                string userID = sArray[2].ToString();//userID
                string sName = sArray[3].ToString();//盘点方案
                //查询盘点方案创建日期
                DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem");
                string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString();
                //转化格式
                ListModels oListModels = new ListModels();
@@ -792,7 +835,6 @@
                    var HBarCode = item.HBarCode;
                    var HItemID = item.HItemID;
                    string HBillNo = "";
                    string HDate = item.HMakeDate;
                    Int64 HInterID = 0;//显示的字段
                    DataSet ds1 = new DataSet();
                    ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain");
@@ -809,8 +851,8 @@
                    ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
                    ") " +
                    " values('3803','3803'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                    ", '" + user + "',getdate()" +
                    ", " + dr["HNowSupID"].ToString() + "," + dr["HNowSupTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
                    ", '" + user + "','" +HDate+
                    "', " + dr["HNowSupID"].ToString() + "," + dr["HNowSupTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
                    ", 0," + dr["HDeptID"].ToString() + ",' ',0" +
                    ") ";
                    string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub   (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,
@@ -828,7 +870,7 @@
                    oCn.RunProc("update Sc_MouldStockBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID);
                    oCn.Commit();
                }
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "审核成功!";
WebAPI/Controllers/¹¤×ʹÜÀí/Pay_MonthlySalaryReportController.cs
New file
@@ -0,0 +1,103 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers
{
    public class Pay_MonthlySalaryReportController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        /// <summary>
        /// è¿”回采购订单列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Pay_MonthlySalaryReport/list")]
        [HttpGet]
        public object list(string sWhere)
        {
            try
            {
                string sql = $"exec [h_p_MonthlySalaryReport] '{sWhere}'";
                ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
                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 = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        [Route("Pay_MonthlySalaryReport/list2")]
        [HttpGet]
        public object list2(string sWhere)
        {
            try
            {
                List<OptionListModel> optionList = new List<OptionListModel>();
                string sql = $"exec [h_p_MonthlySalaryReport] '{sWhere}'";
                ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
                if (ds != null)
                {
                    foreach (DataColumn item in ds.Tables[0].Columns)
                    {
                        optionList.Add(new OptionListModel
                        {
                            field = item.ToString(),
                            title = item.ToString(),
                            sort = true,
                            hide = false,
                        });
                    }
                    string option = string.Join(",", optionList);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = optionList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "初始化表格失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                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 = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
    }
}
WebAPI/Controllers/¹¤×ʹÜÀí/Pay_PieceRateWageReportController.cs
New file
@@ -0,0 +1,104 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers
{
    public class Pay_PieceRateWageReportController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        /// <summary>
        /// è¿”回采购订单列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Pay_PieceRateWageReport/list")]
        [HttpGet]
        public object list(string sWhere)
        {
            try
            {
                string sql = $"exec [h_p_PieceRateWageReport] '{sWhere}'";
                ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
                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 = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        [Route("Pay_PieceRateWageReport/list2")]
        [HttpGet]
        public object list2(string sWhere)
        {
            try
            {
                List<OptionListModel> optionList = new List<OptionListModel>();
                string sql = $"exec [h_p_PieceRateWageReport] '{sWhere}'";
                ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList");
                if (ds != null)
                {
                    foreach (DataColumn item in ds.Tables[0].Columns)
                    {
                        optionList.Add(new OptionListModel
                        {
                            field = item.ToString(),
                            title = item.ToString(),
                            sort = true,
                            hide = false,
                        });
                    }
                    string option = string.Join(",", optionList);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = optionList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "初始化表格失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                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 = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
    }
}
WebAPI/Models/¶¯Ì¬ÁÐ/OptionListModel.cs
New file
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class OptionListModel
    {
        public string field { get; set; }
        public string title { get; set; }
        public bool sort { get; set; }
        public bool hide { get; set; }
    }
}
WebAPI/Sc_MouldProdInBill/Log/637933914348556956.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:30:34------------------------------
成功!
WebAPI/Sc_MouldProdInBill/Log/637933914350426996.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:30:35------------------------------
有权限
WebAPI/Sc_MouldProdInBill/Log/637933914350477009.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:30:35------------------------------
select * from h_v_Sc_MouldProdInHouseBillList where åº“存组织='手机事业部' and CONVERT(varchar(100),日期, 23) >= '2022-06-14' and CONVERT(varchar(100),日期, 23) <= '2022-07-14'order by hmainid desc
WebAPI/Sc_MouldProdInBill/Log/637933921042282724.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:41:44------------------------------
成功!
WebAPI/Sc_MouldProdInBill/Log/637933921048423377.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:41:44------------------------------
有权限
WebAPI/Sc_MouldProdInBill/Log/637933921048453385.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:41:44------------------------------
select * from h_v_Sc_MouldProdInHouseBillList where åº“存组织='手机事业部' and CONVERT(varchar(100),日期, 23) >= '2022-06-14' and CONVERT(varchar(100),日期, 23) <= '2022-07-14'order by hmainid desc
WebAPI/Sc_MouldProdInBill/Log/637933921055483894.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:41:45------------------------------
成功!
WebAPI/Sc_MouldProdInBill/Log/637933921056103923.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:41:45------------------------------
有权限
WebAPI/Sc_MouldProdInBill/Log/637933921056113939.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:41:45------------------------------
select * from h_v_Sc_MouldProdInHouseBillList where åº“存组织='手机事业部' and CONVERT(varchar(100),日期, 23) >= '2022-06-14' and CONVERT(varchar(100),日期, 23) <= '2022-07-14'order by hmainid desc
WebAPI/Sc_MouldProdOutBill/Log/637933914368426726.log
New file
@@ -0,0 +1,3 @@
------------------------2022/7/14 10:30:36------------------------------
select * from h_v_Sc_MouldProdOutHouseBillList where åº“存组织='手机事业部'
WebAPI/Vlog/webapi20220714.txt
New file
@@ -0,0 +1,5 @@
2022/7/14 10:30:35  and CONVERT(varchar(100),日期, 23) >= '2022-06-14' and CONVERT(varchar(100),日期, 23) <= '2022-07-14';手机事业部
2022/7/14 10:41:44  and CONVERT(varchar(100),日期, 23) >= '2022-06-14' and CONVERT(varchar(100),日期, 23) <= '2022-07-14';手机事业部
2022/7/14 10:41:45  and CONVERT(varchar(100),日期, 23) >= '2022-06-14' and CONVERT(varchar(100),日期, 23) <= '2022-07-14';手机事业部
WebAPI/WebAPI.csproj
@@ -428,6 +428,8 @@
    <Compile Include="Controllers\仓存管理\验收入库\Kf_StepFoldinBillController.cs" />
    <Compile Include="Controllers\博日自动扫码线\ScanlineAPIController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_StockCheckItemBillController.cs" />
    <Compile Include="Controllers\工资管理\Pay_MonthlySalaryReportController.cs" />
    <Compile Include="Controllers\工资管理\Pay_PieceRateWageReportController.cs" />
    <Compile Include="Controllers\工资管理\Gy_ClassTimePrjBillController.cs" />
    <Compile Include="Controllers\工资管理\Gy_ClassTimePrjSubController.cs" />
    <Compile Include="Controllers\工资管理\Pay_OtherBalBillController.cs" />
@@ -572,6 +574,7 @@
    <Compile Include="Models\Sc_WorkBillSortBillSub.cs" />
    <Compile Include="Models\Sc_WorkDemandPlanBillMain.cs" />
    <Compile Include="Models\Sc_WorkDemandPlanBillSub.cs" />
    <Compile Include="Models\动态列\OptionListModel.cs" />
    <Compile Include="Models\工资管理\ClsGy_ClassTimePrj_Model.cs" />
    <Compile Include="Models\工资管理\ClsPay_GroupBalBillEmp.cs" />
    <Compile Include="Models\工资管理\ClsPay_GroupBalBillMain.cs" />