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

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

上级 ef1eb20f
......@@ -58,4 +58,27 @@ public class account_invoiceFallback implements account_invoiceFeignClient{
return null;
}
public Account_invoice getDraft(){
return null;
}
public Boolean checkKey(Account_invoice account_invoice){
return false;
}
public Boolean save(Account_invoice account_invoice){
return false;
}
public Boolean saveBatch(List<Account_invoice> account_invoices){
return false;
}
public Page<Account_invoice> searchDefault(Account_invoiceSearchContext context){
return null;
}
}
......@@ -56,4 +56,24 @@ public interface account_invoiceFeignClient {
Page<Account_invoice> select();
@RequestMapping(method = RequestMethod.GET, value = "/account_invoices/getdraft")
Account_invoice getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/account_invoices/checkkey")
Boolean checkKey(@RequestBody Account_invoice account_invoice);
@RequestMapping(method = RequestMethod.POST, value = "/account_invoices/save")
Boolean save(@RequestBody Account_invoice account_invoice);
@RequestMapping(method = RequestMethod.POST, value = "/account_invoices/savebatch")
Boolean saveBatch(@RequestBody List<Account_invoice> account_invoices);
@RequestMapping(method = RequestMethod.POST, value = "/account_invoices/searchdefault")
Page<Account_invoice> searchDefault(@RequestBody Account_invoiceSearchContext context);
}
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Account_invoiceMapper extends BaseMapper<Account_invoice>{
Page<Account_invoice> searchDefault(IPage page, @Param("srf") Account_invoiceSearchContext context, @Param("ew") Wrapper<Account_invoice> wrapper) ;
@Override
Account_invoice selectById(Serializable id);
@Override
......@@ -61,4 +62,54 @@ public interface Account_invoiceMapper extends BaseMapper<Account_invoice>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Account_invoice> selectByAccountId(@Param("id") Serializable id) ;
List<Account_invoice> selectByCashRoundingId(@Param("id") Serializable id) ;
List<Account_invoice> selectByFiscalPositionId(@Param("id") Serializable id) ;
List<Account_invoice> selectByIncotermsId(@Param("id") Serializable id) ;
List<Account_invoice> selectByIncotermId(@Param("id") Serializable id) ;
List<Account_invoice> selectByRefundInvoiceId(@Param("id") Serializable id) ;
List<Account_invoice> selectByVendorBillId(@Param("id") Serializable id) ;
List<Account_invoice> selectByJournalId(@Param("id") Serializable id) ;
List<Account_invoice> selectByMoveId(@Param("id") Serializable id) ;
List<Account_invoice> selectByPaymentTermId(@Param("id") Serializable id) ;
List<Account_invoice> selectByTeamId(@Param("id") Serializable id) ;
List<Account_invoice> selectByVendorBillPurchaseId(@Param("id") Serializable id) ;
List<Account_invoice> selectByPurchaseId(@Param("id") Serializable id) ;
List<Account_invoice> selectByCompanyId(@Param("id") Serializable id) ;
List<Account_invoice> selectByCurrencyId(@Param("id") Serializable id) ;
List<Account_invoice> selectByPartnerBankId(@Param("id") Serializable id) ;
List<Account_invoice> selectByCommercialPartnerId(@Param("id") Serializable id) ;
List<Account_invoice> selectByPartnerId(@Param("id") Serializable id) ;
List<Account_invoice> selectByPartnerShippingId(@Param("id") Serializable id) ;
List<Account_invoice> selectByCreateUid(@Param("id") Serializable id) ;
List<Account_invoice> selectByUserId(@Param("id") Serializable id) ;
List<Account_invoice> selectByWriteUid(@Param("id") Serializable id) ;
List<Account_invoice> selectByCampaignId(@Param("id") Serializable id) ;
List<Account_invoice> selectByMediumId(@Param("id") Serializable id) ;
List<Account_invoice> selectBySourceId(@Param("id") Serializable id) ;
}
......@@ -33,6 +33,109 @@ public interface IAccount_invoiceService extends IService<Account_invoice>{
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Account_invoice get(Long key) ;
Account_invoice getDraft(Account_invoice et) ;
boolean checkKey(Account_invoice et) ;
boolean save(Account_invoice et) ;
void saveBatch(List<Account_invoice> list) ;
Page<Account_invoice> searchDefault(Account_invoiceSearchContext context) ;
List<Account_invoice> selectByAccountId(Long id);
void resetByAccountId(Long id);
void resetByAccountId(Collection<Long> ids);
void removeByAccountId(Long id);
List<Account_invoice> selectByCashRoundingId(Long id);
void resetByCashRoundingId(Long id);
void resetByCashRoundingId(Collection<Long> ids);
void removeByCashRoundingId(Long id);
List<Account_invoice> selectByFiscalPositionId(Long id);
void resetByFiscalPositionId(Long id);
void resetByFiscalPositionId(Collection<Long> ids);
void removeByFiscalPositionId(Long id);
List<Account_invoice> selectByIncotermsId(Long id);
void resetByIncotermsId(Long id);
void resetByIncotermsId(Collection<Long> ids);
void removeByIncotermsId(Long id);
List<Account_invoice> selectByIncotermId(Long id);
void resetByIncotermId(Long id);
void resetByIncotermId(Collection<Long> ids);
void removeByIncotermId(Long id);
List<Account_invoice> selectByRefundInvoiceId(Long id);
void resetByRefundInvoiceId(Long id);
void resetByRefundInvoiceId(Collection<Long> ids);
void removeByRefundInvoiceId(Long id);
List<Account_invoice> selectByVendorBillId(Long id);
void resetByVendorBillId(Long id);
void resetByVendorBillId(Collection<Long> ids);
void removeByVendorBillId(Long id);
List<Account_invoice> selectByJournalId(Long id);
void resetByJournalId(Long id);
void resetByJournalId(Collection<Long> ids);
void removeByJournalId(Long id);
List<Account_invoice> selectByMoveId(Long id);
List<Account_invoice> selectByMoveId(Collection<Long> ids);
void removeByMoveId(Long id);
List<Account_invoice> selectByPaymentTermId(Long id);
void resetByPaymentTermId(Long id);
void resetByPaymentTermId(Collection<Long> ids);
void removeByPaymentTermId(Long id);
List<Account_invoice> selectByTeamId(Long id);
void resetByTeamId(Long id);
void resetByTeamId(Collection<Long> ids);
void removeByTeamId(Long id);
List<Account_invoice> selectByVendorBillPurchaseId(Long id);
void resetByVendorBillPurchaseId(Long id);
void resetByVendorBillPurchaseId(Collection<Long> ids);
void removeByVendorBillPurchaseId(Long id);
List<Account_invoice> selectByPurchaseId(Long id);
void resetByPurchaseId(Long id);
void resetByPurchaseId(Collection<Long> ids);
void removeByPurchaseId(Long id);
List<Account_invoice> selectByCompanyId(Long id);
void resetByCompanyId(Long id);
void resetByCompanyId(Collection<Long> ids);
void removeByCompanyId(Long id);
List<Account_invoice> selectByCurrencyId(Long id);
void resetByCurrencyId(Long id);
void resetByCurrencyId(Collection<Long> ids);
void removeByCurrencyId(Long id);
List<Account_invoice> selectByPartnerBankId(Long id);
void resetByPartnerBankId(Long id);
void resetByPartnerBankId(Collection<Long> ids);
void removeByPartnerBankId(Long id);
List<Account_invoice> selectByCommercialPartnerId(Long id);
void resetByCommercialPartnerId(Long id);
void resetByCommercialPartnerId(Collection<Long> ids);
void removeByCommercialPartnerId(Long id);
List<Account_invoice> selectByPartnerId(Long id);
List<Account_invoice> selectByPartnerId(Collection<Long> ids);
void removeByPartnerId(Long id);
List<Account_invoice> selectByPartnerShippingId(Long id);
void resetByPartnerShippingId(Long id);
void resetByPartnerShippingId(Collection<Long> ids);
void removeByPartnerShippingId(Long id);
List<Account_invoice> selectByCreateUid(Long id);
void resetByCreateUid(Long id);
void resetByCreateUid(Collection<Long> ids);
void removeByCreateUid(Long id);
List<Account_invoice> selectByUserId(Long id);
void resetByUserId(Long id);
void resetByUserId(Collection<Long> ids);
void removeByUserId(Long id);
List<Account_invoice> selectByWriteUid(Long id);
void resetByWriteUid(Long id);
void resetByWriteUid(Collection<Long> ids);
void removeByWriteUid(Long id);
List<Account_invoice> selectByCampaignId(Long id);
void resetByCampaignId(Long id);
void resetByCampaignId(Collection<Long> ids);
void removeByCampaignId(Long id);
List<Account_invoice> selectByMediumId(Long id);
void resetByMediumId(Long id);
void resetByMediumId(Collection<Long> ids);
void removeByMediumId(Long id);
List<Account_invoice> selectBySourceId(Long id);
void resetBySourceId(Long id);
void resetBySourceId(Collection<Long> ids);
void removeBySourceId(Long id);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -58,4 +58,27 @@ public class stock_moveFallback implements stock_moveFeignClient{
return null;
}
public Stock_move getDraft(){
return null;
}
public Boolean checkKey(Stock_move stock_move){
return false;
}
public Boolean save(Stock_move stock_move){
return false;
}
public Boolean saveBatch(List<Stock_move> stock_moves){
return false;
}
public Page<Stock_move> searchDefault(Stock_moveSearchContext context){
return null;
}
}
......@@ -56,4 +56,24 @@ public interface stock_moveFeignClient {
Page<Stock_move> select();
@RequestMapping(method = RequestMethod.GET, value = "/stock_moves/getdraft")
Stock_move getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/stock_moves/checkkey")
Boolean checkKey(@RequestBody Stock_move stock_move);
@RequestMapping(method = RequestMethod.POST, value = "/stock_moves/save")
Boolean save(@RequestBody Stock_move stock_move);
@RequestMapping(method = RequestMethod.POST, value = "/stock_moves/savebatch")
Boolean saveBatch(@RequestBody List<Stock_move> stock_moves);
@RequestMapping(method = RequestMethod.POST, value = "/stock_moves/searchdefault")
Page<Stock_move> searchDefault(@RequestBody Stock_moveSearchContext context);
}
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
public interface Stock_moveMapper extends BaseMapper<Stock_move>{
Page<Stock_move> searchDefault(IPage page, @Param("srf") Stock_moveSearchContext context, @Param("ew") Wrapper<Stock_move> wrapper) ;
@Override
Stock_move selectById(Serializable id);
@Override
......@@ -61,4 +62,62 @@ public interface Stock_moveMapper extends BaseMapper<Stock_move>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<Stock_move> selectByBomLineId(@Param("id") Serializable id) ;
List<Stock_move> selectByCreatedProductionId(@Param("id") Serializable id) ;
List<Stock_move> selectByProductionId(@Param("id") Serializable id) ;
List<Stock_move> selectByRawMaterialProductionId(@Param("id") Serializable id) ;
List<Stock_move> selectByOperationId(@Param("id") Serializable id) ;
List<Stock_move> selectByConsumeUnbuildId(@Param("id") Serializable id) ;
List<Stock_move> selectByUnbuildId(@Param("id") Serializable id) ;
List<Stock_move> selectByWorkorderId(@Param("id") Serializable id) ;
List<Stock_move> selectByProductPackaging(@Param("id") Serializable id) ;
List<Stock_move> selectByProductId(@Param("id") Serializable id) ;
List<Stock_move> selectByCreatedPurchaseLineId(@Param("id") Serializable id) ;
List<Stock_move> selectByPurchaseLineId(@Param("id") Serializable id) ;
List<Stock_move> selectByRepairId(@Param("id") Serializable id) ;
List<Stock_move> selectByCompanyId(@Param("id") Serializable id) ;
List<Stock_move> selectByPartnerId(@Param("id") Serializable id) ;
List<Stock_move> selectByRestrictPartnerId(@Param("id") Serializable id) ;
List<Stock_move> selectByCreateUid(@Param("id") Serializable id) ;
List<Stock_move> selectByWriteUid(@Param("id") Serializable id) ;
List<Stock_move> selectBySaleLineId(@Param("id") Serializable id) ;
List<Stock_move> selectByInventoryId(@Param("id") Serializable id) ;
List<Stock_move> selectByLocationDestId(@Param("id") Serializable id) ;
List<Stock_move> selectByLocationId(@Param("id") Serializable id) ;
List<Stock_move> selectByOriginReturnedMoveId(@Param("id") Serializable id) ;
List<Stock_move> selectByPackageLevelId(@Param("id") Serializable id) ;
List<Stock_move> selectByPickingTypeId(@Param("id") Serializable id) ;
List<Stock_move> selectByPickingId(@Param("id") Serializable id) ;
List<Stock_move> selectByRuleId(@Param("id") Serializable id) ;
List<Stock_move> selectByWarehouseId(@Param("id") Serializable id) ;
List<Stock_move> selectByProductUom(@Param("id") Serializable id) ;
}
......@@ -33,6 +33,126 @@ public interface IStock_moveService extends IService<Stock_move>{
boolean remove(Long key) ;
void removeBatch(Collection<Long> idList) ;
Stock_move get(Long key) ;
Stock_move getDraft(Stock_move et) ;
boolean checkKey(Stock_move et) ;
boolean save(Stock_move et) ;
void saveBatch(List<Stock_move> list) ;
Page<Stock_move> searchDefault(Stock_moveSearchContext context) ;
List<Stock_move> selectByBomLineId(Long id);
void resetByBomLineId(Long id);
void resetByBomLineId(Collection<Long> ids);
void removeByBomLineId(Long id);
List<Stock_move> selectByCreatedProductionId(Long id);
void resetByCreatedProductionId(Long id);
void resetByCreatedProductionId(Collection<Long> ids);
void removeByCreatedProductionId(Long id);
List<Stock_move> selectByProductionId(Long id);
void resetByProductionId(Long id);
void resetByProductionId(Collection<Long> ids);
void removeByProductionId(Long id);
List<Stock_move> selectByRawMaterialProductionId(Long id);
void resetByRawMaterialProductionId(Long id);
void resetByRawMaterialProductionId(Collection<Long> ids);
void removeByRawMaterialProductionId(Long id);
List<Stock_move> selectByOperationId(Long id);
void resetByOperationId(Long id);
void resetByOperationId(Collection<Long> ids);
void removeByOperationId(Long id);
List<Stock_move> selectByConsumeUnbuildId(Long id);
void resetByConsumeUnbuildId(Long id);
void resetByConsumeUnbuildId(Collection<Long> ids);
void removeByConsumeUnbuildId(Long id);
List<Stock_move> selectByUnbuildId(Long id);
void resetByUnbuildId(Long id);
void resetByUnbuildId(Collection<Long> ids);
void removeByUnbuildId(Long id);
List<Stock_move> selectByWorkorderId(Long id);
void resetByWorkorderId(Long id);
void resetByWorkorderId(Collection<Long> ids);
void removeByWorkorderId(Long id);
List<Stock_move> selectByProductPackaging(Long id);
void resetByProductPackaging(Long id);
void resetByProductPackaging(Collection<Long> ids);
void removeByProductPackaging(Long id);
List<Stock_move> selectByProductId(Long id);
void resetByProductId(Long id);
void resetByProductId(Collection<Long> ids);
void removeByProductId(Long id);
List<Stock_move> selectByCreatedPurchaseLineId(Long id);
void resetByCreatedPurchaseLineId(Long id);
void resetByCreatedPurchaseLineId(Collection<Long> ids);
void removeByCreatedPurchaseLineId(Long id);
List<Stock_move> selectByPurchaseLineId(Long id);
void resetByPurchaseLineId(Long id);
void resetByPurchaseLineId(Collection<Long> ids);
void removeByPurchaseLineId(Long id);
List<Stock_move> selectByRepairId(Long id);
void resetByRepairId(Long id);
void resetByRepairId(Collection<Long> ids);
void removeByRepairId(Long id);
List<Stock_move> selectByCompanyId(Long id);
void resetByCompanyId(Long id);
void resetByCompanyId(Collection<Long> ids);
void removeByCompanyId(Long id);
List<Stock_move> selectByPartnerId(Long id);
void resetByPartnerId(Long id);
void resetByPartnerId(Collection<Long> ids);
void removeByPartnerId(Long id);
List<Stock_move> selectByRestrictPartnerId(Long id);
void resetByRestrictPartnerId(Long id);
void resetByRestrictPartnerId(Collection<Long> ids);
void removeByRestrictPartnerId(Long id);
List<Stock_move> selectByCreateUid(Long id);
void resetByCreateUid(Long id);
void resetByCreateUid(Collection<Long> ids);
void removeByCreateUid(Long id);
List<Stock_move> selectByWriteUid(Long id);
void resetByWriteUid(Long id);
void resetByWriteUid(Collection<Long> ids);
void removeByWriteUid(Long id);
List<Stock_move> selectBySaleLineId(Long id);
void resetBySaleLineId(Long id);
void resetBySaleLineId(Collection<Long> ids);
void removeBySaleLineId(Long id);
List<Stock_move> selectByInventoryId(Long id);
void resetByInventoryId(Long id);
void resetByInventoryId(Collection<Long> ids);
void removeByInventoryId(Long id);
List<Stock_move> selectByLocationDestId(Long id);
void resetByLocationDestId(Long id);
void resetByLocationDestId(Collection<Long> ids);
void removeByLocationDestId(Long id);
List<Stock_move> selectByLocationId(Long id);
void resetByLocationId(Long id);
void resetByLocationId(Collection<Long> ids);
void removeByLocationId(Long id);
List<Stock_move> selectByOriginReturnedMoveId(Long id);
void resetByOriginReturnedMoveId(Long id);
void resetByOriginReturnedMoveId(Collection<Long> ids);
void removeByOriginReturnedMoveId(Long id);
List<Stock_move> selectByPackageLevelId(Long id);
void resetByPackageLevelId(Long id);
void resetByPackageLevelId(Collection<Long> ids);
void removeByPackageLevelId(Long id);
List<Stock_move> selectByPickingTypeId(Long id);
void resetByPickingTypeId(Long id);
void resetByPickingTypeId(Collection<Long> ids);
void removeByPickingTypeId(Long id);
List<Stock_move> selectByPickingId(Long id);
void resetByPickingId(Long id);
void resetByPickingId(Collection<Long> ids);
void removeByPickingId(Long id);
List<Stock_move> selectByRuleId(Long id);
List<Stock_move> selectByRuleId(Collection<Long> ids);
void removeByRuleId(Long id);
List<Stock_move> selectByWarehouseId(Long id);
void resetByWarehouseId(Long id);
void resetByWarehouseId(Collection<Long> ids);
void removeByWarehouseId(Long id);
List<Stock_move> selectByProductUom(Long id);
void resetByProductUom(Long id);
void resetByProductUom(Collection<Long> ids);
void removeByProductUom(Long id);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -109,6 +109,55 @@ public class Account_invoiceResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取发票草稿", tags = {"发票" }, notes = "获取发票草稿")
@RequestMapping(method = RequestMethod.GET, value = "/account_invoices/getdraft")
public ResponseEntity<Account_invoiceDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(account_invoiceMapping.toDto(account_invoiceService.getDraft(new Account_invoice())));
}
@ApiOperation(value = "检查发票", tags = {"发票" }, notes = "检查发票")
@RequestMapping(method = RequestMethod.POST, value = "/account_invoices/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Account_invoiceDTO account_invoicedto) {
return ResponseEntity.status(HttpStatus.OK).body(account_invoiceService.checkKey(account_invoiceMapping.toDomain(account_invoicedto)));
}
@PreAuthorize("hasPermission(this.account_invoiceMapping.toDomain(#account_invoicedto),'iBizBusinessCentral-Account_invoice-Save')")
@ApiOperation(value = "保存发票", tags = {"发票" }, notes = "保存发票")
@RequestMapping(method = RequestMethod.POST, value = "/account_invoices/save")
public ResponseEntity<Boolean> save(@RequestBody Account_invoiceDTO account_invoicedto) {
return ResponseEntity.status(HttpStatus.OK).body(account_invoiceService.save(account_invoiceMapping.toDomain(account_invoicedto)));
}
@PreAuthorize("hasPermission(this.account_invoiceMapping.toDomain(#account_invoicedtos),'iBizBusinessCentral-Account_invoice-Save')")
@ApiOperation(value = "批量保存发票", tags = {"发票" }, notes = "批量保存发票")
@RequestMapping(method = RequestMethod.POST, value = "/account_invoices/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Account_invoiceDTO> account_invoicedtos) {
account_invoiceService.saveBatch(account_invoiceMapping.toDomain(account_invoicedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Account_invoice-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Account_invoice-Get')")
@ApiOperation(value = "获取数据集", tags = {"发票" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/account_invoices/fetchdefault")
public ResponseEntity<List<Account_invoiceDTO>> fetchDefault(Account_invoiceSearchContext context) {
Page<Account_invoice> domains = account_invoiceService.searchDefault(context) ;
List<Account_invoiceDTO> list = account_invoiceMapping.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_invoice-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Account_invoice-Get')")
@ApiOperation(value = "查询数据集", tags = {"发票" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/account_invoices/searchdefault")
public ResponseEntity<Page<Account_invoiceDTO>> searchDefault(@RequestBody Account_invoiceSearchContext context) {
Page<Account_invoice> domains = account_invoiceService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(account_invoiceMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -109,6 +109,55 @@ public class Stock_moveResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取库存移动草稿", tags = {"库存移动" }, notes = "获取库存移动草稿")
@RequestMapping(method = RequestMethod.GET, value = "/stock_moves/getdraft")
public ResponseEntity<Stock_moveDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(stock_moveMapping.toDto(stock_moveService.getDraft(new Stock_move())));
}
@ApiOperation(value = "检查库存移动", tags = {"库存移动" }, notes = "检查库存移动")
@RequestMapping(method = RequestMethod.POST, value = "/stock_moves/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Stock_moveDTO stock_movedto) {
return ResponseEntity.status(HttpStatus.OK).body(stock_moveService.checkKey(stock_moveMapping.toDomain(stock_movedto)));
}
@PreAuthorize("hasPermission(this.stock_moveMapping.toDomain(#stock_movedto),'iBizBusinessCentral-Stock_move-Save')")
@ApiOperation(value = "保存库存移动", tags = {"库存移动" }, notes = "保存库存移动")
@RequestMapping(method = RequestMethod.POST, value = "/stock_moves/save")
public ResponseEntity<Boolean> save(@RequestBody Stock_moveDTO stock_movedto) {
return ResponseEntity.status(HttpStatus.OK).body(stock_moveService.save(stock_moveMapping.toDomain(stock_movedto)));
}
@PreAuthorize("hasPermission(this.stock_moveMapping.toDomain(#stock_movedtos),'iBizBusinessCentral-Stock_move-Save')")
@ApiOperation(value = "批量保存库存移动", tags = {"库存移动" }, notes = "批量保存库存移动")
@RequestMapping(method = RequestMethod.POST, value = "/stock_moves/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Stock_moveDTO> stock_movedtos) {
stock_moveService.saveBatch(stock_moveMapping.toDomain(stock_movedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Stock_move-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Stock_move-Get')")
@ApiOperation(value = "获取数据集", tags = {"库存移动" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/stock_moves/fetchdefault")
public ResponseEntity<List<Stock_moveDTO>> fetchDefault(Stock_moveSearchContext context) {
Page<Stock_move> domains = stock_moveService.searchDefault(context) ;
List<Stock_moveDTO> list = stock_moveMapping.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_move-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Stock_move-Get')")
@ApiOperation(value = "查询数据集", tags = {"库存移动" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/stock_moves/searchdefault")
public ResponseEntity<Page<Stock_moveDTO>> searchDefault(@RequestBody Stock_moveSearchContext context) {
Page<Stock_move> domains = stock_moveService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(stock_moveMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册