|
@@ -25,6 +25,16 @@ public class LuckySheet4SummaryHelp {
|
|
|
*/
|
|
|
public static final String[] MAIN_TITLE_SECOND = {"总状态","提出日期","整改期限","提出者","备注1","备注2"};
|
|
|
|
|
|
+ /**
|
|
|
+ * 列背景色
|
|
|
+ */
|
|
|
+ public static final String[] COL_BGS = {"#3366ff", "#ccffcc" };
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 机号背景色
|
|
|
+ */
|
|
|
+ public static final String[] MACHINE_COL_BGS = {"#ffd9ff", "#ffffcc"};
|
|
|
+
|
|
|
/**
|
|
|
* {
|
|
|
* "c": 0,
|
|
@@ -65,7 +75,7 @@ public class LuckySheet4SummaryHelp {
|
|
|
.rowSize(1)
|
|
|
.colSize(colSize)
|
|
|
.value(fileName)
|
|
|
- .bg("#3366ff")
|
|
|
+ .bg(COL_BGS[0])
|
|
|
.build();
|
|
|
return assembleMergeTitle(cellParam);
|
|
|
}
|
|
@@ -112,7 +122,7 @@ public class LuckySheet4SummaryHelp {
|
|
|
JSONObject remark2v = new JSONObject();
|
|
|
// remark2v.put("m", MAIN_TITLE_FIRST[m]);
|
|
|
// remark2v.put("v", MAIN_TITLE_FIRST[m]);
|
|
|
- remark2v.put("bg", "#ccffcc");
|
|
|
+ remark2v.put("bg", COL_BGS[1]);
|
|
|
remark2v.put("bl", 1);
|
|
|
remark2v.put("fc", "rgb(0, 0, 0)");
|
|
|
remark2v.put("ff", 5);
|
|
@@ -656,6 +666,29 @@ public class LuckySheet4SummaryHelp {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ JSONObject content = new JSONObject();
|
|
|
+ content.put("rangeType", "range");
|
|
|
+ content.put("borderType", "border-all");
|
|
|
+ content.put("style", 1);
|
|
|
+ content.put("color", "#000");
|
|
|
+
|
|
|
+ JSONObject contentRange = new JSONObject();
|
|
|
+ JSONArray rowArray = new JSONArray();
|
|
|
+ rowArray.add(3);
|
|
|
+ rowArray.add(999);
|
|
|
+ contentRange.put("row", rowArray);
|
|
|
+
|
|
|
+ JSONArray colArray = new JSONArray();
|
|
|
+ colArray.add(0);
|
|
|
+ colArray.add(colsSize - 1);
|
|
|
+ contentRange.put("column", colArray);
|
|
|
+
|
|
|
+ JSONArray rangArray = new JSONArray();
|
|
|
+ rangArray.add(contentRange);
|
|
|
+ content.put("range", rangArray);
|
|
|
+
|
|
|
+ result.add(content);
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -728,6 +761,12 @@ public class LuckySheet4SummaryHelp {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 数组验证 下拉框
|
|
|
+ *
|
|
|
+ * @param options
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public static JSONObject getNewDataVerification(String options) {
|
|
|
JSONObject departObj = new JSONObject();
|
|
|
departObj.put("type", "dropdown");
|
|
@@ -740,4 +779,61 @@ public class LuckySheet4SummaryHelp {
|
|
|
departObj.put("prohibitInput", false);
|
|
|
return departObj;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 初始化行数据
|
|
|
+ *
|
|
|
+ * @param rowStart
|
|
|
+ * @param rowSize
|
|
|
+ * @param paramExcelDto
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static JSONArray getCellData4Row3ToMore(int rowStart, int rowSize, ProjectSummaryParamExcelDto paramExcelDto) {
|
|
|
+ JSONArray celldatas = new JSONArray();
|
|
|
+
|
|
|
+ for(int m = rowStart, n = rowSize; m < n; m++) {
|
|
|
+
|
|
|
+ //自动换行
|
|
|
+ //部位
|
|
|
+ JSONObject positionCell = new JSONObject();
|
|
|
+ positionCell.put("r", m);
|
|
|
+ positionCell.put("c", 2);
|
|
|
+
|
|
|
+ JSONObject positionCellV = new JSONObject();
|
|
|
+ positionCellV.put("tb", 2);
|
|
|
+ positionCell.put("v", positionCellV);
|
|
|
+ celldatas.add(positionCell);
|
|
|
+
|
|
|
+ //内容
|
|
|
+ JSONObject contentCell = new JSONObject();
|
|
|
+ contentCell.put("r", m);
|
|
|
+ contentCell.put("c", 3);
|
|
|
+
|
|
|
+ JSONObject contentCellV = new JSONObject();
|
|
|
+ contentCellV.put("tb", 2); //自动换行
|
|
|
+ contentCell.put("v", contentCellV);
|
|
|
+ celldatas.add(contentCell);
|
|
|
+
|
|
|
+ String[] colors = MACHINE_COL_BGS;
|
|
|
+
|
|
|
+ //机号列颜色设置
|
|
|
+ for(int h = 0, k = paramExcelDto.getDeviceNumberList().size(); h < k; h++) {
|
|
|
+ String color = colors[h % 2];
|
|
|
+
|
|
|
+ for(int i = 0; i < MACHINE_TITLE_COLS.length; i++) {
|
|
|
+ JSONObject machineContentCell = new JSONObject();
|
|
|
+ machineContentCell.put("r", m);
|
|
|
+ machineContentCell.put("c", MAIN_TITLE_FIRST.length + MACHINE_TITLE_COLS.length * h + i);
|
|
|
+
|
|
|
+ JSONObject machineContentCellV = new JSONObject();
|
|
|
+ machineContentCellV.put("bg", color);
|
|
|
+ machineContentCell.put("v", machineContentCellV);
|
|
|
+ celldatas.add(machineContentCell);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return celldatas;
|
|
|
+ }
|
|
|
}
|