[2차][FO] 입력현황 WIP
This commit is contained in:
@@ -17,17 +17,17 @@
|
||||
ds.id desc
|
||||
</select>
|
||||
|
||||
<select id="getDailyIncomeListByMonth"
|
||||
<select id="getDailyIncomeMonthList"
|
||||
resultType="app.module.front.usecase.daily.income.adapters.persistence.model.DailyIncomeDto">
|
||||
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
||||
, ds.crop_code, ds.income_kind, ds.source_purpose
|
||||
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
||||
, dr.start_date, dr.end_date
|
||||
, dr.start_date, dr.end_date, ddg.group_no
|
||||
from daily_income ds
|
||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecordMonth"/>
|
||||
where ds.is_deleted = false
|
||||
order by
|
||||
dr.id, ds.id
|
||||
ddg.group_no, ds.id
|
||||
</select>
|
||||
|
||||
<select id="getRecordExistCount" resultType="int">
|
||||
|
||||
@@ -41,22 +41,22 @@
|
||||
left join
|
||||
daily_income di on di.daily_record_seq = dg.daily_record_seq and di.is_deleted = false
|
||||
union all
|
||||
select 'EXPENSE' as step
|
||||
, count(distinct dg.day) as day_count
|
||||
, count(distinct dg.day) filter (where (dg.expense_status = 'TARGET' and de.id is not null) or dg.expense_status = 'TODAY_NONE') as done_count
|
||||
, count(distinct de.id) as input_count
|
||||
from day_gorup dg
|
||||
left join
|
||||
daily_expense de on de.daily_record_seq = dg.daily_record_seq and de.is_deleted = false
|
||||
union all
|
||||
select 'WORK' as step
|
||||
, count(distinct dg.day) as day_count
|
||||
, count(distinct dg.day) filter (where (dg.work_status = 'TARGET' and dw.id is not null) or dg.work_status = 'TODAY_NONE') as done_count
|
||||
, count(distinct dw.id) as input_count
|
||||
, count(distinct dg.day) as day_count
|
||||
, count(distinct dg.day) filter (where (dg.work_status = 'TARGET' and dw.id is not null) or dg.work_status = 'TODAY_NONE') as done_count
|
||||
, count(distinct dw.id) as input_count
|
||||
from day_gorup dg
|
||||
left join
|
||||
left join
|
||||
daily_work dw on dw.daily_record_seq = dg.daily_record_seq and dw.is_deleted = false
|
||||
union all
|
||||
select 'EXPENSE' as step
|
||||
, count(distinct dg.day) as day_count
|
||||
, count(distinct dg.day) filter (where (dg.expense_status = 'TARGET' and de.id is not null) or dg.expense_status = 'TODAY_NONE') as done_count
|
||||
, count(distinct de.id) as input_count
|
||||
from day_gorup dg
|
||||
left join
|
||||
daily_expense de on de.daily_record_seq = dg.daily_record_seq and de.is_deleted = false
|
||||
union all
|
||||
select 'POWER' as step
|
||||
, count(distinct dg.day) as day_count
|
||||
, count(distinct dg.day) filter (where (dg.power_status = 'TARGET' and dp.id is not null) or dg.power_status = 'TODAY_NONE') as done_count
|
||||
@@ -90,14 +90,18 @@
|
||||
select dr.id from daily_record dr where dr.record_month = #{recordMonth} and dr.household_seq = #{householdSeq} and dr.is_deleted = false
|
||||
)
|
||||
select 'INCOME' as step
|
||||
, COALESCE(sum( COALESCE(di.price, 0) + COALESCE(di.estimated_value, 0) ), 0) as total_value
|
||||
, COALESCE(sum(
|
||||
COALESCE(di.price, 0) + COALESCE(di.estimated_value, 0)
|
||||
), 0) as total_value
|
||||
from daily_income di
|
||||
inner join
|
||||
r_daily_record dr on dr.id = di.daily_record_seq
|
||||
where di.is_deleted = false
|
||||
union all
|
||||
select 'EXPENSE' as step
|
||||
, COALESCE(sum( COALESCE(de.price, 0) + COALESCE(de.estimated_value, 0) ), 0) as total_value
|
||||
, COALESCE(sum(
|
||||
COALESCE(de.price, 0) + COALESCE(de.estimated_value, 0)
|
||||
), 0) as total_value
|
||||
from daily_expense de
|
||||
inner join
|
||||
r_daily_record dr on dr.id = de.daily_record_seq
|
||||
@@ -106,10 +110,10 @@
|
||||
select 'WORK' as step
|
||||
, COALESCE(sum(
|
||||
COALESCE(cast(dw.owner_time as numeric), 0) + COALESCE(cast(dw.spouse_time as numeric), 0)
|
||||
+ COALESCE(cast(dw.family_f_hours as numeric), 0) + COALESCE(cast(dw.family_m_hours as numeric), 0)
|
||||
+ COALESCE(cast(dw.hired_m_hours as numeric), 0) + COALESCE(cast(dw.hired_f_hours as numeric), 0)
|
||||
+ COALESCE(cast(dw.shared_m_hours as numeric), 0) + COALESCE(cast(dw.shared_f_hours as numeric), 0)
|
||||
+ COALESCE(cast(dw.volunteer_m_hours as numeric), 0) + COALESCE(cast(dw.volunteer_f_hours as numeric), 0)
|
||||
+ COALESCE(cast(dw.family_f_hours as numeric), 0) + COALESCE(cast(dw.family_m_hours as numeric), 0)
|
||||
+ COALESCE(cast(dw.hired_m_hours as numeric), 0) + COALESCE(cast(dw.hired_f_hours as numeric), 0)
|
||||
+ COALESCE(cast(dw.shared_m_hours as numeric), 0) + COALESCE(cast(dw.shared_f_hours as numeric), 0)
|
||||
+ COALESCE(cast(dw.volunteer_m_hours as numeric), 0) + COALESCE(cast(dw.volunteer_f_hours as numeric), 0)
|
||||
), 0) as total_value
|
||||
from daily_work dw
|
||||
inner join
|
||||
@@ -117,21 +121,27 @@
|
||||
where dw.is_deleted = false
|
||||
union all
|
||||
select 'POWER' as step
|
||||
, COALESCE(sum( COALESCE(cast(dp.owned_hours as numeric), 0) + COALESCE(cast(dp.leased_hours as numeric), 0) ), 0) as total_value
|
||||
, COALESCE(sum(
|
||||
COALESCE(cast(dp.owned_hours as numeric), 0) + COALESCE(cast(dp.leased_hours as numeric), 0)
|
||||
), 0) as total_value
|
||||
from daily_power dp
|
||||
inner join
|
||||
r_daily_record dr on dr.id = dp.daily_record_seq
|
||||
where dp.is_deleted = false
|
||||
union all
|
||||
select 'FORESTRY' as step
|
||||
, COALESCE(sum( COALESCE(df1.estimated_value, 0) ), 0) as total_value
|
||||
, COALESCE(sum(
|
||||
COALESCE(df1.estimated_value, 0)
|
||||
), 0) as total_value
|
||||
from daily_forestry df1
|
||||
inner join
|
||||
r_daily_record dr on dr.id = df1.daily_record_seq
|
||||
where df1.is_deleted = false
|
||||
union all
|
||||
select 'FARMING' as step
|
||||
, COALESCE(sum( COALESCE(df2.estimated_value, 0) ), 0) as total_value
|
||||
, COALESCE(sum(
|
||||
COALESCE(df2.estimated_value, 0)
|
||||
), 0) as total_value
|
||||
from daily_farming df2
|
||||
inner join
|
||||
r_daily_record dr on dr.id = df2.daily_record_seq
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<th:block th:each="item, itemStatus : ${detail.itemList}">
|
||||
<li th:classappend="${item.inputCount != 0} ? 'view'">
|
||||
<th:block th:if="${item.inputCount != 0}">
|
||||
<a href="javascript:void(0);" th:onclick="formControl.detailModal([[${#strings.toLowerCase(item.step.name)}]], [[${#strings.toLowerCase(item.step.desc2)}]])">
|
||||
<a href="javascript:void(0);" th:onclick="formControl.detailModal([[${#strings.toLowerCase(item.step.name)}]], [[${#strings.toLowerCase(item.step.desc2)}]])">
|
||||
</th:block>
|
||||
<p class="label">[[${item.step.desc2}]]</p>
|
||||
<ul class="value">
|
||||
@@ -84,7 +84,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<th:block th:if="${item.inputCount != 0}">
|
||||
</a >
|
||||
</a>
|
||||
</th:block>
|
||||
</li>
|
||||
</th:block>
|
||||
@@ -134,7 +134,6 @@
|
||||
this._bindUI();
|
||||
},
|
||||
_bindUI() {
|
||||
console.log('_bindUI()')
|
||||
const $select1 = document.querySelector('#searchMonth');
|
||||
const selectboxInstance1 = $select1.ui;
|
||||
selectboxInstance1.core.init($select1, {
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--/* //[INFO] templates/record/xxxx/index.html 의 item-list 와 동일한 HTML */-->
|
||||
</th:block>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user