chenhaozhe
1 天以前 14ae0e21c8660dbb3ac20a5b0d9db9b6dde3cfb9
WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs
@@ -1428,6 +1428,9 @@
                if(ds.Tables.Count>0 && ds.Tables[0].Rows[0]["HChecker"].ToString()=="")
                {
                    string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                    int HProcExchInterID = int.Parse(ds.Tables[0].Rows[0]["HProcExchInterID"].ToString());
                    int HProcExchEntryID = int.Parse(ds.Tables[0].Rows[0]["HProcExchEntryID"].ToString());
                    int HProcNo = int.Parse(ds.Tables[0].Rows[0]["HProcNo"].ToString());
                    //审核前控制================================================================================
                    string sql = "exec h_p_StationEntrustOutBill_WW_BeforeCheckCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql, "h_p_StationEntrustOutBill_WW_BeforeCheckCtrl");
@@ -1456,7 +1459,33 @@
                        oCN.RunProc($"update Sc_StationOutBillMain set HBillStatus = 2,HQty={HQty},HBadCount='{HBadCount}',HWasterQty='{HWasterQty}',HSourceID='{HSourceID}',HCenterID='{HCenterID}',HGroupID={HGroupID},HEmpID={HEmpID},HChecker='{user}',HCheckDate=getdate() where HInterID={HInterID} ");
                        
                    }
                    string sReturn = "";
                    //获取系统参数
                    oSystemParameter.ShowBill(ref sReturn);
                    //判断客户为天擎 同步金蝶工序汇报单
                    if (oSystemParameter.omodel.WMS_CampanyName == "天擎")
                    {
                        if (set_SaveStationEntrustOutBill_CLD(HBillNo, HProcExchInterID, HProcExchEntryID, HProcNo, HQty, user, ref DBUtility.ClsPub.sErrInfo))
                        {
                            oCN.Commit();
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            oCN.RollBack();
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
@@ -1527,7 +1556,7 @@
            try
            {
                //返回API递入所需数据
                DataSet Ds = oCn.RunProcReturn("exec h_p_MES_StationEntrustOutBill_ProdMateRequest_CLD " + HProcExchInterID.ToString() + "," + HProcExchEntryID.ToString() + "," + HProcNo.ToString() + "," + HQty.ToString(), "h_p_MES_StationEntrustOutBill_ProdMateRequest_CLD");
                DataSet Ds = oCn.RunProcReturn("exec h_p_MES_StationEntrustOutBill_ProdMateRequest_CLD '" + HBillNo + "'," + HProcExchInterID.ToString() + "," + HProcExchEntryID.ToString() + "," + HProcNo.ToString() + "," + HQty.ToString(), "h_p_MES_StationEntrustOutBill_ProdMateRequest_CLD");
                if (Ds == null || Ds.Tables[0].Rows.Count == 0)
                {
                    sErrMsg = "未获取到API所需递入数据!";
@@ -1626,11 +1655,11 @@
                "\"FInOperDescr\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInOperDescr"]) + "\"," +
                "\"FOutIsOutSrc\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOutIsOutSrc"]) + "\"," +
                "\"FInSeqNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInSeqNumber"]) + "\"," +
                //"\"FInPurOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInPurOrgId"]) + "\" }," +
                "\"FInPurOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInPurOrgId"]) + "\" }," +
                "\"FInOperNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInOperNumber"]) + "\"," +
                "\"FInWorkCenterId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInWorkCenterId"]) + "\" }," +
                //"FInEmpId": {"FSTAFFNUMBER": ""},
                //"\"FInSupplier\":{ \"FNAME\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInSupplier"]) + "\" }," +
                "\"FInSupplier\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInSupplier"]) + "\" }," +
                "\"FOperApplyQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOperApplyQty"]) + "\"," +
                "\"FTransferQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FTransferQty"]) + "\"," +
                "\"FApplyQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FApplyQty"]) + "\"," +
@@ -1651,22 +1680,22 @@
                //"FPreReworkQty": 0,
                //"FMatFailQty": 0,
                //"FValMatFailQty": 0,
                //"\"FSendCurrency\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendCurrency"]) + "\" }," +
                "\"FSendCurrency\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendCurrency"]) + "\" }," +
                "\"FIsInspect\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FIsInspect"]) + "\"," +
                "\"FQCSchemeId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FQCSchemeId"]) + "\" }," +
                //"\"FSendProFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendProFailPrice"]) + "\"," +
                "\"FSendProFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendProFailPrice"]) + "\"," +
                "\"FReceiveCurrency\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveCurrency"]) + "\" }," +
                "\"FReceiveQualifiedPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveQualifiedPrice"]) + "\"," +
                "\"FReceiveProFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveProFailPrice"]) + "\"," +
                "\"FReceiveMatFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveMatFailPrice"]) + "\"," +
                "\"FReceiveValuationUnitId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveValuationUnitId"]) + "\" }," +
                "\"FReceiveTaxRate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveTaxRate"]) + "\"," +
                //"\"FSendMatFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendMatFailPrice"]) + "\"," +
                "\"FSendMatFailPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendMatFailPrice"]) + "\"," +
                //"FOperInspectSelectQty": 0,
                "\"FSendValuationUnitId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendValuationUnitId"]) + "\" }," +
                //"FInspectSelectQty": 0,
                //"\"FSendTaxRate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendTaxRate"]) + "\"," +
                //"\"FSendQualifiedPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendQualifiedPrice"]) + "\"," +
                "\"FSendTaxRate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendTaxRate"]) + "\"," +
                "\"FSendQualifiedPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendQualifiedPrice"]) + "\"," +
                //"FOperQuaSettleSelQty": 0,
                //"FValQuaSettleSelQty": 0,
                //"FQuaSettleSelQty": 0,
@@ -1721,9 +1750,9 @@
                "\"FReceiveQualifiedTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveQualifiedTaxPrice"]) + "\"," +
                "\"FReceiveProFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveProFailTaxPrice"]) + "\"," +
                "\"FReceiveMatFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FReceiveMatFailTaxPrice"]) + "\"," +
                //"\"FSendQualifiedTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendQualifiedTaxPrice"]) + "\"," +
                //"\"FSendProFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendProFailTaxPrice"]) + "\"," +
                //"\"FSendMatFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendMatFailTaxPrice"]) + "\"," +
                "\"FSendQualifiedTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendQualifiedTaxPrice"]) + "\"," +
                "\"FSendProFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendProFailTaxPrice"]) + "\"," +
                "\"FSendMatFailTaxPrice\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSendMatFailTaxPrice"]) + "\"," +
                "\"FRateOperQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FRateOperQty"]) + "\"," +
                "\"FRateProQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FRateProQty"]) + "\"," +
                "\"FRateValQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FRateValQty"]) + "\"," +