Merge branch 'dev' of https://git.jetbrains.space/nalpari/q-cast-iii/qcast-api into feature/qcast-api-002
This commit is contained in:
commit
d15d684fac
@ -1,13 +1,15 @@
|
|||||||
package com.interplug.qcast.biz.commCode;
|
package com.interplug.qcast.biz.commCode;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.interplug.qcast.biz.commCode.dto.CommCodeRequest;
|
import com.interplug.qcast.biz.commCode.dto.CommCodeApiResponse;
|
||||||
import com.interplug.qcast.biz.commCode.dto.CommCodeResponse;
|
import com.interplug.qcast.biz.commCode.dto.CommCodeDetailRequest;
|
||||||
|
import com.interplug.qcast.biz.commCode.dto.CommCodeHeaderRequest;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -21,18 +23,31 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
public class CommCodeController {
|
public class CommCodeController {
|
||||||
private final CommCodeService commCodeService;
|
private final CommCodeService commCodeService;
|
||||||
|
|
||||||
@Operation(description = "공통코드 COMM_H, COMM_L 정보를 등록/수정 한다.(동기화)")
|
@Operation(description = "공통코드 COMM_H 정보를 등록/수정 한다.(동기화)")
|
||||||
@PutMapping("/qc-comm-yn-update")
|
@PutMapping("/qc-comm-h-update")
|
||||||
@ResponseStatus(HttpStatus.OK)
|
@ResponseStatus(HttpStatus.OK)
|
||||||
public CommCodeResponse setQcCommCdYn(@RequestBody CommCodeRequest codeReq) {
|
public CommCodeApiResponse setQcCommCdYn(@RequestBody List<CommCodeHeaderRequest> headReqList) {
|
||||||
CommCodeResponse codeResponse = new CommCodeResponse();
|
CommCodeApiResponse codeResponse = new CommCodeApiResponse();
|
||||||
|
|
||||||
|
int resultCnt = commCodeService.setCommHUpdate(headReqList);
|
||||||
|
if (resultCnt > 0)
|
||||||
|
codeResponse.setCode("200");
|
||||||
|
else
|
||||||
|
codeResponse.setCode("500");
|
||||||
|
|
||||||
|
return codeResponse;
|
||||||
|
|
||||||
int resultCnt = 0;
|
|
||||||
if ("H".equals(codeReq.getQcGubun())) {
|
|
||||||
resultCnt = commCodeService.setCommHUpdate(codeReq);
|
|
||||||
} else {
|
|
||||||
resultCnt = commCodeService.setCommLUpdate(codeReq);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation(description = "공통코드 COMM_L 정보를 등록/수정 한다.(동기화)")
|
||||||
|
@PutMapping("/qc-comm-l-update")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
public CommCodeApiResponse setCommLUpdate(
|
||||||
|
@RequestBody List<CommCodeDetailRequest> detailReqList) {
|
||||||
|
CommCodeApiResponse codeResponse = new CommCodeApiResponse();
|
||||||
|
|
||||||
|
int resultCnt = commCodeService.setCommLUpdate(detailReqList);
|
||||||
|
|
||||||
if (resultCnt > 0)
|
if (resultCnt > 0)
|
||||||
codeResponse.setCode("200");
|
codeResponse.setCode("200");
|
||||||
else
|
else
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
package com.interplug.qcast.biz.commCode;
|
package com.interplug.qcast.biz.commCode;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import com.interplug.qcast.biz.commCode.dto.CommCodeRequest;
|
import com.interplug.qcast.biz.commCode.dto.CommCodeDetailRequest;
|
||||||
|
import com.interplug.qcast.biz.commCode.dto.CommCodeHeaderRequest;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CommCodeMapper {
|
public interface CommCodeMapper {
|
||||||
|
|
||||||
int setCommHUpdate(CommCodeRequest codeReq);
|
int setCommHUpdate(CommCodeHeaderRequest codeReq);
|
||||||
|
|
||||||
|
int setCommLUpdate(CommCodeDetailRequest codeReq);
|
||||||
|
|
||||||
int setCommLUpdate(CommCodeRequest codeReq);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
package com.interplug.qcast.biz.commCode;
|
package com.interplug.qcast.biz.commCode;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.interplug.qcast.biz.commCode.dto.CommCodeRequest;
|
import com.interplug.qcast.biz.commCode.dto.CommCodeDetailRequest;
|
||||||
|
import com.interplug.qcast.biz.commCode.dto.CommCodeHeaderRequest;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -10,11 +12,34 @@ public class CommCodeService {
|
|||||||
|
|
||||||
private final CommCodeMapper commCodeMapper;
|
private final CommCodeMapper commCodeMapper;
|
||||||
|
|
||||||
public int setCommHUpdate(CommCodeRequest codeSaveReq) {
|
public int setCommHUpdate(List<CommCodeHeaderRequest> headReqList) {
|
||||||
return commCodeMapper.setCommHUpdate(codeSaveReq);
|
int resultCnt = 0;
|
||||||
|
if (!headReqList.isEmpty()) {
|
||||||
|
for (CommCodeHeaderRequest headReq : headReqList) {
|
||||||
|
if ("Y".equals(headReq.getQcCommYn())) {
|
||||||
|
headReq.setDelFlg(0);
|
||||||
|
} else {
|
||||||
|
headReq.setDelFlg(1);
|
||||||
|
}
|
||||||
|
resultCnt += commCodeMapper.setCommHUpdate(headReq);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int setCommLUpdate(CommCodeRequest codeSaveReq) {
|
public int setCommLUpdate(List<CommCodeDetailRequest> detailReqList) {
|
||||||
return commCodeMapper.setCommLUpdate(codeSaveReq);
|
int resultCnt = 0;
|
||||||
|
if (!detailReqList.isEmpty()) {
|
||||||
|
for (CommCodeDetailRequest detailReq : detailReqList) {
|
||||||
|
if ("A".equals(detailReq.getClStatCd())) {
|
||||||
|
detailReq.setClDelFlg(0);
|
||||||
|
} else {
|
||||||
|
detailReq.setClDelFlg(1);
|
||||||
|
}
|
||||||
|
resultCnt += commCodeMapper.setCommLUpdate(detailReq);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return resultCnt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.interplug.qcast.biz.commCode.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CommCodeApiResponse {
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
private String message;
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.interplug.qcast.biz.commCode.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ToString
|
||||||
|
public class CommCodeDetailRequest {
|
||||||
|
private String clHeadCd;
|
||||||
|
private String clCode;
|
||||||
|
private String clReadCd;
|
||||||
|
private String clCodeNm;
|
||||||
|
private String clCodeJp;
|
||||||
|
private String clCode4Th;
|
||||||
|
private String clRefChr1;
|
||||||
|
private String clRefChr2;
|
||||||
|
private String clRefChr3;
|
||||||
|
private String clRefChr4;
|
||||||
|
private String clRefChr5;
|
||||||
|
private Integer clRefNum1;
|
||||||
|
private Integer clRefNum2;
|
||||||
|
private Integer clRefNum3;
|
||||||
|
private Integer clRefNum4;
|
||||||
|
private Integer clRefNum5;
|
||||||
|
private Integer clPriority;
|
||||||
|
private String clRefCnt;
|
||||||
|
private Integer clDelFlg;
|
||||||
|
private String clStatCd;
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.interplug.qcast.biz.commCode.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ToString
|
||||||
|
public class CommCodeHeaderRequest {
|
||||||
|
|
||||||
|
private String headCd;
|
||||||
|
private String headId;
|
||||||
|
private String headNm;
|
||||||
|
private String headJp;
|
||||||
|
private String head4Th;
|
||||||
|
private String refChr1;
|
||||||
|
private String refChr2;
|
||||||
|
private String refChr3;
|
||||||
|
private String refChr4;
|
||||||
|
private String refChr5;
|
||||||
|
private String refNum1;
|
||||||
|
private String refNum2;
|
||||||
|
private String refNum3;
|
||||||
|
private String refNum4;
|
||||||
|
private String refNum5;
|
||||||
|
private String remarks;
|
||||||
|
private String qcCommYn;
|
||||||
|
private Integer delFlg;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,8 +1,6 @@
|
|||||||
package com.interplug.qcast.biz.object;
|
package com.interplug.qcast.biz.object;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.object.dto.ObjectRequest;
|
import com.interplug.qcast.biz.object.dto.*;
|
||||||
import com.interplug.qcast.biz.object.dto.ObjectResponse;
|
|
||||||
import com.interplug.qcast.biz.object.dto.PlanRequest;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -21,50 +19,78 @@ public class ObjectController {
|
|||||||
// @Autowired private ObjectService objectService;
|
// @Autowired private ObjectService objectService;
|
||||||
private final ObjectService objectService;
|
private final ObjectService objectService;
|
||||||
|
|
||||||
|
@Operation(description = "물건정보 도도부현을 조회한다.")
|
||||||
|
@GetMapping("/prefecture/list")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
public List<PrefResponse> selectPrefList() throws Exception {
|
||||||
|
return objectService.selectPrefList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "물건정보 도도부현 발전시뮬레이션 지역을 조회한다.")
|
||||||
|
@GetMapping("/prefecture/{prefId}/list")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
public List<PrefResponse> selectPrefAreaList(@PathVariable String prefId) throws Exception {
|
||||||
|
return objectService.selectPrefAreaList(prefId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "물건정보 지역 기준풍속을 조회한다.")
|
||||||
|
@GetMapping("/windSpeed/{city}/list")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
public List<WindSpeedResponse> selectWindSpeedList(@PathVariable String city) throws Exception {
|
||||||
|
return objectService.selectWindSpeedList(city);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "판매점 목록을 조회한다.")
|
||||||
|
@GetMapping("/saleStore/{saleStoreId}/list")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
public List<SaleStoreResponse> selectSaleStoreList(@PathVariable String saleStoreId) throws Exception {
|
||||||
|
return objectService.selectSaleStoreList(saleStoreId);
|
||||||
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보 목록을 조회한다.")
|
@Operation(description = "물건정보 목록을 조회한다.")
|
||||||
@GetMapping("/v1.0/object")
|
@GetMapping("/list")
|
||||||
@ResponseStatus(HttpStatus.OK)
|
@ResponseStatus(HttpStatus.OK)
|
||||||
public List<ObjectResponse> selectObjectList(ObjectRequest objectRequest) throws Exception {
|
public List<ObjectResponse> selectObjectList(ObjectRequest objectRequest) throws Exception {
|
||||||
return objectService.selectObjectList(objectRequest);
|
return objectService.selectObjectList(objectRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보 상세를 조회한다.")
|
@Operation(description = "물건정보 상세를 조회한다.")
|
||||||
@GetMapping("/v1.0/object/{objectNo}")
|
@GetMapping("/{objectNo}/detail")
|
||||||
@ResponseStatus(HttpStatus.OK)
|
@ResponseStatus(HttpStatus.OK)
|
||||||
public ObjectResponse selectObjectDetail(@PathVariable String objectNo) throws Exception {
|
public ObjectResponse selectObjectDetail(@PathVariable String objectNo) throws Exception {
|
||||||
return objectService.selectObjectDetail(objectNo);
|
return objectService.selectObjectDetail(objectNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보을 저장한다.")
|
@Operation(description = "물건정보을 저장한다.")
|
||||||
@PostMapping("/v1.0/object")
|
@PostMapping("/save-object")
|
||||||
@ResponseStatus(HttpStatus.CREATED)
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
public ObjectResponse insertObject(@RequestBody ObjectRequest objectRequest) throws Exception {
|
public ObjectResponse insertObject(@RequestBody ObjectRequest objectRequest) throws Exception {
|
||||||
return objectService.insertObject(objectRequest);
|
return objectService.insertObject(objectRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보을 수정한다.")
|
@Operation(description = "물건정보을 수정한다.")
|
||||||
@PutMapping("/v1.0/object")
|
@PutMapping("/save-object")
|
||||||
@ResponseStatus(HttpStatus.CREATED)
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
public void updateObject(@RequestBody ObjectRequest objectRequest) throws Exception {
|
public ObjectResponse updateObject(@RequestBody ObjectRequest objectRequest) throws Exception {
|
||||||
int reust = objectService.updateObject(objectRequest);
|
return objectService.updateObject(objectRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보을 삭제한다.")
|
@Operation(description = "물건정보을 삭제한다.")
|
||||||
@DeleteMapping("/v1.0/object/{objectNo}")
|
@DeleteMapping("/{objectNo}")
|
||||||
@ResponseStatus(HttpStatus.NO_CONTENT)
|
@ResponseStatus(HttpStatus.NO_CONTENT)
|
||||||
public void deleteObject(@PathVariable String objectNo) throws Exception {
|
public void deleteObject(@PathVariable String objectNo) throws Exception {
|
||||||
objectService.deleteObject(objectNo);
|
objectService.deleteObject(objectNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보의 플랜정보를 추가한다.")
|
@Operation(description = "물건정보의 플랜정보를 추가한다.")
|
||||||
@PostMapping("/v1.0/object/plan")
|
@PostMapping("/add-plan")
|
||||||
@ResponseStatus(HttpStatus.CREATED)
|
@ResponseStatus(HttpStatus.CREATED)
|
||||||
public void insertPlan(@RequestBody PlanRequest planRequest) throws Exception {
|
public void insertPlan(@RequestBody PlanRequest planRequest) throws Exception {
|
||||||
objectService.insertPlan(planRequest);
|
objectService.insertPlan(planRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "물건정보의 플랜정보를 삭제한다.")
|
@Operation(description = "물건정보의 플랜정보를 삭제한다.")
|
||||||
@DeleteMapping("/v1.0/object/plan/{objectNo}/{planNo}")
|
@DeleteMapping("/plan/{objectNo}/{planNo}")
|
||||||
@ResponseStatus(HttpStatus.NO_CONTENT)
|
@ResponseStatus(HttpStatus.NO_CONTENT)
|
||||||
public void deletePlan(@PathVariable String objectNo, @PathVariable String planNo) throws Exception {
|
public void deletePlan(@PathVariable String objectNo, @PathVariable String planNo) throws Exception {
|
||||||
PlanRequest planRequest = new PlanRequest();
|
PlanRequest planRequest = new PlanRequest();
|
||||||
|
|||||||
@ -1,15 +1,26 @@
|
|||||||
package com.interplug.qcast.biz.object;
|
package com.interplug.qcast.biz.object;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.object.dto.ObjectRequest;
|
import com.interplug.qcast.biz.object.dto.*;
|
||||||
import com.interplug.qcast.biz.object.dto.ObjectResponse;
|
|
||||||
import com.interplug.qcast.biz.object.dto.PlanRequest;
|
|
||||||
import com.interplug.qcast.biz.object.dto.PlanResponse;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
interface ObjectMapper {
|
interface ObjectMapper {
|
||||||
|
// 도도부현 목록 조회
|
||||||
|
public List<PrefResponse> selectPrefList();
|
||||||
|
|
||||||
|
// 도도부현 지역 조회
|
||||||
|
public List<PrefResponse> selectPrefAreaList(String prefId);
|
||||||
|
|
||||||
|
// 지역 기준풍속 조회
|
||||||
|
public List<WindSpeedResponse> selectWindSpeedList(String city);
|
||||||
|
|
||||||
|
// 모든 판매점 목록 조회
|
||||||
|
public List<SaleStoreResponse> selectSaleStoreAllList();
|
||||||
|
|
||||||
|
// 판매점 목록 조회
|
||||||
|
public List<SaleStoreResponse> selectSaleStoreList(String saleStoreId);
|
||||||
|
|
||||||
// 물건정보 목록 조회
|
// 물건정보 목록 조회
|
||||||
public List<ObjectResponse> selectObjectList(ObjectRequest objectRequest);
|
public List<ObjectResponse> selectObjectList(ObjectRequest objectRequest);
|
||||||
@ -43,4 +54,10 @@ interface ObjectMapper {
|
|||||||
|
|
||||||
// 플랜정보 삭제(물리 삭제)
|
// 플랜정보 삭제(물리 삭제)
|
||||||
public int deletePlan(PlanRequest planRequest);
|
public int deletePlan(PlanRequest planRequest);
|
||||||
|
|
||||||
|
// 물건정보 물건번호 변경
|
||||||
|
public int updateObjectNoChange(ObjectRequest objectRequest);
|
||||||
|
|
||||||
|
// 플랜정보 물건번호 변경
|
||||||
|
public int updatePlanObjectNoChange(ObjectRequest objectRequest);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
package com.interplug.qcast.biz.object;
|
package com.interplug.qcast.biz.object;
|
||||||
|
|
||||||
import com.interplug.qcast.QCastApplication;
|
import com.interplug.qcast.biz.object.dto.*;
|
||||||
import com.interplug.qcast.biz.object.dto.ObjectRequest;
|
|
||||||
import com.interplug.qcast.biz.object.dto.ObjectResponse;
|
|
||||||
import com.interplug.qcast.biz.object.dto.PlanRequest;
|
|
||||||
import com.interplug.qcast.biz.object.dto.PlanResponse;
|
|
||||||
import io.micrometer.common.util.StringUtils;
|
import io.micrometer.common.util.StringUtils;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.ini4j.Wini;
|
import org.ini4j.Wini;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -16,6 +13,7 @@ import java.io.*;
|
|||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -23,29 +21,54 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class ObjectService {
|
public class ObjectService {
|
||||||
private final ObjectMapper objectMapper;
|
|
||||||
private final QCastApplication qCastApplication;
|
|
||||||
|
|
||||||
@Value("${file.ini.root.path}")
|
@Value("${file.ini.root.path}")
|
||||||
private String baseDirPath;
|
private String baseDirPath;
|
||||||
@Value("${file.ini.base.filename}")
|
@Value("${file.ini.base.filename}")
|
||||||
private String baseFileName;
|
private String baseFileName;
|
||||||
|
|
||||||
|
private final ObjectMapper objectMapper;
|
||||||
|
|
||||||
|
public List<PrefResponse> selectPrefList() throws Exception {
|
||||||
|
return objectMapper.selectPrefList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PrefResponse> selectPrefAreaList(String prefId) throws Exception {
|
||||||
|
return objectMapper.selectPrefAreaList(prefId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WindSpeedResponse> selectWindSpeedList(String city) throws Exception {
|
||||||
|
return objectMapper.selectWindSpeedList(city);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<SaleStoreResponse> selectSaleStoreList(String saleStoreId) throws Exception {
|
||||||
|
if ("T01".equals(saleStoreId)) {
|
||||||
|
return objectMapper.selectSaleStoreAllList();
|
||||||
|
} else {
|
||||||
|
return objectMapper.selectSaleStoreList(saleStoreId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public List<ObjectResponse> selectObjectList(ObjectRequest objectRequest) throws Exception {
|
public List<ObjectResponse> selectObjectList(ObjectRequest objectRequest) throws Exception {
|
||||||
return objectMapper.selectObjectList(objectRequest);
|
return objectMapper.selectObjectList(objectRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObjectResponse selectObjectDetail(String objectNo) throws Exception {
|
public ObjectResponse selectObjectDetail(String objectNo) throws Exception {
|
||||||
ObjectResponse objectResponse = new ObjectResponse();
|
|
||||||
|
|
||||||
// object 상세 정보 조회
|
// object 상세 정보 조회
|
||||||
objectResponse = objectMapper.selectObjectDetail(objectNo);
|
ObjectResponse objectResponse = objectMapper.selectObjectDetail(objectNo);
|
||||||
|
|
||||||
|
if (objectResponse != null) {
|
||||||
// 기본 플랜번호 셋팅
|
// 기본 플랜번호 셋팅
|
||||||
objectResponse.setPlanNo("1");
|
objectResponse.setPlanNo("1");
|
||||||
|
|
||||||
if (objectResponse != null) {
|
|
||||||
// ini 파일 읽어 Response 객체 담기
|
// ini 파일 읽어 Response 객체 담기
|
||||||
this.objectFileInfo(objectResponse);
|
this.objectFileInfo(objectResponse);
|
||||||
|
|
||||||
|
// Plan 목록 조회
|
||||||
|
PlanRequest planRequest = new PlanRequest();
|
||||||
|
planRequest.setObjectNo(objectNo);
|
||||||
|
List<PlanResponse> planList = objectMapper.selectPlanList(planRequest);
|
||||||
|
|
||||||
|
objectResponse.setPlanList(planList);
|
||||||
}
|
}
|
||||||
|
|
||||||
return objectResponse;
|
return objectResponse;
|
||||||
@ -53,10 +76,30 @@ public class ObjectService {
|
|||||||
|
|
||||||
public ObjectResponse insertObject(ObjectRequest objectRequest) throws Exception {
|
public ObjectResponse insertObject(ObjectRequest objectRequest) throws Exception {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
String objectNo = "";
|
||||||
|
|
||||||
// 물건번호 등록/조회
|
// 물건번호 등록/조회
|
||||||
|
if ("0".equals(objectRequest.getTempFlg())) {
|
||||||
|
objectRequest.setDelFlg("0");
|
||||||
|
objectRequest.setTempFlg("0");
|
||||||
|
objectRequest.setTempDelFlg("0");
|
||||||
|
|
||||||
result += objectMapper.insertObjectNo(objectRequest);
|
result += objectMapper.insertObjectNo(objectRequest);
|
||||||
String objectNo = objectMapper.selectObjectNo(objectRequest);
|
objectNo = objectMapper.selectObjectNo(objectRequest);
|
||||||
|
} else if ("1".equals(objectRequest.getTempFlg())) {
|
||||||
|
objectRequest.setDelFlg("1");
|
||||||
|
objectRequest.setTempFlg("1");
|
||||||
|
objectRequest.setTempDelFlg("0");
|
||||||
|
|
||||||
|
// 임시저장인 경우 임시 물건번호 생성 yyyymmddhh24missSSS_랜덤문자 3개
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||||
|
Calendar dateTime = Calendar.getInstance();
|
||||||
|
objectNo = sdf.format(dateTime.getTime());
|
||||||
|
|
||||||
|
objectNo = "T" + objectNo.substring(2) + RandomStringUtils.randomAlphanumeric(3);
|
||||||
|
objectNo = objectNo.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
objectRequest.setObjectNo(objectNo);
|
objectRequest.setObjectNo(objectNo);
|
||||||
|
|
||||||
// 물건정보 등록
|
// 물건정보 등록
|
||||||
@ -76,6 +119,7 @@ public class ObjectService {
|
|||||||
planRequest.setDelFlg("0");
|
planRequest.setDelFlg("0");
|
||||||
planRequest.setNorthArrangement("0");
|
planRequest.setNorthArrangement("0");
|
||||||
planRequest.setDiffRoofEnabled("0");
|
planRequest.setDiffRoofEnabled("0");
|
||||||
|
planRequest.setOrderFlg("0");
|
||||||
planRequest.setUserId(objectRequest.getUserId());
|
planRequest.setUserId(objectRequest.getUserId());
|
||||||
result += objectMapper.insertPlan(planRequest);
|
result += objectMapper.insertPlan(planRequest);
|
||||||
|
|
||||||
@ -91,14 +135,27 @@ public class ObjectService {
|
|||||||
return objectResponse;
|
return objectResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int updateObject(ObjectRequest objectRequest) throws Exception {
|
public ObjectResponse updateObject(ObjectRequest objectRequest) throws Exception {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
boolean tempChgFlg = false;
|
||||||
|
|
||||||
|
// object 상세 정보 조회
|
||||||
|
ObjectResponse objectResponse = objectMapper.selectObjectDetail(objectRequest.getObjectNo());
|
||||||
|
|
||||||
|
if (objectResponse != null) {
|
||||||
|
// 임시저장에서 저장상태 바뀌었는지 확인
|
||||||
|
if ("1".equals(objectResponse.getTempFlg()) && "0".equals(objectRequest.getTempFlg())) {
|
||||||
|
tempChgFlg = true;
|
||||||
|
|
||||||
|
result += objectMapper.insertObjectNo(objectRequest);
|
||||||
|
objectRequest.setNewObjectNo(objectMapper.selectObjectNo(objectRequest));
|
||||||
|
}
|
||||||
|
|
||||||
// 물건정보 수정
|
// 물건정보 수정
|
||||||
objectRequest.setAddress(objectRequest.getPrefName() + ((!StringUtils.isEmpty(objectRequest.getAddress())) ? objectRequest.getAddress() : ""));
|
objectRequest.setAddress(objectRequest.getPrefName() + ((!StringUtils.isEmpty(objectRequest.getAddress())) ? objectRequest.getAddress() : ""));
|
||||||
objectRequest.setAddresseeCompanyName(objectRequest.getObjectName() + ' ' + objectRequest.getObjectNameOmit());
|
objectRequest.setAddresseeCompanyName(objectRequest.getObjectName() + ' ' + objectRequest.getObjectNameOmit());
|
||||||
objectRequest.setAddresseeCompanyNameOmit(objectRequest.getObjectNameOmit());
|
objectRequest.setAddresseeCompanyNameOmit(objectRequest.getObjectNameOmit());
|
||||||
objectRequest.setContentsPath(baseDirPath + "\\\\" + objectRequest.getObjectNo());
|
objectRequest.setContentsPath(baseDirPath + "\\\\" + (tempChgFlg ? objectRequest.getNewObjectNo() : objectRequest.getObjectNo()));
|
||||||
result += objectMapper.updateObject(objectRequest);
|
result += objectMapper.updateObject(objectRequest);
|
||||||
|
|
||||||
// Plan 목록 조회
|
// Plan 목록 조회
|
||||||
@ -113,7 +170,22 @@ public class ObjectService {
|
|||||||
this.objectFileSave(objectRequest);
|
this.objectFileSave(objectRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
// 임시저장에서 저장상태로 돌리기
|
||||||
|
if (tempChgFlg) {
|
||||||
|
objectMapper.updateObjectNoChange(objectRequest);
|
||||||
|
objectMapper.updatePlanObjectNoChange(objectRequest);
|
||||||
|
|
||||||
|
// 임시저장 폴더명 생성 물건번호명으로 교체
|
||||||
|
File file = new File(baseDirPath + File.separator + objectRequest.getObjectNo());
|
||||||
|
if (file.exists()) {
|
||||||
|
file.renameTo(new File (baseDirPath + File.separator + objectRequest.getNewObjectNo()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 모든 변경 완료 후 재호출
|
||||||
|
objectResponse = objectMapper.selectObjectDetail((tempChgFlg ? objectRequest.getNewObjectNo() : objectRequest.getObjectNo()));
|
||||||
|
return objectResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int deleteObject(String objectNo) throws Exception {
|
public int deleteObject(String objectNo) throws Exception {
|
||||||
@ -196,11 +268,14 @@ public class ObjectService {
|
|||||||
// 도도부현 코드
|
// 도도부현 코드
|
||||||
objectFileSetting(iniFile, groupKey, "都道府県コード", objectRequest.getPrefId());
|
objectFileSetting(iniFile, groupKey, "都道府県コード", objectRequest.getPrefId());
|
||||||
// 물건번호
|
// 물건번호
|
||||||
objectFileSetting(iniFile, groupKey, "物件コード", objectRequest.getObjectNo());
|
objectFileSetting(iniFile, groupKey, "物件コード", !StringUtils.isEmpty(objectRequest.getNewObjectNo()) ? objectRequest.getNewObjectNo() : objectRequest.getObjectNo());
|
||||||
|
|
||||||
// 최종 일본어 형식으로 저장
|
// 최종 일본어 형식으로 저장
|
||||||
iniFile.store(new OutputStreamWriter(new FileOutputStream(dirPath + File.separator + baseFileName), "MS932"));
|
OutputStreamWriter output = new OutputStreamWriter(new FileOutputStream(dirPath + File.separator + baseFileName), "MS932");
|
||||||
|
iniFile.store(output);
|
||||||
|
|
||||||
|
output.close();
|
||||||
|
input.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
throw new RuntimeException(e.getMessage());
|
throw new RuntimeException(e.getMessage());
|
||||||
@ -256,6 +331,8 @@ public class ObjectService {
|
|||||||
if (!StringUtils.isEmpty(iniFile.get(groupKey, "寒冷地域"))) {
|
if (!StringUtils.isEmpty(iniFile.get(groupKey, "寒冷地域"))) {
|
||||||
objectResponse.setColdAreaChk(iniFile.get(groupKey, "寒冷地域"));
|
objectResponse.setColdAreaChk(iniFile.get(groupKey, "寒冷地域"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -280,6 +357,7 @@ public class ObjectService {
|
|||||||
planRequest.setDelFlg("0");
|
planRequest.setDelFlg("0");
|
||||||
planRequest.setNorthArrangement("0");
|
planRequest.setNorthArrangement("0");
|
||||||
planRequest.setDiffRoofEnabled("0");
|
planRequest.setDiffRoofEnabled("0");
|
||||||
|
planRequest.setOrderFlg("0");
|
||||||
|
|
||||||
objectMapper.insertPlan(planRequest);
|
objectMapper.insertPlan(planRequest);
|
||||||
|
|
||||||
|
|||||||
@ -1,60 +1,116 @@
|
|||||||
package com.interplug.qcast.biz.object.dto;
|
package com.interplug.qcast.biz.object.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ObjectRequest {
|
public class ObjectRequest {
|
||||||
// 물건정보 ini 파일 설정 순서에 맞쳐 셋팅
|
// 물건정보 ini 파일 설정 순서에 맞쳐 셋팅
|
||||||
|
@Schema(description = "판매점명")
|
||||||
private String saleStoreName;
|
private String saleStoreName;
|
||||||
|
@Schema(description = "경칭")
|
||||||
private String objectNameOmit;
|
private String objectNameOmit;
|
||||||
|
@Schema(description = "안건명 후리가나")
|
||||||
private String objectNameKana;
|
private String objectNameKana;
|
||||||
|
@Schema(description = "안건명")
|
||||||
private String objectName;
|
private String objectName;
|
||||||
|
@Schema(description = "담당자")
|
||||||
private String receiveUser;
|
private String receiveUser;
|
||||||
|
@Schema(description = "우편번호")
|
||||||
private String zipNo;
|
private String zipNo;
|
||||||
|
@Schema(description = "도도부현명")
|
||||||
private String prefName;
|
private String prefName;
|
||||||
|
@Schema(description = "주소")
|
||||||
private String address;
|
private String address;
|
||||||
|
@Schema(description = "발전시뮬레이션 지역")
|
||||||
private String powerSimArea;
|
private String powerSimArea;
|
||||||
|
@Schema(description = "판매오더명")
|
||||||
private String workName;
|
private String workName;
|
||||||
|
@Schema(description = "부동산 분류코드명")
|
||||||
private String objectStatusName;
|
private String objectStatusName;
|
||||||
|
@Schema(description = "메모")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
@Schema(description = "설치높이")
|
||||||
private String installHeight;
|
private String installHeight;
|
||||||
|
@Schema(description = "기준풍속")
|
||||||
private String windSpeed;
|
private String windSpeed;
|
||||||
|
@Schema(description = "수직적설량")
|
||||||
private String snowCover;
|
private String snowCover;
|
||||||
|
@Schema(description = "면조도구분")
|
||||||
private String surfaceType;
|
private String surfaceType;
|
||||||
|
@Schema(description = "전력계약구분")
|
||||||
private String powerConTerms;
|
private String powerConTerms;
|
||||||
|
@Schema(description = "염해지역 아이템사용 여부")
|
||||||
private String saltAreaChk;
|
private String saltAreaChk;
|
||||||
|
@Schema(description = "한랭지 대책여부")
|
||||||
private String coldAreaChk;
|
private String coldAreaChk;
|
||||||
|
@Schema(description = "판매오더코드")
|
||||||
private String workNo;
|
private String workNo;
|
||||||
|
@Schema(description = "부동산 분류코드")
|
||||||
private String objectStatusId;
|
private String objectStatusId;
|
||||||
|
@Schema(description = "도도부현코드")
|
||||||
private String prefId;
|
private String prefId;
|
||||||
|
@Schema(description = "물건번호")
|
||||||
private String objectNo;
|
private String objectNo;
|
||||||
|
@Schema(description = "생성 물건번호")
|
||||||
|
private String newObjectNo;
|
||||||
|
|
||||||
// 그외 물건정보
|
// 그외 물건정보
|
||||||
|
@Schema(description = "판매점ID")
|
||||||
private String saleStoreId;
|
private String saleStoreId;
|
||||||
|
@Schema(description = "배송회사명")
|
||||||
private String addresseeCompanyName;
|
private String addresseeCompanyName;
|
||||||
|
@Schema(description = "배송회사 경칭")
|
||||||
private String addresseeCompanyNameOmit;
|
private String addresseeCompanyNameOmit;
|
||||||
|
@Schema(description = "컨텐츠 파일경로")
|
||||||
private String contentsPath;
|
private String contentsPath;
|
||||||
|
@Schema(description = "임시저장여부")
|
||||||
|
private String tempFlg;
|
||||||
|
@Schema(description = "임시저장 삭제여부")
|
||||||
|
private String tempDelFlg;
|
||||||
|
@Schema(description = "임시저장->저장 변경여부")
|
||||||
|
private String tempChgFlg;
|
||||||
|
@Schema(description = "삭제여부")
|
||||||
private String delFlg;
|
private String delFlg;
|
||||||
|
@Schema(description = "사용자아이디")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
// 플랜정보
|
// 플랜정보
|
||||||
|
@Schema(description = "플랜번호")
|
||||||
private String planNo;
|
private String planNo;
|
||||||
|
|
||||||
// 검색정보
|
// 검색정보
|
||||||
|
@Schema(description = "검색 - 물건번호")
|
||||||
private String schObjectNo;
|
private String schObjectNo;
|
||||||
|
@Schema(description = "검색 - 판매점ID")
|
||||||
private String schSaleStoreId;
|
private String schSaleStoreId;
|
||||||
|
@Schema(description = "검색 - 선택판매점ID")
|
||||||
|
private String schSelSaleStoreId;
|
||||||
|
@Schema(description = "검색 - 주소")
|
||||||
private String schAddress;
|
private String schAddress;
|
||||||
|
@Schema(description = "검색 - 안건명")
|
||||||
private String schObjectName;
|
private String schObjectName;
|
||||||
|
@Schema(description = "검색 - 판매점명")
|
||||||
private String schSaleStoreName;
|
private String schSaleStoreName;
|
||||||
|
@Schema(description = "검색 - 사양확장일여부")
|
||||||
private String schSpecDateYn;
|
private String schSpecDateYn;
|
||||||
|
@Schema(description = "검색 - 담당자")
|
||||||
private String schReceiveUser;
|
private String schReceiveUser;
|
||||||
|
@Schema(description = "검색 - 견적처")
|
||||||
private String schDispCompanyName;
|
private String schDispCompanyName;
|
||||||
|
@Schema(description = "검색 - 날짜구분")
|
||||||
private String schDateType;
|
private String schDateType;
|
||||||
|
@Schema(description = "검색 - 시작일")
|
||||||
private String schFromDt;
|
private String schFromDt;
|
||||||
|
@Schema(description = "검색 - 종료일")
|
||||||
private String schToDt;
|
private String schToDt;
|
||||||
|
@Schema(description = "검색 - 정렬순서")
|
||||||
|
private String schSortType;
|
||||||
|
|
||||||
// 페이징정보
|
// 페이징정보
|
||||||
|
@Schema(description = "시작 Row")
|
||||||
private String startRow;
|
private String startRow;
|
||||||
|
@Schema(description = "종료 Row")
|
||||||
private String endRow;
|
private String endRow;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,52 +1,95 @@
|
|||||||
package com.interplug.qcast.biz.object.dto;
|
package com.interplug.qcast.biz.object.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
//@Data
|
//@Data
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class ObjectResponse {
|
public class ObjectResponse {
|
||||||
// 물건정보
|
// 물건정보
|
||||||
|
@Schema(description = "물건번호")
|
||||||
private String objectNo;
|
private String objectNo;
|
||||||
|
@Schema(description = "판매점ID")
|
||||||
private String saleStoreId;
|
private String saleStoreId;
|
||||||
|
@Schema(description = "판매점명")
|
||||||
private String saleStoreName;
|
private String saleStoreName;
|
||||||
|
@Schema(description = "판매오더코드")
|
||||||
private String workNo;
|
private String workNo;
|
||||||
|
@Schema(description = "부동산 분류코드")
|
||||||
private String objectStatusId;
|
private String objectStatusId;
|
||||||
|
@Schema(description = "안건명")
|
||||||
private String objectName;
|
private String objectName;
|
||||||
|
@Schema(description = "경칭")
|
||||||
private String objectNameOmit;
|
private String objectNameOmit;
|
||||||
|
@Schema(description = "안건명 후리가나")
|
||||||
private String objectNameKana;
|
private String objectNameKana;
|
||||||
|
@Schema(description = "우편번호")
|
||||||
private String zipNo;
|
private String zipNo;
|
||||||
|
@Schema(description = "도도부현코드")
|
||||||
private String prefId;
|
private String prefId;
|
||||||
|
@Schema(description = "주소")
|
||||||
private String address;
|
private String address;
|
||||||
|
@Schema(description = "메모")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
@Schema(description = "동일물건정보")
|
||||||
private String sameObjectInfo;
|
private String sameObjectInfo;
|
||||||
|
@Schema(description = "배송회사명")
|
||||||
private String receiveCompanyName;
|
private String receiveCompanyName;
|
||||||
|
@Schema(description = "담당자")
|
||||||
private String receiveUser;
|
private String receiveUser;
|
||||||
|
@Schema(description = "사양확정일")
|
||||||
|
private String specificationConfirmDate;
|
||||||
|
@Schema(description = "컨텐츠 파일경로")
|
||||||
private String contentsPath;
|
private String contentsPath;
|
||||||
private String specDate;
|
@Schema(description = "견적처")
|
||||||
private String dispCompanyName;
|
private String dispCompanyName;
|
||||||
|
@Schema(description = "임시저장여부")
|
||||||
|
private String tempFlg;
|
||||||
|
|
||||||
|
@Schema(description = "생성일")
|
||||||
private String createDatetime;
|
private String createDatetime;
|
||||||
|
@Schema(description = "생성자")
|
||||||
private String createUserName;
|
private String createUserName;
|
||||||
|
@Schema(description = "갱신일")
|
||||||
private String lastEditDatetime;
|
private String lastEditDatetime;
|
||||||
|
@Schema(description = "갱신자")
|
||||||
private String lastEditUserName;
|
private String lastEditUserName;
|
||||||
|
|
||||||
// ini 설정정보
|
// ini 설정정보
|
||||||
|
@Schema(description = "발전시뮬레이션 지역")
|
||||||
private String powerSimArea;
|
private String powerSimArea;
|
||||||
|
@Schema(description = "기준풍속")
|
||||||
private String windSpeed;
|
private String windSpeed;
|
||||||
|
@Schema(description = "수직적설량")
|
||||||
private String snowCover;
|
private String snowCover;
|
||||||
|
@Schema(description = "면조도구분")
|
||||||
private String surfaceType;
|
private String surfaceType;
|
||||||
|
@Schema(description = "설치높이")
|
||||||
private String installHeight;
|
private String installHeight;
|
||||||
|
@Schema(description = "전력계약구분")
|
||||||
private String powerConTerms;
|
private String powerConTerms;
|
||||||
|
@Schema(description = "한랭지 대책여부")
|
||||||
private String coldAreaChk;
|
private String coldAreaChk;
|
||||||
|
@Schema(description = "염해지역 아이템사용 여부")
|
||||||
private String saltAreaChk;
|
private String saltAreaChk;
|
||||||
|
|
||||||
// 플랜정보
|
// 플랜정보
|
||||||
|
@Schema(description = "플랜번호")
|
||||||
private String planNo;
|
private String planNo;
|
||||||
|
@Schema(description = "플랜 전체 건수")
|
||||||
private String planTotCnt;
|
private String planTotCnt;
|
||||||
|
|
||||||
|
// 플랜목록
|
||||||
|
@Schema(description = "플랜목록")
|
||||||
|
private List<PlanResponse> planList;
|
||||||
|
|
||||||
// 페이징 정보
|
// 페이징 정보
|
||||||
|
@Schema(description = "Row Number")
|
||||||
private Integer rowNumber;
|
private Integer rowNumber;
|
||||||
|
@Schema(description = "전체 건수")
|
||||||
private Integer totCnt;
|
private Integer totCnt;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,40 +1,76 @@
|
|||||||
package com.interplug.qcast.biz.object.dto;
|
package com.interplug.qcast.biz.object.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class PlanRequest {
|
public class PlanRequest {
|
||||||
|
@Schema(description = "물건번호")
|
||||||
private String objectNo;
|
private String objectNo;
|
||||||
|
@Schema(description = "플랜번호")
|
||||||
private String planNo;
|
private String planNo;
|
||||||
|
@Schema(description = "시공방법")
|
||||||
private String constructSpecification;
|
private String constructSpecification;
|
||||||
|
@Schema(description = "설치높이")
|
||||||
private String setupHeight;
|
private String setupHeight;
|
||||||
|
@Schema(description = "날씨포인트")
|
||||||
private String weatherPoint;
|
private String weatherPoint;
|
||||||
|
@Schema(description = "날씨포인트")
|
||||||
private String roofKindId;
|
private String roofKindId;
|
||||||
|
@Schema(description = "경사")
|
||||||
private String slope;
|
private String slope;
|
||||||
|
@Schema(description = "지붕재 아이템 CLASS ID")
|
||||||
private String roofMaterialClassId;
|
private String roofMaterialClassId;
|
||||||
|
@Schema(description = "지붕재 아이템 ID")
|
||||||
private String roofMaterialId;
|
private String roofMaterialId;
|
||||||
|
@Schema(description = "가대 설치 ID")
|
||||||
private String supportMethodId;
|
private String supportMethodId;
|
||||||
|
@Schema(description = "모델")
|
||||||
private String moduleModel;
|
private String moduleModel;
|
||||||
|
@Schema(description = "담당자")
|
||||||
private String charger;
|
private String charger;
|
||||||
|
@Schema(description = "견적서 유효기간")
|
||||||
private String estimateValidityTerm;
|
private String estimateValidityTerm;
|
||||||
|
@Schema(description = "결정 플랜")
|
||||||
private String decisionPlan;
|
private String decisionPlan;
|
||||||
|
@Schema(description = "넘버")
|
||||||
private String number;
|
private String number;
|
||||||
|
@Schema(description = "시스템용량")
|
||||||
private String capacity;
|
private String capacity;
|
||||||
|
@Schema(description = "강설량")
|
||||||
private String snowfall;
|
private String snowfall;
|
||||||
|
@Schema(description = "표준풍속검사")
|
||||||
private String standardWindSpeedCheck;
|
private String standardWindSpeedCheck;
|
||||||
|
@Schema(description = "옵션커버")
|
||||||
private String optionCover;
|
private String optionCover;
|
||||||
|
@Schema(description = "한화여부")
|
||||||
private String hanwfaFlg;
|
private String hanwfaFlg;
|
||||||
|
@Schema(description = "기준종류ID")
|
||||||
private String standKindId;
|
private String standKindId;
|
||||||
|
@Schema(description = "기준풍속ID")
|
||||||
private String standardWindSpeedId;
|
private String standardWindSpeedId;
|
||||||
|
@Schema(description = "가대 메이커")
|
||||||
private String supportMeaker;
|
private String supportMeaker;
|
||||||
|
@Schema(description = "소비세ID")
|
||||||
private String consumptionTaxId;
|
private String consumptionTaxId;
|
||||||
|
@Schema(description = "상태코드")
|
||||||
private String status;
|
private String status;
|
||||||
|
@Schema(description = "사용자아이디")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
@Schema(description = "삭제여부")
|
||||||
private String delFlg;
|
private String delFlg;
|
||||||
|
@Schema(description = "파워컨디셔너")
|
||||||
private String pcTypeNo;
|
private String pcTypeNo;
|
||||||
|
@Schema(description = "북면설치여부")
|
||||||
private String northArrangement;
|
private String northArrangement;
|
||||||
|
@Schema(description = "지붕재")
|
||||||
private String roofMaterialIdMulti;
|
private String roofMaterialIdMulti;
|
||||||
|
@Schema(description = "가대")
|
||||||
private String supportMethodIdMulti;
|
private String supportMethodIdMulti;
|
||||||
|
@Schema(description = "가대 메이커")
|
||||||
private String supportMeakerMulti;
|
private String supportMeakerMulti;
|
||||||
|
@Schema(description = "다른 지붕재여부")
|
||||||
private String diffRoofEnabled;
|
private String diffRoofEnabled;
|
||||||
|
@Schema(description = "발주여부")
|
||||||
|
private String orderFlg;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,40 +1,76 @@
|
|||||||
package com.interplug.qcast.biz.object.dto;
|
package com.interplug.qcast.biz.object.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class PlanResponse {
|
public class PlanResponse {
|
||||||
|
@Schema(description = "물건번호")
|
||||||
private String objectNo;
|
private String objectNo;
|
||||||
|
@Schema(description = "플랜번호")
|
||||||
private String planNo;
|
private String planNo;
|
||||||
|
@Schema(description = "시공방법")
|
||||||
private String constructSpecification;
|
private String constructSpecification;
|
||||||
|
@Schema(description = "설치높이")
|
||||||
private String setupHeight;
|
private String setupHeight;
|
||||||
|
@Schema(description = "날씨포인트")
|
||||||
private String weatherPoint;
|
private String weatherPoint;
|
||||||
|
@Schema(description = "날씨포인트")
|
||||||
private String roofKindId;
|
private String roofKindId;
|
||||||
|
@Schema(description = "경사")
|
||||||
private String slope;
|
private String slope;
|
||||||
|
@Schema(description = "지붕재 아이템 CLASS ID")
|
||||||
private String roofMaterialClassId;
|
private String roofMaterialClassId;
|
||||||
|
@Schema(description = "지붕재 아이템 ID")
|
||||||
private String roofMaterialId;
|
private String roofMaterialId;
|
||||||
|
@Schema(description = "가대 설치 ID")
|
||||||
private String supportMethodId;
|
private String supportMethodId;
|
||||||
|
@Schema(description = "모델")
|
||||||
private String moduleModel;
|
private String moduleModel;
|
||||||
|
@Schema(description = "담당자")
|
||||||
private String charger;
|
private String charger;
|
||||||
|
@Schema(description = "견적서 유효기간")
|
||||||
private String estimateValidityTerm;
|
private String estimateValidityTerm;
|
||||||
|
@Schema(description = "결정 플랜")
|
||||||
private String decisionPlan;
|
private String decisionPlan;
|
||||||
|
@Schema(description = "넘버")
|
||||||
private String number;
|
private String number;
|
||||||
|
@Schema(description = "시스템용량")
|
||||||
private String capacity;
|
private String capacity;
|
||||||
|
@Schema(description = "강설량")
|
||||||
private String snowfall;
|
private String snowfall;
|
||||||
|
@Schema(description = "표준풍속검사")
|
||||||
private String standardWindSpeedCheck;
|
private String standardWindSpeedCheck;
|
||||||
|
@Schema(description = "옵션커버")
|
||||||
private String optionCover;
|
private String optionCover;
|
||||||
|
@Schema(description = "한화여부")
|
||||||
private String hanwfaFlg;
|
private String hanwfaFlg;
|
||||||
|
@Schema(description = "기준종류ID")
|
||||||
private String standKindId;
|
private String standKindId;
|
||||||
|
@Schema(description = "기준풍속ID")
|
||||||
private String standardWindSpeedId;
|
private String standardWindSpeedId;
|
||||||
|
@Schema(description = "가대 메이커")
|
||||||
private String supportMeaker;
|
private String supportMeaker;
|
||||||
|
@Schema(description = "소비세ID")
|
||||||
private String consumptionTaxId;
|
private String consumptionTaxId;
|
||||||
|
@Schema(description = "상태코드")
|
||||||
private String status;
|
private String status;
|
||||||
|
@Schema(description = "사용자아이디")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
@Schema(description = "삭제여부")
|
||||||
private String delFlg;
|
private String delFlg;
|
||||||
|
@Schema(description = "파워컨디셔너")
|
||||||
private String pcTypeNo;
|
private String pcTypeNo;
|
||||||
|
@Schema(description = "북면설치여부")
|
||||||
private String northArrangement;
|
private String northArrangement;
|
||||||
|
@Schema(description = "지붕재")
|
||||||
private String roofMaterialIdMulti;
|
private String roofMaterialIdMulti;
|
||||||
|
@Schema(description = "가대")
|
||||||
private String supportMethodIdMulti;
|
private String supportMethodIdMulti;
|
||||||
|
@Schema(description = "가대 메이커")
|
||||||
private String supportMeakerMulti;
|
private String supportMeakerMulti;
|
||||||
|
@Schema(description = "다른 지붕재여부")
|
||||||
private String diffRoofEnabled;
|
private String diffRoofEnabled;
|
||||||
|
@Schema(description = "발주여부")
|
||||||
|
private String orderFlg;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.interplug.qcast.biz.object.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
//@Data
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class PrefResponse {
|
||||||
|
// 물건정보
|
||||||
|
@Schema(description = "도도부현ID")
|
||||||
|
private String prefId;
|
||||||
|
@Schema(description = "도도부현명/지역명")
|
||||||
|
private String prefName;
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.interplug.qcast.biz.object.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
//@Data
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class SaleStoreResponse {
|
||||||
|
// 판매점정보
|
||||||
|
@Schema(description = "1차점판매점 여부")
|
||||||
|
private String firstAgentYn;
|
||||||
|
@Schema(description = "판매점ID")
|
||||||
|
private String saleStoreId;
|
||||||
|
@Schema(description = "판매점명")
|
||||||
|
private String saleStoreName;
|
||||||
|
@Schema(description = "판매점레벨")
|
||||||
|
private String saleStoreLevel;
|
||||||
|
@Schema(description = "1차점판매점ID")
|
||||||
|
private String firstAgentId;
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.interplug.qcast.biz.object.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
//@Data
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class WindSpeedResponse {
|
||||||
|
// 기준풍속정보
|
||||||
|
@Schema(description = "도시명")
|
||||||
|
private String city;
|
||||||
|
@Schema(description = "풍속")
|
||||||
|
private String windSpeed;
|
||||||
|
@Schema(description = "메모")
|
||||||
|
private String remarks;
|
||||||
|
}
|
||||||
@ -23,7 +23,7 @@ public class UserController {
|
|||||||
@Operation(description = "판매점 정보를 등록/수정 한다.(동기화)")
|
@Operation(description = "판매점 정보를 등록/수정 한다.(동기화)")
|
||||||
@PutMapping("/store-save")
|
@PutMapping("/store-save")
|
||||||
@ResponseStatus(HttpStatus.OK)
|
@ResponseStatus(HttpStatus.OK)
|
||||||
public UserResponse setStoreInfo(@RequestBody StoreRequest storeReq) {
|
public UserResponse setStoreSave(@RequestBody StoreRequest storeReq) {
|
||||||
UserResponse userResponse = new UserResponse();
|
UserResponse userResponse = new UserResponse();
|
||||||
|
|
||||||
int resultCnt = userService.setStoreSave(storeReq);
|
int resultCnt = userService.setStoreSave(storeReq);
|
||||||
@ -36,7 +36,8 @@ public class UserController {
|
|||||||
|
|
||||||
@Operation(description = "user 정보를 등록/수정 한다.(동기화)")
|
@Operation(description = "user 정보를 등록/수정 한다.(동기화)")
|
||||||
@PutMapping("/user-save")
|
@PutMapping("/user-save")
|
||||||
public UserResponse updateUserInfo(@RequestBody List<UserRequest> userReqList) {
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
public UserResponse setUserSave(@RequestBody List<UserRequest> userReqList) {
|
||||||
UserResponse userResponse = new UserResponse();
|
UserResponse userResponse = new UserResponse();
|
||||||
|
|
||||||
int resultCnt = userService.setUserSave(userReqList);
|
int resultCnt = userService.setUserSave(userReqList);
|
||||||
|
|||||||
@ -9,5 +9,7 @@ public interface UserMapper {
|
|||||||
|
|
||||||
int setStoreSave(StoreRequest storeReq);
|
int setStoreSave(StoreRequest storeReq);
|
||||||
|
|
||||||
|
int setStoreSapCdSave(StoreRequest storeReq);
|
||||||
|
|
||||||
int setUserSave(UserRequest userReqList);
|
int setUserSave(UserRequest userReqList);
|
||||||
}
|
}
|
||||||
@ -13,6 +13,7 @@ public class UserService {
|
|||||||
private final UserMapper userMapper;
|
private final UserMapper userMapper;
|
||||||
|
|
||||||
public int setStoreSave(StoreRequest storeReq) {
|
public int setStoreSave(StoreRequest storeReq) {
|
||||||
|
userMapper.setStoreSapCdSave(storeReq);
|
||||||
return userMapper.setStoreSave(storeReq);
|
return userMapper.setStoreSave(storeReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class StoreRequest {
|
public class StoreRequest {
|
||||||
|
|
||||||
|
private String sapSalesStoreCd;
|
||||||
private String saleStoreId;
|
private String saleStoreId;
|
||||||
private String saleStoreName;
|
private String saleStoreName;
|
||||||
private String saleStoreNameKana;
|
private String saleStoreNameKana;
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
xsi:noNamespaceSchemaLocation="http://www.padual.com/java/logback.xsd">
|
xsi:noNamespaceSchemaLocation="http://www.padual.com/java/logback.xsd">
|
||||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||||
<springProperty scope="context" name="ACTIVE_PROFILE" source="spring.profiles.active"/>
|
<springProperty scope="context" name="ACTIVE_PROFILE" source="spring.profiles.active"/>
|
||||||
<property name="LOG_HOME" value="/logs/bo-api/"/>
|
<property name="LOG_HOME" value="c:/qcast3/logs/api/"/>
|
||||||
<property name="LOG_FILE" value="${LOG_HOME}${ACTIVE_PROFILE}.order.bo.api"/>
|
<property name="LOG_FILE" value="${LOG_HOME}${ACTIVE_PROFILE}.qcast.api"/>
|
||||||
<property name="LOG_FILE_EXT" value=".log"/>
|
<property name="LOG_FILE_EXT" value=".log"/>
|
||||||
|
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<root level="warn">
|
<root level="warn">
|
||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
<!-- <appender-ref ref="FILE" />-->
|
<appender-ref ref="FILE" />
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -3,8 +3,8 @@
|
|||||||
xsi:noNamespaceSchemaLocation="http://www.padual.com/java/logback.xsd">
|
xsi:noNamespaceSchemaLocation="http://www.padual.com/java/logback.xsd">
|
||||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||||
<springProperty scope="context" name="ACTIVE_PROFILE" source="spring.profiles.active"/>
|
<springProperty scope="context" name="ACTIVE_PROFILE" source="spring.profiles.active"/>
|
||||||
<property name="LOG_HOME" value="/logs/bo-api/"/>
|
<property name="LOG_HOME" value="/logs/api/"/>
|
||||||
<property name="LOG_FILE" value="${LOG_HOME}${ACTIVE_PROFILE}.order.bo.api"/>
|
<property name="LOG_FILE" value="${LOG_HOME}${ACTIVE_PROFILE}.qcast.api"/>
|
||||||
<property name="LOG_FILE_EXT" value=".log"/>
|
<property name="LOG_FILE_EXT" value=".log"/>
|
||||||
|
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
xsi:noNamespaceSchemaLocation="http://www.padual.com/java/logback.xsd">
|
xsi:noNamespaceSchemaLocation="http://www.padual.com/java/logback.xsd">
|
||||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||||
<springProperty scope="context" name="ACTIVE_PROFILE" source="spring.profiles.active"/>
|
<springProperty scope="context" name="ACTIVE_PROFILE" source="spring.profiles.active"/>
|
||||||
<property name="LOG_HOME" value="/logs/bo-api/"/>
|
<property name="LOG_HOME" value="c:/qcast3/logs/api/"/>
|
||||||
<property name="LOG_FILE" value="${LOG_HOME}${ACTIVE_PROFILE}.order.bo.api"/>
|
<property name="LOG_FILE" value="${LOG_HOME}${ACTIVE_PROFILE}.qcast.api"/>
|
||||||
<property name="LOG_FILE_EXT" value=".log"/>
|
<property name="LOG_FILE_EXT" value=".log"/>
|
||||||
|
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<root level="warn">
|
<root level="warn">
|
||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
<!-- <appender-ref ref="FILE" />-->
|
<appender-ref ref="FILE" />
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.interplug.qcast.biz.commCode.CommCodeMapper">
|
<mapper namespace="com.interplug.qcast.biz.commCode.CommCodeMapper">
|
||||||
<insert id="setCommHUpdate" parameterType="com.interplug.qcast.biz.commCode.dto.CommCodeRequest">
|
<insert id="setCommHUpdate" parameterType="com.interplug.qcast.biz.commCode.dto.CommCodeHeaderRequest">
|
||||||
/* sqlid : com.interplug.qcast.commCode.setCommHUpdate */
|
/* sqlid : com.interplug.qcast.commCode.setCommHUpdate */
|
||||||
MERGE M_COMM_H AS A
|
MERGE M_COMM_H AS A
|
||||||
USING
|
USING
|
||||||
@ -73,7 +73,8 @@
|
|||||||
);
|
);
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="setCommLUpdate" parameterType="com.interplug.qcast.biz.commCode.dto.CommCodeRequest">
|
<insert id="setCommLUpdate" parameterType="com.interplug.qcast.biz.commCode.dto.CommCodeDetailRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.commCode.setCommLUpdate */
|
||||||
MERGE M_COMM_L AS A
|
MERGE M_COMM_L AS A
|
||||||
USING
|
USING
|
||||||
( SELECT #{clHeadCd} AS HEAD_CD, #{clCode} AS CODE ) AS D
|
( SELECT #{clHeadCd} AS HEAD_CD, #{clCode} AS CODE ) AS D
|
||||||
@ -148,4 +149,5 @@
|
|||||||
, GETDATE()
|
, GETDATE()
|
||||||
);
|
);
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -178,7 +178,7 @@
|
|||||||
ON G.FIRST_AGENT_ID = Y.SALE_STORE_ID /*1차점정보*/
|
ON G.FIRST_AGENT_ID = Y.SALE_STORE_ID /*1차점정보*/
|
||||||
WHERE A.DEL_FLG = 0
|
WHERE A.DEL_FLG = 0
|
||||||
AND B.DEL_FLG = 0
|
AND B.DEL_FLG = 0
|
||||||
AND B.ESTIMATE_DETAIL_CREATE_DATE >= #{sch_baseDt} /* 과거일자 기준일 */
|
AND B.ESTIMATE_DETAIL_CREATE_DATE <![CDATA[ <= ]]> #{sch_baseDt} /* 과거일자 기준일 */
|
||||||
<if test="sch_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''"> <!-- 견적일 -->
|
<if test="sch_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''"> <!-- 견적일 -->
|
||||||
AND B.ESTIMATE_DETAIL_CREATE_DATE BETWEEN #{sch_startDt} and #{sch_endDt}
|
AND B.ESTIMATE_DETAIL_CREATE_DATE BETWEEN #{sch_startDt} and #{sch_endDt}
|
||||||
</if>
|
</if>
|
||||||
@ -255,7 +255,7 @@
|
|||||||
WHERE C.DEL_FLG = 0
|
WHERE C.DEL_FLG = 0
|
||||||
AND D.DEL_FLG = 0
|
AND D.DEL_FLG = 0
|
||||||
AND B.DEL_FLG = 0
|
AND B.DEL_FLG = 0
|
||||||
AND C.ESTIMATE_DETAIL_CREATE_DATE >= #{sch_baseDt} /* 과거일자 기준일 */
|
AND C.ESTIMATE_DETAIL_CREATE_DATE <![CDATA[ <= ]]> #{sch_baseDt} /* 과거일자 기준일 */
|
||||||
<if test="sch_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''"> <!-- 견적일 -->
|
<if test="sch_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''"> <!-- 견적일 -->
|
||||||
AND C.ESTIMATE_DETAIL_CREATE_DATE BETWEEN #{sch_startDt} and #{sch_endDt}
|
AND C.ESTIMATE_DETAIL_CREATE_DATE BETWEEN #{sch_startDt} and #{sch_endDt}
|
||||||
</if>
|
</if>
|
||||||
@ -349,7 +349,7 @@
|
|||||||
LEFT JOIN T_OBJECT D
|
LEFT JOIN T_OBJECT D
|
||||||
ON A.OBJECT_NO = D.OBJECT_NO
|
ON A.OBJECT_NO = D.OBJECT_NO
|
||||||
WHERE D.DEL_FLG != 1
|
WHERE D.DEL_FLG != 1
|
||||||
AND D.ESTIMATE_DETAIL_CREATE_DATE >= #{sch_baseDt} /* 과거일자 기준일 */
|
AND D.ESTIMATE_DETAIL_CREATE_DATE <![CDATA[ <= ]]> #{sch_baseDt} /* 과거일자 기준일 */
|
||||||
<if test="sch_dtType != null and sch_dtType != ''">
|
<if test="sch_dtType != null and sch_dtType != ''">
|
||||||
<if test="sch_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''">
|
<if test="sch_startDt != null and sch_startDt != '' and sch_endDt != null and sch_endDt != ''">
|
||||||
<choose>
|
<choose>
|
||||||
|
|||||||
@ -2,25 +2,120 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.interplug.qcast.biz.object.ObjectMapper">
|
<mapper namespace="com.interplug.qcast.biz.object.ObjectMapper">
|
||||||
<select id="selectObjectList" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="com.interplug.qcast.biz.object.dto.ObjectResponse">
|
<select id="selectPrefList" parameterType="String" resultType="com.interplug.qcast.biz.object.dto.PrefResponse">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.selectPrefList */
|
||||||
|
SELECT
|
||||||
|
P.PREF_ID
|
||||||
|
, P.PREF_NAME
|
||||||
|
FROM M_PREFECTURE P WITH (NOLOCK)
|
||||||
|
ORDER BY P.DISP_ORDER ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPrefAreaList" parameterType="String" resultType="com.interplug.qcast.biz.object.dto.PrefResponse">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.selectPrefAreaList */
|
||||||
|
SELECT
|
||||||
|
A.PREF_ID
|
||||||
|
, A.AREA_NAME AS PREF_NAME
|
||||||
|
FROM M_PREFECTURE_AREA A WITH (NOLOCK)
|
||||||
|
WHERE A.PREF_ID = #{prefId}
|
||||||
|
ORDER BY A.AREA_ID ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWindSpeedList" parameterType="String" resultType="com.interplug.qcast.biz.object.dto.WindSpeedResponse">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.selectWindSpeedList */
|
||||||
|
SELECT
|
||||||
|
A.CITY
|
||||||
|
, A.WIND_SPEED
|
||||||
|
, A.REMARKS
|
||||||
|
FROM M_WIND_SPEED A WITH (NOLOCK)
|
||||||
|
WHERE A.CITY = #{city}
|
||||||
|
ORDER BY A.WIND_SPEED ASC, A.CITY ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSaleStoreAllList" resultType="com.interplug.qcast.biz.object.dto.SaleStoreResponse">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.selectSaleStoreList */
|
||||||
|
SELECT
|
||||||
|
CASE WHEN SALE_STORE_LEVEL = '1' THEN 'Y' ELSE 'N' END AS FIRST_AGENT_YN
|
||||||
|
, SALE_STORE_ID
|
||||||
|
, SALE_STORE_NAME
|
||||||
|
, SALE_STORE_LEVEL
|
||||||
|
, FIRST_AGENT_ID
|
||||||
|
FROM M_SALES_STORE WITH(NOLOCK)
|
||||||
|
WHERE APPROVE_FLG = '2'
|
||||||
|
AND DEL_FLG = '0'
|
||||||
|
ORDER BY SALE_STORE_LEVEL ASC, SALE_STORE_ID ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSaleStoreList" parameterType="String" resultType="com.interplug.qcast.biz.object.dto.SaleStoreResponse">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.selectSaleStoreList */
|
||||||
/* 계층형 구조에 맞는 SALE_STORE_ID 축출 - 재귀함수 */
|
/* 계층형 구조에 맞는 SALE_STORE_ID 축출 - 재귀함수 */
|
||||||
WITH SALES_STORE_CTE AS (
|
WITH SALES_STORE_CTE AS (
|
||||||
SELECT
|
SELECT
|
||||||
SALE_STORE_LEVEL
|
SALE_STORE_ID
|
||||||
, SALE_STORE_ID
|
, SALE_STORE_NAME
|
||||||
, PARENT_SALE_AGENT_ID
|
, SALE_STORE_LEVEL
|
||||||
|
, FIRST_AGENT_ID
|
||||||
FROM M_SALES_STORE WITH(NOLOCK)
|
FROM M_SALES_STORE WITH(NOLOCK)
|
||||||
WHERE SALE_STORE_ID = #{saleStoreId}
|
WHERE APPROVE_FLG = '2'
|
||||||
|
AND DEL_FLG = '0'
|
||||||
|
AND SALE_STORE_ID = #{saleStoreId}
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT
|
SELECT
|
||||||
A.SALE_STORE_LEVEL
|
A.SALE_STORE_ID
|
||||||
|
, A.SALE_STORE_NAME
|
||||||
|
, A.SALE_STORE_LEVEL
|
||||||
|
, A.FIRST_AGENT_ID
|
||||||
|
FROM M_SALES_STORE A WITH(NOLOCK)
|
||||||
|
INNER JOIN SALES_STORE_CTE B
|
||||||
|
ON A.PARENT_SALE_AGENT_ID = B.SALE_STORE_ID
|
||||||
|
WHERE A.APPROVE_FLG = '2'
|
||||||
|
AND A.DEL_FLG = '0'
|
||||||
|
)
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
'Y' AS FIRST_AGENT_YN
|
||||||
, A.SALE_STORE_ID
|
, A.SALE_STORE_ID
|
||||||
|
, A.SALE_STORE_NAME
|
||||||
|
, A.SALE_STORE_LEVEL
|
||||||
|
, A.FIRST_AGENT_ID
|
||||||
|
FROM M_SALES_STORE A
|
||||||
|
WHERE SALE_STORE_ID = (SELECT FIRST_AGENT_ID FROM M_SALES_STORE WHERE SALE_STORE_ID = #{saleStoreId} AND DEL_FLG = '0')
|
||||||
|
AND APPROVE_FLG = '2'
|
||||||
|
AND DEL_FLG = '0'
|
||||||
|
UNION ALL
|
||||||
|
SELECT
|
||||||
|
CASE WHEN SALE_STORE_LEVEL = '1' THEN 'Y' ELSE 'N' END AS FIRST_AGENT_YN
|
||||||
|
, A.SALE_STORE_ID
|
||||||
|
, A.SALE_STORE_NAME
|
||||||
|
, A.SALE_STORE_LEVEL
|
||||||
|
, A.FIRST_AGENT_ID
|
||||||
|
FROM SALES_STORE_CTE A
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectObjectList" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="com.interplug.qcast.biz.object.dto.ObjectResponse">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.selectObjectList */
|
||||||
|
/* 계층형 구조에 맞는 SALE_STORE_ID 축출 - 재귀함수 */
|
||||||
|
WITH SALES_STORE_CTE AS (
|
||||||
|
SELECT
|
||||||
|
SALE_STORE_ID
|
||||||
|
, SALE_STORE_LEVEL
|
||||||
|
, PARENT_SALE_AGENT_ID
|
||||||
|
FROM M_SALES_STORE WITH(NOLOCK)
|
||||||
|
WHERE APPROVE_FLG = '2'
|
||||||
|
AND DEL_FLG = '0'
|
||||||
|
AND SALE_STORE_ID = #{saleStoreId}
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
SELECT
|
||||||
|
A.SALE_STORE_ID
|
||||||
|
, A.SALE_STORE_LEVEL
|
||||||
, A.PARENT_SALE_AGENT_ID
|
, A.PARENT_SALE_AGENT_ID
|
||||||
FROM M_SALES_STORE A WITH(NOLOCK)
|
FROM M_SALES_STORE A WITH(NOLOCK)
|
||||||
INNER JOIN SALES_STORE_CTE B
|
INNER JOIN SALES_STORE_CTE B
|
||||||
ON A.PARENT_SALE_AGENT_ID = B.SALE_STORE_ID
|
ON A.PARENT_SALE_AGENT_ID = B.SALE_STORE_ID
|
||||||
WHERE A.DEL_FLG = '0'
|
WHERE A.APPROVE_FLG = '2'
|
||||||
|
AND A.DEL_FLG = '0'
|
||||||
)
|
)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
@ -29,14 +124,24 @@
|
|||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(1) OVER() AS TOT_CNT
|
COUNT(1) OVER() AS TOT_CNT
|
||||||
, ROW_NUMBER() OVER(ORDER BY O.CREATE_DATETIME DESC) AS ROW_NUMBER
|
, ROW_NUMBER() OVER(
|
||||||
|
ORDER BY
|
||||||
|
<choose>
|
||||||
|
<when test='schSortType != null and schSortType == "R"'>
|
||||||
|
O.CREATE_DATETIME DESC
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
O.LAST_EDIT_DATETIME DESC
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
) AS ROW_NUMBER
|
||||||
, O.OBJECT_NO
|
, O.OBJECT_NO
|
||||||
, O.OBJECT_NAME
|
, O.OBJECT_NAME
|
||||||
, O.SALE_STORE_ID
|
, O.SALE_STORE_ID
|
||||||
, O.ZIP_NO
|
, O.ZIP_NO
|
||||||
, O.ADDRESS
|
, O.ADDRESS
|
||||||
, O.RECEIVE_USER
|
, O.RECEIVE_USER
|
||||||
, O.SPEC_DATE
|
, O.SPECIFICATION_CONFIRM_DATE
|
||||||
, O.CREATE_DATETIME
|
, O.CREATE_DATETIME
|
||||||
, O.LAST_EDIT_DATETIME
|
, O.LAST_EDIT_DATETIME
|
||||||
, S.SALE_STORE_NAME
|
, S.SALE_STORE_NAME
|
||||||
@ -49,13 +154,16 @@
|
|||||||
ON O.SALE_STORE_ID = S.SALE_STORE_ID
|
ON O.SALE_STORE_ID = S.SALE_STORE_ID
|
||||||
INNER JOIN SALES_STORE_CTE T
|
INNER JOIN SALES_STORE_CTE T
|
||||||
ON S.SALE_STORE_ID = T.SALE_STORE_ID
|
ON S.SALE_STORE_ID = T.SALE_STORE_ID
|
||||||
WHERE O.DEL_FLG = '0'
|
WHERE (O.DEL_FLG = '0' OR (O.TEMP_FLG = '1' AND O.TEMP_DEL_FLG = '0'))
|
||||||
<if test='schObjectNo != null and schObjectNo != ""'>
|
<if test='schObjectNo != null and schObjectNo != ""'>
|
||||||
AND O.OBJECT_NO LIKE '%' + #{schObjectNo} + '%'
|
AND O.OBJECT_NO LIKE '%' + #{schObjectNo} + '%'
|
||||||
</if>
|
</if>
|
||||||
<if test='schSaleStoreId != null and schSaleStoreId != ""'>
|
<if test='schSaleStoreId != null and schSaleStoreId != ""'>
|
||||||
AND O.SALE_STORE_ID LIKE '%' + #{schSaleStoreId} + '%'
|
AND O.SALE_STORE_ID LIKE '%' + #{schSaleStoreId} + '%'
|
||||||
</if>
|
</if>
|
||||||
|
<if test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
|
||||||
|
AND O.SALE_STORE_ID = #{schSelSaleStoreId}
|
||||||
|
</if>
|
||||||
<if test='schAddress != null and schAddress != ""'>
|
<if test='schAddress != null and schAddress != ""'>
|
||||||
AND O.ADDRESS LIKE '%' + #{schAddress} + '%'
|
AND O.ADDRESS LIKE '%' + #{schAddress} + '%'
|
||||||
</if>
|
</if>
|
||||||
@ -67,10 +175,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<choose>
|
<choose>
|
||||||
<when test='schSpecDateYn != null and schSpecDateYn == "Y"'>
|
<when test='schSpecDateYn != null and schSpecDateYn == "Y"'>
|
||||||
AND O.SPEC_DATE IS NOT NULL
|
AND O.SPECIFICATION_CONFIRM_DATE IS NOT NULL
|
||||||
</when>
|
</when>
|
||||||
<when test='schSpecDateYn != null and schSpecDateYn == "N"'>
|
<when test='schSpecDateYn != null and schSpecDateYn == "N"'>
|
||||||
AND O.SPEC_DATE IS NULL
|
AND O.SPECIFICATION_CONFIRM_DATE IS NULL
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
<if test='schReceiveUser != null and schReceiveUser != ""'>
|
<if test='schReceiveUser != null and schReceiveUser != ""'>
|
||||||
@ -113,10 +221,12 @@
|
|||||||
, O.SAME_OBJECT_INFO
|
, O.SAME_OBJECT_INFO
|
||||||
, O.RECEIVE_COMPANY_NAME
|
, O.RECEIVE_COMPANY_NAME
|
||||||
, O.RECEIVE_USER
|
, O.RECEIVE_USER
|
||||||
|
, O.SPECIFICATION_CONFIRM_DATE
|
||||||
, O.CONTENTS_PATH
|
, O.CONTENTS_PATH
|
||||||
|
, O.TEMP_FLG
|
||||||
FROM T_OBJECT O WITH (NOLOCK)
|
FROM T_OBJECT O WITH (NOLOCK)
|
||||||
WHERE O.OBJECT_NO = #{objectNo}
|
WHERE O.OBJECT_NO = #{objectNo}
|
||||||
AND O.DEL_FLG = '0'
|
AND (O.DEL_FLG = '0' OR (O.TEMP_FLG = '1' AND O.TEMP_DEL_FLG = '0'))
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectObjectNo" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="String">
|
<select id="selectObjectNo" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="String">
|
||||||
@ -172,6 +282,7 @@
|
|||||||
, T.SUPPORT_METHOD_ID_MULTI
|
, T.SUPPORT_METHOD_ID_MULTI
|
||||||
, T.SUPPORT_MEAKER_MULTI
|
, T.SUPPORT_MEAKER_MULTI
|
||||||
, T.DIFF_ROOF_ENABLED
|
, T.DIFF_ROOF_ENABLED
|
||||||
|
, T.ORDER_FLG
|
||||||
FROM T_PLAN T WITH (NOLOCK)
|
FROM T_PLAN T WITH (NOLOCK)
|
||||||
WHERE T.OBJECT_NO = #{objectNo}
|
WHERE T.OBJECT_NO = #{objectNo}
|
||||||
AND T.DEL_FLG = '0'
|
AND T.DEL_FLG = '0'
|
||||||
@ -225,10 +336,14 @@
|
|||||||
, FIRST_STORE_CHARGER
|
, FIRST_STORE_CHARGER
|
||||||
, CONTENTS_PATH
|
, CONTENTS_PATH
|
||||||
, DEL_FLG
|
, DEL_FLG
|
||||||
|
, CREATE_DATETIME
|
||||||
|
, CREATE_USER
|
||||||
, LAST_EDIT_DATETIME
|
, LAST_EDIT_DATETIME
|
||||||
, LAST_EDIT_USER
|
, LAST_EDIT_USER
|
||||||
, EDIT_AGENCY
|
, EDIT_AGENCY
|
||||||
, NORTH_ARRANGEMENT
|
, NORTH_ARRANGEMENT
|
||||||
|
, TEMP_FLG
|
||||||
|
, TEMP_DEL_FLG
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{objectNo}
|
#{objectNo}
|
||||||
, #{saleStoreId}
|
, #{saleStoreId}
|
||||||
@ -255,11 +370,15 @@
|
|||||||
, '0'
|
, '0'
|
||||||
, #{receiveUser}
|
, #{receiveUser}
|
||||||
, #{contentsPath}
|
, #{contentsPath}
|
||||||
, '0'
|
, #{delFlg}
|
||||||
|
, GETDATE()
|
||||||
|
, #{userId}
|
||||||
, GETDATE()
|
, GETDATE()
|
||||||
, #{userId}
|
, #{userId}
|
||||||
, '0'
|
, '0'
|
||||||
, '0'
|
, '0'
|
||||||
|
, #{tempFlg}
|
||||||
|
, #{tempDelFlg}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -278,6 +397,7 @@
|
|||||||
, ADDRESSEE_COMPANY_NAME_OMIT = #{addresseeCompanyNameOmit}
|
, ADDRESSEE_COMPANY_NAME_OMIT = #{addresseeCompanyNameOmit}
|
||||||
, REMARKS = #{remarks}
|
, REMARKS = #{remarks}
|
||||||
, RECEIVE_USER = #{receiveUser}
|
, RECEIVE_USER = #{receiveUser}
|
||||||
|
, CONTENTS_PATH = #{contentsPath}
|
||||||
, LAST_EDIT_DATETIME = GETDATE()
|
, LAST_EDIT_DATETIME = GETDATE()
|
||||||
, LAST_EDIT_USER = #{userId}
|
, LAST_EDIT_USER = #{userId}
|
||||||
WHERE OBJECT_NO = #{objectNo}
|
WHERE OBJECT_NO = #{objectNo}
|
||||||
@ -301,6 +421,7 @@
|
|||||||
UPDATE T_OBJECT
|
UPDATE T_OBJECT
|
||||||
SET
|
SET
|
||||||
DEL_FLG = '1'
|
DEL_FLG = '1'
|
||||||
|
, TEMP_DEL_FLG = '1'
|
||||||
, LAST_EDIT_DATETIME = GETDATE()
|
, LAST_EDIT_DATETIME = GETDATE()
|
||||||
, LAST_EDIT_USER = #{userId}
|
, LAST_EDIT_USER = #{userId}
|
||||||
WHERE OBJECT_NO = #{objectNo}
|
WHERE OBJECT_NO = #{objectNo}
|
||||||
@ -348,6 +469,7 @@
|
|||||||
, SUPPORT_METHOD_ID_MULTI
|
, SUPPORT_METHOD_ID_MULTI
|
||||||
, SUPPORT_MEAKER_MULTI
|
, SUPPORT_MEAKER_MULTI
|
||||||
, DIFF_ROOF_ENABLED
|
, DIFF_ROOF_ENABLED
|
||||||
|
, ORDER_FLG
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{objectNo}
|
#{objectNo}
|
||||||
, #{planNo}
|
, #{planNo}
|
||||||
@ -383,6 +505,7 @@
|
|||||||
, #{supportMethodIdMulti}
|
, #{supportMethodIdMulti}
|
||||||
, #{supportMeakerMulti}
|
, #{supportMeakerMulti}
|
||||||
, #{diffRoofEnabled}
|
, #{diffRoofEnabled}
|
||||||
|
, #{orderFlg}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -393,4 +516,23 @@
|
|||||||
AND PLAN_NO = #{planNo}
|
AND PLAN_NO = #{planNo}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<update id="updateObjectNoChange" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.updateObjectChange */
|
||||||
|
UPDATE T_OBJECT
|
||||||
|
SET
|
||||||
|
OBJECT_NO = #{newObjectNo}
|
||||||
|
, DEL_FLG = '0'
|
||||||
|
, TEMP_FLG = '0'
|
||||||
|
, TEMP_DEL_FLG = '0'
|
||||||
|
WHERE OBJECT_NO = #{objectNo}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="updatePlanObjectNoChange" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.object.updatePlanObjectChange */
|
||||||
|
UPDATE T_PLAN
|
||||||
|
SET
|
||||||
|
OBJECT_NO = #{newObjectNo}
|
||||||
|
WHERE OBJECT_NO = #{objectNo}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -2,13 +2,33 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.interplug.qcast.biz.user.UserMapper">
|
<mapper namespace="com.interplug.qcast.biz.user.UserMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="setStoreSapCdSave" parameterType="com.interplug.qcast.biz.user.dto.StoreRequest" >
|
||||||
|
/* sqlid : com.interplug.qcast.user.setStoreSapCdSave */
|
||||||
|
MERGE M_SALES_STORE_ID_FOR_SAP AS A
|
||||||
|
USING
|
||||||
|
( SELECT #{saleStoreId} AS SALE_STORE_ID ) AS D
|
||||||
|
ON (A.SALE_STORE_ID = D.SALE_STORE_ID)
|
||||||
|
WHEN MATCHED THEN
|
||||||
|
UPDATE SET
|
||||||
|
SAP_SALES_STORE_CD = #{sapSalesStoreCd}
|
||||||
|
WHEN NOT MATCHED THEN
|
||||||
|
INSERT (
|
||||||
|
SALE_STORE_ID
|
||||||
|
, SAP_SALES_STORE_CD
|
||||||
|
) VALUES (
|
||||||
|
#{saleStoreId}
|
||||||
|
, #{sapSalesStoreCd}
|
||||||
|
);
|
||||||
|
</insert>
|
||||||
|
|
||||||
<insert id="setStoreSave" parameterType="com.interplug.qcast.biz.user.dto.StoreRequest" >
|
<insert id="setStoreSave" parameterType="com.interplug.qcast.biz.user.dto.StoreRequest" >
|
||||||
/* sqlid : com.interplug.qcast.user.setStoreSave */
|
/* sqlid : com.interplug.qcast.user.setStoreSave */
|
||||||
MERGE M_SALES_STORE AS A
|
MERGE M_SALES_STORE AS A
|
||||||
USING
|
USING
|
||||||
( SELECT #{saleStoreId} AS SALE_STORE_ID ) AS D
|
( SELECT #{saleStoreId} AS SALE_STORE_ID ) AS D
|
||||||
ON (A.SALE_STORE_ID = D.SALE_STORE_ID
|
ON (A.SALE_STORE_ID = D.SALE_STORE_ID)
|
||||||
)
|
|
||||||
WHEN MATCHED THEN
|
WHEN MATCHED THEN
|
||||||
UPDATE SET
|
UPDATE SET
|
||||||
SALE_STORE_NAME = #{saleStoreName}
|
SALE_STORE_NAME = #{saleStoreName}
|
||||||
@ -119,8 +139,7 @@
|
|||||||
MERGE M_USER AS A
|
MERGE M_USER AS A
|
||||||
USING
|
USING
|
||||||
( SELECT #{userId} AS USER_ID ) AS D
|
( SELECT #{userId} AS USER_ID ) AS D
|
||||||
ON (A.USER_ID = D.USER_ID
|
ON (A.USER_ID = D.USER_ID)
|
||||||
)
|
|
||||||
WHEN MATCHED THEN
|
WHEN MATCHED THEN
|
||||||
UPDATE SET
|
UPDATE SET
|
||||||
SALE_STORE_ID = #{saleStoreId}
|
SALE_STORE_ID = #{saleStoreId}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user