Jelajahi Sumber

项目列表页排序指向更改,排序完成,添加部分注释

yue 5 tahun lalu
induk
melakukan
f1e59fdbdf

+ 5 - 5
src/main/java/com/jeeplus/modules/sg/information/mapper/xml/InformationMapper.xml

@@ -233,16 +233,16 @@
 
 
     <select id="findList" resultType="Information">
     <select id="findList" resultType="Information">
         SELECT
         SELECT
-        a.*,b.trial,b.construction,b.outConstruction,b.settlement
+		<include refid="newInformationColumns"/>,b.trial,b.construction,b.outConstruction,b.settlement
         FROM project_information as a
         FROM project_information as a
 		left JOIN project_append as b on a.project_id = b.project_id
 		left JOIN project_append as b on a.project_id = b.project_id
         <where>
         <where>
 			1=1
 			1=1
             <if test="projectId != null and projectId != ''">
             <if test="projectId != null and projectId != ''">
-                AND a.project_Id = #{projectId}
+                AND a.project_id = #{projectId}
             </if>
             </if>
             <if test="projectName != null and projectName != ''">
             <if test="projectName != null and projectName != ''">
-                AND a.project_Name LIKE
+                AND a.project_name LIKE
                 <if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
                 <if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
                 <if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
                 <if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
                 <if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
                 <if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
@@ -251,10 +251,10 @@
                 AND a.department = #{department}
                 AND a.department = #{department}
             </if>
             </if>
             <if test="secondUnits != null and secondUnits != '' ">
             <if test="secondUnits != null and secondUnits != '' ">
-                AND a.second_Units=#{secondUnits}
+                AND a.second_units=#{secondUnits}
             </if>
             </if>
             <if test="firstUnits != null and firstUnits != '' ">
             <if test="firstUnits != null and firstUnits != '' ">
-                AND a.first_Units=#{firstUnits}
+                AND a.first_units=#{firstUnits}
             </if>
             </if>
         	<if test="projectType !=null and projectType != ''">
         	<if test="projectType !=null and projectType != ''">
 				and a.project_type = #{projectType}
 				and a.project_type = #{projectType}

+ 25 - 14
src/main/java/com/jeeplus/modules/sg/information/utils/ImportInformation.java

