Q.CAST > Q.ORDER 시공타입 우선 선정 기능 개발
This commit is contained in:
parent
928a8be6a5
commit
461f399fc4
@ -122,4 +122,7 @@ public interface EstimateMapper {
|
|||||||
|
|
||||||
// Plan 확정 동기화
|
// Plan 확정 동기화
|
||||||
public int updatePlanConfirmSync(PlanSyncResponse planSyncData);
|
public int updatePlanConfirmSync(PlanSyncResponse planSyncData);
|
||||||
|
|
||||||
|
// 견적서 Q.ORDER 연동 시공타입 조회
|
||||||
|
public String selectEstimateConstructSpecification(EstimateRequest estimateRequest);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1709,12 +1709,13 @@ public class EstimateService {
|
|||||||
if (estimateSendResponse == null) {
|
if (estimateSendResponse == null) {
|
||||||
throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data"));
|
throw new QcastException(ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data"));
|
||||||
} else {
|
} else {
|
||||||
|
String constructSpecification =
|
||||||
|
estimateMapper.selectEstimateConstructSpecification(estimateRequest);
|
||||||
|
|
||||||
estimateSendResponse.setSaveType("3");
|
estimateSendResponse.setSaveType("3");
|
||||||
estimateSendResponse.setSyncFlg("0");
|
estimateSendResponse.setSyncFlg("0");
|
||||||
estimateSendResponse.setConstructSpecification(
|
estimateSendResponse.setConstructSpecification(
|
||||||
!StringUtils.isEmpty(estimateSendResponse.getConstructSpecification())
|
!StringUtils.isEmpty(constructSpecification) ? constructSpecification : "");
|
||||||
? estimateSendResponse.getConstructSpecification().split("、")[0]
|
|
||||||
: "");
|
|
||||||
estimateSendResponse.setDelFlg("1".equals(estimateSendResponse.getDelFlg()) ? "Y" : "N");
|
estimateSendResponse.setDelFlg("1".equals(estimateSendResponse.getDelFlg()) ? "Y" : "N");
|
||||||
|
|
||||||
// 아이템 목록 조회
|
// 아이템 목록 조회
|
||||||
@ -2182,12 +2183,13 @@ public class EstimateService {
|
|||||||
estimateRequest.setObjectNo(estimateSendResponse.getObjectNo());
|
estimateRequest.setObjectNo(estimateSendResponse.getObjectNo());
|
||||||
estimateRequest.setPlanNo(estimateSendResponse.getPlanNo());
|
estimateRequest.setPlanNo(estimateSendResponse.getPlanNo());
|
||||||
|
|
||||||
|
String constructSpecification =
|
||||||
|
estimateMapper.selectEstimateConstructSpecification(estimateRequest);
|
||||||
|
|
||||||
estimateSendResponse.setSaveType("3");
|
estimateSendResponse.setSaveType("3");
|
||||||
estimateSendResponse.setSyncFlg("0");
|
estimateSendResponse.setSyncFlg("0");
|
||||||
estimateSendResponse.setConstructSpecification(
|
estimateSendResponse.setConstructSpecification(
|
||||||
!StringUtils.isEmpty(estimateSendResponse.getConstructSpecification())
|
!StringUtils.isEmpty(constructSpecification) ? constructSpecification : "");
|
||||||
? estimateSendResponse.getConstructSpecification().split("、")[0]
|
|
||||||
: "");
|
|
||||||
estimateSendResponse.setDelFlg("1".equals(estimateSendResponse.getDelFlg()) ? "Y" : "N");
|
estimateSendResponse.setDelFlg("1".equals(estimateSendResponse.getDelFlg()) ? "Y" : "N");
|
||||||
|
|
||||||
// 아이템 목록 조회
|
// 아이템 목록 조회
|
||||||
|
|||||||
@ -1205,4 +1205,25 @@
|
|||||||
AND PLAN_NO = #{planNo}
|
AND PLAN_NO = #{planNo}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="selectEstimateConstructSpecification" parameterType="com.interplug.qcast.biz.estimate.dto.EstimateRequest" resultType="String">
|
||||||
|
/* sqlid : com.interplug.qcast.biz.estimate.selectEstimateConstructSpecification */
|
||||||
|
SELECT
|
||||||
|
TOP 1
|
||||||
|
T.CONSTRUCT_SPECIFICATION
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
PRE.CONSTRUCT_SPECIFICATION
|
||||||
|
, CASE WHEN LEFT(PRE.ROOF_SURFACE, 1) = '南' THEN 1
|
||||||
|
WHEN LEFT(PRE.ROOF_SURFACE, 1) = '東' THEN 2
|
||||||
|
WHEN LEFT(PRE.ROOF_SURFACE, 1) = '西' THEN 3
|
||||||
|
WHEN LEFT(PRE.ROOF_SURFACE, 1) = '北' THEN 4
|
||||||
|
ELSE 5 END ROOF_SURFACE_NUM
|
||||||
|
, (SELECT ISNULL(SUM(AMOUNT), 0) FROM T_PART_ROOF_ITEM_ESTIMATE WHERE ROOF_SURFACE_ID = PRE.ROOF_SURFACE_ID AND OBJECT_NO = PRE.OBJECT_NO AND PLAN_NO = PRE.PLAN_NO) AS MODULE_TCNT
|
||||||
|
FROM T_PART_ROOF_ESTIMATE PRE WITH (NOLOCK)
|
||||||
|
WHERE PRE.OBJECT_NO = #{objectNo}
|
||||||
|
AND PRE.PLAN_NO = #{planNo}
|
||||||
|
) T
|
||||||
|
ORDER BY T.MODULE_TCNT DESC, T.ROOF_SURFACE_NUM ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
x
Reference in New Issue
Block a user