Merge branch 'master' of http://47.92.245.94:8000/r/RiskControl_RR_Fast
1个文件已删除
40个文件已修改
1 文件已重命名
12个文件已添加
2 文件已复制
| | |
| | | public static DataTable Import(string strFileName) |
| | | { |
| | | //int m = 0; |
| | | //try |
| | | //{ |
| | | DataTable dt = new DataTable(); |
| | | |
| | | HSSFWorkbook hssfworkbook; |
| | | using (FileStream file = new FileStream(strFileName, FileMode.Open, FileAccess.Read)) |
| | | try |
| | | { |
| | | hssfworkbook = new HSSFWorkbook(file); |
| | | } |
| | | DataTable dt = new DataTable(); |
| | | |
| | | ISheet sheet = hssfworkbook.GetSheetAt(0); |
| | | System.Collections.IEnumerator rows = sheet.GetRowEnumerator(); |
| | | |
| | | IRow headerRow = sheet.GetRow(0); |
| | | int cellCount = headerRow.LastCellNum; |
| | | |
| | | for (int j = 0; j < cellCount; j++) |
| | | { |
| | | //m = j; |
| | | ICell cell = headerRow.GetCell(j); |
| | | dt.Columns.Add(cell.ToString()); |
| | | } |
| | | |
| | | for (int i = (sheet.FirstRowNum + 1); i <= sheet.LastRowNum; i++) |
| | | { |
| | | IRow row = sheet.GetRow(i); |
| | | DataRow dataRow = dt.NewRow(); |
| | | |
| | | for (int j = row.FirstCellNum; j < cellCount; j++) |
| | | HSSFWorkbook hssfworkbook; |
| | | using (FileStream file = new FileStream(strFileName, FileMode.Open, FileAccess.Read)) |
| | | { |
| | | if (row.GetCell(j) != null) |
| | | dataRow[j] = row.GetCell(j).ToString(); |
| | | hssfworkbook = new HSSFWorkbook(file); |
| | | } |
| | | |
| | | dt.Rows.Add(dataRow); |
| | | } |
| | | ISheet sheet = hssfworkbook.GetSheetAt(0); |
| | | System.Collections.IEnumerator rows = sheet.GetRowEnumerator(); |
| | | |
| | | return dt; |
| | | //} |
| | | //catch (Exception e) |
| | | //{ |
| | | // Console.WriteLine(m.ToString()); |
| | | // throw; |
| | | //} |
| | | IRow headerRow = sheet.GetRow(0); |
| | | int cellCount = headerRow.LastCellNum; |
| | | |
| | | for (int j = 0; j < cellCount; j++) |
| | | { |
| | | //m = j; |
| | | ICell cell = headerRow.GetCell(j); |
| | | dt.Columns.Add(cell.ToString()); |
| | | } |
| | | |
| | | for (int i = (sheet.FirstRowNum + 1); i <= sheet.LastRowNum; i++) |
| | | { |
| | | //if (i == 3) |
| | | //{ |
| | | // string mm = ""; |
| | | //} |
| | | IRow row = sheet.GetRow(i); |
| | | if (row != null) |
| | | { |
| | | DataRow dataRow = dt.NewRow(); |
| | | for (int j = row.FirstCellNum; j < cellCount; j++) |
| | | { |
| | | if (row.GetCell(j) != null) |
| | | dataRow[j] = row.GetCell(j).ToString(); |
| | | } |
| | | |
| | | dt.Rows.Add(dataRow); |
| | | } |
| | | } |
| | | |
| | | return dt; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | //Console.WriteLine(m.ToString()); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | /// <param name="City"></param> |
| | | /// <param name="County"></param> |
| | | /// <returns></returns> |
| | | public EvaRegoinMap GetEvaRegoinMap(string Province, string City, string County = "") |
| | | public EvaRegoinMap GetEvaRegoinMap( string County = "") |
| | | { |
| | | return _acc.GetEvaRegoinMap(Province, City, County); |
| | | return _acc.GetEvaRegoinMap( County); |
| | | } |
| | | } |
| | | } |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | using Newtonsoft.Json.Linq; |
| | | |
| | | namespace GasolineBlend.BLL |
| | | { |
| | |
| | | { |
| | | EvaRecallPayParaExBLL evaRecallPayParaExBLL = new EvaRecallPayParaExBLL(); |
| | | FinBalanceSheetExBLL finBalanceSheetExBLL = new FinBalanceSheetExBLL(); |
| | | QiChaChaService qiChaCha = new QiChaChaService(); |
| | | //QiChaChaService qiChaCha = new QiChaChaService(); |
| | | TianYanChaService tianyancha=new TianYanChaService(); |
| | | SubjectExBLL subjectExBLL = new SubjectExBLL(); |
| | | //EvaNatureCorBLL evaNatureCorBLL = new EvaNatureCorBLL(); |
| | | EvaRegoinMapBLL evaRegoinMapBLL = new EvaRegoinMapBLL(); |
| | | IndustryBLL industryBLL = new IndustryBLL(); |
| | | var Flag = 1; |
| | |
| | | // // |
| | | //} |
| | | var SubIds = ""; |
| | | //var EvaReports = ""; |
| | | //æ·»å |
| | | foreach (var item in SubId) |
| | | { |
| | |
| | | var SubjectInfo = _acc.GetEvaSubjectListBySid(Subject[0].id, Subject[0].ProjId); |
| | | if (SubjectInfo != null) |
| | | { |
| | | //evaSubjectEx.PropertyId = SubjectInfo.PropertyId; |
| | | evaSubjectEx.Country = SubjectInfo.Country; |
| | | evaSubjectEx.Province = SubjectInfo.Province; |
| | | evaSubjectEx.City = SubjectInfo.City; |
| | |
| | | else |
| | | { |
| | | var SubName = Subject[0].Title; |
| | | var Qccinfo = await qiChaCha.GetFullDetail(SubName,false); |
| | | if (Qccinfo.Data != null) |
| | | var TycInfo = await tianyancha.GetBaseinfoV3(SubName); |
| | | if (TycInfo.Data != null) |
| | | { |
| | | object Area = Qccinfo.Data.GetType().GetProperty("Area").GetValue(Qccinfo.Data); |
| | | //object EconKind = Qccinfo.Data.GetType().GetProperty("EconKind").GetValue(Qccinfo.Data); |
| | | object Industry = Qccinfo.Data.GetType().GetProperty("Industry").GetValue(Qccinfo.Data); |
| | | if (Area != null) |
| | | object District = TycInfo.Data.GetType().GetProperty("District").GetValue(TycInfo.Data); |
| | | object Industry = TycInfo.Data.GetType().GetProperty("IndustryAll").GetValue(TycInfo.Data); |
| | | if (District != null) |
| | | { |
| | | var Province = Area.GetType().GetProperty("Province").GetValue(Area); |
| | | var City = Area.GetType().GetProperty("City").GetValue(Area); |
| | | var County = Area.GetType().GetProperty("County").GetValue(Area); |
| | | if (County != null) |
| | | var evaRegion = evaRegoinMapBLL.GetEvaRegoinMap(District.ToString()); |
| | | if (evaRegion != null) |
| | | { |
| | | var evaRegion = evaRegoinMapBLL.GetEvaRegoinMap(Province != null ? Province.ToString() : "", City != null ? City.ToString() : "", County.ToString()); |
| | | if (evaRegion!=null) |
| | | { |
| | | evaSubjectEx.Country = evaRegion.CountryValue; |
| | | evaSubjectEx.Province = evaRegion.ProvinceValue; |
| | | evaSubjectEx.City = evaRegion.CityValue; |
| | | evaSubjectEx.RegionInfo = "ä¸å½/" + evaRegion.SysProvince + "/" + evaRegion.SysCity; |
| | | } |
| | | else |
| | | { |
| | | LogHelper.Warn("å½å䏻使²¡æè·åå°ä¿¡æ¯ SubName:" + SubName); |
| | | } |
| | | |
| | | evaSubjectEx.Country = evaRegion.CountryValue; |
| | | evaSubjectEx.Province = evaRegion.ProvinceValue; |
| | | evaSubjectEx.City = evaRegion.CityValue; |
| | | evaSubjectEx.RegionInfo = "ä¸å½/" + evaRegion.SysProvince + "/" + evaRegion.SysCity; |
| | | } |
| | | else |
| | | { |
| | | var evaRegion = evaRegoinMapBLL.GetEvaRegoinMap(Province!=null?Province.ToString():"", City!=null? City.ToString():""); |
| | | if (evaRegion!=null) |
| | | { |
| | | evaSubjectEx.Country = evaRegion.CountryValue; |
| | | evaSubjectEx.Province = evaRegion.ProvinceValue; |
| | | evaSubjectEx.City = evaRegion.CityValue; |
| | | evaSubjectEx.RegionInfo = "ä¸å½/" + evaRegion.SysProvince + "/" + evaRegion.SysCity; |
| | | } |
| | | else |
| | | { |
| | | LogHelper.Warn("å½å䏻使²¡æè·åå°ä¿¡æ¯ SubName:" + SubName); |
| | | } |
| | | |
| | | evaSubjectEx.Country = 1000; |
| | | evaSubjectEx.Province = 0; |
| | | evaSubjectEx.City = 0; |
| | | evaSubjectEx.RegionInfo = "ä¸éå½å®¶"; |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | evaSubjectEx.RegionInfo = "ä¸éå½å®¶"; |
| | | |
| | | } |
| | | |
| | | if (Industry != null) |
| | | { |
| | | var SmallCategoryCode = Industry.GetType().GetProperty("SmallCategoryCode").GetValue(Industry); |
| | | if (SmallCategoryCode != null) |
| | | JObject IndustryArray = JObject.Parse(Industry.ToString()); |
| | | var SmallCategory = IndustryArray["categorySmall"].ToString(); |
| | | var MidCategory = IndustryArray["categoryMiddle"].ToString(); |
| | | if (SmallCategory != null && SmallCategory!="") |
| | | { |
| | | var industry = industryBLL.GetIndustrybyClassThirds(int.Parse(SmallCategoryCode.ToString())); |
| | | var industry = industryBLL.GetIndustrybyNameThird(SmallCategory); |
| | | if (industry != null) |
| | | { |
| | | evaSubjectEx.ClassLabel = industry.ClassLabel; |
| | |
| | | evaSubjectEx.ClassThird = 10000; |
| | | evaSubjectEx.ClassIndustry = "ä¸éè¡ä¸"; |
| | | } |
| | | |
| | | } |
| | | else if (MidCategory != null && MidCategory != "") |
| | | { |
| | | var industry = industryBLL.GetIndustrybyNameSecond(MidCategory); |
| | | if (industry != null) |
| | | { |
| | | evaSubjectEx.ClassLabel = industry.ClassLabel; |
| | | evaSubjectEx.ClassFirst = industry.ClassFirst; |
| | | evaSubjectEx.ClassSecond = industry.ClassSecond; |
| | | evaSubjectEx.ClassThird = industry.ClassThird; |
| | | evaSubjectEx.ClassIndustry = industry.NameLabel + "/" + industry.NameFirst + "/" + industry.NameSecond + "/" + industry.NameThird; |
| | | } |
| | | else |
| | | { |
| | | evaSubjectEx.ClassLabel = "X"; |
| | | evaSubjectEx.ClassFirst = 100; |
| | | evaSubjectEx.ClassSecond = 1000; |
| | | evaSubjectEx.ClassThird = 10000; |
| | | evaSubjectEx.ClassIndustry = "ä¸éè¡ä¸"; |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | evaSubjectEx.ClassSecond = 1000; |
| | | evaSubjectEx.ClassThird = 10000; |
| | | evaSubjectEx.ClassIndustry = "ä¸éè¡ä¸"; |
| | | //evaSubjectEx.PropertyId = 14; |
| | | } |
| | | |
| | | //var Qccinfo = await qiChaCha.GetFullDetail(SubName,false); |
| | | //if (Qccinfo.Data != null) |
| | | //{ |
| | | // object Area = Qccinfo.Data.GetType().GetProperty("Area").GetValue(Qccinfo.Data); |
| | | // //object EconKind = Qccinfo.Data.GetType().GetProperty("EconKind").GetValue(Qccinfo.Data); |
| | | // object Industry = Qccinfo.Data.GetType().GetProperty("Industry").GetValue(Qccinfo.Data); |
| | | // if (Area != null) |
| | | // { |
| | | // var Province = Area.GetType().GetProperty("Province").GetValue(Area); |
| | | // var City = Area.GetType().GetProperty("City").GetValue(Area); |
| | | // var County = Area.GetType().GetProperty("County").GetValue(Area); |
| | | // if (County != null) |
| | | // { |
| | | // var evaRegion = evaRegoinMapBLL.GetEvaRegoinMap(Province != null ? Province.ToString() : "", City != null ? City.ToString() : "", County.ToString()); |
| | | // if (evaRegion!=null) |
| | | // { |
| | | // evaSubjectEx.Country = evaRegion.CountryValue; |
| | | // evaSubjectEx.Province = evaRegion.ProvinceValue; |
| | | // evaSubjectEx.City = evaRegion.CityValue; |
| | | // evaSubjectEx.RegionInfo = "ä¸å½/" + evaRegion.SysProvince + "/" + evaRegion.SysCity; |
| | | // } |
| | | // else |
| | | // { |
| | | // LogHelper.Warn("å½å䏻使²¡æè·åå°ä¿¡æ¯ SubName:" + SubName); |
| | | // } |
| | | |
| | | // } |
| | | // else |
| | | // { |
| | | // var evaRegion = evaRegoinMapBLL.GetEvaRegoinMap(Province!=null?Province.ToString():"", City!=null? City.ToString():""); |
| | | // if (evaRegion!=null) |
| | | // { |
| | | // evaSubjectEx.Country = evaRegion.CountryValue; |
| | | // evaSubjectEx.Province = evaRegion.ProvinceValue; |
| | | // evaSubjectEx.City = evaRegion.CityValue; |
| | | // evaSubjectEx.RegionInfo = "ä¸å½/" + evaRegion.SysProvince + "/" + evaRegion.SysCity; |
| | | // } |
| | | // else |
| | | // { |
| | | // LogHelper.Warn("å½å䏻使²¡æè·åå°ä¿¡æ¯ SubName:" + SubName); |
| | | // } |
| | | |
| | | // } |
| | | |
| | | // } |
| | | // else |
| | | // { |
| | | // evaSubjectEx.Country = 1000; |
| | | // evaSubjectEx.Province = 0; |
| | | // evaSubjectEx.City = 0; |
| | | // evaSubjectEx.RegionInfo = "ä¸éå½å®¶"; |
| | | |
| | | // } |
| | | // if (Industry != null) |
| | | // { |
| | | // var SmallCategoryCode = Industry.GetType().GetProperty("SmallCategoryCode").GetValue(Industry); |
| | | // if (SmallCategoryCode != null) |
| | | // { |
| | | // var industry = industryBLL.GetIndustrybyClassThirds(int.Parse(SmallCategoryCode.ToString())); |
| | | // if (industry != null) |
| | | // { |
| | | // evaSubjectEx.ClassLabel = industry.ClassLabel; |
| | | // evaSubjectEx.ClassFirst = industry.ClassFirst; |
| | | // evaSubjectEx.ClassSecond = industry.ClassSecond; |
| | | // evaSubjectEx.ClassThird = industry.ClassThird; |
| | | // evaSubjectEx.ClassIndustry = industry.NameLabel + "/" + industry.NameFirst + "/" + industry.NameSecond + "/" + industry.NameThird; |
| | | // } |
| | | // else |
| | | // { |
| | | // evaSubjectEx.ClassLabel = "X"; |
| | | // evaSubjectEx.ClassFirst = 100; |
| | | // evaSubjectEx.ClassSecond = 1000; |
| | | // evaSubjectEx.ClassThird = 10000; |
| | | // evaSubjectEx.ClassIndustry = "ä¸éè¡ä¸"; |
| | | // } |
| | | |
| | | // } |
| | | // else |
| | | // { |
| | | // evaSubjectEx.ClassLabel = "X"; |
| | | // evaSubjectEx.ClassFirst = 100; |
| | | // evaSubjectEx.ClassSecond = 1000; |
| | | // evaSubjectEx.ClassThird = 10000; |
| | | // evaSubjectEx.ClassIndustry = "ä¸éè¡ä¸"; |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // evaSubjectEx.ClassLabel = "X"; |
| | | // evaSubjectEx.ClassFirst = 100; |
| | | // evaSubjectEx.ClassSecond = 1000; |
| | | // evaSubjectEx.ClassThird = 10000; |
| | | // evaSubjectEx.ClassIndustry = "ä¸éè¡ä¸"; |
| | | // } |
| | | //} |
| | | //else |
| | | //{ |
| | | // evaSubjectEx.Country = 1000; |
| | | // evaSubjectEx.Province = 0; |
| | | // evaSubjectEx.City = 0; |
| | | // evaSubjectEx.RegionInfo = "ä¸éå½å®¶"; |
| | | // evaSubjectEx.ClassLabel = "X"; |
| | | // evaSubjectEx.ClassFirst = 100; |
| | | // evaSubjectEx.ClassSecond = 1000; |
| | | // evaSubjectEx.ClassThird = 10000; |
| | | // evaSubjectEx.ClassIndustry = "ä¸éè¡ä¸"; |
| | | // //evaSubjectEx.PropertyId = 14; |
| | | //} |
| | | } |
| | | } |
| | | PropertyInfoExBLL propertyInfoExBll=new PropertyInfoExBLL(); |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using CommonHelper; |
| | | using System.Text.RegularExpressions; |
| | | |
| | | |
| | | namespace GasolineBlend.BLL |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="UserId"></param> |
| | | /// <returns></returns> |
| | | public List<FRMReportInfo> GetFRMReportlist(string UserId) |
| | | public FRMReportInfoDataPage GetFRMReportlist(int PageIndex, int PageSize,string UserId) |
| | | { |
| | | return _acc.GetFRMReportlist(UserId).OrderByDescending(p=>p.CreateTime).ToList(); |
| | | FRMReportInfoDataPage dataPage = new FRMReportInfoDataPage(); |
| | | |
| | | GetPagingFRDAL getPagingFRDAL = new GetPagingFRDAL(); |
| | | int TotalCount = 0; |
| | | string strWhere = " IsDelete=0"; |
| | | if (UserId!="") |
| | | { |
| | | strWhere += $" and UserId='{UserId}'"; |
| | | } |
| | | var list = getPagingFRDAL.GetUserAccess<FRMReportInfo>("*", "FRMReportInfo", PageIndex, PageSize, strWhere, |
| | | "CreateTime", ref TotalCount); |
| | | //è·åæ»æ¡æ° |
| | | var totalcount = TotalCount; |
| | | //è·åæ»é¡µæ° |
| | | var totalpages = Math.Ceiling(totalcount * 1.0 / PageSize); |
| | | //æ»æ¡æ° æ»é¡µæ° |
| | | dataPage.TotalItems = totalcount; |
| | | dataPage.TotalPages = Convert.ToInt32(totalpages); |
| | | dataPage.CurrentPage = PageIndex; |
| | | dataPage.PageSize = PageSize; |
| | | dataPage.ListFrmReportInfos = list; |
| | | return dataPage; |
| | | } |
| | | /// <summary> |
| | | /// å 餿¥è¡¨ |
| | |
| | | { |
| | | return _acc.AddFRMReport(fRMReportInfo); |
| | | } |
| | | |
| | | public string OpenId(string code) |
| | | { |
| | | string js_code = code; |
| | |
| | | public class FinBalanceSheetExBLL |
| | | { |
| | | private FinBalanceSheetExDAL _acc = new FinBalanceSheetExDAL(); |
| | | public List<FinBalanceSheetEx> GetBalanceSheetList(int SubjectId, int ProjId) |
| | | public FinBalanceSheetExDataPage GetBalanceSheetList(int SubjectId, int ProjId,int PageIndex,int PageSize) |
| | | { |
| | | return _acc.GetBalanceSheetList(SubjectId, ProjId); |
| | | FinBalanceSheetExDataPage dataPage = new FinBalanceSheetExDataPage(); |
| | | |
| | | GetPagingDBDAL getPagingDBDAL = new GetPagingDBDAL(); |
| | | int TotalCount = 0; |
| | | string strWhere = $" a.ProjId = {ProjId} "; |
| | | if (SubjectId > 0) |
| | | { |
| | | strWhere += $" and SubjectId={SubjectId}"; |
| | | } |
| | | var list = getPagingDBDAL.GetUserAccess<FinBalanceSheetEx>("a.*,b.Title", "finBalanceSheetEx a left join mainSubjectEx b on a.SubjectId=b.id", PageIndex, PageSize, strWhere, |
| | | "CreateTime", ref TotalCount); |
| | | //è·åæ»æ¡æ° |
| | | var totalcount = TotalCount; |
| | | //è·åæ»é¡µæ° |
| | | var totalpages = Math.Ceiling(totalcount * 1.0 / PageSize); |
| | | //æ»æ¡æ° æ»é¡µæ° |
| | | dataPage.TotalItems = totalcount; |
| | | dataPage.TotalPages = Convert.ToInt32(totalpages); |
| | | dataPage.CurrentPage = PageIndex; |
| | | dataPage.PageSize = PageSize; |
| | | dataPage.ListFinBalanceSheetExs = list; |
| | | return dataPage; |
| | | } |
| | | public List<FinBalanceSheetEx> GetBalanceSheetSel(int ProjId) |
| | | { |
| | |
| | | return _acc.GetIndustrybyClassThird(ClassThird); |
| | | } |
| | | |
| | | public Industry GetIndustrybyNameSecond(string NameSecond) |
| | | { |
| | | return _acc.GetIndustrybyNameSecond(NameSecond); |
| | | } |
| | | |
| | | public Industry GetIndustrybyNameThird(string NameThird) |
| | | { |
| | | return _acc.GetIndustrybyNameThird(NameThird); |
| | | } |
| | | |
| | | |
| | | public void LoadIndustryList(string RangeFlag, List<Industry> industryLables) |
| | | { |
| | |
| | | /// <param name="PageSize"></param> |
| | | /// <param name="PageIndex"></param> |
| | | /// <returns></returns> |
| | | public async Task<MkProductionEquipmentDataPage> GetPledgeRevList(int PageSize = 5, int PageIndex = 1, string Name = "", int SelState = 0, int TypeId = 0, string NameOfMortgagor = "", string NameOfMortgagee = "", string PriContractAmount = "", string sizeAll = "", string[] RegistrationTime = null, string[] DateOfRegistration = null, string RegCerNumber = "", bool SubLtdFlag = true) |
| | | public async Task<MkProductionEquipmentDataPage> GetPledgeRevList(int PageSize = 5, int PageIndex = 1, string Name = "", int SelState = 0, int TypeId = 0, string NameOfMortgagor = "", string NameOfMortgagee = "", string PriContractAmount = "", string RegistrationType = "", string[] RegistrationTime = null, string[] DateOfRegistration = null, string RegCerNumber = "", bool SubLtdFlag = true) |
| | | { |
| | | // è¡¥å
æ¾ç¨åå¢å¼ºæç´¢çç¨æ·ä½éª20210722FX |
| | | string OriginalNames = ""; |
| | |
| | | //} |
| | | Flag = true; |
| | | } |
| | | if (sizeAll != "" && sizeAll != "å
¨é¨") |
| | | if (RegistrationType != "" && RegistrationType != "å
¨é¨") |
| | | { |
| | | //æ ¹æ®å¤é模ç³å¹é
20230317FX |
| | | string []sArray = Regex.Split(sizeAll, "or", RegexOptions.IgnoreCase); |
| | | string []sArray = Regex.Split(RegistrationType, "or", RegexOptions.IgnoreCase); |
| | | StrWhere += " and ("; |
| | | for (int i = 0; i < sArray.Length; i++) |
| | | { |
| | |
| | | Flag = true; |
| | | } |
| | | #endregion |
| | | //StrWhere += " and RegistrationType not like'注éç»è®°'"; |
| | | |
| | | if (Flag == false && PageIndex <= 4) |
| | | { |
| | | newlist = getPagingZdDAL.GetUserAccess<MkProductionEquipment>("*, OwnershipRightOfUse as TimeLimitForDebtPer", "PledgeRevTemp", PageIndex, PageSize, StrWhere, "RegistrationTime", ref TotalCount); |
| | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region è¯å¾ |
| | | public static string GetReportJson2(string FileName) |
| | | { |
| | |
| | | public static async Task<DataTable> AliOcrTable(string base64Str) |
| | | { |
| | | var sysUrl = "https://analysis.market.alicloudapi.com/ocrservice/table"; |
| | | var sysAppcode = "b77bcd5d997f47ecaee28e359fbcd605"; |
| | | var sysAppcode = Configs.GetValue("AliOCRKey"); //"b77bcd5d997f47ecaee28e359fbcd605"; |
| | | var body = new {img = base64Str, rotate = false}; |
| | | |
| | | var res = await sysUrl |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å 䏿¡å¸¸ç¨å·¥å
·ä¿¡æ¯ |
| | | /// æ·»å 䏿¡å¸¸ç¨åè½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sysAccountMenu"></param> |
| | | /// <returns></returns> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤ä¸æ¡å¸¸ç¨å·¥å
·ä¿¡æ¯ |
| | | /// å é¤ä¸æ¡å¸¸ç¨åè½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | |
| | | { |
| | | return _acc.DeleteSysAccountMenubyId(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®UserIdè·åç»è®¡æ°æ® |
| | | /// </summary> |
| | | /// <param name="UserId"></param> |
| | | /// <returns></returns> |
| | | public int GetSysAccountMenuCount(int UserId) |
| | | { |
| | | return _acc.GetSysAccountMenuCount(UserId); |
| | | } |
| | | } |
| | | } |
| | |
| | | private SysAccountNewsDAL _acc = new SysAccountNewsDAL(); |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®UserIdåTypeIdè·åèªå®ä¹ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="id">ç¨æ·id</param> |
| | | /// <returns></returns> |
| | | public SysAccountNews GetSysAccountNewsbyUserId(int UserId, int TypeId) |
| | | { |
| | | return _acc.GetSysAccountNewsbyUserId(UserId, TypeId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å 䏿¡èªå®ä¹é
ç½® |
| | | /// </summary> |
| | | /// <param name="sysAccountNews"></param> |
| | |
| | | { |
| | | return _acc.AddSysAccountNews(sysAccountNews); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åå¨å·²æ·»å é¡¹ç® |
| | | /// </summary> |
| | | /// <param name="sysAccountMenu"></param> |
| | | /// <param name="ModifyFlag"></param> |
| | | /// <returns></returns> |
| | | public bool ExistSysAccountNews(SysAccountNews sysAccountNews, bool ModifyFlag) |
| | | { |
| | | return _acc.ExistSysAccountNews(sysAccountNews, ModifyFlag); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°ä¸æ¡èªå®ä¹é
ç½® |
| | | /// </summary> |
| | | /// <param name="Keyword"></param> |
| | | /// <param name="UserId"></param> |
| | | /// <param name="TypeId">1.7*24å°æ¶æ°é»ï¼2.å
¨å±æ°é»</param> |
| | | /// <returns></returns> |
| | | public bool UpdateSysAccountNews(string Keyword, int UserId, int TypeId) |
| | | { |
| | | return _acc.UpdateSysAccountNews(Keyword, UserId, TypeId); |
| | | } |
| | | } |
| | | } |
| | |
| | | private GetPagingDAL GetPagingDAL = new GetPagingDAL(); |
| | | |
| | | |
| | | public DataPage GetNewsList(int SubClassId, string ParContent,int PageSize,int PageIndex) |
| | | public DataPage GetNewsList(int SubClassId, string ParContent,int PageSize,int PageIndex,int UserId) |
| | | { |
| | | var Channels1 = ""; |
| | | int Channels2 = 0; |
| | |
| | | { |
| | | Channels1 = "å
¶ä»"; |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | int TotalCount = 0; |
| | | var StrWhere=" 1=1 "; |
| | |
| | | |
| | | StrWhere += ")"; |
| | | } |
| | | |
| | | |
| | | if (UserId > 0) |
| | | { |
| | | SysAccountNewsBLL _accountNewsBll = new SysAccountNewsBLL(); |
| | | var InfoKeyword = _accountNewsBll.GetSysAccountNewsbyUserId(UserId, 1); |
| | | if (InfoKeyword != null && InfoKeyword.Keyword != null && InfoKeyword.Keyword.Length > 0) |
| | | { |
| | | StrWhere += $" and ("; |
| | | string[] InfoKeywordArray = InfoKeyword.Keyword.Split(new char[] { ',', 'ï¼' }); |
| | | |
| | | for (int i = 0; i < InfoKeywordArray.Length; i++) |
| | | { |
| | | StrWhere += (i==0?"":" or ")+ $" contains(Contents ,'*{InfoKeywordArray[i]}*') "; |
| | | } |
| | | StrWhere += ")"; |
| | | } |
| | | } |
| | | |
| | | if (SubClassId!=0) |
| | | { |
| | | StrWhere += $" and ( SubClassId={SubClassId} "; |
| | |
| | | |
| | | } |
| | | |
| | | public DataPageMajor GetMajorNewsList(string ParContent, int PageSize, int PageIndex) |
| | | public DataPageMajor GetMajorNewsList(string ParContent, int PageSize, int PageIndex,int UserId) |
| | | { |
| | | int TotalCount = 0; |
| | | var StrWhere = " 1=1 "; |
| | | if (ParContent != "") |
| | | { |
| | | ParContent = ParContent.Replace("(", "").Replace(")", ""); |
| | | StrWhere += $" and (Contents like '%{ParContent}%' or Title like '%{ParContent}%' "; |
| | | StrWhere += $" and (contains(Contents ,'*{ParContent}*') "; //or Title like '%{ParContent}%' |
| | | if (ParContent.Length <= 4) //夿æ¯å¦æ¯ä¸å¸å
¬å¸å¹¶å¹é
20230318 |
| | | { |
| | | ChinaStockBLL chinaStockBll = new ChinaStockBLL(); |
| | |
| | | if (chinaStockFirst != null) |
| | | { |
| | | string FullName = chinaStockFirst.fullname; |
| | | StrWhere += $" or Contents like '%{FullName}%' or Title like '%{FullName}%' "; |
| | | StrWhere += $" or contains(Contents ,'*{FullName}*') "; //or Title like '%{FullName}%' |
| | | } |
| | | } |
| | | } |
| | | |
| | | StrWhere += ") "; |
| | | } |
| | | |
| | | if (UserId > 0) |
| | | { |
| | | SysAccountNewsBLL _accountNewsBll = new SysAccountNewsBLL(); |
| | | var InfoKeyword = _accountNewsBll.GetSysAccountNewsbyUserId(UserId, 2); |
| | | if (InfoKeyword != null && InfoKeyword.Keyword != null && InfoKeyword.Keyword.Length > 0) |
| | | { |
| | | StrWhere += $" and ("; |
| | | string[] InfoKeywordArray = InfoKeyword.Keyword.Split(new char[] { ',', 'ï¼' }); |
| | | for (int i = 0; i < InfoKeywordArray.Length; i++) |
| | | { |
| | | StrWhere += (i == 0 ? "" : " or ") + $" contains(Contents ,'*{InfoKeywordArray[i]}*') "; |
| | | } |
| | | StrWhere += ")"; |
| | | } |
| | | |
| | | } |
| | | |
| | | var slist = GetPagingDAL.GetUserAccess<TushareMajorNews>("id,Contents,Title,PubTime", "TushareMajorNews", PageIndex, PageSize, StrWhere, "PubTime", ref TotalCount); |
| | |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | public List<NewsSubClass> GetSubClassList() |
| | | { |
| | | return _acc.GetSubClassList(); |
| | | } |
| | | |
| | | //public TushareMajorNews GetMajorNewsbyId(int id) |
| | | //{ |
| | | // return _acc.GetMajorNewsbyId(id); |
| | | |
| | | //} |
| | | |
| | | public bool UpdTushareMajorNew(string Contents, int Id) |
| | | { |
| | | return _acc.UpdTushareMajorNew(Contents, Id); |
| | |
| | | /// <param name="City"></param> |
| | | /// <param name="County"></param> |
| | | /// <returns></returns> |
| | | public EvaRegoinMap GetEvaRegoinMap(string Province,string City,string County="") |
| | | public EvaRegoinMap GetEvaRegoinMap(string County="") |
| | | { |
| | | StringBuilder sql = new StringBuilder($"select a.*,b.CountryValue,b.ProvinceValue,b.CityValue from sysRegoinMap a left join sysRegionInfo b on a.SysProvince=b.ProvinceName and a.SysCity=b.CityName where (a.Province='{Province}' or a.City='{City}')"); |
| | | StringBuilder sql = new StringBuilder($"select a.*,b.CountryValue,b.ProvinceValue,b.CityValue from sysRegoinMap a left join sysRegionInfo b on a.SysProvince=b.ProvinceName and a.SysCity=b.CityName "); //(a.Province='{Province}' or a.City='{City}') |
| | | if (County!="") |
| | | { |
| | | sql.Append($" and a.County='{County}'"); |
| | | sql.Append($" where a.County='{County}'"); |
| | | } |
| | | return Conn.QueryFirstOrDefault<EvaRegoinMap>(sql.ToString()); |
| | | } |
| | |
| | | |
| | | namespace GasolineBlend.DAL |
| | | { |
| | | public class GetPagingDAL:BaseNewsDAL |
| | | public class GetPagingDAL:BaseNewsDAL |
| | | { |
| | | #region å页è·åæ°æ® |
| | | /// <summary> |
| | |
| | | } |
| | | #endregion |
| | | } |
| | | |
| | | public class GetPagingFRDAL : BaseFRDAL |
| | | { |
| | | #region å页è·åæ°æ® |
| | | /// <summary> |
| | | /// å页 |
| | | /// </summary> |
| | | /// <typeparam name="T"></typeparam> |
| | | /// <param name="selectStr">æ¥è¯¢çåæ°</param> |
| | | /// <param name="tableName">æ¥è¯¢ç表å</param> |
| | | /// <param name="pageIndex">å½å页</param> |
| | | /// <param name="pageSize">页é¢é¿åº¦</param> |
| | | /// <param name="strWhere">æ¥è¯¢æ¡ä»¶</param> |
| | | /// <param name="orderName">æåºæ¡ä»¶</param> |
| | | /// <param name="RecordCount">è¿åæ¡æ°</param> |
| | | /// <returns></returns> |
| | | public List<T> GetUserAccess<T>(string selectStr, string tableName, int pageIndex, int pageSize, string strWhere, string orderName, ref int TotalCount) |
| | | { |
| | | var p = new DynamicParameters(); |
| | | p.Add("@TableFields", selectStr); |
| | | p.Add("@TableName", tableName); |
| | | p.Add("@SqlWhere", strWhere); |
| | | p.Add("@OrderBy", orderName); |
| | | p.Add("@PageIndex", pageIndex); |
| | | p.Add("@PageSize", pageSize); |
| | | p.Add("@TotalCount", dbType: DbType.Int32, direction: ParameterDirection.Output); |
| | | List<T> ret = new List<T>(); |
| | | ret = Conn.Query<T>("Proc_Paging", p, commandType: CommandType.StoredProcedure, buffered: true, commandTimeout: 0).ToList(); |
| | | //ret = GetCJFDData(ret); |
| | | TotalCount = p.Get<int>("TotalCount"); |
| | | |
| | | return ret; |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | paras.Add("ClassThird", ClassThird); |
| | | return Conn.QueryFirstOrDefault<Industry>(sql.ToString(), paras); |
| | | } |
| | | |
| | | |
| | | public Industry GetIndustrybyNameSecond(string NameSecond) |
| | | { |
| | | var sql = new StringBuilder("select * from sysIndustry2 "); |
| | | DynamicParameters paras = new DynamicParameters(); |
| | | sql = sql.Append(" where NameSecond=@NameSecond"); |
| | | paras.Add("NameSecond", NameSecond); |
| | | return Conn.QueryFirstOrDefault<Industry>(sql.ToString(), paras); |
| | | } |
| | | |
| | | public Industry GetIndustrybyNameThird(string NameThird) |
| | | { |
| | | var sql = new StringBuilder("select * from sysIndustry2 "); |
| | | DynamicParameters paras = new DynamicParameters(); |
| | | sql = sql.Append(" where NameThird=@NameThird"); |
| | | paras.Add("NameThird", NameThird); |
| | | return Conn.QueryFirstOrDefault<Industry>(sql.ToString(), paras); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <param name="NameOfSeller"></param> |
| | | /// <param name="Id"></param> |
| | | /// <returns></returns> |
| | | public bool UpdPledgeRev(string NameOfMortgagee, string NameOfMortgagor, int Id, int TypeId) |
| | | public bool UpdPledgeRev(string NameOfMortgagor,string NameOfMortgagee, int Id, int TypeId) |
| | | { |
| | | var sql = $"update PledgeRev set NameOfMortgagee='{NameOfMortgagee}',NameOfMortgagor='{NameOfMortgagor}' where Id={Id} and TypeId={TypeId}"; |
| | | return Conn.Execute(sql,commandTimeout:0) > 0; |
| | |
| | | |
| | | public List<RRMonitorGroup> GetRRMonitorGroupListTop2(int UserId) |
| | | { |
| | | var sql = $"select top 3.* from RRMonitorGroup where CreateUserId={UserId} order by CreateTime desc"; |
| | | var sql = $"select top 2.* from RRMonitorGroup where CreateUserId={UserId} order by CreateTime desc"; |
| | | return Conn.Query<RRMonitorGroup>(sql).ToList(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å 䏿¡å¸¸ç¨å·¥å
·ä¿¡æ¯ |
| | | /// æ·»å 䏿¡å¸¸ç¨åè½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sysAccountMenu"></param> |
| | | /// <returns></returns> |
| | | public int AddSysAccountMenu(SysAccountMenu sysAccountMenu) |
| | | { |
| | | //var sql = $"insert into assessFile (FileName,FileType,FileRemark,CapitalId,FilePath,DebtId,GageId,WaterfallInnerId,DebtOutId,ProjPartId,SubjectId,UserId) Values(@FileName,@FileType,@FileRemark,@CapitalId,@FilePath,@DebtId,@GageId,@WaterfallInnerId,@DebtOutId,@ProjPartId,@SubjectId,@UserId);select @@IDENTITY;"; |
| | | string sql = "INSERT INTO sysAccountMenu (UserId,ToolName) VALUES (@UserId,@ToolName);select @@IDENTITY;"; |
| | | return Conn.ExecuteScalar<int>(sql, sysAccountMenu); |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤ä¸æ¡å¸¸ç¨å·¥å
·ä¿¡æ¯ |
| | | /// å é¤ä¸æ¡å¸¸ç¨åè½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <param name="UserId"></param> |
| | |
| | | var sql = $"delete from sysAccountMenu where id={id}"; |
| | | return Conn.Execute(sql) > 0; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®UserIdè·åç»è®¡æ°æ® |
| | | /// </summary> |
| | | /// <param name="UserId"></param> |
| | | /// <returns></returns> |
| | | public int GetSysAccountMenuCount(int UserId) |
| | | { |
| | | var sql = $"select COUNT(*) from sysAccountMenu where UserId={UserId}"; |
| | | return Conn.ExecuteScalar<int>(sql); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | public class SysAccountNewsDAL:BaseDAL |
| | | { |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®UserIdåTypeIdè·åèªå®ä¹ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="id">ç¨æ·id</param> |
| | | /// <returns></returns> |
| | | public SysAccountNews GetSysAccountNewsbyUserId(int UserId,int TypeId) |
| | | { |
| | | var sql = new StringBuilder("select * from sysAccountNews"); |
| | | DynamicParameters paras = new DynamicParameters(); |
| | | if (UserId != 0) |
| | | { |
| | | sql = sql.Append(" where UserId=@UserId and TypeId=@TypeId"); |
| | | paras.Add("UserId", UserId); |
| | | paras.Add("TypeId", TypeId); |
| | | return Conn.QueryFirstOrDefault<SysAccountNews>(sql.ToString(), paras); |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å 䏿¡èªå®ä¹é
ç½® |
| | | /// </summary> |
| | |
| | | /// <returns></returns> |
| | | public int AddSysAccountNews(SysAccountNews sysAccountNews) |
| | | { |
| | | string sql = "INSERT INTO sysAccountNews VALUES(@UserId,@Keyword,@TypeId,DEFAULT)"; |
| | | string sql = "INSERT INTO sysAccountNews (UserId,Keyword,TypeId) VALUES(@UserId,@Keyword,@TypeId);select @@IDENTITY;"; |
| | | return Conn.ExecuteScalar<int>(sql, sysAccountNews); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åå¨å·²æ·»å é¡¹ç® |
| | | /// </summary> |
| | | /// <param name="sysAccountMenu"></param> |
| | | /// <param name="ModifyFlag"></param> |
| | | /// <returns></returns> |
| | | public bool ExistSysAccountNews(SysAccountNews sysAccountNews, bool ModifyFlag) |
| | | { |
| | | string strCompareSQL = (ModifyFlag == false ? "" : " and id<>@id"); |
| | | var sql = $"select * from sysAccountNews where UserId=@UserId and TypeId=@TypeId" + strCompareSQL; |
| | | return Conn.ExecuteScalar<int>(sql, sysAccountNews) > 0; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°ä¸æ¡èªå®ä¹é
ç½® |
| | | /// </summary> |
| | | /// <param name="Keyword"></param> |
| | | /// <param name="UserId"></param> |
| | | /// <param name="TypeId">1.7*24å°æ¶æ°é»ï¼2.å
¨å±æ°é»</param> |
| | | /// <returns></returns> |
| | | public bool UpdateSysAccountNews(string Keyword, int UserId,int TypeId) |
| | | { |
| | | var sql = $"update sysAccountNews set Keyword='{Keyword}' where UserId={UserId} and TypeId={TypeId};"; |
| | | return Conn.Execute(sql) > 0; |
| | | } |
| | | } |
| | | } |
| | |
| | | return Conn.Execute(sql, paras) > 0; |
| | | } |
| | | |
| | | //public TushareMajorNews GetMajorNewsbyId(int id) |
| | | //{ |
| | | // try |
| | | // { |
| | | // var sql = new StringBuilder("select * from TushareMajorNews "); |
| | | // DynamicParameters paras = new DynamicParameters(); |
| | | // sql = sql.Append(" where id=@id"); |
| | | // paras.Add("id", id); |
| | | // return Conn.QueryFirstOrDefault<TushareMajorNews>(sql.ToString(), paras); |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // return null; |
| | | // } |
| | | |
| | | //} |
| | | |
| | | public bool UpdTushareMajorNew(string Contents, int Id) |
| | | { |
| | | var sql = $"update TushareMajorNews set Contents=@Contents where Id=@Id"; |
| | |
| | | public string AlarmWXGrade { get; set; } |
| | | } |
| | | |
| | | public class AccountMoney |
| | | { |
| | | public double AccountLeft { get; set; } |
| | | |
| | | public int AccountPayNo { get; set; } |
| | | |
| | | public int AccountUseNo { get; set; } |
| | | |
| | | } |
| | | |
| | | public enum UserRoleType { SuperAdmin, CommonAdmin , User }; |
| | | |
| | | public enum DefaultModeType |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace GasolineBlend.Entity |
| | | { |
| | | public class FRMReportInfoDataPage |
| | | { |
| | | /// <summary> |
| | | /// æ»è®°å½æ° |
| | | /// </summary> |
| | | public int TotalItems { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ»é¡µæ° |
| | | /// </summary> |
| | | public int TotalPages { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å½åé¡µæ° |
| | | /// </summary> |
| | | public int CurrentPage { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯é¡µæ¡æ° |
| | | /// </summary> |
| | | public int PageSize { get; set; } |
| | | |
| | | public List<FRMReportInfo> ListFrmReportInfos { get; set; } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace GasolineBlend.Entity |
| | | { |
| | | public class FinBalanceSheetExDataPage |
| | | { |
| | | /// <summary> |
| | | /// æ»è®°å½æ° |
| | | /// </summary> |
| | | public int TotalItems { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ»é¡µæ° |
| | | /// </summary> |
| | | public int TotalPages { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å½åé¡µæ° |
| | | /// </summary> |
| | | public int CurrentPage { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯é¡µæ¡æ° |
| | | /// </summary> |
| | | public int PageSize { get; set; } |
| | | |
| | | public List<FinBalanceSheetEx> ListFinBalanceSheetExs { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | <Compile Include="CustomGoods.cs" /> |
| | | <Compile Include="DisclosureDate.cs" /> |
| | | <Compile Include="EvaReportExDataPage.cs" /> |
| | | <Compile Include="FRMReportInfoDataPage.cs" /> |
| | | <Compile Include="FinBalanceSheetExDataPage.cs" /> |
| | | <Compile Include="IndustryChainInfo.cs" /> |
| | | <Compile Include="IndustryStockListPara.cs" /> |
| | | <Compile Include="KnowledgeGraph.cs" /> |
| | |
| | | using System; |
| | |  using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | |
| | | using GasolineBlend.BLL; |
| | | using GasolineBlend.Entity; |
| | | using System; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Web.Mvc; |
| | | using GasolineBlend.Filter; |
| | | |
| | |
| | | { |
| | | public class ComMonitorController:BaseController |
| | | { |
| | | private readonly string _virtualPathGroup = "../UploadFiles/RRMonitorGroup/"; |
| | | private ComMonitorBLL _acc = new ComMonitorBLL(); |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ°å¢ä¸ä¸ªå
¬å¸ |
| | | /// æ°å¢ä¸ä¸ªçæ§å
¬å¸ |
| | | /// </summary> |
| | | /// <param name="ReportName"></param> |
| | | /// <param name="ProjectId"></param> |
| | |
| | | { |
| | | try |
| | | { |
| | | //int m = OperatorProvider.Instance.Current.UserId; |
| | | ComMonitor comMonitor = new ComMonitor() |
| | | { |
| | | CompanyId = 0,//åä½å段 |
| | | CompanyName = CompanyName, |
| | | MonitorGroupId = MonitorGroupId, |
| | | UserId = UserId |
| | | }; |
| | | AccountBLL _accountBll = new AccountBLL(); |
| | | SysBusinessPlanBLL _sysBusinessPlanBll = new SysBusinessPlanBLL(); |
| | | var userGrade = _accountBll.GetUserGradeById(UserId); |
| | |
| | | { |
| | | return Error($"æä½å¤±è´¥ï¼æ¨å½å使ç¨{UserGradeType.VIP.GetDisplayName()}ï¼æå¤å¯ä»¥æ·»å {vipDescNo}å®¶çæ§ä¼ä¸ï¼å¦éè·åæ´å¤é¢åº¦è¯·å¨è¯¢å¨çº¿å®¢æï¼", true, ShowDetail.ModalWarning.GetDisplayName()); |
| | | } |
| | | |
| | | else |
| | | { |
| | | ComMonitor comMonitor = new ComMonitor() |
| | | { |
| | | CompanyId = 0,//åä½å段 |
| | | CompanyName = CompanyName, |
| | | MonitorGroupId = MonitorGroupId, |
| | | UserId = UserId |
| | | }; |
| | | if (_acc.ExistComMonitor(comMonitor, false) == false) |
| | | { |
| | | comMonitor.CompanyState = 1; |
| | |
| | | catch (Exception e) |
| | | { |
| | | |
| | | LogHelper.Write(Level.Error, "æ°å¢ä¸ä¸ªå
¬å¸ AddComMonitor", e, OperatorProvider.Instance.Current==null?"GuestEx":OperatorProvider.Instance.Current.LoginName); |
| | | LogHelper.Write(Level.Error, "æ°å¢ä¸ä¸ªçæ§å
¬å¸ AddComMonitor", e, OperatorProvider.Instance.Current==null?"GuestEx":OperatorProvider.Instance.Current.LoginName); |
| | | return Error(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹é导å
¥çæ§å
¬å¸ |
| | | /// </summary> |
| | | /// <param name="UserId"></param> |
| | | /// <param name="MonitorGroupId"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ActionResult AddComMonitorPatch(int UserId, int MonitorGroupId=0) |
| | | { |
| | | try |
| | | { |
| | | AssessFileBLL assessFileBll = new AssessFileBLL(); |
| | | //æ£æ¥ç¶ææ¯å¦æ£å¸¸ |
| | | if (!ModelState.IsValid) |
| | | return Error(ModelState.Values); |
| | | |
| | | Stream stream = Request.InputStream; |
| | | StreamReader streamReader = new StreamReader(stream); |
| | | var json = streamReader.ReadToEnd(); |
| | | if (string.IsNullOrWhiteSpace(json)) |
| | | return Error("ä¸ä¼ 请æ±åæ°ä¸ºç©ºï¼"); |
| | | if (HttpContext.Request.Files.Count != 1) |
| | | return Error("ç³»ç»åªå
许ä¸ä¼ ä¸ä¸ªæä»¶ï¼è¯·éæ°ä¸ä¼ ï¼"); |
| | | |
| | | for (int i = 0; i < HttpContext.Request.Files.Count; i++) |
| | | { |
| | | var uploadFile = HttpContext.Request.Files[i]; //ä¸ä¼ æä»¶ |
| | | if (uploadFile == null) |
| | | return Error("å½åä¸ä¼ çæä»¶ä¸ºç©ºæä»¶ï¼è¯·éæ°ä¸ä¼ ï¼"); |
| | | |
| | | FileInfo file = new FileInfo(uploadFile.FileName); |
| | | string fileName = uploadFile.FileName.Replace(file.Extension, ""); |
| | | if (uploadFile.InputStream.Length == 0) |
| | | return Error(fileName + "çæä»¶å
容为空ï¼è¯·éæ°ä¸ä¼ ï¼"); |
| | | |
| | | if (assessFileBll.GetFileType(file.Extension) != "Excel") |
| | | return Error(fileName + "çæä»¶ç±»åç³»ç»ä¸æ¯æï¼è¯·éæ°ä¸ä¼ ï¼"); |
| | | |
| | | if (uploadFile.InputStream.Length > 104857600) //1024*1024*100=100M |
| | | return Error(fileName + "çæä»¶å¤§å°å·²ç»è¶
è¿100Mï¼è¯·éæ°ä¸ä¼ ï¼"); |
| | | } |
| | | |
| | | int iSuccessNo = 0; |
| | | int iEmptyNo = 0; |
| | | for (int i = 0; i < HttpContext.Request.Files.Count; i++) |
| | | { |
| | | //è·å导å
¥æä»¶æ¸
å |
| | | var createTime = DateTime.Now.ToString("yyyyMMddHHmm"); |
| | | var uploadFile = HttpContext.Request.Files[i]; //ä¸ä¼ æä»¶ |
| | | var filename = |
| | | Server.MapPath(string.Format("{0}ã{1}ã{2}", _virtualPathGroup, createTime, uploadFile.FileName)); |
| | | Directory.CreateDirectory(Server.MapPath(_virtualPathGroup)); |
| | | uploadFile.SaveAs(filename); |
| | | DataTable dtNew = NPOIHelper.Import(filename); |
| | | if (dtNew != null && dtNew.Rows.Count >= 1) |
| | | { |
| | | //夿æ¯å¦ç¬¦åå¥é¤ |
| | | AccountBLL _accountBll = new AccountBLL(); |
| | | SysBusinessPlanBLL _sysBusinessPlanBll = new SysBusinessPlanBLL(); |
| | | var userGrade = _accountBll.GetUserGradeById(UserId); |
| | | var freeDescNo = _sysBusinessPlanBll.GetFreeDescbyName("èªéæå"); |
| | | var vipDescNo = _sysBusinessPlanBll.GetVipDescbyName("èªéæå"); |
| | | var comMonitorMemberNo = _acc.GetComMonitorMemberNo(MonitorGroupId); |
| | | var dtNewNo = dtNew.Rows.Count;//å¾
ä¼å |
| | | //æ®éç¨æ· |
| | | if (userGrade == UserGradeType.Free.GetDisplayName() && comMonitorMemberNo+ dtNewNo >= freeDescNo) |
| | | { |
| | | return Error($"æä½å¤±è´¥ï¼æ¨å½å使ç¨{UserGradeType.Free.GetDisplayName()}ï¼æå¤å¯ä»¥æ·»å {freeDescNo}å®¶çæ§ä¼ä¸ï¼å¦éè·åæ´å¤é¢åº¦è¯·å¨è¯¢å¨çº¿å®¢æï¼", true, ShowDetail.ModalWarning.GetDisplayName()); |
| | | } |
| | | //VIPç¨æ· |
| | | else if (userGrade == UserGradeType.VIP.GetDisplayName() && comMonitorMemberNo+ dtNewNo >= vipDescNo) |
| | | { |
| | | return Error($"æä½å¤±è´¥ï¼æ¨å½å使ç¨{UserGradeType.VIP.GetDisplayName()}ï¼æå¤å¯ä»¥æ·»å {vipDescNo}å®¶çæ§ä¼ä¸ï¼å¦éè·åæ´å¤é¢åº¦è¯·å¨è¯¢å¨çº¿å®¢æï¼", true, ShowDetail.ModalWarning.GetDisplayName()); |
| | | } |
| | | else |
| | | { |
| | | for (int j = 0; j < dtNew.Rows.Count; j++) |
| | | { |
| | | if (dtNew.Rows[j][0].ToString() != "") |
| | | { |
| | | //æ¹éæ·»å å
¬å¸ |
| | | ComMonitor comMonitor = new ComMonitor() |
| | | { |
| | | CompanyId = 0,//åä½å段 |
| | | CompanyName = dtNew.Rows[j][0].ToString(), |
| | | MonitorGroupId = MonitorGroupId, |
| | | UserId = UserId |
| | | }; |
| | | if (_acc.ExistComMonitor(comMonitor, false) == false) |
| | | { |
| | | comMonitor.CompanyState = 1; |
| | | _acc.AddComMonitor(comMonitor); |
| | | } |
| | | iSuccessNo++; |
| | | } |
| | | else |
| | | { |
| | | iEmptyNo++; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return Error(); |
| | | } |
| | | break;//第ä¸ä¸ªæä»¶å®æå°±è·³åº |
| | | } |
| | | return Success($"æ¹é导å
¥å·²å®æï¼æå导å
¥{iSuccessNo}å®¶å
¬å¸ï¼"); |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogHelper.Write(Level.Error, "æ¹é导å
¥çæ§å
¬å¸ AddComMonitorPatch", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | return Error(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£æ¥å½åå
¬å¸æ¯å¦åå¨ |
| | | /// </summary> |
| | | /// <param name="Name"></param> |
| | | /// <returns></returns> |
| | | public ActionResult CheckComMonitor(string Name) |
| | | { |
| | | try |
| | |
| | | using System.Threading.Tasks; |
| | | using System.Web; |
| | | using System.Web.Mvc; |
| | | using RiskControl.NewService.Entity.RiskControlRR; |
| | | using RiskControl.NewService.Service; |
| | | |
| | | namespace GasolineBlend.Controllers |
| | | { |
| | |
| | | { |
| | | string LingoModelPath = Server.MapPath(Configs.LingoM1Path); |
| | | _acc.GetCashRAROCListAsync(RId, account,LingoModelPath); |
| | | //æ¶è积ååå
¥ç³»ç»20230525FX |
| | | var UserId = OperatorProvider.Instance.Current.UserId; |
| | | UseOrderService _orderService = new UseOrderService(); |
| | | SysBusinessPlanBLL _sysBusinessPlanBll = new SysBusinessPlanBLL(); |
| | | var userGrade = accountBll.GetUserGradeById(UserId); |
| | | var freeDescNo = _sysBusinessPlanBll.GetFreeDescbyName("å
¬å¸è´¢æ¥æºé£æ§"); |
| | | var vipDescNo = _sysBusinessPlanBll.GetVipDescbyName("å
¬å¸è´¢æ¥æºé£æ§"); |
| | | UseOrder param = new UseOrder(); |
| | | param.CreateUserId = UserId; |
| | | param.OrderType = "å
¬å¸è´¢æ¥æºé£æ§"; |
| | | param.OrderNo = Guid.NewGuid().ToString("N"); |
| | | if (userGrade == UserGradeType.Free.GetDisplayName()) //æ®éç |
| | | { |
| | | param.OrderAmount = freeDescNo; |
| | | param.PayAmount = freeDescNo; |
| | | } |
| | | else |
| | | { |
| | | param.OrderAmount = vipDescNo; |
| | | param.PayAmount = vipDescNo; |
| | | } |
| | | _orderService.AddAsync(param,false); |
| | | return SuccessNoShow(data: "OK"); |
| | | } |
| | | else |
| | |
| | | using GasolineBlend.Entity; |
| | | using RiskControl.NewService.Entity.RRAutoBIDB; |
| | | using RiskControl.NewService.Service; |
| | | using RiskControl.NewService.ViewModel; |
| | | using SqlSugar; |
| | | |
| | | namespace GasolineBlend.Controllers |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åé£é©ãæ°é»ãå
¬åæ£æµçé¢è¦æ°(é¦é¡µèªé) |
| | | /// </summary> |
| | | /// <param name="startTime"></param> |
| | | /// <param name="endTime"></param> |
| | | /// <param name="groupId1"></param> |
| | | /// <param name="groupId2"></param> |
| | | /// <returns></returns> |
| | | public ActionResult GetRiskMonitorWarnCountResult2(DateTime? startTime, DateTime? endTime, int groupId1, int groupId2) |
| | | { |
| | | var res1 = _alarmService.GetRiskMonitorWarnCountResult(startTime, endTime, groupId1); |
| | | var res2 = _alarmService.GetRiskMonitorWarnCountResult(startTime, endTime, groupId2); |
| | | List<RiskMonitorWarnCountResult> listRiskMonitorWarnCountResults = new List<RiskMonitorWarnCountResult>(); |
| | | listRiskMonitorWarnCountResults.Add(res1); |
| | | listRiskMonitorWarnCountResults.Add(res2); |
| | | return SuccessNoShow(data: listRiskMonitorWarnCountResults); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®é£é©ãæ°é»ãå
¬åæ£æµè·åé¢è¦è¯¦æ
|
| | | /// </summary> |
| | | /// <param name="startTime">å¼å§æ¶é´</param> |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | | using System.Web; |
| | | using System.Web.Mvc; |
| | | using RiskControl.NewService.Entity.RiskControlRR; |
| | | using RiskControl.NewService.Service; |
| | | |
| | | namespace GasolineBlend.Controllers |
| | | { |
| | |
| | | private readonly string _excelPath = "../FRMReport/Excel/"; |
| | | private readonly string _savePath = "FRMReport/Excel/"; |
| | | private FRMReportInfoBLL _acc = new FRMReportInfoBLL(); |
| | | //private readonly string _virtualPathGroup = "../UploadFiles/RRMonitorGroup/"; |
| | | /// <summary> |
| | | ///è·åæ¥åå表 |
| | | /// </summary> |
| | | /// <param name="ProjId"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | //[LoginChecked(false)] |
| | | public ActionResult GetReportList(string UserId="") |
| | | public ActionResult GetReportList(int PageIndex=1,int PageSize=5,string UserId="") |
| | | { |
| | | try |
| | | { |
| | | var list = _acc.GetFRMReportlist(UserId); |
| | | var list = _acc.GetFRMReportlist(PageIndex,PageSize,UserId); |
| | | return SuccessNoShow(data: list); |
| | | } |
| | | catch (Exception e) |
| | |
| | | /// <param name="sid"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | //[LoginChecked(false)] |
| | | public ActionResult AddImg(string UserId) |
| | | public async Task<ActionResult> AddImg2(string UserId) |
| | | { |
| | | try |
| | | { |
| | | //åå§åFRMReportInfoç±» |
| | | FRMReportInfo fRMReportInfo = new FRMReportInfo(); |
| | | fRMReportInfo.UserId = UserId; |
| | | //æ£æ¥ç¶ææ¯å¦æ£å¸¸ |
| | | if (!ModelState.IsValid) |
| | | return Error(ModelState.Values); |
| | | |
| | | //Stream stream = Request.InputStream; |
| | | //StreamReader streamReader = new StreamReader(stream); |
| | | //var json = streamReader.ReadToEnd(); |
| | | //if (string.IsNullOrWhiteSpace(json)) |
| | | // return Error("ä¸ä¼ 请æ±åæ°ä¸ºç©ºï¼"); |
| | | if (HttpContext.Request.Files.Count == 0) |
| | | return Error("ä¸ä¼ è¯·æ±æä»¶ä¸º0ï¼"); |
| | | FRMReportInfo fRMReportInfo = new FRMReportInfo(); |
| | | fRMReportInfo.UserId = UserId; |
| | | if (HttpContext.Request.Files.Count > 0) |
| | | { |
| | | for (int i = 0; i < HttpContext.Request.Files.Count; i++) |
| | |
| | | } |
| | | else |
| | | { |
| | | return Error("å¾çæºè½è¯å«ç»æä¸ºç©º!"); |
| | | return Error("è¯å«å¤±è´¥ï¼å¾çæºè½è¯å«ç»æä¸ºç©ºï¼"); |
| | | } |
| | | bool result = _acc.AddFRMReport(fRMReportInfo); |
| | | // ä¿åå¤±è´¥ä¿®æ¹æä»¶å |
| | |
| | | } |
| | | System.IO.File.Move(filename, newName); |
| | | return Error("ä¿åæä»¶å¤±è´¥ï¼"); |
| | | } |
| | | else |
| | | { |
| | | UseOrderService _orderService = new UseOrderService(); |
| | | AccountBLL _accountBll = new AccountBLL(); |
| | | SysBusinessPlanBLL _sysBusinessPlanBll = new SysBusinessPlanBLL(); |
| | | var userGrade = _accountBll.GetUserGradeById(int.Parse(UserId)); |
| | | var freeDescNo = _sysBusinessPlanBll.GetFreeDescbyName("å
¬å¸è´¢æ¥OCR"); |
| | | var vipDescNo = _sysBusinessPlanBll.GetVipDescbyName("å
¬å¸è´¢æ¥OCR"); |
| | | UseOrder param = new UseOrder(); |
| | | param.CreateUserId = int.Parse(UserId); |
| | | param.OrderType = "å
¬å¸è´¢æ¥OCR"; |
| | | param.OrderNo = Guid.NewGuid().ToString("N"); |
| | | if (userGrade == UserGradeType.Free.GetDisplayName()) //æ®éç |
| | | { |
| | | param.OrderAmount = freeDescNo; |
| | | param.PayAmount = freeDescNo; |
| | | } |
| | | else |
| | | { |
| | | param.OrderAmount = vipDescNo; |
| | | param.PayAmount = vipDescNo; |
| | | } |
| | | await _orderService.AddAsync(param); |
| | | } |
| | | } |
| | | return Success(data:fRMReportInfo.ReportPath); |
| | |
| | | } |
| | | |
| | | [HttpPost] |
| | | public async Task<ActionResult> AliOcrTable() |
| | | public async Task<ActionResult> AddImg(string UserId) |
| | | { |
| | | //åå§åFRMReportInfoç±» |
| | | FRMReportInfo fRMReportInfo = new FRMReportInfo();//åå»ºè®°å½ |
| | | fRMReportInfo.UserId = UserId; |
| | | |
| | | if (HttpContext.Request.Files.Count == 0) |
| | | return Error("ä¸ä¼ è¯·æ±æä»¶ä¸º0ï¼"); |
| | | if (HttpContext.Request.Files.Count != 1) |
| | |
| | | return Error("åªè½ä¸ä¼ å¾çï¼è¯·éæ°ä¸ä¼ ï¼"); |
| | | if (uploadFile.InputStream.Length > 4 * 1024 * 1024) //1024*1024*100=100M--å端éªè¯ |
| | | return Error("æä»¶å¤§å°å·²ç»è¶
è¿4Mï¼è¯·éæ°ä¸ä¼ ï¼"); |
| | | |
| | | var createTime = DateTime.Now.ToString("yyyyMMddHHmm");//å建æ¶é´ |
| | | var filepath = string.Format("{0}ã{1}ã{2}", _virtualPath, createTime, |
| | | uploadFile.FileName); |
| | | var filename = |
| | | Server.MapPath(string.Format("{0}ã{1}ã{2}", _virtualPath, createTime, uploadFile.FileName)); |
| | | Directory.CreateDirectory(Server.MapPath(_virtualPath)); |
| | | uploadFile.SaveAs(filename); |
| | | fRMReportInfo.ImgPath = filepath; |
| | | |
| | | byte[] bytes; |
| | | using (var memoryStream = new MemoryStream()) |
| | | { |
| | | uploadFile.InputStream.CopyTo(memoryStream); |
| | | bytes = memoryStream.ToArray(); |
| | | } |
| | | |
| | | var base64Str = Convert.ToBase64String(bytes); |
| | | var table = await ResultsIdentifyBLL.AliOcrTable(base64Str); |
| | | |
| | | return Success(data: table); |
| | | if (table != null) |
| | | { |
| | | string fileName = uploadFile.FileName.Replace(file.Extension, ""); |
| | | fRMReportInfo.ImgName = fileName; |
| | | var title = "OCR_" + DateTime.Now.ToString("yyyyMMddhhmmssfff"); |
| | | var ExcelPath = string.Format("{0}ã{1}ã{2}", _savePath, createTime, |
| | | title.ToString() + ".xlsx"); |
| | | var ExcelPathShow = string.Format("{0}ã{1}ã{2}", _savePath, createTime, |
| | | title.ToString() + "_Show" + ".xlsx"); |
| | | var RealPath = Server.MapPath(string.Format("{0}ã{1}ã{2}", _excelPath, createTime, |
| | | title.ToString() + ".xlsx")); |
| | | Directory.CreateDirectory(Server.MapPath(_excelPath)); |
| | | NPOIHelper.FRMExportExcel(table, RealPath, title, true); |
| | | fRMReportInfo.ReportName = title + ".xlsx"; |
| | | fRMReportInfo.ReportPath = ExcelPath; |
| | | fRMReportInfo.ReportPath_Show = ExcelPathShow; |
| | | } |
| | | else |
| | | { |
| | | return Error("è¯å«å¤±è´¥ï¼å¾çæºè½è¯å«ç»æä¸ºç©ºï¼"); |
| | | } |
| | | |
| | | bool result = _acc.AddFRMReport(fRMReportInfo); |
| | | // ä¿åå¤±è´¥ä¿®æ¹æä»¶å |
| | | if (!result) |
| | | { |
| | | if (System.IO.File.Exists(filename)) |
| | | { |
| | | var newName = Regex.Replace(filename, @"ã\d*ã", $"ãä¿å失败{DateTime.Now:yyyyMMdd}ã"); |
| | | //æä»¶åéå¤,å é¤ä¹åç |
| | | if (System.IO.File.Exists(newName)) |
| | | { |
| | | System.IO.File.Delete(newName); |
| | | } |
| | | System.IO.File.Move(filename, newName); |
| | | } |
| | | return Error("ä¿åæä»¶å¤±è´¥ï¼"); |
| | | } |
| | | else |
| | | { |
| | | //æ¶è积ååå
¥ç³»ç»20230525FX |
| | | UseOrderService _orderService = new UseOrderService(); |
| | | AccountBLL _accountBll = new AccountBLL(); |
| | | SysBusinessPlanBLL _sysBusinessPlanBll = new SysBusinessPlanBLL(); |
| | | var userGrade = _accountBll.GetUserGradeById(int.Parse(UserId)); |
| | | var freeDescNo = _sysBusinessPlanBll.GetFreeDescbyName("å
¬å¸è´¢æ¥OCR"); |
| | | var vipDescNo = _sysBusinessPlanBll.GetVipDescbyName("å
¬å¸è´¢æ¥OCR"); |
| | | UseOrder param = new UseOrder(); |
| | | param.CreateUserId = int.Parse(UserId); |
| | | param.OrderType = "å
¬å¸è´¢æ¥OCR"; |
| | | param.OrderNo = Guid.NewGuid().ToString("N"); |
| | | if (userGrade == UserGradeType.Free.GetDisplayName()) //æ®éç |
| | | { |
| | | param.OrderAmount = freeDescNo; |
| | | param.PayAmount = freeDescNo; |
| | | } |
| | | else |
| | | { |
| | | param.OrderAmount = vipDescNo; |
| | | param.PayAmount = vipDescNo; |
| | | } |
| | | await _orderService.AddAsync(param); |
| | | return Success(data: fRMReportInfo.ReportPath); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public class FinBalanceSheetExController:BaseController |
| | | { |
| | | private FinBalanceSheetExBLL _acc = new FinBalanceSheetExBLL(); |
| | | //private FinBalanceSheetBLL _accNew = new FinBalanceSheetBLL(); |
| | | |
| | | /// <summary> |
| | | ///æ ¹æ®ä¸»ä½IDæ¥è¯¢èµäº§è´åºè¡¨ |
| | |
| | | /// <param name="ProjId"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ActionResult GetBalanceSheetList( int SubjectId, int ProjId) |
| | | public ActionResult GetBalanceSheetList( int SubjectId, int ProjId, int PageIndex=1, int PageSize=5) |
| | | { |
| | | try |
| | | { |
| | | var list = _acc.GetBalanceSheetList(SubjectId, ProjId); |
| | | var list = _acc.GetBalanceSheetList(SubjectId, ProjId, PageIndex, PageSize); |
| | | return SuccessNoShow(data: list); |
| | | } |
| | | catch (Exception e) |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | ///æ ¹æ®ä¸»ä½IDæ¥è¯¢èµäº§è´åºè¡¨ï¼Dropï¼ |
| | | /// </summary> |
| | | /// <param name="ProjId"></param> |
| | | /// <returns></returns> |
| | | //[HttpPost] |
| | | //public ActionResult GetBalanceSheetListEx(int SubjectId, int ProjId) |
| | | //{ |
| | | // try |
| | | // { |
| | | // var list = _accNew.GetBalanceSheetList(SubjectId, ProjId); |
| | | // return SuccessNoShow(data: list); |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // LogHelper.Write(Level.Error, "è·åèµäº§è´åºè¡¨çå表 GetBalanceSheetList", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | // return Error(); |
| | | // } |
| | | //} |
| | | #region æ¥è¯¢ 3项 |
| | | /// <summary> |
| | | ///æ ¹æ®ä¸»ä½ID æ ¹æ®æ¡ä»¶è·å æ¥è¡¨ç±»å |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<ActionResult> GetPledgeRevList(int PageSize = 5, int PageIndex = 1, string Name = "", int SelState = 0, int TypeId = 0 , string NameOfMortgagor = "", string NameOfMortgagee = "", string PriContractAmount = "", string sizeAll = "", string[] RegistrationTime = null, string[] DateOfRegistration = null, string RegCerNumber="", bool SubLtdFlag = true) |
| | | public async Task<ActionResult> GetPledgeRevList(int PageSize = 5, int PageIndex = 1, string Name = "", int SelState = 0, int TypeId = 0 , string NameOfMortgagor = "", string NameOfMortgagee = "", string PriContractAmount = "", string RegistrationType= "", string[] RegistrationTime = null, string[] DateOfRegistration = null, string RegCerNumber="", bool SubLtdFlag = true) |
| | | { |
| | | try |
| | | { |
| | | var list = await _acc.GetPledgeRevList(PageSize, PageIndex,FileUtil.ToSBC(Name), SelState, TypeId, FileUtil.ToSBC(NameOfMortgagor), FileUtil.ToSBC(NameOfMortgagee), PriContractAmount, sizeAll, RegistrationTime, DateOfRegistration,RegCerNumber,SubLtdFlag); |
| | | var list = await _acc.GetPledgeRevList(PageSize, PageIndex,FileUtil.ToSBC(Name), SelState, TypeId, FileUtil.ToSBC(NameOfMortgagor), FileUtil.ToSBC(NameOfMortgagee), PriContractAmount, RegistrationType, RegistrationTime, DateOfRegistration,RegCerNumber,SubLtdFlag); |
| | | //è®°å½æç´¢è¡ä¸º20220831FX |
| | | var userid = OperatorProvider.Instance.Current == null |
| | | ? -1 |
| | |
| | | subject.StateId = StateId; |
| | | subject.TypeAdd = _acc.UpdateTypeAdd(TypeAdd, Title); |
| | | subject.id = id; |
| | | if (RootFlag && _acc.CheckRootNodeInStock(subject, false)) |
| | | if (ProjId==0) |
| | | { |
| | | return Error("项ç®ä¸»ä½æ·»å 失败ï¼è¯·å
å建项ç®åæ·»å ï¼", true, ShowDetail.ModalError.GetDisplayName()); |
| | | } |
| | | else if (RootFlag && _acc.CheckRootNodeInStock(subject, false)) |
| | | { |
| | | return Error("å½åå
¬å¸å¨è¯ä¼°åºåæ¥è¡æç»æä¸åå¨ç´æ¥è¡ä¸ï¼ä¸å
许ä½ä¸ºæ ¹èç¹ï¼", true, ShowDetail.ModalError.GetDisplayName()); |
| | | } |
| | |
| | | { |
| | | |
| | | var rev = _acc.UpdateSubject(subject); |
| | | //if (rev) |
| | | //{ |
| | | // //1. å°è¡æå®æ´æ§æ£æ¥ç»æåå
¥mainProjectè¡¨æ ¼ / mainSuject表 |
| | | // RightStockBLL rightStockBll = new RightStockBLL(); |
| | | // rightStockBll.UpdateRightStockIntegrity(ProjId, false); |
| | | |
| | | // //2. 妿èç¹çæ è¯åçåå æ æ ¹èç¹ç屿§åçåå |
| | | // SubjectEx subjectold = _acc.GetSubjectbyId(id); |
| | | // if (subjectold.RootFlag != RootFlag || |
| | | // (subjectold.RootFlag && subjectold.CompanyCharId != CompanyCharId)) |
| | | // { |
| | | // //æ ¹èç¹ååç´æ¥å½±å转æ¢å
¬å¼ä¸çä¼ä¸æ§è´¨è°æ´ç³»æ°ï¼æä»¥é¢è®¡æå¤±æ¯çè¦æ´æ°ä¸æ¬¡ï¼è¿å¸¦çé¢è®¡æå¤±éé¢ãä¹
æãè¯ä¼°åºåæ¥æ¯ä»éé¢ä¸èµ·æ´æ° |
| | | // AssessDebtOutBLL assessDebtOutBll = new AssessDebtOutBLL(); |
| | | // assessDebtOutBll.UpdateDurationDiscountAll(ProjId); |
| | | // } |
| | | |
| | | // //3. å¦ææ ¹èç¹æ è¯ä¸ºtrue |
| | | // if (subjectold.RootFlag != RootFlag) |
| | | // { |
| | | // //èç¹çè¡æå®æ´æ§Flag䏿 ¹èç¹Flagä¸è´ |
| | | // _acc.UpdateSubject(id, RootFlag); |
| | | // } |
| | | //} |
| | | |
| | | return rev ? Success() : Error(); |
| | | } |
| | | else |
| | |
| | | //æ·»å æ°çèç¹ä¿¡æ¯ |
| | | subject.StockIntegrityFlag = RootFlag;//èç¹çè¡æå®æ´æ§Flag䏿 ¹èç¹Flagä¸è´ |
| | | var rev = _acc.AddSubject(subject); |
| | | //if (rev > 0) |
| | | //{ |
| | | // //1. å°è¡æå®æ´æ§æ£æ¥ç»æåå
¥mainProjectè¡¨æ ¼ / mainSuject表 |
| | | // RightStockBLL rightStockBll = new RightStockBLL(); |
| | | // rightStockBll.UpdateRightStockIntegrity(ProjId, false); |
| | | |
| | | // //2. æ·»å 综åä¿¡æ¯æ¥å |
| | | // AssessGeneralInfoBLL assessGeneralInfoBll = new AssessGeneralInfoBLL(); |
| | | // AssessGeneralInfo assessGeneralInfo = new AssessGeneralInfo(); |
| | | // assessGeneralInfo.CompanyId = rev; |
| | | // assessGeneralInfoBll.AddGeneralInfo(assessGeneralInfo); |
| | | //} |
| | | return rev > 0 ? Success() : Error(); |
| | | } |
| | | else |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | SubjectEx subject = _acc.GetSubjectbyId(id); |
| | | ProjectExBLL projectBll = new ProjectExBLL(); |
| | | ProjectEx project = projectBll.GetProjOverview(subject.ProjId); |
| | | if (project.FirstSubjectId == id) |
| | | if (project!=null && project.FirstSubjectId == id) |
| | | { |
| | | return Error("å é¤å¤±è´¥ï¼é¡¹ç®æ¦è§>>æ¾æ¬¾ååæ¶è®¡å>>æ¾æ¬¾è®¡åçç´æ¥èèµä¸»ä½éåæ´æè½å é¤ï¼"); |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å 䏿¡å¸¸ç¨å·¥å
·ä¿¡æ¯ |
| | | /// æ·»å 䏿¡å¸¸ç¨åè½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="UserId"></param> |
| | | /// <param name="ToolName"></param> |
| | |
| | | { |
| | | try |
| | | { |
| | | SysAccountMenu sysAccountMenu = new SysAccountMenu(); |
| | | sysAccountMenu.UserId = UserId; |
| | | sysAccountMenu.ToolName = ToolName; |
| | | if (_acc.ExistSysAccountMenu(sysAccountMenu, false) == false) |
| | | int iMaxCount = 12; |
| | | if (_acc.GetSysAccountMenuCount(UserId) >= iMaxCount) |
| | | { |
| | | int res = _acc.AddSysAccountMenu(sysAccountMenu); |
| | | return res>0?Success(message: "æ·»å æåï¼"):Error(); |
| | | return Error(message: $"æå¤æ·»å {iMaxCount}个åè½æ¨¡åï¼"); |
| | | } |
| | | else |
| | | { |
| | | return Error(message: "æ·»å 失败ï¼å·²ç»åå¨éå¤é¡¹ï¼"); |
| | | SysAccountMenu sysAccountMenu = new SysAccountMenu(); |
| | | sysAccountMenu.UserId = UserId; |
| | | sysAccountMenu.ToolName = ToolName; |
| | | if (_acc.ExistSysAccountMenu(sysAccountMenu, false) == false) |
| | | { |
| | | int res = _acc.AddSysAccountMenu(sysAccountMenu); |
| | | return res > 0 ? Success(message: ToolName + "æ·»å æåï¼") : Error(); |
| | | } |
| | | else |
| | | { |
| | | return Error(message: ToolName + "æ·»å 失败ï¼å·²åå¨éå¤é¡¹ï¼"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogHelper.Write(Level.Error, "æ·»å 䏿¡å¸¸ç¨å·¥å
·ä¿¡æ¯ AddSysAccountMenu", e, |
| | | LogHelper.Write(Level.Error, "æ·»å 䏿¡å¸¸ç¨åè½ä¿¡æ¯ AddSysAccountMenu", e, |
| | | OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | return Error(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤ä¸æ¡å¸¸ç¨å·¥å
·ä¿¡æ¯ |
| | | /// å é¤ä¸æ¡å¸¸ç¨åè½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | |
| | | try |
| | | { |
| | | var rev = _acc.DeleteSysAccountMenubyId(id); |
| | | return rev ? Success() : Error(); |
| | | return rev ? Success("å 餿åï¼") : Error(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogHelper.Write(Level.Error, "å é¤ä¸æ¡å¸¸ç¨å·¥å
·ä¿¡æ¯ DeleteSysAccountMenubyId", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | LogHelper.Write(Level.Error, "å é¤ä¸æ¡å¸¸ç¨åè½ä¿¡æ¯ DeleteSysAccountMenubyId", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | return Error(); |
| | | } |
| | | } |
| | |
| | | private SysAccountNewsBLL _acc = new SysAccountNewsBLL(); |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®UserIdåTypeIdè·åèªå®ä¹ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="UserId"></param> |
| | | /// <param name="TypeId"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ActionResult GetSysAccountNewsbyUserId(int UserId, int TypeId) |
| | | { |
| | | try |
| | | { |
| | | var Info = _acc.GetSysAccountNewsbyUserId(UserId, TypeId); |
| | | return SuccessNoShow(data: Info); |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogHelper.Write(Level.Error, "æ ¹æ®UserIdåTypeIdè·åèªå®ä¹ä¿¡æ¯ GetSysAccountNewsbyUserId", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | return Error(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ·»å 䏿¡èªå®ä¹é
ç½® |
| | | /// </summary> |
| | | /// <param name="UserId"></param> |
| | | /// <param name="Keyword"></param> |
| | | /// <param name="TypeId"></param> |
| | | /// <param name="TypeId">1.7*24å°æ¶æ°é»ï¼2.å
¨å±æ°é»</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ActionResult AddSysAccountNews(int UserId, string Keyword,int TypeId) |
| | |
| | | sysAccountNews.UserId = UserId; |
| | | sysAccountNews.Keyword = Keyword; |
| | | sysAccountNews.TypeId = TypeId; |
| | | int res = _acc.AddSysAccountNews(sysAccountNews); |
| | | if (res == 0) |
| | | if (_acc.ExistSysAccountNews(sysAccountNews,false) == false) |
| | | { |
| | | return Error(message: "æ·»å æåï¼"); |
| | | int res = _acc.AddSysAccountNews(sysAccountNews); |
| | | return res > 0 ? Success() : Error(); |
| | | } |
| | | else |
| | | { |
| | | return Error(message: "æ·»å 失败ï¼"); |
| | | bool res = _acc.UpdateSysAccountNews(Keyword, UserId, TypeId); |
| | | return res ? Success() : Error(); |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | |
| | | namespace GasolineBlend.Controllers |
| | | { |
| | | [LoginChecked()] |
| | | //[LoginChecked()] |
| | | public class SysController : BaseController |
| | | { |
| | | private SysBusinessPlanService _sysBusinessPlanService = new SysBusinessPlanService(); |
| | |
| | | for (int i = 0; i < typeList.Count(); i++) |
| | | { |
| | | SysBusinessPlanShow sysBusinessPlanShow = new SysBusinessPlanShow(); |
| | | sysBusinessPlanShow.Type = typeList[i].ToString(); |
| | | sysBusinessPlanShow.Type = typeList[i]; |
| | | sysBusinessPlanShow.SysBusinessPlanList = res.Where(p => p.Type == typeList[i].ToString()).OrderBy(a=>a.OrderId).ToList(); |
| | | listSysBusinessPlanShows.Add(sysBusinessPlanShow); |
| | | } |
| | | return SuccessNoShow(data: listSysBusinessPlanShows); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä»è½¯æºçGPTæ¯å¦æå¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ActionResult GetRenGPTFlag() |
| | | { |
| | | var sysAppcode = Configs.GetValue("RenGPTFlag"); |
| | | bool bFlag = sysAppcode == "1" ? true : false; |
| | | return SuccessNoShow(data: bFlag); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <param name="ParContent"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ActionResult GetNewsList(int SubClassId, string ParContent,int PageSize=50, int PageIndex=1) |
| | | public ActionResult GetNewsList(int SubClassId, string ParContent,int PageSize=50, int PageIndex=1,int UserId=0) |
| | | { |
| | | try |
| | | { |
| | | var list = _acc.GetNewsList(SubClassId, ParContent, PageSize, PageIndex); |
| | | var list = _acc.GetNewsList(SubClassId, ParContent, PageSize, PageIndex,UserId); |
| | | return SuccessNoShow(data: list); |
| | | } |
| | | catch (Exception e) |
| | |
| | | { |
| | | try |
| | | { |
| | | var list = _acc.GetNewsList(SubClassId, ParContent, PageSize, PageIndex); |
| | | var list = _acc.GetNewsList(SubClassId, ParContent, PageSize, PageIndex,0); |
| | | return SuccessNoShowNoCheck(data: list); |
| | | } |
| | | catch (Exception e) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®idè·åä¸»è¦æ°é»è¯¦ç»ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="Id"></param> |
| | | /// <returns></returns> |
| | | //[HttpPost] |
| | | //public ActionResult GetMajorNewsbyId(int Id) |
| | | //{ |
| | | // try |
| | | // { |
| | | // var list = _acc.GetMajorNewsbyId(Id); |
| | | // return SuccessNoShow(data: list); |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | |
| | | // LogHelper.Write(Level.Error, "è·åä¸»è¦æ°é»è¯¦ç»ä¿¡æ¯ GetMajorNewsbyId", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | // return Error(); |
| | | // } |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// è·åæ°é»èµè®¯ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="ParContent"></param> |
| | |
| | | /// <param name="PageIndex"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ActionResult GetMajorNewsList(string ParContent, int PageSize = 50, int PageIndex = 1) |
| | | public ActionResult GetMajorNewsList(string ParContent, int PageSize = 50, int PageIndex = 1, int UserId = 0) |
| | | { |
| | | try |
| | | { |
| | | var list = _acc.GetMajorNewsList(ParContent, PageSize, PageIndex); |
| | | var list = _acc.GetMajorNewsList(ParContent, PageSize, PageIndex,UserId); |
| | | for (int i = 0; i < list.TrTushareMajorNewses.Count; i++) |
| | | { |
| | | if (list.TrTushareMajorNewses[i].Contents != null ) |
| | |
| | | { |
| | | try |
| | | { |
| | | var list = _acc.GetMajorNewsList(ParContent, PageSize, PageIndex); |
| | | var list = _acc.GetMajorNewsList(ParContent, PageSize, PageIndex,0); |
| | | return SuccessNoShowNoCheck(data: list); |
| | | } |
| | | catch (Exception e) |
| New file |
| | |
| | | using System; |
| | | using System.Diagnostics; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Linq.Expressions; |
| | | using System.Threading.Tasks; |
| | | using System.Web.Mvc; |
| | | using CommonHelper; |
| | | using GasolineBlend.Filter; |
| | | using RiskControl.NewService.Entity.RiskControlRR; |
| | | using RiskControl.NewService.Service; |
| | | |
| | | namespace GasolineBlend.Controllers |
| | | { |
| | | /// <summary> |
| | | /// æ¶è´¹ç¸å
³ |
| | | /// </summary> |
| | | [LoginChecked(true)] |
| | | public class UseController : BaseController |
| | | { |
| | | private UseOrderService _orderService = new UseOrderService(); |
| | | |
| | | #region æ¶è´¹è®¢å |
| | | |
| | | [HttpPost] |
| | | public async Task<ActionResult> AddOrder(UseOrder param) |
| | | { |
| | | param.CreateUserId = OperatorProvider.Instance.Current.UserId; |
| | | var res = await _orderService.AddAsync(param); |
| | | return SuccessNoShow(); |
| | | } |
| | | |
| | | [HttpPost] |
| | | public async Task<ActionResult> DeleteOrder(int id) |
| | | { |
| | | var res = await _orderService.DeleteAsync(a => a.Id == id); |
| | | return SuccessNoShow(); |
| | | } |
| | | |
| | | [HttpPost] |
| | | public async Task<ActionResult> GetOrderPage(int pageIndex, int pageSize, string orderNo, int CreateUserId |
| | | , DateTime? startTime, DateTime? endTime) |
| | | { |
| | | var res = await _orderService.GetPages(pageIndex, pageSize, orderNo, CreateUserId |
| | | , startTime, endTime); |
| | | return SuccessNoShow(data: res); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | | using System.Web; |
| | | using System.Web.Mvc; |
| | | using System.Web.SessionState; |
| | |
| | | using GasolineBlend.BLL; |
| | | using GasolineBlend.Entity; |
| | | using GasolineBlend.Filter; |
| | | using RiskControl.NewService.Entity.RiskControlRR; |
| | | using RiskControl.NewService.Service; |
| | | using RiskControl.NewService.ThirdPartyApi; |
| | | |
| | | namespace GasolineBlend.Controllers |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åè´¦å·çèµéæ
åµ |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<ActionResult> GetAccountMoney(int id) |
| | | { |
| | | try |
| | | { |
| | | UseOrderService _useOrderService = new UseOrderService(); |
| | | PayOrderService _payOrderService=new PayOrderService(); |
| | | AccountMoney accountMoney = new AccountMoney(); |
| | | var paySum = await _payOrderService.SumAsync(a => a.CreateUserId == id &&a.PaymentStatus==EnumPaymentStatus.Success, "OrderAmount"); |
| | | var useSum = await _useOrderService.SumAsync(a => a.CreateUserId == id, "OrderAmount"); |
| | | accountMoney.AccountLeft = paySum-useSum; |
| | | accountMoney.AccountPayNo = await _payOrderService.CountAsync(a=>a.CreateUserId==id); |
| | | accountMoney.AccountUseNo = await _useOrderService.CountAsync(a => a.CreateUserId == id); |
| | | return SuccessNoShow(data:accountMoney); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogHelper.Write(Level.Error, "è·åè´¦å·çèµéæ
åµ GetAccountMoney", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | return Error(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç»å½æ¥å£ |
| | | /// </summary> |
| | | /// <param name="userName"></param> |
| | | /// <param name="password"></param> |
| | | /// <param name="companyRemark"></param> |
| | | /// <param name="code">为空-è´¦å·ç»å½ï¼ä¸ä¸ºç©º-微信ç»å½</param> |
| | | /// <returns></returns> |
| | | /// <summary> |
| | | /// ç»å½æ¥å£ |
| | | /// </summary> |
| | | /// <param name="userName"></param> |
| | | /// <param name="password"></param> |
| | | /// <param name="companyRemark"></param> |
| | | /// <param name="code">为空-è´¦å·ç»å½ï¼ä¸ä¸ºç©º-微信ç»å½</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [LoginChecked(false)] |
| | | public ActionResult Login(string userName, string password, string companyRemark,string code= "") |
| | |
| | | { |
| | | if (!new Regex(@"^1\d{10}$").IsMatch(phoneNumber)) |
| | | return Error("ææºå·ç æ ¼å¼ä¸æ£ç¡®"); |
| | | //var injj =_acc.GetAccountList().Where(p=>p.LoginName=="testfx").FirstOrDefault(); |
| | | var userInfo = _acc.GetAccountList().Where(a => a.Mobile == phoneNumber).ToList(); |
| | | if (userInfo.Count==0&& hasReg) |
| | | return Error("è¯¥ææºç¨æ·ä¸åå¨"); |
| | |
| | | <Compile Include="Controllers\MonShareOneController.cs" /> |
| | | <Compile Include="Controllers\NeeqController.cs" /> |
| | | <Compile Include="Controllers\PageRouteController.cs" /> |
| | | <Compile Include="Controllers\UseController.cs" /> |
| | | <Compile Include="Controllers\PayController.cs" /> |
| | | <Compile Include="Controllers\ProjectController.cs" /> |
| | | <Compile Include="Controllers\ProjectExController.cs" /> |
| | |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Folder Include="App_Data\" /> |
| | | <Folder Include="FRMReport\Excel\" /> |
| | | <Folder Include="FRMReport\Img\" /> |
| | | <Folder Include="Pages\" /> |
| | | <Folder Include="TableFiles\" /> |
| | | <Folder Include="TemplateFiles\" /> |
| | |
| | | <add key="HYSiteUrl" value="http://huiyan.rensofter.com/" /> |
| | | <add key="TPSiteUrl" value="http://47.103.72.27:8030/" /> |
| | | <add key="ImgSiteUrl" value="http://101.133.134.71:9001/" /> |
| | | <add key="AliOCRKey" value="b77bcd5d997f47ecaee28e359fbcd605" /> |
| | | <add key="RenGPTFlag" value="0" /> |
| | | </appSettings> |
| | | <system.web> |
| | | <customErrors mode="Off" /> |
| New file |
| | |
| | | using System; |
| | | using System.ComponentModel; |
| | | using CommonHelper.Format; |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | |
| | | namespace RiskControl.NewService.Entity.RiskControlRR |
| | | { |
| | | /// <summary> |
| | | /// æ¶è´¹è®¢å |
| | | ///</summary> |
| | | [SugarTable("UseOrder")] |
| | | public class UseOrder |
| | | { |
| | | /// <summary> |
| | | /// 订åId |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] |
| | | public int Id { get; set; } |
| | | /// <summary> |
| | | /// 订åç¼å· |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "OrderNo")] |
| | | public string OrderNo { get; set; } |
| | | /// <summary> |
| | | /// 订åç±»å |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "OrderType")] |
| | | public string OrderType { get; set; } |
| | | /// <summary> |
| | | /// 订åéé¢ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "OrderAmount")] |
| | | public decimal OrderAmount { get; set; } |
| | | /// <summary> |
| | | /// æ¯ä»éé¢ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "PayAmount")] |
| | | public double PayAmount { get; set; } |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// é»è®¤å¼: (getdate()) |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "CreateTime")] |
| | | public DateTime CreateTime { get; set; } = DateTime.Now; |
| | | /// <summary> |
| | | /// æ¯ä»è´¦æ· |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "CreateUserId")] |
| | | public int CreateUserId { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToOne, nameof(CreateUserId))] |
| | | public SysAccount CreateUser { get; set; } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¯ä»æ¹å¼ |
| | | /// </summary> |
| | | //public enum EnumPayment |
| | | //{ |
| | | // /// <summary> |
| | | // /// 微信æ¯ä» |
| | | // /// </summary> |
| | | // [Description("微信æ¯ä»")] |
| | | // WechatPay = 1, |
| | | // /// <summary> |
| | | // /// æ¯ä»å® |
| | | // /// </summary> |
| | | // [Description("æ¯ä»å®")] |
| | | // AliPay = 2, |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// æ¯ä»ç¶æ |
| | | /// </summary> |
| | | //public enum EnumPaymentStatus |
| | | //{ |
| | | // /// <summary> |
| | | // /// æ¯ä»å¤±è´¥ |
| | | // /// </summary> |
| | | // [Description("æ¯ä»å¤±è´¥")] |
| | | // Error = -1, |
| | | // /// <summary> |
| | | // /// æ¯ä»æå |
| | | // /// </summary> |
| | | // [Description("æ¯ä»æå")] |
| | | // Success =1, |
| | | // /// <summary> |
| | | // /// çå¾
æ¯ä» |
| | | // /// </summary> |
| | | // [Description("çå¾
æ¯ä»")] |
| | | // Paying = 2, |
| | | // /// <summary> |
| | | // /// åæ¶æ¯ä» |
| | | // /// </summary> |
| | | // [Description("åæ¶æ¯ä»")] |
| | | // Cancel = 3, |
| | | //} |
| | | } |
| | |
| | | var url = isProParamTmp |
| | | ? "https://pro.qcc.com/api/yj/ECIV4/SearchWide" |
| | | : "https://api.qichacha.com/FuzzySearch/GetList"; |
| | | try |
| | | { |
| | | var header = GetHeader(isProParamTmp); |
| | | query.key = KeySearch; |
| | | |
| | | var header= GetHeader(isProParamTmp); |
| | | query.key = KeySearch; |
| | | var resStr = HttpMethod.HttpGet(url, header, query); |
| | | var resObj = resStr.ToObject<FuzzySearchReturnTotal>(); |
| | | |
| | | var resStr = HttpMethod.HttpGet(url, header, query); |
| | | var resObj = resStr.ToObject<FuzzySearchReturnTotal>(); |
| | | return resObj; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var resObj = new FuzzySearchReturnTotal(); |
| | | |
| | | return resObj; |
| | | return resObj; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | <Compile Include="Entity\CreditRatingReportStar.cs" /> |
| | | <Compile Include="Entity\QccDbEntity\SysCompanyOriginalName.cs" /> |
| | | <Compile Include="Entity\RiskControlRR\PayErrLog.cs" /> |
| | | <Compile Include="Entity\RiskControlRR\UseOrder.cs" /> |
| | | <Compile Include="Entity\RiskControlRR\PayOrder.cs" /> |
| | | <Compile Include="Entity\RiskControlRR\PayRechargeAmount.cs" /> |
| | | <Compile Include="Entity\RiskControlStockDL\BankFjcfTableDetail.cs" /> |
| | |
| | | <Compile Include="Service\DbContext.cs" /> |
| | | <Compile Include="Service\EventKgService.cs" /> |
| | | <Compile Include="Service\IndustryChainService.cs" /> |
| | | <Compile Include="Service\UseService.cs" /> |
| | | <Compile Include="Service\SmartInvestAlarmService.cs" /> |
| | | <Compile Include="Service\LeaseAlarmService.cs" /> |
| | | <Compile Include="Service\SmartInvestService.cs" /> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region æ¥è¯¢Count |
| | | #region æ¥è¯¢Count/Sum |
| | | public async Task<int> CountAsync(Expression<Func<T, bool>> where, bool Async = true) |
| | | { |
| | | var res = Async ? await _dbClient.Queryable<T>().CountAsync(where) : _dbClient.Queryable<T>().Count(where); |
| | | return res; |
| | | } |
| | | |
| | | public async Task<double> SumAsync(Expression<Func<T, bool>> where, string sumField, bool Async = true) |
| | | { |
| | | var res = Async ? await _dbClient.Queryable<T>().Where(where).SumAsync<double>(sumField) : _dbClient.Queryable<T>().Where(where).Sum<double>(sumField); |
| | | return res; |
| | | } |
| | | #endregion |
| | | |
| | | #region æ¯å¦åå¨ |
| New file |
| | |
| | | using System; |
| | | using System.Linq.Expressions; |
| | | using System.Threading.Tasks; |
| | | using RiskControl.NewService.Entity.RiskControlRR; |
| | | using RiskControl.NewService.Extension; |
| | | using SqlSugar; |
| | | |
| | | namespace RiskControl.NewService.Service |
| | | { |
| | | /// <summary> |
| | | /// æ¯ä»è®¢å |
| | | /// </summary> |
| | | public class UseOrderService :BaseService<UseOrder> |
| | | { |
| | | public async Task<Page<UseOrder>> GetPages(int pageIndex, int pageSize, string orderNo, int CreateUserId |
| | | , DateTime? startTime, DateTime? endTime) |
| | | { |
| | | var whereExp = Expressionable.Create<UseOrder>() |
| | | .AndIF(!string.IsNullOrWhiteSpace(orderNo), a => a.OrderNo == orderNo) |
| | | .AndIF(CreateUserId > 0, a => a.CreateUserId == CreateUserId) |
| | | .AndIF(startTime != null, a => a.CreateTime >= startTime) |
| | | .AndIF(endTime != null, a => a.CreateTime <= endTime) |
| | | .ToExpression(); |
| | | |
| | | var res = await RiskControlRRDb.Queryable<UseOrder>() |
| | | .Includes(a => a.CreateUser) |
| | | .Where(whereExp) |
| | | .OrderBy(a=>a.CreateTime,OrderByType.Desc) |
| | | .ToPageAsync(pageIndex, pageSize); |
| | | return res; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |