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

xignzi006 发布系统代码

上级 f8c4c539
......@@ -58,4 +58,27 @@ public class res_partner_categoryFallback implements res_partner_categoryFeignCl
return null;
}
public Res_partner_category getDraft(){
return null;
}
public Boolean checkKey(Res_partner_category res_partner_category){
return false;
}
public Boolean save(Res_partner_category res_partner_category){
return false;
}
public Boolean saveBatch(List<Res_partner_category> res_partner_categories){
return false;
}
public Page<Res_partner_category> searchDefault(Res_partner_categorySearchContext context){
return null;
}
}
......@@ -56,4 +56,24 @@ public interface res_partner_categoryFeignClient {
Page<Res_partner_category> select();
@RequestMapping(method = RequestMethod.GET, value = "/res_partner_categories/getdraft")
Res_partner_category getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_categories/checkkey")
Boolean checkKey(@RequestBody Res_partner_category res_partner_category);
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_categories/save")
Boolean save(@RequestBody Res_partner_category res_partner_category);
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_categories/savebatch")
Boolean saveBatch(@RequestBody List<Res_partner_category> res_partner_categories);
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_categories/searchdefault")
Page<Res_partner_category> searchDefault(@RequestBody Res_partner_categorySearchContext context);
}
......@@ -27,6 +27,76 @@ import cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_category;
@Data
public class Res_partner_categorySearchContext extends QueryWrapperContext<Res_partner_category> {
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 String n_write_uid_text_eq;//[最后更新者]
public void setN_write_uid_text_eq(String n_write_uid_text_eq) {
this.n_write_uid_text_eq = n_write_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_eq)){
this.getSearchCond().eq("write_uid_text", n_write_uid_text_eq);
}
}
private String n_write_uid_text_like;//[最后更新者]
public void setN_write_uid_text_like(String n_write_uid_text_like) {
this.n_write_uid_text_like = n_write_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_write_uid_text_like)){
this.getSearchCond().like("write_uid_text", n_write_uid_text_like);
}
}
private String n_create_uid_text_eq;//[创建人]
public void setN_create_uid_text_eq(String n_create_uid_text_eq) {
this.n_create_uid_text_eq = n_create_uid_text_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_eq)){
this.getSearchCond().eq("create_uid_text", n_create_uid_text_eq);
}
}
private String n_create_uid_text_like;//[创建人]
public void setN_create_uid_text_like(String n_create_uid_text_like) {
this.n_create_uid_text_like = n_create_uid_text_like;
if(!ObjectUtils.isEmpty(this.n_create_uid_text_like)){
this.getSearchCond().like("create_uid_text", n_create_uid_text_like);
}
}
private String n_parent_id_text_eq;//[上级类别]
public void setN_parent_id_text_eq(String n_parent_id_text_eq) {
this.n_parent_id_text_eq = n_parent_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_parent_id_text_eq)){
this.getSearchCond().eq("parent_id_text", n_parent_id_text_eq);
}
}
private String n_parent_id_text_like;//[上级类别]
public void setN_parent_id_text_like(String n_parent_id_text_like) {
this.n_parent_id_text_like = n_parent_id_text_like;
if(!ObjectUtils.isEmpty(this.n_parent_id_text_like)){
this.getSearchCond().like("parent_id_text", n_parent_id_text_like);
}
}
private Long n_write_uid_eq;//[最后更新者]
public void setN_write_uid_eq(Long n_write_uid_eq) {
this.n_write_uid_eq = n_write_uid_eq;
if(!ObjectUtils.isEmpty(this.n_write_uid_eq)){
this.getSearchCond().eq("write_uid", n_write_uid_eq);
}
}
private Long n_parent_id_eq;//[上级类别]
public void setN_parent_id_eq(Long n_parent_id_eq) {
this.n_parent_id_eq = n_parent_id_eq;
if(!ObjectUtils.isEmpty(this.n_parent_id_eq)){
this.getSearchCond().eq("parent_id", n_parent_id_eq);
}
}
private Long n_create_uid_eq;//[创建人]
public void setN_create_uid_eq(Long n_create_uid_eq) {
this.n_create_uid_eq = n_create_uid_eq;
if(!ObjectUtils.isEmpty(this.n_create_uid_eq)){
this.getSearchCond().eq("create_uid", n_create_uid_eq);
}
}
/**
* 启用快速搜索
......
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Res_partner_categoryMapper extends BaseMapper<Res_partner_category>{
Page<Res_partner_category> searchDefault(IPage page, @Param("srf") Res_partner_categorySearchContext context, @Param("ew") Wrapper<Res_partner_category> wrapper) ;
@Override
Res_partner_category selectById(Serializable id);
@Override
......@@ -61,4 +62,10 @@ public interface Res_partner_categoryMapper extends BaseMapper<Res_partner_categ
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Res_partner_category> selectByParentId(@Param("id") Serializable id) ;
List<Res_partner_category> selectByCreateUid(@Param("id") Serializable id) ;
List<Res_partner_category> selectByWriteUid(@Param("id") Serializable id) ;
}
......@@ -33,6 +33,17 @@ public interface IRes_partner_categoryService extends IService<Res_partner_categ
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Res_partner_category get(Long key) ;
Res_partner_category getDraft(Res_partner_category et) ;
boolean checkKey(Res_partner_category et) ;
boolean save(Res_partner_category et) ;
void saveBatch(List<Res_partner_category> list) ;
Page<Res_partner_category> searchDefault(Res_partner_categorySearchContext context) ;
List<Res_partner_category> selectByParentId(Long id) ;
void removeByParentId(Long id) ;
List<Res_partner_category> selectByCreateUid(Long id) ;
void removeByCreateUid(Long id) ;
List<Res_partner_category> selectByWriteUid(Long id) ;
void removeByWriteUid(Long id) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -156,7 +156,89 @@ public class Res_partner_categoryServiceImpl extends EBSServiceImpl<Res_partner_
return et;
}
@Override
public Res_partner_category getDraft(Res_partner_category et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Res_partner_category et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Res_partner_category et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Res_partner_category et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Res_partner_category> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Res_partner_category> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Res_partner_category> selectByParentId(Long id) {
return baseMapper.selectByParentId(id);
}
@Override
public void removeByParentId(Long id) {
this.remove(new QueryWrapper<Res_partner_category>().eq("parent_id",id));
}
@Override
public List<Res_partner_category> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Res_partner_category>().eq("create_uid",id));
}
@Override
public List<Res_partner_category> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Res_partner_category>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Res_partner_category> searchDefault(Res_partner_categorySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Res_partner_category> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Res_partner_category>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -80,6 +80,11 @@ public class purchase_order_lineFallback implements purchase_order_lineFeignClie
return false;
}
public Page<Purchase_order_line> searchCalc_order_amount(Purchase_order_lineSearchContext context){
return null;
}
public Page<Purchase_order_line> searchDefault(Purchase_order_lineSearchContext context){
return null;
}
......
......@@ -76,6 +76,11 @@ public interface purchase_order_lineFeignClient {
@RequestMapping(method = RequestMethod.POST, value = "/purchase_order_lines/searchcalc_order_amount")
Page<Purchase_order_line> searchCalc_order_amount(@RequestBody Purchase_order_lineSearchContext context);
@RequestMapping(method = RequestMethod.POST, value = "/purchase_order_lines/searchdefault")
Page<Purchase_order_line> searchDefault(@RequestBody Purchase_order_lineSearchContext context);
......
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Purchase_order_lineMapper extends BaseMapper<Purchase_order_line>{
Page<HashMap> searchCalc_order_amount(IPage page, @Param("srf") Purchase_order_lineSearchContext context, @Param("ew") Wrapper<Purchase_order_line> wrapper) ;
Page<Purchase_order_line> searchDefault(IPage page, @Param("srf") Purchase_order_lineSearchContext context, @Param("ew") Wrapper<Purchase_order_line> wrapper) ;
@Override
Purchase_order_line selectById(Serializable id);
......
......@@ -38,6 +38,7 @@ public interface IPurchase_order_lineService extends IService<Purchase_order_lin
Purchase_order_line product_change(Purchase_order_line et) ;
boolean save(Purchase_order_line et) ;
void saveBatch(List<Purchase_order_line> list) ;
Page<HashMap> searchCalc_order_amount(Purchase_order_lineSearchContext context) ;
Page<Purchase_order_line> searchDefault(Purchase_order_lineSearchContext context) ;
List<Purchase_order_line> selectByAccountAnalyticId(Long id) ;
void removeByAccountAnalyticId(Long id) ;
......
......@@ -359,6 +359,15 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
}
/**
* 查询集合 calc_order_amount
*/
@Override
public Page<HashMap> searchCalc_order_amount(Purchase_order_lineSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<HashMap> pages=baseMapper.searchCalc_order_amount(context.getPages(),context,context.getSelectCond());
return new PageImpl<HashMap>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 数据集
*/
......
......@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partner_categoryMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_partner_categoryResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.COLOR, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.PARENT_ID, t51.NAME AS PARENT_ID_TEXT, t1.PARENT_PATH, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM RES_PARTNER_CATEGORY t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER_CATEGORY t51 ON t1.PARENT_ID = t51.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_partner_categoryResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_category" autoMapping="true">
......@@ -32,8 +35,45 @@
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER_CATEGORY__RES_PARTNER_CATEGORY__PARENT_ID] -->
<select id="selectByParentId" resultMap="Res_partner_categoryResultMap">
select t1.* from (
<include refid="Default" />
) t1
where parent_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER_CATEGORY__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Res_partner_categoryResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER_CATEGORY__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Res_partner_categoryResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_partner_categorySearchContext" resultMap="Res_partner_categoryResultMap">
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.ACTIVE, t1.COLOR, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.PARENT_ID, t51.NAME AS PARENT_ID_TEXT, t1.PARENT_PATH, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM RES_PARTNER_CATEGORY t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER_CATEGORY t51 ON t1.PARENT_ID = t51.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.COLOR, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.PARENT_ID, t51.NAME AS PARENT_ID_TEXT, t1.PARENT_PATH, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM RES_PARTNER_CATEGORY t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN RES_PARTNER_CATEGORY t51 ON t1.PARENT_ID = t51.ID
]]>
</sql>
</mapper>
......@@ -169,6 +169,19 @@
where product_uom=#{id}
</select>
<!--数据集合[Calc_order_amount]-->
<select id="searchCalc_order_amount" parameterType="cn.ibizlab.businesscentral.core.odoo_purchase.filter.Purchase_order_lineSearchContext" resultType="java.util.HashMap">
select sum(price_subtotal) as "price_subtotal",sum(price_total) as "price_total",sum(price_tax) as "price_tax",order_id as "order_id"
from (
select t1.* from (
<include refid="Calc_order_amount" />
)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>
)t1
group by order_id
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_purchase.filter.Purchase_order_lineSearchContext" resultMap="Purchase_order_lineResultMap">
select t1.* from (
......@@ -178,6 +191,11 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Calc_order_amount]-->
<sql id="Calc_order_amount" 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.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, t1.PRODUCT_UOM_QTY, t141.NAME AS PRODUCT_UOM_TEXT, t1.QTY_INVOICED, t1.QTY_RECEIVED, t1.SALE_LINE_ID, 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
]]>
</sql>
<!--数据查询[Default]-->
<sql id="Default" 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.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, t1.PRODUCT_UOM_QTY, t141.NAME AS PRODUCT_UOM_TEXT, t1.QTY_INVOICED, t1.QTY_RECEIVED, t1.SALE_LINE_ID, 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
......
......@@ -151377,6 +151377,20 @@
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"CATEGORY_ID" ,
"codename":"Category_id",
"field_logic_name":"标签",
"entity_name":"Res_supplier",
"field_type":"ONE2MANYDATA",
"nullable":1,
"physical_field":0,
"data_type":"TEXT",
"data_length":1048576,
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
......@@ -109,6 +109,55 @@ public class Res_partner_categoryResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取业务伙伴标签草稿", tags = {"业务伙伴标签" }, notes = "获取业务伙伴标签草稿")
@RequestMapping(method = RequestMethod.GET, value = "/res_partner_categories/getdraft")
public ResponseEntity<Res_partner_categoryDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(res_partner_categoryMapping.toDto(res_partner_categoryService.getDraft(new Res_partner_category())));
}
@ApiOperation(value = "检查业务伙伴标签", tags = {"业务伙伴标签" }, notes = "检查业务伙伴标签")
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_categories/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Res_partner_categoryDTO res_partner_categorydto) {
return ResponseEntity.status(HttpStatus.OK).body(res_partner_categoryService.checkKey(res_partner_categoryMapping.toDomain(res_partner_categorydto)));
}
@PreAuthorize("hasPermission(this.res_partner_categoryMapping.toDomain(#res_partner_categorydto),'iBizBusinessCentral-Res_partner_category-Save')")
@ApiOperation(value = "保存业务伙伴标签", tags = {"业务伙伴标签" }, notes = "保存业务伙伴标签")
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_categories/save")
public ResponseEntity<Boolean> save(@RequestBody Res_partner_categoryDTO res_partner_categorydto) {
return ResponseEntity.status(HttpStatus.OK).body(res_partner_categoryService.save(res_partner_categoryMapping.toDomain(res_partner_categorydto)));
}
@PreAuthorize("hasPermission(this.res_partner_categoryMapping.toDomain(#res_partner_categorydtos),'iBizBusinessCentral-Res_partner_category-Save')")
@ApiOperation(value = "批量保存业务伙伴标签", tags = {"业务伙伴标签" }, notes = "批量保存业务伙伴标签")
@RequestMapping(method = RequestMethod.POST, value = "/res_partner_categories/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Res_partner_categoryDTO> res_partner_categorydtos) {
res_partner_categoryService.saveBatch(res_partner_categoryMapping.toDomain(res_partner_categorydtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_partner_category-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_partner_category-Get')")
@ApiOperation(value = "获取数据集", tags = {"业务伙伴标签" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/res_partner_categories/fetchdefault")
public ResponseEntity<List<Res_partner_categoryDTO>> fetchDefault(Res_partner_categorySearchContext context) {
Page<Res_partner_category> domains = res_partner_categoryService.searchDefault(context) ;
List<Res_partner_categoryDTO> list = res_partner_categoryMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Res_partner_category-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Res_partner_category-Get')")
@ApiOperation(value = "查询数据集", tags = {"业务伙伴标签" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/res_partner_categories/searchdefault")
public ResponseEntity<Page<Res_partner_categoryDTO>> searchDefault(@RequestBody Res_partner_categorySearchContext context) {
Page<Res_partner_category> domains = res_partner_categoryService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(res_partner_categoryMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册