三元财务API

archives.cs 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace CallCenterApi.BLL
  8. {
  9. public class archives
  10. {
  11. private readonly DAL.archives dal = new DAL.archives();
  12. /// <summary>
  13. /// 获取档案物资表数据信息
  14. /// </summary>
  15. /// <returns></returns>
  16. public DataSet GetList()
  17. {
  18. return dal.GetList();
  19. }
  20. /// <summary>
  21. /// 是否存在该记录
  22. /// </summary>
  23. public bool IfHave(int id)
  24. {
  25. return dal.IfHave(id);
  26. }
  27. /// <summary>
  28. /// 增加一条档案物资数据
  29. /// </summary>
  30. /// <param name="model"></param>
  31. /// <returns></returns>
  32. public int Add(CallCenterApi.Model.archives model)
  33. {
  34. return dal.Add(model);
  35. }
  36. /// <summary>
  37. /// 得到一个档案物资对象实体
  38. /// </summary>
  39. public CallCenterApi.Model.archives GetModel(int id)
  40. {
  41. return dal.GetModel(id);
  42. }
  43. /// <summary>
  44. /// 更新一条档案物资数据
  45. /// </summary>
  46. public bool Update(CallCenterApi.Model.archives model)
  47. {
  48. return dal.Update(model);
  49. }
  50. /// <summary>
  51. /// 删除一条档案物资数据
  52. /// </summary>
  53. public bool Delete(int id)
  54. {
  55. return dal.Delete(id);
  56. }
  57. /// <summary>
  58. /// 获取物资状态信息 用作可选的下拉框选项
  59. /// </summary>
  60. /// <returns></returns>
  61. public DataSet GetArchivestate()
  62. {
  63. return dal.GetArchivestate();
  64. }
  65. /// <summary>
  66. /// 增加物资状态数据
  67. /// </summary>
  68. /// <param name="model"></param>
  69. /// <returns></returns>
  70. public int Addarchivestate(CallCenterApi.Model.archivestate model)
  71. {
  72. return dal.Addarchivestate(model);
  73. }
  74. /// <summary>
  75. /// 删除一条物资状态信息
  76. /// </summary>
  77. /// <param name="id"></param>
  78. /// <returns></returns>
  79. public bool delarchivestate(int id)
  80. {
  81. return dal.delarchivestate(id);
  82. }
  83. /// <summary>
  84. /// 根据档案名称获取档案状态id
  85. /// </summary>
  86. /// <param name="statename"></param>
  87. /// <returns></returns>
  88. public int GetStateid(string statename)
  89. {
  90. return dal.GetStateid(statename);
  91. }
  92. /// <summary>
  93. /// 根据id 修改档案物资的状态
  94. /// </summary>
  95. /// <returns></returns>
  96. public bool updateState(int id, int stateid)
  97. {
  98. return dal.updateState(id,stateid);
  99. }
  100. /// <summary>
  101. /// 获取外部客户操作表信息
  102. /// </summary>
  103. /// <returns></returns>
  104. public DataSet GetCustomerBorrow()
  105. {
  106. return dal.GetCustomerBorrow();
  107. }
  108. /// <summary>
  109. /// 外部客户操作信息添加
  110. /// </summary>
  111. /// <returns></returns>
  112. public int AddCustomerBorrow(CallCenterApi.Model.customerBorrow model)
  113. {
  114. return dal.AddCustomerBorrow(model);
  115. }
  116. /// <summary>
  117. /// 获取客户操作表实体
  118. /// </summary>
  119. /// <param name="id"></param>
  120. /// <returns></returns>
  121. public CallCenterApi.Model.customerBorrow GetCustomerModel(int id)
  122. {
  123. return dal.GetCustomerModel(id);
  124. }
  125. /// <summary>
  126. /// 根据微信openid获取客户名称
  127. /// </summary>
  128. /// <param name="openid"></param>
  129. /// <returns></returns>
  130. public string GetCustomerName(string openid)
  131. {
  132. return dal.GetCustomerName(openid);
  133. }
  134. /// <summary>
  135. /// 修改客户操作信息
  136. /// </summary>
  137. /// <returns></returns>
  138. public bool UpCustomerBorrow(CallCenterApi.Model.customerBorrow model)
  139. {
  140. return dal.UpCustomerBorrow(model);
  141. }
  142. /// <summary>
  143. /// 删除一条客户操作信息
  144. /// </summary>
  145. /// <param name="id"></param>
  146. /// <returns></returns>
  147. public bool delCustomerBorrow(int id)
  148. {
  149. return dal.delCustomerBorrow(id);
  150. }
  151. /// <summary>
  152. /// 获取内部操作表信息
  153. /// </summary>
  154. /// <returns></returns>
  155. public DataSet GetinsideOperation()
  156. {
  157. return dal.GetinsideOperation();
  158. }
  159. /// <summary>
  160. /// 内部员工操作信息添加
  161. /// </summary>
  162. /// <returns></returns>
  163. public int AddinsideOperation(CallCenterApi.Model.insideOperation model)
  164. {
  165. return dal.AddinsideOperation(model);
  166. }
  167. /// <summary>
  168. /// 修改和互操作信息
  169. /// </summary>
  170. /// <returns></returns>
  171. public bool UpinsideOperation(CallCenterApi.Model.insideOperation model)
  172. {
  173. return dal.UpinsideOperation(model);
  174. }
  175. /// <summary>
  176. /// 获取内部员工操作表实体
  177. /// </summary>
  178. /// <param name="id"></param>
  179. /// <returns></returns>
  180. public CallCenterApi.Model.insideOperation GetinsideOperationModel(int id)
  181. {
  182. return dal.GetinsideOperationModel(id);
  183. }
  184. /// <summary>
  185. /// 删除一条内部员工操作信息
  186. /// </summary>
  187. /// <param name="id"></param>
  188. /// <returns></returns>
  189. public bool delinsideOperation(int id)
  190. {
  191. return dal.delinsideOperation(id);
  192. }
  193. /// <summary>
  194. /// 获取操作日志表信息
  195. /// </summary>
  196. /// <returns></returns>
  197. public DataSet GetOperationlog()
  198. {
  199. return dal.GetOperationlog();
  200. }
  201. /// <summary>
  202. /// 操作日志信息添加
  203. /// </summary>
  204. /// <returns></returns>
  205. public int AddOperationlog(CallCenterApi.Model.Operationlog model)
  206. {
  207. return dal.AddOperationlog(model);
  208. }
  209. /// <summary>
  210. /// 获得档案物资数据列表 导入部分
  211. /// </summary>
  212. public List<Model.archives> DataTableToList(DataTable dt)
  213. {
  214. List<Model.archives> modelList = new List<Model.archives>();
  215. int rowsCount = dt.Rows.Count;
  216. if (rowsCount > 0)
  217. {
  218. Model.archives model;
  219. for (int n = 0; n < rowsCount; n++)
  220. {
  221. model = dal.DataRowToModelarchives(dt.Rows[n]);
  222. if (model != null)
  223. {
  224. modelList.Add(model);
  225. }
  226. }
  227. }
  228. return modelList;
  229. }
  230. /// <summary>
  231. /// 获得物资状态数据列表 导入部分
  232. /// </summary>
  233. public List<Model.archivestate> DataTableToList1(DataTable dt)
  234. {
  235. List<Model.archivestate> modelList = new List<Model.archivestate>();
  236. int rowsCount = dt.Rows.Count;
  237. if (rowsCount > 0)
  238. {
  239. Model.archivestate model;
  240. for (int n = 0; n < rowsCount; n++)
  241. {
  242. model = dal.DataRowToModelarchives1(dt.Rows[n]);
  243. if (model != null)
  244. {
  245. modelList.Add(model);
  246. }
  247. }
  248. }
  249. return modelList;
  250. }
  251. /// <summary>
  252. /// 获得客户操作借阅归还数据列表
  253. /// </summary>
  254. public List<Model.customerBorrow> DataTableToListcustomerBorrow(DataTable dt)
  255. {
  256. List<Model.customerBorrow> modelList = new List<Model.customerBorrow>();
  257. int rowsCount = dt.Rows.Count;
  258. if (rowsCount > 0)
  259. {
  260. Model.customerBorrow model;
  261. for (int n = 0; n < rowsCount; n++)
  262. {
  263. model = dal.DataRowToModelcustomerBorrow(dt.Rows[n]);
  264. if (model != null)
  265. {
  266. modelList.Add(model);
  267. }
  268. }
  269. }
  270. return modelList;
  271. }
  272. /// <summary>
  273. /// 获得内部员工操作出入库数据列表 导入部分 分页部分
  274. /// </summary>
  275. public List<Model.insideOperation> DataTableToListinsideOperation(DataTable dt)
  276. {
  277. List<Model.insideOperation> modelList = new List<Model.insideOperation>();
  278. int rowsCount = dt.Rows.Count;
  279. if (rowsCount > 0)
  280. {
  281. Model.insideOperation model;
  282. for (int n = 0; n < rowsCount; n++)
  283. {
  284. model = dal.DataRowToModelinsideOperation(dt.Rows[n]);
  285. if (model != null)
  286. {
  287. modelList.Add(model);
  288. }
  289. }
  290. }
  291. return modelList;
  292. }
  293. /// <summary>
  294. /// 获得操作记录信息数据列表 导入部分
  295. /// </summary>
  296. public List<Model.Operationlog> DataTableToListOperationlog(DataTable dt)
  297. {
  298. List<Model.Operationlog> modelList = new List<Model.Operationlog>();
  299. int rowsCount = dt.Rows.Count;
  300. if (rowsCount > 0)
  301. {
  302. Model.Operationlog model;
  303. for (int n = 0; n < rowsCount; n++)
  304. {
  305. model = dal.DataRowToModelOperationlog(dt.Rows[n]);
  306. if (model != null)
  307. {
  308. modelList.Add(model);
  309. }
  310. }
  311. }
  312. return modelList;
  313. }
  314. }
  315. }