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

lab_gzf 发布系统代码

上级 3bf9b8b6
......@@ -58,4 +58,37 @@ public class account_taxFallback implements account_taxFeignClient{
return null;
}
public Account_tax getDraft(){
return null;
}
public Boolean checkKey(Account_tax account_tax){
return false;
}
public Boolean save(Account_tax account_tax){
return false;
}
public Boolean saveBatch(List<Account_tax> account_taxes){
return false;
}
public Page<Account_tax> searchDefault(Account_taxSearchContext context){
return null;
}
public Page<Account_tax> searchPurchase(Account_taxSearchContext context){
return null;
}
public Page<Account_tax> searchSale(Account_taxSearchContext context){
return null;
}
}
......@@ -56,4 +56,34 @@ public interface account_taxFeignClient {
Page<Account_tax> select();
@RequestMapping(method = RequestMethod.GET, value = "/account_taxes/getdraft")
Account_tax getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/account_taxes/checkkey")
Boolean checkKey(@RequestBody Account_tax account_tax);
@RequestMapping(method = RequestMethod.POST, value = "/account_taxes/save")
Boolean save(@RequestBody Account_tax account_tax);
@RequestMapping(method = RequestMethod.POST, value = "/account_taxes/savebatch")
Boolean saveBatch(@RequestBody List<Account_tax> account_taxes);
@RequestMapping(method = RequestMethod.POST, value = "/account_taxes/searchdefault")
Page<Account_tax> searchDefault(@RequestBody Account_taxSearchContext context);
@RequestMapping(method = RequestMethod.POST, value = "/account_taxes/searchpurchase")
Page<Account_tax> searchPurchase(@RequestBody Account_taxSearchContext context);
@RequestMapping(method = RequestMethod.POST, value = "/account_taxes/searchsale")
Page<Account_tax> searchSale(@RequestBody Account_taxSearchContext context);
}
......@@ -69,7 +69,7 @@ public class Account_tax extends EntityMP implements Serializable {
/**
* 税范围
*/
@DEField(name = "type_tax_use")
@DEField(defaultValue = "none")
@TableField(value = "type_tax_use")
@JSONField(name = "type_tax_use")
@JsonProperty("type_tax_use")
......
......@@ -19,6 +19,9 @@ import com.alibaba.fastjson.JSONObject;
public interface Account_taxMapper extends BaseMapper<Account_tax>{
Page<Account_tax> searchDefault(IPage page, @Param("srf") Account_taxSearchContext context, @Param("ew") Wrapper<Account_tax> wrapper) ;
Page<Account_tax> searchPurchase(IPage page, @Param("srf") Account_taxSearchContext context, @Param("ew") Wrapper<Account_tax> wrapper) ;
Page<Account_tax> searchSale(IPage page, @Param("srf") Account_taxSearchContext context, @Param("ew") Wrapper<Account_tax> wrapper) ;
@Override
Account_tax selectById(Serializable id);
@Override
......@@ -61,4 +64,20 @@ public interface Account_taxMapper extends BaseMapper<Account_tax>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Account_tax> selectByAccountId(@Param("id") Serializable id) ;
List<Account_tax> selectByCashBasisAccountId(@Param("id") Serializable id) ;
List<Account_tax> selectByCashBasisBaseAccountId(@Param("id") Serializable id) ;
List<Account_tax> selectByRefundAccountId(@Param("id") Serializable id) ;
List<Account_tax> selectByTaxGroupId(@Param("id") Serializable id) ;
List<Account_tax> selectByCompanyId(@Param("id") Serializable id) ;
List<Account_tax> selectByCreateUid(@Param("id") Serializable id) ;
List<Account_tax> selectByWriteUid(@Param("id") Serializable id) ;
}
......@@ -33,6 +33,29 @@ public interface IAccount_taxService extends IService<Account_tax>{
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Account_tax get(Long key) ;
Account_tax getDraft(Account_tax et) ;
boolean checkKey(Account_tax et) ;
boolean save(Account_tax et) ;
void saveBatch(List<Account_tax> list) ;
Page<Account_tax> searchDefault(Account_taxSearchContext context) ;
Page<Account_tax> searchPurchase(Account_taxSearchContext context) ;
Page<Account_tax> searchSale(Account_taxSearchContext context) ;
List<Account_tax> selectByAccountId(Long id) ;
void removeByAccountId(Long id) ;
List<Account_tax> selectByCashBasisAccountId(Long id) ;
void removeByCashBasisAccountId(Long id) ;
List<Account_tax> selectByCashBasisBaseAccountId(Long id) ;
void removeByCashBasisBaseAccountId(Long id) ;
List<Account_tax> selectByRefundAccountId(Long id) ;
void removeByRefundAccountId(Long id) ;
List<Account_tax> selectByTaxGroupId(Long id) ;
void removeByTaxGroupId(Long id) ;
List<Account_tax> selectByCompanyId(Long id) ;
void removeByCompanyId(Long id) ;
List<Account_tax> selectByCreateUid(Long id) ;
void removeByCreateUid(Long id) ;
List<Account_tax> selectByWriteUid(Long id) ;
void removeByWriteUid(Long id) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -135,7 +135,157 @@ public class Account_taxServiceImpl extends ServiceImpl<Account_taxMapper, Accou
return et;
}
@Override
public Account_tax getDraft(Account_tax et) {
fillParentData(et);
return et;
}
@Override
public boolean checkKey(Account_tax et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public boolean save(Account_tax et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(Account_tax et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<Account_tax> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<Account_tax> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public List<Account_tax> selectByAccountId(Long id) {
return baseMapper.selectByAccountId(id);
}
@Override
public void removeByAccountId(Long id) {
this.remove(new QueryWrapper<Account_tax>().eq("account_id",id));
}
@Override
public List<Account_tax> selectByCashBasisAccountId(Long id) {
return baseMapper.selectByCashBasisAccountId(id);
}
@Override
public void removeByCashBasisAccountId(Long id) {
this.remove(new QueryWrapper<Account_tax>().eq("cash_basis_account_id",id));
}
@Override
public List<Account_tax> selectByCashBasisBaseAccountId(Long id) {
return baseMapper.selectByCashBasisBaseAccountId(id);
}
@Override
public void removeByCashBasisBaseAccountId(Long id) {
this.remove(new QueryWrapper<Account_tax>().eq("cash_basis_base_account_id",id));
}
@Override
public List<Account_tax> selectByRefundAccountId(Long id) {
return baseMapper.selectByRefundAccountId(id);
}
@Override
public void removeByRefundAccountId(Long id) {
this.remove(new QueryWrapper<Account_tax>().eq("refund_account_id",id));
}
@Override
public List<Account_tax> selectByTaxGroupId(Long id) {
return baseMapper.selectByTaxGroupId(id);
}
@Override
public void removeByTaxGroupId(Long id) {
this.remove(new QueryWrapper<Account_tax>().eq("tax_group_id",id));
}
@Override
public List<Account_tax> selectByCompanyId(Long id) {
return baseMapper.selectByCompanyId(id);
}
@Override
public void removeByCompanyId(Long id) {
this.remove(new QueryWrapper<Account_tax>().eq("company_id",id));
}
@Override
public List<Account_tax> selectByCreateUid(Long id) {
return baseMapper.selectByCreateUid(id);
}
@Override
public void removeByCreateUid(Long id) {
this.remove(new QueryWrapper<Account_tax>().eq("create_uid",id));
}
@Override
public List<Account_tax> selectByWriteUid(Long id) {
return baseMapper.selectByWriteUid(id);
}
@Override
public void removeByWriteUid(Long id) {
this.remove(new QueryWrapper<Account_tax>().eq("write_uid",id));
}
/**
* 查询集合 数据集
*/
@Override
public Page<Account_tax> searchDefault(Account_taxSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Account_tax> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Account_tax>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 采购税率
*/
@Override
public Page<Account_tax> searchPurchase(Account_taxSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Account_tax> pages=baseMapper.searchPurchase(context.getPages(),context,context.getSelectCond());
return new PageImpl<Account_tax>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 销售税率
*/
@Override
public Page<Account_tax> searchSale(Account_taxSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Account_tax> pages=baseMapper.searchSale(context.getPages(),context,context.getSelectCond());
return new PageImpl<Account_tax>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -113,6 +113,29 @@ public class Purchase_requisition_type extends EntityMP implements Serializable
@JSONField(name = "__last_update" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("__last_update")
private Timestamp LastUpdate;
/**
* 供应商选择
*/
@TableField(value = "exclusive")
@JSONField(name = "exclusive")
@JsonProperty("exclusive")
private String exclusive;
/**
* 数量
*/
@DEField(name = "quantity_copy")
@TableField(value = "quantity_copy")
@JSONField(name = "quantity_copy")
@JsonProperty("quantity_copy")
private String quantityCopy;
/**
* 明细行
*/
@DEField(name = "line_copy")
@TableField(value = "line_copy")
@JSONField(name = "line_copy")
@JsonProperty("line_copy")
private String lineCopy;
/**
*
......@@ -192,6 +215,30 @@ public class Purchase_requisition_type extends EntityMP implements Serializable
this.modify("create_uid",createUid);
}
/**
* 设置 [供应商选择]
*/
public void setExclusive(String exclusive){
this.exclusive = exclusive ;
this.modify("exclusive",exclusive);
}
/**
* 设置 [数量]
*/
public void setQuantityCopy(String quantityCopy){
this.quantityCopy = quantityCopy ;
this.modify("quantity_copy",quantityCopy);
}
/**
* 设置 [明细行]
*/
public void setLineCopy(String lineCopy){
this.lineCopy = lineCopy ;
this.modify("line_copy",lineCopy);
}
@Override
public Serializable getDefaultKey(boolean gen) {
......
......@@ -76,6 +76,27 @@ public class Purchase_requisition_typeSearchContext extends QueryWrapperContext<
this.getSearchCond().like("create_uname", n_create_uname_like);
}
}
private String n_exclusive_eq;//[供应商选择]
public void setN_exclusive_eq(String n_exclusive_eq) {
this.n_exclusive_eq = n_exclusive_eq;
if(!ObjectUtils.isEmpty(this.n_exclusive_eq)){
this.getSearchCond().eq("exclusive", n_exclusive_eq);
}
}
private String n_quantity_copy_eq;//[数量]
public void setN_quantity_copy_eq(String n_quantity_copy_eq) {
this.n_quantity_copy_eq = n_quantity_copy_eq;
if(!ObjectUtils.isEmpty(this.n_quantity_copy_eq)){
this.getSearchCond().eq("quantity_copy", n_quantity_copy_eq);
}
}
private String n_line_copy_eq;//[明细行]
public void setN_line_copy_eq(String n_line_copy_eq) {
this.n_line_copy_eq = n_line_copy_eq;
if(!ObjectUtils.isEmpty(this.n_line_copy_eq)){
this.getSearchCond().eq("line_copy", n_line_copy_eq);
}
}
/**
* 启用快速搜索
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Purchase_requisition_typeResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_TYPE 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}]]>
<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.EXCLUSIVE, t1.ID, t1.LINE_COPY, t1.NAME, t1.QUANTITY_COPY, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_TYPE 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自动处理映射关系 -->
......@@ -18,6 +18,8 @@
<result property="createUid" column="create_uid" />
<result property="createUname" column="create_uname" />
<result property="LastUpdate" column="__last_update" />
<result property="quantityCopy" column="quantity_copy" />
<result property="lineCopy" column="line_copy" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
......@@ -52,12 +54,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_TYPE 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
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.EXCLUSIVE, t1.ID, t1.LINE_COPY, t1.NAME, t1.QUANTITY_COPY, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_TYPE 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.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.ID, t1.NAME, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_TYPE 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
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UNAME, t1.EXCLUSIVE, t1.ID, t1.LINE_COPY, t1.NAME, t1.QUANTITY_COPY, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UNAME FROM PURCHASE_REQUISITION_TYPE 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>
......
......@@ -124595,6 +124595,45 @@
"data_type":"DATETIME",
"key_field":0,
"major_field":0
},
{
"fieldname":"EXCLUSIVE" ,
"codename":"Exclusive",
"field_logic_name":"供应商选择",
"entity_name":"Purchase_requisition_type",
"field_type":"SSCODELIST",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":60,
"key_field":0,
"major_field":0
},
{
"fieldname":"QUANTITY_COPY" ,
"codename":"Quantity_copy",
"field_logic_name":"数量",
"entity_name":"Purchase_requisition_type",
"field_type":"SSCODELIST",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":60,
"key_field":0,
"major_field":0
},
{
"fieldname":"LINE_COPY" ,
"codename":"Line_copy",
"field_logic_name":"明细行",
"entity_name":"Purchase_requisition_type",
"field_type":"SSCODELIST",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":60,
"key_field":0,
"major_field":0
}
],
"subEntitys":[
......@@ -111,6 +111,33 @@ public class Purchase_requisition_typeDTO extends DTOBase implements Serializabl
@JsonProperty("__last_update")
private Timestamp LastUpdate;
/**
* 属性 [EXCLUSIVE]
*
*/
@JSONField(name = "exclusive")
@JsonProperty("exclusive")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String exclusive;
/**
* 属性 [QUANTITY_COPY]
*
*/
@JSONField(name = "quantity_copy")
@JsonProperty("quantity_copy")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String quantityCopy;
/**
* 属性 [LINE_COPY]
*
*/
@JSONField(name = "line_copy")
@JsonProperty("line_copy")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String lineCopy;
/**
* 设置 [NAME]
......@@ -152,6 +179,30 @@ public class Purchase_requisition_typeDTO extends DTOBase implements Serializabl
this.modify("create_uid",createUid);
}
/**
* 设置 [EXCLUSIVE]
*/
public void setExclusive(String exclusive){
this.exclusive = exclusive ;
this.modify("exclusive",exclusive);
}
/**
* 设置 [QUANTITY_COPY]
*/
public void setQuantityCopy(String quantityCopy){
this.quantityCopy = quantityCopy ;
this.modify("quantity_copy",quantityCopy);
}
/**
* 设置 [LINE_COPY]
*/
public void setLineCopy(String lineCopy){
this.lineCopy = lineCopy ;
this.modify("line_copy",lineCopy);
}
}
......
......@@ -109,6 +109,99 @@ public class Account_taxResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取税率草稿", tags = {"税率" }, notes = "获取税率草稿")
@RequestMapping(method = RequestMethod.GET, value = "/account_taxes/getdraft")
public ResponseEntity<Account_taxDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(account_taxMapping.toDto(account_taxService.getDraft(new Account_tax())));
}
@ApiOperation(value = "检查税率", tags = {"税率" }, notes = "检查税率")
@RequestMapping(method = RequestMethod.POST, value = "/account_taxes/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Account_taxDTO account_taxdto) {
return ResponseEntity.status(HttpStatus.OK).body(account_taxService.checkKey(account_taxMapping.toDomain(account_taxdto)));
}
@PreAuthorize("hasPermission(this.account_taxMapping.toDomain(#account_taxdto),'iBizBusinessCentral-Account_tax-Save')")
@ApiOperation(value = "保存税率", tags = {"税率" }, notes = "保存税率")
@RequestMapping(method = RequestMethod.POST, value = "/account_taxes/save")
public ResponseEntity<Boolean> save(@RequestBody Account_taxDTO account_taxdto) {
return ResponseEntity.status(HttpStatus.OK).body(account_taxService.save(account_taxMapping.toDomain(account_taxdto)));
}
@PreAuthorize("hasPermission(this.account_taxMapping.toDomain(#account_taxdtos),'iBizBusinessCentral-Account_tax-Save')")
@ApiOperation(value = "批量保存税率", tags = {"税率" }, notes = "批量保存税率")
@RequestMapping(method = RequestMethod.POST, value = "/account_taxes/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Account_taxDTO> account_taxdtos) {
account_taxService.saveBatch(account_taxMapping.toDomain(account_taxdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Account_tax-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Account_tax-Get')")
@ApiOperation(value = "获取数据集", tags = {"税率" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/account_taxes/fetchdefault")
public ResponseEntity<List<Account_taxDTO>> fetchDefault(Account_taxSearchContext context) {
Page<Account_tax> domains = account_taxService.searchDefault(context) ;
List<Account_taxDTO> list = account_taxMapping.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_tax-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Account_tax-Get')")
@ApiOperation(value = "查询数据集", tags = {"税率" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/account_taxes/searchdefault")
public ResponseEntity<Page<Account_taxDTO>> searchDefault(@RequestBody Account_taxSearchContext context) {
Page<Account_tax> domains = account_taxService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(account_taxMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Account_tax-searchPurchase-all') and hasPermission(#context,'iBizBusinessCentral-Account_tax-Get')")
@ApiOperation(value = "获取采购税率", tags = {"税率" } ,notes = "获取采购税率")
@RequestMapping(method= RequestMethod.GET , value="/account_taxes/fetchpurchase")
public ResponseEntity<List<Account_taxDTO>> fetchPurchase(Account_taxSearchContext context) {
Page<Account_tax> domains = account_taxService.searchPurchase(context) ;
List<Account_taxDTO> list = account_taxMapping.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_tax-searchPurchase-all') and hasPermission(#context,'iBizBusinessCentral-Account_tax-Get')")
@ApiOperation(value = "查询采购税率", tags = {"税率" } ,notes = "查询采购税率")
@RequestMapping(method= RequestMethod.POST , value="/account_taxes/searchpurchase")
public ResponseEntity<Page<Account_taxDTO>> searchPurchase(@RequestBody Account_taxSearchContext context) {
Page<Account_tax> domains = account_taxService.searchPurchase(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(account_taxMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Account_tax-searchSale-all') and hasPermission(#context,'iBizBusinessCentral-Account_tax-Get')")
@ApiOperation(value = "获取销售税率", tags = {"税率" } ,notes = "获取销售税率")
@RequestMapping(method= RequestMethod.GET , value="/account_taxes/fetchsale")
public ResponseEntity<List<Account_taxDTO>> fetchSale(Account_taxSearchContext context) {
Page<Account_tax> domains = account_taxService.searchSale(context) ;
List<Account_taxDTO> list = account_taxMapping.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_tax-searchSale-all') and hasPermission(#context,'iBizBusinessCentral-Account_tax-Get')")
@ApiOperation(value = "查询销售税率", tags = {"税率" } ,notes = "查询销售税率")
@RequestMapping(method= RequestMethod.POST , value="/account_taxes/searchsale")
public ResponseEntity<Page<Account_taxDTO>> searchSale(@RequestBody Account_taxSearchContext context) {
Page<Account_tax> domains = account_taxService.searchSale(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(account_taxMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册