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