메인 페이지 작업
This commit is contained in:
parent
c4e523843e
commit
92e147a7df
@ -0,0 +1,62 @@
|
|||||||
|
package io.company.localhost.controller.api;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import io.company.localhost.common.annotation.Admin;
|
||||||
|
import io.company.localhost.common.annotation.Member;
|
||||||
|
import io.company.localhost.common.annotation.ParameterCheck;
|
||||||
|
import io.company.localhost.common.annotation.ReqMap;
|
||||||
|
import io.company.localhost.common.dto.ApiResponse;
|
||||||
|
import io.company.localhost.common.dto.MapDto;
|
||||||
|
import io.company.localhost.service.MainService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/api/main")
|
||||||
|
public class MainController {
|
||||||
|
|
||||||
|
private final MainService mainService;
|
||||||
|
|
||||||
|
@Member
|
||||||
|
@ParameterCheck
|
||||||
|
@GetMapping("/category")
|
||||||
|
public ApiResponse<List<MapDto>> selectMainMenuCategory() {
|
||||||
|
return mainService.selectMainMenuCategory();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Member
|
||||||
|
@ParameterCheck
|
||||||
|
@GetMapping("/eventList")
|
||||||
|
public ApiResponse<MapDto> selectEventList(@ReqMap MapDto map) {
|
||||||
|
return mainService.selectEventList(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Member
|
||||||
|
@ParameterCheck
|
||||||
|
@PostMapping("/toggleEvent")
|
||||||
|
public ApiResponse<String> toggleEvent(@ReqMap MapDto map) {
|
||||||
|
return mainService.toggleEvent(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Member
|
||||||
|
@ParameterCheck
|
||||||
|
@PostMapping("/inserEvent")
|
||||||
|
public ApiResponse<String> inserEvent(@ReqMap MapDto map) {
|
||||||
|
return mainService.inserEvent(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Admin
|
||||||
|
@ParameterCheck
|
||||||
|
@GetMapping("/registerMemberList")
|
||||||
|
public ApiResponse<List<MapDto>> registerMemberList() {
|
||||||
|
return mainService.registerMemberList();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package io.company.localhost.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import io.company.localhost.common.dto.MapDto;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface LocalevntMapper {
|
||||||
|
|
||||||
|
int insertEvent(MapDto map);
|
||||||
|
|
||||||
|
int selectCheckEvent(MapDto map);
|
||||||
|
|
||||||
|
List<MapDto> selectEventList(MapDto map);
|
||||||
|
|
||||||
|
int deleteEvent(MapDto map);
|
||||||
|
|
||||||
|
}
|
||||||
@ -18,6 +18,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import io.company.localhost.common.dto.ApiResponse;
|
||||||
import io.company.localhost.common.dto.MapDto;
|
import io.company.localhost.common.dto.MapDto;
|
||||||
import io.company.localhost.vo.MemberVo;
|
import io.company.localhost.vo.MemberVo;
|
||||||
|
|
||||||
@ -46,4 +47,8 @@ public interface NetmemberMapper {
|
|||||||
|
|
||||||
void updateUserRole(Long id, String role);
|
void updateUserRole(Long id, String role);
|
||||||
|
|
||||||
|
List<MapDto> selectMemberBirthDay(MapDto map);
|
||||||
|
|
||||||
|
List<MapDto> selectRegisterMemberList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,4 +44,6 @@ public interface commoncodMapper {
|
|||||||
Long selectcheckCategoryExists(MapDto map);
|
Long selectcheckCategoryExists(MapDto map);
|
||||||
|
|
||||||
List<MapDto> selectVacationType();
|
List<MapDto> selectVacationType();
|
||||||
|
|
||||||
|
List<MapDto> selectCodeList(MapDto map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,6 +41,8 @@ public interface localvacaMapper {
|
|||||||
Long findVacationIdByDate(@Param("userId") Long employeeId, @Param("date") String date);
|
Long findVacationIdByDate(@Param("userId") Long employeeId, @Param("date") String date);
|
||||||
|
|
||||||
void updateVacation(MapDto vacation);
|
void updateVacation(MapDto vacation);
|
||||||
|
|
||||||
|
List<MapDto> selectMemberVacationsInMain(@Param("year") int year, @Param("month") int month);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,53 @@
|
|||||||
|
/************************************************************
|
||||||
|
*
|
||||||
|
* @packageName : io.company.localhost.service
|
||||||
|
* @fileName : LocalbordService.java
|
||||||
|
* @author : 박성용
|
||||||
|
* @date : 25.03.30
|
||||||
|
* @description :
|
||||||
|
*
|
||||||
|
* ===========================================================
|
||||||
|
* DATE AUTHOR NOTE
|
||||||
|
* -----------------------------------------------------------
|
||||||
|
* 25.03.30 박성용 최초 생성
|
||||||
|
*
|
||||||
|
*************************************************************/
|
||||||
|
|
||||||
|
package io.company.localhost.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import io.company.localhost.common.dto.ApiResponse;
|
||||||
|
import io.company.localhost.common.dto.MapDto;
|
||||||
|
import io.company.localhost.mapper.LocalevntMapper;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class LocalevntService {
|
||||||
|
|
||||||
|
private final LocalevntMapper localevntMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public int insertEvent(MapDto map) {
|
||||||
|
return localevntMapper.insertEvent(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int selectCheckEvent(MapDto map) {
|
||||||
|
return localevntMapper.selectCheckEvent(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MapDto> selectEventList(MapDto map) {
|
||||||
|
return localevntMapper.selectEventList(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int deleteEvent(MapDto map) {
|
||||||
|
return localevntMapper.deleteEvent(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
98
src/main/java/io/company/localhost/service/MainService.java
Normal file
98
src/main/java/io/company/localhost/service/MainService.java
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
/************************************************************
|
||||||
|
*
|
||||||
|
* @packageName : io.company.localhost.CommutersService
|
||||||
|
* @fileName : MainService.java
|
||||||
|
* @author : 박성용
|
||||||
|
* @date : 25.03.17
|
||||||
|
* @description : 메인페이지 비지니스 로직
|
||||||
|
*
|
||||||
|
* ===========================================================
|
||||||
|
* DATE AUTHOR NOTE
|
||||||
|
* -----------------------------------------------------------
|
||||||
|
* 25.03.17 박성용 최초 생성
|
||||||
|
*
|
||||||
|
*************************************************************/
|
||||||
|
package io.company.localhost.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import io.company.localhost.common.dto.ApiResponse;
|
||||||
|
import io.company.localhost.common.dto.MapDto;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class MainService {
|
||||||
|
|
||||||
|
private final commoncodService commoncodService;
|
||||||
|
|
||||||
|
private final NetmemberService netmemberService;
|
||||||
|
|
||||||
|
private final localvacaService localvacaService;
|
||||||
|
|
||||||
|
private final LocalevntService localevntService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 메인페이지 카테고리 메뉴 조회
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ApiResponse<List<MapDto>> selectMainMenuCategory() {
|
||||||
|
return ApiResponse.ok(commoncodService.selectCodeList("300", "200"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 메인페이지 이벤트 리스트
|
||||||
|
*
|
||||||
|
* @param map (year, month)
|
||||||
|
* @return { 생일자, 휴가자, 생일파티, 회식, 티타임, 워크샵 } 일정
|
||||||
|
*/
|
||||||
|
public ApiResponse<MapDto> selectEventList(MapDto map) {
|
||||||
|
int year = Integer.valueOf(map.getString("year"));
|
||||||
|
int month = Integer.valueOf(map.getString("month"));
|
||||||
|
|
||||||
|
map.put("memberBirthdayList", netmemberService.selectMemberBirthDay(map)); //생일자 조회
|
||||||
|
map.put("memberVacationList", localvacaService.selectMemberVacationsInMain(year, month)); //휴가자 조회
|
||||||
|
map.put("eventList", localevntService.selectEventList(map));
|
||||||
|
|
||||||
|
return ApiResponse.ok(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 이벤트 생성/삭제
|
||||||
|
*
|
||||||
|
* @param map (code, date)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ApiResponse<String> toggleEvent(MapDto map) {
|
||||||
|
if(localevntService.selectCheckEvent(map) > 0) {
|
||||||
|
localevntService.deleteEvent(map);
|
||||||
|
return ApiResponse.okMessage("이벤트 삭제");
|
||||||
|
//return ApiResponse.error(HttpStatus.CONFLICT, "이미 동일한 이벤트가 존재합니다");
|
||||||
|
} else {
|
||||||
|
// localevntService.insertEvent(map);
|
||||||
|
// return ApiResponse.okMessage("이벤트 추가");
|
||||||
|
return ApiResponse.error(HttpStatus.CONFLICT, "해당 이벤트가 존재하지 않습니다");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResponse<String> inserEvent(MapDto map) {
|
||||||
|
if(localevntService.selectCheckEvent(map) > 0) {
|
||||||
|
return ApiResponse.error(HttpStatus.CONFLICT, "이미 동일한 이벤트가 존재합니다");
|
||||||
|
} else {
|
||||||
|
localevntService.insertEvent(map);
|
||||||
|
return ApiResponse.okMessage("이벤트 추가");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResponse<List<MapDto>> registerMemberList() {
|
||||||
|
return ApiResponse.ok(netmemberService.selectRegisterMemberList());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -21,6 +21,7 @@ import org.springframework.security.crypto.password.DelegatingPasswordEncoder;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import io.company.localhost.common.dto.ApiResponse;
|
||||||
import io.company.localhost.common.dto.MapDto;
|
import io.company.localhost.common.dto.MapDto;
|
||||||
import io.company.localhost.mapper.NetmemberMapper;
|
import io.company.localhost.mapper.NetmemberMapper;
|
||||||
import io.company.localhost.mapper.PromemberMapper;
|
import io.company.localhost.mapper.PromemberMapper;
|
||||||
@ -179,5 +180,26 @@ public class NetmemberService {
|
|||||||
System.out.println("암호화된 비밀번호: " + encodedPassword);
|
System.out.println("암호화된 비밀번호: " + encodedPassword);
|
||||||
return memberMapper.updatePassword(map) > 0;
|
return memberMapper.updatePassword(map) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 멤버 생일 조회
|
||||||
|
*
|
||||||
|
* @param map (year, month)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<MapDto> selectMemberBirthDay(MapDto map) {
|
||||||
|
return memberMapper.selectMemberBirthDay(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 등록 대기 멤버 조회
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<MapDto> selectRegisterMemberList() {
|
||||||
|
return memberMapper.selectRegisterMemberList();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import io.company.localhost.common.dto.MapDto;
|
import io.company.localhost.common.dto.MapDto;
|
||||||
import io.company.localhost.common.exception.NotFoundHandler;
|
import io.company.localhost.common.exception.NotFoundHandler;
|
||||||
import io.company.localhost.mapper.commoncodMapper;
|
import io.company.localhost.mapper.commoncodMapper;
|
||||||
|
import io.company.localhost.utils.StringUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -60,4 +61,14 @@ public class commoncodService {
|
|||||||
// 데이터가 비어있으면 빈 리스트 반환 (null 방지)
|
// 데이터가 비어있으면 빈 리스트 반환 (null 방지)
|
||||||
return (codeList != null) ? codeList : new ArrayList<>();
|
return (codeList != null) ? codeList : new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MapDto> selectCodeList(String code1, String code2) {
|
||||||
|
if(!StringUtil.isNumeric(code1) || !StringUtil.isNumeric(code2)) throw new IllegalArgumentException("파라미터는 반드시 숫자 타입이여야 함");
|
||||||
|
|
||||||
|
MapDto map = new MapDto();
|
||||||
|
map.put("CMNCODLV1", code1);
|
||||||
|
map.put("CMNCODLV2", code2.substring(0, 1));
|
||||||
|
|
||||||
|
return commoncodmapper.selectCodeList(map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -320,4 +320,8 @@ public class localvacaService {
|
|||||||
public List<MapDto> selectSentVacationCount(MapDto map) {
|
public List<MapDto> selectSentVacationCount(MapDto map) {
|
||||||
return localvacaMapper.selectSentVacationCount(map);
|
return localvacaMapper.selectSentVacationCount(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MapDto> selectMemberVacationsInMain(int year, int month) {
|
||||||
|
return localvacaMapper.selectMemberVacationsInMain(year, month);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,15 @@ import org.springframework.util.StringUtils;
|
|||||||
|
|
||||||
public class StringUtil extends StringUtils {
|
public class StringUtil extends StringUtils {
|
||||||
|
|
||||||
//String Util 여기서 작성
|
/**
|
||||||
|
* 정수타입 확인
|
||||||
|
*
|
||||||
|
* @param str
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean isNumeric(String str) {
|
||||||
|
return str.matches("\\d+");
|
||||||
|
}
|
||||||
|
|
||||||
public StringUtil() {}
|
public StringUtil() {}
|
||||||
}
|
}
|
||||||
|
|||||||
57
src/main/resources/mapper/LocalevntMapper.xml
Normal file
57
src/main/resources/mapper/LocalevntMapper.xml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?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="io.company.localhost.mapper.LocalevntMapper">
|
||||||
|
|
||||||
|
<!-- 이벤트 작성 -->
|
||||||
|
<insert id="insertEvent">
|
||||||
|
/* 이벤트 작성 */
|
||||||
|
INSERT INTO LOCALEVNT (
|
||||||
|
CMNCODVAL,
|
||||||
|
LOCEVTPLC,
|
||||||
|
LOCEVTTME,
|
||||||
|
LOCEVTRDT
|
||||||
|
) VALUES (
|
||||||
|
#{code},
|
||||||
|
<choose>
|
||||||
|
<when test="place != null">
|
||||||
|
#{place},
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
null,
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
#{date},
|
||||||
|
NOW()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="selectCheckEvent">
|
||||||
|
/* 이벤트 확인 */
|
||||||
|
SELECT
|
||||||
|
COUNT(*)
|
||||||
|
FROM
|
||||||
|
LOCALEVNT
|
||||||
|
WHERE
|
||||||
|
CMNCODVAL = #{code} AND DATE(LOCEVTTME) = DATE(#{date})
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectEventList">
|
||||||
|
/* 이벤트 조회 */
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
LOCALEVNT
|
||||||
|
WHERE
|
||||||
|
YEAR(LOCEVTTME) = #{year} AND MONTH(LOCEVTTME) = #{month}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<delete id="deleteEvent">
|
||||||
|
/* 이벤트 제거 */
|
||||||
|
DELETE FROM
|
||||||
|
LOCALEVNT
|
||||||
|
WHERE
|
||||||
|
CMNCODVAL = #{code} AND DATE(LOCEVTTME) = DATE(#{date})
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -155,5 +155,38 @@
|
|||||||
<update id="updateUserRole">
|
<update id="updateUserRole">
|
||||||
UPDATE netmember SET MEMBERROL = #{role} WHERE MEMBERSEQ = #{id}
|
UPDATE netmember SET MEMBERROL = #{role} WHERE MEMBERSEQ = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="selectMemberBirthDay">
|
||||||
|
SELECT
|
||||||
|
A.MEMBERSEQ,
|
||||||
|
A.MEMBERNAM,
|
||||||
|
A.MEMBERCOL,
|
||||||
|
A.MEMBERPRF,
|
||||||
|
A.MEMBERBTH,
|
||||||
|
B.CMNCODNAM AS usercolor
|
||||||
|
FROM
|
||||||
|
NETMEMBER A
|
||||||
|
LEFT JOIN
|
||||||
|
COMMONCOD B ON B.CMNCODVAL = A.MEMBERCOL
|
||||||
|
WHERE
|
||||||
|
MONTH(MEMBERBTH) = #{month};
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectRegisterMemberList">
|
||||||
|
/* 미등록 멤버 조회 */
|
||||||
|
SELECT
|
||||||
|
MEMBERSEQ,
|
||||||
|
MEMBERIDS,
|
||||||
|
MEMBERPRF,
|
||||||
|
MEMBERNAM,
|
||||||
|
MEMBERTEL,
|
||||||
|
MEMBERRDT,
|
||||||
|
MEMBERPRM,
|
||||||
|
MEMBERMBT
|
||||||
|
FROM
|
||||||
|
NETMEMBER
|
||||||
|
WHERE
|
||||||
|
MEMBERPRM = 'N'
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -146,4 +146,20 @@
|
|||||||
FROM commoncod
|
FROM commoncod
|
||||||
WHERE CMNCODVAL IN ('700101', '700102', '700103')
|
WHERE CMNCODVAL IN ('700101', '700102', '700103')
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectCodeList" parameterType="Map">
|
||||||
|
/* 코드 목록 조회 */
|
||||||
|
SELECT
|
||||||
|
CMNCODVAL,
|
||||||
|
CMNCODNAM,
|
||||||
|
CMNCODODR
|
||||||
|
FROM
|
||||||
|
COMMONCOD
|
||||||
|
WHERE
|
||||||
|
CMNCODLV1 = #{CMNCODLV1} AND CMNCODLV2 LIKE CONCAT(#{CMNCODLV2}, '%')
|
||||||
|
AND
|
||||||
|
CMNCODYON = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -35,13 +35,17 @@
|
|||||||
<!-- 휴가 정보 조회 -->
|
<!-- 휴가 정보 조회 -->
|
||||||
<select id="selectVacations" parameterType="map" resultType="io.company.localhost.common.dto.MapDto">
|
<select id="selectVacations" parameterType="map" resultType="io.company.localhost.common.dto.MapDto">
|
||||||
SELECT
|
SELECT
|
||||||
A.LOCVACSEQ, A.MEMBERSEQ, A.LOCVACUDT, A.LOCVACTYP, A.LOCVACRMM, B.MEMBERPRF
|
A.LOCVACSEQ, A.MEMBERSEQ, A.LOCVACUDT, A.LOCVACTYP, A.LOCVACRMM, B.MEMBERPRF, B.MEMBERNAM, C.CMNCODNAM AS usercolor
|
||||||
FROM
|
FROM
|
||||||
localvaca A
|
localvaca A
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
NETMEMBER B ON A.MEMBERSEQ = B.MEMBERSEQ
|
NETMEMBER B ON A.MEMBERSEQ = B.MEMBERSEQ
|
||||||
|
LEFT JOIN
|
||||||
|
COMMONCOD C ON C.CMNCODVAL = B.MEMBERCOL
|
||||||
WHERE
|
WHERE
|
||||||
DATE_FORMAT(LOCVACUDT, '%Y-%m') = CONCAT(#{year}, '-', LPAD(#{month}, 2, '0'))
|
DATE_FORMAT(LOCVACUDT, '%Y-%m') = CONCAT(#{year}, '-', LPAD(#{month}, 2, '0'))
|
||||||
|
ORDER BY
|
||||||
|
A.LOCVACUDT ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 사용자가 사용한 연차 목록 조회 -->
|
<!-- 사용자가 사용한 연차 목록 조회 -->
|
||||||
@ -148,5 +152,30 @@
|
|||||||
SELECT COUNT(*) as count FROM localvaca WHERE MEMBERSEQ = #{userId} AND LOCVACRMM = #{receiverId} AND YEAR(LOCVACUDT) = YEAR(NOW())
|
SELECT COUNT(*) as count FROM localvaca WHERE MEMBERSEQ = #{userId} AND LOCVACRMM = #{receiverId} AND YEAR(LOCVACUDT) = YEAR(NOW())
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectMemberVacationsInMain">
|
||||||
|
SELECT
|
||||||
|
A.LOCVACSEQ,
|
||||||
|
A.MEMBERSEQ,
|
||||||
|
A.LOCVACUDT,
|
||||||
|
A.LOCVACTYP,
|
||||||
|
A.LOCVACRMM,
|
||||||
|
B.MEMBERPRF,
|
||||||
|
B.MEMBERNAM,
|
||||||
|
C.CMNCODNAM as usercolor
|
||||||
|
FROM
|
||||||
|
localvaca A
|
||||||
|
LEFT JOIN
|
||||||
|
NETMEMBER B on A.MEMBERSEQ = B.MEMBERSEQ
|
||||||
|
LEFT JOIN
|
||||||
|
COMMONCOD C on C.CMNCODVAL = B.MEMBERCOL
|
||||||
|
WHERE
|
||||||
|
DATE_FORMAT(LOCVACUDT, '%Y-%m') = CONCAT(2025, '-', LPAD(3, 2, '0'))
|
||||||
|
AND LOCVACRMM is null
|
||||||
|
GROUP BY
|
||||||
|
A.LOCVACUDT, A.MEMBERSEQ
|
||||||
|
ORDER BY
|
||||||
|
A.LOCVACUDT ASC;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user