浏览代码

报告信息提交数据数据库double参数报错修改

user5 4 年之前
父节点
当前提交
4e439d2f76

+ 161 - 40
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml

@@ -587,16 +587,86 @@
 			#{invalidStatus},
 			#{reportType},
 			#{numberPath},
-			#{reviewFee},
-			#{approvalFee},
-			#{contractFee},
-			#{verifyFee},
-			#{verifyRate},
-			#{consultFee},
-			#{buildingFee},
-			#{installFee},
-			#{buildingRate},
-			#{installRate},
+			<choose>
+				<when test="reviewFee != null and reviewFee !=''">
+					#{reviewFee},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
+			<choose>
+				<when test="approvalFee != null and approvalFee !=''">
+					#{approvalFee},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
+			<choose>
+				<when test="contractFee != null and contractFee !=''">
+					#{contractFee},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
+			<choose>
+				<when test="verifyFee != null and verifyFee !=''">
+					#{verifyFee},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
+			<choose>
+				<when test="verifyRate != null and verifyRate !=''">
+					#{verifyRate},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
+			<choose>
+				<when test="consultFee != null and consultFee !=''">
+					#{consultFee},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
+			<choose>
+				<when test="buildingFee != null and buildingFee !=''">
+					#{buildingFee},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
+			<choose>
+				<when test="installFee != null and installFee !=''">
+					#{installFee},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
+			<choose>
+				<when test="buildingRate != null and buildingRate !=''">
+					#{buildingRate},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
+			<choose>
+				<when test="installRate != null and installRate !=''">
+					#{installRate},
+				</when>
+				<otherwise>
+					0,
+				</otherwise>
+			</choose>
 			#{bzshbUserId},
 			#{consultant.id},
 			#{consultantRemarks},
@@ -651,36 +721,87 @@
 		<if test="numberPath != null and numberPath != ''">
 			,number_path = #{numberPath}
 		</if>
-		<if test="reviewFee != null and reviewFee != ''">
-			,review_fee = #{reviewFee}
-		</if>
-		<if test="approvalFee != null and approvalFee != ''">
-			,approval_fee = #{approvalFee}
-		</if>
-		<if test="contractFee != null and contractFee != ''">
-			,contract_fee = #{contractFee}
-		</if>
-		<if test="verifyFee != null and verifyFee != ''">
-			,verify_fee = #{verifyFee}
-		</if>
-		<if test="verifyRate != null and verifyRate != ''">
-			,verify_rate = #{verifyRate}
-		</if>
-		<if test="consultFee != null and consultFee != ''">
-			,consult_fee = #{consultFee}
-		</if>
-		<if test="buildingFee != null and buildingFee != ''">
-			,building_fee = #{buildingFee}
-		</if>
-		<if test="installFee != null and installFee != ''">
-			,install_fee = #{installFee}
-		</if>
-		<if test="buildingRate != null and buildingRate != ''">
-			,building_rate = #{buildingRate}
-		</if>
-		<if test="installRate != null and installRate != ''">
-			,install_rate = #{installRate}
-		</if>
+
+		<choose>
+			<when test="reviewFee != null and reviewFee !=''">
+				,review_fee = #{reviewFee}
+			</when>
+			<otherwise>
+				,review_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="approvalFee != null and approvalFee !=''">
+				,approval_fee = #{approvalFee}
+			</when>
+			<otherwise>
+				,approval_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="contractFee != null and contractFee !=''">
+				,contract_fee = #{contractFee}
+			</when>
+			<otherwise>
+				,contract_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="verifyFee != null and verifyFee !=''">
+				,verify_fee = #{verifyFee}
+			</when>
+			<otherwise>
+				,verify_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="verifyRate != null and verifyRate !=''">
+				,verify_rate = #{verifyRate}
+			</when>
+			<otherwise>
+				,verify_rate = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="consultFee != null and consultFee !=''">
+				,consult_fee = #{consultFee}
+			</when>
+			<otherwise>
+				,consult_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="buildingFee != null and buildingFee !=''">
+				,building_fee = #{buildingFee}
+			</when>
+			<otherwise>
+				,building_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="installFee != null and installFee !=''">
+				,install_fee = #{installFee}
+			</when>
+			<otherwise>
+				,install_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="buildingRate != null and buildingRate !=''">
+				,building_rate = #{buildingRate}
+			</when>
+			<otherwise>
+				,building_rate = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="installRate != null and installRate !=''">
+				,install_rate = #{installRate}
+			</when>
+			<otherwise>
+				,install_rate = 0
+			</otherwise>
+		</choose>
 		<if test="auditPassDate != null and auditPassDate != ''">
 			,audit_pass_date = #{auditPassDate}
 		</if>

