Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 2.81 KB | None | 0 0
  1. DELETE FROM t_task WHERE task_id BETWEEN 2000 AND 2088;
  2. DELETE FROM t_role_task;
  3.  
  4. INSERT INTO t_task(module_id, task_code, task_name, description, task_type, task_group,
  5.             create_datetime, create_user_id, update_datetime, update_user_id,
  6.             "version", active, active_datetime, non_active_datetime, always_allow)
  7.     VALUES 
  8. (100, 'MANAGE_ADMINISTRATION_POS', 'manageAdministrationPos', 'manage administration pos', 'POS', 'pos.admin', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  9. (100, 'DO_MONTHLY_PROCESS', 'doMonthlyProcess', 'do monthly process', 'POS', 'pos.admin', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  10. (100, 'INPUT_POS', 'inputPos', 'input pos', 'POS', 'pos.trx', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  11. (100, 'INQUIRY_POS', 'inquiryPos', 'inquiry pos', 'POS', 'pos.trx', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  12. (100, 'INPUT_GOODS_TRANSFER_IN', 'inputGoodsTransferIn', 'input goods transfer in', 'POS', 'pos.trx', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  13. (100, 'INPUT_GOODS_TRANSFER_OUT', 'inputGoodsTransferOut', 'input goods transfer out', 'POS', 'pos.trx', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  14. (100, 'UPDATE_DATA_MASTER', 'updateDataMaster', 'update data master', 'POS', 'pos.sync', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  15. (100, 'UPDATE_DATA_TRX', 'updateDataTrx', 'input pos', 'POS', 'pos.sync', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  16. (100, 'TRANSFER_DATA_TO_SERVER', 'transferDataToServer', 'transfer data to server', 'POS', 'pos.sync', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  17. (100, 'VIEW_REPORT_POS', 'viewReportPos', 'view report pos', 'POS', 'pos.report', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N'),
  18. (100, 'VOID_POS', 'voidPos', 'void pos', 'POS', 'pos.trx', '20130823110000',-1,'20130823110000',-1,0,'Y','20130823110000',' ','N');
  19.  
  20. INSERT INTO t_role_task (task_id, role_id,
  21.             create_datetime, create_user_id, update_datetime, update_user_id,
  22.             "version", active, active_datetime, non_active_datetime)
  23. SELECT A.task_id, B.role_id,
  24.        '20130823110000',-1,'20130823110000',-1,
  25.        0,'Y','20130823110000',' '
  26. FROM t_task A, t_role B
  27. WHERE B.role_type = 'ADMIN'
  28. AND A.task_type = 'POS';
  29.  
  30. INSERT INTO t_role_task (task_id, role_id,
  31.             create_datetime, create_user_id, update_datetime, update_user_id,
  32.             "version", active, active_datetime, non_active_datetime)
  33. SELECT A.task_id, B.role_id,
  34.        '20130823110000',-1,'20130823110000',-1,
  35.        0,'Y','20130823110000',' '
  36. FROM t_task A, t_role B
  37. WHERE B.role_type <> 'ADMIN'
  38. AND A.task_type = 'POS' AND A.task_group <> 'pos.admin';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement