提交 5e42e5ba 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码 [Spring Boot]

上级 dca61c25
......@@ -129,6 +129,13 @@ public class Res_supplier extends EntityMP implements Serializable {
@JSONField(name = "property_supplier_payment_term_id")
@JsonProperty("property_supplier_payment_term_id")
private Long propertySupplierPaymentTermId;
/**
* 付款条款
*/
@TableField(exist = false)
@JSONField(name = "property_supplier_payment_term_name")
@JsonProperty("property_supplier_payment_term_name")
private String propertySupplierPaymentTermName;
/**
*
......
......@@ -55,6 +55,20 @@ public class Res_supplierSearchContext extends QueryWrapperContext<Res_supplier>
this.getSearchCond().eq("property_supplier_payment_term_id", n_property_supplier_payment_term_id_eq);
}
}
private String n_property_supplier_payment_term_name_eq;//[付款条款]
public void setN_property_supplier_payment_term_name_eq(String n_property_supplier_payment_term_name_eq) {
this.n_property_supplier_payment_term_name_eq = n_property_supplier_payment_term_name_eq;
if(!ObjectUtils.isEmpty(this.n_property_supplier_payment_term_name_eq)){
this.getSearchCond().eq("property_supplier_payment_term_name", n_property_supplier_payment_term_name_eq);
}
}
private String n_property_supplier_payment_term_name_like;//[付款条款]
public void setN_property_supplier_payment_term_name_like(String n_property_supplier_payment_term_name_like) {
this.n_property_supplier_payment_term_name_like = n_property_supplier_payment_term_name_like;
if(!ObjectUtils.isEmpty(this.n_property_supplier_payment_term_name_like)){
this.getSearchCond().like("property_supplier_payment_term_name", n_property_supplier_payment_term_name_like);
}
}
/**
* 启用快速搜索
......
......@@ -181,6 +181,9 @@ public class Res_companyServiceImpl extends EBSServiceImpl<Res_companyMapper, Re
protected cn.ibizlab.businesscentral.core.odoo_ir.service.IIr_attachmentService irAttachmentService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_ir.service.IIr_propertyService irPropertyService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_ir.service.IIr_sequenceService irSequenceService;
@Autowired
@Lazy
......
......@@ -86,6 +86,7 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
boolean mail_create_nosubscribe = et.get("mail_create_nosubscribe") != null;
boolean mail_create_nolog = et.get("mail_create_nolog") != null;
boolean mail_notrack = et.get("mail_notrack") != null;
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
......@@ -111,6 +112,7 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
@Override
@Transactional
public void createBatch(List<Res_supplier> list) {
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
}
......@@ -127,6 +129,7 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
Res_supplier old = new Res_supplier() ;
CachedBeanCopier.copy(get(et.getId()), old);
boolean mail_notrack = et.get("mail_notrack") != null;
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
......@@ -139,6 +142,7 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
@Override
@Transactional
public void updateBatch(List<Res_supplier> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
......@@ -172,6 +176,7 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
@Override
public Res_supplier getDraft(Res_supplier et) {
fillParentData(et);
return et;
}
......@@ -207,6 +212,7 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
@Override
@Transactional
public boolean saveBatch(Collection<Res_supplier> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
......@@ -214,6 +220,7 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
@Override
@Transactional
public void saveBatch(List<Res_supplier> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
......@@ -239,6 +246,22 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(Res_supplier et){
//实体关系[DER1N_RES_SUPPLIER_ACCOUNT_PAYMENT_TERM_PROPERTY_SUPPLIER_PAYMENT_TERM_ID]
if(!ObjectUtils.isEmpty(et.getPropertySupplierPaymentTermId())){
cn.ibizlab.businesscentral.core.odoo_account.domain.Account_payment_term odooPurchasePaymentTerm=et.getOdooPurchasePaymentTerm();
if(ObjectUtils.isEmpty(odooPurchasePaymentTerm)){
cn.ibizlab.businesscentral.core.odoo_account.domain.Account_payment_term majorEntity=accountPaymentTermService.get(et.getPropertySupplierPaymentTermId());
et.setOdooPurchasePaymentTerm(majorEntity);
odooPurchasePaymentTerm=majorEntity;
}
et.setPropertySupplierPaymentTermName(odooPurchasePaymentTerm.getName());
}
}
......
package cn.ibizlab.businesscentral.core.odoo_hr.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.businesscentral.util.helper.DataObject;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.businesscentral.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.businesscentral.util.domain.EntityMP;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
/**
* 实体[员工简历行]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "HR_RESUME_LINE",resultMap = "Hr_resume_lineResultMap")
public class Hr_resume_line extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@DEField(isKeyField=true)
@TableId(value= "id",type=IdType.AUTO)
@JSONField(name = "id")
@JsonProperty("id")
private Long id;
/**
* 名称
*/
@TableField(value = "name")
@JSONField(name = "name")
@JsonProperty("name")
private String name;
/**
* ID
*/
@DEField(name = "employee_id")
@TableField(value = "employee_id")
@JSONField(name = "employee_id")
@JsonProperty("employee_id")
private Long employeeId;
/**
* ID
*/
@DEField(name = "line_type_id")
@TableField(value = "line_type_id")
@JSONField(name = "line_type_id")
@JsonProperty("line_type_id")
private Long lineTypeId;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_employee odooEmployee;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line_type odooResumeLineType;
/**
* 设置 [名称]
*/
public void setName(String name){
this.name = name ;
this.modify("name",name);
}
/**
* 设置 [ID]
*/
public void setEmployeeId(Long employeeId){
this.employeeId = employeeId ;
this.modify("employee_id",employeeId);
}
/**
* 设置 [ID]
*/
public void setLineTypeId(Long lineTypeId){
this.lineTypeId = lineTypeId ;
this.modify("line_type_id",lineTypeId);
}
@Override
public Serializable getDefaultKey(boolean gen) {
return IdWorker.getId();
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("id");
return super.copyTo(targetEntity,bIncEmpty);
}
}
package cn.ibizlab.businesscentral.core.odoo_hr.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.businesscentral.util.helper.DataObject;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.businesscentral.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.businesscentral.util.domain.EntityMP;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
/**
* 实体[简历类型]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "HR_RESUME_LINE_TYPE",resultMap = "Hr_resume_line_typeResultMap")
public class Hr_resume_line_type extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@DEField(isKeyField=true)
@TableId(value= "id",type=IdType.AUTO)
@JSONField(name = "id")
@JsonProperty("id")
private Long id;
/**
* 名称
*/
@TableField(value = "name")
@JSONField(name = "name")
@JsonProperty("name")
private String name;
/**
* 设置 [名称]
*/
public void setName(String name){
this.name = name ;
this.modify("name",name);
}
@Override
public Serializable getDefaultKey(boolean gen) {
return IdWorker.getId();
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("id");
return super.copyTo(targetEntity,bIncEmpty);
}
}
package cn.ibizlab.businesscentral.core.odoo_hr.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line;
/**
* 关系型数据实体[Hr_resume_line] 查询条件对象
*/
@Slf4j
@Data
public class Hr_resume_lineSearchContext extends QueryWrapperContext<Hr_resume_line> {
private String n_name_like;//[名称]
public void setN_name_like(String n_name_like) {
this.n_name_like = n_name_like;
if(!ObjectUtils.isEmpty(this.n_name_like)){
this.getSearchCond().like("name", n_name_like);
}
}
private Long n_employee_id_eq;//[ID]
public void setN_employee_id_eq(Long n_employee_id_eq) {
this.n_employee_id_eq = n_employee_id_eq;
if(!ObjectUtils.isEmpty(this.n_employee_id_eq)){
this.getSearchCond().eq("employee_id", n_employee_id_eq);
}
}
private Long n_line_type_id_eq;//[ID]
public void setN_line_type_id_eq(Long n_line_type_id_eq) {
this.n_line_type_id_eq = n_line_type_id_eq;
if(!ObjectUtils.isEmpty(this.n_line_type_id_eq)){
this.getSearchCond().eq("line_type_id", n_line_type_id_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("name", query)
);
}
}
}
package cn.ibizlab.businesscentral.core.odoo_hr.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line_type;
/**
* 关系型数据实体[Hr_resume_line_type] 查询条件对象
*/
@Slf4j
@Data
public class Hr_resume_line_typeSearchContext extends QueryWrapperContext<Hr_resume_line_type> {
private String n_name_like;//[名称]
public void setN_name_like(String n_name_like) {
this.n_name_like = n_name_like;
if(!ObjectUtils.isEmpty(this.n_name_like)){
this.getSearchCond().like("name", n_name_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("name", query)
);
}
}
}
package cn.ibizlab.businesscentral.core.odoo_hr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line;
import cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_resume_lineSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface Hr_resume_lineMapper extends BaseMapper<Hr_resume_line>{
Page<Hr_resume_line> searchDefault(IPage page, @Param("srf") Hr_resume_lineSearchContext context, @Param("ew") Wrapper<Hr_resume_line> wrapper) ;
@Override
Hr_resume_line selectById(Serializable id);
@Override
int insert(Hr_resume_line entity);
@Override
int updateById(@Param(Constants.ENTITY) Hr_resume_line entity);
@Override
int update(@Param(Constants.ENTITY) Hr_resume_line entity, @Param("ew") Wrapper<Hr_resume_line> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Hr_resume_line> selectByEmployeeId(@Param("id") Serializable id) ;
List<Hr_resume_line> selectByLineTypeId(@Param("id") Serializable id) ;
}
package cn.ibizlab.businesscentral.core.odoo_hr.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line_type;
import cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_resume_line_typeSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface Hr_resume_line_typeMapper extends BaseMapper<Hr_resume_line_type>{
Page<Hr_resume_line_type> searchDefault(IPage page, @Param("srf") Hr_resume_line_typeSearchContext context, @Param("ew") Wrapper<Hr_resume_line_type> wrapper) ;
@Override
Hr_resume_line_type selectById(Serializable id);
@Override
int insert(Hr_resume_line_type entity);
@Override
int updateById(@Param(Constants.ENTITY) Hr_resume_line_type entity);
@Override
int update(@Param(Constants.ENTITY) Hr_resume_line_type entity, @Param("ew") Wrapper<Hr_resume_line_type> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.businesscentral.core.odoo_hr.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line;
import cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_resume_lineSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[Hr_resume_line] 服务对象接口
*/
public interface IHr_resume_lineService extends IService<Hr_resume_line>{
boolean create(Hr_resume_line et) ;
void createBatch(List<Hr_resume_line> list) ;
boolean update(Hr_resume_line et) ;
void updateBatch(List<Hr_resume_line> list) ;
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Hr_resume_line get(Long key) ;
Hr_resume_line getDraft(Hr_resume_line et) ;
boolean checkKey(Hr_resume_line et) ;
boolean save(Hr_resume_line et) ;
void saveBatch(List<Hr_resume_line> list) ;
Page<Hr_resume_line> searchDefault(Hr_resume_lineSearchContext context) ;
List<Hr_resume_line> selectByEmployeeId(Long id);
void removeByEmployeeId(Long id);
List<Hr_resume_line> selectByLineTypeId(Long id);
void removeByLineTypeId(Long id);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
package cn.ibizlab.businesscentral.core.odoo_hr.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line_type;
import cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_resume_line_typeSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[Hr_resume_line_type] 服务对象接口
*/
public interface IHr_resume_line_typeService extends IService<Hr_resume_line_type>{
boolean create(Hr_resume_line_type et) ;
void createBatch(List<Hr_resume_line_type> list) ;
boolean update(Hr_resume_line_type et) ;
void updateBatch(List<Hr_resume_line_type> list) ;
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Hr_resume_line_type get(Long key) ;
Hr_resume_line_type getDraft(Hr_resume_line_type et) ;
boolean checkKey(Hr_resume_line_type et) ;
boolean save(Hr_resume_line_type et) ;
void saveBatch(List<Hr_resume_line_type> list) ;
Page<Hr_resume_line_type> searchDefault(Hr_resume_line_typeSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
......@@ -90,6 +90,9 @@ public class Hr_employeeServiceImpl extends EBSServiceImpl<Hr_employeeMapper, Hr
protected cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_leaveService hrLeaveService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_resume_lineService hrResumeLineService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_maintenance.service.IMaintenance_equipmentService maintenanceEquipmentService;
@Autowired
@Lazy
......
package cn.ibizlab.businesscentral.core.odoo_hr.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.businesscentral.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line;
import cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_resume_lineSearchContext;
import cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_resume_lineService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import cn.ibizlab.businesscentral.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.businesscentral.core.util.helper.EBSServiceImpl;
import cn.ibizlab.businesscentral.core.odoo_hr.mapper.Hr_resume_lineMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[员工简历行] 服务对象接口实现
*/
@Slf4j
@Service("Hr_resume_lineServiceImpl")
public class Hr_resume_lineServiceImpl extends EBSServiceImpl<Hr_resume_lineMapper, Hr_resume_line> implements IHr_resume_lineService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_employeeService hrEmployeeService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_resume_line_typeService hrResumeLineTypeService;
protected int batchSize = 500;
public String getIrModel(){
return "hr.resume.line" ;
}
private boolean messageinfo = false ;
public void setMessageInfo(boolean messageinfo){
this.messageinfo = messageinfo ;
}
@Override
@Transactional
public boolean create(Hr_resume_line et) {
boolean mail_create_nosubscribe = et.get("mail_create_nosubscribe") != null;
boolean mail_create_nolog = et.get("mail_create_nolog") != null;
boolean mail_notrack = et.get("mail_notrack") != null;
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
if (messageinfo && !mail_create_nosubscribe) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_followersExService.class).add_default_followers(this,et);
}
if (messageinfo && !mail_create_nolog) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_messageExService.class).add_default_create_message(this,et);
}
if (messageinfo && !mail_notrack) {
}
return true;
}
@Override
@Transactional
public void createBatch(List<Hr_resume_line> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(Hr_resume_line et) {
Hr_resume_line old = new Hr_resume_line() ;
CachedBeanCopier.copy(get(et.getId()), old);
boolean mail_notrack = et.get("mail_notrack") != null;
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
if (messageinfo && !mail_notrack) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_tracking_valueExService.class).message_track(this,old,et);
}
return true;
}
@Override
@Transactional
public void updateBatch(List<Hr_resume_line> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(Long key) {
boolean result=removeById(key);
return result ;
}
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
removeByIds(idList);
}
@Override
@Transactional
public Hr_resume_line get(Long key) {
Hr_resume_line et = getById(key);
if(et==null){
et=new Hr_resume_line();
et.setId(key);
}
else{
}
return et;
}
@Override
public Hr_resume_line getDraft(Hr_resume_line et) {
return et;
}
@Override
public boolean checkKey(Hr_resume_line et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Hr_resume_line et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Hr_resume_line et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Hr_resume_line> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Hr_resume_line> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Hr_resume_line> selectByEmployeeId(Long id) {
return baseMapper.selectByEmployeeId(id);
}
@Override
public void removeByEmployeeId(Long id) {
this.remove(new QueryWrapper<Hr_resume_line>().eq("employee_id",id));
}
@Override
public List<Hr_resume_line> selectByLineTypeId(Long id) {
return baseMapper.selectByLineTypeId(id);
}
@Override
public void removeByLineTypeId(Long id) {
this.remove(new QueryWrapper<Hr_resume_line>().eq("line_type_id",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Hr_resume_line> searchDefault(Hr_resume_lineSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Hr_resume_line> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Hr_resume_line>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
package cn.ibizlab.businesscentral.core.odoo_hr.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.businesscentral.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line_type;
import cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_resume_line_typeSearchContext;
import cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_resume_line_typeService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import cn.ibizlab.businesscentral.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.businesscentral.core.util.helper.EBSServiceImpl;
import cn.ibizlab.businesscentral.core.odoo_hr.mapper.Hr_resume_line_typeMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[简历类型] 服务对象接口实现
*/
@Slf4j
@Service("Hr_resume_line_typeServiceImpl")
public class Hr_resume_line_typeServiceImpl extends EBSServiceImpl<Hr_resume_line_typeMapper, Hr_resume_line_type> implements IHr_resume_line_typeService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_resume_lineService hrResumeLineService;
protected int batchSize = 500;
public String getIrModel(){
return "hr.resume.line.type" ;
}
private boolean messageinfo = false ;
public void setMessageInfo(boolean messageinfo){
this.messageinfo = messageinfo ;
}
@Override
@Transactional
public boolean create(Hr_resume_line_type et) {
boolean mail_create_nosubscribe = et.get("mail_create_nosubscribe") != null;
boolean mail_create_nolog = et.get("mail_create_nolog") != null;
boolean mail_notrack = et.get("mail_notrack") != null;
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
if (messageinfo && !mail_create_nosubscribe) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_followersExService.class).add_default_followers(this,et);
}
if (messageinfo && !mail_create_nolog) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_messageExService.class).add_default_create_message(this,et);
}
if (messageinfo && !mail_notrack) {
}
return true;
}
@Override
@Transactional
public void createBatch(List<Hr_resume_line_type> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(Hr_resume_line_type et) {
Hr_resume_line_type old = new Hr_resume_line_type() ;
CachedBeanCopier.copy(get(et.getId()), old);
boolean mail_notrack = et.get("mail_notrack") != null;
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
if (messageinfo && !mail_notrack) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_tracking_valueExService.class).message_track(this,old,et);
}
return true;
}
@Override
@Transactional
public void updateBatch(List<Hr_resume_line_type> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(Long key) {
boolean result=removeById(key);
return result ;
}
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
removeByIds(idList);
}
@Override
@Transactional
public Hr_resume_line_type get(Long key) {
Hr_resume_line_type et = getById(key);
if(et==null){
et=new Hr_resume_line_type();
et.setId(key);
}
else{
}
return et;
}
@Override
public Hr_resume_line_type getDraft(Hr_resume_line_type et) {
return et;
}
@Override
public boolean checkKey(Hr_resume_line_type et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Hr_resume_line_type et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Hr_resume_line_type et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Hr_resume_line_type> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Hr_resume_line_type> list) {
saveOrUpdateBatch(list,batchSize);
}
/**
* 查询集合 数据集
*/
@Override
public Page<Hr_resume_line_type> searchDefault(Hr_resume_line_typeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Hr_resume_line_type> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Hr_resume_line_type>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
package cn.ibizlab.businesscentral.core.odoo_ir.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.businesscentral.util.helper.DataObject;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.businesscentral.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.businesscentral.util.domain.EntityMP;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
/**
* 实体[实体]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "IR_PROPERTY",resultMap = "Ir_propertyResultMap")
public class Ir_property extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@DEField(isKeyField=true)
@TableId(value= "id",type=IdType.AUTO)
@JSONField(name = "id")
@JsonProperty("id")
private Long id;
/**
* 名称
*/
@TableField(value = "name")
@JSONField(name = "name")
@JsonProperty("name")
private String name;
/**
* res_id
*/
@DEField(name = "res_id")
@TableField(value = "res_id")
@JSONField(name = "res_id")
@JsonProperty("res_id")
private String resId;
/**
* type
*/
@TableField(value = "type")
@JSONField(name = "type")
@JsonProperty("type")
private String type;
/**
* value_reference
*/
@DEField(name = "value_reference")
@TableField(value = "value_reference")
@JSONField(name = "value_reference")
@JsonProperty("value_reference")
private String valueReference;
/**
* value_text
*/
@DEField(name = "value_text")
@TableField(value = "value_text")
@JSONField(name = "value_text")
@JsonProperty("value_text")
private String valueText;
/**
* ID
*/
@DEField(name = "fields_id")
@TableField(value = "fields_id")
@JSONField(name = "fields_id")
@JsonProperty("fields_id")
private Long fieldsId;
/**
* ID
*/
@DEField(name = "company_id")
@TableField(value = "company_id")
@JSONField(name = "company_id")
@JsonProperty("company_id")
private Long companyId;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_model_fields odooFields;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_base.domain.Res_company odooCompany;
/**
* 设置 [名称]
*/
public void setName(String name){
this.name = name ;
this.modify("name",name);
}
/**
* 设置 [res_id]
*/
public void setResId(String resId){
this.resId = resId ;
this.modify("res_id",resId);
}
/**
* 设置 [type]
*/
public void setType(String type){
this.type = type ;
this.modify("type",type);
}
/**
* 设置 [value_reference]
*/
public void setValueReference(String valueReference){
this.valueReference = valueReference ;
this.modify("value_reference",valueReference);
}
/**
* 设置 [value_text]
*/
public void setValueText(String valueText){
this.valueText = valueText ;
this.modify("value_text",valueText);
}
/**
* 设置 [ID]
*/
public void setFieldsId(Long fieldsId){
this.fieldsId = fieldsId ;
this.modify("fields_id",fieldsId);
}
/**
* 设置 [ID]
*/
public void setCompanyId(Long companyId){
this.companyId = companyId ;
this.modify("company_id",companyId);
}
@Override
public Serializable getDefaultKey(boolean gen) {
return IdWorker.getId();
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public <T> T copyTo(T targetEntity, boolean bIncEmpty) {
this.reset("id");
return super.copyTo(targetEntity,bIncEmpty);
}
}
package cn.ibizlab.businesscentral.core.odoo_ir.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_property;
/**
* 关系型数据实体[Ir_property] 查询条件对象
*/
@Slf4j
@Data
public class Ir_propertySearchContext extends QueryWrapperContext<Ir_property> {
private String n_name_like;//[名称]
public void setN_name_like(String n_name_like) {
this.n_name_like = n_name_like;
if(!ObjectUtils.isEmpty(this.n_name_like)){
this.getSearchCond().like("name", n_name_like);
}
}
private Long n_fields_id_eq;//[ID]
public void setN_fields_id_eq(Long n_fields_id_eq) {
this.n_fields_id_eq = n_fields_id_eq;
if(!ObjectUtils.isEmpty(this.n_fields_id_eq)){
this.getSearchCond().eq("fields_id", n_fields_id_eq);
}
}
private Long n_company_id_eq;//[ID]
public void setN_company_id_eq(Long n_company_id_eq) {
this.n_company_id_eq = n_company_id_eq;
if(!ObjectUtils.isEmpty(this.n_company_id_eq)){
this.getSearchCond().eq("company_id", n_company_id_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("name", query)
);
}
}
}
package cn.ibizlab.businesscentral.core.odoo_ir.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_property;
import cn.ibizlab.businesscentral.core.odoo_ir.filter.Ir_propertySearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface Ir_propertyMapper extends BaseMapper<Ir_property>{
Page<Ir_property> searchDefault(IPage page, @Param("srf") Ir_propertySearchContext context, @Param("ew") Wrapper<Ir_property> wrapper) ;
@Override
Ir_property selectById(Serializable id);
@Override
int insert(Ir_property entity);
@Override
int updateById(@Param(Constants.ENTITY) Ir_property entity);
@Override
int update(@Param(Constants.ENTITY) Ir_property entity, @Param("ew") Wrapper<Ir_property> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Ir_property> selectByFieldsId(@Param("id") Serializable id) ;
List<Ir_property> selectByCompanyId(@Param("id") Serializable id) ;
}
package cn.ibizlab.businesscentral.core.odoo_ir.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_property;
import cn.ibizlab.businesscentral.core.odoo_ir.filter.Ir_propertySearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[Ir_property] 服务对象接口
*/
public interface IIr_propertyService extends IService<Ir_property>{
boolean create(Ir_property et) ;
void createBatch(List<Ir_property> list) ;
boolean update(Ir_property et) ;
void updateBatch(List<Ir_property> list) ;
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Ir_property get(Long key) ;
Ir_property getDraft(Ir_property et) ;
boolean checkKey(Ir_property et) ;
boolean save(Ir_property et) ;
void saveBatch(List<Ir_property> list) ;
Page<Ir_property> searchDefault(Ir_propertySearchContext context) ;
List<Ir_property> selectByFieldsId(Long id);
void removeByFieldsId(Long id);
List<Ir_property> selectByCompanyId(Long id);
void removeByCompanyId(Long id);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
......@@ -50,6 +50,9 @@ import org.springframework.util.StringUtils;
@Service("Ir_model_fieldsServiceImpl")
public class Ir_model_fieldsServiceImpl extends EBSServiceImpl<Ir_model_fieldsMapper, Ir_model_fields> implements IIr_model_fieldsService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_ir.service.IIr_propertyService irPropertyService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_ir.service.IIr_modelService irModelService;
......
package cn.ibizlab.businesscentral.core.odoo_ir.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.businesscentral.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_property;
import cn.ibizlab.businesscentral.core.odoo_ir.filter.Ir_propertySearchContext;
import cn.ibizlab.businesscentral.core.odoo_ir.service.IIr_propertyService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import cn.ibizlab.businesscentral.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.businesscentral.core.util.helper.EBSServiceImpl;
import cn.ibizlab.businesscentral.core.odoo_ir.mapper.Ir_propertyMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[实体] 服务对象接口实现
*/
@Slf4j
@Service("Ir_propertyServiceImpl")
public class Ir_propertyServiceImpl extends EBSServiceImpl<Ir_propertyMapper, Ir_property> implements IIr_propertyService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_ir.service.IIr_model_fieldsService irModelFieldsService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_companyService resCompanyService;
protected int batchSize = 500;
public String getIrModel(){
return "ir.property" ;
}
private boolean messageinfo = false ;
public void setMessageInfo(boolean messageinfo){
this.messageinfo = messageinfo ;
}
@Override
@Transactional
public boolean create(Ir_property et) {
boolean mail_create_nosubscribe = et.get("mail_create_nosubscribe") != null;
boolean mail_create_nolog = et.get("mail_create_nolog") != null;
boolean mail_notrack = et.get("mail_notrack") != null;
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
if (messageinfo && !mail_create_nosubscribe) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_followersExService.class).add_default_followers(this,et);
}
if (messageinfo && !mail_create_nolog) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_messageExService.class).add_default_create_message(this,et);
}
if (messageinfo && !mail_notrack) {
}
return true;
}
@Override
@Transactional
public void createBatch(List<Ir_property> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(Ir_property et) {
Ir_property old = new Ir_property() ;
CachedBeanCopier.copy(get(et.getId()), old);
boolean mail_notrack = et.get("mail_notrack") != null;
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
return false;
CachedBeanCopier.copy(get(et.getId()),et);
if (messageinfo && !mail_notrack) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_tracking_valueExService.class).message_track(this,old,et);
}
return true;
}
@Override
@Transactional
public void updateBatch(List<Ir_property> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(Long key) {
boolean result=removeById(key);
return result ;
}
@Override
@Transactional
public void removeBatch(Collection<Long> idList) {
removeByIds(idList);
}
@Override
@Transactional
public Ir_property get(Long key) {
Ir_property et = getById(key);
if(et==null){
et=new Ir_property();
et.setId(key);
}
else{
}
return et;
}
@Override
public Ir_property getDraft(Ir_property et) {
return et;
}
@Override
public boolean checkKey(Ir_property et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Ir_property et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Ir_property et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Ir_property> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Ir_property> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Ir_property> selectByFieldsId(Long id) {
return baseMapper.selectByFieldsId(id);
}
@Override
public void removeByFieldsId(Long id) {
this.remove(new QueryWrapper<Ir_property>().eq("fields_id",id));
}
@Override
public List<Ir_property> selectByCompanyId(Long id) {
return baseMapper.selectByCompanyId(id);
}
@Override
public void removeByCompanyId(Long id) {
this.remove(new QueryWrapper<Ir_property>().eq("company_id",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Ir_property> searchDefault(Ir_propertySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Ir_property> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Ir_property>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
......@@ -504,6 +504,12 @@
<!--输出实体[HR_RECRUITMENT_STAGE]数据结构 -->
<!--输出实体[HR_RESUME_LINE]数据结构 -->
<!--输出实体[HR_RESUME_LINE_TYPE]数据结构 -->
<!--输出实体[IAP_ACCOUNT]数据结构 -->
......@@ -531,6 +537,9 @@
<!--输出实体[IR_MODEL_FIELDS]数据结构 -->
<!--输出实体[IR_PROPERTY]数据结构 -->
<!--输出实体[IR_SEQUENCE]数据结构 -->
......@@ -1414,6 +1423,8 @@
<!--输出实体[HR_RECRUITMENT_DEGREE]外键关系 -->
<!--输出实体[HR_RECRUITMENT_SOURCE]外键关系 -->
<!--输出实体[HR_RECRUITMENT_STAGE]外键关系 -->
<!--输出实体[HR_RESUME_LINE]外键关系 -->
<!--输出实体[HR_RESUME_LINE_TYPE]外键关系 -->
<!--输出实体[IAP_ACCOUNT]外键关系 -->
<!--输出实体[IM_LIVECHAT_CHANNEL]外键关系 -->
<!--输出实体[IM_LIVECHAT_CHANNEL_RULE]外键关系 -->
......@@ -1423,6 +1434,7 @@
<!--输出实体[IR_MODEL]外键关系 -->
<!--输出实体[IR_MODEL_DATA]外键关系 -->
<!--输出实体[IR_MODEL_FIELDS]外键关系 -->
<!--输出实体[IR_PROPERTY]外键关系 -->
<!--输出实体[IR_SEQUENCE]外键关系 -->
<!--输出实体[IR_SEQUENCE_DATE_RANGE]外键关系 -->
<!--输出实体[IR_TRANSLATION]外键关系 -->
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_supplierResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t1.TYPE, t1.VAT FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.ID AS PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t11.NAME AS PROPERTY_SUPPLIER_PAYMENT_TERM_NAME, t1.TYPE, t1.VAT FROM RES_PARTNER t1 LEFT JOIN ACCOUNT_PAYMENT_TERM t11 ON t1.ID = t11.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -15,6 +15,7 @@
<result property="websiteUrl" column="website_url" />
<result property="categoryId" column="category_id" />
<result property="propertySupplierPaymentTermId" column="property_supplier_payment_term_id" />
<result property="propertySupplierPaymentTermName" column="property_supplier_payment_term_name" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
......@@ -40,12 +41,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t1.TYPE, t1.VAT FROM RES_PARTNER t1
<![CDATA[ SELECT t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.ID AS PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t11.NAME AS PROPERTY_SUPPLIER_PAYMENT_TERM_NAME, t1.TYPE, t1.VAT FROM RES_PARTNER t1 LEFT JOIN ACCOUNT_PAYMENT_TERM t11 ON t1.ID = t11.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t1.TYPE, t1.VAT FROM RES_PARTNER t1
<![CDATA[ SELECT (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM RES_PARTNER_RES_PARTNER_CATEGORY_REL M1 LEFT JOIN RES_PARTNER_CATEGORY M2 ON M1.CATEGORY_ID = M2.ID WHERE M1.PARTNER_ID =T1.ID ) T) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.ID AS PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t11.NAME AS PROPERTY_SUPPLIER_PAYMENT_TERM_NAME, t1.TYPE, t1.VAT FROM RES_PARTNER t1 LEFT JOIN ACCOUNT_PAYMENT_TERM t11 ON t1.ID = t11.ID
]]>
</sql>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_hr.mapper.Hr_resume_lineMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Hr_resume_lineResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.EMPLOYEE_ID, t1.ID, t1.LINE_TYPE_ID, t1.NAME FROM HR_RESUME_LINE t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Hr_resume_lineResultMap" type="cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line" autoMapping="true">
<id property="id" column="id" /><!--主键字段映射-->
<result property="employeeId" column="employee_id" />
<result property="lineTypeId" column="line_type_id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooEmployee" javaType="cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_employee" column="employee_id" select="cn.ibizlab.businesscentral.core.odoo_hr.mapper.Hr_employeeMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooResumeLineType" javaType="cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line_type" column="line_type_id" select="cn.ibizlab.businesscentral.core.odoo_hr.mapper.Hr_resume_line_typeMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HR_RESUME_LINE_HR_EMPLOYEE_EMPLOYEE_ID] -->
<select id="selectByEmployeeId" resultMap="Hr_resume_lineResultMap">
select t1.* from (
<include refid="Default" />
) t1
where employee_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HR_RESUME_LINE_HR_RESUME_LINE_TYPE_LINE_TYPE_ID] -->
<select id="selectByLineTypeId" resultMap="Hr_resume_lineResultMap">
select t1.* from (
<include refid="Default" />
) t1
where line_type_id=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_resume_lineSearchContext" resultMap="Hr_resume_lineResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.EMPLOYEE_ID, t1.ID, t1.LINE_TYPE_ID, t1.NAME FROM HR_RESUME_LINE t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.EMPLOYEE_ID, t1.ID, t1.LINE_TYPE_ID, t1.NAME FROM HR_RESUME_LINE t1
]]>
</sql>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_hr.mapper.Hr_resume_line_typeMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Hr_resume_line_typeResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ID, t1.NAME FROM HR_RESUME_LINE_TYPE t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Hr_resume_line_typeResultMap" type="cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line_type" autoMapping="true">
<id property="id" column="id" /><!--主键字段映射-->
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_resume_line_typeSearchContext" resultMap="Hr_resume_line_typeResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.ID, t1.NAME FROM HR_RESUME_LINE_TYPE t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ID, t1.NAME FROM HR_RESUME_LINE_TYPE t1
]]>
</sql>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_ir.mapper.Ir_propertyMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Ir_propertyResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.COMPANY_ID, t1.FIELDS_ID, t1.ID, t1.NAME, t1.RES_ID, t1.TYPE, t1.VALUE_REFERENCE, t1.VALUE_TEXT FROM IR_PROPERTY t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Ir_propertyResultMap" type="cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_property" autoMapping="true">
<id property="id" column="id" /><!--主键字段映射-->
<result property="resId" column="res_id" />
<result property="valueReference" column="value_reference" />
<result property="valueText" column="value_text" />
<result property="fieldsId" column="fields_id" />
<result property="companyId" column="company_id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooFields" javaType="cn.ibizlab.businesscentral.core.odoo_ir.domain.Ir_model_fields" column="fields_id" select="cn.ibizlab.businesscentral.core.odoo_ir.mapper.Ir_model_fieldsMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooCompany" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_company" column="company_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_companyMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IR_PROPERTY_IR_MODEL_FIELDS_FIELDS_ID] -->
<select id="selectByFieldsId" resultMap="Ir_propertyResultMap">
select t1.* from (
<include refid="Default" />
) t1
where fields_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IR_PROPERTY_RES_COMPANY_COMPANY_ID] -->
<select id="selectByCompanyId" resultMap="Ir_propertyResultMap">
select t1.* from (
<include refid="Default" />
) t1
where company_id=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_ir.filter.Ir_propertySearchContext" resultMap="Ir_propertyResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.COMPANY_ID, t1.FIELDS_ID, t1.ID, t1.NAME, t1.RES_ID, t1.TYPE, t1.VALUE_REFERENCE, t1.VALUE_TEXT FROM IR_PROPERTY t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.COMPANY_ID, t1.FIELDS_ID, t1.ID, t1.NAME, t1.RES_ID, t1.TYPE, t1.VALUE_REFERENCE, t1.VALUE_TEXT FROM IR_PROPERTY t1
]]>
</sql>
</mapper>
......@@ -65491,6 +65491,12 @@
"entity_name":"HR_LEAVE",
"ref_entity_name":"HR_EMPLOYEE"
},
{"name":"DER1N_HR_RESUME_LINE_HR_EMPLOYEE_EMPLOYEE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_employee",
"entity_name":"HR_RESUME_LINE",
"ref_entity_name":"HR_EMPLOYEE"
},
{"name":"DER1N_MAINTENANCE_EQUIPMENT__HR_EMPLOYEE__EMPLOYEE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_employee",
......@@ -74105,6 +74111,145 @@
"ref_entity_name":"RES_USERS"
}
]
}
,
{
"entity_name":"HR_RESUME_LINE",
"logic_name":"员工简历行",
"code_name":"Hr_resume_line",
"table_name":"HR_RESUME_LINE",
"system_id":"iBizBusinessCentral",
"system_name":"iBiz商业中心",
"fields":[
{
"fieldname":"ID" ,
"codename":"Id",
"field_logic_name":"ID",
"entity_name":"Hr_resume_line",
"field_type":"ACID",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"data_length":20,
"key_field":1,
"show_order":1000,
"major_field":0
},
{
"fieldname":"NAME" ,
"codename":"Name",
"field_logic_name":"名称",
"entity_name":"Hr_resume_line",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":1
},
{
"fieldname":"EMPLOYEE_ID" ,
"codename":"Employee_id",
"field_logic_name":"ID",
"entity_name":"Hr_resume_line",
"ref_de":"HR_EMPLOYEE",
"ref_field_name":"ID",
"relation_name":"DER1N_HR_RESUME_LINE_HR_EMPLOYEE_EMPLOYEE_ID",
"relation_codename":"Odoo_employee",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"LINE_TYPE_ID" ,
"codename":"Line_type_id",
"field_logic_name":"ID",
"entity_name":"Hr_resume_line",
"ref_de":"HR_RESUME_LINE_TYPE",
"ref_field_name":"ID",
"relation_name":"DER1N_HR_RESUME_LINE_HR_RESUME_LINE_TYPE_LINE_TYPE_ID",
"relation_codename":"Odoo_resume_line_type",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"data_length":20,
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_HR_RESUME_LINE_HR_EMPLOYEE_EMPLOYEE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_employee",
"entity_name":"HR_RESUME_LINE",
"ref_entity_name":"HR_EMPLOYEE"
},
{"name":"DER1N_HR_RESUME_LINE_HR_RESUME_LINE_TYPE_LINE_TYPE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_resume_line_type",
"entity_name":"HR_RESUME_LINE",
"ref_entity_name":"HR_RESUME_LINE_TYPE"
}
]
}
,
{
"entity_name":"HR_RESUME_LINE_TYPE",
"logic_name":"简历类型",
"code_name":"Hr_resume_line_type",
"table_name":"HR_RESUME_LINE_TYPE",
"system_id":"iBizBusinessCentral",
"system_name":"iBiz商业中心",
"fields":[
{
"fieldname":"ID" ,
"codename":"Id",
"field_logic_name":"ID",
"entity_name":"Hr_resume_line_type",
"field_type":"ACID",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"data_length":20,
"key_field":1,
"show_order":1000,
"major_field":0
},
{
"fieldname":"NAME" ,
"codename":"Name",
"field_logic_name":"名称",
"entity_name":"Hr_resume_line_type",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":1
}
],
"subEntitys":[
{"name":"DER1N_HR_RESUME_LINE_HR_RESUME_LINE_TYPE_LINE_TYPE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_resume_line_type",
"entity_name":"HR_RESUME_LINE",
"ref_entity_name":"HR_RESUME_LINE_TYPE"
}
],
"parentEntitys":[
]
}
,
{
......@@ -76121,6 +76266,12 @@
}
],
"subEntitys":[
{"name":"DER1N_IR_PROPERTY_IR_MODEL_FIELDS_FIELDS_ID",
"relation_type":"DER1N",
"code_name":"Odoo_fields",
"entity_name":"IR_PROPERTY",
"ref_entity_name":"IR_MODEL_FIELDS"
}
],
"parentEntitys":[
{"name":"DER1N_IR_MODEL_FIELDS_IR_MODEL_MODEL_ID",
......@@ -76130,6 +76281,152 @@
"ref_entity_name":"IR_MODEL"
}
]
}
,
{
"entity_name":"IR_PROPERTY",
"logic_name":"实体",
"code_name":"Ir_property",
"table_name":"IR_PROPERTY",
"system_id":"iBizBusinessCentral",
"system_name":"iBiz商业中心",
"fields":[
{
"fieldname":"ID" ,
"codename":"Id",
"field_logic_name":"ID",
"entity_name":"Ir_property",
"field_type":"ACID",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"data_length":20,
"key_field":1,
"show_order":1000,
"major_field":0
},
{
"fieldname":"NAME" ,
"codename":"Name",
"field_logic_name":"名称",
"entity_name":"Ir_property",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":1
},
{
"fieldname":"RES_ID" ,
"codename":"Res_id",
"field_logic_name":"res_id",
"entity_name":"Ir_property",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"TYPE" ,
"codename":"Type",
"field_logic_name":"type",
"entity_name":"Ir_property",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"VALUE_REFERENCE" ,
"codename":"Value_reference",
"field_logic_name":"value_reference",
"entity_name":"Ir_property",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"VALUE_TEXT" ,
"codename":"Value_text",
"field_logic_name":"value_text",
"entity_name":"Ir_property",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"FIELDS_ID" ,
"codename":"Fields_id",
"field_logic_name":"ID",
"entity_name":"Ir_property",
"ref_de":"IR_MODEL_FIELDS",
"ref_field_name":"ID",
"relation_name":"DER1N_IR_PROPERTY_IR_MODEL_FIELDS_FIELDS_ID",
"relation_codename":"Odoo_fields",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"data_length":20,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"COMPANY_ID" ,
"codename":"Company_id",
"field_logic_name":"ID",
"entity_name":"Ir_property",
"ref_de":"RES_COMPANY",
"ref_field_name":"ID",
"relation_name":"DER1N_IR_PROPERTY_RES_COMPANY_COMPANY_ID",
"relation_codename":"Odoo_company",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_IR_PROPERTY_IR_MODEL_FIELDS_FIELDS_ID",
"relation_type":"DER1N",
"code_name":"Odoo_fields",
"entity_name":"IR_PROPERTY",
"ref_entity_name":"IR_MODEL_FIELDS"
},
{"name":"DER1N_IR_PROPERTY_RES_COMPANY_COMPANY_ID",
"relation_type":"DER1N",
"code_name":"Odoo_company",
"entity_name":"IR_PROPERTY",
"ref_entity_name":"RES_COMPANY"
}
]
}
,
{
......@@ -139790,6 +140087,12 @@
"entity_name":"IR_ATTACHMENT",
"ref_entity_name":"RES_COMPANY"
},
{"name":"DER1N_IR_PROPERTY_RES_COMPANY_COMPANY_ID",
"relation_type":"DER1N",
"code_name":"Odoo_company",
"entity_name":"IR_PROPERTY",
"ref_entity_name":"RES_COMPANY"
},
{"name":"DER1N_IR_SEQUENCE_RES_COMPANY_COMPANY_ID",
"relation_type":"DER1N",
"code_name":"Odoo_company",
......@@ -151425,6 +151728,24 @@
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"PROPERTY_SUPPLIER_PAYMENT_TERM_NAME" ,
"codename":"Property_supplier_payment_term_name",
"field_logic_name":"付款条款",
"entity_name":"Res_supplier",
"ref_de":"ACCOUNT_PAYMENT_TERM",
"ref_field_name":"NAME",
"relation_name":"DER1N_RES_SUPPLIER_ACCOUNT_PAYMENT_TERM_PROPERTY_SUPPLIER_PAYMENT_TERM_ID",
"relation_codename":"Odoo_purchase_payment_term",
"field_type":"PICKUPTEXT",
"nullable":1,
"physical_field":0,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
......@@ -135,6 +135,15 @@ public class Res_supplierDTO extends DTOBase implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
private Long propertySupplierPaymentTermId;
/**
* 属性 [PROPERTY_SUPPLIER_PAYMENT_TERM_NAME]
*
*/
@JSONField(name = "property_supplier_payment_term_name")
@JsonProperty("property_supplier_payment_term_name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String propertySupplierPaymentTermName;
/**
* 设置 [NAME]
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册