[FO] 일계부 등록 wip, FrontAuditCommand 커밋 누락
This commit is contained in:
73
front/src/main/resources/mappers/daily/DailyIncomeMapper.xml
Normal file
73
front/src/main/resources/mappers/daily/DailyIncomeMapper.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="app.module.front.usecase.daily.income.persistence.DailyIncomeMapper">
|
||||
|
||||
<select id="getDailyIncomeExistCount" resultType="int">
|
||||
select count(ds.*)
|
||||
from daily_income ds
|
||||
<include refid="app.module.front.usecase.daily.record.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||
where ds.is_deleted = false
|
||||
</select>
|
||||
|
||||
<select id="getDailyIncomeList">
|
||||
select id, daily_record_seq, is_credit, crop_code, category_code, category_name, source_purpose
|
||||
, quantity, unit_code, price, estimated_value
|
||||
, created_at, created_by
|
||||
from daily_income
|
||||
where is_deleted = false
|
||||
and daily_record_seq = 1
|
||||
and id = 1
|
||||
</select>
|
||||
|
||||
<select id="getDailyIncome">
|
||||
select id, daily_record_seq, is_credit, crop_code, category_code, category_name, source_purpose
|
||||
, quantity, unit_code, price, estimated_value
|
||||
, created_at, created_by
|
||||
from daily_income
|
||||
where is_deleted = false
|
||||
and daily_record_seq = 1
|
||||
and id = 1
|
||||
</select>
|
||||
|
||||
<insert id="createDailyIncome" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into daily_income (
|
||||
daily_record_seq, is_credit, crop_code, category_code, category_name, source_purpose
|
||||
, quantity, unit_code, price, estimated_value
|
||||
, created_at, created_by, is_deleted
|
||||
) values (
|
||||
#{householdSeq}
|
||||
, #{isCredit}, #{cropCode}, #{categoryCode}, #{categoryName}, #{sourcePurpose}
|
||||
, #{quantity}, #{unitCode}, #{price}, #{estimatedValue}
|
||||
, now(), #{createdBy}, false
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateDailyIncome">
|
||||
update daily_income set
|
||||
updated_at = now()
|
||||
, updated_by = #{updatedBy}
|
||||
, is_credit = #{isCredit}
|
||||
, crop_code = #{cropCode}
|
||||
, category_code = #{categoryCode}
|
||||
, category_name = #{categoryName}
|
||||
, source_purpose = #{sourcePurpose}
|
||||
, quantity = #{quantity}
|
||||
, unit_code = #{unitCode}
|
||||
, price = #{price}
|
||||
, estimated_value = #{estimatedValue}
|
||||
where is_deleted = false
|
||||
and daily_record_seq = 1
|
||||
and id = 1
|
||||
</update>
|
||||
|
||||
<update id="removeDailyIncome">
|
||||
update daily_income set
|
||||
deleted_at = now(),
|
||||
deleted_by = '_system',
|
||||
is_deleted = true
|
||||
where is_deleted = false
|
||||
and daily_record_seq = 1
|
||||
and id = 1
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -31,19 +31,19 @@
|
||||
insert into daily_record (
|
||||
household_seq, record_month, day_group_no, start_date, end_date
|
||||
, all_status, income_status, work_status, expense_status, power_status, forestry_status
|
||||
, created_at, created_by, is_deleted
|
||||
, is_deleted
|
||||
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||
) values (
|
||||
#{householdSeq}
|
||||
, #{recordMonth}, #{dayGroupNo}, #{startDate}, #{endDate}
|
||||
, #{allStatus}, #{incomeStatus}, #{workStatus}, #{expenseStatus}, #{powerStatus}, #{forestryStatus}
|
||||
, now(), #{createdBy}, false
|
||||
, false
|
||||
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateDailyRecordStatus">
|
||||
update daily_record set
|
||||
updated_at = now()
|
||||
, updated_by = #{updatedBy}
|
||||
update daily_record set <include refid="common.fields.UpdateBaseSet"/>
|
||||
<if test="allStatus != null and allStatus != ''">
|
||||
, all_status = #{allStatus}
|
||||
</if>
|
||||
|
||||
@@ -8,4 +8,15 @@ uri.front.user.register=\uD68C\uC6D0\uAC00\uC785
|
||||
uri.front.user.info=\uC815\uBCF4\uC218\uC815
|
||||
uri.front.board.article.create=\uC608\uC81C \uAC8C\uC2DC\uD310 \uB4F1\uB85D
|
||||
uri.front.board.article.{{pathVar}}=\uC608\uC81C \uAC8C\uC2DC\uD310 \uC0C1\uC138\uBCF4\uAE30
|
||||
uri.front.board.article.update.{{pathVar}}=\uC608\uC81C \uAC8C\uC2DC\uD310 \uC218\uC815
|
||||
uri.front.board.article.update.{{pathVar}}=\uC608\uC81C \uAC8C\uC2DC\uD310 \uC218\uC815
|
||||
|
||||
# \uC77C\uACC4\uBD80
|
||||
uri.front.record.calendar=\uC77C\uACC4\uBD80 \uC6D4\uBCC4 \uD604\uD669
|
||||
uri.front.record.calendar.{{pathVar}}.{{pathVar}}=\uC77C\uACC4\uBD80 \uC6D4\uBCC4 \uD604\uD669
|
||||
uri.front.record.daily=\uC77C\uACC4\uBD80 \uB4F1\uB85D
|
||||
uri.front.record.daily.{{pathVar}}=\uC77C\uACC4\uBD80 \uB4F1\uB85D
|
||||
uri.front.record.income.{{pathVar}}=\uC218\uC785\uB0B4\uC5ED \uB4F1\uB85D
|
||||
uri.front.record.expense.{{pathVar}}=\uC9C0\uCD9C\uB0B4\uC5ED \uB4F1\uB85D
|
||||
uri.front.record.work.{{pathVar}}=\uB178\uB3D9\uC2DC\uAC04 \uB4F1\uB85D
|
||||
uri.front.record.power.{{pathVar}}=\uB3D9\uB825 \uC0AC\uC6A9\uC2DC\uAC04 \uB4F1\uB85D
|
||||
uri.front.record.forestry.{{pathVar}}=\uC790\uAC00\uC784\uC5C5 \uC0DD\uC0B0\uBB3C \uC911 \uC790\uAC00\uC18C\uBE44\uB7C9 \uB4F1\uB85D
|
||||
|
||||
@@ -61,7 +61,7 @@ var ajaxUtil = {
|
||||
uxgFn.popup.bind('.ui-popup-common-alert').open();
|
||||
},
|
||||
function(code, rstData) {
|
||||
research.logger.error('Do nothing. code: '+ code, rstData);
|
||||
krs.logger.error('Do nothing. code: '+ code, rstData);
|
||||
},
|
||||
'html');
|
||||
},
|
||||
@@ -133,17 +133,16 @@ var ajaxUtil = {
|
||||
if (typeof errorCallback !== 'undefined') {
|
||||
errorCallback(ajaxUtil.$404, rstData);
|
||||
} else {
|
||||
ajaxUtil._goToMain();
|
||||
krs.move.main();
|
||||
}
|
||||
},
|
||||
401:function(){
|
||||
ajaxUtil._goToMain();
|
||||
krs.move.main();
|
||||
},
|
||||
403:function(rstData){
|
||||
ajaxUtil._goToMain();
|
||||
krs.move.main();
|
||||
},
|
||||
422:function(rstData, status) {
|
||||
alert(422)
|
||||
console.log(rstData)
|
||||
$(rstData.responseJSON).each((idx, oj) => {
|
||||
// TODO : form id? or body
|
||||
@@ -203,7 +202,6 @@ var ajaxUtil = {
|
||||
_jsonParse : function parse(jsonStr) {
|
||||
try {
|
||||
var jsonObj = JSON.parse(jsonStr);
|
||||
// chamobile.logger.debug(jsonObj);
|
||||
return jsonObj;
|
||||
} catch (error) {
|
||||
console.error("Invalid JSON string:", error);
|
||||
@@ -213,7 +211,6 @@ var ajaxUtil = {
|
||||
_jsonStringify : function stringify(obj) {
|
||||
try {
|
||||
var jsonStr = JSON.stringify(obj);
|
||||
// chamobile.logger.debug(jsonStr);
|
||||
return jsonStr;
|
||||
} catch (error) {
|
||||
console.error("Error stringifying object:", error);
|
||||
|
||||
@@ -1,32 +1,39 @@
|
||||
let krs = {}; // KoreaReSearch
|
||||
krs.move = new Object;
|
||||
krs.logger = new Object();
|
||||
|
||||
/* krs.move */
|
||||
/**
|
||||
* 스크립트로 페이지 이동
|
||||
*/
|
||||
krs.move.main = function() {
|
||||
location.href = '/';
|
||||
}
|
||||
|
||||
|
||||
var research = {};
|
||||
research.json = new Object();
|
||||
research.logger = new Object();
|
||||
|
||||
/* research.logger */
|
||||
/* krs.logger */
|
||||
/**
|
||||
* client 오류성 로그 기록용 로거, 로그 레벨에 따라 표시
|
||||
* @param message
|
||||
* @param el
|
||||
*/
|
||||
research.logger.debug = function(message, el){
|
||||
var callee = arguments.callee.caller == '' ? arguments.callee.caller.arguments.callee.name : (arguments.callee.caller ? arguments.callee.caller.name : '');
|
||||
krs.logger.debug = function(message, el){
|
||||
let callee = arguments.callee.caller == '' ? arguments.callee.caller.arguments.callee.name : (arguments.callee.caller ? arguments.callee.caller.name : '');
|
||||
console.log("[DEBUG] caller : " + callee + " / message : " + message, el);
|
||||
};
|
||||
|
||||
research.logger.error = function(message, el){
|
||||
var callee = arguments.callee.caller == '' ? arguments.callee.caller.arguments.callee.name : (arguments.callee.caller ? arguments.callee.caller.name : '');
|
||||
krs.logger.error = function(message, el){
|
||||
let callee = arguments.callee.caller == '' ? arguments.callee.caller.arguments.callee.name : (arguments.callee.caller ? arguments.callee.caller.name : '');
|
||||
console.error("[ERROR] caller : " + callee + " / message : " + message, el);
|
||||
};
|
||||
|
||||
research.logger.info = function(message){
|
||||
var callee = arguments.callee.caller == '' ? arguments.callee.caller.arguments.callee.name : (arguments.callee.caller ? arguments.callee.caller.name : '');
|
||||
krs.logger.info = function(message){
|
||||
let callee = arguments.callee.caller == '' ? arguments.callee.caller.arguments.callee.name : (arguments.callee.caller ? arguments.callee.caller.name : '');
|
||||
console.info("[INFO] caller : " + callee + " / message : " + message);
|
||||
};
|
||||
|
||||
research.logger.warn = function(message){
|
||||
var callee = arguments.callee.caller == '' ? arguments.callee.caller.arguments.callee.name : (arguments.callee.caller ? arguments.callee.caller.name : '');
|
||||
krs.logger.warn = function(message){
|
||||
let callee = arguments.callee.caller == '' ? arguments.callee.caller.arguments.callee.name : (arguments.callee.caller ? arguments.callee.caller.name : '');
|
||||
console.warn("[WARN] caller : " + callee + " / message : " + message);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,30 +1,36 @@
|
||||
var page = {};
|
||||
page.daily = new Object();
|
||||
let krsp= {}; // KoreaReSearchPage
|
||||
krsp.daily = new Object();
|
||||
|
||||
page.daily.httpUrl = {
|
||||
root: '/record/calendar',
|
||||
daily: '/record/daily/{searchMonth}/{groupNo}',
|
||||
income: '/record/income/{searchMonth}/{groupNo}',
|
||||
work: '/record/work/{searchMonth}/{groupNo}',
|
||||
expense: '/record/expense/{searchMonth}/{groupNo}',
|
||||
power: '/record/power/{searchMonth}/{groupNo}',
|
||||
forestry: '/record/forestry/{searchMonth}/{groupNo}',
|
||||
krsp.daily.httpUrl = {
|
||||
base: '/record/calendar',
|
||||
daily: '/record/daily/{month}/{groupNo}',
|
||||
target: '/record/daily/{month}/{groupNo}/{target}',
|
||||
// income: '/record/daily/{month}/{groupNo}/income',
|
||||
// work: '/record/daily/{month}/{groupNo}/work',
|
||||
// expense: '/record/daily/{month}/{groupNo}/expense',
|
||||
// power: '/record/daily/{month}/{groupNo}/power',
|
||||
// forestry: '/record/daily/{month}/{groupNo}/forestry',
|
||||
};
|
||||
|
||||
krsp.daily.goToMain = function() {
|
||||
location.href = krsp.daily.httpUrl.root;
|
||||
};
|
||||
|
||||
krsp.daily.goToPrev = function(target, searchMonth, groupNo) {
|
||||
let url = krsp.daily.httpUrl.target;
|
||||
url = url.replace('{month}', searchMonth);
|
||||
url = url.replace('{groupNo}', groupNo);
|
||||
url = url.replace('{target}', target);
|
||||
|
||||
console.log(url);
|
||||
}
|
||||
|
||||
page.daily.goToMain = function() {
|
||||
location.href = page.daily.httpUrl.root;
|
||||
}
|
||||
krsp.daily.goToNext = function(target, searchMonth, groupNo) {
|
||||
let url = krsp.daily.httpUrl.target;
|
||||
url = url.replace('{month}', searchMonth);
|
||||
url = url.replace('{groupNo}', groupNo);
|
||||
url = url.replace('{target}', target);
|
||||
|
||||
page.daily.goToNext = function(target, searchMonth, groupNo) {
|
||||
let url = page.daily.httpUrl.root;
|
||||
|
||||
// TODO URL
|
||||
if (target == 'income') {
|
||||
url = page.daily.httpUrl.income;
|
||||
} else if (target == 'work') {
|
||||
url = page.daily.httpUrl.work;
|
||||
}
|
||||
|
||||
console.log(url.replace('{searchMonth}', searchMonth).replace('{groupNo}', groupNo));
|
||||
//location.href = url.replace('{searchMonth}', searchMonth).replace('{groupNo}', groupNo);
|
||||
}
|
||||
console.log(url);
|
||||
//location.href = url;
|
||||
};
|
||||
@@ -84,6 +84,10 @@
|
||||
<strong>Current Device</strong> : [[${currentDevice}]]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Current URI</strong> : [[${currentURI.id}]]
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<strong>Current Login User</strong> :
|
||||
<p sec:authorize="isAnonymous()" th:remove="tag">
|
||||
@@ -91,6 +95,7 @@
|
||||
</p>
|
||||
<p sec:authorize="isAuthenticated()" th:remove="tag">
|
||||
<strong th:text="${#authentication.principal.ownerName}">로그인 사용자명</strong>
|
||||
, seq=<strong th:text="${#authentication.principal.householdSeq}">로그인 사용자SEQ</strong>
|
||||
<a href="/logout">[로그아웃]</a>
|
||||
<a href="/user/info">[정보수정]</a>
|
||||
</p>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
$('#selectedDay').html(rstHtml);
|
||||
},
|
||||
function(code, rstData) {
|
||||
research.logger.error('Do nothing. code: '+ code, rstData);
|
||||
krs.logger.error('Do nothing. code: '+ code, rstData);
|
||||
},
|
||||
'html'
|
||||
);
|
||||
|
||||
@@ -48,6 +48,40 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.content label {
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.content div {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.tox-tinymce {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.invalid-feedback {
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.is-invalid + .invalid-feedback {
|
||||
display: block;
|
||||
}
|
||||
|
||||
textarea.is-invalid ~ .invalid-feedback {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
</section>
|
||||
|
||||
<section layout:fragment="script">
|
||||
@@ -79,9 +113,9 @@
|
||||
console.log(rstData);
|
||||
|
||||
if (f.todayNone.value == 'Y') {
|
||||
page.daily.goToMain();
|
||||
krsp.daily.goToMain();
|
||||
} else {
|
||||
page.daily.goToNext($('input:checked').eq(0).data('target'), searchMonth, groupNo);
|
||||
krsp.daily.goToNext($('input:checked').eq(0).data('target'), searchMonth, groupNo);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user