|
@@ -9,57 +9,57 @@
|
|
a.update_by AS "updateBy.id",
|
|
a.update_by AS "updateBy.id",
|
|
a.update_date AS "updateDate",
|
|
a.update_date AS "updateDate",
|
|
a.del_flag AS "delFlag",
|
|
a.del_flag AS "delFlag",
|
|
- b.projectYear,
|
|
|
|
- b.projectNature,
|
|
|
|
- b.demandUnit,
|
|
|
|
- b.district,
|
|
|
|
- b.projectGroup,
|
|
|
|
- b.reserveBatches,
|
|
|
|
- b.blockSupply,
|
|
|
|
- b.gridNumber,
|
|
|
|
- b.cellNumber,
|
|
|
|
- b.projectReserveId,
|
|
|
|
- b.projectName,
|
|
|
|
- b.constructionNecessityAndContent,
|
|
|
|
- b.substationName,
|
|
|
|
- b.circuitName,
|
|
|
|
- b.netRackProjectDivide,
|
|
|
|
- b.requirementType,
|
|
|
|
- b.costEstimate,
|
|
|
|
- b.basicRemarks,
|
|
|
|
- a.includeReserve,
|
|
|
|
- a.reasonForCancel,
|
|
|
|
- a.comprehensiveProject,
|
|
|
|
- a.powerFailureDifficulty,
|
|
|
|
- a.powerFailureDescribe,
|
|
|
|
- a.otherProblemDifficulty,
|
|
|
|
- a.otherProblemDescribe,
|
|
|
|
- a.runPlanRequire,
|
|
|
|
- a.programChangeDescription,
|
|
|
|
- a.discloseRemarks,
|
|
|
|
- a.demandUnitPriority,
|
|
|
|
- a.preliminaryArrangement,
|
|
|
|
- a.initialImplementBatch,
|
|
|
|
- a.initialImplementUnit,
|
|
|
|
- a.projectManagementCenter,
|
|
|
|
- a.completeProgressUnit,
|
|
|
|
- a.projectReservePlan,
|
|
|
|
- a.demandUnitProgress,
|
|
|
|
- a.departmentPlan,
|
|
|
|
- a.drawMapPath,
|
|
|
|
- a.planRemarks,
|
|
|
|
- a.arrangementProject,
|
|
|
|
- a.implementationBatch,
|
|
|
|
- a.constructionUnit,
|
|
|
|
- a.drawOfficeDrawn,
|
|
|
|
- a.projectInitiateRemarks,
|
|
|
|
- b.ownerProjectManager as 'projectManager',
|
|
|
|
- c.administrativeDifficulty as 'administrativeDifficulty',
|
|
|
|
- c.officeProgress as 'officeProgress',
|
|
|
|
- cg.pretrialEstimateAmount,
|
|
|
|
- cg.pretrialEstimateAmountExcludeTax,
|
|
|
|
- cg.afterTrialEstimateAmount,
|
|
|
|
- cg.afterTrialEstimateAmountExcludeTax
|
|
|
|
|
|
+ a.projectYear,
|
|
|
|
+ a.projectNature,
|
|
|
|
+ a.demandUnit,
|
|
|
|
+ a.district,
|
|
|
|
+ a.projectGroup,
|
|
|
|
+ a.reserveBatches,
|
|
|
|
+ a.blockSupply,
|
|
|
|
+ a.gridNumber,
|
|
|
|
+ a.cellNumber,
|
|
|
|
+ a.projectReserveId,
|
|
|
|
+ a.projectName,
|
|
|
|
+ a.constructionNecessityAndContent,
|
|
|
|
+ a.substationName,
|
|
|
|
+ a.circuitName,
|
|
|
|
+ a.netRackProjectDivide,
|
|
|
|
+ a.requirementType,
|
|
|
|
+ a.costEstimate,
|
|
|
|
+ a.basicRemarks,
|
|
|
|
+ IFNULL(b.includeReserve,"") as includeReserve,
|
|
|
|
+ IFNULL(b.reasonForCancel,"") as reasonForCancel,
|
|
|
|
+ IFNULL(b.comprehensiveProject,"") as comprehensiveProject,
|
|
|
|
+ IFNULL(b.powerFailureDifficulty,"") as powerFailureDifficulty,
|
|
|
|
+ IFNULL(b.powerFailureDescribe,"") as powerFailureDescribe,
|
|
|
|
+ IFNULL(b.otherProblemDifficulty,"") as otherProblemDifficulty,
|
|
|
|
+ IFNULL(b.otherProblemDescribe,"") as otherProblemDescribe,
|
|
|
|
+ IFNULL(b.runPlanRequire,"") as runPlanRequire,
|
|
|
|
+ IFNULL(b.programChangeDescription,"") as programChangeDescription,
|
|
|
|
+ IFNULL(b.discloseRemarks,"") as discloseRemarks,
|
|
|
|
+ IFNULL(b.demandUnitPriority,"") as demandUnitPriority,
|
|
|
|
+ IFNULL(b.preliminaryArrangement,"") as preliminaryArrangement,
|
|
|
|
+ IFNULL(b.initialImplementBatch,"") as initialImplementBatch,
|
|
|
|
+ IFNULL(b.initialImplementUnit,"") as initialImplementUnit,
|
|
|
|
+ IFNULL(b.projectManagementCenter,"") as projectManagementCenter,
|
|
|
|
+ IFNULL(b.completeProgressUnit,"") as completeProgressUnit,
|
|
|
|
+ IFNULL(b.projectReservePlan,"") as projectReservePlan,
|
|
|
|
+ IFNULL(b.demandUnitProgress,"") as demandUnitProgress,
|
|
|
|
+ IFNULL(b.departmentPlan,"") as departmentPlan,
|
|
|
|
+ IFNULL(b.drawMapPath,"") as drawMapPath,
|
|
|
|
+ IFNULL(b.planRemarks,"") as planRemarks,
|
|
|
|
+ IFNULL(b.arrangementProject,"") as arrangementProject,
|
|
|
|
+ IFNULL(b.implementationBatch,"") as implementationBatch,
|
|
|
|
+ IFNULL(b.constructionUnit,"") as constructionUnit,
|
|
|
|
+ IFNULL(b.drawOfficeDrawn,"") as drawOfficeDrawn,
|
|
|
|
+ IFNULL(b.projectInitiateRemarks,"") as projectInitiateRemarks,
|
|
|
|
+ a.ownerProjectManager as 'projectManager',
|
|
|
|
+ IFNULL(c.administrativeDifficulty,"") as administrativeDifficulty,
|
|
|
|
+ IFNULL(c.officeProgress,"") as officeProgress,
|
|
|
|
+ IFNULL(cg.pretrialEstimateAmount,"") as pretrialEstimateAmount,
|
|
|
|
+ IFNULL(cg.pretrialEstimateAmountExcludeTax,"") as pretrialEstimateAmountExcludeTax,
|
|
|
|
+ IFNULL(cg.afterTrialEstimateAmount,"") as afterTrialEstimateAmount,
|
|
|
|
+ IFNULL(cg.afterTrialEstimateAmountExcludeTax,"") as afterTrialEstimateAmountExcludeTax
|
|
|
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
@@ -248,37 +248,30 @@
|
|
|
|
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|
|
|
|
+ <delete id="deleteByProjectReserveId">
|
|
|
|
+ delete from cg_reserve_summary_statistics where projectReserveId = #{projectReserveId}
|
|
|
|
+ </delete>
|
|
|
|
|
|
<select id="queryByProjectReserveId"
|
|
<select id="queryByProjectReserveId"
|
|
resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary">
|
|
resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary">
|
|
- select
|
|
|
|
- <include refid="reserveManagementColumns"/>
|
|
|
|
- ,count(DISTINCT a.projectReserveId)
|
|
|
|
- from cg_reserve_summary_statistics a
|
|
|
|
- left join cg_reserve_process b
|
|
|
|
- on a.projectReserveId = b.projectReserveId
|
|
|
|
- left join cg_reserve_policy_handing_information c
|
|
|
|
- on a.projectReserveId = c.projectReserveId
|
|
|
|
- left join cg_budget_stats cg
|
|
|
|
- on cg.projectReserveId = a.projectReserveId
|
|
|
|
- where a.projectReserveId = #{projectReserveId}
|
|
|
|
|
|
+ select * from cg_reserve_summary_statistics where projectReserveId = #{projectReserveId}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="findList" resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary">
|
|
<select id="findList" resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary">
|
|
select
|
|
select
|
|
<include refid="reserveManagementColumns"/>
|
|
<include refid="reserveManagementColumns"/>
|
|
- from cg_reserve_process b
|
|
|
|
- left join cg_reserve_summary_statistics a
|
|
|
|
|
|
+ from cg_reserve_process a
|
|
|
|
+ left join cg_reserve_summary_statistics b
|
|
on a.projectReserveId = b.projectReserveId
|
|
on a.projectReserveId = b.projectReserveId
|
|
left join cg_reserve_policy_handing_information c
|
|
left join cg_reserve_policy_handing_information c
|
|
- on b.projectReserveId = c.projectReserveId
|
|
|
|
|
|
+ on a.projectReserveId = c.projectReserveId
|
|
left join cg_budget_stats cg
|
|
left join cg_budget_stats cg
|
|
- on cg.projectReserveId = b.projectReserveId
|
|
|
|
|
|
+ on cg.projectReserveId = a.projectReserveId
|
|
<where>
|
|
<where>
|
|
- b.del_flag = 0
|
|
|
|
|
|
+ a.del_flag = 0
|
|
<if test="projectReserveId!=null and projectReserveId!=''">
|
|
<if test="projectReserveId!=null and projectReserveId!=''">
|
|
- and b.projectReserveId like concat('%', #{projectReserveId}, '%')
|
|
|
|
|
|
+ and a.projectReserveId like concat('%', #{projectReserveId}, '%')
|
|
</if>
|
|
</if>
|
|
<if test="projectName!=null and projectName!=''">
|
|
<if test="projectName!=null and projectName!=''">
|
|
and a.projectName like concat('%', #{projectName}, '%')
|
|
and a.projectName like concat('%', #{projectName}, '%')
|
|
@@ -292,7 +285,7 @@
|
|
ORDER BY ${page.orderBy}
|
|
ORDER BY ${page.orderBy}
|
|
</when>
|
|
</when>
|
|
<otherwise>
|
|
<otherwise>
|
|
- ORDER BY b.update_date DESC
|
|
|
|
|
|
+ ORDER BY a.update_date DESC
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</select>
|
|
</select>
|
|
@@ -300,38 +293,38 @@
|
|
resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary">
|
|
resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary">
|
|
select
|
|
select
|
|
<include refid="reserveManagementColumns"/>
|
|
<include refid="reserveManagementColumns"/>
|
|
- from cg_reserve_process b
|
|
|
|
- left join cg_reserve_summary_statistics a
|
|
|
|
|
|
+ from cg_reserve_process a
|
|
|
|
+ left join cg_reserve_summary_statistics b
|
|
on a.projectReserveId = b.projectReserveId
|
|
on a.projectReserveId = b.projectReserveId
|
|
left join cg_reserve_policy_handing_information c
|
|
left join cg_reserve_policy_handing_information c
|
|
- on b.projectReserveId = c.projectReserveId
|
|
|
|
|
|
+ on a.projectReserveId = c.projectReserveId
|
|
left join cg_budget_stats cg
|
|
left join cg_budget_stats cg
|
|
- on cg.projectReserveId = b.projectReserveId
|
|
|
|
|
|
+ on cg.projectReserveId = a.projectReserveId
|
|
<where>
|
|
<where>
|
|
- b.del_flag = 0
|
|
|
|
|
|
+ a.del_flag = 0
|
|
<if test="projectReserveId!=null and projectReserveId!=''">
|
|
<if test="projectReserveId!=null and projectReserveId!=''">
|
|
- and b.projectReserveId like concat('%', #{projectReserveId}, '%')
|
|
|
|
|
|
+ and a.projectReserveId like concat('%', #{projectReserveId}, '%')
|
|
</if>
|
|
</if>
|
|
<if test="projectName!=null and projectName!=''">
|
|
<if test="projectName!=null and projectName!=''">
|
|
- and b.projectName like concat('%', #{projectName}, '%')
|
|
|
|
|
|
+ and a.projectName like concat('%', #{projectName}, '%')
|
|
</if>
|
|
</if>
|
|
<if test="dataScope != null and dataScope != ''">
|
|
<if test="dataScope != null and dataScope != ''">
|
|
${dataScope}
|
|
${dataScope}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
- ORDER BY b.update_date DESC
|
|
|
|
|
|
+ ORDER BY a.update_date DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="get" resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary">
|
|
<select id="get" resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary">
|
|
select
|
|
select
|
|
<include refid="reserveManagementColumns"/>
|
|
<include refid="reserveManagementColumns"/>
|
|
- from cg_reserve_process b
|
|
|
|
- left join cg_reserve_summary_statistics a
|
|
|
|
|
|
+ from cg_reserve_process a
|
|
|
|
+ left join cg_reserve_summary_statistics b
|
|
on a.projectReserveId = b.projectReserveId
|
|
on a.projectReserveId = b.projectReserveId
|
|
left join cg_reserve_policy_handing_information c
|
|
left join cg_reserve_policy_handing_information c
|
|
- on b.projectReserveId = c.projectReserveId
|
|
|
|
|
|
+ on a.projectReserveId = c.projectReserveId
|
|
left join cg_budget_stats cg
|
|
left join cg_budget_stats cg
|
|
- on cg.projectReserveId = b.projectReserveId
|
|
|
|
|
|
+ on cg.projectReserveId = a.projectReserveId
|
|
where a.id = #{id}
|
|
where a.id = #{id}
|
|
</select>
|
|
</select>
|
|
<select id="getByProjectReserveId" resultType="java.lang.String">
|
|
<select id="getByProjectReserveId" resultType="java.lang.String">
|
|
@@ -356,4 +349,8 @@
|
|
select a.projectReserveId,includeReserve,processStatus from cg_reserve_summary_statistics a
|
|
select a.projectReserveId,includeReserve,processStatus from cg_reserve_summary_statistics a
|
|
left join cg_reserve_process b on a.projectReserveId = b.projectReserveId
|
|
left join cg_reserve_process b on a.projectReserveId = b.projectReserveId
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getByProId"
|
|
|
|
+ resultType="com.jeeplus.modules.cg.reservemanagementcenter.reserveManage.entity.ReserveSummary">
|
|
|
|
+ select * from cg_reserve_summary_statistics where projectReserveId = #{proId}
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|