yusijie
2024-03-07 c5a629655949aa14868b66e8517e6c5505b2ad8a
工序工价新增字段;PDA 设备,质量模块查询列表
7个文件已修改
100 ■■■■ 已修改文件
DAL/基础资料/其他基础资料/ClsGy_ProcPrice_Ctl.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/基础资料/其他基础资料/ClsGy_ProcPrice_Model.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/工序检验单/MES_ProcessCheckBill_PDAController.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/工资基础资料/Gy_ProcPriceController.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsGy_ProcPrice.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/»ù´¡×ÊÁÏ/ÆäËû»ù´¡×ÊÁÏ/ClsGy_ProcPrice_Ctl.cs
@@ -64,10 +64,13 @@
                    oCn.RunProc("Insert into Gy_ProcPrice " +
                        " (HMaterID,HProcID,HSourceID" +
                        ",HBeginDate,HEndDate,HCostFlag,HFlowFlag,HPayFlag,HDeptID" +
                        ",HPrice,HStopflag,HRemark,HMaker,HMakeDate)" +
                        ",HPrice,HStopflag,HRemark,HMaker,HMakeDate,HWorkCenterID,HWorkQty,HStdEmp" +
                        ",HChangeTimes,HChangeMoney,HProcNo,HPieceTimes,HMouldQty,HChangeMouldMoney,HRushQty)" +
                        " values(" + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HSourceID.ToString() +
                        ",'" + oSub.HBeginDate.ToShortDateString() + "','" + oSub.HEndDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCostFlag ? 1 : 0) + "," + Convert.ToString(oSub.HFlowFlag ? 1 : 0) + "," + Convert.ToString(oSub.HPayFlag ? 1 : 0) + "," + oSub.HDeptID.ToString() +
                        "," + oSub.HPrice.ToString() + "," + Convert.ToString(oSub.HStopflag ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') ");
                        "," + oSub.HPrice.ToString() + "," + Convert.ToString(oSub.HStopflag ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "'," + oSub.HWorkCenterID + "," + oSub.HWorkQty + "," + oSub.HStdEmp + "," + oSub.HChangeTimes + "," +
                        oSub.HChangeMoney + "," + oSub.HProcNo + "," + oSub.HPieceTimes + "," + oSub.HMouldQty + "," + oSub.HChangeMouldMoney + "," +
                        oSub.HRushQty + ") ");
                }
                oCn.Commit();
                return true;
@@ -92,10 +95,13 @@
                    oCn.RunProc("Insert into Gy_ProcPrice " +
                         " (HMaterID,HProcID,HSourceID" +
                         ",HBeginDate,HEndDate,HCostFlag,HFlowFlag,HPayFlag,HDeptID" +
                         ",HPrice,HStopflag,HRemark,HMaker,HMakeDate)" +
                         ",HPrice,HStopflag,HRemark,HMaker,HMakeDate,HWorkCenterID,HWorkQty,HStdEmp" +
                         ",HChangeTimes,HChangeMoney,HProcNo,HPieceTimes,HMouldQty,HChangeMouldMoney,HRushQty)" +
                         " values(" + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HSourceID.ToString() +
                         ",'" + oSub.HBeginDate.ToShortDateString() + "','" + oSub.HEndDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCostFlag ? 1 : 0) + "," + Convert.ToString(oSub.HFlowFlag ? 1 : 0) + "," + Convert.ToString(oSub.HPayFlag ? 1 : 0) + "," + oSub.HDeptID.ToString() +
                         "," + oSub.HPrice.ToString() + "," + Convert.ToString(oSub.HStopflag ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') ");
                         "," + oSub.HPrice.ToString() + "," + Convert.ToString(oSub.HStopflag ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "'," + oSub.HWorkCenterID + "," + oSub.HWorkQty + "," + oSub.HStdEmp + "," + oSub.HChangeTimes + "," +
                        oSub.HChangeMoney + "," + oSub.HProcNo + "," + oSub.HPieceTimes + "," + oSub.HMouldQty + "," + oSub.HChangeMouldMoney + "," +
                        oSub.HRushQty + ") ");
                }
                oCn.Commit();
                return true;
