|
|
|
|
using Dto;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
|
|
|
|
using Microsoft.Win32;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using System.Collections.Specialized;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Dynamic;
|
|
|
|
|
using System.Net.Http;
|
|
|
|
|
using System.Net.Http.Headers;
|
|
|
|
|
using System.Reflection.Metadata;
|
|
|
|
|
using System.Runtime;
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using test;
|
|
|
|
|
using WebApplication1.Models;
|
|
|
|
|
|
|
|
|
|
namespace WebApplication1.Controllers
|
|
|
|
|
{
|
|
|
|
|
[ApiController]
|
|
|
|
|
[Route("[controller]/[action]")]
|
|
|
|
|
public class TwentySystemController : ControllerBase
|
|
|
|
|
{
|
|
|
|
|
private readonly HttpClient httpClient;
|
|
|
|
|
private string ip, port;
|
|
|
|
|
|
|
|
|
|
public TwentySystemController(IHttpClientFactory httpClientFactory, IConfiguration configuration)
|
|
|
|
|
{
|
|
|
|
|
ip = configuration.GetSection("Configs:SystemIp").Value;
|
|
|
|
|
port = configuration.GetSection("Configs:Port").Value;
|
|
|
|
|
httpClient = httpClientFactory.CreateClient();
|
|
|
|
|
httpClient.BaseAddress = new Uri("http://143.120.5.116:8080"); // new Uri($"http://{ip}:{port}");
|
|
|
|
|
httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
|
|
|
|
|
httpClient.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample");
|
|
|
|
|
httpClient.DefaultRequestHeaders.ConnectionClose = true;
|
|
|
|
|
}
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public async Task<Result<JZJBXX>> GetJZXX(string dwbm, string bmsah)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
MDossier dossier = new MDossier(dwbm, $"{ip}:{port}");
|
|
|
|
|
var data = await dossier.GetJZXX(dwbm, bmsah);
|
|
|
|
|
return new Result<JZJBXX>()
|
|
|
|
|
{
|
|
|
|
|
IsSucceed = true,
|
|
|
|
|
Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>",
|
|
|
|
|
result = data
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
return new Result<JZJBXX>()
|
|
|
|
|
{
|
|
|
|
|
IsSucceed = false,
|
|
|
|
|
Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>" + ex.Message
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public async Task<Result<Paging<JZInfo>>> GetCaseInfo(string? casename, string? bmsah, string? dwbm, DateTime? starttime, DateTime? endtime, int page, int size)
|
|
|
|
|
{
|
|
|
|
|
await Task.Delay(10);
|
|
|
|
|
var param = new
|
|
|
|
|
{
|
|
|
|
|
ksslrq = starttime?.ToString("yyyy-MM-dd") ?? DateTime.Now.AddDays(-100).ToString("yyyy-MM-dd"),
|
|
|
|
|
jsslrq = endtime?.ToString("yyyy-MM-dd") ?? DateTime.Now.ToString("yyyy-MM-dd"),
|
|
|
|
|
bmsah = bmsah,
|
|
|
|
|
zzzt = "",
|
|
|
|
|
ajlbbms = new string[] { "2801", "2802", "2803", "1602", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2009", "2010", "2011", "2012", "2013", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", "2026", "2027", "2029", "2031", "2032", "2033", "2034", "2035", "2036", "2037", "2039", "2040", "2041", "2042", "2043", "2044", "2048", "2049", "2050", "2051", "2052", "2053", "2054", "2055", "2056", "2058", "2059", "2062", "2077", "2078", "1603", "1604", "1608", "1611", "1614", "1619", "1621", "1622", "1625", "1626", "1630", "1631", "1632", "1633", "1634", "1635", "1636", "1637", "1638", "1650", "1801", "1802", "1803", "1805", "1806", "1807", "1808", "1809", "1810", "1812", "1813", "1901", "1902", "1903", "1904", "1905", "1906", "1907", "1908", "1909", "1910", "1911", "1912", "1913", "1914", "1915", "1916", "1917", "1918", "1919", "0701", "0702", "0703", "0704", "0705", "0706", "0707", "0708", "0709", "0710", "0711", "0712", "0713", "0714", "0715", "0716", "0717", "0718", "0719", "0720", "0721", "0722", "0723", "0724", "0725", "0726", "0727", "1701", "1702", "1703", "1704", "1705", "1706", "1708", "1709", "1710", "1711", "1712", "1713", " 1714", "1715", "1716", "1718", "1719", "1720", "1722", "1723", "1724", "1725", "1726", "1727", "1728", "1729", "1730", "1731", "1732", "1733", "1734", "1736", "1737", "1738", "1740", "1741", "1742", "1743", "1744", "1745", "1747", "1748", "1749", "1750", "1752", "1753", "1754", "1756", "1757", "1758", "1759", "1760", "1761", "1762", "1768", "1769", "1770", "1771", "1772", "1773", "1774", "1775", "1778", "1779", "1780", "1781", "1782", "1784", "1785", "1786", "1787", "1788", "1789", "1790", "1791", "1792", "2701", "2702", "2703", "2704", "2705", "2706", "2707", "2708", "2710", "2711", "2712", "2713", "2714", "2715", "2716", "2717", "2718", "2719", "2721", "2722", "2723", "2724", "2726", "2727", "2728", "2729", "2730", "2731", "2732", "2733", "2734", "2735", "2736", "2737", "0801", "0802", "0803", "0804", "0805", "0806", "0808", "0809", "0810", "0811", "0812", "0813", "0814", "0815", "0816", "0817", "0818", "0819", "0820", "0821", "0822", "0823", "0824", "0825", "0826", "0827", "0828", "1401", "1402", "1403", "1404", "1405", "1406", "1408", "1409", "1410", "1411", "1412", "1413", "1414", "1415", "1101", "1102", "1103", "1104", "1105", "1107", "1108", "1109", "1111", "1112", "1302", "1303", "1304", "1305", "2202", "2203", "2204", "2205", "2207", "2209", "2301", "2302", "2303", "2401", "2402", "2101", "2102", "2103", "2104", "2105", "2106", "2107", "2108", "2109", "2110", "2111", "2112", "2113", "2114", "2115", "2116", "2117", "2118", "2119", "2120", "2122", "2123", "2124", "2130", "2501", "2502", "2509", "2601", "2602", "2603", "2604", "0301", "3001", "3002" },
|
|
|
|
|
ajmc = casename,
|
|
|
|
|
sfsy = "",
|
|
|
|
|
sfbd = "",
|
|
|
|
|
dwbms = new string[]
|
|
|
|
|
{
|
|
|
|
|
dwbm
|
|
|
|
|
},
|
|
|
|
|
page = page.ToString(),
|
|
|
|
|
size = size.ToString()
|
|
|
|
|
};
|
|
|
|
|
httpClient.DefaultRequestHeaders.Add("X-IDENTITY", "eyJkbGJtIjoi5rGk6Lev5bmzIiwicnlibSI6IjQxMDUwMzAwNzQiLCJkd2JtIjoiNDEwNTAzIiwiZHdtYyI6IuWMl+WFs+WMuumZoiIsInJ5bWMiOiLmsaTot6/lubMifQ==");
|
|
|
|
|
var request = await httpClient.PostAsJsonAsync("/dzjzzz-service/api/dzjzzz/dzjzzzYxJzjbxx/getDzzjzList", param);
|
|
|
|
|
var data = await request.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
var result = data.ConvertToAnonymousType(new
|
|
|
|
|
{
|
|
|
|
|
code = default(string),
|
|
|
|
|
success = default(bool),
|
|
|
|
|
message = default(string),
|
|
|
|
|
data = new
|
|
|
|
|
{
|
|
|
|
|
pageNum = default(int),
|
|
|
|
|
pageSize = default(int),
|
|
|
|
|
total = default(int),
|
|
|
|
|
pages = default(int),
|
|
|
|
|
list = new[]
|
|
|
|
|
{
|
|
|
|
|
default(JZInfo)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (result.success == true)
|
|
|
|
|
{
|
|
|
|
|
if (result.data == null)
|
|
|
|
|
{
|
|
|
|
|
return new Result<Paging<JZInfo>>()
|
|
|
|
|
{
|
|
|
|
|
IsSucceed = true,
|
|
|
|
|
Message = result.message ?? "<EFBFBD><EFBFBD>ѯ<EFBFBD>ɹ<EFBFBD>"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var res = new Result<Paging<JZInfo>>()
|
|
|
|
|
{
|
|
|
|
|
IsSucceed = true,
|
|
|
|
|
Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>",
|
|
|
|
|
result = new Paging<JZInfo>()
|
|
|
|
|
{
|
|
|
|
|
pageNum = result?.data?.pageNum,
|
|
|
|
|
pageSize = result?.data?.pageSize,
|
|
|
|
|
total = result?.data?.total,
|
|
|
|
|
pages = result?.data?.pages,
|
|
|
|
|
List = result?.data?.list?.ToList()
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return new Result<Paging<JZInfo>>()
|
|
|
|
|
{
|
|
|
|
|
IsSucceed = false,
|
|
|
|
|
Message = result.message ?? "<EFBFBD><EFBFBD>ѯʧ<EFBFBD><EFBFBD>"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public static string? dttjMapdata;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Эͬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="bmsah"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܰ<EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <param name="dwbm"><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public async Task<List<dynamic>> CaseAdd(string bmsah, string dwbm)
|
|
|
|
|
{
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
// string bmsah = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>[2023]410503000012<EFBFBD><EFBFBD>";
|
|
|
|
|
// string dwbm = "410503";
|
|
|
|
|
List<dynamic> list = new List<dynamic>();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
List<string> untis = new List<string>();
|
|
|
|
|
// <EFBFBD>ӿڵ<EFBFBD>ַ 127.0.0.1:8080
|
|
|
|
|
var list_da = new List<Case_Info>(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
var list_dad = new List<Case_Card_Copy>(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
var list_xxk = new List<Data_Table>(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
var list_akdad = new List<Case_Card>(); //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
var infolist = new List<Case_Info>();
|
|
|
|
|
var detail = new List<Case_Info_Detail>();
|
|
|
|
|
string dqjdbh = string.Empty;
|
|
|
|
|
string dqjdmc = string.Empty;
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
var lcJson = new
|
|
|
|
|
{
|
|
|
|
|
bmsah = bmsah // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܰ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ӿ<EFBFBD>
|
|
|
|
|
//var lcUrl = HttpHelper.Post("http://ajmx-service/api/caseCommon/getCaseBaseInfoAndSendLog", lcJson);
|
|
|
|
|
var request = await httpClient.PostAsJsonAsync("/ajmx-service/api/caseCommon/getCaseBaseInfoAndSendLog", lcJson);
|
|
|
|
|
var lcUrl = await request.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
|
|
|
|
|
var lcModel = JsonConvert.DeserializeObject<ResultDto<LCDto>>(lcUrl);
|
|
|
|
|
if (lcModel.code == "0" && lcModel.success == true)
|
|
|
|
|
{
|
|
|
|
|
dqjdmc = lcModel.Data.dqjdmc;
|
|
|
|
|
dqjdbh = lcModel.Data.dqjdbh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var uniquedata = infolist.Where(q => q.case_bmsah == bmsah).ToList();
|
|
|
|
|
if (uniquedata.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// <EFBFBD><EFBFBD>ȡģ<EFBFBD>ͱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿڲ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
var mxbmparm = new
|
|
|
|
|
{
|
|
|
|
|
dwbm = dwbm, // <EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mxbm = lcModel.Data.ajmxbm // <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD>ͱ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD>ͽӿ<EFBFBD>
|
|
|
|
|
//var mxbmstr = HttpHelper.Post("http://" + ajUrl + "/ajmx-service/api/model/getModelBaseInfo", mxbmparm);
|
|
|
|
|
|
|
|
|
|
var requestmxbmstr = await httpClient.PostAsJsonAsync("/ajmx-service/api/model/getModelBaseInfo", mxbmparm);
|
|
|
|
|
var mxbmstr = await requestmxbmstr.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
|
|
|
|
|
var mxbm = JsonConvert.DeserializeObject<ResultDto<List<MxbmDto>>>(mxbmstr);
|
|
|
|
|
if (mxbm.code == "0" && mxbm.success == true)
|
|
|
|
|
{
|
|
|
|
|
foreach (var mxbmDto in mxbm.Data)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var mxbmsjmxbm = mxbmDto.sjmxbm;
|
|
|
|
|
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
var akparm = new
|
|
|
|
|
{
|
|
|
|
|
mxbm = mxbm.Data[0].mxbm, // ģ<EFBFBD>ͱ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
rootData = bmsah // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܰ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ӿ<EFBFBD>
|
|
|
|
|
var requestmxbmstra = await httpClient.PostAsJsonAsync("/ajmx-service/api/caseForm/getRunningTreetData", akparm);
|
|
|
|
|
var akstr = await requestmxbmstra.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
|
|
|
|
|
var akdata = JsonConvert.DeserializeObject<ResultDto<List<AKDto>>>(akstr);
|
|
|
|
|
if (akdata.code == "0" && akdata.success == true)
|
|
|
|
|
{
|
|
|
|
|
foreach (var ak in akdata.Data)
|
|
|
|
|
{
|
|
|
|
|
if (ak.stbmList == null || ak.stbmList.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
if (ak.children != null && ak.children.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var children in ak.children)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
var xxk = new
|
|
|
|
|
{
|
|
|
|
|
zbZjMap = new { bmsah = bmsah },
|
|
|
|
|
dwbm = dwbm,
|
|
|
|
|
sjmxbm = mxbmsjmxbm,
|
|
|
|
|
stbmjh = children.stbmList,
|
|
|
|
|
xtbs = children.bdbs,
|
|
|
|
|
dttjMap = dttjMapdata,
|
|
|
|
|
zjMap = children.zjjh
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
// <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
var xyrbm = "";
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
xyrbm = children.zjjh.ZRRBM;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
xyrbm = "";
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ӿ<EFBFBD>
|
|
|
|
|
//var xxkstr = HttpHelper.Post("http://" + ajUrl + "/ajmx-service/api/caseForm/getAkFormData", xxk);
|
|
|
|
|
|
|
|
|
|
var requestmxbmstrb = await httpClient.PostAsJsonAsync("/ajmx-service/api/caseForm/getAkFormData", xxk);
|
|
|
|
|
var xxkstr = await requestmxbmstrb.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
|
|
|
|
|
var my_obj = JsonConvert.DeserializeObject<ResultDto<List<XxkDto>>>(xxkstr);
|
|
|
|
|
if (my_obj.code == "0" && my_obj.success == true)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string case_yszm = string.Empty;
|
|
|
|
|
string case_yszm_code = string.Empty;
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < my_obj.Data[0].zdsj.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (my_obj.Data[0].zdsj[i].zdmc == "YSAY") // <EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD><EFBFBD>ɴ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
case_yszm = my_obj.Data[0].zdsj[i].bgqzdwbz; // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
case_yszm_code = my_obj.Data[0].zdsj[i].bgqzdbmz; // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
list.Add(new
|
|
|
|
|
{
|
|
|
|
|
yszmmc = case_yszm,
|
|
|
|
|
yszmbm = case_yszm_code // <EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD>ʶ
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//ret.IsSucceed = true;
|
|
|
|
|
//return Json(ret);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
//ret.IsSucceed = false;
|
|
|
|
|
//ret.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա!";
|
|
|
|
|
//return Json(ret);
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost("UploadImage")]
|
|
|
|
|
public async Task<Result> UploadImage([FromBody] UploadDto dto)
|
|
|
|
|
{
|
|
|
|
|
// var client = new HttpClient();
|
|
|
|
|
Result result = new Result();
|
|
|
|
|
if (dto == null)
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.Code) || dto.Code == "0")
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.ImageStr) || dto.ImageStr == "0")
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "base64ͼƬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.Bmsah) || dto.Bmsah == "0")
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܰ<EFBFBD><EFBFBD>Ų<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.UnitCode) || dto.UnitCode == "0")
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.FileName) || dto.FileName == "0")
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.UnitName) || dto.UnitName == "0")
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UploadImageDto uploadImageDto = new UploadImageDto()
|
|
|
|
|
{
|
|
|
|
|
pageSize = 10,
|
|
|
|
|
pageNum = 1,
|
|
|
|
|
blzt = 0,
|
|
|
|
|
dwbm = dto.UnitCode,
|
|
|
|
|
bmsah = dto.Bmsah,
|
|
|
|
|
ajmc = "",
|
|
|
|
|
gjz = "",
|
|
|
|
|
jsrq = null,
|
|
|
|
|
ksrq = null,
|
|
|
|
|
sqrxm = "",
|
|
|
|
|
sxlxdm = "",
|
|
|
|
|
zrrxm = "",
|
|
|
|
|
};
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
var request = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlGl/findBhdlGzbl", uploadImageDto);
|
|
|
|
|
var findBhdlGzbl = await request.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
var resultGzbl = JsonConvert.DeserializeObject<ResultGzbl>(findBhdlGzbl);
|
|
|
|
|
if (resultGzbl.success == false && resultGzbl.code != "0")
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (resultGzbl.data != null && resultGzbl.data.coumment != null && resultGzbl.data.coumment.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in resultGzbl.data.coumment)
|
|
|
|
|
{
|
|
|
|
|
//<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
string fileName = dto.FileName.Split('.')[0];
|
|
|
|
|
//<EFBFBD><EFBFBD>
|
|
|
|
|
string suffix = dto.FileName.Split('.')[1];
|
|
|
|
|
string id = Guid.NewGuid().ToString().Replace("-", null);
|
|
|
|
|
//<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//item.bhdlbh
|
|
|
|
|
string dir = "yxsj/" + dto.UnitCode + "/bhdl-service/cl/" + dto.Bmsah + "/" + item.bhdlbh;
|
|
|
|
|
///<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
// var base64Iamge = HttpUtility.UrlDecode(dto.ImageStr);
|
|
|
|
|
byte[] DocBytes = Convert.FromBase64String(dto.ImageStr);
|
|
|
|
|
var memoryStream = new MemoryStream(DocBytes);
|
|
|
|
|
System.IO.File.WriteAllBytes(id + "." + suffix, DocBytes);
|
|
|
|
|
var content = new MultipartFormDataContent();
|
|
|
|
|
var fileContent = new StreamContent(memoryStream);
|
|
|
|
|
content.Add(fileContent, "file", id + "." + suffix);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
content.Add(new StringContent(dir), "dir");
|
|
|
|
|
content.Add(new StringContent(id + "." + suffix), "name");
|
|
|
|
|
content.Add(new StringContent("true"), "overrideOnExists");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var responses = await httpClient.PostAsync("/wjfw-service/raw/file/save", content);
|
|
|
|
|
var sresponse = await responses.Content.ReadAsStringAsync();
|
|
|
|
|
if (!string.IsNullOrEmpty(sresponse))
|
|
|
|
|
{
|
|
|
|
|
var fileResultDto = JsonConvert.DeserializeObject<FileResultDto>(sresponse);
|
|
|
|
|
if (fileResultDto.success == true && fileResultDto.code == "0")
|
|
|
|
|
{
|
|
|
|
|
SaveBhdlclxxDto saveBhdlclxxDto = new SaveBhdlclxxDto()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
bhdlbh = item.bhdlbh,
|
|
|
|
|
bmsah = dto.Bmsah,
|
|
|
|
|
dwbm = dto.UnitCode,
|
|
|
|
|
dwmc = dto.UnitName,
|
|
|
|
|
sxbh = "",
|
|
|
|
|
};
|
|
|
|
|
if (dto.Code == "1423000000100")
|
|
|
|
|
{
|
|
|
|
|
saveBhdlclxxDto.cllxdm = "1423000000100";
|
|
|
|
|
saveBhdlclxxDto.cllxmc = "<EFBFBD><EFBFBD>ʦִҵ֤<EFBFBD><EFBFBD>";
|
|
|
|
|
}
|
|
|
|
|
else if (dto.Code == "1423000000200")
|
|
|
|
|
{
|
|
|
|
|
saveBhdlclxxDto.cllxdm = "1423000000200";
|
|
|
|
|
saveBhdlclxxDto.cllxmc = "<EFBFBD><EFBFBD>ʦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤";
|
|
|
|
|
}
|
|
|
|
|
else if (dto.Code == "1423000000300")
|
|
|
|
|
{
|
|
|
|
|
saveBhdlclxxDto.cllxdm = "1423000000300";
|
|
|
|
|
saveBhdlclxxDto.cllxmc = "<EFBFBD><EFBFBD>Ȩί<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
}
|
|
|
|
|
else if (dto.Code == "1423000000400")
|
|
|
|
|
{
|
|
|
|
|
saveBhdlclxxDto.cllxdm = "1423000000400";
|
|
|
|
|
saveBhdlclxxDto.cllxmc = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
}
|
|
|
|
|
else if (dto.Code == "1423000000500")
|
|
|
|
|
{
|
|
|
|
|
saveBhdlclxxDto.cllxdm = "1423000000500";
|
|
|
|
|
saveBhdlclxxDto.cllxmc = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD>";
|
|
|
|
|
}
|
|
|
|
|
else if (dto.Code == "1423000000600")
|
|
|
|
|
{
|
|
|
|
|
saveBhdlclxxDto.cllxdm = "1423000000600";
|
|
|
|
|
saveBhdlclxxDto.cllxmc = "<EFBFBD><EFBFBD>ϵ֤<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
}
|
|
|
|
|
else if (dto.Code == "1423000000700")
|
|
|
|
|
{
|
|
|
|
|
saveBhdlclxxDto.cllxdm = "1423000000700";
|
|
|
|
|
saveBhdlclxxDto.cllxmc = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
}
|
|
|
|
|
List<BhdlClxxInputDTOList> bhdlClxxInputDTOLists = new List<BhdlClxxInputDTOList>();
|
|
|
|
|
bhdlClxxInputDTOLists.Add(new BhdlClxxInputDTOList()
|
|
|
|
|
{
|
|
|
|
|
clbh = id,
|
|
|
|
|
fwqwjmc = id + "." + suffix,// dto.FileName,
|
|
|
|
|
md5 = fileResultDto.data.storageResult.md5,
|
|
|
|
|
wjkzm = suffix,
|
|
|
|
|
wjlj = dir,
|
|
|
|
|
wjmc = fileName,
|
|
|
|
|
wjzjs = fileResultDto.data.size
|
|
|
|
|
});
|
|
|
|
|
saveBhdlclxxDto.bhdlClxxInputDTOList = bhdlClxxInputDTOLists;
|
|
|
|
|
|
|
|
|
|
var httpResponse = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlCl/saveBhdlclxx", saveBhdlclxxDto);
|
|
|
|
|
var resultDataDto = await httpResponse.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
var dataDto = JsonConvert.DeserializeObject<ResultDataDto<AjgldsrxxDto>>(resultDataDto);
|
|
|
|
|
if (dataDto.success == true && dataDto.code == "0")
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = true;
|
|
|
|
|
result.Message = "<EFBFBD>ϴ<EFBFBD><EFBFBD>ɹ<EFBFBD>";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = dataDto.message;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = resultGzbl.message;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <EFBFBD>Ǽ<EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost("Register")]
|
|
|
|
|
public async Task<Result> Register([FromBody] RegisterDto dto)
|
|
|
|
|
{
|
|
|
|
|
Result result = new Result();
|
|
|
|
|
#region <EFBFBD>ж<EFBFBD>
|
|
|
|
|
if (dto == null)
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.UnitName))
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.UnitCode))
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.Bmsah))
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܰ<EFBFBD><EFBFBD>Ų<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.PartyIdCard))
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.ProposerSCC))
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD>ʦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳһ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.ProposerTel))
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrEmpty(dto.ProposerZJHM))
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
UploadImageDto uploadImageDto = new UploadImageDto()
|
|
|
|
|
{
|
|
|
|
|
pageSize = 10,
|
|
|
|
|
pageNum = 1,
|
|
|
|
|
blzt = 0,
|
|
|
|
|
dwbm = dto.UnitCode,
|
|
|
|
|
bmsah = dto.Bmsah,
|
|
|
|
|
ajmc = "",
|
|
|
|
|
gjz = "",
|
|
|
|
|
jsrq = null,
|
|
|
|
|
ksrq = null,
|
|
|
|
|
sqrxm = "",
|
|
|
|
|
sxlxdm = "",
|
|
|
|
|
zrrxm = "",
|
|
|
|
|
};
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
var request = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlGl/findBhdlGzbl", uploadImageDto);
|
|
|
|
|
var findBhdlGzbl = await request.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
var resultGzbl = JsonConvert.DeserializeObject<ResultGzbl>(findBhdlGzbl);
|
|
|
|
|
if (resultGzbl.success == false && resultGzbl.code != "0")
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string bhdlbh = resultGzbl.data.coumment.FirstOrDefault()?.bhdlbh;
|
|
|
|
|
|
|
|
|
|
string lx = "2803,1303,2801,2802,2804,2805,2001,2031,2002,2003,2004,2005,2006,2007,2009,2010,2011,2012,2013,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2029,2032,2033,2034,2035,2036,2037,2039,2040,2041,2042,2043,2044,2048,2050,2051,2052,2053,2054,2055,2056,2058,2059,1602,2062,2077,2078,1603,1621,1622,1604,1638,1650,1608,1611,1614,1635,1626,1632,1625,1619,1634,1630,1631,1633,1636,1637,1801,1802,1803,1805,1806,1807,1808,1809,1810,1812,1813,1916,1919,1917,1918,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,0708,0709,0710,0711,0712,0726,0722,0725,0727,0702,0703,0704,0705,0706,0724,0723,0720,0721,0713,0718,0719,0717,0701,0707,0714,0715,0716,1701,1702,1703,1704,1705,1706,1708,1709,1710,1711,1712,1713,1714,1715,1716,1718,1719,1720,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1736,1737,1738,1740,1741,1742,1743,1744,1745,1747,1748,1749,1750,1752,1753,1754,1756,1757,1758,1759,1760,1761,1762,1784,1789,1785,1786,1787,1788,2714,1768,2736,1769,2713,1770,2715,1771,1778,1772,1779,1773,1780,1774,1781,1775,1782,2734,2735,2732,2733,1790,1791,1792,2701,2702,2703,2704,2705,2706,2707,2708,2710,2711,2712,2716,2717,2718,2719,2721,2722,2723,2724,2726,2727,2728,2729,2730,2731,2737,0802,0803,0805,0806,0826,0818,0819,0808,0809,0810,0811,0812,0814,0815,0816,0817,0820,0821,0822,0823,0804,0813,0824,0825,0827,0828,1406,1401,1402,1403,1404,1405,1408,1409,1410,1411,1412,1413,1414,1415,1416,1107,1111,1112,1108,1302,1304,1305,2210,2211,2302,2303,2301,2401,2402,2119,2122,2123,2120,2601,2602,2603,2604,0301,3001,3002";
|
|
|
|
|
var findAjxx = new
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
ajlbbms = lx.Split(",").ToList(),
|
|
|
|
|
dwbm = dto.UnitCode,
|
|
|
|
|
gjz = "",
|
|
|
|
|
bmsah = dto.Bmsah,
|
|
|
|
|
ajmc = "",
|
|
|
|
|
cbjcg = "",
|
|
|
|
|
zrrxm = "",
|
|
|
|
|
ksrq = "",
|
|
|
|
|
jsrq = "",
|
|
|
|
|
pageNum = 1,
|
|
|
|
|
pageSize = 10
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
var ajrequest = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlGl/findAjxx", findAjxx);
|
|
|
|
|
var ajModel = await ajrequest.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
var ajxxDto = JsonConvert.DeserializeObject<ResultDataDto<FindAjxxDto>>(ajModel);
|
|
|
|
|
if (ajxxDto.code != "0" && ajxxDto.success == false)
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
foreach (var item in ajxxDto.data.list)
|
|
|
|
|
{
|
|
|
|
|
var findAjgldsrxx = new
|
|
|
|
|
{
|
|
|
|
|
bmsah = dto.Bmsah,
|
|
|
|
|
dwbm = dto.UnitCode,
|
|
|
|
|
gjz = dto.PartyIdCard,
|
|
|
|
|
pageNum = 1,
|
|
|
|
|
pageSize = 20
|
|
|
|
|
};
|
|
|
|
|
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
var dsrrequest = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlGl/findAjgldsrxx", findAjgldsrxx);
|
|
|
|
|
var dsrResult = await dsrrequest.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
var dsrModel = JsonConvert.DeserializeObject<ResultDataDto<AjgldsrxxDto>>(dsrResult);
|
|
|
|
|
if (dsrModel.success == false && dsrModel.code != "0" && dsrModel.data.list.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var dsrModle = dsrModel.data.list.Where(x => x.zjhm == dto.PartyIdCard).FirstOrDefault();
|
|
|
|
|
if (dsrModle == null)
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
///<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
var findSqrxx = new
|
|
|
|
|
{
|
|
|
|
|
gjz = dto.ProposerZJHM,
|
|
|
|
|
pageNum = 0,
|
|
|
|
|
pageSize = 20
|
|
|
|
|
};
|
|
|
|
|
var sqrrequest = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlDj/findSqrxx", findSqrxx);
|
|
|
|
|
var sqrRuslt = await sqrrequest.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
var SqrDto = JsonConvert.DeserializeObject<ResultDataDto<FindSqrxxDto>>(sqrRuslt);
|
|
|
|
|
if (SqrDto.success == false && SqrDto.code != "0" && SqrDto.data.content.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD>ʦ<EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
var sqrModel = SqrDto.data.content.Where(x => x.zjhm == dto.ProposerZJHM).FirstOrDefault();
|
|
|
|
|
if (sqrModel == null)
|
|
|
|
|
{
|
|
|
|
|
result.IsSucceed = false;
|
|
|
|
|
result.Message = "<EFBFBD><EFBFBD>ʦ<EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SaveBhdlDjxxDto saveBhdlDjxxDto = new SaveBhdlDjxxDto()
|
|
|
|
|
{
|
|
|
|
|
ajcbdwbm = dto.UnitCode,
|
|
|
|
|
ajcbdwmc = dto.UnitName,
|
|
|
|
|
ajmc = item.ajmc,
|
|
|
|
|
bhdlbh = bhdlbh,
|
|
|
|
|
bmsah = dto.Bmsah,
|
|
|
|
|
czr = item.cbjcg,
|
|
|
|
|
czrybm = item.cbjcgbm,
|
|
|
|
|
dwbm = dto.UnitCode,
|
|
|
|
|
flyznr = "",
|
|
|
|
|
sfagdj = "Y",
|
|
|
|
|
sfflyz = "N",
|
|
|
|
|
sqrbh = sqrModel.sqrbh,
|
|
|
|
|
wfwgqkdm = "",
|
|
|
|
|
wfwgqkmc = "",
|
|
|
|
|
wfwgqknr = "",
|
|
|
|
|
wtr = dto.Wtr,
|
|
|
|
|
wtrydsrgxdm = dto.Wtrydsrgxdm,
|
|
|
|
|
wtrydsrgxmc = dto.Wtrydsrgxmc,
|
|
|
|
|
zbls = dto.Zbls,
|
|
|
|
|
zrrbm = dsrModle.zrrbm,
|
|
|
|
|
bhdlYxSqrInsertInputDto = new BhdlYxSqrInsertInputDto()
|
|
|
|
|
{
|
|
|
|
|
djdwbm = sqrModel.djdwbm,
|
|
|
|
|
djdwmc = sqrModel.djdwmc,
|
|
|
|
|
jmsfzh = sqrModel.jmsfzh,
|
|
|
|
|
lxdh = dto.Lxdh,
|
|
|
|
|
lxdz = dto.Lxdz,
|
|
|
|
|
sfgxlsk = false,
|
|
|
|
|
sqrlxdm = sqrModel.sqrlxdm,
|
|
|
|
|
sqrlxmc = sqrModel.sqrlxmc,
|
|
|
|
|
sqrsfdm = sqrModel.sqrsfdm,
|
|
|
|
|
sqrsfmc = sqrModel.sqrsfmc,
|
|
|
|
|
sqrxm = sqrModel.sqrxm,
|
|
|
|
|
szlssws = sqrModel.szlssws,
|
|
|
|
|
tyshxydm = sqrModel.tyshxydm,
|
|
|
|
|
zjhm = sqrModel.zjhm,
|
|
|
|
|
zjlxdm = sqrModel.zjlxdm,
|
|
|
|
|
zjlxmc = sqrModel.zjlxmc,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var addrequest = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlDj/saveBhdlDjxx", saveBhdlDjxxDto);
|
|
|
|
|
var addRuslt = await addrequest.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <EFBFBD><EFBFBD> Stream ת<EFBFBD><EFBFBD> byte[]
|
|
|
|
|
private static byte[] StreamToBytes(Stream stream)
|
|
|
|
|
{
|
|
|
|
|
byte[] bytes = new byte[stream.Length];
|
|
|
|
|
stream.Read(bytes, 0, bytes.Length);
|
|
|
|
|
// <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>ʼ
|
|
|
|
|
stream.Seek(0, SeekOrigin.Begin);
|
|
|
|
|
return bytes;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <EFBFBD><EFBFBD> byte[] ת<EFBFBD><EFBFBD> Stream
|
|
|
|
|
|
|
|
|
|
private static Stream BytesToStream(byte[] bytes)
|
|
|
|
|
{
|
|
|
|
|
Stream stream = new MemoryStream(bytes);
|
|
|
|
|
return stream;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public class Paging<T>
|
|
|
|
|
{
|
|
|
|
|
public int? pageNum { get; set; }
|
|
|
|
|
public int? pageSize { get; set; }
|
|
|
|
|
public int? total { get; set; }
|
|
|
|
|
public int? pages { get; set; }
|
|
|
|
|
public IEnumerable<T>? List { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class Result
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <EFBFBD>ɹ<EFBFBD>/ʧ<EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataMember]
|
|
|
|
|
public bool IsSucceed { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataMember]
|
|
|
|
|
public string Message { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataMember]
|
|
|
|
|
public dynamic result { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class Result<T> : Result
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <EFBFBD><EFBFBD>չ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataMember]
|
|
|
|
|
public new T result { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class JZInfo
|
|
|
|
|
{
|
|
|
|
|
public string? jzbh { get; set; }
|
|
|
|
|
public string? ajmc { get; set; }
|
|
|
|
|
public string? bmsah { get; set; }
|
|
|
|
|
public string? cbdwbm { get; set; }
|
|
|
|
|
public string? rybm { get; set; }
|
|
|
|
|
public string? rymc { get; set; }
|
|
|
|
|
public int? cs { get; set; }
|
|
|
|
|
public int? ys { get; set; }
|
|
|
|
|
public DateTime? cjsj { get; set; }
|
|
|
|
|
public DateTime? cjrq { get; set; }
|
|
|
|
|
public string? zzr { get; set; }
|
|
|
|
|
public string? zzrbm { get; set; }
|
|
|
|
|
public string? zzzt { get; set; }
|
|
|
|
|
public string? jzms { get; set; }
|
|
|
|
|
public string? jzxh { get; set; }
|
|
|
|
|
public string? nfbd { get; set; }
|
|
|
|
|
public string? jzsd { get; set; }
|
|
|
|
|
public string? ajlbbm { get; set; }
|
|
|
|
|
public string? ajlbmc { get; set; }
|
|
|
|
|
public DateTime? slrq { get; set; }
|
|
|
|
|
public string? jzocrzt { get; set; }
|
|
|
|
|
public string? id { get; set; }
|
|
|
|
|
public string? yjzmc { get; set; }
|
|
|
|
|
public string? sfck { get; set; }
|
|
|
|
|
public string? sfkcz { get; set; }
|
|
|
|
|
public string? qlzt { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|