feat: 심의등록 반영
parent
5657a4dd92
commit
2bfff312e2
@ -1,11 +1,59 @@
|
||||
package com.xit.biz.ctgy.repository;
|
||||
|
||||
import com.xit.biz.ctgy.dto.MinSimsaTargetDto;
|
||||
import com.xit.biz.ctgy.entity.MinSimsa680;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IParkingRepository extends JpaRepository<MinSimsa680, Long>, IParkingRepositoryCustom {
|
||||
|
||||
@Query(value="insert into min_simsa680(" +
|
||||
"ms_maincode, " +
|
||||
"ms_seq," +
|
||||
"ms_carnum," +
|
||||
"ms_year," +
|
||||
"ms_chasu," +
|
||||
"ms_sdate," +
|
||||
"ms_startsi," +
|
||||
"ms_edate," +
|
||||
"ms_cdate," +
|
||||
"ms_closesi," +
|
||||
"ms_wdate," +
|
||||
"ms_pos," +
|
||||
"ms_result," +
|
||||
"ms_jbtime" +
|
||||
") " +
|
||||
"select TR.rc_code," +
|
||||
"TR.rc_seq," +
|
||||
"TM.mm_ocarno," +
|
||||
":msYear, " +
|
||||
":msChasu," +
|
||||
":msSdate," +
|
||||
":msStartsi," +
|
||||
":msEdate," +
|
||||
":msCdate," +
|
||||
":msClosesi," +
|
||||
"TM.mm_wdate," +
|
||||
"TD.do_bname||''||TJ.mj_pos," +
|
||||
":msResult," +
|
||||
"TJ.mj_jbtime " +
|
||||
"from tf680_recall TR " +
|
||||
"join tf680_main TM on TR.rc_code = :rcCode and TM.mm_code = TR.rc_maincode " +
|
||||
"join tf680_jucha TJ on TM.mm_code = TJ.mj_code " +
|
||||
"join tf680_dong TD on TJ.mj_dong = TD.do_code", nativeQuery = true)
|
||||
void insertSimsaTargetIntoSelect(@Nonnull @Param("msYear") final String msYear,
|
||||
@Nonnull @Param("rcCode") Long rcCode,
|
||||
@Nonnull @Param("msChasu") Long msChasu,
|
||||
@Nonnull @Param("msSdate") Date msSdate,
|
||||
@Nonnull @Param("msStartsi") String msStartsi,
|
||||
@Nonnull @Param("msEdate") Date msEdate,
|
||||
@Nonnull @Param("msCdate") Date msCdate,
|
||||
@Nonnull @Param("msClosesi") String msClosesi,
|
||||
@Nonnull @Param("msResult") String msResult);
|
||||
}
|
||||
|
@ -0,0 +1,39 @@
|
||||
package com.xit.core.config.support;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.format.datetime.DateFormatter;
|
||||
import org.springframework.format.datetime.DateFormatterRegistrar;
|
||||
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
|
||||
import org.springframework.format.support.DefaultFormattingConversionService;
|
||||
import org.springframework.format.support.FormattingConversionService;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* LocalDate / LocalDateTime type 데이타 정제
|
||||
* 2022-03-24T11:30:09.184Z -> 2022-03-24 11:30:09
|
||||
*/
|
||||
@Configuration
|
||||
public class DateTimeConfig extends WebMvcConfigurationSupport {
|
||||
|
||||
@NotNull
|
||||
@Bean
|
||||
@Override
|
||||
public FormattingConversionService mvcConversionService() {
|
||||
DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService(false);
|
||||
|
||||
DateTimeFormatterRegistrar dateTimeRegistrar = new DateTimeFormatterRegistrar();
|
||||
dateTimeRegistrar.setDateFormatter(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
dateTimeRegistrar.setDateTimeFormatter(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
dateTimeRegistrar.registerFormatters(conversionService);
|
||||
|
||||
DateFormatterRegistrar dateRegistrar = new DateFormatterRegistrar();
|
||||
dateRegistrar.setFormatter(new DateFormatter("yyyy-MM-dd"));
|
||||
dateRegistrar.registerFormatters(conversionService);
|
||||
|
||||
return conversionService;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue