Quellcode durchsuchen

施工图概算编制审核与调整详细内容列展示新增功能

xuteng vor 5 Jahren
Ursprung
Commit
e699ca2125

+ 4 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java

@@ -28,6 +28,7 @@ import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
 import com.jeeplus.modules.workcontent.common.WorkContentDetailFactory;
+import com.jeeplus.modules.workcontent.dao.WorkContentInvestmentCostDao;
 import com.jeeplus.modules.workcontent.entity.WorkContentType;
 import com.jeeplus.modules.workcontent.service.WorkContentDetailBaseService;
 import com.jeeplus.modules.workcontent.service.WorkContentTypeService;
@@ -85,6 +86,8 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 	private ProjectcontentinfoDao projectcontentinfoDao;
 	@Autowired
 	private ProjectBasedDataDao projectBasedDataDao;
+	@Autowired
+	private WorkContentInvestmentCostDao workContentInvestmentCostDao;
 
 	private static MainDictDetailDao mainDictDetailDao = SpringContextHolder.getBean(MainDictDetailDao.class);
 
@@ -1286,6 +1289,7 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 			//删除子菜单
 			String parentIds  = info.getParentIds()+info.getId()+",";
 			dao.deleteInfosByParent(parentIds);
+			workContentInvestmentCostDao.deleteByContentId(infoId);
 		}
 
 	}

+ 7 - 0
src/main/java/com/jeeplus/modules/workcontent/dao/WorkContentInvestmentCostDao.java

@@ -20,4 +20,11 @@ public interface WorkContentInvestmentCostDao extends CrudDao<WorkContentInvestm
 
 
     void batchInsert(List<WorkContentInvestmentCost> wlist);
+
+    /**
+     * 根据contentId删除数据
+     * @param contentId
+     * @return
+     */
+    int deleteByContentId(String contentId);
 }

+ 170 - 21
src/main/java/com/jeeplus/modules/workcontent/entity/WorkContentInvestmentCost.java

@@ -18,25 +18,174 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	private static final long serialVersionUID = 1L;
 	private String projectId;		// 项目id
 	private String contentId;		// 工作内容ID