+ 95 - 23
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml

@@ -84,7 +84,7 @@
 		a.building_fee AS "buildingFee",
 		a.install_fee AS "installFee"
 	</sql>
-	
+
 	<sql id="projectRecordsJoins">
 		LEFT JOIN sys_area area ON area.id = a.area_id
 	</sql>
@@ -120,8 +120,8 @@
 		JOIN project_report_data d ON d.id = a.report_id
 		JOIN sys_user u ON u.id = a.create_by
 	</sql>
-	
-    
+
+
 	<select id="get" resultType="RuralProjectRecords" >
 		SELECT
 			<include refid="projectRecordsColumns"/>
@@ -203,15 +203,87 @@
 		status = #{status},
 		invalid_status = #{invalidStatus},
 		report_type = #{reportType},
-		number_path = #{numberPath},
-		review_fee = #{reviewFee},
-		approval_fee = #{approvalFee},
-		contract_fee = #{contractFee},
-		verify_fee = #{verifyFee},
-		verify_rate = #{verifyRate},
-		consult_fee = #{consultFee},
-		building_fee = #{buildingFee},
-		install_fee = #{installFee}
+		number_path = #{numberPath}
+		<choose>
+			<when test="reviewFee != null and reviewFee !=''">
+				,review_fee = #{reviewFee}
+			</when>
+			<otherwise>
+				,review_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="approvalFee != null and approvalFee !=''">
+				,approval_fee = #{approvalFee}
+			</when>
+			<otherwise>
+				,approval_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="contractFee != null and contractFee !=''">
+				,contract_fee = #{contractFee}
+			</when>
+			<otherwise>
+				,contract_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="verifyFee != null and verifyFee !=''">
+				,verify_fee = #{verifyFee}
+			</when>
+			<otherwise>
+				,verify_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="verifyRate != null and verifyRate !=''">
+				,verify_rate = #{verifyRate}
+			</when>
+			<otherwise>
+				,verify_rate = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="consultFee != null and consultFee !=''">
+				,consult_fee = #{consultFee}
+			</when>
+			<otherwise>
+				,consult_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="buildingFee != null and buildingFee !=''">
+				,building_fee = #{buildingFee}
+			</when>
+			<otherwise>
+				,building_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="installFee != null and installFee !=''">
+				,install_fee = #{installFee}
+			</when>
+			<otherwise>
+				,install_fee = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="buildingRate != null and buildingRate !=''">
+				,building_rate = #{buildingRate}
+			</when>
+			<otherwise>
+				,building_rate = 0
+			</otherwise>
+		</choose>
+		<choose>
+			<when test="installRate != null and installRate !=''">
+				,install_rate = #{installRate}
+			</when>
+			<otherwise>
+				,install_rate = 0
+			</otherwise>
+		</choose>
 		WHERE id = #{id}
 	</update>
 
@@ -221,7 +293,7 @@
 		WHERE id = #{id}
 	</update>
 
-	
+
 	<select id="findList" resultType="RuralProjectRecords" >
 		SELECT
 			<include refid="projectRecordsColumns"/>
@@ -606,15 +678,15 @@
             AND a.del_flag = #{DEL_FLAG_NORMAL}
         </where>
     </select>
-	
+
 	<select id="findAllList" resultType="RuralProjectRecords" >
-		SELECT 
+		SELECT
 			<include refid="projectRecordsColumns"/>
 		FROM rural_project_records a
 		<include refid="projectRecordsJoins"/>
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
-		</where>		
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -624,7 +696,7 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<insert id="insert">
 		INSERT INTO rural_project_records(
 			id,
@@ -704,7 +776,7 @@
 			#{totalFees}
 		)
 	</insert>
-	
+
 	<update id="update">
 		UPDATE rural_project_records SET
 			update_by = #{updateBy.id},
@@ -742,15 +814,15 @@
 		    total_fees =  #{totalFees}
 		WHERE id = #{id}
 	</update>
-	
-	
+
+
 	<!--物理删除-->
 	<update id="delete">
 		UPDATE rural_project_records SET
 			del_flag = #{DEL_FLAG_DELETE}
 		WHERE id = #{id}
 	</update>
-	
+
 	<!--逻辑删除-->
 	<update id="deleteByLogic">
 		UPDATE rural_project_records SET
@@ -781,7 +853,7 @@
           status = #{projectStatus}
         WHERE id = #{id}
     </update>
-	
+
 	<update id="updateSelectiveById">
 		UPDATE  rural_project_records
 		<set>
@@ -1100,4 +1172,4 @@
 		where
 			del_flag = 0 and parent_id = #{parentId}
 	</select>
-</mapper>
+</mapper>