瀏覽代碼

镇江本部历年项目建设进度

yue 5 年之前
父節點
當前提交
66854deb04

+ 10 - 0
src/main/java/com/jeeplus/modules/sg/progress/entity/YearProgress.java

@@ -16,6 +16,8 @@ import com.jeeplus.modules.test.treetable.dialog.entity.CarKind1;
 public class YearProgress extends DataEntity<YearProgress> {
 
 	private static final long serialVersionUID = 1L;
+	//记录查询项目定义号数组
+	private String[] attrs;
 	//序号
 	private String importNo;
 	//年度
@@ -67,6 +69,14 @@ public class YearProgress extends DataEntity<YearProgress> {
 	//资产卡片号
 	private String assetCardNo;
 
+	public String[] getAttrs() {
+		return attrs;
+	}
+
+	public void setAttrs(String[] attrs) {
+		this.attrs = attrs;
+	}
+
 	@ExcelField(title="序号", align=2, sort=1)
 	public String getImportNo() {
 		return importNo;

+ 7 - 4
src/main/java/com/jeeplus/modules/sg/progress/mapper/xml/YearProgressMapper.xml

@@ -34,7 +34,7 @@
         SELECT
         <include refid="progressColumns"/>
         FROM xm_year_progress a
-        WHERE a.id = #{id}
+        WHERE a.projectName = #{projectName}
     </select>
 
     <select id="findList" resultType="YearProgress">
@@ -50,8 +50,11 @@
             <if test="projectNO!=null and projectNO != ''">
                 and a.projectNO = #{projectNO}
             </if>
-            <if test="projectId!=null and projectId != ''">
-                and a.projectId = #{projectId}
+            <if test="attrs != null and  attrs !='' ">
+                and a.projectId in
+                <foreach collection="attrs" item="item" index="index" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
             </if>
             <if test="projectName!=null and projectName != ''">
                 and a.projectName = #{projectName}
@@ -69,7 +72,7 @@
     </select>
 
     <select id="findAllYear" resultType="string">
-        select distinct  projectYear from xm_year_progress;
+        select distinct  projectYear from xm_year_progress ORDER BY projectYear;
     </select>
 
     <select id="findAllList" resultType="YearProgress">

+ 11 - 0
src/main/java/com/jeeplus/modules/sg/progress/web/YearProgressController.java

@@ -77,6 +77,11 @@ public class YearProgressController extends BaseController {
     @RequiresPermissions("test:progress:list")
     @RequestMapping(value = "data")
     public Map<String, Object> data(YearProgress yearProgress, HttpServletRequest request, HttpServletResponse response, Model model) {
+        String projectId = yearProgress.getProjectId();
+        if (projectId!=null && !"".equals(projectId)) {
+            String[] split = projectId.split("\\s+");
+            yearProgress.setAttrs(split);
+        }
         Page<YearProgress> page = yearProgressService.findPage(new Page<YearProgress>(request, response), yearProgress);
         return getBootstrapData(page);
     }
@@ -109,6 +114,12 @@ public class YearProgressController extends BaseController {
             return j;
         }
         //新增或编辑表单保存
+        YearProgress yearProgress1 = yearProgressService.get(yearProgress);
+        if (yearProgress1 != null) {
+            j.setSuccess(false);
+            j.setMsg("项目已存在");
+            return j;
+        }
         yearProgressService.save(yearProgress);//保存
         j.setSuccess(true);
         j.setMsg("项目信息保存成功");

+ 95 - 48
src/main/webapp/webpage/modules/sg/progress/yearProgressList.js

@@ -64,100 +64,147 @@ $(document).ready(function() {
 		    }
 			,{
 		        field: 'projectYear',
-		        title: '年度'
-		    }
+		        title: '年度',
+					   width:100,
+
+				   }
 			,{
 		        field: 'projectId',
-		        title: '项目定义号'
-		    }
+		        title: '项目定义号',
+					   width:150,
+
+				   }
 			,{
 		        field: 'projectNO',
-		        title: '项目编号'
-               }
+		        title: '项目编号',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'projectName',
-				   title: '项目名称'
+				   title: '项目名称',
+				   width:150,
 			   }
 			   ,{
 				   field: 'assignedUnit',
-				   title: '合同单位'
-			   }
+				   title: '合同单位',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'rate',
-				   title: '费率'
-			   }
+				   title: '费率',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'constructionUnit',
-				   title: '施工单位'
-			   }
+				   title: '施工单位',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'ownerProjectManager',
-				   title: '业主项目经理'
-			   }
+				   title: '业主项目经理',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'constructionProjectManager',
-				   title: '施工项目经理'
-			   }
+				   title: '施工项目经理',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'subcontractor',
-				   title: '分包单位'
-			   }
+				   title: '分包单位',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'designer',
-				   title: '设计人员'
-			   }
+				   title: '设计人员',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'problemsInConstruction',
-				   title: '建设中存在的问题'
-			   }
+				   title: '建设中存在的问题',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'projectOperationStatus',
-				   title: '项目投运状态'
-			   }
+				   title: '项目投运状态',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'projectOperationTime',
-				   title: '项目投运时间'
-			   }
+				   title: '项目投运时间',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'isTheDesign',
-				   title: '设计费是否发生'
-			   }
+				   title: '设计费是否发生',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'isTheSupervision',
-				   title: '监理费是否发生'
-			   }
+				   title: '监理费是否发生',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'whetherIsIncurred',
-				   title: '施工费是否发生'
-			   }
+				   title: '施工费是否发生',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'whetherIsApproval',
-				   title: '施工单位是否送审'
-			   }
+				   title: '施工单位是否送审',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'approvedNot',
-				   title: '是否审定'
-			   }
+				   title: '是否审定',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'approvedNotNot',
-				   title: '是否审定'
-			   }
+				   title: '是否审定',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'whetherFlat',
-				   title: '甲供材是否平'
-			   }
+				   title: '甲供材是否平',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'settlementBatch',
-				   title: '财务决算批次'
-			   }
+				   title: '财务决算批次',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'projectCloseDate',
-				   title: '项目关闭日期'
-			   }
+				   title: '项目关闭日期',
+					   width:150,
+
+				   }
 			   ,{
 				   field: 'assetCardNo',
-				   title: '资产卡片号'
-			   }
+				   title: '资产卡片号',
+					   width:150,
+
+				   }
 		     ]
 		
 		});
