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

xignzi006 发布系统代码 [Spring Boot]

上级 d4892296
...@@ -64,6 +64,9 @@ public class Account_payment_termServiceImpl extends EBSServiceImpl<Account_paym ...@@ -64,6 +64,9 @@ public class Account_payment_termServiceImpl extends EBSServiceImpl<Account_paym
protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IPurchase_orderService purchaseOrderService; protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IPurchase_orderService purchaseOrderService;
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_supplierService resSupplierService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_sale.service.ISale_orderService saleOrderService; protected cn.ibizlab.businesscentral.core.odoo_sale.service.ISale_orderService saleOrderService;
@Autowired @Autowired
@Lazy @Lazy
......
...@@ -121,6 +121,22 @@ public class Res_supplier extends EntityMP implements Serializable { ...@@ -121,6 +121,22 @@ public class Res_supplier extends EntityMP implements Serializable {
@JSONField(name = "category_id") @JSONField(name = "category_id")
@JsonProperty("category_id") @JsonProperty("category_id")
private String categoryId; private String categoryId;
/**
* 采购付款条款
*/
@DEField(name = "property_supplier_payment_term_id")
@TableField(value = "property_supplier_payment_term_id")
@JSONField(name = "property_supplier_payment_term_id")
@JsonProperty("property_supplier_payment_term_id")
private Long propertySupplierPaymentTermId;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_account.domain.Account_payment_term odooPaymentTerm;
...@@ -188,6 +204,14 @@ public class Res_supplier extends EntityMP implements Serializable { ...@@ -188,6 +204,14 @@ public class Res_supplier extends EntityMP implements Serializable {
this.modify("category_id",categoryId); this.modify("category_id",categoryId);
} }
/**
* 设置 [采购付款条款]
*/
public void setPropertySupplierPaymentTermId(Long propertySupplierPaymentTermId){
this.propertySupplierPaymentTermId = propertySupplierPaymentTermId ;
this.modify("property_supplier_payment_term_id",propertySupplierPaymentTermId);
}
@Override @Override
public Serializable getDefaultKey(boolean gen) { public Serializable getDefaultKey(boolean gen) {
......
...@@ -48,6 +48,13 @@ public class Res_supplierSearchContext extends QueryWrapperContext<Res_supplier> ...@@ -48,6 +48,13 @@ public class Res_supplierSearchContext extends QueryWrapperContext<Res_supplier>
this.getSearchCond().eq("company_type", n_company_type_eq); this.getSearchCond().eq("company_type", n_company_type_eq);
} }
} }
private Long n_property_supplier_payment_term_id_eq;//[采购付款条款]
public void setN_property_supplier_payment_term_id_eq(Long n_property_supplier_payment_term_id_eq) {
this.n_property_supplier_payment_term_id_eq = n_property_supplier_payment_term_id_eq;
if(!ObjectUtils.isEmpty(this.n_property_supplier_payment_term_id_eq)){
this.getSearchCond().eq("property_supplier_payment_term_id", n_property_supplier_payment_term_id_eq);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -62,6 +62,8 @@ public interface Res_supplierMapper extends BaseMapper<Res_supplier>{ ...@@ -62,6 +62,8 @@ public interface Res_supplierMapper extends BaseMapper<Res_supplier>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Res_supplier> selectByPropertySupplierPaymentTermId(@Param("id") Serializable id) ;
boolean saveRelByCategoryId(@Param("partner_id") Long partner_id, List<cn.ibizlab.businesscentral.util.domain.MultiSelectItem> res_partner_categories); boolean saveRelByCategoryId(@Param("partner_id") Long partner_id, List<cn.ibizlab.businesscentral.util.domain.MultiSelectItem> res_partner_categories);
......
...@@ -38,6 +38,8 @@ public interface IRes_supplierService extends IService<Res_supplier>{ ...@@ -38,6 +38,8 @@ public interface IRes_supplierService extends IService<Res_supplier>{
boolean save(Res_supplier et) ; boolean save(Res_supplier et) ;
void saveBatch(List<Res_supplier> list) ; void saveBatch(List<Res_supplier> list) ;
Page<Res_supplier> searchDefault(Res_supplierSearchContext context) ; Page<Res_supplier> searchDefault(Res_supplierSearchContext context) ;
List<Res_supplier> selectByPropertySupplierPaymentTermId(Long id);
void removeByPropertySupplierPaymentTermId(Long id);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -62,6 +62,9 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper, ...@@ -62,6 +62,9 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_supplier_res_partner_category_relService resSupplierResPartnerCategoryRelService; protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_supplier_res_partner_category_relService resSupplierResPartnerCategoryRelService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_account.service.IAccount_payment_termService accountPaymentTermService;
protected int batchSize = 500; protected int batchSize = 500;
...@@ -215,6 +218,15 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper, ...@@ -215,6 +218,15 @@ public class Res_supplierServiceImpl extends EBSServiceImpl<Res_supplierMapper,
} }
@Override
public List<Res_supplier> selectByPropertySupplierPaymentTermId(Long id) {
return baseMapper.selectByPropertySupplierPaymentTermId(id);
}
@Override
public void removeByPropertySupplierPaymentTermId(Long id) {
this.remove(new QueryWrapper<Res_supplier>().eq("property_supplier_payment_term_id",id));
}
/** /**
* 查询集合 数据集 * 查询集合 数据集
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_supplierResultMap" databaseId="postgresql"> <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.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.PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t1.TYPE, t1.VAT FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
</select> </select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
...@@ -14,10 +14,20 @@ ...@@ -14,10 +14,20 @@
<result property="companyType" column="company_type" /> <result property="companyType" column="company_type" />
<result property="websiteUrl" column="website_url" /> <result property="websiteUrl" column="website_url" />
<result property="categoryId" column="category_id" /> <result property="categoryId" column="category_id" />
<result property="propertySupplierPaymentTermId" column="property_supplier_payment_term_id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooPaymentTerm" javaType="cn.ibizlab.businesscentral.core.odoo_account.domain.Account_payment_term" column="property_supplier_payment_term_id" select="cn.ibizlab.businesscentral.core.odoo_account.mapper.Account_payment_termMapper.selectById" fetchType="lazy"></association>
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_SUPPLIER_ACCOUNT_PAYMENT_TERM_PROPERTY_SUPPLIER_PAYMENT_TERM_ID] -->
<select id="selectByPropertySupplierPaymentTermId" resultMap="Res_supplierResultMap">
select t1.* from (
<include refid="Default" />
) t1
where property_supplier_payment_term_id=#{id}
</select>
<!--数据集合[Default]--> <!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_supplierSearchContext" resultMap="Res_supplierResultMap"> <select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_supplierSearchContext" resultMap="Res_supplierResultMap">
...@@ -30,12 +40,12 @@ ...@@ -30,12 +40,12 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql"> <sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1 <![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
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="postgresql"> <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.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.PROPERTY_SUPPLIER_PAYMENT_TERM_ID, t1.TYPE, t1.VAT FROM RES_PARTNER t1
]]> ]]>
</sql> </sql>
......
...@@ -23957,6 +23957,12 @@ ...@@ -23957,6 +23957,12 @@
"entity_name":"PURCHASE_ORDER", "entity_name":"PURCHASE_ORDER",
"ref_entity_name":"ACCOUNT_PAYMENT_TERM" "ref_entity_name":"ACCOUNT_PAYMENT_TERM"
}, },
{"name":"DER1N_RES_SUPPLIER_ACCOUNT_PAYMENT_TERM_PROPERTY_SUPPLIER_PAYMENT_TERM_ID",
"relation_type":"DER1N",
"code_name":"Odoo_payment_term",
"entity_name":"RES_SUPPLIER",
"ref_entity_name":"ACCOUNT_PAYMENT_TERM"
},
{"name":"DER1N_SALE_ORDER__ACCOUNT_PAYMENT_TERM__PAYMENT_TERM_ID", {"name":"DER1N_SALE_ORDER__ACCOUNT_PAYMENT_TERM__PAYMENT_TERM_ID",
"relation_type":"DER1N", "relation_type":"DER1N",
"code_name":"Odoo_payment_term", "code_name":"Odoo_payment_term",
...@@ -151402,6 +151408,23 @@ ...@@ -151402,6 +151408,23 @@
"key_field":0, "key_field":0,
"show_order":1000, "show_order":1000,
"major_field":0 "major_field":0
},
{
"fieldname":"PROPERTY_SUPPLIER_PAYMENT_TERM_ID" ,
"codename":"Property_supplier_payment_term_id",
"field_logic_name":"采购付款条款",
"entity_name":"Res_supplier",
"ref_de":"ACCOUNT_PAYMENT_TERM",
"ref_field_name":"ID",
"relation_name":"DER1N_RES_SUPPLIER_ACCOUNT_PAYMENT_TERM_PROPERTY_SUPPLIER_PAYMENT_TERM_ID",
"relation_codename":"Odoo_payment_term",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"show_order":1000,
"major_field":0
} }
], ],
"subEntitys":[ "subEntitys":[
...@@ -151431,6 +151454,12 @@ ...@@ -151431,6 +151454,12 @@
} }
], ],
"parentEntitys":[ "parentEntitys":[
{"name":"DER1N_RES_SUPPLIER_ACCOUNT_PAYMENT_TERM_PROPERTY_SUPPLIER_PAYMENT_TERM_ID",
"relation_type":"DER1N",
"code_name":"Odoo_payment_term",
"entity_name":"RES_SUPPLIER",
"ref_entity_name":"ACCOUNT_PAYMENT_TERM"
}
] ]
} }
, ,
...@@ -126,6 +126,15 @@ public class Res_supplierDTO extends DTOBase implements Serializable { ...@@ -126,6 +126,15 @@ public class Res_supplierDTO extends DTOBase implements Serializable {
@JSONField(name = "category_id") @JSONField(name = "category_id")
@JsonProperty("category_id") @JsonProperty("category_id")
private String categoryId; private String categoryId;
/**
* 属性 [PROPERTY_SUPPLIER_PAYMENT_TERM_ID]
*
*/
@JSONField(name = "property_supplier_payment_term_id")
@JsonProperty("property_supplier_payment_term_id")
@JsonSerialize(using = ToStringSerializer.class)
private Long propertySupplierPaymentTermId;
/** /**
* 设置 [NAME] * 设置 [NAME]
...@@ -191,6 +200,14 @@ public class Res_supplierDTO extends DTOBase implements Serializable { ...@@ -191,6 +200,14 @@ public class Res_supplierDTO extends DTOBase implements Serializable {
this.modify("category_id",categoryId); this.modify("category_id",categoryId);
} }
/**
* 设置 [PROPERTY_SUPPLIER_PAYMENT_TERM_ID]
*/
public void setPropertySupplierPaymentTermId(Long propertySupplierPaymentTermId){
this.propertySupplierPaymentTermId = propertySupplierPaymentTermId ;
this.modify("property_supplier_payment_term_id",propertySupplierPaymentTermId);
}
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册