This commit is contained in:
2025-12-11 17:49:54 +08:00
parent 96081cf795
commit 986e2a0d21
20 changed files with 514 additions and 206 deletions

View File

@@ -89,7 +89,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
private int _proIncrement = 100;
public override void OnInitialize(InitializeEventArgs e)
public override void OnInitialize(InitializeEventArgs e)
{
base.OnInitialize(e);
this._permissionConst = ((base.View.OpenParameter.SubSystemId == "SCP") ? "SCP_BarCodePrint" : "BD_BarCodePrint");
@@ -101,7 +101,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
this.InitCustParam(e);
}
public override void OnLoad(EventArgs e)
public override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (this._isFromBill == 1)
@@ -117,7 +117,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void IsAutoPacking()
private void IsAutoPacking()
{
this.barcodeSysParm = BarCodeCommonServiceHelper.GetBarCodeBillSystemParameters(base.Context, base.Context.CurrentOrganizationInfo.ID, this._sFormId);
base.View.Model.SetValue("FAutoPacking", this.barcodeSysParm.AutoCreatePaking);
@@ -125,7 +125,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
base.View.InvokeFieldUpdateService("FAutoPacking", 0);
}
public override void AfterBindData(EventArgs e)
public override void AfterBindData(EventArgs e)
{
base.AfterBindData(e);
this.SetDefData();
@@ -140,7 +140,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
public void SetComboItems()
public void SetComboItems()
{
Entity entity = base.View.BusinessInfo.GetEntity("FEntityToBar");
DynamicObjectCollection entityDataObject = base.View.Model.GetEntityDataObject(entity);
@@ -148,7 +148,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
control.SetComboItems(this._noteTemplates);
}
public override void AfterCreateNewEntryRow(CreateNewEntryEventArgs e)
public override void AfterCreateNewEntryRow(CreateNewEntryEventArgs e)
{
if (StringUtils.EqualsIgnoreCase(e.Entity.Key, "FEntityToBill"))
{
@@ -157,7 +157,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
base.AfterCreateNewEntryRow(e);
}
public override void BarItemClick(BarItemClickEventArgs e)
public override void BarItemClick(BarItemClickEventArgs e)
{
string text = e.BarItemKey.ToUpperInvariant();
if (text != null)
@@ -420,7 +420,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
base.EntryBarItemClick(e);
}
private void CreateBarCode(ExtendedDataEntity[] entitys, int iCount, string sType)
private void CreateBarCode(ExtendedDataEntity[] entitys, int iCount, string sType)
{
Logger.Info("BarCodePrintEdit", "CreateBarCode Start");
BarCodeCreateResult barCodeCreateResult = new BarCodeCreateResult();
@@ -569,7 +569,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
this.newPrintDatas = new List<DynamicObject>();
}
public override void OnPrepareNotePrintData(PreparePrintDataEventArgs e)
public override void OnPrepareNotePrintData(PreparePrintDataEventArgs e)
{
if (e.DataSourceId.Equals("FEntityToBar", StringComparison.OrdinalIgnoreCase))
{
@@ -764,7 +764,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
base.OnPrepareNotePrintData(e);
}
private object GetBaseDataPropByBaseData(string formId, string fieldProp, DynamicObject itemValue)
private object GetBaseDataPropByBaseData(string formId, string fieldProp, DynamicObject itemValue)
{
FormMetadata formMetadata = (FormMetadata)MetaDataServiceHelper.Load(base.View.Context, Convert.ToString(formId), true);
BusinessInfo businessInfo = formMetadata.BusinessInfo;
@@ -784,7 +784,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return oriValue;
}
public override void DataChanged(DataChangedEventArgs e)
public override void DataChanged(DataChangedEventArgs e)
{
int entryRowCount = base.View.Model.GetEntryRowCount("FEntityToBill");
int entryRowCount2 = base.View.Model.GetEntryRowCount("FEntityToBar");
@@ -913,7 +913,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
base.DataChanged(e);
}
public override void BeforeF7Select(BeforeF7SelectEventArgs e)
public override void BeforeF7Select(BeforeF7SelectEventArgs e)
{
string text = e.FieldKey.ToUpper();
if (text != null)
@@ -938,7 +938,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
base.BeforeF7Select(e);
}
public override void BeforeSetItemValueByNumber(BeforeSetItemValueByNumberArgs e)
public override void BeforeSetItemValueByNumber(BeforeSetItemValueByNumberArgs e)
{
string text = e.BaseDataFieldKey.ToUpper();
if (text != null)
@@ -961,13 +961,13 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
public override void AfterSave(AfterSaveEventArgs e)
public override void AfterSave(AfterSaveEventArgs e)
{
base.View.UpdateView("FBILLCODEHEAD");
base.AfterSave(e);
}
public override void ButtonClick(ButtonClickEventArgs e)
public override void ButtonClick(ButtonClickEventArgs e)
{
base.ButtonClick(e);
string text = e.Key.ToUpperInvariant();
@@ -982,7 +982,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
public override void CustomEvents(CustomEventsArgs e)
public override void CustomEvents(CustomEventsArgs e)
{
base.CustomEvents(e);
List<SqlParam> list = new List<SqlParam>();
@@ -1043,7 +1043,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void GetReturnData()
private void GetReturnData()
{
List<string> list = new List<string>();
foreach (ListSelectedRow listSelectedRow in ((IListView)base.View.GetView(this.billPageId)).SelectedRowsInfo)
@@ -1062,7 +1062,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void GetReturnDataFromSession(bool clearSessionData)
private void GetReturnDataFromSession(bool clearSessionData)
{
List<string> list = new List<string>();
IListView listView = (IListView)base.View.GetView(this.billPageId);
@@ -1094,7 +1094,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void LockPrintInfo()
private void LockPrintInfo()
{
base.View.GetMainBarItem("tbNew").Enabled = true;
base.View.GetMainBarItem("tbSave").Enabled = true;
@@ -1114,13 +1114,13 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
base.View.StyleManager.SetEnabled("FBILLCODEHEAD", "FBILLCODEHEAD", false);
}
private bool GetBarCodeFilter(out string filter)
private bool GetBarCodeFilter(out string filter)
{
filter = string.Format("\r\n FID IN (SELECT DISTINCT FID from T_BD_BARCODERULETOBILL\r\n WHERE FBILLID = '{0}'\r\n )", this._sFormId);
return !string.IsNullOrWhiteSpace(filter);
}
private void SetBillRowLocked(List<int> lSeq)
private void SetBillRowLocked(List<int> lSeq)
{
EntryEntity entryEntity = base.View.BusinessInfo.GetEntryEntity("FEntityToBill");
foreach (int num in lSeq)
@@ -1133,7 +1133,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void SetDefData()
private void SetDefData()
{
if (this._isFromBill == 1)
{
@@ -1156,7 +1156,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private string GetDefaultPrinter()
private string GetDefaultPrinter()
{
long userId = base.Context.UserId;
long id = base.Context.CurrentOrganizationInfo.ID;
@@ -1169,7 +1169,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return BarCodePrintServiceHelper.GetDefaultPrinter(base.View.Context, userId, id, text);
}
private void BindBillData()
private void BindBillData()
{
if (this._isFromBill == 1)
{
@@ -1199,7 +1199,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void SetBillData(int eRuleId, int row)
private void SetBillData(int eRuleId, int row)
{
string text = string.Empty;
if (this.listData != null && this.listData.Count > 0)
@@ -1453,13 +1453,13 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private bool IsSubField(string fieldKey)
private bool IsSubField(string fieldKey)
{
int num = fieldKey.IndexOf("^");
return num > 0;
}
private string GetBillBaseDataFieldKey(string fieldKey)
private string GetBillBaseDataFieldKey(string fieldKey)
{
int num = fieldKey.IndexOf("^");
string result;
@@ -1474,7 +1474,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return result;
}
private string GetBaseDataSubFieldKey(string fieldKey)
private string GetBaseDataSubFieldKey(string fieldKey)
{
int num = fieldKey.IndexOf("^");
string result;
@@ -1489,7 +1489,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return result;
}
private BusinessInfo GetFormBusinessInfo(string formId)
private BusinessInfo GetFormBusinessInfo(string formId)
{
BusinessInfo result;
if (!this._baseBusinessInfo.ContainsKey(formId))
@@ -1505,7 +1505,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return result;
}
private DynamicObject GetBaseDataDynamicObject(string formId, string pkId)
private DynamicObject GetBaseDataDynamicObject(string formId, string pkId)
{
string key = string.Format("{0}#{1}", formId, pkId);
DynamicObject result;
@@ -1523,7 +1523,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return result;
}
private object GetBaseDataSubFieldValue(DynamicObject dy, BusinessInfo info, string key)
private object GetBaseDataSubFieldValue(DynamicObject dy, BusinessInfo info, string key)
{
object result = null;
Field field = info.GetField(key);
@@ -1543,7 +1543,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return result;
}
public DynamicObjectCollection GetDynamicRows(DynamicObject[] dySoruceObjsColl, DynamicObject dyRootSoruceObj, DynamicObjectCollection dybillCol, Dictionary<string, BarCodeBillCorrespondInfo> DicFieldCorresMap, List<string> lEntryNames, DynamicObjectType dotype, DynamicObject dybill, int iCurLevel, int iMaxLevel, string primaryField)
public DynamicObjectCollection GetDynamicRows(DynamicObject[] dySoruceObjsColl, DynamicObject dyRootSoruceObj, DynamicObjectCollection dybillCol, Dictionary<string, BarCodeBillCorrespondInfo> DicFieldCorresMap, List<string> lEntryNames, DynamicObjectType dotype, DynamicObject dybill, int iCurLevel, int iMaxLevel, string primaryField)
{
List<string> list = new List<string>(lEntryNames);
Dictionary<string, BarCodeBillCorrespondInfo> dictionary = new Dictionary<string, BarCodeBillCorrespondInfo>(DicFieldCorresMap);
@@ -1750,7 +1750,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return dynamicObjectCollection;
}
public DynamicObject GetNewDynamicObject(DynamicObject dybill)
public DynamicObject GetNewDynamicObject(DynamicObject dybill)
{
DynamicObject dynamicObject = new DynamicObject(dybill.DynamicObjectType);
foreach (DynamicProperty dynamicProperty in dybill.DynamicObjectType.Properties)
@@ -1760,7 +1760,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return dynamicObject;
}
private void CreateBillRows(DynamicObjectCollection billDetils, EntryEntity entity, Dictionary<string, BarCodeBillCorrespondInfo> DicFieldCorresMap)
private void CreateBillRows(DynamicObjectCollection billDetils, EntryEntity entity, Dictionary<string, BarCodeBillCorrespondInfo> DicFieldCorresMap)
{
int num = this.Model.GetEntryRowCount("FEntityToBill");
string text = base.View.Model.GetValue("FBARCODEMODEL").ToString();
@@ -1903,7 +1903,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void ModifyBillRow(DynamicObject detil, Dictionary<string, BarCodeBillCorrespondInfo> DicFieldCorresMap, int RowIndex)
private void ModifyBillRow(DynamicObject detil, Dictionary<string, BarCodeBillCorrespondInfo> DicFieldCorresMap, int RowIndex)
{
DynamicObject dObject = base.View.Model.GetValue("FBillId") as DynamicObject;
bool flag = false;
@@ -1990,7 +1990,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void InitCustParam(InitializeEventArgs e)
private void InitCustParam(InitializeEventArgs e)
{
int.TryParse((e.Paramter.GetCustomParameter("isFromBill") == null) ? string.Empty : e.Paramter.GetCustomParameter("isFromBill").ToString(), out this._isFromBill);
int.TryParse((e.Paramter.GetCustomParameter("isFromPrintList") == null) ? string.Empty : e.Paramter.GetCustomParameter("isFromPrintList").ToString(), out this._isFromPrintList);
@@ -2005,7 +2005,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
public void SetComboField()
public void SetComboField()
{
ComboFieldEditor fieldEditor = base.View.GetFieldEditor<ComboFieldEditor>("FBarCodeModel", 0);
fieldEditor.SetComboItems(this._noteTemplates);
@@ -2013,7 +2013,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
fieldEditor.SetComboItems(this._noteTemplates);
}
public void OpenBarCodeGetBill()
public void OpenBarCodeGetBill()
{
if (string.IsNullOrEmpty(this._sFormId))
{
@@ -2102,7 +2102,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void ApplyReturnData(FormResult ret)
private void ApplyReturnData(FormResult ret)
{
if (ret != null && ret.ReturnData != null && !string.IsNullOrWhiteSpace(ret.ReturnData.ToString()))
{
@@ -2136,7 +2136,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private bool CheckSelectRows()
private bool CheckSelectRows()
{
EntryEntity entryEntity = (EntryEntity)base.View.BusinessInfo.GetEntity("FEntityToBill");
DynamicObjectCollection source = (from p in base.View.Model.GetEntityDataObject(entryEntity)
@@ -2145,7 +2145,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return source.Count<DynamicObject>() > 1;
}
private string GetBarcodeWriteBackKey(DynamicObject doRule)
private string GetBarcodeWriteBackKey(DynamicObject doRule)
{
string result = string.Empty;
if (doRule != null)
@@ -2168,7 +2168,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return result;
}
public void SetBarCodeValue(List<KeyValuePair<int, Dictionary<string, List<string>>>> AllBoxContrastNumbers, string sType, List<string> existedNumbers = null)
public void SetBarCodeValue(List<KeyValuePair<int, Dictionary<string, List<string>>>> AllBoxContrastNumbers, string sType, List<string> existedNumbers = null)
{
Logger.Info("SetBarCodeValue", string.Format(ResManager.LoadKDString("生成条码分录数据开始", "c40bc32ce96a4219", (SubSystemType)16, new object[0]), new object[0]));
EntryEntity entryEntity = (EntryEntity)base.View.BusinessInfo.GetEntity("FEntityToBill");
@@ -2492,7 +2492,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
Logger.Info("SetBarCodeValue", string.Format(ResManager.LoadKDString("回填条码数量sql执行完成,执行时间:{0}", "3a0a11407d3f4caa", (SubSystemType)16, new object[0]), timeSpan.ToString("g")));
}
public void SetDefRuleId()
public void SetDefRuleId()
{
if (!string.IsNullOrEmpty(this._sFormId))
{
@@ -2505,7 +2505,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void SavingPrintBarCode()
private void SavingPrintBarCode()
{
if (this.CreateSavingPrintBarCode())
{
@@ -2525,7 +2525,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private bool CreateSavingPrintBarCode()
private bool CreateSavingPrintBarCode()
{
bool flag = false;
BarCoder barCoder = new BarCoder();
@@ -2567,7 +2567,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
return result;
}
private void PrintBarCode(string printType)
private void PrintBarCode(string printType)
{
this.printDatas = new List<DynamicObject>();
this.newPrintDatas = new List<DynamicObject>();
@@ -2809,7 +2809,7 @@ namespace Gatedge.ScanCode.Basis.PlugIn.Bill.BAR_BarCodePrint.FormPlugIn
}
}
private void CalcCreateNumber2(int RowIndex)
private void CalcCreateNumber2(int RowIndex)
{
decimal d = Convert.ToDecimal(base.View.Model.GetValue("FQty", RowIndex));
decimal num = Convert.ToDecimal(base.View.Model.GetValue("FMinPackCount", RowIndex));