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

xignzi006 发布系统代码

上级 540b43e1
package cn.ibizlab.businesscentral.core.extensions.service;
import cn.ibizlab.businesscentral.core.odoo_purchase.service.impl.Purchase_order_lineServiceImpl;
import lombok.extern.slf4j.Slf4j;
import cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_order_line;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary;
import java.util.*;
/**
* 实体[采购订单行] 自定义服务对象
*/
@Slf4j
@Primary
@Service("Purchase_order_lineExService")
public class Purchase_order_lineExService extends Purchase_order_lineServiceImpl {
@Override
protected Class currentModelClass() {
return com.baomidou.mybatisplus.core.toolkit.ReflectionKit.getSuperClassGenericType(this.getClass().getSuperclass(), 1);
}
/**
* 自定义行为[Product_change]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Purchase_order_line product_change(Purchase_order_line et) {
return super.product_change(et);
}
}
...@@ -64,6 +64,9 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac ...@@ -64,6 +64,9 @@ public class Account_taxServiceImpl extends EBSServiceImpl<Account_taxMapper, Ac
protected cn.ibizlab.businesscentral.core.odoo_account.service.IAccount_reconcile_modelService accountReconcileModelService; protected cn.ibizlab.businesscentral.core.odoo_account.service.IAccount_reconcile_modelService accountReconcileModelService;
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IAccount_tax_purchase_order_line_relService accountTaxPurchaseOrderLineRelService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_companyService resCompanyService; protected cn.ibizlab.businesscentral.core.odoo_base.service.IRes_companyService resCompanyService;
@Autowired @Autowired
@Lazy @Lazy
......
...@@ -84,6 +84,10 @@ public class purchase_orderFallback implements purchase_orderFeignClient{ ...@@ -84,6 +84,10 @@ public class purchase_orderFallback implements purchase_orderFeignClient{
return null; return null;
} }
public Purchase_order calc_amount( Long id, Purchase_order purchase_order){
return null;
}
public Boolean checkKey(Purchase_order purchase_order){ public Boolean checkKey(Purchase_order purchase_order){
return false; return false;
} }
......
...@@ -80,6 +80,10 @@ public interface purchase_orderFeignClient { ...@@ -80,6 +80,10 @@ public interface purchase_orderFeignClient {
Purchase_order button_unlock(@PathVariable("id") Long id,@RequestBody Purchase_order purchase_order); Purchase_order button_unlock(@PathVariable("id") Long id,@RequestBody Purchase_order purchase_order);
@RequestMapping(method = RequestMethod.POST, value = "/purchase_orders/{id}/calc_amount")
Purchase_order calc_amount(@PathVariable("id") Long id,@RequestBody Purchase_order purchase_order);
@RequestMapping(method = RequestMethod.POST, value = "/purchase_orders/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/purchase_orders/checkkey")
Boolean checkKey(@RequestBody Purchase_order purchase_order); Boolean checkKey(@RequestBody Purchase_order purchase_order);
......
...@@ -69,6 +69,10 @@ public class purchase_order_lineFallback implements purchase_order_lineFeignClie ...@@ -69,6 +69,10 @@ public class purchase_order_lineFallback implements purchase_order_lineFeignClie
} }
public Purchase_order_line product_change( Long id, Purchase_order_line purchase_order_line){
return null;
}
public Boolean save(Purchase_order_line purchase_order_line){ public Boolean save(Purchase_order_line purchase_order_line){
return false; return false;
} }
......
...@@ -64,6 +64,10 @@ public interface purchase_order_lineFeignClient { ...@@ -64,6 +64,10 @@ public interface purchase_order_lineFeignClient {
Boolean checkKey(@RequestBody Purchase_order_line purchase_order_line); Boolean checkKey(@RequestBody Purchase_order_line purchase_order_line);
@RequestMapping(method = RequestMethod.POST, value = "/purchase_order_lines/{id}/product_change")
Purchase_order_line product_change(@PathVariable("id") Long id,@RequestBody Purchase_order_line purchase_order_line);
@RequestMapping(method = RequestMethod.POST, value = "/purchase_order_lines/save") @RequestMapping(method = RequestMethod.POST, value = "/purchase_order_lines/save")
Boolean save(@RequestBody Purchase_order_line purchase_order_line); Boolean save(@RequestBody Purchase_order_line purchase_order_line);
......
package cn.ibizlab.businesscentral.core.odoo_purchase.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 = "ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",resultMap = "Account_tax_purchase_order_line_relResultMap")
public class Account_tax_purchase_order_line_rel extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@DEField(isKeyField=true)
@TableField(exist = false)
@JSONField(name = "id")
@JsonProperty("id")
private Long id;
/**
* ID
*/
@DEField(name = "purchase_order_line_id")
@TableField(value = "purchase_order_line_id")
@JSONField(name = "purchase_order_line_id")
@JsonProperty("purchase_order_line_id")
private Long purchaseOrderLineId;
/**
* ID
*/
@DEField(name = "account_tax_id")
@TableField(value = "account_tax_id")
@JSONField(name = "account_tax_id")
@JsonProperty("account_tax_id")
private Long accountTaxId;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_account.domain.Account_tax odooAccountTax;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_order_line odooPurchaseOrderLine;
/**
* 设置 [ID]
*/
public void setPurchaseOrderLineId(Long purchaseOrderLineId){
this.purchaseOrderLineId = purchaseOrderLineId ;
this.modify("purchase_order_line_id",purchaseOrderLineId);
}
/**
* 设置 [ID]
*/
public void setAccountTaxId(Long accountTaxId){
this.accountTaxId = accountTaxId ;
this.modify("account_tax_id",accountTaxId);
}
@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_purchase.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_purchase.domain.Account_tax_purchase_order_line_rel;
/**
* 关系型数据实体[Account_tax_purchase_order_line_rel] 查询条件对象
*/
@Slf4j
@Data
public class Account_tax_purchase_order_line_relSearchContext extends QueryWrapperContext<Account_tax_purchase_order_line_rel> {
private Long n_purchase_order_line_id_eq;//[ID]
public void setN_purchase_order_line_id_eq(Long n_purchase_order_line_id_eq) {
this.n_purchase_order_line_id_eq = n_purchase_order_line_id_eq;
if(!ObjectUtils.isEmpty(this.n_purchase_order_line_id_eq)){
this.getSearchCond().eq("purchase_order_line_id", n_purchase_order_line_id_eq);
}
}
private Long n_account_tax_id_eq;//[ID]
public void setN_account_tax_id_eq(Long n_account_tax_id_eq) {
this.n_account_tax_id_eq = n_account_tax_id_eq;
if(!ObjectUtils.isEmpty(this.n_account_tax_id_eq)){
this.getSearchCond().eq("account_tax_id", n_account_tax_id_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
}
}
}
package cn.ibizlab.businesscentral.core.odoo_purchase.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_purchase.domain.Account_tax_purchase_order_line_rel;
import cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_tax_purchase_order_line_relSearchContext;
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 Account_tax_purchase_order_line_relMapper extends BaseMapper<Account_tax_purchase_order_line_rel>{
Page<Account_tax_purchase_order_line_rel> searchDefault(IPage page, @Param("srf") Account_tax_purchase_order_line_relSearchContext context, @Param("ew") Wrapper<Account_tax_purchase_order_line_rel> wrapper) ;
@Override
Account_tax_purchase_order_line_rel selectById(Serializable id);
@Override
int insert(Account_tax_purchase_order_line_rel entity);
@Override
int updateById(@Param(Constants.ENTITY) Account_tax_purchase_order_line_rel entity);
@Override
int update(@Param(Constants.ENTITY) Account_tax_purchase_order_line_rel entity, @Param("ew") Wrapper<Account_tax_purchase_order_line_rel> 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<Account_tax_purchase_order_line_rel> selectByAccountTaxId(@Param("id") Serializable id) ;
List<Account_tax_purchase_order_line_rel> selectByPurchaseOrderLineId(@Param("id") Serializable id) ;
}
package cn.ibizlab.businesscentral.core.odoo_purchase.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_purchase.domain.Account_tax_purchase_order_line_rel;
import cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_tax_purchase_order_line_relSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[Account_tax_purchase_order_line_rel] 服务对象接口
*/
public interface IAccount_tax_purchase_order_line_relService extends IService<Account_tax_purchase_order_line_rel>{
boolean create(Account_tax_purchase_order_line_rel et) ;
void createBatch(List<Account_tax_purchase_order_line_rel> list) ;
boolean update(Account_tax_purchase_order_line_rel et) ;
void updateBatch(List<Account_tax_purchase_order_line_rel> list) ;
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Account_tax_purchase_order_line_rel get(Long key) ;
Account_tax_purchase_order_line_rel getDraft(Account_tax_purchase_order_line_rel et) ;
boolean checkKey(Account_tax_purchase_order_line_rel et) ;
boolean save(Account_tax_purchase_order_line_rel et) ;
void saveBatch(List<Account_tax_purchase_order_line_rel> list) ;
Page<Account_tax_purchase_order_line_rel> searchDefault(Account_tax_purchase_order_line_relSearchContext context) ;
List<Account_tax_purchase_order_line_rel> selectByAccountTaxId(Long id) ;
void removeByAccountTaxId(Long id) ;
List<Account_tax_purchase_order_line_rel> selectByPurchaseOrderLineId(Long id) ;
void removeByPurchaseOrderLineId(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);
}
...@@ -39,6 +39,7 @@ public interface IPurchase_orderService extends IService<Purchase_order>{ ...@@ -39,6 +39,7 @@ public interface IPurchase_orderService extends IService<Purchase_order>{
Purchase_order button_confirm(Purchase_order et) ; Purchase_order button_confirm(Purchase_order et) ;
Purchase_order button_done(Purchase_order et) ; Purchase_order button_done(Purchase_order et) ;
Purchase_order button_unlock(Purchase_order et) ; Purchase_order button_unlock(Purchase_order et) ;
Purchase_order calc_amount(Purchase_order et) ;
boolean checkKey(Purchase_order et) ; boolean checkKey(Purchase_order et) ;
Purchase_order get_name(Purchase_order et) ; Purchase_order get_name(Purchase_order et) ;
boolean save(Purchase_order et) ; boolean save(Purchase_order et) ;
......
...@@ -35,6 +35,7 @@ public interface IPurchase_order_lineService extends IService<Purchase_order_lin ...@@ -35,6 +35,7 @@ public interface IPurchase_order_lineService extends IService<Purchase_order_lin
Purchase_order_line get(Long key) ; Purchase_order_line get(Long key) ;
Purchase_order_line getDraft(Purchase_order_line et) ; Purchase_order_line getDraft(Purchase_order_line et) ;
boolean checkKey(Purchase_order_line et) ; boolean checkKey(Purchase_order_line et) ;
Purchase_order_line product_change(Purchase_order_line et) ;
boolean save(Purchase_order_line et) ; boolean save(Purchase_order_line et) ;
void saveBatch(List<Purchase_order_line> list) ; void saveBatch(List<Purchase_order_line> list) ;
Page<Purchase_order_line> searchDefault(Purchase_order_lineSearchContext context) ; Page<Purchase_order_line> searchDefault(Purchase_order_lineSearchContext context) ;
......
package cn.ibizlab.businesscentral.core.odoo_purchase.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_purchase.domain.Account_tax_purchase_order_line_rel;
import cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_tax_purchase_order_line_relSearchContext;
import cn.ibizlab.businesscentral.core.odoo_purchase.service.IAccount_tax_purchase_order_line_relService;
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_purchase.mapper.Account_tax_purchase_order_line_relMapper;
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("Account_tax_purchase_order_line_relServiceImpl")
public class Account_tax_purchase_order_line_relServiceImpl extends EBSServiceImpl<Account_tax_purchase_order_line_relMapper, Account_tax_purchase_order_line_rel> implements IAccount_tax_purchase_order_line_relService {
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_account.service.IAccount_taxService accountTaxService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IPurchase_order_lineService purchaseOrderLineService;
protected int batchSize = 500;
public String getIrModel(){
return "account.tax.purchase.order.line.rel" ;
}
private boolean messageinfo = false ;
public void setMessageInfo(boolean messageinfo){
this.messageinfo = messageinfo ;
}
@Override
@Transactional
public boolean create(Account_tax_purchase_order_line_rel 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;
if (messageinfo && !mail_create_nosubscribe && false) {
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 && false) {
cn.ibizlab.businesscentral.util.security.SpringContextHolder.getBean(cn.ibizlab.businesscentral.core.extensions.service.Mail_tracking_valueExService.class).add_default_create_message(this,et);
}
if (messageinfo && !mail_notrack && false) {
}
return true;
}
@Override
@Transactional
public void createBatch(List<Account_tax_purchase_order_line_rel> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(Account_tax_purchase_order_line_rel et) {
Account_tax_purchase_order_line_rel old = new Account_tax_purchase_order_line_rel() ;
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 && false) {
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<Account_tax_purchase_order_line_rel> 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 Account_tax_purchase_order_line_rel get(Long key) {
Account_tax_purchase_order_line_rel et = getById(key);
if(et==null){
et=new Account_tax_purchase_order_line_rel();
}
else{
}
return et;
}
@Override
public Account_tax_purchase_order_line_rel getDraft(Account_tax_purchase_order_line_rel et) {
return et;
}
@Override
public boolean checkKey(Account_tax_purchase_order_line_rel et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Account_tax_purchase_order_line_rel et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Account_tax_purchase_order_line_rel et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Account_tax_purchase_order_line_rel> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Account_tax_purchase_order_line_rel> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Account_tax_purchase_order_line_rel> selectByAccountTaxId(Long id) {
return baseMapper.selectByAccountTaxId(id);
}
@Override
public void removeByAccountTaxId(Long id) {
this.remove(new QueryWrapper<Account_tax_purchase_order_line_rel>().eq("account_tax_id",id));
}
@Override
public List<Account_tax_purchase_order_line_rel> selectByPurchaseOrderLineId(Long id) {
return baseMapper.selectByPurchaseOrderLineId(id);
}
@Override
public void removeByPurchaseOrderLineId(Long id) {
this.remove(new QueryWrapper<Account_tax_purchase_order_line_rel>().eq("purchase_order_line_id",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Account_tax_purchase_order_line_rel> searchDefault(Account_tax_purchase_order_line_relSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Account_tax_purchase_order_line_rel> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Account_tax_purchase_order_line_rel>(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;
}
}
...@@ -233,6 +233,13 @@ public class Purchase_orderServiceImpl extends EBSServiceImpl<Purchase_orderMapp ...@@ -233,6 +233,13 @@ public class Purchase_orderServiceImpl extends EBSServiceImpl<Purchase_orderMapp
return et; return et;
} }
@Override
@Transactional
public Purchase_order calc_amount(Purchase_order et) {
//自定义代码
return et;
}
@Override @Override
public boolean checkKey(Purchase_order et) { public boolean checkKey(Purchase_order et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
......
...@@ -55,6 +55,9 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde ...@@ -55,6 +55,9 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
protected cn.ibizlab.businesscentral.core.odoo_account.service.IAccount_invoice_lineService accountInvoiceLineService; protected cn.ibizlab.businesscentral.core.odoo_account.service.IAccount_invoice_lineService accountInvoiceLineService;
@Autowired @Autowired
@Lazy @Lazy
protected cn.ibizlab.businesscentral.core.odoo_purchase.service.IAccount_tax_purchase_order_line_relService accountTaxPurchaseOrderLineRelService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.odoo_stock.service.IStock_moveService stockMoveService; protected cn.ibizlab.businesscentral.core.odoo_stock.service.IStock_moveService stockMoveService;
@Autowired @Autowired
@Lazy @Lazy
...@@ -194,6 +197,13 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde ...@@ -194,6 +197,13 @@ public class Purchase_order_lineServiceImpl extends EBSServiceImpl<Purchase_orde
public boolean checkKey(Purchase_order_line et) { public boolean checkKey(Purchase_order_line et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId()))); return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
} }
@Override
@Transactional
public Purchase_order_line product_change(Purchase_order_line et) {
//自定义代码
return et;
}
@Override @Override
@Transactional @Transactional
public boolean save(Purchase_order_line et) { public boolean save(Purchase_order_line et) {
......
...@@ -177,6 +177,9 @@ ...@@ -177,6 +177,9 @@
<!--输出实体[ACCOUNT_TAX_GROUP]数据结构 --> <!--输出实体[ACCOUNT_TAX_GROUP]数据结构 -->
<!--输出实体[ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL]数据结构 -->
<!--输出实体[ACCOUNT_TAX_TEMPLATE]数据结构 --> <!--输出实体[ACCOUNT_TAX_TEMPLATE]数据结构 -->
...@@ -1296,6 +1299,7 @@ ...@@ -1296,6 +1299,7 @@
<!--输出实体[ACCOUNT_SETUP_BANK_MANUAL_CONFIG]外键关系 --> <!--输出实体[ACCOUNT_SETUP_BANK_MANUAL_CONFIG]外键关系 -->
<!--输出实体[ACCOUNT_TAX]外键关系 --> <!--输出实体[ACCOUNT_TAX]外键关系 -->
<!--输出实体[ACCOUNT_TAX_GROUP]外键关系 --> <!--输出实体[ACCOUNT_TAX_GROUP]外键关系 -->
<!--输出实体[ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL]外键关系 -->
<!--输出实体[ACCOUNT_TAX_TEMPLATE]外键关系 --> <!--输出实体[ACCOUNT_TAX_TEMPLATE]外键关系 -->
<!--输出实体[ACCOUNT_UNRECONCILE]外键关系 --> <!--输出实体[ACCOUNT_UNRECONCILE]外键关系 -->
<!--输出实体[ASSET_ASSET]外键关系 --> <!--输出实体[ASSET_ASSET]外键关系 -->
......
<?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_purchase.mapper.Account_tax_purchase_order_line_relMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Account_tax_purchase_order_line_relResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ACCOUNT_TAX_ID, t1.PURCHASE_ORDER_LINE_ID FROM ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Account_tax_purchase_order_line_relResultMap" type="cn.ibizlab.businesscentral.core.odoo_purchase.domain.Account_tax_purchase_order_line_rel" autoMapping="true">
<result property="purchaseOrderLineId" column="purchase_order_line_id" />
<result property="accountTaxId" column="account_tax_id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooAccountTax" javaType="cn.ibizlab.businesscentral.core.odoo_account.domain.Account_tax" column="account_tax_id" select="cn.ibizlab.businesscentral.core.odoo_account.mapper.Account_taxMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooPurchaseOrderLine" javaType="cn.ibizlab.businesscentral.core.odoo_purchase.domain.Purchase_order_line" column="purchase_order_line_id" select="cn.ibizlab.businesscentral.core.odoo_purchase.mapper.Purchase_order_lineMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_ACCOUNT_TAX_ACCOUNT_TAX_ID] -->
<select id="selectByAccountTaxId" resultMap="Account_tax_purchase_order_line_relResultMap">
select t1.* from (
<include refid="Default" />
) t1
where account_tax_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_PURCHASE_ORDER_LINE_PURCHASE_ORDER_LINE_ID] -->
<select id="selectByPurchaseOrderLineId" resultMap="Account_tax_purchase_order_line_relResultMap">
select t1.* from (
<include refid="Default" />
) t1
where purchase_order_line_id=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_purchase.filter.Account_tax_purchase_order_line_relSearchContext" resultMap="Account_tax_purchase_order_line_relResultMap">
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.ACCOUNT_TAX_ID, t1.PURCHASE_ORDER_LINE_ID FROM ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_TAX_ID, t1.PURCHASE_ORDER_LINE_ID FROM ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL t1
]]>
</sql>
</mapper>
...@@ -28044,6 +28044,12 @@ ...@@ -28044,6 +28044,12 @@
"entity_name":"ACCOUNT_RECONCILE_MODEL", "entity_name":"ACCOUNT_RECONCILE_MODEL",
"ref_entity_name":"ACCOUNT_TAX" "ref_entity_name":"ACCOUNT_TAX"
}, },
{"name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_ACCOUNT_TAX_ACCOUNT_TAX_ID",
"relation_type":"DER1N",
"code_name":"Odoo_account_tax",
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"ref_entity_name":"ACCOUNT_TAX"
},
{"name":"DER1N_RES_COMPANY__ACCOUNT_TAX__ACCOUNT_PURCHASE_TAX_ID", {"name":"DER1N_RES_COMPANY__ACCOUNT_TAX__ACCOUNT_PURCHASE_TAX_ID",
"relation_type":"DER1N", "relation_type":"DER1N",
"code_name":"Odoo_account_purchase_tax", "code_name":"Odoo_account_purchase_tax",
...@@ -28313,6 +28319,80 @@ ...@@ -28313,6 +28319,80 @@
"ref_entity_name":"RES_USERS" "ref_entity_name":"RES_USERS"
} }
] ]
}
,
{
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"logic_name":"采购订单税率",
"code_name":"Account_tax_purchase_order_line_rel",
"table_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"system_id":"iBizBusinessCentral",
"system_name":"iBiz商业中心",
"fields":[
{
"fieldname":"ID" ,
"codename":"Id",
"field_logic_name":"id",
"entity_name":"Account_tax_purchase_order_line_rel",
"field_type":"ACID",
"nullable":1,
"physical_field":0,
"data_type":"BIGINT",
"key_field":1,
"show_order":1000,
"major_field":0
},
{
"fieldname":"PURCHASE_ORDER_LINE_ID" ,
"codename":"Purchase_order_line_id",
"field_logic_name":"ID",
"entity_name":"Account_tax_purchase_order_line_rel",
"ref_de":"PURCHASE_ORDER_LINE",
"ref_field_name":"ID",
"relation_name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_PURCHASE_ORDER_LINE_PURCHASE_ORDER_LINE_ID",
"relation_codename":"Odoo_purchase_order_line",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"ACCOUNT_TAX_ID" ,
"codename":"Account_tax_id",
"field_logic_name":"ID",
"entity_name":"Account_tax_purchase_order_line_rel",
"ref_de":"ACCOUNT_TAX",
"ref_field_name":"ID",
"relation_name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_ACCOUNT_TAX_ACCOUNT_TAX_ID",
"relation_codename":"Odoo_account_tax",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"BIGINT",
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_ACCOUNT_TAX_ACCOUNT_TAX_ID",
"relation_type":"DER1N",
"code_name":"Odoo_account_tax",
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"ref_entity_name":"ACCOUNT_TAX"
},
{"name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_PURCHASE_ORDER_LINE_PURCHASE_ORDER_LINE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_purchase_order_line",
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"ref_entity_name":"PURCHASE_ORDER_LINE"
}
]
} }
, ,
{ {
...@@ -132082,6 +132162,12 @@ ...@@ -132082,6 +132162,12 @@
"entity_name":"ACCOUNT_INVOICE_LINE", "entity_name":"ACCOUNT_INVOICE_LINE",
"ref_entity_name":"PURCHASE_ORDER_LINE" "ref_entity_name":"PURCHASE_ORDER_LINE"
}, },
{"name":"DER1N_ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL_PURCHASE_ORDER_LINE_PURCHASE_ORDER_LINE_ID",
"relation_type":"DER1N",
"code_name":"Odoo_purchase_order_line",
"entity_name":"ACCOUNT_TAX_PURCHASE_ORDER_LINE_REL",
"ref_entity_name":"PURCHASE_ORDER_LINE"
},
{"name":"DER1N_STOCK_MOVE__PURCHASE_ORDER_LINE__CREATED_PURCHASE_LINE_ID", {"name":"DER1N_STOCK_MOVE__PURCHASE_ORDER_LINE__CREATED_PURCHASE_LINE_ID",
"relation_type":"DER1N", "relation_type":"DER1N",
"code_name":"Odoo_created_purchase_line", "code_name":"Odoo_created_purchase_line",
...@@ -170,6 +170,17 @@ public class Purchase_orderResource { ...@@ -170,6 +170,17 @@ public class Purchase_orderResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto); return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Calc_amount-all')")
@ApiOperation(value = "calc_amount", tags = {"采购订单" }, notes = "calc_amount")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_orders/{purchase_order_id}/calc_amount")
public ResponseEntity<Purchase_orderDTO> calc_amount(@PathVariable("purchase_order_id") Long purchase_order_id, @RequestBody Purchase_orderDTO purchase_orderdto) {
Purchase_order domain = purchase_orderMapping.toDomain(purchase_orderdto);
domain.setId(purchase_order_id);
domain = purchase_orderService.calc_amount(domain);
purchase_orderdto = purchase_orderMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto);
}
@ApiOperation(value = "检查采购订单", tags = {"采购订单" }, notes = "检查采购订单") @ApiOperation(value = "检查采购订单", tags = {"采购订单" }, notes = "检查采购订单")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_orders/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/purchase_orders/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Purchase_orderDTO purchase_orderdto) { public ResponseEntity<Boolean> checkKey(@RequestBody Purchase_orderDTO purchase_orderdto) {
...@@ -382,6 +393,17 @@ public class Purchase_orderResource { ...@@ -382,6 +393,17 @@ public class Purchase_orderResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto); return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Calc_amount-all')")
@ApiOperation(value = "根据采购申请采购订单", tags = {"采购订单" }, notes = "根据采购申请采购订单")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/calc_amount")
public ResponseEntity<Purchase_orderDTO> calc_amountByPurchase_requisition(@PathVariable("purchase_requisition_id") Long purchase_requisition_id, @PathVariable("purchase_order_id") Long purchase_order_id, @RequestBody Purchase_orderDTO purchase_orderdto) {
Purchase_order domain = purchase_orderMapping.toDomain(purchase_orderdto);
domain.setRequisitionId(purchase_requisition_id);
domain = purchase_orderService.calc_amount(domain) ;
purchase_orderdto = purchase_orderMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto);
}
@ApiOperation(value = "根据采购申请检查采购订单", tags = {"采购订单" }, notes = "根据采购申请检查采购订单") @ApiOperation(value = "根据采购申请检查采购订单", tags = {"采购订单" }, notes = "根据采购申请检查采购订单")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey")
public ResponseEntity<Boolean> checkKeyByPurchase_requisition(@PathVariable("purchase_requisition_id") Long purchase_requisition_id, @RequestBody Purchase_orderDTO purchase_orderdto) { public ResponseEntity<Boolean> checkKeyByPurchase_requisition(@PathVariable("purchase_requisition_id") Long purchase_requisition_id, @RequestBody Purchase_orderDTO purchase_orderdto) {
...@@ -601,6 +623,17 @@ public class Purchase_orderResource { ...@@ -601,6 +623,17 @@ public class Purchase_orderResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto); return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Calc_amount-all')")
@ApiOperation(value = "根据供应商采购订单", tags = {"采购订单" }, notes = "根据供应商采购订单")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_orders/{purchase_order_id}/calc_amount")
public ResponseEntity<Purchase_orderDTO> calc_amountByRes_supplier(@PathVariable("res_supplier_id") Long res_supplier_id, @PathVariable("purchase_order_id") Long purchase_order_id, @RequestBody Purchase_orderDTO purchase_orderdto) {
Purchase_order domain = purchase_orderMapping.toDomain(purchase_orderdto);
domain.setPartnerId(res_supplier_id);
domain = purchase_orderService.calc_amount(domain) ;
purchase_orderdto = purchase_orderMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto);
}
@ApiOperation(value = "根据供应商检查采购订单", tags = {"采购订单" }, notes = "根据供应商检查采购订单") @ApiOperation(value = "根据供应商检查采购订单", tags = {"采购订单" }, notes = "根据供应商检查采购订单")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_orders/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_orders/checkkey")
public ResponseEntity<Boolean> checkKeyByRes_supplier(@PathVariable("res_supplier_id") Long res_supplier_id, @RequestBody Purchase_orderDTO purchase_orderdto) { public ResponseEntity<Boolean> checkKeyByRes_supplier(@PathVariable("res_supplier_id") Long res_supplier_id, @RequestBody Purchase_orderDTO purchase_orderdto) {
...@@ -820,6 +853,17 @@ public class Purchase_orderResource { ...@@ -820,6 +853,17 @@ public class Purchase_orderResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto); return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order-Calc_amount-all')")
@ApiOperation(value = "根据供应商采购申请采购订单", tags = {"采购订单" }, notes = "根据供应商采购申请采购订单")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/calc_amount")
public ResponseEntity<Purchase_orderDTO> calc_amountByRes_supplierPurchase_requisition(@PathVariable("res_supplier_id") Long res_supplier_id, @PathVariable("purchase_requisition_id") Long purchase_requisition_id, @PathVariable("purchase_order_id") Long purchase_order_id, @RequestBody Purchase_orderDTO purchase_orderdto) {
Purchase_order domain = purchase_orderMapping.toDomain(purchase_orderdto);
domain.setRequisitionId(purchase_requisition_id);
domain = purchase_orderService.calc_amount(domain) ;
purchase_orderdto = purchase_orderMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_orderdto);
}
@ApiOperation(value = "根据供应商采购申请检查采购订单", tags = {"采购订单" }, notes = "根据供应商采购申请检查采购订单") @ApiOperation(value = "根据供应商采购申请检查采购订单", tags = {"采购订单" }, notes = "根据供应商采购申请检查采购订单")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/checkkey")
public ResponseEntity<Boolean> checkKeyByRes_supplierPurchase_requisition(@PathVariable("res_supplier_id") Long res_supplier_id, @PathVariable("purchase_requisition_id") Long purchase_requisition_id, @RequestBody Purchase_orderDTO purchase_orderdto) { public ResponseEntity<Boolean> checkKeyByRes_supplierPurchase_requisition(@PathVariable("res_supplier_id") Long res_supplier_id, @PathVariable("purchase_requisition_id") Long purchase_requisition_id, @RequestBody Purchase_orderDTO purchase_orderdto) {
......
...@@ -121,6 +121,17 @@ public class Purchase_order_lineResource { ...@@ -121,6 +121,17 @@ public class Purchase_order_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto))); return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order_line-Product_change-all')")
@ApiOperation(value = "product_change", tags = {"采购订单行" }, notes = "product_change")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_order_lines/{purchase_order_line_id}/product_change")
public ResponseEntity<Purchase_order_lineDTO> product_change(@PathVariable("purchase_order_line_id") Long purchase_order_line_id, @RequestBody Purchase_order_lineDTO purchase_order_linedto) {
Purchase_order_line domain = purchase_order_lineMapping.toDomain(purchase_order_linedto);
domain.setId(purchase_order_line_id);
domain = purchase_order_lineService.product_change(domain);
purchase_order_linedto = purchase_order_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_linedto);
}
@PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')") @PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')")
@ApiOperation(value = "保存采购订单行", tags = {"采购订单行" }, notes = "保存采购订单行") @ApiOperation(value = "保存采购订单行", tags = {"采购订单行" }, notes = "保存采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_order_lines/save") @RequestMapping(method = RequestMethod.POST, value = "/purchase_order_lines/save")
...@@ -245,6 +256,17 @@ public class Purchase_order_lineResource { ...@@ -245,6 +256,17 @@ public class Purchase_order_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto))); return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order_line-Product_change-all')")
@ApiOperation(value = "根据产品采购订单行", tags = {"采购订单行" }, notes = "根据产品采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/product_products/{product_product_id}/purchase_order_lines/{purchase_order_line_id}/product_change")
public ResponseEntity<Purchase_order_lineDTO> product_changeByProduct_product(@PathVariable("product_product_id") Long product_product_id, @PathVariable("purchase_order_line_id") Long purchase_order_line_id, @RequestBody Purchase_order_lineDTO purchase_order_linedto) {
Purchase_order_line domain = purchase_order_lineMapping.toDomain(purchase_order_linedto);
domain.setProductId(product_product_id);
domain = purchase_order_lineService.product_change(domain) ;
purchase_order_linedto = purchase_order_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_linedto);
}
@PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')") @PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')")
@ApiOperation(value = "根据产品保存采购订单行", tags = {"采购订单行" }, notes = "根据产品保存采购订单行") @ApiOperation(value = "根据产品保存采购订单行", tags = {"采购订单行" }, notes = "根据产品保存采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/product_products/{product_product_id}/purchase_order_lines/save") @RequestMapping(method = RequestMethod.POST, value = "/product_products/{product_product_id}/purchase_order_lines/save")
...@@ -375,6 +397,17 @@ public class Purchase_order_lineResource { ...@@ -375,6 +397,17 @@ public class Purchase_order_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto))); return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order_line-Product_change-all')")
@ApiOperation(value = "根据采购订单采购订单行", tags = {"采购订单行" }, notes = "根据采购订单采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_orders/{purchase_order_id}/purchase_order_lines/{purchase_order_line_id}/product_change")
public ResponseEntity<Purchase_order_lineDTO> product_changeByPurchase_order(@PathVariable("purchase_order_id") Long purchase_order_id, @PathVariable("purchase_order_line_id") Long purchase_order_line_id, @RequestBody Purchase_order_lineDTO purchase_order_linedto) {
Purchase_order_line domain = purchase_order_lineMapping.toDomain(purchase_order_linedto);
domain.setOrderId(purchase_order_id);
domain = purchase_order_lineService.product_change(domain) ;
purchase_order_linedto = purchase_order_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_linedto);
}
@PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')") @PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')")
@ApiOperation(value = "根据采购订单保存采购订单行", tags = {"采购订单行" }, notes = "根据采购订单保存采购订单行") @ApiOperation(value = "根据采购订单保存采购订单行", tags = {"采购订单行" }, notes = "根据采购订单保存采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_orders/{purchase_order_id}/purchase_order_lines/save") @RequestMapping(method = RequestMethod.POST, value = "/purchase_orders/{purchase_order_id}/purchase_order_lines/save")
...@@ -505,6 +538,17 @@ public class Purchase_order_lineResource { ...@@ -505,6 +538,17 @@ public class Purchase_order_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto))); return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order_line-Product_change-all')")
@ApiOperation(value = "根据产品模板产品采购订单行", tags = {"采购订单行" }, notes = "根据产品模板产品采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/product_templates/{product_template_id}/product_products/{product_product_id}/purchase_order_lines/{purchase_order_line_id}/product_change")
public ResponseEntity<Purchase_order_lineDTO> product_changeByProduct_templateProduct_product(@PathVariable("product_template_id") Long product_template_id, @PathVariable("product_product_id") Long product_product_id, @PathVariable("purchase_order_line_id") Long purchase_order_line_id, @RequestBody Purchase_order_lineDTO purchase_order_linedto) {
Purchase_order_line domain = purchase_order_lineMapping.toDomain(purchase_order_linedto);
domain.setProductId(product_product_id);
domain = purchase_order_lineService.product_change(domain) ;
purchase_order_linedto = purchase_order_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_linedto);
}
@PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')") @PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')")
@ApiOperation(value = "根据产品模板产品保存采购订单行", tags = {"采购订单行" }, notes = "根据产品模板产品保存采购订单行") @ApiOperation(value = "根据产品模板产品保存采购订单行", tags = {"采购订单行" }, notes = "根据产品模板产品保存采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/product_templates/{product_template_id}/product_products/{product_product_id}/purchase_order_lines/save") @RequestMapping(method = RequestMethod.POST, value = "/product_templates/{product_template_id}/product_products/{product_product_id}/purchase_order_lines/save")
...@@ -635,6 +679,17 @@ public class Purchase_order_lineResource { ...@@ -635,6 +679,17 @@ public class Purchase_order_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto))); return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order_line-Product_change-all')")
@ApiOperation(value = "根据采购申请采购订单采购订单行", tags = {"采购订单行" }, notes = "根据采购申请采购订单采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/purchase_order_lines/{purchase_order_line_id}/product_change")
public ResponseEntity<Purchase_order_lineDTO> product_changeByPurchase_requisitionPurchase_order(@PathVariable("purchase_requisition_id") Long purchase_requisition_id, @PathVariable("purchase_order_id") Long purchase_order_id, @PathVariable("purchase_order_line_id") Long purchase_order_line_id, @RequestBody Purchase_order_lineDTO purchase_order_linedto) {
Purchase_order_line domain = purchase_order_lineMapping.toDomain(purchase_order_linedto);
domain.setOrderId(purchase_order_id);
domain = purchase_order_lineService.product_change(domain) ;
purchase_order_linedto = purchase_order_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_linedto);
}
@PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')") @PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')")
@ApiOperation(value = "根据采购申请采购订单保存采购订单行", tags = {"采购订单行" }, notes = "根据采购申请采购订单保存采购订单行") @ApiOperation(value = "根据采购申请采购订单保存采购订单行", tags = {"采购订单行" }, notes = "根据采购申请采购订单保存采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/purchase_order_lines/save") @RequestMapping(method = RequestMethod.POST, value = "/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/purchase_order_lines/save")
...@@ -765,6 +820,17 @@ public class Purchase_order_lineResource { ...@@ -765,6 +820,17 @@ public class Purchase_order_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto))); return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order_line-Product_change-all')")
@ApiOperation(value = "根据供应商采购订单采购订单行", tags = {"采购订单行" }, notes = "根据供应商采购订单采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_orders/{purchase_order_id}/purchase_order_lines/{purchase_order_line_id}/product_change")
public ResponseEntity<Purchase_order_lineDTO> product_changeByRes_supplierPurchase_order(@PathVariable("res_supplier_id") Long res_supplier_id, @PathVariable("purchase_order_id") Long purchase_order_id, @PathVariable("purchase_order_line_id") Long purchase_order_line_id, @RequestBody Purchase_order_lineDTO purchase_order_linedto) {
Purchase_order_line domain = purchase_order_lineMapping.toDomain(purchase_order_linedto);
domain.setOrderId(purchase_order_id);
domain = purchase_order_lineService.product_change(domain) ;
purchase_order_linedto = purchase_order_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_linedto);
}
@PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')") @PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')")
@ApiOperation(value = "根据供应商采购订单保存采购订单行", tags = {"采购订单行" }, notes = "根据供应商采购订单保存采购订单行") @ApiOperation(value = "根据供应商采购订单保存采购订单行", tags = {"采购订单行" }, notes = "根据供应商采购订单保存采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_orders/{purchase_order_id}/purchase_order_lines/save") @RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_orders/{purchase_order_id}/purchase_order_lines/save")
...@@ -895,6 +961,17 @@ public class Purchase_order_lineResource { ...@@ -895,6 +961,17 @@ public class Purchase_order_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto))); return ResponseEntity.status(HttpStatus.OK).body(purchase_order_lineService.checkKey(purchase_order_lineMapping.toDomain(purchase_order_linedto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_order_line-Product_change-all')")
@ApiOperation(value = "根据供应商采购申请采购订单采购订单行", tags = {"采购订单行" }, notes = "根据供应商采购申请采购订单采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/purchase_order_lines/{purchase_order_line_id}/product_change")
public ResponseEntity<Purchase_order_lineDTO> product_changeByRes_supplierPurchase_requisitionPurchase_order(@PathVariable("res_supplier_id") Long res_supplier_id, @PathVariable("purchase_requisition_id") Long purchase_requisition_id, @PathVariable("purchase_order_id") Long purchase_order_id, @PathVariable("purchase_order_line_id") Long purchase_order_line_id, @RequestBody Purchase_order_lineDTO purchase_order_linedto) {
Purchase_order_line domain = purchase_order_lineMapping.toDomain(purchase_order_linedto);
domain.setOrderId(purchase_order_id);
domain = purchase_order_lineService.product_change(domain) ;
purchase_order_linedto = purchase_order_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_order_linedto);
}
@PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')") @PreAuthorize("hasPermission(this.purchase_order_lineMapping.toDomain(#purchase_order_linedto),'iBizBusinessCentral-Purchase_order_line-Save')")
@ApiOperation(value = "根据供应商采购申请采购订单保存采购订单行", tags = {"采购订单行" }, notes = "根据供应商采购申请采购订单保存采购订单行") @ApiOperation(value = "根据供应商采购申请采购订单保存采购订单行", tags = {"采购订单行" }, notes = "根据供应商采购申请采购订单保存采购订单行")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/purchase_order_lines/save") @RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_orders/{purchase_order_id}/purchase_order_lines/save")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册