v0002_alter_bigpartpurchase.sql 797 B

123456789101112131415161718192021
  1. ALTER TABLE `bigpartpurchase`
  2. ADD COLUMN `purchase_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '申购类型 0 无效 1 暂估 2 垫付',
  3. ADD COLUMN `funder_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '垫资人id';
  4. ALTER TABLE `bigpartuse` ADD COLUMN greenFodderNumber varchar(255) NOT NULL DEFAULT '' COMMENT '青贮单号';
  5. # SELECT * FROM apisql WHERE sqlname = 'insertBigPartUse'
  6. INSERT INTO bigpartuse (
  7. pastureId,
  8. departmentId,
  9. useForm,
  10. listType,
  11. applicatId,
  12. receiveTime,
  13. empId,
  14. useType,
  15. oddCode,
  16. note,
  17. greenFodderNumber
  18. ) VALUES ( ?,(select departmentId from bigpartapply where applyCode = ? ),?,?,?,?,?,?,?,?,?)
  19. # pastureId,oddCode,useForm,listType,applicatId,receiveTime,empId,useType,oddCode,note,greenFodderNumber