[关闭]
@Wahson 2019-11-25T15:55:58.000000Z 字数 3798 阅读 729

技术--工作周报(2019-11-17)

周报 Wanbo周报


上周回顾

  • 利润核算数据导出excel、折线图完成
  • 销售应收逾期明细表
  • 操作记录工具化完成,已记录订单领域所有操作
  • 其他调整,待上线
    • 资源采购单,已支付不能取消
    • 非资源采购单,支付记录继承调整
    • 交易员、采购员默认为取公司领用人
    • 审批前校验子单已绑定采购

用户访问量,本周成交8个线上订单,其中5个询盘,3个实盘

时间 访问人数(除内部员工)
11-11 22
11-12 17
11-13 23
11-14 11
11-15 11

下周计划

  • 询盘采购绑定流程优化,资源单绑定前可拆单 曹佳林 梁华生
  • F_Order_V1.5 测试上线 梁华生
  • F_Product_Offer_V1.0 测试上线 梁华生
  • 付款指令在线化
    • 采购单列表增加【申请付款】 曹佳林
    • 付款指令crud 曹佳林
    • 微信端付款确认 梁华生
  • 发票管理
    • crud 曹佳林
    • ui 梁华生
  • 流水认领增加批量自动匹配,审核提交功能
  • 库存管理
  • 逾期提醒,资金占用提醒 待定
  • 19年4季度、20年1季度开发计划
  1. use payment_db;
  2. create table invoice
  3. (
  4. id bigint auto_increment primary key,
  5. is_deleted smallint(1) default 0 comment '是否已删除',
  6. invoice_no varchar(12) not null comment '发票号码',
  7. type smallint(2) not null comment '发票类型invoiceType, 1:专用发票(special)',
  8. type_code varchar(12) not null comment '类别代码',
  9. classify smallint(2) not null comment '发票种类,1:进项发票(input_invoice);2:销项发票(output_invoice)',
  10. company_id bigint not null comment '公司id',
  11. company_name varchar(100) not null comment '公司名称',
  12. amount decimal(13, 2) not null comment '开票金额',
  13. amount_with_tax decimal(13, 2) not null comment '含税金额',
  14. attachment_id bigint not null comment '发票附件id',
  15. invoice_by int(5) null comment '开票人,进项发票时为null',
  16. invoice_at datetime null comment '开票时间,进项发票时为null',
  17. created_at timestamp default current_timestamp() not null,
  18. created_by int default 0 not null,
  19. updated_at timestamp default current_timestamp() not null on update current_timestamp(),
  20. updated_by int default 0 not null,
  21. remark varchar(128) null
  22. ) comment '发票' charset = utf8mb4 engine = innoDb;
  23. create table invoice_detail
  24. (
  25. id bigint auto_increment primary key,
  26. is_deleted smallint(1) default 0 comment '是否已删除',
  27. invoice_id bigint not null comment 'invoice.id',
  28. related_item_id bigint not null comment '关联子单id',
  29. weight decimal(8, 3) not null comment '开票数量',
  30. tax_rate decimal(5, 4) not null comment '税率',
  31. amount decimal(13, 2) not null comment '开票金额',
  32. created_at timestamp default current_timestamp() not null,
  33. created_by int default 0 not null,
  34. updated_at timestamp default current_timestamp() not null on update current_timestamp(),
  35. updated_by int default 0 not null,
  36. remark varchar(128) null,
  37. key ind_invoice(invoice_id),
  38. key idx_related_item(related_item_id)z
  39. ) comment '发票详情' charset = utf8mb4 engine = innoDb;
  40. -- 查询采购单已开票金额
  41. select sum(id.amount), id.related_item_id from invoice_detail id left join invoice i on id.invoice_id = i.id
  42. where i.classify = 1 and id.related_item_id in (1,2,3) and id.is_deleted = 0 group by id.related_item_id;
  43. -- 已付款金额
  44. select payed_amount,id from purchase_db.purchase_item where is_deleted = 0 and id in (1,2,3);
  45. -- 已开票金额 <= 已付款金额
  46. -- 查询销售单已开票金额
  47. select sum(id.amount), id.related_item_id from invoice_detail id left join invoice i on id.invoice_id = i.id
  48. where i.classify = 2 and id.related_item_id in (1,2,3) and id.is_deleted = 0 group by id.related_item_id;
  49. -- 已收款金额
  50. select payed_amount, id, purchase_item_id from order_db.order_item where id in (1,2,3);
  51. -- 已开票金额 <= 已收款金额
  52. -- 相互关联的 order_item_id purchase_item_id 对应的开票金额应 purchase_item_id的开票金额 <= order_item_id的开票金额
  53. -- 单张发票总额 <= 112000.00
  54. -- 可开票单据列表查询
  55. -- 部分付款、已付款,部分签收、已签收, 合同已回签
  56. select oi.* from order_db.order_item oi inner join order_db.order_contract oc using(order_id)
  57. where oi.payment_status in(20, 30) and oi.status in (50, 51) and oc.status = 30 and oc.created_at > '2019-11-01';
  58. alter table purchase_db.purchase_item
  59. add column invoice_status smallint(2) not null default 10 comment '开票状态,10:未开票(invoicing);20:部分开票(partial_invoicing);30:已开票(invoiced)' after payment_status;
  60. alter table purchase_db.purchase
  61. add column invoice_status smallint(2) not null default 10 comment '开票状态,10:未开票(invoicing);20:部分开票(partial_invoicing);30:已开票(invoiced)' after payment_status;
  62. alter table order_db.order_item
  63. add column invoice_status smallint(2) not null default 10 comment '开票状态,10:未开票(invoicing);20:部分开票(partial_invoicing);30:已开票(invoiced)' after payment_status;
  64. alter table order_db.`order`
  65. add column invoice_status smallint(2) not null default 10 comment '开票状态,10:未开票(invoicing);20:部分开票(partial_invoicing);30:已开票(invoiced)' after payment_status;
  1. 1. 查询可开票单据
  2. 2. 新建发票接口
  3. 3. 发票作废
  1. graph TD
  2. A(待确认) -->|总监确认| B(已确认)
  3. B --> C(已制单)
  4. C --> D(支付中)
  5. D --> F(已支付)
  6. A -->|采购撤销| G(已撤销)
  7. B -->|采购撤销| G(已撤销)
  8. C -->|采购撤销| G(已撤销)
  9. D -->|财务撤销| G(已撤销)
Created with Raphaël 2.1.2Start待确认已撤销End
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注