chenhaozhe
3 天以前 2f9476550e94b29a5abcce861e7aab8f7fae7d49
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -1728,11 +1728,11 @@
                    ds = oCN.RunProcReturn("select * from Sc_SourceLineRepairBillSub_Mater where HInterID=" + model.HInterID+ " order by HEntryID  desc", "Sc_SourceLineRepairBillSub_Mater");
                    oCN.RunProc($@"insert into Sc_SourceLineRepairBillSub_Mater
(HInterID,HEntryID,HBillNo_bak,HRemark,HSourceInterID
,HSourceEntryID,HSourceBillNo,HSourceBillType,HMaterID
,HUnitID,HBarCode,HBatchNo )values
({model.HInterID},{(ds.Tables[0].Rows.Count == 0 ? 1 : int.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()) + 1)},'{model.HBillNo}','',{temp.HProcExchInterID}
,{temp.HProcExchEntryID},'{temp.HProcExchBillNo}','',{temp.HMaterID},0,'{temp.HBarCode}','{temp.HBatchNo}')");
                    (HInterID,HEntryID,HBillNo_bak,HRemark,HSourceInterID
                    ,HSourceEntryID,HSourceBillNo,HSourceBillType,HMaterID
                    ,HUnitID,HBarCode,HBatchNo )values
                    ({model.HInterID},{(ds.Tables[0].Rows.Count == 0 ? 1 : int.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()) + 1)},'{model.HBillNo}','',{temp.HProcExchInterID}
                    ,{temp.HProcExchEntryID},'{temp.HProcExchBillNo}','',{temp.HMaterID},0,'{temp.HBarCode}','{temp.HBatchNo}')");
                    //修改产线追溯单绑定的条码批号
                    oCN.RunProc("update Sc_AssemblyBillSub set HBarCode='" + temp.HBarCode + "' where HInterID=" + temp.HInterID + " and HEntryID=" + temp.HEntryID);
@@ -1743,21 +1743,21 @@
                    model = JsonConvert.DeserializeObject<Model.ClsSc_SourceLineRepairBillMain>(sMainStr);
                    oCN.RunProc($@"insert into Sc_SourceLineRepairBillMain(HYear, HPeriod, HBillType, HBillSubType, HInterID,
HDate, HBillNo, HBillStatus, HRemark, HEmpID, HDeptID, HSourceID, HProdOrgID, HMaterID, HWorkStationID,
HProcess, HIPAddr, HMacAddr, HProdMac, HBarCode,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)
values('{DateTime.Now.Year}','{DateTime.Now.Month}','3748','3748',{model.HInterID}
,getdate(),'{model.HBillNo}','1','{HResult}',{model.HEmpID},{model.HDeptID},{model.HSourceID},{model.HProdOrgID},{model.HMaterID},0
,{model.HProcess},'','','','{model.HBarCode}','{user}',getdate(),{model.HICMOInterID},{model.HICMOEntryID},'{model.HICMOBillNo}')");
                    HDate, HBillNo, HBillStatus, HRemark, HEmpID, HDeptID, HSourceID, HProdOrgID, HMaterID, HWorkStationID,
                    HProcess, HIPAddr, HMacAddr, HProdMac, HBarCode,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)
                    values('{DateTime.Now.Year}','{DateTime.Now.Month}','3748','3748',{model.HInterID}
                    ,getdate(),'{model.HBillNo}','1','{HResult}',{model.HEmpID},{model.HDeptID},{model.HSourceID},{model.HProdOrgID},{model.HMaterID},0
                    ,{model.HProcess},'','','','{model.HBarCode}','{user}',getdate(),{model.HICMOInterID},{model.HICMOEntryID},'{model.HICMOBillNo}')");
                    List<Model.ClsSc_SourceLineRepairBillSub> subLsit = new List<Model.ClsSc_SourceLineRepairBillSub>();
                    sMainStr = "[" + sMainStr + "]";
                    subLsit = JsonConvert.DeserializeObject<List<Model.ClsSc_SourceLineRepairBillSub>>(sMainStr);
                    oCN.RunProc($@"insert into Sc_SourceLineRepairBillSub
(HInterID,HEntryID,HBillNo_bak,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType
,HBadReasonID,HBadTypeID,HBadResultID,HBadProcID,HRepairResult,HCreator,HCreateDate)
values({model.HInterID},1,'{model.HBillNo}','',{subLsit[0].HProcExchInterID},{subLsit[0].HProcExchEntryID},'{subLsit[0].HProcExchBillNo}',''
,{subLsit[0].HBadReasonID},{subLsit[0].HBadTypeID},{subLsit[0].HBadResultID},{model.HBadProcID},'{HResult}','{subLsit[0].HCreator}',getdate())");
                    (HInterID,HEntryID,HBillNo_bak,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType
                    ,HBadReasonID,HBadTypeID,HBadResultID,HBadProcID,HRepairResult,HCreator,HCreateDate)
                    values({model.HInterID},1,'{model.HBillNo}','{model.HRemark}',{subLsit[0].HProcExchInterID},{subLsit[0].HProcExchEntryID},'{subLsit[0].HProcExchBillNo}',''
                    ,{subLsit[0].HBadReasonID},{subLsit[0].HBadTypeID},{subLsit[0].HBadResultID},{model.HBadProcID},'{HResult}','{subLsit[0].HCreator}',getdate())");
                    if (HResult == "OK")
                    {
@@ -3446,7 +3446,8 @@
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Sc_UnbindStation_BarList order by 条码日期 desc", "h_v_Sc_UnbindStation_BarList");
                    ds = oCN.RunProcReturn("select * from h_v_Sc_UnbindStation_BarList" +
                        " order by 条码日期 desc", "h_v_Sc_UnbindStation_BarList");
                }
                else
                {