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

xignzi006 发布系统代码,后台体系[Spring Boot]

上级 38d16f8d
......@@ -134,13 +134,6 @@ public class Purchase_order_line extends EntityMP implements Serializable {
@JSONField(name = "product_uom_qty")
@JsonProperty("product_uom_qty")
private Double productUomQty;
/**
* 税率
*/
@TableField(exist = false)
@JSONField(name = "taxes_id")
@JsonProperty("taxes_id")
private String taxesId;
/**
* 账单明细行
*/
......@@ -421,6 +414,14 @@ public class Purchase_order_line extends EntityMP implements Serializable {
@JSONField(name = "product_uom_category_id")
@JsonProperty("product_uom_category_id")
private Long productUomCategoryId;
/**
* 税率
*/
@TableField(exist = false)
@JSONField(name = "taxes_id")
@JsonProperty("taxes_id")
private String taxesId;
/**
*
......@@ -698,6 +699,14 @@ public class Purchase_order_line extends EntityMP implements Serializable {
this.modify("partner_id",partnerId);
}
/**
* 设置 [税率]
*/
public void setTaxesId(String taxesId){
this.taxesId = taxesId ;
this.modify("taxes_id",taxesId);
}
@Override
public Serializable getDefaultKey(boolean gen) {
......
......@@ -88,4 +88,6 @@ public interface Purchase_order_lineMapper extends BaseMapper<Purchase_order_lin
List<Purchase_order_line> selectByProductUom(@Param("id") Serializable id) ;
boolean saveRelByOdoo_purchase_order_line(@Param("purchase_order_line_id") Long purchase_order_line_id, List<cn.ibizlab.businesscentral.util.domain.MultiSelectItem> account_taxes);
}
......@@ -112,6 +112,8 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
@Override
@Transactional
public boolean create(Purchase_order_line et) {
String taxes_id = et.getTaxesId() ;
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;
......@@ -132,6 +134,10 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
if (messageinfo && !mail_notrack) {
}
if(org.apache.commons.lang3.StringUtils.isNotBlank(et.getTaxesId())){
this.baseMapper.saveRelByOdoo_purchase_order_line(et.getId() , com.alibaba.fastjson.JSONArray.parseArray(taxes_id, cn.ibizlab.businesscentral.util.domain.MultiSelectItem.class));
}
return true;
}
......@@ -145,6 +151,13 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
@Override
@Transactional
public boolean update(Purchase_order_line et) {
if(et.getFocusNull().contains("taxes_id") || org.apache.commons.lang3.StringUtils.isNotBlank(et.getTaxesId())){
accountTaxPurchaseOrderLineRelService.removeByPartnerId(et.getId());
if(org.apache.commons.lang3.StringUtils.isNotBlank(et.getTaxesId())){
this.baseMapper.saveRelByOdoo_purchase_order_line(et.getId() , com.alibaba.fastjson.JSONArray.parseArray(et.getTaxesId(), cn.ibizlab.businesscentral.util.domain.MultiSelectItem.class));
}
}
Purchase_order_line old = new Purchase_order_line() ;
CachedBeanCopier.copy(get(et.getId()), old);
boolean mail_notrack = et.get("mail_notrack") != null;
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Purchase_order_lineResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ACCOUNT_ANALYTIC_ID, t131.NAME AS ACCOUNT_ANALYTIC_ID_TEXT, t1.COMPANY_ID, t111.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t151.NAME AS CURRENCY_ID_TEXT, t121.DATE_ORDER, t1.DATE_PLANNED, t1.ID, t1.NAME, t1.ORDERPOINT_ID, t41.NAME AS ORDERPOINT_ID_TEXT, t1.ORDER_ID, t121.NAME AS ORDER_ID_TEXT, t1.PARTNER_ID, t11.NAME AS PARTNER_ID_TEXT, t1.PRICE_SUBTOTAL, t1.PRICE_TAX, t1.PRICE_TOTAL, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t71.TYPE AS PRODUCT_TYPE, t1.PRODUCT_UOM, t141.CATEGORY_ID AS PRODUCT_UOM_CATEGORY_ID, t1.PRODUCT_UOM_QTY, t141.NAME AS PRODUCT_UOM_TEXT, t1.QTY_INVOICED, t1.QTY_RECEIVED, t1.SALE_LINE_ID, t161.NAME AS SALE_LINE_ID_TEXT, t1.SALE_ORDER_ID, t51.NAME AS SALE_ORDER_ID_TEXT, t1.SEQUENCE, t121.STATE, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER_LINE t1 LEFT JOIN RES_PARTNER t11 ON t1.PARTNER_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN STOCK_WAREHOUSE_ORDERPOINT t41 ON t1.ORDERPOINT_ID = t41.ID LEFT JOIN SALE_ORDER t51 ON t1.SALE_ORDER_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN PURCHASE_ORDER t121 ON t1.ORDER_ID = t121.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t131 ON t1.ACCOUNT_ANALYTIC_ID = t131.ID LEFT JOIN UOM_UOM t141 ON t1.PRODUCT_UOM = t141.ID LEFT JOIN RES_CURRENCY t151 ON t1.CURRENCY_ID = t151.ID LEFT JOIN SALE_ORDER_LINE t161 ON t1.SALE_LINE_ID = t161.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.ACCOUNT_ANALYTIC_ID, t131.NAME AS ACCOUNT_ANALYTIC_ID_TEXT, t1.COMPANY_ID, t111.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t151.NAME AS CURRENCY_ID_TEXT, t121.DATE_ORDER, t1.DATE_PLANNED, t1.ID, t1.NAME, t1.ORDERPOINT_ID, t41.NAME AS ORDERPOINT_ID_TEXT, t1.ORDER_ID, t121.NAME AS ORDER_ID_TEXT, t1.PARTNER_ID, t11.NAME AS PARTNER_ID_TEXT, t1.PRICE_SUBTOTAL, t1.PRICE_TAX, t1.PRICE_TOTAL, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t71.TYPE AS PRODUCT_TYPE, t1.PRODUCT_UOM, t141.CATEGORY_ID AS PRODUCT_UOM_CATEGORY_ID, t1.PRODUCT_UOM_QTY, t141.NAME AS PRODUCT_UOM_TEXT, t1.QTY_INVOICED, t1.QTY_RECEIVED, t1.SALE_LINE_ID, t161.NAME AS SALE_LINE_ID_TEXT, t1.SALE_ORDER_ID, t51.NAME AS SALE_ORDER_ID_TEXT, t1.SEQUENCE, t121.STATE, (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL M1 LEFT JOIN ACCOUNT_TAX M2 ON M1.ACCOUNT_TAX_ID = M2.ID WHERE M1.PURCHASE_ORDER_LINE_ID =T1.ID ) T) AS TAXES_ID, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER_LINE t1 LEFT JOIN RES_PARTNER t11 ON t1.PARTNER_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN STOCK_WAREHOUSE_ORDERPOINT t41 ON t1.ORDERPOINT_ID = t41.ID LEFT JOIN SALE_ORDER t51 ON t1.SALE_ORDER_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN PURCHASE_ORDER t121 ON t1.ORDER_ID = t121.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t131 ON t1.ACCOUNT_ANALYTIC_ID = t131.ID LEFT JOIN UOM_UOM t141 ON t1.PRODUCT_UOM = t141.ID LEFT JOIN RES_CURRENCY t151 ON t1.CURRENCY_ID = t151.ID LEFT JOIN SALE_ORDER_LINE t161 ON t1.SALE_LINE_ID = t161.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -21,7 +21,6 @@
<result property="LastUpdate" column="__last_update" />
<result property="displayName" column="display_name" />
<result property="productUomQty" column="product_uom_qty" />
<result property="taxesId" column="taxes_id" />
<result property="invoiceLines" column="invoice_lines" />
<result property="createDate" column="create_date" />
<result property="writeDate" column="write_date" />
......@@ -204,9 +203,20 @@
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_ANALYTIC_ID, t131.NAME AS ACCOUNT_ANALYTIC_ID_TEXT, t1.COMPANY_ID, t111.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t151.NAME AS CURRENCY_ID_TEXT, t121.DATE_ORDER, t1.DATE_PLANNED, t1.ID, t1.NAME, t1.ORDERPOINT_ID, t41.NAME AS ORDERPOINT_ID_TEXT, t1.ORDER_ID, t121.NAME AS ORDER_ID_TEXT, t1.PARTNER_ID, t11.NAME AS PARTNER_ID_TEXT, t1.PRICE_SUBTOTAL, t1.PRICE_TAX, t1.PRICE_TOTAL, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t71.TYPE AS PRODUCT_TYPE, t1.PRODUCT_UOM, t141.CATEGORY_ID AS PRODUCT_UOM_CATEGORY_ID, t1.PRODUCT_UOM_QTY, t141.NAME AS PRODUCT_UOM_TEXT, t1.QTY_INVOICED, t1.QTY_RECEIVED, t1.SALE_LINE_ID, t161.NAME AS SALE_LINE_ID_TEXT, t1.SALE_ORDER_ID, t51.NAME AS SALE_ORDER_ID_TEXT, t1.SEQUENCE, t121.STATE, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER_LINE t1 LEFT JOIN RES_PARTNER t11 ON t1.PARTNER_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN STOCK_WAREHOUSE_ORDERPOINT t41 ON t1.ORDERPOINT_ID = t41.ID LEFT JOIN SALE_ORDER t51 ON t1.SALE_ORDER_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN PURCHASE_ORDER t121 ON t1.ORDER_ID = t121.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t131 ON t1.ACCOUNT_ANALYTIC_ID = t131.ID LEFT JOIN UOM_UOM t141 ON t1.PRODUCT_UOM = t141.ID LEFT JOIN RES_CURRENCY t151 ON t1.CURRENCY_ID = t151.ID LEFT JOIN SALE_ORDER_LINE t161 ON t1.SALE_LINE_ID = t161.ID
<![CDATA[ SELECT t1.ACCOUNT_ANALYTIC_ID, t131.NAME AS ACCOUNT_ANALYTIC_ID_TEXT, t1.COMPANY_ID, t111.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t31.NAME AS CREATE_UID_TEXT, t1.CURRENCY_ID, t151.NAME AS CURRENCY_ID_TEXT, t121.DATE_ORDER, t1.DATE_PLANNED, t1.ID, t1.NAME, t1.ORDERPOINT_ID, t41.NAME AS ORDERPOINT_ID_TEXT, t1.ORDER_ID, t121.NAME AS ORDER_ID_TEXT, t1.PARTNER_ID, t11.NAME AS PARTNER_ID_TEXT, t1.PRICE_SUBTOTAL, t1.PRICE_TAX, t1.PRICE_TOTAL, t1.PRICE_UNIT, t1.PRODUCT_ID, t71.NAME AS PRODUCT_ID_TEXT, t1.PRODUCT_QTY, t71.TYPE AS PRODUCT_TYPE, t1.PRODUCT_UOM, t141.CATEGORY_ID AS PRODUCT_UOM_CATEGORY_ID, t1.PRODUCT_UOM_QTY, t141.NAME AS PRODUCT_UOM_TEXT, t1.QTY_INVOICED, t1.QTY_RECEIVED, t1.SALE_LINE_ID, t161.NAME AS SALE_LINE_ID_TEXT, t1.SALE_ORDER_ID, t51.NAME AS SALE_ORDER_ID_TEXT, t1.SEQUENCE, t121.STATE, (SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL M1 LEFT JOIN ACCOUNT_TAX M2 ON M1.ACCOUNT_TAX_ID = M2.ID WHERE M1.PURCHASE_ORDER_LINE_ID =T1.ID ) T) AS TAXES_ID, t1.WRITE_DATE, t1.WRITE_UID, t91.NAME AS WRITE_UID_TEXT FROM PURCHASE_ORDER_LINE t1 LEFT JOIN RES_PARTNER t11 ON t1.PARTNER_ID = t11.ID LEFT JOIN RES_USERS t21 ON t1.CREATE_UID = t21.ID LEFT JOIN RES_PARTNER t31 ON t21.PARTNER_ID = t31.ID LEFT JOIN STOCK_WAREHOUSE_ORDERPOINT t41 ON t1.ORDERPOINT_ID = t41.ID LEFT JOIN SALE_ORDER t51 ON t1.SALE_ORDER_ID = t51.ID LEFT JOIN PRODUCT_PRODUCT t61 ON t1.PRODUCT_ID = t61.ID LEFT JOIN PRODUCT_TEMPLATE t71 ON t61.PRODUCT_TMPL_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_COMPANY t101 ON t1.COMPANY_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN PURCHASE_ORDER t121 ON t1.ORDER_ID = t121.ID LEFT JOIN ACCOUNT_ANALYTIC_ACCOUNT t131 ON t1.ACCOUNT_ANALYTIC_ID = t131.ID LEFT JOIN UOM_UOM t141 ON t1.PRODUCT_UOM = t141.ID LEFT JOIN RES_CURRENCY t151 ON t1.CURRENCY_ID = t151.ID LEFT JOIN SALE_ORDER_LINE t161 ON t1.SALE_LINE_ID = t161.ID
]]>
</sql>
<insert id="saveRelByOdoo_purchase_order_line" parameterType="map">
INSERT INTO ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL(
PURCHASE_ORDER_LINE_ID,ACCOUNT_TAX_ID
)values
<foreach collection="account_taxes" item="item" separator=",">
(${purchase_order_line_id},#{item.srfkey})
</foreach>
ON CONFLICT (PURCHASE_ORDER_LINE_ID,ACCOUNT_TAX_ID)
DO NOTHING;
</insert>
</mapper>
......@@ -131569,20 +131569,6 @@
"major_field":0
},
{
"fieldname":"TAXES_ID" ,
"codename":"Taxes_id",
"field_logic_name":"税率",
"entity_name":"Purchase_order_line",
"field_type":"LONGTEXT",
"nullable":1,
"physical_field":0,
"data_type":"TEXT",
"data_length":1048576,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"INVOICE_LINES" ,
"codename":"Invoice_lines",
"field_logic_name":"账单明细行",
......@@ -132201,6 +132187,21 @@
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"TAXES_ID" ,
"codename":"Taxes_id",
"field_logic_name":"税率",
"entity_name":"Purchase_order_line",
"field_type":"ONE2MANYDATA",
"nullable":1,
"physical_field":0,
"data_type":"TEXT",
"data_length":1048576,
"expression":"(SELECT ARRAY_TO_JSON(ARRAY_AGG(T.*)) FROM (SELECT M2.ID AS SRFKEY, M2.NAME AS SRFMAJORTEXT FROM ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL M1 LEFT JOIN ACCOUNT_TAX M2 ON M1.ACCOUNT_TAX_ID = M2.ID WHERE M1.PURCHASE_ORDER_LINE_ID =T1.ID ) T)",
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
......@@ -132,15 +132,6 @@ public class Purchase_order_lineDTO extends DTOBase implements Serializable {
@JsonProperty("product_uom_qty")
private Double productUomQty;
/**
* 属性 [TAXES_ID]
*
*/
@JSONField(name = "taxes_id")
@JsonProperty("taxes_id")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
private String taxesId;
/**
* 属性 [INVOICE_LINES]
*
......@@ -476,6 +467,13 @@ public class Purchase_order_lineDTO extends DTOBase implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
private Long productUomCategoryId;
/**
* 属性 [TAXES_ID]
*
*/
@JSONField(name = "taxes_id")
@JsonProperty("taxes_id")
private String taxesId;
/**
* 设置 [PRICE_UNIT]
......@@ -645,6 +643,14 @@ public class Purchase_order_lineDTO extends DTOBase implements Serializable {
this.modify("partner_id",partnerId);
}
/**
* 设置 [TAXES_ID]
*/
public void setTaxesId(String taxesId){
this.taxesId = taxesId ;
this.modify("taxes_id",taxesId);
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册