Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c124f9f4fb
|
|
@ -231,7 +231,18 @@ public class PoiOutPage {
|
|||
} else {
|
||||
// 如果没有数据,则仅显示表头
|
||||
// rowNum++;
|
||||
rowNum = createDataRows(sheet, rowNum, result, contentStyle, list.size());
|
||||
// rowNum = createDataRows(sheet, rowNum, result, contentStyle, list.size());
|
||||
HSSFRow row = sheet.createRow(rowNum++);
|
||||
HSSFCell cell = row.createCell(0);
|
||||
cell.setCellStyle(headerStyle);
|
||||
cell.setCellValue("暂无数据");
|
||||
sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (list.size() - 1)));
|
||||
CellRangeAddress cellRange = new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (list.size() - 1));
|
||||
// 设置边框样式
|
||||
RegionUtil.setBorderTop(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderBottom(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderLeft(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderRight(BorderStyle.THIN, cellRange, sheet);
|
||||
}
|
||||
rowNum = createTotalRow(sheet, rowNum, list, totalCost, headerStyle);
|
||||
return workbook;
|
||||
|
|
@ -271,7 +282,18 @@ public class PoiOutPage {
|
|||
} else {
|
||||
// 如果没有数据,则仅显示表头
|
||||
// rowNum++;
|
||||
rowNum = createDataRows(sheet, rowNum, resultLease, contentStyle, listLease.size());
|
||||
// rowNum = createDataRows(sheet, rowNum, resultLease, contentStyle, listLease.size());
|
||||
HSSFRow row = sheet.createRow(rowNum++);
|
||||
HSSFCell cell = row.createCell(0);
|
||||
cell.setCellStyle(headerStyle);
|
||||
cell.setCellValue("暂无数据");
|
||||
sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (listLease.size() - 1)));
|
||||
CellRangeAddress cellRange = new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (listLease.size() - 1));
|
||||
// 设置边框样式
|
||||
RegionUtil.setBorderTop(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderBottom(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderLeft(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderRight(BorderStyle.THIN, cellRange, sheet);
|
||||
}
|
||||
rowNum = createTotalRow(sheet, rowNum, listLease, totalCostLease, headerStyle);
|
||||
|
||||
|
|
@ -288,7 +310,18 @@ public class PoiOutPage {
|
|||
} else {
|
||||
// 如果没有数据,则仅显示表头
|
||||
// rowNum++;
|
||||
rowNum = createDataRows(sheet, rowNum, resultRepair, contentStyle, listRepair.size());
|
||||
// rowNum = createDataRows(sheet, rowNum, resultRepair, contentStyle, listRepair.size());
|
||||
HSSFRow row = sheet.createRow(rowNum++);
|
||||
HSSFCell cell = row.createCell(0);
|
||||
cell.setCellStyle(headerStyle);
|
||||
cell.setCellValue("暂无数据");
|
||||
sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (listRepair.size() - 1)));
|
||||
CellRangeAddress cellRange = new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (listRepair.size() - 1));
|
||||
// 设置边框样式
|
||||
RegionUtil.setBorderTop(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderBottom(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderLeft(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderRight(BorderStyle.THIN, cellRange, sheet);
|
||||
}
|
||||
rowNum = createTotalRow(sheet, rowNum, listRepair, totalCostRepair, headerStyle);
|
||||
|
||||
|
|
@ -305,7 +338,18 @@ public class PoiOutPage {
|
|||
} else {
|
||||
// 如果没有数据,则仅显示表头
|
||||
// rowNum++;
|
||||
rowNum = createDataRows(sheet, rowNum, resultScrap, contentStyle, listScrap.size());
|
||||
// rowNum = createDataRows(sheet, rowNum, resultScrap, contentStyle, listScrap.size());
|
||||
HSSFRow row = sheet.createRow(rowNum++);
|
||||
HSSFCell cell = row.createCell(0);
|
||||
cell.setCellStyle(headerStyle);
|
||||
cell.setCellValue("暂无数据");
|
||||
sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (listScrap.size() - 1)));
|
||||
CellRangeAddress cellRange = new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (listScrap.size() - 1));
|
||||
// 设置边框样式
|
||||
RegionUtil.setBorderTop(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderBottom(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderLeft(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderRight(BorderStyle.THIN, cellRange, sheet);
|
||||
}
|
||||
rowNum = createTotalRow(sheet, rowNum, listScrap, totalCostScrap, headerStyle);
|
||||
|
||||
|
|
@ -322,7 +366,18 @@ public class PoiOutPage {
|
|||
} else {
|
||||
// 如果没有数据,则仅显示表头
|
||||
// rowNum++;
|
||||
rowNum = createDataRows(sheet, rowNum, resultLose, contentStyle, listLose.size());
|
||||
// rowNum = createDataRows(sheet, rowNum, resultLose, contentStyle, listLose.size());
|
||||
HSSFRow row = sheet.createRow(rowNum++);
|
||||
HSSFCell cell = row.createCell(0);
|
||||
cell.setCellStyle(headerStyle);
|
||||
cell.setCellValue("暂无数据");
|
||||
sheet.addMergedRegion(new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (listLose.size() - 1)));
|
||||
CellRangeAddress cellRange = new CellRangeAddress(rowNum - 1, rowNum - 1, 0, (short) (listLose.size() - 1));
|
||||
// 设置边框样式
|
||||
RegionUtil.setBorderTop(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderBottom(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderLeft(BorderStyle.THIN, cellRange, sheet);
|
||||
RegionUtil.setBorderRight(BorderStyle.THIN, cellRange, sheet);
|
||||
}
|
||||
rowNum = createTotalRow(sheet, rowNum, listLose, totalCostLose, headerStyle);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,13 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
import com.bonus.material.push.domain.IwsCostPushBean;
|
||||
import com.bonus.material.push.service.IwsCostPushService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -21,6 +24,7 @@ import java.util.List;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/iws_cost_push")
|
||||
@Validated
|
||||
public class IwsCostPushController extends BaseController {
|
||||
|
||||
@Resource
|
||||
|
|
@ -51,4 +55,16 @@ public class IwsCostPushController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询费用推送审核列表
|
||||
* @param obj 查询条件
|
||||
*/
|
||||
@GetMapping("/getCostPushCheckList")
|
||||
@ApiOperation("查询费用推送审核列表--分页")
|
||||
public TableDataInfo getCostPushCheckList(IwsCostPushBean obj) {
|
||||
startPage();
|
||||
List<IwsCostPushBean> list = iwsCostPushService.getCostPushCheckList(obj);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,11 @@ package com.bonus.material.push.domain;
|
|||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
|
@ -65,6 +68,8 @@ public class IwsCostPushBean implements Serializable {
|
|||
|
||||
private String time;
|
||||
|
||||
// 月份
|
||||
@NotBlank(message = "月份不能为空")
|
||||
private String month;
|
||||
|
||||
private String type;
|
||||
|
|
@ -96,6 +101,9 @@ public class IwsCostPushBean implements Serializable {
|
|||
|
||||
private List<String> ids;
|
||||
|
||||
@ApiModelProperty(value = "审核状态")
|
||||
private Byte checkStatus;
|
||||
|
||||
// 推送备注
|
||||
private String pushRemark;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,4 +24,9 @@ public interface IwsCostPushMapper {
|
|||
* 更新协议push状态
|
||||
*/
|
||||
int updateAgreementIsPush(IwsCostPushBean o);
|
||||
|
||||
/**
|
||||
* 查询费用推送审核数据列表
|
||||
*/
|
||||
List<IwsCostPushBean> getCostPushCheckList(IwsCostPushBean o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,4 +18,9 @@ public interface IwsCostPushService {
|
|||
*/
|
||||
List<IwsCostPushBean> findAgreement(IwsCostPushBean o);
|
||||
|
||||
|
||||
/**
|
||||
* 查询费用推送审核数据列表
|
||||
*/
|
||||
List<IwsCostPushBean> getCostPushCheckList(IwsCostPushBean o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,12 @@ public class IwsCostPushServiceImpl implements IwsCostPushService {
|
|||
public List<IwsCostPushBean> findAgreement(IwsCostPushBean o) {
|
||||
return iwsCostPushMapper.findAgreement(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询费用推送审核数据列表
|
||||
*/
|
||||
@Override
|
||||
public List<IwsCostPushBean> getCostPushCheckList(IwsCostPushBean o) {
|
||||
return iwsCostPushMapper.getCostPushCheckList(o);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,4 +44,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getCostPushCheckList" resultType="com.bonus.material.push.domain.IwsCostPushBean">
|
||||
SELECT
|
||||
pmc.id AS id, pmc.AGREEMENT_ID AS agreementId, IF(ISNULL(pmc.check_status), 0, pmc.check_status) AS checkStatus,
|
||||
pmc.LEASE_MONEY AS leaseMoney, pmc.LOST_MONEY AS lostMoney, pmc.REPAIR_MONEY AS repairMoney, pmc.SCRAP_MONEY AS scrapMoney,
|
||||
bma.agreement_code AS agreementCode, bma.is_slt AS isSettlement,
|
||||
bp.pro_name AS projectName,
|
||||
bu.unit_name AS unitName,
|
||||
ROUND(
|
||||
SUM(ifnull( pmc.LEASE_MONEY, 0 )+ ifnull( pmc.LOST_MONEY, 0 )+ ifnull( pmc.REPAIR_MONEY, 0 )+ ifnull( pmc.SCRAP_MONEY, 0 )), 2
|
||||
) AS money
|
||||
FROM
|
||||
project_month_costs pmc
|
||||
LEFT JOIN bm_agreement_info bma ON pmc.AGREEMENT_ID = bma.agreement_id
|
||||
LEFT JOIN bm_project bp ON bp.pro_id = bma.project_id
|
||||
LEFT JOIN bm_unit bu ON bu.unit_id = bma.unit_id
|
||||
WHERE
|
||||
( pmc.LEASE_MONEY > 0 OR pmc.LOST_MONEY > 0 OR pmc.REPAIR_MONEY > 0 OR pmc.SCRAP_MONEY > 0 )
|
||||
<if test="checkStatus != null">
|
||||
AND pmc.check_status = #{checkStatus}
|
||||
</if>
|
||||
<if test="agreementCode != null and agreementCode != ''">
|
||||
AND bma.agreement_code LIKE CONCAT('%',#{agreementCode},'%')
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND bma.project_id = #{projectId}
|
||||
</if>
|
||||
<if test="unitId != null and unitId != ''">
|
||||
AND bma.unit_id = #{unitId}
|
||||
</if>
|
||||
<if test="isSettlement != null and isSettlement != ''">
|
||||
AND bma.is_slt = #{isSettlement}
|
||||
</if>
|
||||
|
||||
GROUP BY
|
||||
pmc.AGREEMENT_ID
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue