ProBuiness.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914
  1. using PMS.DBService.ProManager;
  2. using PMS.Interface.ProManager;
  3. using PMS.Interface.SysManager;
  4. using QWPlatform.IService;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Data;
  8. using System.Linq;
  9. using System.Text;
  10. using PMS.DBService;
  11. using PMS.BusinessModels.ProManager;
  12. using PMS.EntityModels.PersonManager;
  13. using QWPlatform.SystemLibrary;
  14. using PMS.BusinessModels.Product;
  15. using PMS.BusinessModels.Project;
  16. using PMS.BusinessModels;
  17. using QWPlatform.SystemLibrary.LogManager;
  18. using QWPlatform.SystemLibrary.Utils;
  19. using PMS.BusinessModels.Account;
  20. using PMS.EntityModels.ProManager;
  21. using System.Reflection;
  22. namespace PMS.BusinessService.ProManager
  23. {
  24. public class ProBuiness : IProModule
  25. {
  26. //提供ProService的数据服务
  27. private ProService DB_ProService = DataServiceBase.Instance<ProService>();
  28. #region 信息显示
  29. /// <summary>
  30. /// 获取所有渠道
  31. /// </summary>
  32. /// <param name="model"></param>
  33. /// <returns></returns>
  34. public string GetAll_Channel(string channelID)
  35. {
  36. var dt = DB_ProService.GetAll_Channel(channelID);
  37. return dt.ToJson();
  38. }
  39. /// <summary>
  40. /// 根据权限渠道ID获取项目
  41. /// </summary>
  42. /// <param name="ChannelID"></param>
  43. /// <returns></returns>
  44. public string Get_Pro_ById(string ChannelID, string query, string project)
  45. {
  46. var dt = DB_ProService.Get_Pro_ById(ChannelID, query, project);
  47. return dt.ToJson();
  48. }
  49. /// <summary>
  50. /// 根据渠道ID查项目信息(无数据权限)
  51. /// </summary>
  52. /// <param name="iD"></param>
  53. /// <returns></returns>
  54. public string Get_Pro_NoAuthor(string ChannelID, string query)
  55. {
  56. return DB_ProService.Get_Pro_NoAuthor(ChannelID, query).ToJson();
  57. }
  58. /// <summary>
  59. /// 根据项目ID获取服务器信息
  60. /// </summary>
  61. /// <param name="id"></param>
  62. /// <param name="page"></param>
  63. /// <param name="rows"></param>
  64. /// <returns></returns>
  65. public string Get_Server_ById(string id, int page, int rows)
  66. {
  67. int defaultrow = 5;
  68. int startnumber = Startnumber(page, rows, defaultrow);
  69. int endnumber = Endnumbers(page, rows, defaultrow);
  70. var dt = DB_ProService.Get_Server_ById(id, startnumber, endnumber);
  71. return dt;
  72. }
  73. /// <summary>
  74. /// 根据项目ID获取机构信息
  75. /// </summary>
  76. /// <param name="ChannelID"></param>
  77. /// <returns></returns>
  78. public string Get_Station_ById(string projectID, int page, int row, string Search)
  79. {
  80. int defaultrow = 5;
  81. int startnumber = Startnumber(page, row, defaultrow);
  82. int endnumber = Endnumbers(page, row, defaultrow);
  83. var dt = DB_ProService.Get_Station_ById(projectID, startnumber, endnumber, Search);
  84. return dt;
  85. }
  86. /// <summary>
  87. /// 根据项目ID获取项目人员
  88. /// </summary>
  89. /// <param name="id"></param>
  90. /// <param name="page"></param>
  91. /// <param name="rows"></param>
  92. /// <returns></returns>
  93. public string Get_Worker_ById(string id, int page, int rows)
  94. {
  95. int defaultrow = 5;
  96. int startnumber = Startnumber(page, rows, defaultrow);
  97. int endnumber = Endnumbers(page, rows, defaultrow);
  98. var dt = DB_ProService.Get_Worker_ById(id, startnumber, endnumber);
  99. return dt;
  100. }
  101. /// <summary>
  102. /// 根据项目ID获取项目产品
  103. /// </summary>
  104. /// <param name="id"></param>
  105. /// <param name="page"></param>
  106. /// <param name="rows"></param>
  107. /// <returns></returns>
  108. public string Get_Product_ById(string id)
  109. {
  110. var dt = DB_ProService.Get_Product_ById(id);
  111. return dt.ToJson();
  112. }
  113. /// <summary>
  114. /// 计算开始行
  115. /// </summary>
  116. /// <param name="page"></param>
  117. /// <param name="row"></param>
  118. /// <param name="defaultrow"></param>
  119. /// <returns></returns>
  120. private int Endnumbers(int page, int row, int defaultrow)
  121. {
  122. if (page == 0 && row == 0)
  123. {
  124. row = defaultrow;
  125. page = 1;
  126. }
  127. return (page) * row;
  128. }
  129. /// <summary>
  130. /// 计算结束行
  131. /// </summary>
  132. /// <param name="page"></param>
  133. /// <param name="row"></param>
  134. /// <param name="defaultrow"></param>
  135. /// <returns></returns>
  136. private int Startnumber(int page, int row, int defaultrow)
  137. {
  138. if (page == 0 && row == 0)
  139. {
  140. row = defaultrow;
  141. page = 1;
  142. }
  143. return (page - 1) * row + 1;
  144. }
  145. #endregion
  146. #region 添加项目
  147. /// <summary>
  148. /// 根据项目ID获取这个项目的信息
  149. /// </summary>
  150. /// <param name="iD"></param>
  151. /// <returns></returns>
  152. public DataTable ProInfo_ById(string ID)
  153. {
  154. return DB_ProService.ProInfo_ById(ID);
  155. }
  156. /// <summary>
  157. /// 项目性质
  158. /// </summary>
  159. /// <returns></returns>
  160. public string GetNature()
  161. {
  162. return DB_ProService.GetNature().ToJson();
  163. }
  164. /// <summary>
  165. /// 实施方式
  166. /// </summary>
  167. /// <returns></returns>
  168. public string GetImplementation()
  169. {
  170. return DB_ProService.GetImplementation().ToJson();
  171. }
  172. /// <summary>
  173. /// 项目状态
  174. /// </summary>
  175. /// <returns></returns>
  176. public string GetState()
  177. {
  178. return DB_ProService.GetState().ToJson();
  179. }
  180. /// <summary>
  181. /// 添加项目
  182. /// </summary>
  183. /// <param name="model"></param>
  184. /// <returns></returns>
  185. public string Add_Project(ProBusinessModel model, UserInfo user)
  186. {
  187. return DB_ProService.Add_Project(model, user);
  188. }
  189. #endregion
  190. #region 修改项目
  191. /// <summary>
  192. /// 保存项目信息
  193. /// </summary>
  194. /// <param name="model"></param>
  195. /// <returns></returns>
  196. public int SaveProject(ProBusinessModel model)
  197. {
  198. return DB_ProService.SaveProject(model);
  199. }
  200. /// <summary>
  201. /// 获取项目信息
  202. /// </summary>
  203. /// <param name="id"></param>
  204. /// <returns></returns>
  205. public DataTable GetProInfo(string id)
  206. {
  207. return DB_ProService.GetProInfo(id);
  208. }
  209. /// <summary>
  210. /// 根据项目ID获取项目审核流程信息
  211. /// </summary>
  212. /// <param name="iD"></param>
  213. /// <returns></returns>
  214. public string GetXMWTLC(string iD)
  215. {
  216. return DB_ProService.GetXMWTLC(iD).ToJson();
  217. }
  218. public string GetProblem(string xMID, string iD)
  219. {
  220. return DB_ProService.GetProblem(xMID, iD).ToJson();
  221. }
  222. public string GetProjectByUserId(string id)
  223. {
  224. return DB_ProService.GetProjectByUserId(id);
  225. }
  226. public string GetInstitutionByProjectId(string id)
  227. {
  228. return DB_ProService.GetInstitutionByProjectId(id).ToJson();
  229. }
  230. public string GetInstitutionIndex(string id)
  231. {
  232. var dt = DB_ProService.GetInstitutionIndex(id);
  233. var dt2 = new DataTable();
  234. var check = string.Empty;
  235. List<IndexModel> list = new List<IndexModel>();
  236. IndexData model = null;
  237. var IndexModel = new IndexModel();
  238. if (dt != null && dt.Rows.Count > 0)
  239. {
  240. foreach (DataRow dr in dt.Rows)
  241. {
  242. var FirstName = dr.GetValueByName<string>("首字母");
  243. if (FirstName != check)
  244. {
  245. check = string.Empty;
  246. }
  247. if (check == string.Empty)
  248. {
  249. IndexModel = new IndexModel();
  250. IndexModel.Index = FirstName;
  251. IndexModel.Data = new List<IndexData>();
  252. list.Add(IndexModel);
  253. check = FirstName;
  254. }
  255. model = new IndexData();
  256. model.ID = dr.GetValueByName<string>("ID");
  257. model.Name = dr.GetValueByName<string>("名称");
  258. model.FirstName = dr.GetValueByName<string>("首字母");
  259. model.CodeName = dr.GetValueByName<string>("简码");
  260. IndexModel.Data.Add(model);
  261. }
  262. }
  263. return Strings.ObjectToJson(list);
  264. }
  265. public string GetProjectIndexByCode(string Project, string code)
  266. {
  267. var dt = DB_ProService.GetProjectIndexByCode(Project, code);
  268. var dt2 = new DataTable();
  269. var check = string.Empty;
  270. List<IndexModel> list = new List<IndexModel>();
  271. IndexData model = null;
  272. var IndexModel = new IndexModel();
  273. if (dt != null && dt.Rows.Count > 0)
  274. {
  275. foreach (DataRow dr in dt.Rows)
  276. {
  277. var FirstName = dr.GetValueByName<string>("首字母");
  278. if (FirstName != check)
  279. {
  280. check = string.Empty;
  281. }
  282. if (check == string.Empty)
  283. {
  284. IndexModel = new IndexModel();
  285. IndexModel.Index = FirstName;
  286. IndexModel.Data = new List<IndexData>();
  287. list.Add(IndexModel);
  288. check = FirstName;
  289. }
  290. model = new IndexData();
  291. model.ID = dr.GetValueByName<string>("ID");
  292. model.Name = dr.GetValueByName<string>("名称");
  293. model.FirstName = dr.GetValueByName<string>("首字母");
  294. model.CodeName = dr.GetValueByName<string>("简码");
  295. IndexModel.Data.Add(model);
  296. }
  297. }
  298. return Strings.ObjectToJson(list);
  299. }
  300. /// <summary>
  301. /// 根据渠道获取项目索引
  302. /// </summary>
  303. /// <param name="ChannelId"></param>
  304. /// <returns></returns>
  305. public string GetChannelProjectIndexByCode( string ChannelId)
  306. {
  307. var dt = DB_ProService.GetChannelProjectIndexByCode( ChannelId);
  308. var dt2 = new DataTable();
  309. var check = string.Empty;
  310. List<IndexModel> list = new List<IndexModel>();
  311. IndexData model = null;
  312. var IndexModel = new IndexModel();
  313. if (dt != null && dt.Rows.Count > 0)
  314. {
  315. foreach (DataRow dr in dt.Rows)
  316. {
  317. var FirstName = dr.GetValueByName<string>("首字母");
  318. if (FirstName != check)
  319. {
  320. check = string.Empty;
  321. }
  322. if (check == string.Empty)
  323. {
  324. IndexModel = new IndexModel();
  325. IndexModel.Index = FirstName;
  326. IndexModel.Data = new List<IndexData>();
  327. list.Add(IndexModel);
  328. check = FirstName;
  329. }
  330. model = new IndexData();
  331. model.ID = dr.GetValueByName<string>("ID");
  332. model.Name = dr.GetValueByName<string>("名称");
  333. model.FirstName = dr.GetValueByName<string>("首字母");
  334. model.CodeName = dr.GetValueByName<string>("简码");
  335. IndexModel.Data.Add(model);
  336. }
  337. }
  338. return Strings.ObjectToJson(list);
  339. }
  340. #endregion
  341. #region 项目删除
  342. /// <summary>
  343. /// 根据项目ID删除项目
  344. /// </summary>
  345. /// <param name="id"></param>
  346. /// <returns></returns>
  347. public int Del_Project(string id)
  348. {
  349. return DB_ProService.Del_Project(id);
  350. }
  351. #endregion
  352. #region 添加机构
  353. /// <summary>
  354. /// 机构等级
  355. /// </summary>
  356. /// <returns></returns>
  357. public string GetLevel()
  358. {
  359. return DB_ProService.GetLevel().ToJson();
  360. }
  361. /// <summary>
  362. /// 添加机构
  363. /// </summary>
  364. /// <param name="model"></param>
  365. /// <param name="id"></param>
  366. /// <returns></returns>
  367. public int Add_Station(StationBusinessModel model)
  368. {
  369. return DB_ProService.Add_Station(model);
  370. }
  371. // <summary>
  372. /// 工作流分组目录
  373. /// </summary>
  374. /// <returns></returns>
  375. public string GetCatalog(string id)
  376. {
  377. return DB_ProService.GetCatalog(id).ToJson();
  378. }
  379. #endregion
  380. #region 修改机构
  381. public int SaveStation(StationBusinessModel model)
  382. {
  383. return DB_ProService.SaveStation(model);
  384. }
  385. public DataTable GetStationInfo(string id)
  386. {
  387. return DB_ProService.GetStationInfo(id);
  388. }
  389. #endregion
  390. #region 删除机构
  391. /// <summary>
  392. /// 根据机构D删除机构
  393. /// </summary>
  394. /// <param name="id"></param>
  395. /// <returns></returns>
  396. public int Del_Station(string id)
  397. {
  398. return DB_ProService.Del_Station(id);
  399. }
  400. #endregion
  401. #region 添加服务器
  402. /// <summary>
  403. /// 添加服务器
  404. /// </summary>
  405. /// <param name="model"></param>
  406. /// <param name="id"></param>
  407. /// <returns></returns>
  408. public int Add_Server(ServerBusinessModel model)
  409. {
  410. return DB_ProService.Add_Server(model);
  411. }
  412. /// <summary>
  413. /// 服务器类型
  414. /// </summary>
  415. /// <returns></returns>
  416. public string GetServerType()
  417. {
  418. return DB_ProService.GetServerType().ToJson();
  419. }
  420. /// <summary>
  421. /// 安装服务类型
  422. /// </summary>
  423. /// <returns></returns>
  424. public string GetInstallServerType()
  425. {
  426. return DB_ProService.GetInstallServerType().ToJson();
  427. }
  428. /// <summary>
  429. /// 数据库类型
  430. /// </summary>
  431. /// <returns></returns>
  432. public string GetDataBaseType()
  433. {
  434. return DB_ProService.GetDataBaseType().ToJson();
  435. }
  436. /// <summary>
  437. /// 预警类型
  438. /// </summary>
  439. /// <returns></returns>
  440. public string GetEarlyWarningType()
  441. {
  442. return DB_ProService.GetEarlyWarningType().ToJson();
  443. }
  444. /// <summary>
  445. /// 预警处理状态
  446. /// </summary>
  447. /// <returns></returns>
  448. public string GetWarningProcessingStatu()
  449. {
  450. return DB_ProService.GetWarningProcessingStatu().ToJson();
  451. }
  452. /// <summary>
  453. /// 项目监控状态
  454. /// </summary>
  455. /// <returns></returns>
  456. public string GetProjectMonitoringStatus()
  457. {
  458. return DB_ProService.GetProjectMonitoringStatus().ToJson();
  459. }
  460. /// <summary>
  461. /// 指标信息类型
  462. /// </summary>
  463. /// <returns></returns>
  464. public string GetIndicatorInformationType()
  465. {
  466. return DB_ProService.GetIndicatorInformationType().ToJson();
  467. }
  468. /// <summary>
  469. /// 指标信息状态
  470. /// </summary>
  471. /// <returns></returns>
  472. public string GetIndicatorInformationStatu()
  473. {
  474. return DB_ProService.GetIndicatorInformationStatu().ToJson();
  475. }
  476. /// <summary>
  477. /// 产品
  478. /// </summary>
  479. /// <returns></returns>
  480. public string GetProduct()
  481. {
  482. return DB_ProService.GetProduct().ToJson();
  483. }
  484. #endregion
  485. #region 修改服务器
  486. /// <summary>
  487. /// 根据id获取对应的服务器信息
  488. /// </summary>
  489. /// <param name="id"></param>
  490. /// <returns></returns>
  491. public DataTable GetServerInfo(string id)
  492. {
  493. return DB_ProService.GetServerInfo(id);
  494. }
  495. /// <summary>
  496. /// 修改服务器
  497. /// </summary>
  498. /// <param name="model"></param>
  499. /// <param name="id"></param>
  500. /// <returns></returns>
  501. public int UpdateServer(ServerBusinessModel model)
  502. {
  503. return DB_ProService.UpdateServer(model);
  504. }
  505. #endregion
  506. #region 服务器删除
  507. /// <summary>
  508. /// 根据服务器D删除服务器
  509. /// </summary>
  510. /// <param name="id"></param>
  511. /// <returns></returns>
  512. public int Del_Server(string id)
  513. {
  514. return DB_ProService.Del_Server(id);
  515. }
  516. #endregion
  517. #region 添加项目人员
  518. /// <summary>
  519. /// 根据渠道ID获取人员信息
  520. /// </summary>
  521. /// <returns></returns>
  522. public string GetWorkerInfo(string channelID)
  523. {
  524. return DB_ProService.GetWorkerInfo(channelID).ToJson();
  525. }
  526. public int Add_Worker(WorkerBusinessModel model)
  527. {
  528. return DB_ProService.Add_Worker(model);
  529. }
  530. #endregion
  531. #region 修改项目人员
  532. //根据人员ID获取人员信息
  533. public string GetWorkerInfoByID(string id)
  534. {
  535. return DB_ProService.GetWorkerInfoByID(id).ToJson();
  536. }
  537. public int UpdateWorker(string id)
  538. {
  539. return DB_ProService.UpdateWorker(id);
  540. }
  541. #endregion
  542. #region 添加产品
  543. /// <summary>
  544. /// 添加项目产品
  545. /// </summary>
  546. /// <param name="model"></param>
  547. /// <param name="id"></param>
  548. /// <returns></returns>
  549. public int Add_Product(ProductBusinessModel model)
  550. {
  551. return DB_ProService.Add_Product(model);
  552. }
  553. /// <summary>
  554. /// 根据项目ID获取产品
  555. /// </summary>
  556. /// <param name="ID"></param>
  557. /// <returns></returns>
  558. public string GetProductByID()
  559. {
  560. return DB_ProService.GetProductByID().ToJson();
  561. }
  562. /// <summary>
  563. /// 根据产品ID获取版本号
  564. /// </summary>
  565. /// <param name="id"></param>
  566. /// <returns></returns>
  567. public string GetEditionByID(string id)
  568. {
  569. return DB_ProService.GetEditionByID(id).ToJson();
  570. }
  571. #endregion
  572. #region 修改产品
  573. /// <summary>
  574. /// 更新项目产品
  575. /// </summary>
  576. /// <param name="model"></param>
  577. /// <param name="id"></param>
  578. /// <returns></returns>
  579. public int UpdateProduct(ProductBusinessModel model)
  580. {
  581. return DB_ProService.UpdateProduct(model);
  582. }
  583. /// <summary>
  584. /// 变更产品服务时间
  585. /// </summary>
  586. /// <param name="model"></param>
  587. /// <returns></returns>
  588. public int AdjustServiceTime(ProjectMainRecordsModel model)
  589. {
  590. return DB_ProService.AdjustServiceTime(model);
  591. }
  592. /// <summary>
  593. /// 修改产品服务时间
  594. /// </summary>
  595. /// <param name="model"></param>
  596. /// <returns></returns>
  597. public int UpdateAdjustServiceTime(ProjectMainRecordsModel model)
  598. {
  599. return DB_ProService.UpdateAdjustServiceTime(model);
  600. }
  601. /// <summary>
  602. /// 删除产品服务时间
  603. /// </summary>
  604. /// <param name="model"></param>
  605. /// <returns></returns>
  606. public int DeleteAdjustServiceTime(ProjectMainRecordsModel model)
  607. {
  608. return DB_ProService.DeleteAdjustServiceTime(model);
  609. }
  610. /// <summary>
  611. /// 查询单条记录
  612. /// </summary>
  613. /// <param name="ID"></param>
  614. /// <returns></returns>
  615. public string Get_SingleServiceRecord(string ID)
  616. {
  617. return DB_ProService.Get_SingleServiceRecord(ID).ToJson();
  618. }
  619. /// <summary>
  620. /// 根据产品ID获取服务时间
  621. /// </summary>
  622. /// <param name="QDID"></param>
  623. /// <param name="XMID"></param>
  624. /// <param name="CPID"></param>
  625. /// <returns></returns>
  626. public DataTable Get_ProductAdjustService(string QDID, string XMID, string CPID)
  627. {
  628. return DB_ProService.Get_ProductAdjustService( QDID, XMID, CPID);
  629. }
  630. public string GetProductInfo(string id)
  631. {
  632. return DB_ProService.GetProductInfo(id).ToJson();
  633. }
  634. /// <summary>
  635. /// 根据项目产品模块ID获取版本和说明
  636. /// </summary>
  637. /// <param name="id"></param>
  638. /// <returns></returns>
  639. public string GetProjectProducct(string id)
  640. {
  641. return DB_ProService.GetProjectProducct(id).ToJson();
  642. }
  643. #endregion
  644. #region 项目产品删除
  645. /// <summary>
  646. /// 根据项目产品ID删除项目产品
  647. /// </summary>
  648. /// <param name="id"></param>
  649. /// <returns></returns>
  650. public int Del_Product(string id)
  651. {
  652. return DB_ProService.Del_Product(id);
  653. }
  654. #endregion
  655. #region 批量添加
  656. public string ItemSiteBatch(string itemInfoId, string inputstr)
  657. {
  658. try
  659. {
  660. return DB_ProService.ItemSiteBatch(itemInfoId, inputstr);
  661. }
  662. catch (Exception ex)
  663. {
  664. Logger.Instance.Error("调用人员批量导入[ItemSite.ItemSiteBatch]时发生异常错误", ex);
  665. return "{\"code\":0,\"msg\":\"调用人员批量录入时发生异常错误,请查看日志!\"}";
  666. }
  667. }
  668. #endregion
  669. #region 附件
  670. public bool FileUpload(string projectId, string data, string name, string fileType, string indentifyID, string interfaceID)
  671. {
  672. return DB_ProService.FileUpload(projectId, data, name, fileType, indentifyID, interfaceID) != 0;
  673. }
  674. public DataTable GetAttachment(string id,string type)
  675. {
  676. return DB_ProService.GetAttachment(id,type);
  677. }
  678. public int Delete_Img(string id)
  679. {
  680. return DB_ProService.Delete_Img(id);
  681. }
  682. #endregion
  683. #region 远程方式
  684. public string BingRemote(string id)
  685. {
  686. return DB_ProService.BingRemote(id).ToJson();
  687. }
  688. public int Add_Remote(RemoteBusinessModel model)
  689. {
  690. return DB_ProService.Add_Remote(model);
  691. }
  692. public int Edit_Remote(RemoteBusinessModel model)
  693. {
  694. return DB_ProService.Edit_Remote(model);
  695. }
  696. public int Del_Remote(RemoteBusinessModel model)
  697. {
  698. return DB_ProService.Del_Remote(model);
  699. }
  700. #endregion
  701. #region 个性化修改
  702. public string BingIdentify(string id)
  703. {
  704. return DB_ProService.BingIdentify(id).ToJson();
  705. }
  706. public string GetDataById(string id)
  707. {
  708. return DB_ProService.GetDataById(id).ToJson();
  709. }
  710. public string Add_Identify(Identify_Model model)
  711. {
  712. return DB_ProService.Add_Identify(model);
  713. }
  714. public string Edit_Identify(Identify_Model model)
  715. {
  716. return DB_ProService.Edit_Identify(model);
  717. }
  718. public int Del_Identify(string id)
  719. {
  720. return DB_ProService.Del_Identify(id);
  721. }
  722. public int Giveup_Identify(string id)
  723. {
  724. return DB_ProService.Giveup_Identify(id);
  725. }
  726. /// <summary>
  727. /// 根据项目员信息
  728. /// </summary>
  729. /// <returns></returns>
  730. public string GetWorker(string porId)
  731. {
  732. return DB_ProService.GetWorker(porId).ToJson();
  733. }
  734. #endregion
  735. #region 验收仪器
  736. public int Add_instrument(CheckinstrumentBusinessModel model)
  737. {
  738. return DB_ProService.Add_instrument(model);
  739. }
  740. public int Del_instrument(string iD)
  741. {
  742. return DB_ProService.Del_instrument(iD);
  743. }
  744. public string Binginstrument(string id)
  745. {
  746. return DB_ProService.Binginstrument(id).ToJson() ;
  747. }
  748. #endregion
  749. #region 验收模块
  750. public int Add_modual(CheckModualBusinessModel model)
  751. {
  752. return DB_ProService.Add_modual(model);
  753. }
  754. public int Del_modual(string iD)
  755. {
  756. return DB_ProService.Del_modual(iD);
  757. }
  758. public string Bingmodual(string id)
  759. {
  760. return DB_ProService.Bingmodual(id).ToJson();
  761. }
  762. #endregion
  763. #region 接口信息
  764. public string BingInterface(GlobalInte req)
  765. {
  766. return DB_ProService.BingInterface(req).ToJson();
  767. }
  768. public int Add_Interface(InterfaceBusinessModel model, string Pid)
  769. {
  770. return DB_ProService.Add_Interface(model,Pid);
  771. }
  772. public int Del_Interface(string id)
  773. {
  774. return DB_ProService.Del_Interface(id);
  775. }
  776. public DataTable GetInterface(string id)
  777. {
  778. return DB_ProService.GetInterface(id);
  779. }
  780. public int Edit_Interface(InterfaceBusinessModel model)
  781. {
  782. return DB_ProService.Edit_Interface(model);
  783. }
  784. public string GetInteProcess(string id)
  785. {
  786. return DB_ProService.GetInteProcess(id).ToJson();
  787. }
  788. public int DealInte(InterfaceBusinessModel model,string id)
  789. {
  790. return DB_ProService.DealInte(model,id);
  791. }
  792. public string GetinfoBynature(int type)
  793. {
  794. return DB_ProService.GetinfoBynature(type).ToJson();
  795. }
  796. #endregion
  797. #region
  798. /// <summary>
  799. /// 迁移渠道项目【将机构变成项目】
  800. /// </summary>
  801. /// <param name="ProjectID"></param>
  802. /// <param name="SiteID"></param>
  803. /// <param name="user"></param>
  804. /// <param name="msg"></param>
  805. /// <returns></returns>
  806. public bool MigrationOrganization(string ProjectID, string SiteID, UserInfo user, out string msg)
  807. {
  808. return DB_ProService.MigrationOrganization(ProjectID, SiteID, user, out msg);
  809. }
  810. #endregion
  811. }
  812. }