Explorar o código

erp 实体类重写

xs %!s(int64=5) %!d(string=hai) anos
pai
achega
f534e53a9a

+ 22 - 53
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/DataMaintenanceMapper.xml

@@ -3,6 +3,7 @@
 <mapper namespace="com.jeeplus.modules.sg.financial.settlement.mapper.DataMaintenanceMapper">
     
 	<sql id="infoColumns">
+		a.id AS "id",
 		a.create_by AS "createBy.id",
 		a.create_date AS "createDate",
 		a.update_by AS "updateBy.id",
@@ -10,11 +11,6 @@
 		a.remarks AS "remarks",
 		a.del_flag AS "delFlag",
 		a.project_id AS "projectId",
-		a.design_units AS "designUnits",
-		a.construction_units AS "constructionUnits",
-		a.address,
-		a.property,
-		a.investment,
 		a.start_date AS "startDate",
 		a.end_date AS "endDate",
 		a.approval_number AS "approvalNumber",
@@ -30,16 +26,16 @@
 		a.total_fee AS "totalFee"
 	</sql>
 
-    
+
 	<select id="get" resultType="MaintainData" >
-		SELECT 
+		SELECT
 			<include refid="infoColumns"/>
 		FROM js_maintain_data a
-		WHERE a.project_id = #{id}
+		WHERE a.id = #{id}
 	</select>
-	
+
 	<select id="findList" resultType="MaintainData" >
-		SELECT 
+		SELECT
 			<include refid="infoColumns"/>
 		FROM js_maintain_data a
 		<where>
@@ -61,15 +57,15 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<select id="findAllList" resultType="MaintainData" >
-		SELECT 
+		SELECT
 			<include refid="infoColumns"/>
 		FROM js_maintain_data a
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			${dataScope}
-		</where>		
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -79,10 +75,10 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<insert id="insert">
 		INSERT INTO js_maintain_data(
-
+			id,
 			create_by,
 			create_date,
 			update_by,
@@ -90,11 +86,6 @@
 			remarks,
 			del_flag,
 			project_id,
-			design_units,
-		    construction_units,
-		    address,
-		    property,
-		    investment,
 			start_date,
 			end_date,
 			approval_number,
@@ -109,7 +100,7 @@
 			management_fee,
 			total_fee
 		) VALUES (
-
+			#{id},
 			#{createBy.id},
 			#{createDate},
 			#{updateBy.id},
@@ -117,11 +108,6 @@
 			#{remarks},
 			#{delFlag},
 			#{projectId},
-			#{designUnits},
-			#{constructionUnits},
-			#{address},
-			#{property},
-			#{investment},
 			#{startDate},
 			#{endDate},
 			#{approvalNumber},
@@ -140,6 +126,7 @@
 
     <insert id="insertList">
         replace INTO js_maintain_data(
+			id,
 			create_by,
 			create_date,
 			update_by,
@@ -147,11 +134,6 @@
 			remarks,
 			del_flag,
 			project_id,
-		    design_units,
-		    construction_units,
-		    address,
-		    property,
-		    investment,
 			start_date,
 			end_date,
 			approval_number,
@@ -168,7 +150,7 @@
 		) VALUES
         <foreach collection="list" item="item" index="index" separator="," >
 		(
-
+			#{item.id},
 			#{item.createBy.id},
 			#{item.createDate},
 			#{item.updateBy.id},
@@ -176,11 +158,6 @@
 			#{item.remarks},
 			#{item.delFlag},
 			#{item.projectId},
-			#{item.designUnits},
-			#{item.constructionUnits},
-			#{item.address},
-			#{item.property},
-			#{item.investment},
 			#{item.startDate},
 			#{item.endDate},
 			#{item.approvalNumber},
@@ -197,17 +174,14 @@
 		)
         </foreach>
 	</insert>
-	
+
 	<update id="update">
 		UPDATE js_maintain_data SET
 			update_by = #{updateBy.id},
 			update_date = #{updateDate},
-			design_units = #{designUnits},
-			construction_units = #{constructionUnits},
-			address = #{address},
-			property = #{property},
-			investment = #{investment},
+			remarks = #{remarks},
 			start_date = #{startDate},
+			project_id = #{projectId},
 			end_date = #{endDate},
 			approval_number = #{approvalNumber},
 			building_fee = #{buildingFee},
@@ -220,26 +194,21 @@
 			damages = #{damages},
 			management_fee = #{managementFee},
 			total_fee = #{totalFee}
-		WHERE project_id = #{id}
+		WHERE id = #{id}
 	</update>
-	
-	
+
+
 	<!--物理删除-->
 	<update id="delete">
 		DELETE FROM js_maintain_data
-		WHERE project_id = #{id}
+		WHERE id = #{id}
 	</update>
 
-	<update id="deleteData">
-		DELETE FROM js_maintain_data
-		WHERE project_id = #{projectId}
-	</update>
-	
 	<!--逻辑删除-->
 	<update id="deleteByLogic">
 		UPDATE js_maintain_data SET
 			del_flag = #{DEL_FLAG_DELETE}
-		WHERE project_id = #{id}
+		WHERE id = #{id}
 	</update>