CodeService.groovy
上传用户:steveyhw
上传日期:2019-05-13
资源大小:307k
文件大小:7k
- class CodeService {
- boolean transactional = true
- def serviceMethod() {
- }
- private void initCodes(){
- initSex()
- initApplicatType()
- initPositionType()
- initPermitType()
- initClanType()
- initEducationType()
- initProfessionType()
- initWorkstate()
- initHealthState()
- initCustomerType()
- initStaffType()
- initDepartment()
- initPosition()
- initContratType()
- initContratState()
- initSignType()
- initProductType()
- initPowerLevel()
- }
- private void initSex() {
- def ck = new Ckind(ckiName:'性别',ckiFlag:'SexType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'保密',codValue1:'',codValue2:'',codValue3:'',codValue4:''))
- ck.addToCodes(new Code(codName:'F'))
- ck.addToCodes(new Code(codName:'M'))
- ck.save()
- }
- private void initApplicatType() {
- def ck = new Ckind(ckiName:'申请类别',ckiFlag:'ApplicatType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'申请离职'))
- ck.addToCodes(new Code(codName:'申请职位'))
- ck.addToCodes(new Code(codName:'申请调职'))
- ck.save(flush:true)
- ck.addToCodes(new Code(codName:'车费申请'))
- ck.addToCodes(new Code(codName:'公干费用申请'))
- ck.addToCodes(new Code(codName:'其他申请'))
- ck.addToCodes(new Code(codName:'其他费用申请'))
- ck.save(flush:true)
- }
- private void initPositionType() {
- def ck = new Ckind(ckiName:'岗位',ckiFlag:'PositionType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'普通员工'))
- ck.addToCodes(new Code(codName:'SALE MAN'))
- ck.addToCodes(new Code(codName:'人事经理'))
- ck.addToCodes(new Code(codName:'项目经理'))
- ck.addToCodes(new Code(codName:'SALE MAN'))
- ck.addToCodes(new Code(codName:'SALE MAN'))
- ck.save()
-
- }
- private void initPermitType() {
- def ck = new Ckind(ckiName:'审核状态',ckiFlag:'PermitState',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'等待审核',codValue1:'waitCheck'))
- ck.addToCodes(new Code(codName:'审核通过',codValue1:'checkSuccess'))
- ck.addToCodes(new Code(codName:'审核失败',codValue1:'checkFailure'))
- ck.save()
- }
- private void initClanType() {
- def ck = new Ckind(ckiName:'名族',ckiFlag:'ClanType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'汉族'))
- ck.addToCodes(new Code(codName:'苗族'))
- ck.addToCodes(new Code(codName:'藏族'))
- ck.save()
- }
- private void initEducationType() {
- def ck = new Ckind(ckiName:'学历',ckiFlag:'EducationType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'初中'))
- ck.addToCodes(new Code(codName:'高中'))
- ck.addToCodes(new Code(codName:'中专'))
- ck.addToCodes(new Code(codName:'大专'))
- ck.addToCodes(new Code(codName:'本科'))
- ck.addToCodes(new Code(codName:'本科2'))
- ck.addToCodes(new Code(codName:'硕士'))
- ck.addToCodes(new Code(codName:'博士'))
- ck.save()
- }
- private void initProfessionType() {
- def ck = new Ckind(ckiName:'职业',ckiFlag:'ProfessionType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'学生'))
- ck.addToCodes(new Code(codName:'教师'))
- ck.addToCodes(new Code(codName:'商人'))
- ck.addToCodes(new Code(codName:'军人'))
- ck.addToCodes(new Code(codName:'农民'))
- ck.save()
- }
- private void initWorkstate() {
- def ck = new Ckind(ckiName:'在职状态',ckiFlag:'Workstate',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'空闲在家'))
- ck.addToCodes(new Code(codName:'在职'))
- ck.addToCodes(new Code(codName:'离职'))
- ck.save()
- }
- private void initHealthState() {
- def ck = new Ckind(ckiName:'健康状况',ckiFlag:'HealthState',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'BAD'))
- ck.addToCodes(new Code(codName:'一般'))
- ck.addToCodes(new Code(codName:'良好'))
- ck.save()
- }
- private void initCustomerType() {
- def ck = new Ckind(ckiName:'客户类型',ckiFlag:'CustomerType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'一般客户'))
- ck.addToCodes(new Code(codName:'常来客户'))
- ck.addToCodes(new Code(codName:'重要客户'))
- ck.addToCodes(new Code(codName:'高级客户'))
- ck.save()
- }
- private void initStaffType() {
- def ck = new Ckind(ckiName:'员工类型',ckiFlag:'StaffType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'普通员工'))
- ck.addToCodes(new Code(codName:'NEW MAN'))
- ck.addToCodes(new Code(codName:'OLD MAN'))
- ck.save()
- }
- private void initDepartment() {
- def ck = new Ckind(ckiName:'部门',ckiFlag:'Department',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'HR'))
- ck.addToCodes(new Code(codName:'RD'))
- ck.addToCodes(new Code(codName:'OFFICE'))
- ck.save()
- }
- private void initPosition() {
- def ck = new Ckind(ckiName:'职位',ckiFlag:'Position',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'组长'))
- ck.addToCodes(new Code(codName:'部门经理'))
- ck.save()
- }
- private void initContratType() {
- def ck = new Ckind(ckiName:'合同类型',ckiFlag:'ContratType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'临时合同'))
- ck.addToCodes(new Code(codName:'试用合同'))
- ck.addToCodes(new Code(codName:'正式合同'))
- ck.save()
- }
- private void initContratState() {
- def ck = new Ckind(ckiName:'合同状态',ckiFlag:'ContratState',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'可用'))
- ck.addToCodes(new Code(codName:'过期'))
- ck.addToCodes(new Code(codName:'STOPED'))
- ck.save()
- }
- private void initSignType() {
- def ck = new Ckind(ckiName:'签到类型',ckiFlag:'SignType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'签到'))
- ck.addToCodes(new Code(codName:'签走'))
- ck.save()
- }
- private void initProductType() {
- def ck = new Ckind(ckiName:'产品类型',ckiFlag:'ProductType',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'GOOD PRODUCT'))
- ck.save()
- ck.addToCodes(new Code(codName:'BAD PRODUCT'))
- }
- private void initPowerLevel() {
- def ck = new Ckind(ckiName:'权限等级',ckiFlag:'PowerLevel',ckiState:'',ckimemo:'')
- ck.save()
- ck.addToCodes(new Code(codName:'NO.1',codValue2:'1'))
- ck.save()
- ck.addToCodes(new Code(codName:'NO.2',codValue2:'2'))
- }
- }