|
@@ -225,7 +225,7 @@ public class JfGridUpdateService {
|
|
|
columnLen.put("2", 130); //部门
|
|
|
columnLen.put("3", 300); //内容
|
|
|
//数据
|
|
|
- JSONArray cellData = getCellData(paramExcelDto);
|
|
|
+ JSONArray cellData = getCellData(paramExcelDto, columnLen);
|
|
|
//行高
|
|
|
JSONObject rowLenObj = new JSONObject();
|
|
|
rowLenObj.put("0", 24);
|
|
@@ -246,7 +246,7 @@ public class JfGridUpdateService {
|
|
|
* @param paramExcelDto
|
|
|
* @return
|
|
|
*/
|
|
|
- private JSONArray getCellData(ProjectSummaryParamExcelDto paramExcelDto) {
|
|
|
+ private JSONArray getCellData(ProjectSummaryParamExcelDto paramExcelDto, JSONObject columnLen) {
|
|
|
|
|
|
String[] titleFirst = LuckySheet4SummaryHelp.MAIN_TITLE_FIRST;
|
|
|
String[] titleSecond = LuckySheet4SummaryHelp.MAIN_TITLE_SECOND;
|
|
@@ -263,6 +263,10 @@ public class JfGridUpdateService {
|
|
|
|
|
|
String[] colors = LuckySheet4SummaryHelp.MACHINE_COL_BGS;
|
|
|
|
|
|
+ int statusIdx = Arrays.asList(machineTitleCols).indexOf("状态");
|
|
|
+ int departIdx = Arrays.asList(machineTitleCols).indexOf("施工部门");
|
|
|
+ int duDepartIdx = Arrays.asList(machineTitleCols).indexOf("责任部门");
|
|
|
+
|
|
|
//遍历机号
|
|
|
for(int m = 0, n = paramExcelDto.getDeviceNumberList().size(); m < n; m++) {
|
|
|
String color = colors[m % 2];
|
|
@@ -271,6 +275,17 @@ public class JfGridUpdateService {
|
|
|
, titleFirst.length + m * machineTitleCols.length, color));
|
|
|
//机号标题
|
|
|
celldata2.addAll(LuckySheet4SummaryHelp.assembleDeviceNumberSecondTitle(titleFirst.length + m * machineTitleCols.length, color));
|
|
|
+
|
|
|
+ //状态
|
|
|
+ int sttsIdx = titleFirst.length + statusIdx + machineTitleCols.length * m;
|
|
|
+ columnLen.put(String.valueOf(sttsIdx), 45);
|
|
|
+
|
|
|
+ //施工部门
|
|
|
+ int idx = titleFirst.length + departIdx + machineTitleCols.length * m;
|
|
|
+ columnLen.put(String.valueOf(idx), 100);
|
|
|
+ //,责任部门
|
|
|
+ int duIdx = titleFirst.length + duDepartIdx + machineTitleCols.length * m;
|
|
|
+ columnLen.put(String.valueOf(duIdx), 100);
|
|
|
}
|
|
|
|
|
|
celldata1.addAll(LuckySheet4SummaryHelp.assembleCommonRow1Col2(titleFirst.length + paramExcelDto.getDeviceNumberList().size() * machineTitleCols.length));
|