bill-produce-excel.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. package api
  2. import (
  3. "box-cost/db/model"
  4. "fmt"
  5. "math"
  6. "github.com/xuri/excelize/v2"
  7. )
  8. type ProduceBillExcel struct {
  9. Offset int
  10. Row int
  11. Title string //标题
  12. Excel *excelize.File
  13. SheetName string
  14. AlignCenterStyle int
  15. Content *model.ProduceBill
  16. Signatures []*model.Signature
  17. IsPdf string
  18. }
  19. func (b *ProduceBillExcel) drawTitle() error {
  20. b.Row++
  21. //是打印
  22. startCell := fmt.Sprintf("A%d", b.Row)
  23. marginLeft := excelize.PageMarginLeft(0.1)
  24. endCell := fmt.Sprintf("K%d", b.Row)
  25. if b.Content.IsPrint {
  26. b.Excel.SetColWidth(b.SheetName, "A", "A", 15)
  27. b.Excel.SetColWidth(b.SheetName, "B", "C", 14)
  28. b.Excel.SetColWidth(b.SheetName, "D", "E", 9)
  29. b.Excel.SetColWidth(b.SheetName, "F", "F", 8)
  30. b.Excel.SetColWidth(b.SheetName, "G", "G", 6.5)
  31. b.Excel.SetColWidth(b.SheetName, "H", "I", 9)
  32. b.Excel.SetColWidth(b.SheetName, "J", "J", 10)
  33. b.Excel.SetColWidth(b.SheetName, "K", "K", 14)
  34. } else {
  35. // 不是打印
  36. endCell = fmt.Sprintf("H%d", b.Row)
  37. marginLeft = excelize.PageMarginLeft(0.6)
  38. b.Excel.SetColWidth(b.SheetName, "A", "B", 17)
  39. b.Excel.SetColWidth(b.SheetName, "C", "C", 12)
  40. b.Excel.SetColWidth(b.SheetName, "D", "D", 6)
  41. b.Excel.SetColWidth(b.SheetName, "E", "G", 12)
  42. b.Excel.SetColWidth(b.SheetName, "H", "H", 20)
  43. // 是覆膜
  44. if b.Content.IsLam {
  45. endCell = fmt.Sprintf("I%d", b.Row)
  46. marginLeft = excelize.PageMarginLeft(0.3)
  47. b.Excel.SetColWidth(b.SheetName, "A", "A", 16)
  48. b.Excel.SetColWidth(b.SheetName, "B", "C", 14)
  49. // 覆膜规格
  50. // b.Excel.SetColWidth(b.SheetName, "C", "C", 16)
  51. b.Excel.SetColWidth(b.SheetName, "D", "D", 10)
  52. b.Excel.SetColWidth(b.SheetName, "E", "F", 12)
  53. b.Excel.SetColWidth(b.SheetName, "G", "H", 10)
  54. b.Excel.SetColWidth(b.SheetName, "I", "I", 14)
  55. }
  56. }
  57. b.Excel.SetPageMargins(b.SheetName, marginLeft)
  58. err := b.Excel.MergeCell(b.SheetName, startCell, endCell)
  59. if err != nil {
  60. return err
  61. }
  62. style, err := b.Excel.NewStyle(&excelize.Style{
  63. Alignment: &excelize.Alignment{Horizontal: "center", Vertical: "center"},
  64. Font: &excelize.Font{Bold: true, Size: 18}})
  65. if err != nil {
  66. return err
  67. }
  68. err = b.Excel.SetCellStyle(b.SheetName, startCell, startCell, style)
  69. if err != nil {
  70. return err
  71. }
  72. b.Excel.SetRowHeight(b.SheetName, b.Row, 23)
  73. b.Excel.SetCellValue(b.SheetName, startCell, b.Title)
  74. return nil
  75. }
  76. func (b *ProduceBillExcel) drawSubTitles() error {
  77. b.Row++
  78. styleLeft, err := b.Excel.NewStyle(&excelize.Style{
  79. Alignment: &excelize.Alignment{Horizontal: "left", Vertical: "center"},
  80. Font: &excelize.Font{Size: 11}})
  81. if err != nil {
  82. return err
  83. }
  84. styleRight, err := b.Excel.NewStyle(&excelize.Style{
  85. Alignment: &excelize.Alignment{Horizontal: "right", Vertical: "center"},
  86. Font: &excelize.Font{Size: 11}})
  87. if err != nil {
  88. return err
  89. }
  90. drawLeft := func(rowIndex int, value string) error {
  91. //左边1
  92. left1Cell := fmt.Sprintf("A%d", rowIndex)
  93. err = b.Excel.MergeCell(b.SheetName, left1Cell, fmt.Sprintf("H%d", rowIndex))
  94. if err != nil {
  95. return err
  96. }
  97. err = b.Excel.SetCellStyle(b.SheetName, left1Cell, left1Cell, styleLeft)
  98. if err != nil {
  99. return err
  100. }
  101. b.Excel.SetCellValue(b.SheetName, left1Cell, value)
  102. return nil
  103. }
  104. drawRight := func(rowIndex int, value string) error {
  105. right1Cell := fmt.Sprintf("I%d", rowIndex)
  106. err = b.Excel.MergeCell(b.SheetName, right1Cell, fmt.Sprintf("K%d", rowIndex))
  107. if err != nil {
  108. return err
  109. }
  110. err = b.Excel.SetCellStyle(b.SheetName, right1Cell, right1Cell, styleRight)
  111. if err != nil {
  112. return err
  113. }
  114. b.Excel.SetCellValue(b.SheetName, right1Cell, value)
  115. return nil
  116. }
  117. if !b.Content.IsPrint {
  118. drawLeft = func(rowIndex int, value string) error {
  119. //左边1
  120. left1Cell := fmt.Sprintf("A%d", rowIndex)
  121. err = b.Excel.MergeCell(b.SheetName, left1Cell, fmt.Sprintf("F%d", rowIndex))
  122. if err != nil {
  123. return err
  124. }
  125. err = b.Excel.SetCellStyle(b.SheetName, left1Cell, left1Cell, styleLeft)
  126. if err != nil {
  127. return err
  128. }
  129. b.Excel.SetCellValue(b.SheetName, left1Cell, value)
  130. return nil
  131. }
  132. drawRight = func(rowIndex int, value string) error {
  133. right1Cell := fmt.Sprintf("G%d", rowIndex)
  134. err = b.Excel.MergeCell(b.SheetName, right1Cell, fmt.Sprintf("H%d", rowIndex))
  135. if err != nil {
  136. return err
  137. }
  138. err = b.Excel.SetCellStyle(b.SheetName, right1Cell, right1Cell, styleRight)
  139. if err != nil {
  140. return err
  141. }
  142. b.Excel.SetCellValue(b.SheetName, right1Cell, value)
  143. return nil
  144. }
  145. if b.Content.IsLam {
  146. drawLeft = func(rowIndex int, value string) error {
  147. //左边1
  148. left1Cell := fmt.Sprintf("A%d", rowIndex)
  149. err = b.Excel.MergeCell(b.SheetName, left1Cell, fmt.Sprintf("F%d", rowIndex))
  150. if err != nil {
  151. return err
  152. }
  153. err = b.Excel.SetCellStyle(b.SheetName, left1Cell, left1Cell, styleLeft)
  154. if err != nil {
  155. return err
  156. }
  157. b.Excel.SetCellValue(b.SheetName, left1Cell, value)
  158. return nil
  159. }
  160. drawRight = func(rowIndex int, value string) error {
  161. right1Cell := fmt.Sprintf("G%d", rowIndex)
  162. err = b.Excel.MergeCell(b.SheetName, right1Cell, fmt.Sprintf("I%d", rowIndex))
  163. if err != nil {
  164. return err
  165. }
  166. err = b.Excel.SetCellStyle(b.SheetName, right1Cell, right1Cell, styleRight)
  167. if err != nil {
  168. return err
  169. }
  170. b.Excel.SetCellValue(b.SheetName, right1Cell, value)
  171. return nil
  172. }
  173. }
  174. }
  175. //第一行
  176. drawLeft(b.Row, "类别:"+b.Content.Type)
  177. drawRight(b.Row, "单号:"+b.Content.SerialNumber)
  178. b.Excel.SetRowHeight(b.SheetName, b.Row, 21)
  179. //第二行
  180. drawLeft(b.Row+1, "供应商名称:"+b.Content.Supplier)
  181. timeformat := b.Content.CreateTime.Local().Format("2006年01月02号 15:04:05")
  182. drawRight(b.Row+1, "下单时间:"+timeformat)
  183. b.Excel.SetRowHeight(b.SheetName, b.Row+1, 21)
  184. //第三行
  185. drawLeft(b.Row+2, "产品名称:"+b.Content.ProductName)
  186. status := ""
  187. if b.Content.Status == "complete" {
  188. status = "已完成"
  189. }
  190. if b.Content.Status == "created" {
  191. status = "进行中"
  192. }
  193. drawRight(b.Row+2, "状态:"+status)
  194. b.Excel.SetRowHeight(b.SheetName, b.Row+2, 21)
  195. return nil
  196. }
  197. func (b *ProduceBillExcel) drawTableTitle() error {
  198. b.Row += 3
  199. var drawCol = func(prefix string, value string) error {
  200. left1Cell := fmt.Sprintf("%s%d", prefix, b.Row)
  201. left2Cell := fmt.Sprintf("%s%d", prefix, b.Row+1)
  202. err := b.Excel.MergeCell(b.SheetName, left1Cell, left2Cell)
  203. if err != nil {
  204. return err
  205. }
  206. err = b.Excel.SetCellStyle(b.SheetName, left1Cell, left2Cell, b.AlignCenterStyle)
  207. if err != nil {
  208. return err
  209. }
  210. return b.Excel.SetCellValue(b.SheetName, left1Cell, value)
  211. }
  212. // var drawCol2 = func(prefix string, value1 string, value2 string) error {
  213. // left1Cell := fmt.Sprintf("%s%d", prefix, b.Row)
  214. // left2Cell := fmt.Sprintf("%s%d", prefix, b.Row+1)
  215. // err := b.Excel.SetCellStyle(b.SheetName, left1Cell, left2Cell, b.AlignCenterStyle)
  216. // if err != nil {
  217. // return err
  218. // }
  219. // b.Excel.SetCellValue(b.SheetName, left1Cell, value1)
  220. // b.Excel.SetCellValue(b.SheetName, left2Cell, value2)
  221. // return nil
  222. // }
  223. var drawCol3 = func(prefix1 string, prefix2 string, value1 string, value2 string, value3 string) error {
  224. left1Cell := fmt.Sprintf("%s%d", prefix1, b.Row)
  225. left2Cell := fmt.Sprintf("%s%d", prefix2, b.Row)
  226. err := b.Excel.MergeCell(b.SheetName, left1Cell, left2Cell)
  227. if err != nil {
  228. return err
  229. }
  230. if err != nil {
  231. fmt.Println(err)
  232. return err
  233. }
  234. err = b.Excel.SetCellStyle(b.SheetName, left1Cell, left2Cell, b.AlignCenterStyle)
  235. if err != nil {
  236. return err
  237. }
  238. b.Excel.SetCellValue(b.SheetName, left1Cell, value1)
  239. val2Cel := fmt.Sprintf("%s%d", prefix1, b.Row+1)
  240. b.Excel.SetCellStyle(b.SheetName, val2Cel, val2Cel, b.AlignCenterStyle)
  241. b.Excel.SetCellValue(b.SheetName, val2Cel, value2)
  242. val3Cel := fmt.Sprintf("%s%d", prefix2, b.Row+1)
  243. b.Excel.SetCellStyle(b.SheetName, val3Cel, val3Cel, b.AlignCenterStyle)
  244. b.Excel.SetCellValue(b.SheetName, val3Cel, value3)
  245. return nil
  246. }
  247. unit := b.Content.Produces[0].Unit
  248. if b.Content.IsPrint {
  249. drawCol("A", "加工项目")
  250. drawCol("B", "规格")
  251. drawCol("C", "纸张")
  252. drawCol("D", "来纸尺寸")
  253. drawCol("E", "印刷尺寸")
  254. drawCol("F", "下单数量")
  255. drawCol("G", "单位")
  256. drawCol("H", "单价")
  257. drawCol("I", "预算金额")
  258. drawCol("J", "交货时间")
  259. drawCol("K", "备注")
  260. } else {
  261. if b.Content.IsLam {
  262. drawCol("A", "加工项目")
  263. drawCol("B", "规格")
  264. drawCol("C", "覆膜尺寸")
  265. drawCol("D", "下单数量")
  266. unit2 := b.Content.Produces[0].Unit2
  267. drawCol3("E", "F", "单价", unit, unit2)
  268. drawCol("G", "预算金额")
  269. drawCol("H", "交货时间")
  270. drawCol("I", "备注")
  271. } else {
  272. drawCol("A", "加工项目")
  273. drawCol("B", "规格")
  274. drawCol("C", "下单数量")
  275. drawCol("D", "单位")
  276. drawCol("E", "单价")
  277. drawCol("F", "预算金额")
  278. drawCol("G", "交货时间")
  279. drawCol("H", "备注")
  280. }
  281. }
  282. return nil
  283. }
  284. func (b *ProduceBillExcel) drawTableContent() error {
  285. b.Row += 2
  286. var DrawRow = func(rowIndex int, values ...string) {
  287. charas := []string{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"}
  288. if !b.Content.IsPrint {
  289. charas = []string{"A", "B", "C", "D", "E", "F", "G", "H"}
  290. if b.Content.IsLam {
  291. charas = []string{"A", "B", "C", "D", "E", "F", "G", "H", "I"}
  292. }
  293. }
  294. // }
  295. for i, c := range charas {
  296. v := ""
  297. if i < len(values) {
  298. v = values[i]
  299. }
  300. b.Excel.SetCellValue(b.SheetName, fmt.Sprintf("%s%d", c, rowIndex), v)
  301. val2Cel := fmt.Sprintf("%s%d", c, rowIndex)
  302. b.Excel.SetCellStyle(b.SheetName, val2Cel, val2Cel, b.AlignCenterStyle)
  303. var magN float64 = 1
  304. lenv := len([]rune(v))
  305. magN = math.Ceil(float64(lenv) / 10)
  306. // if lenv%10 > 5 {
  307. // magN = math.Ceil(float64(lenv) / 10)
  308. // } else {
  309. // n := math.Floor(float64(lenv) / 10)
  310. // if n > 0 {
  311. // magN = n
  312. // }
  313. // }
  314. b.Excel.SetRowHeight(b.SheetName, rowIndex, 21*magN)
  315. }
  316. }
  317. produces := b.Content.Produces
  318. if len(produces) > 0 {
  319. for _, produce := range produces {
  320. realCount := ""
  321. price := produce.OrderPrice
  322. priceStr := fmt.Sprintf("%.3f", price)
  323. b.FormatToEmpty(&priceStr)
  324. // 预算金额
  325. budgetAmount := fmt.Sprintf("%.3f", produce.OrderPrice*float64(produce.OrderCount))
  326. b.FormatToEmpty(&budgetAmount)
  327. // 实际金额
  328. realPrice := ""
  329. // 实际完成数
  330. realCount = fmt.Sprintf("%d", produce.ConfirmCount)
  331. b.FormatToEmpty(&realCount)
  332. realPrice = fmt.Sprintf("%.3f", produce.OrderPrice*float64(produce.ConfirmCount))
  333. b.FormatToEmpty(&realPrice)
  334. deliveryTime := produce.DeliveryTime.Local().Format("2006-01-02")
  335. if b.Content.IsPrint {
  336. DrawRow(b.Row, produce.Name, produce.Norm, produce.Paper, produce.PaperSize, produce.PrintSize, fmt.Sprintf("%d", produce.OrderCount), produce.Unit, priceStr, budgetAmount, deliveryTime, produce.Remark)
  337. } else {
  338. // 覆膜
  339. if b.Content.IsLam {
  340. DrawRow(b.Row, produce.Name, produce.Norm, produce.PrintSize, fmt.Sprintf("%d", produce.OrderCount), priceStr, fmt.Sprintf("%.3f", produce.Price2), budgetAmount, deliveryTime, produce.Remark)
  341. } else {
  342. DrawRow(b.Row, produce.Name, produce.Norm, fmt.Sprintf("%d", produce.OrderCount), produce.Unit, priceStr, budgetAmount, deliveryTime, produce.Remark)
  343. }
  344. }
  345. b.Row++
  346. }
  347. }
  348. return nil
  349. }
  350. func (b *ProduceBillExcel) drawTableFooter() error {
  351. border := []excelize.Border{
  352. {Type: "top", Style: 1, Color: "000000"},
  353. {Type: "left", Style: 1, Color: "000000"},
  354. {Type: "right", Style: 1, Color: "000000"},
  355. {Type: "bottom", Style: 1, Color: "000000"},
  356. }
  357. styleLeft, _ := b.Excel.NewStyle(&excelize.Style{
  358. Alignment: &excelize.Alignment{Horizontal: "left", Vertical: "center"},
  359. Border: border,
  360. })
  361. sendToStartCell := fmt.Sprintf("A%d", b.Row)
  362. sendToEndCell := fmt.Sprintf("H%d", b.Row)
  363. supplierStartCell := fmt.Sprintf("I%d", b.Row)
  364. supplierEndCell := fmt.Sprintf("K%d", b.Row)
  365. if !b.Content.IsPrint {
  366. sendToEndCell = fmt.Sprintf("E%d", b.Row)
  367. supplierStartCell = fmt.Sprintf("F%d", b.Row)
  368. supplierEndCell = fmt.Sprintf("H%d", b.Row)
  369. if b.Content.IsLam {
  370. sendToEndCell = fmt.Sprintf("F%d", b.Row)
  371. supplierStartCell = fmt.Sprintf("G%d", b.Row)
  372. supplierEndCell = fmt.Sprintf("I%d", b.Row)
  373. }
  374. }
  375. b.Excel.MergeCell(b.SheetName, sendToStartCell, sendToEndCell)
  376. b.Excel.SetCellStyle(b.SheetName, sendToStartCell, sendToEndCell, styleLeft)
  377. b.Excel.SetCellValue(b.SheetName, sendToStartCell, "送货地址:"+b.Content.SendTo)
  378. b.Excel.MergeCell(b.SheetName, supplierStartCell, supplierEndCell)
  379. b.Excel.SetCellStyle(b.SheetName, supplierStartCell, supplierEndCell, styleLeft)
  380. b.Excel.SetCellValue(b.SheetName, supplierStartCell, "供应商签字:")
  381. b.Excel.SetRowHeight(b.SheetName, b.Row, 21)
  382. return nil
  383. }
  384. func (b *ProduceBillExcel) drawTableSignature() error {
  385. b.Row += 2
  386. style1, _ := b.Excel.NewStyle(&excelize.Style{
  387. Alignment: &excelize.Alignment{Horizontal: "center", Vertical: "center"},
  388. // Border: border,
  389. })
  390. // 制单人
  391. billUserCellS := fmt.Sprintf("A%d", b.Row+1)
  392. billUserCellE := fmt.Sprintf("B%d", b.Row+1)
  393. b.Excel.MergeCell(b.SheetName, billUserCellS, billUserCellE)
  394. b.Excel.SetCellValue(b.SheetName, billUserCellS, "制单人:"+b.Content.UserName)
  395. fontNum := "F"
  396. image1s := "G"
  397. image2s := "J"
  398. image1e := "I"
  399. image2e := "K"
  400. if !b.Content.IsPrint {
  401. fontNum = "E"
  402. image1s = "F"
  403. image2s = "H"
  404. image1e = "G"
  405. image2e = "H"
  406. if b.Content.IsLam {
  407. fontNum = "E"
  408. image1s = "F"
  409. image2s = "H"
  410. image1e = "G"
  411. image2e = "I"
  412. }
  413. }
  414. fontCell := fmt.Sprintf("%s%d", fontNum, b.Row)
  415. fontEndCell := fmt.Sprintf("%s%d", fontNum, b.Row+2)
  416. imageCell1 := fmt.Sprintf("%s%d", image1s, b.Row)
  417. imageEndCell1 := fmt.Sprintf("%s%d", image1e, b.Row+2)
  418. imageCell2 := fmt.Sprintf("%s%d", image2s, b.Row)
  419. imageEndCell2 := fmt.Sprintf("%s%d", image2e, b.Row+2)
  420. b.Excel.MergeCell(b.SheetName, fontCell, fontEndCell)
  421. b.Excel.SetCellStyle(b.SheetName, fontCell, fontCell, style1)
  422. b.Excel.SetCellValue(b.SheetName, fontCell, "审核签字:")
  423. // 签字图片1 I10-J12
  424. b.Excel.MergeCell(b.SheetName, imageCell1, imageEndCell1)
  425. b.Excel.SetCellStyle(b.SheetName, imageCell1, imageCell1, style1)
  426. b.Excel.SetCellValue(b.SheetName, imageCell1, "")
  427. // 签字图片2 K10-L12
  428. b.Excel.MergeCell(b.SheetName, imageCell2, imageEndCell2)
  429. b.Excel.SetCellStyle(b.SheetName, imageCell2, imageCell1, style1)
  430. b.Excel.SetCellValue(b.SheetName, imageCell2, "")
  431. // 状态为已审核时,签字
  432. if b.Content.Reviewed == 1 {
  433. imageCells := []string{imageCell1, imageCell2}
  434. if len(b.Signatures) > 0 {
  435. for k, sign := range b.Signatures {
  436. b.Excel.AddPicture(b.SheetName, imageCells[k], sign.Path, sign.Format)
  437. }
  438. }
  439. }
  440. b.Excel.SetRowHeight(b.SheetName, b.Row, 21)
  441. return nil
  442. }
  443. func (b *ProduceBillExcel) Draws() {
  444. b.drawTitle()
  445. b.drawSubTitles()
  446. b.drawTableTitle()
  447. b.drawTableContent()
  448. b.drawTableFooter()
  449. b.drawTableSignature()
  450. }
  451. func NewProduceBill(f *excelize.File) *ProduceBillExcel {
  452. border := []excelize.Border{
  453. {Type: "top", Style: 1, Color: "000000"},
  454. {Type: "left", Style: 1, Color: "000000"},
  455. {Type: "right", Style: 1, Color: "000000"},
  456. {Type: "bottom", Style: 1, Color: "000000"},
  457. }
  458. styleLeft, _ := f.NewStyle(&excelize.Style{
  459. Alignment: &excelize.Alignment{Horizontal: "center", Vertical: "center", WrapText: true},
  460. Border: border,
  461. })
  462. b := &ProduceBillExcel{
  463. Title: "中鱼互动加工单",
  464. SheetName: "Sheet1",
  465. Excel: f,
  466. Offset: 0,
  467. AlignCenterStyle: styleLeft,
  468. Signatures: make([]*model.Signature, 0),
  469. }
  470. f.SetPageMargins(b.SheetName, excelize.PageMarginTop(0), excelize.PageMarginLeft(0), excelize.PageMarginRight(0))
  471. return b
  472. }
  473. func (b *ProduceBillExcel) FormatToEmpty(str *string) {
  474. if *str == "0" || *str == "0.000" {
  475. *str = ""
  476. }
  477. }
  478. func (b *ProduceBillExcel) SetContent(content interface{}) {
  479. b.Content = content.(*model.ProduceBill)
  480. }
  481. func (b *ProduceBillExcel) SetTitle(title string) {
  482. b.Title = title
  483. }
  484. func (b *ProduceBillExcel) SetRow(row int) {
  485. b.Row = row
  486. }
  487. func (b *ProduceBillExcel) SetIsPdf(isPdf string) {
  488. b.IsPdf = isPdf
  489. }
  490. func (b *ProduceBillExcel) GetRow() int {
  491. return b.Row
  492. }
  493. func (b *ProduceBillExcel) SetSignatures(sign interface{}) {
  494. b.Signatures = sign.([]*model.Signature)
  495. }