+
+	private String costName;		// 工程费用名称
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double caliberBudgetEstimateCost;		// 同口径批复概算静态投资(万元)
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double examineBeforeCost;		// 建安工程施工图预算静态投资(万元)-审批前
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double examineAfterArchitectureCost;		// 建安工程施工图预算静态投资(万元)-审批后-建筑工程费
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double examineAfterInstallCost;		// 建安工程施工图预算静态投资(万元)-审批后-安装工程费
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double examineAfterRestsCost;		// 建安工程施工图预算静态投资(万元)-审批后-其他费用
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Double examineCount;		// 建安工程施工图预算静态投资(万元)-审批后-合计
+	@NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private Integer examineAdjustUnit;		// 建安工程施工图预算静态投资(万元)-调整额
+	private String amount;		// 与初步设计相比有无重大变化-数量
+	@NumberFormat(style = NumberFormat.Style.CURRENCY)
+	private String money;		// 与初步设计相比有无重大变化-金额
+	private String cause;		// 与初步设计相比有无重大变化-原因
+	
+	public WorkContentInvestmentCost() {
+		super();
+	}
+
+	public WorkContentInvestmentCost(String id){
+		super(id);
+	}
+
+	public String getProjectId() {
+		return projectId;
+	}
+
+	public void setProjectId(String projectId) {
+		this.projectId = projectId;
+	}
+	
+	public String getContentId() {
+		return contentId;
+	}
+
+	public void setContentId(String contentId) {
+		this.contentId = contentId;
+	}
+	
+	@ExcelField(title="工程费用名称", align=2, sort=10)
+	public String getCostName() {
+		return costName;
+	}
+
+	public void setCostName(String costName) {
+		this.costName = costName;
+	}
+
+	@ExcelField(title="同口径批复概算静态投资(万元)", align=2, sort=11)
+	public Double getCaliberBudgetEstimateCost() {
+		return caliberBudgetEstimateCost;
+	}
+
+	public void setCaliberBudgetEstimateCost(Double caliberBudgetEstimateCost) {
+		this.caliberBudgetEstimateCost = caliberBudgetEstimateCost;
+	}
+
+	@ExcelField(title="审批前", align=2, sort=12)
+	public Double getExamineBeforeCost() {
+		return examineBeforeCost;
+	}
+
+	public void setExamineBeforeCost(Double examineBeforeCost) {
+		this.examineBeforeCost = examineBeforeCost;
+	}
+
+
+	@ExcelField(title="审批后-建筑工程费", align=2, sort=13)
+	public Double getExamineAfterArchitectureCost() {
+		return examineAfterArchitectureCost;
+	}
+
+	public void setExamineAfterArchitectureCost(Double examineAfterArchitectureCost) {
+		this.examineAfterArchitectureCost = examineAfterArchitectureCost;
+	}
+
+	@ExcelField(title="审批后-安装工程费", align=2, sort=14)
+	public Double getExamineAfterInstallCost() {
+		return examineAfterInstallCost;
+	}
+
+	public void setExamineAfterInstallCost(Double examineAfterInstallCost) {
+		this.examineAfterInstallCost = examineAfterInstallCost;
+	}
+
+	@ExcelField(title="审批后-其他费用", align=2, sort=15)
+	public Double getExamineAfterRestsCost() {
+		return examineAfterRestsCost;
+	}
+
+	public void setExamineAfterRestsCost(Double examineAfterRestsCost) {
+		this.examineAfterRestsCost = examineAfterRestsCost;
+	}
+
+	@ExcelField(title="审批后-合计", align=2, sort=16)
+	public Double getExamineCount() {
+		return examineCount;
+	}
+
+	public void setExamineCount(Double examineCount) {
+		this.examineCount = examineCount;
+	}
+
+	@ExcelField(title="调整额", align=2, sort=17)
+	public Integer getExamineAdjustUnit() {
+		return examineAdjustUnit;
+	}
+
+	public void setExamineAdjustUnit(Integer examineAdjustUnit) {
+		this.examineAdjustUnit = examineAdjustUnit;
+	}
+
+	@ExcelField(title="数量", align=2, sort=18)
+	public String getAmount() {
+		return amount;
+	}
+
+	public void setAmount(String amount) {
+		this.amount = amount;
+	}
+
+	@ExcelField(title="金额", align=2, sort=19)
+	public String getMoney() {
+		return money;
+	}
+
+	public void setMoney(String money) {
+		this.money = money;
+	}
+
+	@ExcelField(title="原因", align=2, sort=20)
+	public String getCause() {
+		return cause;
+	}
+
+	public void setCause(String cause) {
+		this.cause = cause;
+	}
+
+
+	/*private static final long serialVersionUID = 1L;
+	private String projectId;		// 项目id
+	private String contentId;		// 工作内容ID
 	private String costType;		// 类型:估算-1、概算-2、预算-3
 	private String costNum;		// 编号
 	private String costName;		// 工程费用名称
-    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	@NumberFormat(style = NumberFormat.Style.CURRENCY)
 	private Double buildindCost;		// 建筑工程费
-    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	@NumberFormat(style = NumberFormat.Style.CURRENCY)
 	private Double equipmentCost;		// 设备购置费
-    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	@NumberFormat(style = NumberFormat.Style.CURRENCY)
 	private Double installationCost;		// 安装工程费
-    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	@NumberFormat(style = NumberFormat.Style.CURRENCY)
 	private Double otherExpenses;		// 其他费用
-    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+	@NumberFormat(style = NumberFormat.Style.CURRENCY)
 	private Double totalCost;		// 合计(万元)
 	private Integer count;		// 数量
 	private String unit;		// 单位
 	private String target;		// 指标
 	private String expenseType;		// 费用类型
 	private String nodeTypes;		// 节点类型
-	
+
 	public WorkContentInvestmentCost() {
 		super();
 	}
@@ -52,7 +201,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setProjectId(String projectId) {
 		this.projectId = projectId;
 	}
-	
+
 	public String getContentId() {
 		return contentId;
 	}
@@ -60,7 +209,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setContentId(String contentId) {
 		this.contentId = contentId;
 	}
-	
+
 	public String getCostType() {
 		return costType;
 	}
@@ -68,7 +217,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setCostType(String costType) {
 		this.costType = costType;
 	}
-	
+
 	@ExcelField(title="编号", align=2, sort=10)
 	public String getCostNum() {
 		return costNum;
@@ -77,7 +226,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setCostNum(String costNum) {
 		this.costNum = costNum;
 	}
-	
+
 	@ExcelField(title="工程费用名称", align=2, sort=11)
 	public String getCostName() {
 		return costName;
@@ -86,7 +235,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setCostName(String costName) {
 		this.costName = costName;
 	}
-	
+
 	@ExcelField(title="建筑工程费", align=2, sort=12)
 	public Double getBuildindCost() {
 		return buildindCost;
@@ -95,7 +244,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setBuildindCost(Double buildindCost) {
 		this.buildindCost = buildindCost;
 	}
-	
+
 	@ExcelField(title="设备购置费", align=2, sort=13)
 	public Double getEquipmentCost() {
 		return equipmentCost;
@@ -104,7 +253,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setEquipmentCost(Double equipmentCost) {
 		this.equipmentCost = equipmentCost;
 	}
-	
+
 	@ExcelField(title="安装工程费", align=2, sort=14)
 	public Double getInstallationCost() {
 		return installationCost;
@@ -113,7 +262,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setInstallationCost(Double installationCost) {
 		this.installationCost = installationCost;
 	}
-	
+
 	@ExcelField(title="其他费用", align=2, sort=15)
 	public Double getOtherExpenses() {
 		return otherExpenses;
@@ -122,7 +271,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setOtherExpenses(Double otherExpenses) {
 		this.otherExpenses = otherExpenses;
 	}
-	
+
 	@ExcelField(title="合计(万元)", align=2, sort=16)
 	public Double getTotalCost() {
 		return totalCost;
@@ -131,7 +280,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setTotalCost(Double totalCost) {
 		this.totalCost = totalCost;
 	}
-	
+
 	@ExcelField(title="数量", align=2, sort=17)
 	public Integer getCount() {
 		return count;
@@ -140,7 +289,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setCount(Integer count) {
 		this.count = count;
 	}
-	
+
 	@ExcelField(title="单位", align=2, sort=18)
 	public String getUnit() {
 		return unit;
@@ -149,7 +298,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setUnit(String unit) {
 		this.unit = unit;
 	}
-	
+
 	@ExcelField(title="指标", align=2, sort=19)
 	public String getTarget() {
 		return target;
@@ -158,7 +307,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setTarget(String target) {
 		this.target = target;
 	}
-	
+
 	@ExcelField(title="费用类型", align=2, sort=20)
 	public String getExpenseType() {
 		return expenseType;
@@ -167,7 +316,7 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 	public void setExpenseType(String expenseType) {
 		this.expenseType = expenseType;
 	}
-	
+
 	@ExcelField(title="节点类型", align=2, sort=21)
 	public String getNodeTypes() {
 		return nodeTypes;
@@ -175,6 +324,6 @@ public class WorkContentInvestmentCost extends DataEntity<WorkContentInvestmentC
 
 	public void setNodeTypes(String nodeTypes) {
 		this.nodeTypes = nodeTypes;
-	}
+	}*/
 	
 }

