yearPeriod
This commit is contained in:
@ -32,5 +32,5 @@ public class SettlementCarryforwardVo extends VoucherTemplate{
|
||||
|
||||
String voucherId;
|
||||
|
||||
Integer yearPeriod;
|
||||
|
||||
}
|
||||
|
||||
@ -51,5 +51,9 @@ public class VoucherTemplatePageDto extends PageQuery {
|
||||
String name;
|
||||
|
||||
int category;
|
||||
|
||||
String yearPeriod;
|
||||
|
||||
String bookId;
|
||||
|
||||
}
|
||||
|
||||
@ -96,6 +96,7 @@ public class SettlementCarryServiceImpl extends ServiceImpl<SettlementMapper, Se
|
||||
|
||||
public Message<Page<SettlementCarryforwardVo>> fetchCarry(VoucherTemplatePageDto dto) {
|
||||
dto.setCategory(1);//期末处理模板
|
||||
dto.setYearPeriod(configSysService.getCurrentTerm(dto.getBookId()));
|
||||
Page<SettlementCarryforwardVo> page = settlementCarryforwardMapper.pageList(dto.build(), dto);
|
||||
if (page.getTotal() <= 0) {
|
||||
Book book = bookMapper.selectById(dto.getRelatedId());
|
||||
|
||||
@ -6,10 +6,10 @@
|
||||
select jvt.*,jsc.voucher_id
|
||||
from jbx_voucher_template jvt
|
||||
left join jbx_settlement_carryforward jsc
|
||||
on jvt.id = jsc.voucher_template_id and jsc.deleted = 'n'
|
||||
<if test="dto.yearPeriod != null ">
|
||||
and jsc.year_period = #{dto.yearPeriod}
|
||||
</if>
|
||||
on jvt.id = jsc.voucher_template_id
|
||||
and jsc.year_period = #{dto.yearPeriod}
|
||||
and jsc.book_id = #{dto.bookId}
|
||||
and jsc.deleted = 'n'
|
||||
where jvt.deleted = 'n'
|
||||
<if test="dto.relatedId != null and dto.relatedId != ''">
|
||||
and jvt.related_Id = #{dto.relatedId}
|
||||
|
||||
@ -52,6 +52,7 @@ public class SettlementCarryController {
|
||||
public Message<Page<SettlementCarryforwardVo>> fetchCarry(@ParameterObject VoucherTemplatePageDto dto,@CurrentUser UserInfo userInfo) {
|
||||
logger.debug("fetch {}",dto);
|
||||
dto.setRelatedId(userInfo.getBookId());
|
||||
dto.setBookId(userInfo.getBookId());
|
||||
return settlementCarryService.fetchCarry(dto);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user