Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
821883ad8d
|
|
@ -3,6 +3,7 @@ package com.bonus.common.biz.config;
|
|||
import org.apache.poi.hssf.usermodel.*;
|
||||
import org.apache.poi.ss.usermodel.BorderStyle;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.RegionUtil;
|
||||
|
|
@ -52,6 +53,14 @@ public class PoiOutPage {
|
|||
return workbook;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建标题行
|
||||
* @param sheet
|
||||
* @param titleStyle
|
||||
* @param filename
|
||||
* @param nColumn
|
||||
* @return
|
||||
*/
|
||||
private static int createTitleRow(HSSFSheet sheet, HSSFCellStyle titleStyle, String filename, int nColumn) {
|
||||
HSSFRow row = sheet.createRow(0);
|
||||
row.setHeightInPoints(30);
|
||||
|
|
@ -62,6 +71,14 @@ public class PoiOutPage {
|
|||
return 1; // 下一行是表头
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建表头行
|
||||
* @param sheet
|
||||
* @param headerStyle
|
||||
* @param list
|
||||
* @param rowNum
|
||||
* @return
|
||||
*/
|
||||
private static int createHeaderRow(HSSFSheet sheet, HSSFCellStyle headerStyle, List<String> list, int rowNum) {
|
||||
HSSFRow row = sheet.createRow(rowNum);
|
||||
row.setHeightInPoints(20);
|
||||
|
|
@ -74,6 +91,14 @@ public class PoiOutPage {
|
|||
return rowNum + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 填充数据行
|
||||
* @param sheet
|
||||
* @param result
|
||||
* @param contentStyle
|
||||
* @param nColumn
|
||||
* @param rowNum
|
||||
*/
|
||||
private static void createDataRows(HSSFSheet sheet, List<Map<String, Object>> result, HSSFCellStyle contentStyle, int nColumn, int rowNum) {
|
||||
for (Map<String, Object> resultRow : result) {
|
||||
List<Object> rowData = map2List(resultRow);
|
||||
|
|
@ -104,6 +129,12 @@ public class PoiOutPage {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置单元格数据
|
||||
* @param cell
|
||||
* @param contentStyle
|
||||
* @param data
|
||||
*/
|
||||
private static void setCellValue(HSSFCell cell, HSSFCellStyle contentStyle, Object data) {
|
||||
if (isNumeric(data)) {
|
||||
contentStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));
|
||||
|
|
@ -115,6 +146,14 @@ public class PoiOutPage {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建一个空的工作表
|
||||
* @param sheet
|
||||
* @param list
|
||||
* @param titleStyle
|
||||
* @param headerStyle
|
||||
* @param filename
|
||||
*/
|
||||
private static void createEmptySheet(HSSFSheet sheet, List<String> list, HSSFCellStyle titleStyle, HSSFCellStyle headerStyle, String filename) {
|
||||
int nColumn = list.size();
|
||||
int rowNum = createTitleRow(sheet, titleStyle, filename, nColumn);
|
||||
|
|
@ -275,8 +314,12 @@ public class PoiOutPage {
|
|||
return list;
|
||||
}
|
||||
|
||||
// 以下是创建样式的方法(可根据需要调整)
|
||||
|
||||
/**
|
||||
* 创建标题样式
|
||||
* @param workbook
|
||||
* @return
|
||||
*/
|
||||
private static HSSFCellStyle createTitleStyle(HSSFWorkbook workbook) {
|
||||
HSSFCellStyle style = workbook.createCellStyle();
|
||||
style.setAlignment(HorizontalAlignment.CENTER);
|
||||
|
|
@ -288,24 +331,61 @@ public class PoiOutPage {
|
|||
return style;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建表头样式
|
||||
* @param workbook
|
||||
* @return
|
||||
*/
|
||||
private static HSSFCellStyle createHeaderStyle(HSSFWorkbook workbook) {
|
||||
HSSFCellStyle style = workbook.createCellStyle();
|
||||
style.setAlignment(HorizontalAlignment.CENTER);
|
||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
HSSFFont font = workbook.createFont();
|
||||
font.setBold(true);
|
||||
font.setFontHeightInPoints((short) 12);
|
||||
font.setFontHeightInPoints((short) 10);
|
||||
style.setFont(font);
|
||||
|
||||
// 设置边框
|
||||
style.setBorderTop(BorderStyle.THIN);
|
||||
style.setBorderBottom(BorderStyle.THIN);
|
||||
style.setBorderLeft(BorderStyle.THIN);
|
||||
style.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
// 设置边框颜色为黑色
|
||||
style.setTopBorderColor(IndexedColors.BLACK.getIndex());
|
||||
style.setBottomBorderColor(IndexedColors.BLACK.getIndex());
|
||||
style.setLeftBorderColor(IndexedColors.BLACK.getIndex());
|
||||
style.setRightBorderColor(IndexedColors.BLACK.getIndex());
|
||||
|
||||
return style;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建内容样式
|
||||
* @param workbook
|
||||
* @return
|
||||
*/
|
||||
private static HSSFCellStyle createCellStyle(HSSFWorkbook workbook) {
|
||||
|
||||
HSSFCellStyle style = workbook.createCellStyle();
|
||||
style.setAlignment(HorizontalAlignment.CENTER);
|
||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
HSSFFont font = workbook.createFont();
|
||||
font.setFontHeightInPoints((short) 10);
|
||||
style.setFont(font);
|
||||
|
||||
// 设置边框
|
||||
style.setBorderTop(BorderStyle.THIN);
|
||||
style.setBorderBottom(BorderStyle.THIN);
|
||||
style.setBorderLeft(BorderStyle.THIN);
|
||||
style.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
// 设置边框颜色为黑色
|
||||
style.setTopBorderColor(IndexedColors.BLACK.getIndex());
|
||||
style.setBottomBorderColor(IndexedColors.BLACK.getIndex());
|
||||
style.setLeftBorderColor(IndexedColors.BLACK.getIndex());
|
||||
style.setRightBorderColor(IndexedColors.BLACK.getIndex());
|
||||
|
||||
return style;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public class ComplexQueryController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--查询在库机具设备详情")
|
||||
@GetMapping("/exportStorageInfoList")
|
||||
@PostMapping("/exportStorageInfoList")
|
||||
public void exportStorageInfoList(HttpServletResponse response, StorageInfo bean) {
|
||||
List<StorageInfo> list = complexQueryService.getMaCodeList(bean);
|
||||
ExcelUtil<StorageInfo> util = new ExcelUtil<>(StorageInfo.class);
|
||||
|
|
@ -127,7 +127,7 @@ public class ComplexQueryController extends BaseController {
|
|||
* @param bean
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--导出在用设备详情")
|
||||
@GetMapping("/exportUserRecordList")
|
||||
@PostMapping("/exportUserRecordList")
|
||||
public void exportUserRecordList(HttpServletResponse response, UseStorageInfo bean) {
|
||||
List<UseStorageInfo> list = complexQueryService.getUserRecords(bean);
|
||||
ExcelUtil<UseStorageInfo> util = new ExcelUtil<>(UseStorageInfo.class);
|
||||
|
|
@ -153,7 +153,7 @@ public class ComplexQueryController extends BaseController {
|
|||
* @param bean
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--导出在修设备详情")
|
||||
@GetMapping("/exportRepairRecordList")
|
||||
@PostMapping("/exportRepairRecordList")
|
||||
public void exportRepairRecordList(HttpServletResponse response, RepairStorageInfo bean) {
|
||||
List<RepairStorageInfo> list = complexQueryService.getRepairRecordList(bean);
|
||||
ExcelUtil<RepairStorageInfo> util = new ExcelUtil<>(RepairStorageInfo.class);
|
||||
|
|
@ -179,7 +179,7 @@ public class ComplexQueryController extends BaseController {
|
|||
* @param bean
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--导出新购待入库详情")
|
||||
@GetMapping("/exportPurchaseRecordList")
|
||||
@PostMapping("/exportPurchaseRecordList")
|
||||
public void exportPurchaseRecordList(HttpServletResponse response, PurchaseInputInfo bean) {
|
||||
List<PurchaseInputInfo> list = complexQueryService.getPurchaseRecordList(bean);
|
||||
ExcelUtil<PurchaseInputInfo> util = new ExcelUtil<>(PurchaseInputInfo.class);
|
||||
|
|
@ -205,7 +205,7 @@ public class ComplexQueryController extends BaseController {
|
|||
* @param bean
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--导出修饰待入库详情")
|
||||
@GetMapping("/exportRepairInputList")
|
||||
@PostMapping("/exportRepairInputList")
|
||||
public void exportRepairInputList(HttpServletResponse response, RepairInputRecord bean) {
|
||||
List<RepairInputRecord> list = complexQueryService.getRepairInputList(bean);
|
||||
ExcelUtil<RepairInputRecord> util = new ExcelUtil<>(RepairInputRecord.class);
|
||||
|
|
|
|||
|
|
@ -88,6 +88,9 @@ public class BmQrBoxInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "状态--DTO请求参数,用作多状态查询拼接")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "状态名称")
|
||||
private String statusName;
|
||||
|
||||
@ApiModelProperty(value = "移交人用户ID,")
|
||||
private Long transferUser;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,8 +58,10 @@ public class PurchaseInputInfo {
|
|||
|
||||
@ApiModelProperty(value = "新购待入库单号")
|
||||
@Excel(name = "新购待入库单号")
|
||||
private String purchaseCode;
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
||||
private String manageType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class RepairInputRecord {
|
|||
|
||||
@ApiModelProperty(value = "修饰待入库单号")
|
||||
@Excel(name = "修饰待入库单号")
|
||||
private String repairInputCode;
|
||||
private String inputCode;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class UseStorageInfo {
|
|||
|
||||
@ApiModelProperty(value = "领料单号")
|
||||
@Excel(name = "领料单号")
|
||||
private String leaseCode;
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.material.basic.service.impl;
|
|||
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import com.bonus.common.biz.enums.MaTypeManageTypeEnum;
|
||||
import com.bonus.material.basic.domain.*;
|
||||
import com.bonus.material.basic.mapper.ComplexQueryMapper;
|
||||
import com.bonus.material.basic.service.ComplexQueryService;
|
||||
|
|
@ -321,7 +322,19 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
|||
public List<PurchaseInputInfo> getPurchaseRecordList(PurchaseInputInfo bean) {
|
||||
List<PurchaseInputInfo> recordList = complexQueryMapper.getPurchaseRecordList(bean);
|
||||
List<PurchaseInputInfo> tempList = new ArrayList<>();
|
||||
|
||||
if (CollectionUtils.isNotEmpty(recordList)) {
|
||||
if (MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId().toString().equals(recordList.get(0).getManageType())) {
|
||||
if (StringUtils.isNotBlank(bean.getKeyWord())) {
|
||||
String keyword = bean.getKeyWord();
|
||||
return recordList.stream().filter(item -> {
|
||||
return (StringUtils.isNotBlank(item.getCode()) && item.getCode().contains(keyword)) ||
|
||||
(StringUtils.isNotBlank(item.getTypeName()) && item.getTypeName().contains(keyword)) ||
|
||||
(StringUtils.isNotBlank(item.getTypeModelName()) && item.getTypeModelName().contains(keyword)) ||
|
||||
(StringUtils.isNotBlank(item.getMaKeeper()) && item.getMaKeeper().contains(keyword));
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
return recordList;
|
||||
} else {
|
||||
Iterator<PurchaseInputInfo> iterator = recordList.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
PurchaseInputInfo purchaseInputInfo = iterator.next();
|
||||
|
|
@ -351,12 +364,15 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(bean.getKeyWord())) {
|
||||
String keyword = bean.getKeyWord();
|
||||
return tempList.stream().filter(item -> {
|
||||
return (StringUtils.isNotBlank(item.getMaCode()) && item.getMaCode().contains(keyword)) ||
|
||||
(StringUtils.isNotBlank(item.getTypeName()) && item.getTypeName().contains(keyword)) ||
|
||||
(StringUtils.isNotBlank(item.getTypeModelName()) && item.getTypeModelName().contains(keyword)) ||
|
||||
(StringUtils.isNotBlank(item.getCode()) && item.getCode().contains(keyword)) ||
|
||||
(StringUtils.isNotBlank(item.getMaKeeper()) && item.getMaKeeper().contains(keyword));
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
package com.bonus.material.lease.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author ma_sh
|
||||
|
|
@ -49,12 +46,10 @@ public class LeaseOutVo {
|
|||
private String holdingTime;
|
||||
|
||||
@ApiModelProperty("试验日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date testTime;
|
||||
private String testTime;
|
||||
|
||||
@ApiModelProperty("下次试验日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date nextTestTime;
|
||||
private String nextTestTime;
|
||||
|
||||
@ApiModelProperty("验收结论")
|
||||
private String checkResult;
|
||||
|
|
|
|||
|
|
@ -375,11 +375,12 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
String fileName = "施工机具设备出库检验记录表";
|
||||
String projectName = "";
|
||||
String unit = "";
|
||||
List<LeaseOutVo> list = new ArrayList<>();
|
||||
if (leaseApplyRequestVo != null && leaseApplyRequestVo.getLeaseApplyInfo() != null) {
|
||||
projectName ="领用工程:" + leaseApplyRequestVo.getLeaseApplyInfo().getProjectName();
|
||||
projectName ="领用工程:" + leaseApplyRequestVo.getLeaseApplyInfo().getLeaseProject();
|
||||
unit ="使用单位:" + leaseApplyRequestVo.getLeaseApplyInfo().getLeaseUnit();
|
||||
list = leaseApplyRequestVo.getLeaseOutVoList();
|
||||
}
|
||||
List<LeaseOutVo> list = leaseApplyRequestVo.getLeaseOutVoList();
|
||||
expOutExcel(response,list,fileName,projectName,unit);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
|
|
|
|||
|
|
@ -562,7 +562,9 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
List<RepairInputDetails> inputList = new ArrayList<>();
|
||||
for (RepairAuditDetails details : repairAuditDetailsByQuery) {
|
||||
//修改机具状态
|
||||
if (details.getMaId() != null) {
|
||||
repairAuditDetailsMapper.updateMachine(details);
|
||||
}
|
||||
RepairInputDetails inputVo = new RepairInputDetails();
|
||||
BeanUtils.copyProperties(details, inputVo);
|
||||
inputVo.setRepairNum(details.getRepairedNum());
|
||||
|
|
|
|||
|
|
@ -20,6 +20,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bqb.box_code as boxCode,
|
||||
bqb.box_type as boxType,
|
||||
bqb.box_status as status,
|
||||
case bqb.box_status
|
||||
when '0' then '待创建'
|
||||
when '1' then '待录入'
|
||||
when '2' then '待移交'
|
||||
when '3' then '待接收'
|
||||
when '4' then '已接收'
|
||||
when '5' then '移交被驳回'
|
||||
else ''
|
||||
end as statusName,
|
||||
bqb.create_by as createBy,
|
||||
bqb.create_time as createTime,
|
||||
bqb.update_by as updateBy,
|
||||
|
|
|
|||
|
|
@ -489,6 +489,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||
WHERE IFNULL(pcd.check_num, 0) - IFNULL(pcd.input_num, 0) > 0
|
||||
and pcd.status in (3,4, 13,14)
|
||||
GROUP BY
|
||||
mt.type_id) AS subquery4 ON subquery4.type_id = mt.type_id
|
||||
LEFT JOIN (
|
||||
|
|
@ -571,7 +572,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt.buy_price AS buyPrice,
|
||||
sai.num AS usNum,
|
||||
mm.ma_code AS maCode,
|
||||
lai.`code` AS leaseCode,
|
||||
lai.`code` AS code,
|
||||
GROUP_CONCAT(DISTINCT su.nick_name ORDER BY su.nick_name SEPARATOR ', ') AS maKeeper,
|
||||
lod.create_by AS creator,
|
||||
lod.create_time AS outTime
|
||||
|
|
@ -648,9 +649,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt.type_name AS typeModelName,
|
||||
mt.buy_price AS buyPrice,
|
||||
IFNULL( pcd.check_num, 0 ) - IFNULL( pcd.input_num, 0 ) AS inputNum,
|
||||
tt.`code` AS purchaseCode,
|
||||
tt.`code` AS code,
|
||||
GROUP_CONCAT( DISTINCT su.nick_name ORDER BY su.nick_name SEPARATOR ', ' ) AS maKeeper,
|
||||
pcd.check_time AS checkTime
|
||||
pcd.check_time AS checkTime,
|
||||
mt.manage_type as manageType
|
||||
FROM
|
||||
purchase_check_details pcd
|
||||
LEFT JOIN ma_type mt ON mt.type_id = pcd.type_id
|
||||
|
|
@ -673,7 +675,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt.type_name AS typeModelName,
|
||||
mt.buy_price AS buyPrice,
|
||||
IFNULL(rid.repair_num, 0) - IFNULL(rid.input_num, 0) AS repairInputNum,
|
||||
tt.`code` AS repairInputCode,
|
||||
tt.`code` AS inputCode,
|
||||
GROUP_CONCAT(DISTINCT su.nick_name ORDER BY su.nick_name SEPARATOR ', ') AS maKeeper,
|
||||
GROUP_CONCAT(DISTINCT su2.nick_name ORDER BY su2.nick_name SEPARATOR ', ') AS repairer,
|
||||
rid.create_time as repairInputTime,
|
||||
|
|
|
|||
|
|
@ -280,10 +280,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt.rated_load AS ratedLoad,
|
||||
mt.test_load AS testLoad,
|
||||
mt.holding_time AS holdingTime,
|
||||
lod.create_time AS testTime,
|
||||
DATE(lod.create_time) AS testTime,
|
||||
pcd.check_result AS checkResult,
|
||||
lad.remark AS remark,
|
||||
DATE_SUB(DATE_ADD(lod.create_time, INTERVAL 1 YEAR), INTERVAL 1 DAY) AS nextTestTime -- 计算 nextTestTime
|
||||
DATE(DATE_SUB(DATE_ADD(lod.create_time, INTERVAL 1 YEAR), INTERVAL 1 DAY)) AS nextTestTime -- 计算 nextTestTime
|
||||
FROM
|
||||
lease_out_details lod
|
||||
LEFT JOIN ma_type mt ON lod.type_id = mt.type_id AND mt.del_flag = '0'
|
||||
|
|
|
|||
Loading…
Reference in New Issue