dcs 5 月之前
父節點
當前提交
bde51a2f37

+ 52 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/model/Project.java

@@ -14,6 +14,26 @@ public class Project {
 
     private long id;
 
+    /**
+     * 项目类型
+     */
+    private Integer projectType;
+
+    /**
+     * 具体地点
+     */
+    private String specificLocation;
+
+    /**
+     * 竣工时间
+     */
+    private String completionTime;
+
+    /**
+     * 建筑面积
+     */
+    private String buildingArea;
+
     /**
      * 生成周报(周一至周日 1,2,3,4,5,6,7)
      */
@@ -118,6 +138,38 @@ public class Project {
         this.id = id;
     }
 
+    public Integer getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectType(Integer projectType) {
+        this.projectType = projectType;
+    }
+
+    public String getSpecificLocation() {
+        return specificLocation;
+    }
+
+    public void setSpecificLocation(String specificLocation) {
+        this.specificLocation = specificLocation;
+    }
+
+    public String getCompletionTime() {
+        return completionTime;
+    }
+
+    public void setCompletionTime(String completionTime) {
+        this.completionTime = completionTime;
+    }
+
+    public String getBuildingArea() {
+        return buildingArea;
+    }
+
+    public void setBuildingArea(String buildingArea) {
+        this.buildingArea = buildingArea;
+    }
+
     public Integer getType() {
         return type;
     }

+ 19 - 2
virgo.api/src/main/resources/mapper/ProjectMapper.xml

@@ -4,6 +4,11 @@
 
 	<resultMap type="com.bosshand.virgo.api.model.Project" id="result">
 		<id column="id" property="id"/>
+		<result column="projectType" property="projectType"/>
+		<result column="specificLocation" property="specificLocation"/>
+		<result column="completionTime" property="completionTime"/>
+		<result column="buildingArea" property="buildingArea"/>
+
 		<result column="generateWeeklyDate" property="generateWeeklyDate"/>
 		<result column="type" property="type"/>
 		<result column="name" property="name"/>
@@ -22,6 +27,11 @@
 
 	<resultMap type="com.bosshand.virgo.api.model.Project" id="projectResult">
 		<id column="id" property="id"/>
+		<result column="projectType" property="projectType"/>
+		<result column="specificLocation" property="specificLocation"/>
+		<result column="completionTime" property="completionTime"/>
+		<result column="buildingArea" property="buildingArea"/>
+
 		<result column="generateWeeklyDate" property="generateWeeklyDate"/>
 		<result column="type" property="type"/>
 		<result column="name" property="name"/>
@@ -93,8 +103,8 @@
 	</select>
 
 	<insert id="insert" parameterType="com.bosshand.virgo.api.model.Project" useGeneratedKeys="true" keyProperty="id">
-		INSERT INTO project(`generateWeeklyDate`, `type`, `name`, `createDate`, `organizationId`, `address`, `addressCode`, `picture`, `tagIds`, `comment`, `coordinates`, `supportingFacilities`, `data`)
-		VALUES (#{generateWeeklyDate}, #{type}, #{name}, now(), #{organizationId}, #{address}, #{addressCode}, #{picture}, #{tagIds}, #{comment}, #{coordinates}, #{supportingFacilities}, #{data})
+		INSERT INTO project(`projectType`, `specificLocation`, `completionTime`, `buildingArea`, `generateWeeklyDate`, `type`, `name`, `createDate`, `organizationId`, `address`, `addressCode`, `picture`, `tagIds`, `comment`, `coordinates`, `supportingFacilities`, `data`)
+		VALUES (#{projectType}, #{specificLocation}, #{completionTime}, #{buildingArea}, #{generateWeeklyDate}, #{type}, #{name}, now(), #{organizationId}, #{address}, #{addressCode}, #{picture}, #{tagIds}, #{comment}, #{coordinates}, #{supportingFacilities}, #{data})
 	</insert>
 
 	<update id="delete">
@@ -104,6 +114,11 @@
 	<update id="update" parameterType="com.bosshand.virgo.api.model.Project">
 		UPDATE project
 		<trim prefix="set" suffixOverrides=",">
+			<if test="projectType!=null">projectType=#{projectType},</if>
+			<if test="specificLocation!=null">specificLocation=#{specificLocation},</if>
+			<if test="completionTime!=null">completionTime=#{completionTime},</if>
+			<if test="buildingArea!=null">buildingArea=#{buildingArea},</if>
+
 			<if test="type!=null">type=#{type},</if>
 			<if test="name!=null">name=#{name},</if>
 			<if test="createDate!=null">createDate=#{createDate},</if>
@@ -130,6 +145,7 @@
 					FIND_IN_SET (#{tagId}, tagIds)
 				</foreach>
 			</if>
+			<if test="projectType != null">and projectType = #{projectType}</if>
 			<if test="type != null">and type = #{type}</if>
 			<if test="name != null and name !=''">and name = #{name}</if>
 			<if test="createDate != null and createDate !=''">and createDate = #{createDate}</if>
@@ -146,6 +162,7 @@
 					FIND_IN_SET (#{tagId}, a.tagIds)
 				</foreach>
 			</if>
+			<if test="p.projectType != null">and a.projectType = #{p.projectType}</if>
 			<if test="p.type != null">and a.type = #{p.type}</if>
 			<if test="p.name!=null">and a.name=#{p.name}</if>
 			<if test="p.createDate!=null and p.createDate !=''">and a.createDate = #{p.createDate}</if>