@@ -327,20 +327,29 @@ public  class ImportInformation {
             try {
             try {
                 Material material = new Material();
                 Material material = new Material();
                 Row row = ei.getRow(i);
                 Row row = ei.getRow(i);
+                //项目定义号
                 Object projectId = ei.getCellValue(row, 0);
                 Object projectId = ei.getCellValue(row, 0);
+                //出库数量
                 Object outboundNumber = ei.getCellValue(row, 6);
                 Object outboundNumber = ei.getCellValue(row, 6);
+                //物料编号
                 Object inforId = ei.getCellValue(row, 1);
                 Object inforId = ei.getCellValue(row, 1);
+                //原因类型
                 Object status = ei.getCellValue(row, 14);
                 Object status = ei.getCellValue(row, 14);
+                //备注说明
                 Object info = ei.getCellValue(row, 15);
                 Object info = ei.getCellValue(row, 15);
-
+                //根据项目定义号,物料定义号查询出该条的物料信息
                 Material myProIn = materialService.findByProIn(projectId.toString(), inforId.toString());
                 Material myProIn = materialService.findByProIn(projectId.toString(), inforId.toString());
+                //如果出库数量与记录的出库数量不一致,不与插入
                 if (!myProIn.getOutboundNumber().equals(Double.parseDouble(outboundNumber.toString()))) {
                 if (!myProIn.getOutboundNumber().equals(Double.parseDouble(outboundNumber.toString()))) {
                     error.add(projectId.toString());
                     error.add(projectId.toString());
                     continue;
                     continue;
                 }
                 }
                 String infoW = "";
                 String infoW = "";
+                //判断原因说明有没有填写------------没有填写进行下条数据的
                 if (status.equals("") || status == null) {
                 if (status.equals("") || status == null) {
                     continue;
                     continue;
+                }else if(myProIn.getStatus()!=null){
+
                 } else {
                 } else {
                     material.setProjectId(projectId.toString());
                     material.setProjectId(projectId.toString());
                     material.setInforId(inforId.toString());
                     material.setInforId(inforId.toString());
@@ -360,20 +369,20 @@ public  class ImportInformation {
                 successNum++;
                 successNum++;
                 if (materialList.size() == 1000) {
                 if (materialList.size() == 1000) {
                     materialService.updateStatus(materialList);
                     materialService.updateStatus(materialList);
+                    //根据
                     List<Material> isBack = materialService.findIsBack(materialList);
                     List<Material> isBack = materialService.findIsBack(materialList);
                     for (Material maInfor:isBack) {
                     for (Material maInfor:isBack) {
                         Information upInfor = new Information();
                         Information upInfor = new Information();
                         Information needInfor = materialService.findNeedInfor(maInfor);
                         Information needInfor = materialService.findNeedInfor(maInfor);
-                            if (needInfor.getFirstFinish() == "" || needInfor.getFirstFinish() == null || needInfor.getFirstFinish().equals("否")) {
-                                upInfor.setProjectId(needInfor.getProjectId());
-                                upInfor.setFirstFinish("是");
-                                upInfor.setFirstFinishDate(new Date());
-                            }
-                            if (needInfor.getSecondFinish().equals("否")) {
-                                upInfor.setProjectId(needInfor.getProjectId());
-                                upInfor.setSecondFinish("是");
-                                upInfor.setSecondFinishDate(new Date());
-                            }
+                        if (needInfor.getFirstFinish() == "" || needInfor.getFirstFinish() == null || needInfor.getFirstFinish().equals("否")) {
+                            upInfor.setProjectId(needInfor.getProjectId());
+                            upInfor.setFirstFinish("是");
+                            upInfor.setFirstFinishDate(new Date());
+                        } else  {
+                            upInfor.setProjectId(needInfor.getProjectId());
+                            upInfor.setSecondFinish("是");
+                            upInfor.setSecondFinishDate(new Date());
+                        }
                         materialService.updateNeed(upInfor);
                         materialService.updateNeed(upInfor);
                     }
                     }
                     materialList.clear();
                     materialList.clear();
@@ -389,16 +398,18 @@ public  class ImportInformation {
                 for (Material maInfor:isBack) {
                 for (Material maInfor:isBack) {
                     Information upInfor = new Information();
                     Information upInfor = new Information();
                     Information needInfor = materialService.findNeedInfor(maInfor);
                     Information needInfor = materialService.findNeedInfor(maInfor);
-                    if (needInfor.getFirstFinish() == "" || needInfor.getFirstFinish() == null || needInfor.getFirstFinish().equals("否")) {
+                    if (needInfor.getFirstFinish() == "" || needInfor.getFirstFinish() == null || ("否").equals(needInfor.getFirstFinish())) {
                         upInfor.setProjectId(needInfor.getProjectId());
                         upInfor.setProjectId(needInfor.getProjectId());
                         upInfor.setFirstFinish("是");
                         upInfor.setFirstFinish("是");
                         upInfor.setFirstFinishDate(new Date());
                         upInfor.setFirstFinishDate(new Date());
-                    } else  {
+                    } else if (("是").equals(needInfor.getFirstFinish())) {
+
+                    } else {
                         upInfor.setProjectId(needInfor.getProjectId());
                         upInfor.setProjectId(needInfor.getProjectId());
                         upInfor.setSecondFinish("是");
                         upInfor.setSecondFinish("是");
                         upInfor.setSecondFinishDate(new Date());
                         upInfor.setSecondFinishDate(new Date());
                     }
                     }
-
+                    //根据项目定义号,更新项目是否完成领退料的状态
                     materialService.updateNeed(upInfor);
                     materialService.updateNeed(upInfor);
                 }
                 }
             }
             }

+ 23 - 18
src/main/webapp/webpage/modules/sg/information/informationList.js

@@ -72,55 +72,55 @@ $(document).ready(function() {
 		        field: 'projectId',
 		        field: 'projectId',
 		        title: '项目定义号',
 		        title: '项目定义号',
 		        sortable: true,
 		        sortable: true,
-		        sortName: 'projectId'
+		        sortName: 'project_id'
 		    }
 		    }
 			,{
 			,{
 		        field: 'projectName',
 		        field: 'projectName',
 		        title: '项目名称',
 		        title: '项目名称',
 		        sortable: true,
 		        sortable: true,
-		        sortName: 'projectName'
+		        sortName: 'project_name'
 		    }
 		    }
 			,{
 			,{
 		        field: 'projectType',
 		        field: 'projectType',
 		        title: '项目类型',
 		        title: '项目类型',
 		        sortable: true,
 		        sortable: true,
-		        sortName: 'projectType'
+		        sortName: 'project_type'
 		    }
 		    }
 			,{
 			,{
 		        field: 'projectGrade',
 		        field: 'projectGrade',
 		        title: '电压等级',
 		        title: '电压等级',
 		        sortable: true,
 		        sortable: true,
-		        sortName: 'projectGrade'
+		        sortName: 'project_grade'
 		    }
 		    }
 			,{
 			,{
 		        field: 'projectYear',
 		        field: 'projectYear',
 		        title: '项目预算年度',
 		        title: '项目预算年度',
 		        sortable: true,
 		        sortable: true,
-		        sortName: 'projectYear'
+		        sortName: 'project_year'
 		    }
 		    }
 			,{
 			,{
 		        field: 'projectTotal',
 		        field: 'projectTotal',
 		        title: '项目总投资(元)',
 		        title: '项目总投资(元)',
 		        sortable: true,
 		        sortable: true,
-		        sortName: 'projectTotal'
+		        sortName: 'project_total'
 		    }
 		    }
 				   ,{
 				   ,{
 					   field: 'projectStart',
 					   field: 'projectStart',
 					   title: '实际开工日期',
 					   title: '实际开工日期',
 					   sortable: true,
 					   sortable: true,
-					   sortName: 'projectStart'
+					   sortName: 'project_start'
 				   }
 				   }
 				   ,{
 				   ,{
 					   field: 'projectStop',
 					   field: 'projectStop',
 					   title: '实际竣工日期',
 					   title: '实际竣工日期',
 					   sortable: true,
 					   sortable: true,
-					   sortName: 'projectStop'
+					   sortName: 'project_stop'
 				   }
 				   }
 				   ,{
 				   ,{
 					   field: 'projectFirm',
 					   field: 'projectFirm',
 					   title: '事务所名称',
 					   title: '事务所名称',
 					   sortable: true,
 					   sortable: true,
-					   sortName: 'projectFirm'
+					   sortName: 'project_firm'
 				   }
 				   }
 				   ,{
 				   ,{
 					   field: 'subDate',
 					   field: 'subDate',
@@ -156,13 +156,13 @@ $(document).ready(function() {
 					   field: 'secondUnits',
 					   field: 'secondUnits',
 					   title: '二级单位',
 					   title: '二级单位',
 					   sortable: true,
 					   sortable: true,
-					   sortName: 'secondUnits'
+					   sortName: 'second_units'
 				   }
 				   }
 				   ,{
 				   ,{
 					   field: 'firstUnits',
 					   field: 'firstUnits',
 					   title: '一级单位',
 					   title: '一级单位',
 					   sortable: true,
 					   sortable: true,
-					   sortName: 'firstUnits'
+					   sortName: 'first_units'
 				   }
 				   }
 				   ,{
 				   ,{
 					   field: 'firstFinish',
 					   field: 'firstFinish',
@@ -251,7 +251,7 @@ $(document).ready(function() {
             $('#view,#edit').prop('disabled', $('#informationTable').bootstrapTable('getSelections').length!=1);
             $('#view,#edit').prop('disabled', $('#informationTable').bootstrapTable('getSelections').length!=1);
         });
         });
 
 
-
+		//导入甲供材
 	  	$("#btnInformation").click(function () {
 	  	$("#btnInformation").click(function () {
 			jp.open({
 			jp.open({
 				type: 2,
 				type: 2,
@@ -280,6 +280,7 @@ $(document).ready(function() {
 			})
 			})
 		})
 		})
 
 
+	//导入送审
 	$("#btnInTrial").click(function () {
 	$("#btnInTrial").click(function () {
 		jp.open({
 		jp.open({
 			type: 2,
 			type: 2,
@@ -309,6 +310,8 @@ $(document).ready(function() {
 			}
 			}
 		})
 		})
 	})
 	})
+
+	//导入综合信息
 	$("#btnCom").click(function () {
 	$("#btnCom").click(function () {
 		jp.open({
 		jp.open({
 			type: 2,
 			type: 2,
@@ -336,6 +339,7 @@ $(document).ready(function() {
 		})
 		})
 	})
 	})
 
 
+	//批量查询
     $("#btnSearch").click(function () {
     $("#btnSearch").click(function () {
         jp.open({
         jp.open({
             type: 2,
             type: 2,
@@ -363,6 +367,7 @@ $(document).ready(function() {
         })
         })
     })
     })
 
 
+	//导入原因类型
 	$("#btnInReason").click(function () {
 	$("#btnInReason").click(function () {
 		jp.open({
 		jp.open({
 			type: 2,
 			type: 2,
@@ -390,8 +395,8 @@ $(document).ready(function() {
 		})
 		})
 	})
 	})
 
 
-
-	$("#export").click(function(){//导出物料清单
+//导出物料清单
+	$("#export").click(function(){
 		var projectId = $("#projectId").val();
 		var projectId = $("#projectId").val();
 		var projectName = $("#projectName").val();
 		var projectName = $("#projectName").val();
 		var projectType = $("#projectType").val();
 		var projectType = $("#projectType").val();
@@ -407,8 +412,8 @@ $(document).ready(function() {
 		jp.downloadFile('${ctx}/sg/information/exportMaterial?projectId='+projectId+'&projectName='+projectName+'&projectType='+projectType+'&projectYear='+projectYear+'&firstUnits='+firstUnits+'&secondUnits='+secondUnits);
 		jp.downloadFile('${ctx}/sg/information/exportMaterial?projectId='+projectId+'&projectName='+projectName+'&projectType='+projectType+'&projectYear='+projectYear+'&firstUnits='+firstUnits+'&secondUnits='+secondUnits);
 	});
 	});
 
 
-
-	$("#exportMaterial").click(function(){//导出项目清单
+//导出项目清单
+	$("#exportMaterial").click(function(){
 		var projectId = $("#projectId").val();
 		var projectId = $("#projectId").val();
 		var projectName = $("#projectName").val();
 		var projectName = $("#projectName").val();
 		var projectType = $("#projectType").val();
 		var projectType = $("#projectType").val();
@@ -419,8 +424,8 @@ $(document).ready(function() {
 
 
 	});
 	});
 
 
-
-	$("#exportInformation").click(function(){//导出word
+//导出说明word
+	$("#exportInformation").click(function(){
 		var projectId = $("#projectId").val();
 		var projectId = $("#projectId").val();
 		var projectName = $("#projectName").val();
 		var projectName = $("#projectName").val();
 		var projectType = $("#projectType").val();
 		var projectType = $("#projectType").val();