Pub_Class/CustomerCls/ClsPub.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/PublicPageMethodController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/Sc_ProcessMangementController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Pub_Class/CustomerCls/ClsPub.cs
@@ -478,6 +478,27 @@ oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='0' and whcode=''"); } return sBillNo; case 4: //根据 乔一 工序流转卡号改成年+月+四位流水号(23050001) Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='0' and whcode=''", "Gy_MaxNum"); sKjYear = sKjYear.Substring(2, 2); sPeriod = "0" + sPeriod; sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2); if (Ds.Tables[0].Rows.Count != 0) { sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length); sBillNo = sKjYear + sPeriod + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim(); } else //插入新记录 { sStr = new string(c, CodeLen - 1); oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber) values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)"); sBillNo = sKjYear + sPeriod + sStr + 1; } if (Add == true) { oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='0' and whcode=''"); } return sBillNo; default: return sBillNo; WebAPI/Controllers/PublicPageMethodController.cs
@@ -3410,7 +3410,7 @@ #region 条件查询权限列表 [Route("PublicPageMethod/PowerList")] [HttpGet] public object PowerList(string czybm, string sGnbm) public object PowerList(string czybm, string sGnbm,string HSouceBillType) { try { @@ -3426,10 +3426,17 @@ sName = sGnbm; } } if (HSouceBillType == "yh") { ds = oCN.RunProcReturn("select * from Gy_Czygl where czybm='" + czybm + "'", "Gy_Czygl"); } else if (HSouceBillType == "js") { ds = oCN.RunProcReturn("select * from System_UserGroup where GroupID='" + czybm + "'", "System_UserGroup"); } string AuthorityID = ClsPub.isStrNull(ds.Tables[0].Rows[0]["AuthorityID"]); ds = oCN.RunProcReturn("SELECT id hid,case when id<=" + AuthorityID.Length + " then case when SUBSTRING('" + AuthorityID + "',id,1)=1 then 1 else 0 end else 0 end AuthorityID,'' AuthorityHID, gnms ,gnbm hgnbm FROM xt_xtgnb where useflag=1 and sjgnbm='" + sName + "' and rightflag=1 order by gnbm", "xt_xtgnb"); ds = oCN.RunProcReturn("SELECT id hid,case when id<=" + AuthorityID.Length + " then case when SUBSTRING('" + AuthorityID + "',id,1)=1 then 1 else 0 end else 0 end AuthorityID,case when id<=" + AuthorityID.Length + " then case when SUBSTRING('" + AuthorityID + "',id,1)=1 then 1 else 0 end else 0 end AuthorityHID, gnms ,gnbm hgnbm FROM xt_xtgnb where useflag=1 and sjgnbm='" + sName + "' and rightflag=1 order by gnbm", "xt_xtgnb"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -3503,6 +3510,7 @@ string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string msg4 = sArray[2].ToString(); string HSouceBillType = sArray[3].ToString(); ListModels oListModels = new ListModels(); try { @@ -3511,7 +3519,16 @@ msg3 = msg3.Replace("\\", ""); msg3 = msg3.Replace("\n", ""); //\n lsmain = oListModels.getObjectByJson_UserPower(msg3); if (HSouceBillType == "yh") { ds = oCN.RunProcReturn("select * from Gy_Czygl where czybm='" + msg4.Trim() + "'", "Gy_Czygl"); } else if (HSouceBillType == "js") { ds = oCN.RunProcReturn("select * from System_UserGroup where GroupID='" + msg4 + "'", "System_UserGroup"); } string AuthorityID = ClsPub.isStrNull(ds.Tables[0].Rows[0]["AuthorityID"]); string Auth_str = AuthorityID; string MKID = ""; @@ -3565,7 +3582,16 @@ } oDs = null; } if (HSouceBillType == "yh") { oCN.RunProc("UPDATE Gy_Czygl SET AuthorityID='" + Auth_str + "' WHERE czybm='" + msg4.Trim() + "'"); } else if (HSouceBillType == "js") { oCN.RunProc("UPDATE System_UserGroup SET AuthorityID='" + Auth_str + "' WHERE GroupID='" + msg4.Trim() + "'"); } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "授权成功!"; WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -694,6 +694,21 @@ return objJsonResult; } //判断金蝶云生产汇报单 数量 是否 大于 末道出站数量 ds= oCN.RunProcReturn($@"select sum(FFinishQty)-(select HQty from Sc_StationOutBillMain where HBillNo='{BillNo}') from AIS20220308151944..T_PRD_MORPT rpt3 left join AIS20220308151944..T_PRD_MORPTENTRY rpt2 on rpt3.FID = rpt2.FID where F_bsv_Text=(select HProcExchBillNo from Sc_StationOutBillMain where HBillNo='{BillNo}')", "SumCount"); if (double.Parse(ds.Tables[0].Rows[0][0].ToString()) < 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "金蝶云汇报数量小于本地出站数量!"; objJsonResult.data = null; return objJsonResult; } JObject model = new JObject(); model.Add("FBillType", new JObject() { ["FNumber"] = "SCRKD01_SYS" }); //单据类型 model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //单据日期