tudc 5 anos atrás
pai
commit
4f542c842b

+ 1 - 0
src/main/java/com/minpay/common/service/IReportService.java

@@ -21,4 +21,5 @@ public interface IReportService extends IMINLocalService, IMINInitializer {
 	public Map<String,Object> reportNeedDetail(Map<String, Object> param) throws MINBusinessException, ParseException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException,InvalidFormatException, IOException;
 	public Map<String, Object> reportTypeDDYZLFXB(String range, String reportTypeId, int page, int limit) throws MINBusinessException, ParseException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException;
 	public void reflush();
+	public String getSystemCode();
 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 434 - 1018
src/main/java/com/minpay/common/service/impl/ReportServiceImpl.java


+ 18 - 2
src/main/java/com/minpay/reportManage/action/TQTDReportAction.java

@@ -311,18 +311,32 @@ public class TQTDReportAction implements IMINAction {
         MINActionResult res = new MINActionResult();
         db = Service.lookup(IMINDataBaseService.class);
         PubAppparExample appparExample = new PubAppparExample();
-		appparExample.createCriteria().andCodeEqualTo("tqtd_num");
+        String systemCode = Service.lookup(IReportService.class).getSystemCode();
+		appparExample.createCriteria().andCodeEqualTo("tqtd_num_" + systemCode);
 		List<PubApppar> appparList = db.selectByExample(PubAppparMapper.class, appparExample);
 		List<Map<String, String>> resList = new ArrayList<Map<String, String>>();
 		Map<String, String> resMap = new HashMap<String, String>();
 		resList.add(resMap);
 		String hejiNum = "0";
+		
+		List<Map<String, Object>> col = new ArrayList<Map<String, Object>>();
 		for (PubApppar pub : appparList) {
 			resMap.put(pub.getValue(), pub.getShowmsg());
 			hejiNum = CommonUtil.add(hejiNum, pub.getShowmsg());
+			
+			Map<String, Object> colMap = new HashMap<String, Object>();
+			colMap.put("field", pub.getValue());
+			colMap.put("title", pub.getValue());
+			colMap.put("edit", "text");
+			col.add(colMap);
 		}
+		Map<String, Object> colHejiMap = new HashMap<String, Object>();
+		colHejiMap.put("field", "合计");
+		colHejiMap.put("title", "合计");
+		col.add(colHejiMap);
 		resMap.put("合计", hejiNum);
 		res.set(IMINBusinessConstant.F_PAGING_LAY, resList);
+		res.set("col", col);
 		return res;
     }
     
@@ -333,10 +347,12 @@ public class TQTDReportAction implements IMINAction {
     		MINSession session
     		) throws MINBusinessException {
     	MINActionResult res = new MINActionResult();
+    	
+    	String systemCode = Service.lookup(IReportService.class).getSystemCode();
     	// 修改数据库数据
     	db = Service.lookup(IMINDataBaseService.class);
     	PubApppar apppar = new PubApppar();
-    	apppar.setCode("tqtd_num");
+    	apppar.setCode("tqtd_num_"+systemCode);
     	apppar.setValue(field);
     	apppar.setShowmsg(value);
     	db.updateByPrimaryKeySelective(PubAppparMapper.class, apppar);

+ 4 - 4
src/main/webapp/admin/ddy/reportProduceRb.html

@@ -56,9 +56,9 @@
 			</div>
 		</form>
 	</div>
-	<div name = "step" style = "width: 80%; margin-left : 10%;height : 300px; display : none; text-align : center;">
+	<div name = "step" style = "width: 100%; height : 300px; display : none; text-align : center;">
 		<form class="layui-form" style = "text-align : center;">
-			<div style = "width: 80%; margin-left : 0px; height : 200px" class = "layui-upload-drag" >
+			<div style = "width: 100%; margin-left : 0px; height : 200px" class = "layui-upload-drag" >
 				<input type="text" class="layui-input" id="yearChoose" placeholder="yyyy" style="padding-left: 10px;display: inherit;">
 				<div id = "DdyDateRange" class="layui-inline">
 				</div>
@@ -69,8 +69,8 @@
 		    </div>
 	    </form>
 	</div>
-	<div name = "step" style = "width: 80%; margin-left : 10%; height : 300px; display : none; text-align : center;">
-		<div style = "width: 80%; margin-left : 0px;" class = "layui-upload-drag" >
+	<div name = "step" style = "width: 100%; height : 300px; display : none; text-align : center;">
+		<div style = "width: 100%; margin-left : 0px;" class = "layui-upload-drag" >
 		  <p id = "fileName" contenteditable="true">国网泰安供电公司2020年8月份配网运行分析月报</p>
 		  <table id = "reportTable" class="layui-table">
 		  </table>

+ 61 - 49
src/main/webapp/admin/tqtd/areaNumManage.html

@@ -13,57 +13,69 @@
 	<script>
 	var pageId = "220003";
 	
+	$.request({
+		action : 'TQTDReportAction/areaNumManage',
+		data : {},
+		success : function(data) {
+			var tableData = data.data;
+			var col = data.col;
+			var clos = [];
+			clos.push(col);
+			
+		     layui.use(['table'], function(){
+				  table = layui.table;
+				  
+				  // 加载数据
+				  table.render({
+					id: 'tableTest'
+				    ,elem: '#tableTest'
+				    ,limit:1
+				    ,data: tableData
+				    ,page: false
+				    ,cols: clos
+				    ,done: function(res, curr, count){
+				    }
+				    ,even: true //开启隔行背景
+				  });
+				  
+				  table.on('edit(tableFilter)', function(obj){
+						var value = obj.value //得到修改后的值
+						,data = obj.data //得到所在行所有键值
+						,field = obj.field; //得到字段
+				    	$.request({
+								action : 'TQTDReportAction/areaNumUpdate',
+								data : {
+									field : field,
+									value : value
+								},
+								success : function(data) {
+									console.log(data);
+									$.request({
+										action : 'TQTDReportAction/areaNumManage',
+										data : {},
+										success : function(data) {
+											var tableData = data.data;
+											table.reload('tableTest',{
+												data : tableData
+											});
+										}
+									})
+								},
+								error : function(data2) {
+									$.ErrorAlert(data2.MINErrorMessage);
+								}
+					  	});
+				  });
+			 });
+		},
+		error : function(data2) {
+			$.ErrorAlert(data2.MINErrorMessage);
+		}
+	});
+	
      var table;
      var form;
-     layui.use(['table'], function(){
-		  table = layui.table;
-		  
-		  // 加载数据
-		  table.render({
-			id: 'tableTest'
-		    ,elem: '#tableTest'
-		    ,limit:1
-		    ,url: 'TQTDReportAction/areaNumManage' //数据接口
-		    ,method: 'post'
-		    ,where:{MINView:"JSON"}
-		    ,page: false
-		    ,cols: [[ //表头
-		      {field: '新泰', title: '新泰', width:'10%', edit : "text"}
-		      ,{field: '岱岳', title: '岱岳', width:'10%', edit : "text"}
-		      ,{field: '宁阳', title: '宁阳', width:'10%', edit : "text"}
-		      ,{field: '泰山', title: '泰山', width:'10%', edit : "text"}
-		      ,{field: '东平', title: '东平', width:'10%', edit : "text"}
-		      ,{field: '肥城', title: '肥城', width:'10%', edit : "text"}
-		      ,{field: '泰山景区', title: '泰山景区', width:'10%', edit : "text"}
-		      ,{field: '高新', title: '高新', width:'10%', edit : "text"}
-		      ,{field: '合计', title: '合计', width:'10%'}
-		    ]]
-		    ,done: function(res, curr, count){
-		    }
-		    ,even: true //开启隔行背景
-		  });
-		  
-		  table.on('edit(tableFilter)', function(obj){
-				var value = obj.value //得到修改后的值
-				,data = obj.data //得到所在行所有键值
-				,field = obj.field; //得到字段
-		    	$.request({
-						action : 'TQTDReportAction/areaNumUpdate',
-						data : {
-							field : field,
-							value : value
-						},
-						success : function(data) {
-							console.log(data);
-							table.reload('tableTest', {
-				 		     });
-						},
-						error : function(data2) {
-							$.ErrorAlert(data2.MINErrorMessage);
-						}
-			  	});
-		  });
-	 });
+
       
     </script>
 </body>

+ 2 - 0
src/main/webapp/admin/tqtd/reportProduceTqtd.html

@@ -368,6 +368,8 @@
 								var replaceStr = "${" + key + "}";
 								if (key == "totalCountTwice") {
 									descStr = descStr.replace(/\${totalCountTwice}/g, dataMap[key]);
+								} else if (key == "shejiNum") {
+									descStr = descStr.replace(/\${shejiNum}/g, dataMap[key]);
 								} else {
 									descStr = descStr.replace(replaceStr, dataMap[key]);
 								}