Commit 10e2cd47 authored by liudong1993's avatar liudong1993

资产批量导入 增加二维码生成, 资产流程 模板查询增加集团

parent 64ea889d
......@@ -553,8 +553,29 @@ namespace Property.Module.FixedAssets
BMStr = "0" + BMStr; break;
}
}
#region 生成二维码
string QRPath = DateTime.Now.Ticks.ToString() + ".png";
string basepath = AppContext.BaseDirectory;
string path_server = basepath + "\\upfile\\code\\" + QRPath;
string ImageAddress = "/upfile/code/" + QRPath;
string logoPath = basepath + "\\ExportFile\\Branch\\Logo.png";
try
{
QRCodeHelper.Create_CodeImages("PropertyCheck|Id=" + PropertyId, 5, logoPath, path_server, System.Drawing.Imaging.ImageFormat.Png);
}
catch (Exception ex)
{
LogHelper.Write(ex, "QRCodeHelper.Create_CodeImages");
ImageAddress = "";
}
#endregion
Dictionary<string, object> files = new Dictionary<string, object>() {
{ nameof(RB_Property_Info.PropertyNum),BMStr}
{ nameof(RB_Property_Info.PropertyNum),BMStr},
{ nameof(RB_Property_Info.QRCode),ImageAddress}
};
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
......@@ -1362,7 +1383,7 @@ namespace Property.Module.FixedAssets
}
#endregion
//判断是否需要流程审批
var tmodel = GetTempleteModel(auditenum, demodel.BranchId ?? 0);
var tmodel = GetTempleteModel(auditenum, demodel.BranchId ?? 0, demodel.RB_Group_Id ?? 0);
var rmodel = auditRelevanceRepository.GetList(new RB_Property_AuditRelevance() { RB_Group_Id = demodel.RB_Group_Id, Type = auditenum }).FirstOrDefault();
model.AuditStatus = OrderStateEnum.Complete;
model.TempleteId = 0;
......@@ -1698,7 +1719,7 @@ namespace Property.Module.FixedAssets
}
#endregion
//判断是否需要流程审批
var tmodel = GetTempleteModel(auditenum, demodel.BranchId ?? 0);
var tmodel = GetTempleteModel(auditenum, demodel.BranchId ?? 0, demodel.RB_Group_Id ?? 0);
demodel.AuditStatus = OrderStateEnum.Complete;
var rmodel = auditRelevanceRepository.GetList(new RB_Property_AuditRelevance() { RB_Group_Id = demodel.RB_Group_Id, Type = auditenum }).FirstOrDefault();
......@@ -2010,7 +2031,7 @@ namespace Property.Module.FixedAssets
var demodel = supplies_StockInRepository.GetEntity(StockInId);
UserInfo userInfo = CacheManager.User.UserReidsCache.GetUserLoginInfo((demodel.CreateBy ?? 0).ToString());
//判断是否需要流程审批
var tmodel = GetTempleteModel(PropertyFlowEnum.StockIn, demodel.RB_Branch_Id ?? 0);
var tmodel = GetTempleteModel(PropertyFlowEnum.StockIn, demodel.RB_Branch_Id ?? 0, demodel.RB_Group_Id ?? 0);
var rmodel = auditRelevanceRepository.GetList(new RB_Property_AuditRelevance() { RB_Group_Id = demodel.RB_Group_Id, Type = PropertyFlowEnum.StockIn }).FirstOrDefault();
if (rmodel != null && rmodel.Enabled == 1)
{
......@@ -2419,9 +2440,9 @@ namespace Property.Module.FixedAssets
/// <param name="audite"></param>
/// <param name="BranchId"></param>
/// <returns></returns>
private Rb_Workflow_Template_Extend GetTempleteModel(PropertyFlowEnum audite, int BranchId)
private Rb_Workflow_Template_Extend GetTempleteModel(PropertyFlowEnum audite, int BranchId, int GroupId)
{
var tempList = workflow_TemplateRepository.GetList(new Rb_Workflow_Template_Extend() { TemplateSorce = 2, PropertyType = audite, Status = FinanceDataEnum.Normal });
var tempList = workflow_TemplateRepository.GetList(new Rb_Workflow_Template_Extend() { RB_GroupId = GroupId, TemplateSorce = 2, PropertyType = audite, Status = FinanceDataEnum.Normal });
List<RB_FinanceFlowConnect_Extend> fcList = new List<RB_FinanceFlowConnect_Extend>();
//再验证公司别
if (tempList.Any())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment