[关闭]
@Wahson 2018-07-11T14:20:29.000000Z 字数 3459 阅读 809

退货计划设计

工作 Today


http://10.10.10.12:8081/swagger/?type=10#!/dapeng/get_api_dapeng_rack_listStore

  1. alter table refund_plan_item
  2. drop column buying_price,
  3. drop column selling_price,
  4. drop column input_tax,
  5. drop column output_tax,
  6. drop column mark,
  7. drop column order_multiple,
  8. drop column sku_total_amount;
  9. alter table refund_plan
  10. drop column logistics_center,
  11. drop column amount;
  12. alter table refund_plan add column store_ids text comment '执行计划的门店财务店号,店号以逗号分隔';
  13. --
  14. create table store_refund_plan_rel(
  15. id bigint not null primary key comment '主键',
  16. store_id char(8) not null default '' comment '财务店号',
  17. refund_plan_id bigint not null default 0 comment '执行的退货计划id',
  18. status tinyint(3) not null default 1 comment '状态,10:待处理(to_be_handled);20:已处理(handled);30:已完结(finished)',
  19. refund_total_num int not null default 0 comment '退货总数',
  20. refund_total_amount decimal(16, 4) default 0 comment '退货总金额',
  21. created_at datetime not null comment '创建时间',
  22. created_by int not null comment '特指后台创建人(公司员工 id)',
  23. updated_at timestamp default CURRENT_TIMESTAMP not null comment '更新时间',
  24. updated_by int not null comment '特指后台更新人(公司员工 id)',
  25. remark varchar(255) not null default '' comment '备注',
  26. unique key store_refund_plan(store_id, refund_plan_id)
  27. ) comment '门店退货计划关联表' charset = utf8mb4;
  28. -- 门店填写退货计划
  29. update store_refund_plan_rel set
  30. status = 20,
  31. refund_total_amount = 100000,
  32. refund_total_num = 1000,
  33. updated_at = now(),
  34. updated_by = 1
  35. where id = 1000;
  36. -- 门店修改退货计划
  37. update store_refund_plan_rel set
  38. refund_total_amount = 100000,
  39. refund_total_num = 1000,
  40. updated_at = now(),
  41. updated_by = 1
  42. where id = 1000;
  43. -- 门店查询退货计划
  44. select rp.*,srpr.refund_total_num, srpr.refund_total_amount from store_refund_plan_rel srpr
  45. left join refund_plan rp on srpr.refund_plan_id = rp.id
  46. where srpr.store_id = 11712000;

1.增加AddStoreRefundPlanRelAction 6h 曹璐

2.门店查询

http://10.10.10.12:8081/swagger/?type=10#!/dapeng/get_api_dapeng_rack_listStore

2.退货计划接口调整 6h 曹璐

  1. CreateRefundRequest : 增加list<string> storeIds字段,删除logisticsCenter 字段
  2. CreateRefundPlanAction 数据入库调整
  3. AuditRefundPlanAction: 审核成功后,
  4. // 建议异步处理:
  5. refundPlan.storeIds.foreach { storeId =>
  6. new AddStoreRefundPlanRelAction(storeId, refundPlanId, status = 10)
  7. }

3.门店执行退货计划 8h 曹佳林

  1. ConfirmRefundPlanAction:
  2. 更新门店退货计划关联表信息
  3. updateStoreRefundPlanRel(
  4. storeId,
  5. refundPlanId,
  6. status = 20,
  7. refundTotalNum = 退货单.skuTotalNum,
  8. refundTotalAmount = 退货单.orderAmount,
  9. )
  10. /**
  11. update store_refund_plan_rel set
  12. status = 20,
  13. refund_order_id = 3455555,
  14. refund_total_amount = 100000,
  15. refund_total_num = 1000,
  16. updated_at = now(),
  17. updated_by = 1
  18. where store_id = 1000 and refund_plan_id = 23;
  19. */
  20. UpdateStoreRefundPlanAction:
  21. 更新门店退货计划关联表信息
  22. updateStoreRefundPlanRel(
  23. storeId,
  24. refundPlanId,
  25. refundTotalNum = 退货单.skuTotalNum,
  26. refundTotalAmount = 退货单.orderAmount,
  27. )
  28. /**
  29. update store_refund_plan_rel set
  30. refund_order_id = 3455555,
  31. refund_total_amount = 100000,
  32. refund_total_num = 1000,
  33. updated_at = now(),
  34. updated_by = 1
  35. where store_id = 1000 and refund_plan_id = 23;
  36. */

4.查询门店退货计划 6h 曹佳林

  1. TListStoreRefundPlanRequest {
  2. 1: optional i64 refundPlanCreatedAtStart
  3. 2: optional i64 refundPlanCreatedAtEnd,
  4. 3: optional i64 refundPlanStart,
  5. 3: optional i64 refundPlanEnd,
  6. 4: 分页
  7. }
  8. TListStoreRefundPlanResponse {
  9. 1: pageResponse
  10. 2: list<TStoreRefundPlan> storeRefundPlans
  11. }
  12. ListStoreRefundPlanAction
  13. select rp.*,srpr.refund_total_num, srpr.refund_total_amount from store_refund_plan_rel srpr
  14. left join refund_plan rp on srpr.refund_plan_id = rp.id
  15. where srpr.store_id = 11712000 and srpr.status = 状态;

转闭店方案: 下周三下班提交接口 张俊

  1. TSwitchStoreRequest {
  2. /**
  3. * 转出店财务店号
  4. **/
  5. 1: string fromStoreId,
  6. /**
  7. * 转入店财务店号
  8. **/
  9. 2: string toStoreId
  10. }
  11. void switchStore(1: TSwitchStoreRequest request)
  12. 涉及单据:
  13. 叫货单(待验收,部分验收) store_id, store_name
  14. 配送单(待配送,配送中) 修改字段 to_id,to_name, to_code
  15. 采购单(待确认,待发货,待门店收货,) store_id
  16. 出入库单 (待入库) to_id to_name
  17. update delivery_order set
  18. to_id = 新店号,
  19. to_code = 新店号,
  20. to_name = 新店名,
  21. remark = concat(ifnull(remark, '') , ' 发生转店:A店号 => B店号')
  22. where to_id = 老店号
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注