蔡德晨 5 lat temu
rodzic
commit
32938ff5e0

+ 3 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/DataMaintenanceMapper.xml

@@ -51,6 +51,9 @@
                 #{item}
                 </foreach>
 			</if>
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id LIKE CONCAT(CONCAT('%',#{projectId},'%'))
+			</if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">

+ 10 - 11
src/main/java/com/jeeplus/modules/sg/financial/settlement/util/ExcelWriter.java

@@ -87,7 +87,7 @@ public class ExcelWriter {
         sheet.addMergedRegion(new CellRangeAddress(2, 0, 6, 6));
         sheet.addMergedRegion(new CellRangeAddress(2, 0, 7, 7));
         sheet.addMergedRegion(new CellRangeAddress(2, 0, 8, 8));
-        sheet.addMergedRegion(new CellRangeAddress(0, 0, 9, 18));
+        sheet.addMergedRegion(new CellRangeAddress(0, 0, 9, 19));
         sheet.addMergedRegion(new CellRangeAddress(2, 1, 9, 9));
         sheet.addMergedRegion(new CellRangeAddress(2, 1, 10, 10));
         sheet.addMergedRegion(new CellRangeAddress(2, 1, 11, 11));
@@ -493,25 +493,21 @@ public class ExcelWriter {
         }
         cell = row.createCell(cellNum++);
         cell.setCellStyle(styles.get("data"));
-        if (null != maintainData.getTotalFee()) {
-            cell.setCellValue(maintainData.getDesignFee()+maintainData.getSupervisionFee()+maintainData.getPreliminaryWorkFee()
+        cell.setCellValue(maintainData.getDesignFee()+maintainData.getSupervisionFee()+maintainData.getPreliminaryWorkFee()
                               +maintainData.getDamages()+maintainData.getManagementFee());
-        } else {
-            cell.setCellValue("");
-        }
+
         cell = row.createCell(cellNum++);
         cell.setCellStyle(styles.get("data"));
-        if (null != maintainData.getTotalFee()) {
-            cell.setCellValue(maintainData.getDesignFee()+maintainData.getSupervisionFee()+maintainData.getPreliminaryWorkFee()
+        cell.setCellValue(maintainData.getDesignFee()+maintainData.getSupervisionFee()+maintainData.getPreliminaryWorkFee()
                     +maintainData.getDamages()+maintainData.getManagementFee()+maintainData.getBuildingFee()+maintainData.getInstallFee()
                     +maintainData.getEquipmentFee()+maintainData.getMaterialFee());
-        } else {
-            cell.setCellValue("");
-        }
 
     }
 
     private static Sheet buildHerd(Workbook workbook) {
+        CellStyle style = workbook.createCellStyle();
+        style.setBorderLeft(CellStyle.BORDER_THIN);
+        style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
         Sheet sheet = workbook.createSheet();
         // 设置列头宽度
 //        for (int i=0; i<CELL_HEADS.size(); i++) {
@@ -613,6 +609,9 @@ public class ExcelWriter {
         Cell cellp = row2.createCell(17);
         cellp.setCellValue("");
         cellp.setCellStyle(styles.get("header"));
+        Cell cellq = row1.createCell(17);
+        cellq.setCellValue("");
+        cellq.setCellStyle(styles.get("header"));
 
         Cell celle = row3.createCell(0);
         celle.setCellValue("");

+ 5 - 1
src/main/java/com/jeeplus/modules/sg/financial/settlement/web/DataMaintenanceController.java

@@ -89,7 +89,11 @@ public class DataMaintenanceController extends BaseController {
 		}
 		if(StringUtils.isNotBlank(st)){
 			String[] sts = st.split("\\s+");
-			maintainData.setProjectIds(sts);
+			if(sts.length == 1){
+			    maintainData.setProjectId(sts[0]);
+            }else {
+                maintainData.setProjectIds(sts);
+            }
 		}
 		Page<MaintainData> page = dataMaintenanceService.findPage(new Page<MaintainData>(request, response), maintainData);
 		return getBootstrapData(page);