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

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

上级 fed73f88
...@@ -58,4 +58,27 @@ public class account_fiscal_positionFallback implements account_fiscal_positionF ...@@ -58,4 +58,27 @@ public class account_fiscal_positionFallback implements account_fiscal_positionF
return null; return null;
} }
public Account_fiscal_position getDraft(){
return null;
}
public Boolean checkKey(Account_fiscal_position account_fiscal_position){
return false;
}
public Boolean save(Account_fiscal_position account_fiscal_position){
return false;
}
public Boolean saveBatch(List<Account_fiscal_position> account_fiscal_positions){
return false;
}
public Page<Account_fiscal_position> searchDefault(Account_fiscal_positionSearchContext context){
return null;
}
} }
...@@ -56,4 +56,24 @@ public interface account_fiscal_positionFeignClient { ...@@ -56,4 +56,24 @@ public interface account_fiscal_positionFeignClient {
Page<Account_fiscal_position> select(); Page<Account_fiscal_position> select();
@RequestMapping(method = RequestMethod.GET, value = "/account_fiscal_positions/getdraft")
Account_fiscal_position getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/account_fiscal_positions/checkkey")
Boolean checkKey(@RequestBody Account_fiscal_position account_fiscal_position);
@RequestMapping(method = RequestMethod.POST, value = "/account_fiscal_positions/save")
Boolean save(@RequestBody Account_fiscal_position account_fiscal_position);
@RequestMapping(method = RequestMethod.POST, value = "/account_fiscal_positions/savebatch")
Boolean saveBatch(@RequestBody List<Account_fiscal_position> account_fiscal_positions);
@RequestMapping(method = RequestMethod.POST, value = "/account_fiscal_positions/searchdefault")
Page<Account_fiscal_position> searchDefault(@RequestBody Account_fiscal_positionSearchContext context);
} }
...@@ -58,4 +58,27 @@ public class account_incotermsFallback implements account_incotermsFeignClient{ ...@@ -58,4 +58,27 @@ public class account_incotermsFallback implements account_incotermsFeignClient{
return null; return null;
} }
public Account_incoterms getDraft(){
return null;
}
public Boolean checkKey(Account_incoterms account_incoterms){
return false;
}
public Boolean save(Account_incoterms account_incoterms){
return false;
}
public Boolean saveBatch(List<Account_incoterms> account_incoterms){
return false;
}
public Page<Account_incoterms> searchDefault(Account_incotermsSearchContext context){
return null;
}
} }
...@@ -56,4 +56,24 @@ public interface account_incotermsFeignClient { ...@@ -56,4 +56,24 @@ public interface account_incotermsFeignClient {
Page<Account_incoterms> select(); Page<Account_incoterms> select();
@RequestMapping(method = RequestMethod.GET, value = "/account_incoterms/getdraft")
Account_incoterms getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/account_incoterms/checkkey")
Boolean checkKey(@RequestBody Account_incoterms account_incoterms);
@RequestMapping(method = RequestMethod.POST, value = "/account_incoterms/save")
Boolean save(@RequestBody Account_incoterms account_incoterms);
@RequestMapping(method = RequestMethod.POST, value = "/account_incoterms/savebatch")
Boolean saveBatch(@RequestBody List<Account_incoterms> account_incoterms);
@RequestMapping(method = RequestMethod.POST, value = "/account_incoterms/searchdefault")
Page<Account_incoterms> searchDefault(@RequestBody Account_incotermsSearchContext context);
} }
...@@ -27,6 +27,118 @@ import cn.ibizlab.businesscentral.core.odoo_account.domain.Account_fiscal_positi ...@@ -27,6 +27,118 @@ import cn.ibizlab.businesscentral.core.odoo_account.domain.Account_fiscal_positi
@Data @Data
public class Account_fiscal_positionSearchContext extends QueryWrapperContext<Account_fiscal_position> { public class Account_fiscal_positionSearchContext extends QueryWrapperContext<Account_fiscal_position> {
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_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_country_group_id_text_eq;//[国家群组]
public void setN_country_group_id_text_eq(String n_country_group_id_text_eq) {
this.n_country_group_id_text_eq = n_country_group_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_country_group_id_text_eq)){
this.getSearchCond().eq("country_group_id_text", n_country_group_id_text_eq);
}
}
private String n_country_group_id_text_like;//[国家群组]
public void setN_country_group_id_text_like(String n_country_group_id_text_like) {
this.n_country_group_id_text_like = n_country_group_id_text_like;
if(!ObjectUtils.isEmpty(this.n_country_group_id_text_like)){
this.getSearchCond().like("country_group_id_text", n_country_group_id_text_like);
}
}
private String n_company_id_text_eq;//[公司]
public void setN_company_id_text_eq(String n_company_id_text_eq) {
this.n_company_id_text_eq = n_company_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_company_id_text_eq)){
this.getSearchCond().eq("company_id_text", n_company_id_text_eq);
}
}
private String n_company_id_text_like;//[公司]
public void setN_company_id_text_like(String n_company_id_text_like) {
this.n_company_id_text_like = n_company_id_text_like;
if(!ObjectUtils.isEmpty(this.n_company_id_text_like)){
this.getSearchCond().like("company_id_text", n_company_id_text_like);
}
}
private String n_country_id_text_eq;//[国家]
public void setN_country_id_text_eq(String n_country_id_text_eq) {
this.n_country_id_text_eq = n_country_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_country_id_text_eq)){
this.getSearchCond().eq("country_id_text", n_country_id_text_eq);
}
}
private String n_country_id_text_like;//[国家]
public void setN_country_id_text_like(String n_country_id_text_like) {
this.n_country_id_text_like = n_country_id_text_like;
if(!ObjectUtils.isEmpty(this.n_country_id_text_like)){
this.getSearchCond().like("country_id_text", n_country_id_text_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 Long n_company_id_eq;//[公司]
public void setN_company_id_eq(Long n_company_id_eq) {
this.n_company_id_eq = n_company_id_eq;
if(!ObjectUtils.isEmpty(this.n_company_id_eq)){
this.getSearchCond().eq("company_id", n_company_id_eq);
}
}
private Long n_country_id_eq;//[国家]
public void setN_country_id_eq(Long n_country_id_eq) {
this.n_country_id_eq = n_country_id_eq;
if(!ObjectUtils.isEmpty(this.n_country_id_eq)){
this.getSearchCond().eq("country_id", n_country_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);
}
}
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_country_group_id_eq;//[国家群组]
public void setN_country_group_id_eq(Long n_country_group_id_eq) {
this.n_country_group_id_eq = n_country_group_id_eq;
if(!ObjectUtils.isEmpty(this.n_country_group_id_eq)){
this.getSearchCond().eq("country_group_id", n_country_group_id_eq);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -27,6 +27,55 @@ import cn.ibizlab.businesscentral.core.odoo_account.domain.Account_incoterms; ...@@ -27,6 +27,55 @@ import cn.ibizlab.businesscentral.core.odoo_account.domain.Account_incoterms;
@Data @Data
public class Account_incotermsSearchContext extends QueryWrapperContext<Account_incoterms> { public class Account_incotermsSearchContext extends QueryWrapperContext<Account_incoterms> {
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 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);
}
}
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);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Account_fiscal_positionMapper extends BaseMapper<Account_fiscal_position>{ public interface Account_fiscal_positionMapper extends BaseMapper<Account_fiscal_position>{
Page<Account_fiscal_position> searchDefault(IPage page, @Param("srf") Account_fiscal_positionSearchContext context, @Param("ew") Wrapper<Account_fiscal_position> wrapper) ;
@Override @Override
Account_fiscal_position selectById(Serializable id); Account_fiscal_position selectById(Serializable id);
@Override @Override
...@@ -61,4 +62,14 @@ public interface Account_fiscal_positionMapper extends BaseMapper<Account_fiscal ...@@ -61,4 +62,14 @@ public interface Account_fiscal_positionMapper extends BaseMapper<Account_fiscal
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Account_fiscal_position> selectByCompanyId(@Param("id") Serializable id) ;
List<Account_fiscal_position> selectByCountryGroupId(@Param("id") Serializable id) ;
List<Account_fiscal_position> selectByCountryId(@Param("id") Serializable id) ;
List<Account_fiscal_position> selectByCreateUid(@Param("id") Serializable id) ;
List<Account_fiscal_position> selectByWriteUid(@Param("id") Serializable id) ;
} }
...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Account_incotermsMapper extends BaseMapper<Account_incoterms>{ public interface Account_incotermsMapper extends BaseMapper<Account_incoterms>{
Page<Account_incoterms> searchDefault(IPage page, @Param("srf") Account_incotermsSearchContext context, @Param("ew") Wrapper<Account_incoterms> wrapper) ;
@Override @Override
Account_incoterms selectById(Serializable id); Account_incoterms selectById(Serializable id);
@Override @Override
...@@ -61,4 +62,8 @@ public interface Account_incotermsMapper extends BaseMapper<Account_incoterms>{ ...@@ -61,4 +62,8 @@ public interface Account_incotermsMapper extends BaseMapper<Account_incoterms>{
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Account_incoterms> selectByCreateUid(@Param("id") Serializable id) ;
List<Account_incoterms> selectByWriteUid(@Param("id") Serializable id) ;
} }
...@@ -33,6 +33,31 @@ public interface IAccount_fiscal_positionService extends IService<Account_fiscal ...@@ -33,6 +33,31 @@ public interface IAccount_fiscal_positionService extends IService<Account_fiscal
boolean remove(Long key) ; boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList) ;
Account_fiscal_position get(Long key) ; Account_fiscal_position get(Long key) ;
Account_fiscal_position getDraft(Account_fiscal_position et) ;
boolean checkKey(Account_fiscal_position et) ;
boolean save(Account_fiscal_position et) ;
void saveBatch(List<Account_fiscal_position> list) ;
Page<Account_fiscal_position> searchDefault(Account_fiscal_positionSearchContext context) ;
List<Account_fiscal_position> selectByCompanyId(Long id);
void resetByCompanyId(Long id);
void resetByCompanyId(Collection<Long> ids);
void removeByCompanyId(Long id);
List<Account_fiscal_position> selectByCountryGroupId(Long id);
void resetByCountryGroupId(Long id);
void resetByCountryGroupId(Collection<Long> ids);
void removeByCountryGroupId(Long id);
List<Account_fiscal_position> selectByCountryId(Long id);
void resetByCountryId(Long id);
void resetByCountryId(Collection<Long> ids);
void removeByCountryId(Long id);
List<Account_fiscal_position> selectByCreateUid(Long id);
void resetByCreateUid(Long id);
void resetByCreateUid(Collection<Long> ids);
void removeByCreateUid(Long id);
List<Account_fiscal_position> selectByWriteUid(Long id);
void resetByWriteUid(Long id);
void resetByWriteUid(Collection<Long> ids);
void removeByWriteUid(Long id);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -33,6 +33,19 @@ public interface IAccount_incotermsService extends IService<Account_incoterms>{ ...@@ -33,6 +33,19 @@ public interface IAccount_incotermsService extends IService<Account_incoterms>{
boolean remove(Long key) ; boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList) ;
Account_incoterms get(Long key) ; Account_incoterms get(Long key) ;
Account_incoterms getDraft(Account_incoterms et) ;
boolean checkKey(Account_incoterms et) ;
boolean save(Account_incoterms et) ;
void saveBatch(List<Account_incoterms> list) ;
Page<Account_incoterms> searchDefault(Account_incotermsSearchContext context) ;
List<Account_incoterms> selectByCreateUid(Long id);
void resetByCreateUid(Long id);
void resetByCreateUid(Collection<Long> ids);
void removeByCreateUid(Long id);
List<Account_incoterms> selectByWriteUid(Long id);
void resetByWriteUid(Long id);
void resetByWriteUid(Collection<Long> ids);
void removeByWriteUid(Long id);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -178,7 +178,109 @@ public class Account_fiscal_positionServiceImpl extends EBSServiceImpl<Account_f ...@@ -178,7 +178,109 @@ public class Account_fiscal_positionServiceImpl extends EBSServiceImpl<Account_f
return et; return et;
} }
@Override
public Account_fiscal_position getDraft(Account_fiscal_position et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Account_fiscal_position et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Account_fiscal_position et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Account_fiscal_position et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Account_fiscal_position> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Account_fiscal_position> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Account_fiscal_position> selectByCompanyId(Long id) {
return baseMapper.selectByCompanyId(id);
}
@Override
public void removeByCompanyId(Long id) {
this.remove(new QueryWrapper<Account_fiscal_position>().eq("company_id",id));
}
@Override
public List<Account_fiscal_position> selectByCountryGroupId(Long id) {
return baseMapper.selectByCountryGroupId(id);
}
@Override
public void removeByCountryGroupId(Long id) {
this.remove(new QueryWrapper<Account_fiscal_position>().eq("country_group_id",id));
}
@Override
public List<Account_fiscal_position> selectByCountryId(Long id) {
return baseMapper.selectByCountryId(id);
}
@Override
public void removeByCountryId(Long id) {
this.remove(new QueryWrapper<Account_fiscal_position>().eq("country_id",id));
}
@Override
public List<Account_fiscal_position> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Account_fiscal_position>().eq("create_uid",id));
}
@Override
public List<Account_fiscal_position> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Account_fiscal_position>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Account_fiscal_position> searchDefault(Account_fiscal_positionSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Account_fiscal_position> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Account_fiscal_position>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
...@@ -160,7 +160,79 @@ public class Account_incotermsServiceImpl extends EBSServiceImpl<Account_incoter ...@@ -160,7 +160,79 @@ public class Account_incotermsServiceImpl extends EBSServiceImpl<Account_incoter
return et; return et;
} }
@Override
public Account_incoterms getDraft(Account_incoterms et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Account_incoterms et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Account_incoterms et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Account_incoterms et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Account_incoterms> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Account_incoterms> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Account_incoterms> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Account_incoterms>().eq("create_uid",id));
}
@Override
public List<Account_incoterms> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Account_incoterms>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Account_incoterms> searchDefault(Account_incotermsSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Account_incoterms> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Account_incoterms>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
...@@ -58,4 +58,27 @@ public class stock_picking_typeFallback implements stock_picking_typeFeignClient ...@@ -58,4 +58,27 @@ public class stock_picking_typeFallback implements stock_picking_typeFeignClient
return null; return null;
} }
public Stock_picking_type getDraft(){
return null;
}
public Boolean checkKey(Stock_picking_type stock_picking_type){
return false;
}
public Boolean save(Stock_picking_type stock_picking_type){
return false;
}
public Boolean saveBatch(List<Stock_picking_type> stock_picking_types){
return false;
}
public Page<Stock_picking_type> searchDefault(Stock_picking_typeSearchContext context){
return null;
}
} }
...@@ -56,4 +56,24 @@ public interface stock_picking_typeFeignClient { ...@@ -56,4 +56,24 @@ public interface stock_picking_typeFeignClient {
Page<Stock_picking_type> select(); Page<Stock_picking_type> select();
@RequestMapping(method = RequestMethod.GET, value = "/stock_picking_types/getdraft")
Stock_picking_type getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/stock_picking_types/checkkey")
Boolean checkKey(@RequestBody Stock_picking_type stock_picking_type);
@RequestMapping(method = RequestMethod.POST, value = "/stock_picking_types/save")
Boolean save(@RequestBody Stock_picking_type stock_picking_type);
@RequestMapping(method = RequestMethod.POST, value = "/stock_picking_types/savebatch")
Boolean saveBatch(@RequestBody List<Stock_picking_type> stock_picking_types);
@RequestMapping(method = RequestMethod.POST, value = "/stock_picking_types/searchdefault")
Page<Stock_picking_type> searchDefault(@RequestBody Stock_picking_typeSearchContext context);
} }
...@@ -27,6 +27,146 @@ import cn.ibizlab.businesscentral.core.odoo_stock.domain.Stock_picking_type; ...@@ -27,6 +27,146 @@ import cn.ibizlab.businesscentral.core.odoo_stock.domain.Stock_picking_type;
@Data @Data
public class Stock_picking_typeSearchContext extends QueryWrapperContext<Stock_picking_type> { public class Stock_picking_typeSearchContext extends QueryWrapperContext<Stock_picking_type> {
private String n_code_eq;//[作业的类型]
public void setN_code_eq(String n_code_eq) {
this.n_code_eq = n_code_eq;
if(!ObjectUtils.isEmpty(this.n_code_eq)){
this.getSearchCond().eq("code", n_code_eq);
}
}
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_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_default_location_src_id_text_eq;//[默认源位置]
public void setN_default_location_src_id_text_eq(String n_default_location_src_id_text_eq) {
this.n_default_location_src_id_text_eq = n_default_location_src_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_default_location_src_id_text_eq)){
this.getSearchCond().eq("default_location_src_id_text", n_default_location_src_id_text_eq);
}
}
private String n_default_location_src_id_text_like;//[默认源位置]
public void setN_default_location_src_id_text_like(String n_default_location_src_id_text_like) {
this.n_default_location_src_id_text_like = n_default_location_src_id_text_like;
if(!ObjectUtils.isEmpty(this.n_default_location_src_id_text_like)){
this.getSearchCond().like("default_location_src_id_text", n_default_location_src_id_text_like);
}
}
private String n_return_picking_type_id_text_eq;//[退回的作业类型]
public void setN_return_picking_type_id_text_eq(String n_return_picking_type_id_text_eq) {
this.n_return_picking_type_id_text_eq = n_return_picking_type_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_return_picking_type_id_text_eq)){
this.getSearchCond().eq("return_picking_type_id_text", n_return_picking_type_id_text_eq);
}
}
private String n_return_picking_type_id_text_like;//[退回的作业类型]
public void setN_return_picking_type_id_text_like(String n_return_picking_type_id_text_like) {
this.n_return_picking_type_id_text_like = n_return_picking_type_id_text_like;
if(!ObjectUtils.isEmpty(this.n_return_picking_type_id_text_like)){
this.getSearchCond().like("return_picking_type_id_text", n_return_picking_type_id_text_like);
}
}
private String n_warehouse_id_text_eq;//[仓库]
public void setN_warehouse_id_text_eq(String n_warehouse_id_text_eq) {
this.n_warehouse_id_text_eq = n_warehouse_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_warehouse_id_text_eq)){
this.getSearchCond().eq("warehouse_id_text", n_warehouse_id_text_eq);
}
}
private String n_warehouse_id_text_like;//[仓库]
public void setN_warehouse_id_text_like(String n_warehouse_id_text_like) {
this.n_warehouse_id_text_like = n_warehouse_id_text_like;
if(!ObjectUtils.isEmpty(this.n_warehouse_id_text_like)){
this.getSearchCond().like("warehouse_id_text", n_warehouse_id_text_like);
}
}
private String n_default_location_dest_id_text_eq;//[默认目的位置]
public void setN_default_location_dest_id_text_eq(String n_default_location_dest_id_text_eq) {
this.n_default_location_dest_id_text_eq = n_default_location_dest_id_text_eq;
if(!ObjectUtils.isEmpty(this.n_default_location_dest_id_text_eq)){
this.getSearchCond().eq("default_location_dest_id_text", n_default_location_dest_id_text_eq);
}
}
private String n_default_location_dest_id_text_like;//[默认目的位置]
public void setN_default_location_dest_id_text_like(String n_default_location_dest_id_text_like) {
this.n_default_location_dest_id_text_like = n_default_location_dest_id_text_like;
if(!ObjectUtils.isEmpty(this.n_default_location_dest_id_text_like)){
this.getSearchCond().like("default_location_dest_id_text", n_default_location_dest_id_text_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 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_default_location_dest_id_eq;//[默认目的位置]
public void setN_default_location_dest_id_eq(Long n_default_location_dest_id_eq) {
this.n_default_location_dest_id_eq = n_default_location_dest_id_eq;
if(!ObjectUtils.isEmpty(this.n_default_location_dest_id_eq)){
this.getSearchCond().eq("default_location_dest_id", n_default_location_dest_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);
}
}
private Long n_warehouse_id_eq;//[仓库]
public void setN_warehouse_id_eq(Long n_warehouse_id_eq) {
this.n_warehouse_id_eq = n_warehouse_id_eq;
if(!ObjectUtils.isEmpty(this.n_warehouse_id_eq)){
this.getSearchCond().eq("warehouse_id", n_warehouse_id_eq);
}
}
private Long n_default_location_src_id_eq;//[默认源位置]
public void setN_default_location_src_id_eq(Long n_default_location_src_id_eq) {
this.n_default_location_src_id_eq = n_default_location_src_id_eq;
if(!ObjectUtils.isEmpty(this.n_default_location_src_id_eq)){
this.getSearchCond().eq("default_location_src_id", n_default_location_src_id_eq);
}
}
private Long n_return_picking_type_id_eq;//[退回的作业类型]
public void setN_return_picking_type_id_eq(Long n_return_picking_type_id_eq) {
this.n_return_picking_type_id_eq = n_return_picking_type_id_eq;
if(!ObjectUtils.isEmpty(this.n_return_picking_type_id_eq)){
this.getSearchCond().eq("return_picking_type_id", n_return_picking_type_id_eq);
}
}
/** /**
* 启用快速搜索 * 启用快速搜索
......
...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Stock_picking_typeMapper extends BaseMapper<Stock_picking_type>{ public interface Stock_picking_typeMapper extends BaseMapper<Stock_picking_type>{
Page<Stock_picking_type> searchDefault(IPage page, @Param("srf") Stock_picking_typeSearchContext context, @Param("ew") Wrapper<Stock_picking_type> wrapper) ;
@Override @Override
Stock_picking_type selectById(Serializable id); Stock_picking_type selectById(Serializable id);
@Override @Override
...@@ -61,4 +62,16 @@ public interface Stock_picking_typeMapper extends BaseMapper<Stock_picking_type> ...@@ -61,4 +62,16 @@ public interface Stock_picking_typeMapper extends BaseMapper<Stock_picking_type>
@Delete("${sql}") @Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param); boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Stock_picking_type> selectByCreateUid(@Param("id") Serializable id) ;
List<Stock_picking_type> selectByWriteUid(@Param("id") Serializable id) ;
List<Stock_picking_type> selectByDefaultLocationDestId(@Param("id") Serializable id) ;
List<Stock_picking_type> selectByDefaultLocationSrcId(@Param("id") Serializable id) ;
List<Stock_picking_type> selectByReturnPickingTypeId(@Param("id") Serializable id) ;
List<Stock_picking_type> selectByWarehouseId(@Param("id") Serializable id) ;
} }
...@@ -33,6 +33,34 @@ public interface IStock_picking_typeService extends IService<Stock_picking_type> ...@@ -33,6 +33,34 @@ public interface IStock_picking_typeService extends IService<Stock_picking_type>
boolean remove(Long key) ; boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ; void removeBatch(Collection<Long> idList) ;
Stock_picking_type get(Long key) ; Stock_picking_type get(Long key) ;
Stock_picking_type getDraft(Stock_picking_type et) ;
boolean checkKey(Stock_picking_type et) ;
boolean save(Stock_picking_type et) ;
void saveBatch(List<Stock_picking_type> list) ;
Page<Stock_picking_type> searchDefault(Stock_picking_typeSearchContext context) ;
List<Stock_picking_type> selectByCreateUid(Long id);
void resetByCreateUid(Long id);
void resetByCreateUid(Collection<Long> ids);
void removeByCreateUid(Long id);
List<Stock_picking_type> selectByWriteUid(Long id);
void resetByWriteUid(Long id);
void resetByWriteUid(Collection<Long> ids);
void removeByWriteUid(Long id);
List<Stock_picking_type> selectByDefaultLocationDestId(Long id);
void resetByDefaultLocationDestId(Long id);
void resetByDefaultLocationDestId(Collection<Long> ids);
void removeByDefaultLocationDestId(Long id);
List<Stock_picking_type> selectByDefaultLocationSrcId(Long id);
void resetByDefaultLocationSrcId(Long id);
void resetByDefaultLocationSrcId(Collection<Long> ids);
void removeByDefaultLocationSrcId(Long id);
List<Stock_picking_type> selectByReturnPickingTypeId(Long id);
void resetByReturnPickingTypeId(Long id);
void resetByReturnPickingTypeId(Collection<Long> ids);
void removeByReturnPickingTypeId(Long id);
List<Stock_picking_type> selectByWarehouseId(Long id);
void removeByWarehouseId(Collection<Long> ids);
void removeByWarehouseId(Long id);
/** /**
*自定义查询SQL *自定义查询SQL
* @param sql select * from table where id =#{et.param} * @param sql select * from table where id =#{et.param}
......
...@@ -174,7 +174,119 @@ public class Stock_picking_typeServiceImpl extends EBSServiceImpl<Stock_picking_ ...@@ -174,7 +174,119 @@ public class Stock_picking_typeServiceImpl extends EBSServiceImpl<Stock_picking_
return et; return et;
} }
@Override
public Stock_picking_type getDraft(Stock_picking_type et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Stock_picking_type et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Stock_picking_type et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Stock_picking_type et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Stock_picking_type> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Stock_picking_type> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Stock_picking_type> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Stock_picking_type>().eq("create_uid",id));
}
@Override
public List<Stock_picking_type> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Stock_picking_type>().eq("write_uid",id));
}
@Override
public List<Stock_picking_type> selectByDefaultLocationDestId(Long id) {
return baseMapper.selectByDefaultLocationDestId(id);
}
@Override
public void removeByDefaultLocationDestId(Long id) {
this.remove(new QueryWrapper<Stock_picking_type>().eq("default_location_dest_id",id));
}
@Override
public List<Stock_picking_type> selectByDefaultLocationSrcId(Long id) {
return baseMapper.selectByDefaultLocationSrcId(id);
}
@Override
public void removeByDefaultLocationSrcId(Long id) {
this.remove(new QueryWrapper<Stock_picking_type>().eq("default_location_src_id",id));
}
@Override
public List<Stock_picking_type> selectByReturnPickingTypeId(Long id) {
return baseMapper.selectByReturnPickingTypeId(id);
}
@Override
public void removeByReturnPickingTypeId(Long id) {
this.remove(new QueryWrapper<Stock_picking_type>().eq("return_picking_type_id",id));
}
@Override
public List<Stock_picking_type> selectByWarehouseId(Long id) {
return baseMapper.selectByWarehouseId(id);
}
@Override
public void removeByWarehouseId(Long id) {
this.remove(new QueryWrapper<Stock_picking_type>().eq("warehouse_id",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Stock_picking_type> searchDefault(Stock_picking_typeSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Stock_picking_type> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Stock_picking_type>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_account.mapper.Account_fiscal_positionMapper"> <mapper namespace="cn.ibizlab.businesscentral.core.odoo_account.mapper.Account_fiscal_positionMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Account_fiscal_positionResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.AUTO_APPLY, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_GROUP_ID, t31.NAME AS COUNTRY_GROUP_ID_TEXT, t1.COUNTRY_ID, t61.NAME AS COUNTRY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.NOTE, t1.SEQUENCE, t1.VAT_REQUIRED, t1.WRITE_DATE, t1.WRITE_UID, t81.NAME AS WRITE_UID_TEXT, t1.ZIP_FROM, t1.ZIP_TO FROM ACCOUNT_FISCAL_POSITION t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_COUNTRY_GROUP t31 ON t1.COUNTRY_GROUP_ID = t31.ID LEFT JOIN RES_COMPANY t41 ON t1.COMPANY_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_COUNTRY t61 ON t1.COUNTRY_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.WRITE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Account_fiscal_positionResultMap" type="cn.ibizlab.businesscentral.core.odoo_account.domain.Account_fiscal_position" autoMapping="true"> <resultMap id="Account_fiscal_positionResultMap" type="cn.ibizlab.businesscentral.core.odoo_account.domain.Account_fiscal_position" autoMapping="true">
...@@ -45,11 +48,60 @@ ...@@ -45,11 +48,60 @@
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_COMPANY__COMPANY_ID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_COMPANY__COMPANY_ID] -->
<select id="selectByCompanyId" resultMap="Account_fiscal_positionResultMap">
select t1.* from (
<include refid="Default" />
) t1
where company_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_COUNTRY_GROUP__COUNTRY_GROUP_ID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_COUNTRY_GROUP__COUNTRY_GROUP_ID] -->
<select id="selectByCountryGroupId" resultMap="Account_fiscal_positionResultMap">
select t1.* from (
<include refid="Default" />
) t1
where country_group_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_COUNTRY__COUNTRY_ID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_COUNTRY__COUNTRY_ID] -->
<select id="selectByCountryId" resultMap="Account_fiscal_positionResultMap">
select t1.* from (
<include refid="Default" />
) t1
where country_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_USERS__CREATE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Account_fiscal_positionResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_USERS__WRITE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_FISCAL_POSITION__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Account_fiscal_positionResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_account.filter.Account_fiscal_positionSearchContext" resultMap="Account_fiscal_positionResultMap">
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.AUTO_APPLY, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_GROUP_ID, t31.NAME AS COUNTRY_GROUP_ID_TEXT, t1.COUNTRY_ID, t61.NAME AS COUNTRY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.SEQUENCE, t1.VAT_REQUIRED, t1.WRITE_DATE, t1.WRITE_UID, t81.NAME AS WRITE_UID_TEXT, t1.ZIP_FROM, t1.ZIP_TO FROM ACCOUNT_FISCAL_POSITION t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_COUNTRY_GROUP t31 ON t1.COUNTRY_GROUP_ID = t31.ID LEFT JOIN RES_COMPANY t41 ON t1.COMPANY_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_COUNTRY t61 ON t1.COUNTRY_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.WRITE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.AUTO_APPLY, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.COUNTRY_GROUP_ID, t31.NAME AS COUNTRY_GROUP_ID_TEXT, t1.COUNTRY_ID, t61.NAME AS COUNTRY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.NOTE, t1.SEQUENCE, t1.VAT_REQUIRED, t1.WRITE_DATE, t1.WRITE_UID, t81.NAME AS WRITE_UID_TEXT, t1.ZIP_FROM, t1.ZIP_TO FROM ACCOUNT_FISCAL_POSITION t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_COUNTRY_GROUP t31 ON t1.COUNTRY_GROUP_ID = t31.ID LEFT JOIN RES_COMPANY t41 ON t1.COMPANY_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_COUNTRY t61 ON t1.COUNTRY_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.WRITE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID
]]>
</sql>
</mapper> </mapper>
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_account.mapper.Account_incotermsMapper"> <mapper namespace="cn.ibizlab.businesscentral.core.odoo_account.mapper.Account_incotermsMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Account_incotermsResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.CODE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM ACCOUNT_INCOTERMS 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 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Account_incotermsResultMap" type="cn.ibizlab.businesscentral.core.odoo_account.domain.Account_incoterms" autoMapping="true"> <resultMap id="Account_incotermsResultMap" type="cn.ibizlab.businesscentral.core.odoo_account.domain.Account_incoterms" autoMapping="true">
...@@ -25,8 +28,39 @@ ...@@ -25,8 +28,39 @@
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_INCOTERMS__RES_USERS__CREATE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_INCOTERMS__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Account_incotermsResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_INCOTERMS__RES_USERS__WRITE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_ACCOUNT_INCOTERMS__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Account_incotermsResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_account.filter.Account_incotermsSearchContext" resultMap="Account_incotermsResultMap">
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.CODE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM ACCOUNT_INCOTERMS 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
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.CODE, t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM ACCOUNT_INCOTERMS 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
]]>
</sql>
</mapper> </mapper>
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_stock.mapper.Stock_picking_typeMapper"> <mapper namespace="cn.ibizlab.businesscentral.core.odoo_stock.mapper.Stock_picking_typeMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Stock_picking_typeResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.BARCODE, t1.CODE, t1.COLOR, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.DEFAULT_LOCATION_DEST_ID, t61.NAME AS DEFAULT_LOCATION_DEST_ID_TEXT, t1.DEFAULT_LOCATION_SRC_ID, t31.NAME AS DEFAULT_LOCATION_SRC_ID_TEXT, t1.ID, t1.NAME, t1.RETURN_PICKING_TYPE_ID, t41.NAME AS RETURN_PICKING_TYPE_ID_TEXT, t1.SEQUENCE, t1.SEQUENCE_ID, t1.SHOW_ENTIRE_PACKS, t1.SHOW_OPERATIONS, t1.SHOW_RESERVED, t1.USE_CREATE_LOTS, t1.USE_EXISTING_LOTS, t1.WAREHOUSE_ID, t51.NAME AS WAREHOUSE_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t81.NAME AS WRITE_UID_TEXT FROM STOCK_PICKING_TYPE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN STOCK_LOCATION t31 ON t1.DEFAULT_LOCATION_SRC_ID = t31.ID LEFT JOIN STOCK_PICKING_TYPE t41 ON t1.RETURN_PICKING_TYPE_ID = t41.ID LEFT JOIN STOCK_WAREHOUSE t51 ON t1.WAREHOUSE_ID = t51.ID LEFT JOIN STOCK_LOCATION t61 ON t1.DEFAULT_LOCATION_DEST_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.WRITE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Stock_picking_typeResultMap" type="cn.ibizlab.businesscentral.core.odoo_stock.domain.Stock_picking_type" autoMapping="true"> <resultMap id="Stock_picking_typeResultMap" type="cn.ibizlab.businesscentral.core.odoo_stock.domain.Stock_picking_type" autoMapping="true">
...@@ -59,12 +62,67 @@ ...@@ -59,12 +62,67 @@
</resultMap> </resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__RES_USERS__CREATE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Stock_picking_typeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__RES_USERS__WRITE_UID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Stock_picking_typeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__STOCK_LOCATION__DEFAULT_LOCATION_DEST_ID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__STOCK_LOCATION__DEFAULT_LOCATION_DEST_ID] -->
<select id="selectByDefaultLocationDestId" resultMap="Stock_picking_typeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where default_location_dest_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__STOCK_LOCATION__DEFAULT_LOCATION_SRC_ID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__STOCK_LOCATION__DEFAULT_LOCATION_SRC_ID] -->
<select id="selectByDefaultLocationSrcId" resultMap="Stock_picking_typeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where default_location_src_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__STOCK_PICKING_TYPE__RETURN_PICKING_TYPE_ID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__STOCK_PICKING_TYPE__RETURN_PICKING_TYPE_ID] -->
<select id="selectByReturnPickingTypeId" resultMap="Stock_picking_typeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where return_picking_type_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__STOCK_WAREHOUSE__WAREHOUSE_ID] --> <!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_STOCK_PICKING_TYPE__STOCK_WAREHOUSE__WAREHOUSE_ID] -->
<select id="selectByWarehouseId" resultMap="Stock_picking_typeResultMap">
select t1.* from (
<include refid="Default" />
) t1
where warehouse_id=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_stock.filter.Stock_picking_typeSearchContext" resultMap="Stock_picking_typeResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.BARCODE, t1.CODE, t1.COLOR, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.DEFAULT_LOCATION_DEST_ID, t61.NAME AS DEFAULT_LOCATION_DEST_ID_TEXT, t1.DEFAULT_LOCATION_SRC_ID, t31.NAME AS DEFAULT_LOCATION_SRC_ID_TEXT, t1.ID, t1.NAME, t1.RETURN_PICKING_TYPE_ID, t41.NAME AS RETURN_PICKING_TYPE_ID_TEXT, t1.SEQUENCE, t1.SEQUENCE_ID, t1.SHOW_ENTIRE_PACKS, t1.SHOW_OPERATIONS, t1.SHOW_RESERVED, t1.USE_CREATE_LOTS, t1.USE_EXISTING_LOTS, t1.WAREHOUSE_ID, t51.NAME AS WAREHOUSE_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t81.NAME AS WRITE_UID_TEXT FROM STOCK_PICKING_TYPE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN STOCK_LOCATION t31 ON t1.DEFAULT_LOCATION_SRC_ID = t31.ID LEFT JOIN STOCK_PICKING_TYPE t41 ON t1.RETURN_PICKING_TYPE_ID = t41.ID LEFT JOIN STOCK_WAREHOUSE t51 ON t1.WAREHOUSE_ID = t51.ID LEFT JOIN STOCK_LOCATION t61 ON t1.DEFAULT_LOCATION_DEST_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.WRITE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.BARCODE, t1.CODE, t1.COLOR, t1.CREATE_DATE, t1.CREATE_UID, t21.NAME AS CREATE_UID_TEXT, t1.DEFAULT_LOCATION_DEST_ID, t61.NAME AS DEFAULT_LOCATION_DEST_ID_TEXT, t1.DEFAULT_LOCATION_SRC_ID, t31.NAME AS DEFAULT_LOCATION_SRC_ID_TEXT, t1.ID, t1.NAME, t1.RETURN_PICKING_TYPE_ID, t41.NAME AS RETURN_PICKING_TYPE_ID_TEXT, t1.SEQUENCE, t1.SEQUENCE_ID, t1.SHOW_ENTIRE_PACKS, t1.SHOW_OPERATIONS, t1.SHOW_RESERVED, t1.USE_CREATE_LOTS, t1.USE_EXISTING_LOTS, t1.WAREHOUSE_ID, t51.NAME AS WAREHOUSE_ID_TEXT, t1.WRITE_DATE, t1.WRITE_UID, t81.NAME AS WRITE_UID_TEXT FROM STOCK_PICKING_TYPE t1 LEFT JOIN RES_USERS t11 ON t1.CREATE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN STOCK_LOCATION t31 ON t1.DEFAULT_LOCATION_SRC_ID = t31.ID LEFT JOIN STOCK_PICKING_TYPE t41 ON t1.RETURN_PICKING_TYPE_ID = t41.ID LEFT JOIN STOCK_WAREHOUSE t51 ON t1.WAREHOUSE_ID = t51.ID LEFT JOIN STOCK_LOCATION t61 ON t1.DEFAULT_LOCATION_DEST_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.WRITE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID
]]>
</sql>
</mapper> </mapper>
...@@ -109,6 +109,55 @@ public class Account_fiscal_positionResource { ...@@ -109,6 +109,55 @@ public class Account_fiscal_positionResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "获取税科目调整草稿", tags = {"税科目调整" }, notes = "获取税科目调整草稿")
@RequestMapping(method = RequestMethod.GET, value = "/account_fiscal_positions/getdraft")
public ResponseEntity<Account_fiscal_positionDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(account_fiscal_positionMapping.toDto(account_fiscal_positionService.getDraft(new Account_fiscal_position())));
}
@ApiOperation(value = "检查税科目调整", tags = {"税科目调整" }, notes = "检查税科目调整")
@RequestMapping(method = RequestMethod.POST, value = "/account_fiscal_positions/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Account_fiscal_positionDTO account_fiscal_positiondto) {
return ResponseEntity.status(HttpStatus.OK).body(account_fiscal_positionService.checkKey(account_fiscal_positionMapping.toDomain(account_fiscal_positiondto)));
}
@PreAuthorize("hasPermission(this.account_fiscal_positionMapping.toDomain(#account_fiscal_positiondto),'iBizBusinessCentral-Account_fiscal_position-Save')")
@ApiOperation(value = "保存税科目调整", tags = {"税科目调整" }, notes = "保存税科目调整")
@RequestMapping(method = RequestMethod.POST, value = "/account_fiscal_positions/save")
public ResponseEntity<Boolean> save(@RequestBody Account_fiscal_positionDTO account_fiscal_positiondto) {
return ResponseEntity.status(HttpStatus.OK).body(account_fiscal_positionService.save(account_fiscal_positionMapping.toDomain(account_fiscal_positiondto)));
}
@PreAuthorize("hasPermission(this.account_fiscal_positionMapping.toDomain(#account_fiscal_positiondtos),'iBizBusinessCentral-Account_fiscal_position-Save')")
@ApiOperation(value = "批量保存税科目调整", tags = {"税科目调整" }, notes = "批量保存税科目调整")
@RequestMapping(method = RequestMethod.POST, value = "/account_fiscal_positions/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Account_fiscal_positionDTO> account_fiscal_positiondtos) {
account_fiscal_positionService.saveBatch(account_fiscal_positionMapping.toDomain(account_fiscal_positiondtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Account_fiscal_position-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Account_fiscal_position-Get')")
@ApiOperation(value = "获取数据集", tags = {"税科目调整" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/account_fiscal_positions/fetchdefault")
public ResponseEntity<List<Account_fiscal_positionDTO>> fetchDefault(Account_fiscal_positionSearchContext context) {
Page<Account_fiscal_position> domains = account_fiscal_positionService.searchDefault(context) ;
List<Account_fiscal_positionDTO> list = account_fiscal_positionMapping.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-Account_fiscal_position-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Account_fiscal_position-Get')")
@ApiOperation(value = "查询数据集", tags = {"税科目调整" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/account_fiscal_positions/searchdefault")
public ResponseEntity<Page<Account_fiscal_positionDTO>> searchDefault(@RequestBody Account_fiscal_positionSearchContext context) {
Page<Account_fiscal_position> domains = account_fiscal_positionService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(account_fiscal_positionMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
} }
...@@ -109,6 +109,55 @@ public class Account_incotermsResource { ...@@ -109,6 +109,55 @@ public class Account_incotermsResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "获取贸易条款草稿", tags = {"贸易条款" }, notes = "获取贸易条款草稿")
@RequestMapping(method = RequestMethod.GET, value = "/account_incoterms/getdraft")
public ResponseEntity<Account_incotermsDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(account_incotermsMapping.toDto(account_incotermsService.getDraft(new Account_incoterms())));
}
@ApiOperation(value = "检查贸易条款", tags = {"贸易条款" }, notes = "检查贸易条款")
@RequestMapping(method = RequestMethod.POST, value = "/account_incoterms/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Account_incotermsDTO account_incotermsdto) {
return ResponseEntity.status(HttpStatus.OK).body(account_incotermsService.checkKey(account_incotermsMapping.toDomain(account_incotermsdto)));
}
@PreAuthorize("hasPermission(this.account_incotermsMapping.toDomain(#account_incotermsdto),'iBizBusinessCentral-Account_incoterms-Save')")
@ApiOperation(value = "保存贸易条款", tags = {"贸易条款" }, notes = "保存贸易条款")
@RequestMapping(method = RequestMethod.POST, value = "/account_incoterms/save")
public ResponseEntity<Boolean> save(@RequestBody Account_incotermsDTO account_incotermsdto) {
return ResponseEntity.status(HttpStatus.OK).body(account_incotermsService.save(account_incotermsMapping.toDomain(account_incotermsdto)));
}
@PreAuthorize("hasPermission(this.account_incotermsMapping.toDomain(#account_incotermsdtos),'iBizBusinessCentral-Account_incoterms-Save')")
@ApiOperation(value = "批量保存贸易条款", tags = {"贸易条款" }, notes = "批量保存贸易条款")
@RequestMapping(method = RequestMethod.POST, value = "/account_incoterms/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Account_incotermsDTO> account_incotermsdtos) {
account_incotermsService.saveBatch(account_incotermsMapping.toDomain(account_incotermsdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Account_incoterms-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Account_incoterms-Get')")
@ApiOperation(value = "获取数据集", tags = {"贸易条款" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/account_incoterms/fetchdefault")
public ResponseEntity<List<Account_incotermsDTO>> fetchDefault(Account_incotermsSearchContext context) {
Page<Account_incoterms> domains = account_incotermsService.searchDefault(context) ;
List<Account_incotermsDTO> list = account_incotermsMapping.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-Account_incoterms-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Account_incoterms-Get')")
@ApiOperation(value = "查询数据集", tags = {"贸易条款" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/account_incoterms/searchdefault")
public ResponseEntity<Page<Account_incotermsDTO>> searchDefault(@RequestBody Account_incotermsSearchContext context) {
Page<Account_incoterms> domains = account_incotermsService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(account_incotermsMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
} }
...@@ -109,6 +109,55 @@ public class Stock_picking_typeResource { ...@@ -109,6 +109,55 @@ public class Stock_picking_typeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "获取拣货类型草稿", tags = {"拣货类型" }, notes = "获取拣货类型草稿")
@RequestMapping(method = RequestMethod.GET, value = "/stock_picking_types/getdraft")
public ResponseEntity<Stock_picking_typeDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(stock_picking_typeMapping.toDto(stock_picking_typeService.getDraft(new Stock_picking_type())));
}
@ApiOperation(value = "检查拣货类型", tags = {"拣货类型" }, notes = "检查拣货类型")
@RequestMapping(method = RequestMethod.POST, value = "/stock_picking_types/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Stock_picking_typeDTO stock_picking_typedto) {
return ResponseEntity.status(HttpStatus.OK).body(stock_picking_typeService.checkKey(stock_picking_typeMapping.toDomain(stock_picking_typedto)));
}
@PreAuthorize("hasPermission(this.stock_picking_typeMapping.toDomain(#stock_picking_typedto),'iBizBusinessCentral-Stock_picking_type-Save')")
@ApiOperation(value = "保存拣货类型", tags = {"拣货类型" }, notes = "保存拣货类型")
@RequestMapping(method = RequestMethod.POST, value = "/stock_picking_types/save")
public ResponseEntity<Boolean> save(@RequestBody Stock_picking_typeDTO stock_picking_typedto) {
return ResponseEntity.status(HttpStatus.OK).body(stock_picking_typeService.save(stock_picking_typeMapping.toDomain(stock_picking_typedto)));
}
@PreAuthorize("hasPermission(this.stock_picking_typeMapping.toDomain(#stock_picking_typedtos),'iBizBusinessCentral-Stock_picking_type-Save')")
@ApiOperation(value = "批量保存拣货类型", tags = {"拣货类型" }, notes = "批量保存拣货类型")
@RequestMapping(method = RequestMethod.POST, value = "/stock_picking_types/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Stock_picking_typeDTO> stock_picking_typedtos) {
stock_picking_typeService.saveBatch(stock_picking_typeMapping.toDomain(stock_picking_typedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Stock_picking_type-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Stock_picking_type-Get')")
@ApiOperation(value = "获取数据集", tags = {"拣货类型" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/stock_picking_types/fetchdefault")
public ResponseEntity<List<Stock_picking_typeDTO>> fetchDefault(Stock_picking_typeSearchContext context) {
Page<Stock_picking_type> domains = stock_picking_typeService.searchDefault(context) ;
List<Stock_picking_typeDTO> list = stock_picking_typeMapping.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-Stock_picking_type-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Stock_picking_type-Get')")
@ApiOperation(value = "查询数据集", tags = {"拣货类型" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/stock_picking_types/searchdefault")
public ResponseEntity<Page<Stock_picking_typeDTO>> searchDefault(@RequestBody Stock_picking_typeSearchContext context) {
Page<Stock_picking_type> domains = stock_picking_typeService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(stock_picking_typeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册