@@ -178,7 +225,7 @@ $(document).ready(function() {
 		$("#btnImport").click(function(){
 			jp.open({
 			    type: 2,
-                area: [500, 200],
+                area: [500, 150],
                 auto: true,
 			    title:"导入数据",
 			    content: "${ctx}/tag/importExcel" ,

+ 3 - 3
src/main/webapp/webpage/modules/sg/progress/yearProgressList.jsp

@@ -19,10 +19,10 @@
         </div>
         <div class="panel-body">
             <div class="row">
-                <div class="col-sm-4 col-md-3">
+                <div class="col-sm-4 col-md-3" style="width: 10%">
                     <div id="carKind1jsTree" style="overflow-x:auto; border:0px;"></div>
                 </div>
-                <div class="col-sm-8 col-md-9" >
+                <div class="col-sm-8 col-md-9" style="width: 90%" >
                     <!-- 搜索 -->
                     <div id="search-collapse" class="collapse">
                         <div class="accordion-inner">
@@ -86,7 +86,7 @@
                     </div>
 
                     <!-- 表格 -->
-                    <table id="car1Table" data-toolbar="#toolbar"></table>
+                    <table id="car1Table" data-toolbar="#toolbar"  style="table-layout: fixed;word-break:break-all;"></table>
 
                 </div>
             </div>