+ 17 - 19
src/main/java/com/jeeplus/modules/workcontent/web/WorkContentInvestmentCostController.java

@@ -3,20 +3,17 @@
  */
 package com.jeeplus.modules.workcontent.web;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.ConstraintViolationException;
-
+import com.google.common.collect.Lists;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.sys.entity.MainDictDetail;
 import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.workcontent.entity.WorkContentInvestmentCost;
 import com.jeeplus.modules.workcontent.service.WorkContentInvestmentCostService;
 import com.jeeplus.modules.workreceiptsregister.entity.ResponseEntity;
-import org.apache.shiro.authz.annotation.Logical;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -24,15 +21,10 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
-import com.google.common.collect.Lists;
-import com.jeeplus.common.utils.DateUtils;
-import com.jeeplus.common.utils.MyBeanUtils;
-import com.jeeplus.common.config.Global;
-import com.jeeplus.common.persistence.Page;
-import com.jeeplus.common.web.BaseController;
-import com.jeeplus.common.utils.StringUtils;
-import com.jeeplus.common.utils.excel.ExportExcel;
-import com.jeeplus.common.utils.excel.ImportExcel;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 工程费用Controller
@@ -92,7 +84,13 @@ public class WorkContentInvestmentCostController extends BaseController {
 		try {
 			ImportExcel ei = new ImportExcel(file, 1, 0);
             List<WorkContentInvestmentCost> list = ei.getDataList(WorkContentInvestmentCost.class);
-            responseEntity.setData(list);
+			List<WorkContentInvestmentCost> listAll = new ArrayList<>();
+			for (WorkContentInvestmentCost investmentCost : list) {
+				if(StringUtils.isNotBlank(investmentCost.getCostName()) && null != investmentCost.getCaliberBudgetEstimateCost() && null != investmentCost.getExamineBeforeCost() && null != investmentCost.getExamineAfterArchitectureCost()){
+					listAll.add(investmentCost);
+				}
+			}
+            responseEntity.setData(listAll);
 		} catch (Exception e) {
 		    logger.error("导入工程费用失败!",e);
 		    responseEntity.setCode(400);

+ 301 - 86
src/main/resources/mappings/modules/workcontent/WorkContentInvestmentCostDao.xml

@@ -12,38 +12,31 @@
 		a.del_flag AS "delFlag",
 		a.project_id AS "projectId",
 		a.content_id AS "contentId",
-		a.cost_type AS "costType",
-		a.cost_num AS "costNum",
 		a.cost_name AS "costName",
-		a.buildind_cost AS "buildindCost",
-		a.equipment_cost AS "equipmentCost",
-		a.installation_cost AS "installationCost",
-		a.other_expenses AS "otherExpenses",
-		a.total_cost AS "totalCost",
-		a.count AS "count",
-		a.unit AS "unit",
-		a.target AS "target",
-		a.expense_type AS "expenseType",
-		a.node_types AS "nodeTypes"
-	</sql>
-	
-	<sql id="workContentInvestmentCostJoins">
+		a.caliber_budget_estimate_cost AS "caliberBudgetEstimateCost",
+		a.examine_before_cost AS "examineBeforeCost",
+		a.examine_after_architecture_cost AS "examineAfterArchitectureCost",
+		a.examine_after_install_cost AS "examineAfterInstallCost",
+		a.examine_after_rests_cost AS "examineAfterRestsCost",
+		a.examine_count AS "examineCount",
+		a.examine_adjust_unit AS "examineAdjustUnit",
+		a.amount AS "amount",
+		a.money AS "money",
+		a.cause AS "cause"
 	</sql>
 	
     
 	<select id="get" resultType="WorkContentInvestmentCost" >
 		SELECT 
 			<include refid="workContentInvestmentCostColumns"/>
-		FROM work_content_investment_cost a
-		<include refid="workContentInvestmentCostJoins"/>
+		FROM work_content_working_plan_investment_cost a
 		WHERE a.id = #{id}
 	</select>
 	
 	<select id="findList" resultType="WorkContentInvestmentCost" >
 		SELECT 
 			<include refid="workContentInvestmentCostColumns"/>
-		FROM work_content_investment_cost a
-		<include refid="workContentInvestmentCostJoins"/>
+		FROM work_content_working_plan_investment_cost a
 		<where>
             <if test="projectId!=null and projectId !=''">
                 AND a.project_id = #{projectId}
@@ -66,8 +59,7 @@
 	<select id="findAllList" resultType="WorkContentInvestmentCost" >
 		SELECT 
 			<include refid="workContentInvestmentCostColumns"/>
-		FROM work_content_investment_cost a
-		<include refid="workContentInvestmentCostJoins"/>
+		FROM work_content_working_plan_investment_cost a
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 		</where>
@@ -82,7 +74,7 @@
 	</select>
 	
 	<insert id="insert">
-		INSERT INTO work_content_investment_cost(
+		INSERT INTO work_content_working_plan_investment_cost(
 			id,
 			create_by,
 			create_date,
@@ -92,19 +84,17 @@
 			del_flag,
 			project_id,
 			content_id,
-			cost_type,
-			cost_num,
 			cost_name,
-			buildind_cost,
-			equipment_cost,
-			installation_cost,
-			other_expenses,
-			total_cost,
-			count,
-			unit,
-			target,
-			expense_type,
-			node_types
+			caliber_budget_estimate_cost,
+			examine_before_cost,
+			examine_after_architecture_cost,
+			examine_after_install_cost,
+			examine_after_rests_cost,
+			examine_count,
+			examine_adjust_unit,
+			amount,
+			money,
+			cause
 		) VALUES (
 			#{id},
 			#{createBy.id},
@@ -115,24 +105,22 @@
 			#{delFlag},
 			#{projectId},
 			#{contentId},
-			#{costType},
-			#{costNum},
-			#{costName},
-			#{buildindCost},
-			#{equipmentCost},
-			#{installationCost},
-			#{otherExpenses},
-			#{totalCost},
-			#{count},
-			#{unit},
-			#{target},
-			#{expenseType},
-			#{nodeTypes}
+            #{costName},
+            #{caliberBudgetEstimateCost},
+            #{examineBeforeCost},
+            #{examineAfterArchitectureCost},
+            #{examineAfterInstallCost},
+            #{examineAfterRestsCost},
+            #{examineCount},
+            #{examineAdjustUnit},
+            #{amount},
+            #{money},
+            #{cause}
 		)
 	</insert>
 
     <insert id="batchInsert" parameterType="java.util.List">
-		INSERT INTO work_content_investment_cost(
+		INSERT INTO work_content_working_plan_investment_cost(
 			id,
 			create_by,
 			create_date,
@@ -142,19 +130,17 @@
 			del_flag,
 			project_id,
 			content_id,
-			cost_type,
-			cost_num,
 			cost_name,
-			buildind_cost,
-			equipment_cost,
-			installation_cost,
-			other_expenses,
-			total_cost,
-			count,
-			unit,
-			target,
-			expense_type,
-			node_types
+			caliber_budget_estimate_cost,
+			examine_before_cost,
+			examine_after_architecture_cost,
+			examine_after_install_cost,
+			examine_after_rests_cost,
+			examine_count,
+			examine_adjust_unit,
+			amount,
+			money,
+			cause
 		) VALUES
 		<foreach collection="list" item="item" separator=",">
             ( #{item.id},
@@ -166,24 +152,22 @@
             #{item.delFlag},
             #{item.projectId},
             #{item.contentId},
-            #{item.costType},
-            #{item.costNum},
             #{item.costName},
-            #{item.buildindCost},
-            #{item.equipmentCost},
-            #{item.InstallationCost},
-            #{item.otherExpenses},
-            #{item.totalCost},
-            #{item.count},
-            #{item.unit},
-            #{item.target},
-            #{item.expenseType},
-            #{item.nodeTypes})
+            #{item.caliberBudgetEstimateCost},
+            #{item.examineBeforeCost},
+            #{item.examineAfterArchitectureCost},
+            #{item.examineAfterInstallCost},
+            #{item.examineAfterRestsCost},
+            #{item.examineCount},
+            #{item.examineAdjustUnit},
+            #{item.amount},
+            #{item.money},
+            #{item.cause})
         </foreach>
 	</insert>
 	
 	<update id="update">
-		UPDATE work_content_investment_cost SET 	
+		UPDATE work_content_working_plan_investment_cost SET
 			update_by = #{updateBy.id},
 			update_date = #{updateDate},
 			remarks = #{remarks},
@@ -192,37 +176,268 @@
 			cost_type = #{costType},
 			cost_num = #{costNum},
 			cost_name = #{costName},
-			buildind_cost = #{buildindCost},
-			equipment_cost = #{equipmentCost},
-			installation_cost = #{installationCost},
-			other_expenses = #{otherExpenses},
-			total_cost = #{totalCost},
-			count = #{count},
-			unit = #{unit},
-			target = #{target},
-			expense_type = #{expenseType},
-			node_types = #{nodeTypes}
+			caliber_budget_estimate_cost = #{caliberBudgetEstimateCost},
+			examine_before_cost = #{examineBeforeCost},
+			examine_after_architecture_cost = #{examineAfterArchitectureCost},
+			examine_after_install_cost = #{examineAfterInstallCost},
+			examine_after_rests_cost = #{examineAfterRestsCost},
+			examine_count = #{examineCount},
+			examine_adjust_unit = #{examineAdjustUnit},
+			amount = #{amount},
+			money = #{money},
+			cause = #{cause}
 		WHERE id = #{id}
 	</update>
 	
 	
 	<!--物理删除-->
 	<update id="delete">
-		DELETE FROM work_content_investment_cost
+		DELETE FROM work_content_working_plan_investment_cost
 		WHERE id = #{id}
 	</update>
 	
 	<!--逻辑删除-->
 	<update id="deleteByLogic">
-		UPDATE work_content_investment_cost SET 
+		UPDATE work_content_working_plan_investment_cost SET
 			del_flag = #{DEL_FLAG_DELETE}
 		WHERE id = #{id}
 	</update>
+
+	<delete id="deleteByContentId">
+		DELETE FROM work_content_working_plan_investment_cost
+		WHERE content_id = #{id}
+	</delete>
 	
 	
 	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
 	<select id="findUniqueByProperty" resultType="WorkContentInvestmentCost" statementType="STATEMENT">
-		select * FROM work_content_investment_cost  where ${propertyName} = '${value}'
+		select * FROM work_content_working_plan_investment_cost  where ${propertyName} = '${value}'
 	</select>
+
+
+
+
+	<!--<sql id="workContentInvestmentCostColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.project_id AS "projectId",
+		a.content_id AS "contentId",
+		a.cost_type AS "costType",
+		a.cost_num AS "costNum",
+		a.cost_name AS "costName",
+		a.buildind_cost AS "buildindCost",
+		a.equipment_cost AS "equipmentCost",
+		a.installation_cost AS "installationCost",
+		a.other_expenses AS "otherExpenses",
+		a.total_cost AS "totalCost",
+		a.count AS "count",
+		a.unit AS "unit",
+		a.target AS "target",
+		a.expense_type AS "expenseType",
+		a.node_types AS "nodeTypes"
+	</sql>
+
+	<sql id="workContentInvestmentCostJoins">
+	</sql>
+
+
+	<select id="get" resultType="WorkContentInvestmentCost" >
+		SELECT
+		<include refid="workContentInvestmentCostColumns"/>
+		FROM work_content_investment_cost a
+		<include refid="workContentInvestmentCostJoins"/>
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="WorkContentInvestmentCost" >
+		SELECT
+		<include refid="workContentInvestmentCostColumns"/>
+		FROM work_content_investment_cost a
+		<include refid="workContentInvestmentCostJoins"/>
+		<where>
+			<if test="projectId!=null and projectId !=''">
+				AND a.project_id = #{projectId}
+			</if>
+			<if test="contentId!=null and contentId !=''">
+				AND a.content_id = #{contentId}
+			</if>
+			AND a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="findAllList" resultType="WorkContentInvestmentCost" >
+		SELECT
+		<include refid="workContentInvestmentCostColumns"/>
+		FROM work_content_investment_cost a
+		<include refid="workContentInvestmentCostJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<insert id="insert">
+		INSERT INTO work_content_investment_cost(
+		id,
+		create_by,
+		create_date,
+		update_by,
+		update_date,
+		remarks,
+		del_flag,
+		project_id,
+		content_id,
+		cost_type,
+		cost_num,
+		cost_name,
+		buildind_cost,
+		equipment_cost,
+		installation_cost,
+		other_expenses,
+		total_cost,
+		count,
+		unit,
+		target,
+		expense_type,
+		node_types
+		) VALUES (
+		#{id},
+		#{createBy.id},
+		#{createDate},
+		#{updateBy.id},
+		#{updateDate},
+		#{remarks},
+		#{delFlag},
+		#{projectId},
+		#{contentId},
+		#{costType},
+		#{costNum},
+		#{costName},
+		#{buildindCost},
+		#{equipmentCost},
+		#{installationCost},
+		#{otherExpenses},
+		#{totalCost},
+		#{count},
+		#{unit},
+		#{target},
+		#{expenseType},
+		#{nodeTypes}
+		)
+	</insert>
+
+	<insert id="batchInsert" parameterType="java.util.List">
+		INSERT INTO work_content_investment_cost(
+		id,
+		create_by,
+		create_date,
+		update_by,
+		update_date,
+		remarks,
+		del_flag,
+		project_id,
+		content_id,
+		cost_type,
+		cost_num,
+		cost_name,
+		buildind_cost,
+		equipment_cost,
+		installation_cost,
+		other_expenses,
+		total_cost,
+		count,
+		unit,
+		target,
+		expense_type,
+		node_types
+		) VALUES
+		<foreach collection="list" item="item" separator=",">
+			( #{item.id},
+			#{item.createBy.id},
+			#{item.createDate},
+			#{item.updateBy.id},
+			#{item.updateDate},
+			#{item.remarks},
+			#{item.delFlag},
+			#{item.projectId},
+			#{item.contentId},
+			#{item.costType},
+			#{item.costNum},
+			#{item.costName},
+			#{item.buildindCost},
+			#{item.equipmentCost},
+			#{item.InstallationCost},
+			#{item.otherExpenses},
+			#{item.totalCost},
+			#{item.count},
+			#{item.unit},
+			#{item.target},
+			#{item.expenseType},
+			#{item.nodeTypes})
+		</foreach>
+	</insert>
+
+	<update id="update">
+		UPDATE work_content_investment_cost SET
+		update_by = #{updateBy.id},
+		update_date = #{updateDate},
+		remarks = #{remarks},
+		project_id = #{projectId},
+		content_id = #{contentId},
+		cost_type = #{costType},
+		cost_num = #{costNum},
+		cost_name = #{costName},
+		buildind_cost = #{buildindCost},
+		equipment_cost = #{equipmentCost},
+		installation_cost = #{installationCost},
+		other_expenses = #{otherExpenses},
+		total_cost = #{totalCost},
+		count = #{count},
+		unit = #{unit},
+		target = #{target},
+		expense_type = #{expenseType},
+		node_types = #{nodeTypes}
+		WHERE id = #{id}
+	</update>-->
+
+
+	<!--物理删除-->
+	<!--<update id="delete">
+		DELETE FROM work_content_investment_cost
+		WHERE id = #{id}
+	</update>-->
+
+	<!--逻辑删除-->
+	<!--<update id="deleteByLogic">
+		UPDATE work_content_investment_cost SET
+		del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>-->
+
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<!--<select id="findUniqueByProperty" resultType="WorkContentInvestmentCost" statementType="STATEMENT">
+		select * FROM work_content_investment_cost  where ${propertyName} = '${value}'
+	</select>-->
 	
 </mapper>

+ 82 - 5
src/main/webapp/webpage/modules/workcontent/workContentInvestmentCostList.jsp

@@ -50,7 +50,7 @@
 
 	<table id="contentTable" class="table table-bordered table-condensed can-edit">
 		<thead>
-			<tr>
+			<%--<tr>
                 <th class="hide"></th>
 				<th>编号</th>
 				<th>工程费用名称</th>
@@ -66,7 +66,30 @@
 				<th>节点类型</th>
                 <th>备注</th>
 				<th width="60">操作</th>
+			</tr>--%>
+			<tr>
+				<th rowspan="3" class="hide"></th>
+				<th rowspan="3" >序号</th>
+				<th rowspan="3" >工程或费用名称</th>
+				<th rowspan="3" >同口径批复概算静态投资(万元)</th>
+				<th colspan="6">建安工程施工图预算静态投资(万元)</th>
+				<th colspan="3">与初步设计相比有无重大变化</th>
+				<th width="60" rowspan="3">操作</th>
 			</tr>
+            <tr>
+                <th rowspan="2">评审前</th>
+                <th colspan="4">评审后</th>
+                <th rowspan="2">调整额</th>
+                <th rowspan="2">数量</th>
+                <th rowspan="2">金额</th>
+                <th rowspan="2">原因</th>
+            </tr>
+            <tr>
+                <th>建筑工程费</th>
+                <th>安装工程费</th>
+                <th>其他费用</th>
+                <th>合计</th>
+            </tr>
 		</thead>
 		<tbody id="investmentCostList">
 		</tbody>
@@ -80,6 +103,54 @@
                 <input id="investmentCostList{{idx}}_costType" subName="costType" class="contentDetail"  type="hidden" value="{{row.costType}}"/>
             </td>
             <td>
+                <input id="investmentCostList{{idx}}_costNum" subName="costNum" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_costName" subName="costName" value="{{row.costName}}" type="text" class="form-control contentDetail"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_equipmentCost" subName="caliberBudgetEstimateCost" type="text" value="{{row.caliberBudgetEstimateCost}}"  class="form-control number contentDetail money"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_installationCost" subName="examineBeforeCost" type="text" value="{{row.examineBeforeCost}}"   class="form-control number contentDetail money"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_otherExpenses" subName="examineAfterArchitectureCost" type="text" value="{{row.examineAfterArchitectureCost}}"   class="form-control number contentDetail money"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_totalCost" subName="examineAfterInstallCost" type="text"  value="{{row.examineAfterInstallCost}}" class="form-control number  contentDetail money"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_count" subName="examineAfterRestsCost" type="text"    value="{{row.examineAfterRestsCost}}" class="form-control number contentDetail"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_unit" subName="examineCount" type="text"  value="{{row.examineCount}}" class="form-control number contentDetail"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_target" subName="examineAdjustUnit" type="text"  value="{{row.examineAdjustUnit}}" class="form-control number contentDetail"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_expenseType" subName="amount" type="text"  value="{{row.amount}}" class="form-control number contentDetail"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_nodeTypes" subName="money" type="text"  value="{{row.money}}" class="form-control number contentDetail"/>
+            </td>
+            <td>
+                <input id="investmentCostList{{idx}}_remarks" subName="cause" type="text"  value="{{row.cause}}" class="form-control  contentDetail"/>
+            </td>
+            <td class="text-center op-td">
+                        <a href="#" onclick="delRow(this, '#investmentCostList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
+            </td>
+        </tr>//-->
+    </script>
+    <%--<script type="text/template" id="investmentCostTpl">//<!--
+        <tr id="investmentCostList{{idx}}">
+            <td class="hide">
+                <input id="investmentCostList{{idx}}_id" subName="id" class="contentDetail" type="hidden" value="{{row.id}}"/>
+                <input id="investmentCostList{{idx}}_delFlag" subName="delFlag" class="contentDetail" type="hidden" value="0"/>
+                <input id="investmentCostList{{idx}}_costType" subName="costType" class="contentDetail"  type="hidden" value="{{row.costType}}"/>
+            </td>
+            <td>
                 <input id="investmentCostList{{idx}}_costNum" subName="costNum"  value="{{row.costNum}}" type="text" class="form-control contentDetail"/>
             </td>
             <td>
@@ -112,7 +183,7 @@
 				</c:forEach>
 			</c:if>
 			</select>
-               <%-- <input id="investmentCostList{{idx}}_unit" subName="unit" type="text"  value="{{row.unit}}" class="form-control  contentDetail"/>--%>
+               &lt;%&ndash; <input id="investmentCostList{{idx}}_unit" subName="unit" type="text"  value="{{row.unit}}" class="form-control  contentDetail"/>&ndash;%&gt;
             </td>
             <td>
                 <input id="investmentCostList{{idx}}_target" subName="target" type="text"  value="{{row.target}}" readonly="true" class="form-control  contentDetail"/>
@@ -126,7 +197,7 @@
 				</c:forEach>
 			</c:if>
 			</select>
-                <%--<input id="investmentCostList{{idx}}_expenseType" subName="expenseType" type="text"  value="{{row.expenseType}}" class="form-control  contentDetail"/>--%>
+                &lt;%&ndash;<input id="investmentCostList{{idx}}_expenseType" subName="expenseType" type="text"  value="{{row.expenseType}}" class="form-control  contentDetail"/>&ndash;%&gt;
             </td>
             <td>
             <select style="width:80px;" id="investmentCostList{{idx}}_nodeTypes" subName="nodeTypes"  class="form-control contentDetail">
@@ -137,7 +208,7 @@
 				</c:forEach>
 			</c:if>
 			</select>
-                <%--<input id="investmentCostList{{idx}}_nodeTypes" subName="nodeTypes" type="text"  value="{{row.nodeTypes}}" class="form-control  contentDetail"/>--%>
+                &lt;%&ndash;<input id="investmentCostList{{idx}}_nodeTypes" subName="nodeTypes" type="text"  value="{{row.nodeTypes}}" class="form-control  contentDetail"/>&ndash;%&gt;
             </td>
             <td>
                 <input id="investmentCostList{{idx}}_remarks" subName="remarks" type="text"  value="{{row.remarks}}" class="form-control  contentDetail"/>
@@ -146,7 +217,7 @@
                         <a href="#" onclick="delRow(this, '#investmentCostList{{idx}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
             </td>
         </tr>//-->
-    </script>
+    </script>--%>
         <script type="text/javascript">
             var investmentCostIdx = 0, investmentCostTpl = $("#investmentCostTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
             var validateForm2;
@@ -173,7 +244,13 @@
                 $(":input.money").change();
             })
 
+            /*function addRowCost(list, idx, tpl, row){
+                bornTemplete(list, idx, tpl, row, idx);
+                investmentCostIdx +=1;
+            }*/
+
             function addRowCost(list, idx, tpl, row){
+                idx = idx+1;
                 bornTemplete(list, idx, tpl, row, idx);
                 investmentCostIdx +=1;
             }