Model/»ù´¡×ÊÁÏ/ÆäËû»ù´¡×ÊÁÏ/ClsGy_ProcPrice_Model.cs
@@ -27,5 +27,16 @@
        public double HWasterPrice;//    money    //报废单价                addnew
        public bool HFlowFlag;      //流转默认工价
        public bool HPayFlag;       //工资默认工价
        public Int64 HWorkCenterID; //工作中心(Gy_WorkCenter)
        public double HWorkQty; //小时产能
        public double HStdEmp; //标准人力
        public double HChangeTimes; //换线时间
        public double HChangeMoney; //换线补贴
        public Int64 HProcNo; //工艺路线流水号
        public double HPieceTimes; //单件加工时间(字段可能已经存在了)
        public double HMouldQty; //模具数量
        public double HChangeMouldMoney; //换模补贴
        public double HRushQty; //单件冲次次数
    }
}
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -1016,6 +1016,14 @@
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl");
                if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"])  //是否管理员
                {
                    //不是管理员
                    sWhere += " and åˆ¶å•人 = '" + user + "'";
                }
                string sql = "select * from  h_v_QC_FirstPieceCheckBillMainList where 1=1  " + sWhere + " order by æ—¥æœŸ ";
                ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillMainList");
@@ -1101,8 +1109,9 @@
                long HProcExchEntryID = list[0].HProcExchEntryID;//流转卡子ID
                long HMainSourceInterID = list[0].HMainSourceInterID;//源单ID
                long HMainSourceEntryID = list[0].HMainSourceEntryID;//源单子ID
                string HMainSourceBillNo = list[0].HMainSourceBillNo;//流转卡子ID
                string HMainSourceBillNo = list[0].HMainSourceBillNo;//源单单号
                string HMainSourceBillType = list[0].HMainSourceBillType;//源单类型
                //表体数据
                List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg_entry);
                for (int i = 0; i < subList.ToArray().Length; i++)
@@ -1187,10 +1196,10 @@
                    oCN.RunProc("Insert Into QC_FirstPieceCheckBillMain " +
                    "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                    ",HYear,HPeriod,HMaterID,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchBillNo" +
                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)" +
                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType)" +
                    " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" +
                    "," + HYear + "," + HPeriod + ",'" + HMaterID + "','" + HSourceID + "'," + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "','" + HProcExchBillNo + "'" +  
                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "'" + ") ");
                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + ") ");
                    //插入子表
                    foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in BillNew.DetailColl)
@@ -1202,8 +1211,8 @@
                          ",HQCCheckItemID,HQCStd,HResult" +
                          ",HStatus,HUnitID,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" +
                          ") values("
                          + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + HICMOInterID.ToString() +
                          "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                          + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + HMainSourceInterID.ToString() +
                          "," + HMainSourceEntryID.ToString() + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                          "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HResult + "'" +
                          ",'" + oSub.HStatus +
                          "'," + oSub.HUnitID + "," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" +
WebAPI/Controllers/WebAPIController.cs
@@ -10050,7 +10050,7 @@
        /// <returns></returns>
        [Route("Web/GetEquipmentBillsList")]
        [HttpGet]
        public object GetEquipmentBillsList(string sWhere, string Type)
        public object GetEquipmentBillsList(string sWhere, string Type,string user)
        {            
            try
            {
@@ -10082,6 +10082,15 @@
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl");
                if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"])  //是否管理员
                {
                    //不是管理员
                    sWhere += " and åˆ¶å•人 = '" + user + "'";
                }
                string sql = string.Format(@"select * from " + HView + " where 1 = 1 " + sWhere);
                ds = oCN.RunProcReturn(sql, HView);
                //添加列名
WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/MES_ProcessCheckBill_PDAController.cs
@@ -68,6 +68,10 @@
                bool HLastResult = list[0].HLastResult;//试样结论
                Int64 HProcExchInterID = list[0].HProcExchInterID;//指引卡ID
                Int64 HProcExchEntryID = list[0].HProcExchEntryID;//指引卡子ID
                long HMainSourceInterID = list[0].HMainSourceInterID;//源单ID
                long HMainSourceEntryID = list[0].HMainSourceEntryID;//源单子ID
                string HMainSourceBillNo = list[0].HMainSourceBillNo;//源单单号
                string HMainSourceBillType = list[0].HMainSourceBillType;//源单类型
                //表体数据
                List<Model.ClsQC_ProcessCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub>>(msg_entry);
@@ -154,10 +158,11 @@
                    oCN.RunProc("Insert Into QC_ProcessCheckBillMain " +
                    "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                    ",HYear,HPeriod,HMaterID,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchBillNo" +
                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HProcID)" +
                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HProcID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType)" +
                    " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" +
                    "," + HYear + "," + HPeriod + ",'" + HMaterID + "','" + HSourceID + "'," + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "','" + HProcExchBillNo + "'" +
                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HProcID + ") ");
                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HProcID + "," + HMainSourceInterID +
                    "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + ") ");
                    //插入子表
                    foreach (Model.ClsQC_ProcessCheckBillSub oSub in BillNew.DetailColl)
@@ -169,8 +174,8 @@
                          ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue,HResult" +
                          ",HProcCheckEmp,HProcCheckTime,HStatus,HUnitID,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" +
                          ") values("
                          + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() +  ",'" + oSub.HRemark + "'," + HICMOInterID.ToString() +
                          "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                          + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() +  ",'" + oSub.HRemark + "'," + HMainSourceInterID.ToString() +
                          "," + HMainSourceEntryID.ToString() + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                          "," + oSub.HQCCheckClassID.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCRelValue + "','" + oSub.HResult + "'" +
                          "," + oSub.HProcCheckEmp.ToString() + ",GETDATE()"  + ",'"  + oSub.HStatus +
                          "'," + oSub.HUnitID + "," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'"  +
@@ -225,6 +230,13 @@
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl");
                if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"])  //是否管理员
                {
                    //不是管理员
                    sWhere += " and åˆ¶å•人 = '" + user + "'";
                }
                string sql = "select * from  h_v_QC_ProcessCheckBillMainList where 1=1  " + sWhere + " order by æ—¥æœŸ ";
                ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBillMainList");
WebAPI/Controllers/»ù´¡×ÊÁÏ/¹¤×Ê»ù´¡×ÊÁÏ/Gy_ProcPriceController.cs
@@ -37,7 +37,7 @@
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select * from h_v_Gy_ProcPriceList where 1 = 1 " + sWhere, "h_v_Gy_ProcPriceList");
                ds = oCN.RunProcReturn("select * from h_v_Gy_ProcPriceList where 1 = 1 " + sWhere + " order by åˆ¶å•日期 desc", "h_v_Gy_ProcPriceList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
@@ -131,6 +131,17 @@
                        oSub.HMaker = DBUtility.ClsPub.isStrNull(mainList[0].HMaker);
                        oSub.HMakeDate = DateTime.Today.ToString();
                        oSub.HRemark = DBUtility.ClsPub.isStrNull(subList[i].HRemarkCol);
                        oSub.HWorkCenterID = DBUtility.ClsPub.isLong(subList[i].HWorkCenterID);
                        oSub.HWorkQty = DBUtility.ClsPub.isDoule(subList[i].HWorkQty); //小时产能
                        oSub.HStdEmp = DBUtility.ClsPub.isDoule(subList[i].HStdEmp); //标准人力
                        oSub.HChangeTimes = DBUtility.ClsPub.isDoule(subList[i].HChangeTimes); //换线时间
                        oSub.HChangeMoney = DBUtility.ClsPub.isDoule(subList[i].HChangeMoney); //换线补贴
                        oSub.HProcNo = DBUtility.ClsPub.isLong(subList[i].HProcNo); //工艺路线流水号
                        oSub.HPieceTimes = DBUtility.ClsPub.isDoule(subList[i].HPieceTimes); //单件加工时间(字段可能已经存在了)
                        oSub.HMouldQty = DBUtility.ClsPub.isDoule(subList[i].HMouldQty); //模具数量
                        oSub.HChangeMouldMoney = DBUtility.ClsPub.isDoule(subList[i].HChangeMouldMoney); //换模补贴
                        oSub.HRushQty = DBUtility.ClsPub.isDoule(subList[i].HRushQty); //单件冲次次数
                        BillNew.DetailColl.Add(oSub);
                    }
                    else
WebAPI/Models/ClsGy_ProcPrice.cs
@@ -30,6 +30,16 @@
        public long HItemID { get; set; }
        public Int64 HWorkCenterID{ get; set; } //工作中心(Gy_WorkCenter)
        public double HWorkQty{ get; set; } //小时产能
        public double HStdEmp{ get; set; } //标准人力
        public double HChangeTimes{ get; set; } //换线时间
        public double HChangeMoney{ get; set; } //换线补贴
        public Int64 HProcNo{ get; set; } //工艺路线流水号
        public double HPieceTimes{ get; set; } //单件加工时间(字段可能已经存在了)
        public double HMouldQty{ get; set; } //模具数量
        public double HChangeMouldMoney{ get; set; } //换模补贴
        public double HRushQty{ get; set; } //单件冲次次数
    }
}