Commit e9aef5b1 by 李小惠

修改导出功能

parent 6738fb42
...@@ -75,4 +75,6 @@ public class TjOrgCountDto implements Serializable { ...@@ -75,4 +75,6 @@ public class TjOrgCountDto implements Serializable {
private Integer level; private Integer level;
private Integer levelNum;
} }
\ No newline at end of file
...@@ -10,10 +10,9 @@ public class TjOrgEqsDto { ...@@ -10,10 +10,9 @@ public class TjOrgEqsDto {
@ExcelProperty("序号") @ExcelProperty("序号")
private Integer numId; private Integer numId;
/**
* 组织机构id
*/
private Integer level; private Integer level;
private Integer levelNum;
/** /**
* 组织机构id * 组织机构id
*/ */
...@@ -70,5 +69,5 @@ public class TjOrgEqsDto { ...@@ -70,5 +69,5 @@ public class TjOrgEqsDto {
private Integer destructionNumber; private Integer destructionNumber;
private List<TjOrgEqsDto> list;
} }
...@@ -27,25 +27,34 @@ public class TjOrgPriceDto { ...@@ -27,25 +27,34 @@ public class TjOrgPriceDto {
private Long parentId; private Long parentId;
// 年初数量 // 年初数量
private Integer startNum; private Integer startNum;
// 年初金额 // 年初金额
private BigDecimal startPrice; private BigDecimal startPrice;
// 年末数量 // 年末数量
private Integer endNum; private Integer endNum;
// 年末金额 // 年末金额
private BigDecimal endPrice; private BigDecimal endPrice;
// 本年度新增数量 // 本年度新增数量
private Integer addNum; private Integer addNum;
private BigDecimal addPrice; private BigDecimal addPrice;
// 本年度销毁数量 // 本年度销毁数量
private Integer destoryNum; private Integer destoryNum;
private BigDecimal destoryPrice; private BigDecimal destoryPrice;
private String sizeId; private String sizeId;
private String sizeName; private String sizeName;
private String typeId; private String typeId;
private String typeName; private String typeName;
//0表示本级数据,1表示直属下级不包含下一级的组织机构 //0表示本级数据,1表示直属下级不包含下一级的组织机构
private Integer level; private Integer level;
private Integer levelNum;
} }
...@@ -16,6 +16,8 @@ public class TjOrgEqsReq extends BaseRequest { ...@@ -16,6 +16,8 @@ public class TjOrgEqsReq extends BaseRequest {
private Integer level; private Integer level;
private String order;
private String column;
// 添加一个用逗号分隔typeIdsList的方法 // 添加一个用逗号分隔typeIdsList的方法
public String getTypeIdsAsString() { public String getTypeIdsAsString() {
return String.join(",", typeIdsList); return String.join(",", typeIdsList);
...@@ -23,4 +25,6 @@ public class TjOrgEqsReq extends BaseRequest { ...@@ -23,4 +25,6 @@ public class TjOrgEqsReq extends BaseRequest {
public String getSizesAsString() { public String getSizesAsString() {
return String.join(",", sizeNameList); return String.join(",", sizeNameList);
} }
} }
...@@ -21,5 +21,7 @@ public class TjOrgPriceReq extends BaseRequest { ...@@ -21,5 +21,7 @@ public class TjOrgPriceReq extends BaseRequest {
private Integer levelNum; private Integer levelNum;
private Integer level; private Integer level;
private String order;
private String column;
} }
...@@ -49,6 +49,7 @@ public class WarehouseReq extends BaseRequest { ...@@ -49,6 +49,7 @@ public class WarehouseReq extends BaseRequest {
private Long orderId; private Long orderId;
private String IncludeLowerLevel; private String IncludeLowerLevel;
private Date startTime; private Date startTime;
private Date endTime; private Date endTime;
} }
\ No newline at end of file
package com.junmp.jyzb.api.bean.vo; package com.junmp.jyzb.api.bean.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.converters.bigdecimal.BigDecimalNumberConverter;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
@Data @Data
public class InOrderInfo { public class InOrderInfoVo {
@ExcelProperty("序号") @ExcelProperty("序号")
private Integer numId; private Integer numId;
......
package com.junmp.jyzb.api.bean.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.Data;
import static com.alibaba.excel.enums.poi.HorizontalAlignmentEnum.CENTER;
@Data
public class TjOrgCountExportVo {
/**
* 类型名称
*/
@ExcelProperty("类型名称")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String typeName;
/**
* 号型名称
*/
@ExcelProperty("号型名称")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String sizeName;
/**
* 装备总数
*/
@ExcelProperty("装备总数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer number;
/**
* 使用次数
*/
@ExcelProperty("使用次数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer useCount;
/**
* 维修次数
*/
@ExcelProperty("维修次数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer fixCount;
}
package com.junmp.jyzb.api.bean.vo;
import lombok.Data;
@Data
public class TjOrgEqsExportVo {
}
package com.junmp.jyzb.api.bean.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.Data;
import static com.alibaba.excel.enums.poi.HorizontalAlignmentEnum.CENTER;
@Data
public class TjOrgPoliceExportVo {
@ExcelProperty("装备名称")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String typeName;
@ExcelProperty("号型")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String sizeName;
@ExcelProperty("装备总数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer num;
@ExcelProperty("在库数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer inNum;
@ExcelProperty("出库数")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer outNum;
}
package com.junmp.jyzb.api.bean.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.Data;
import java.math.BigDecimal;
import static com.alibaba.excel.enums.poi.HorizontalAlignmentEnum.CENTER;
@Data
public class TjOrgPriceExportVo {
@ExcelProperty("装备名称")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private String typeName;
// 年初数量
@ExcelProperty("年初数量")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer startNum;
// 年初金额
@ExcelProperty("年初金额")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private BigDecimal startPrice;
// 年末数量
@ExcelProperty("年末数量")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer endNum;
// 年末金额
@ExcelProperty("年末金额")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private BigDecimal endPrice;
// 本年度新增数量
@ExcelProperty("本年度新增数量")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer addNum;
// 本年度销毁数量
@ExcelProperty("本年度销毁数量")
@ColumnWidth(10)
@ContentFontStyle(fontName = "宋体",fontHeightInPoints = 11)
@ContentStyle(horizontalAlignment = CENTER ,verticalAlignment = VerticalAlignmentEnum.CENTER,
borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
private Integer destoryNum;
}
...@@ -82,6 +82,7 @@ public class TjController { ...@@ -82,6 +82,7 @@ public class TjController {
tjService.TjOrgEqsExport(req); tjService.TjOrgEqsExport(req);
} }
/** /**
*-------------------------------------财务统计报表------------------------------------------ *-------------------------------------财务统计报表------------------------------------------
*/ */
...@@ -116,6 +117,13 @@ public class TjController { ...@@ -116,6 +117,13 @@ public class TjController {
return ApiRes.success(tjService.TjOrgPriceDetailList(req)); return ApiRes.success(tjService.TjOrgPriceDetailList(req));
} }
@PostMapping(path="/TjOrgPriceExport",name="财务报表导出#logType=30")
@ApiOperation("财务报表导出")
public void TjOrgPriceExport(@RequestBody TjOrgPriceReq req){
tjService.TjOrgPriceExport(req);
}
/** /**
* --------------------------------------使用统计报表------------------------------------------- * --------------------------------------使用统计报表-------------------------------------------
*/ */
...@@ -170,6 +178,12 @@ public class TjController { ...@@ -170,6 +178,12 @@ public class TjController {
return ApiRes.success(tjService.TjOutAndInCount(req)); return ApiRes.success(tjService.TjOutAndInCount(req));
} }
@PostMapping(path="/TjOrgCountExport",name="使用报表导出#logType=30")
@ApiOperation("使用报表导出")
public void TjOrgCountExport(@RequestBody TjOrgCountReq req){
tjService.TjOrgCountExport(req);
}
/** /**
* --------------------------------------人员统计报表------------------------------------------- * --------------------------------------人员统计报表-------------------------------------------
*/ */
...@@ -196,18 +210,28 @@ public class TjController { ...@@ -196,18 +210,28 @@ public class TjController {
return ApiRes.success(tjService.TjOrgPoliceDetailList(req)); return ApiRes.success(tjService.TjOrgPoliceDetailList(req));
} }
@PostMapping(path="/TjOrgPoliceExport",name="人员报表导出#logType=30")
@ApiOperation("人员报表导出")
public void TjOrgPoliceExport(@RequestBody TjOrgPoliceReq req){
tjService.TjOrgPoliceExport(req);
}
/** /**
* --------------------------------------温湿度记录------------------------------------------- * --------------------------------------温湿度记录-------------------------------------------
*/ */
@PostMapping("showHumidityAndtemperature") @PostMapping("/showHumidityAndtemperature")
@ApiOperation("展示温湿度记录") @ApiOperation("展示温湿度记录")
public ApiRes<List<HumidityAndtemperature>> showHumidityAndtemperature(@RequestBody WarehouseReq req){ public ApiRes<List<HumidityAndtemperature>> showHumidityAndtemperature(@RequestBody WarehouseReq req){
return ApiRes.success(warehouseService.showHumidityAndtemperature(req)); return ApiRes.success(warehouseService.showHumidityAndtemperature(req));
} }
@PostMapping(path="/HumidityAndtemperatureExport",name="温湿度报表导出#logType=30")
@ApiOperation("温湿度报表导出")
public void HumidityAndtemperatureExport(@RequestBody WarehouseReq req){
warehouseService.HumidityAndtemperatureExport(req);
}
......
...@@ -28,7 +28,7 @@ public interface DeviceConfigMapper extends BaseMapper<DeviceConfig> { ...@@ -28,7 +28,7 @@ public interface DeviceConfigMapper extends BaseMapper<DeviceConfig> {
@Param("pageSize") Long pageSize); @Param("pageSize") Long pageSize);
List<String> alignDeviceConfigInfo(@Param("orgId") Long orgId, List<String> alignDeviceConfigInfo(@Param("orgId") Long orgId,
@Param("deviceCode") String deviceCode, @Param("deviceType") Integer deviceType,
@Param("date") String date); @Param("date") String date);
} }
......
...@@ -53,7 +53,7 @@ public interface EquipmentCountSummaryMapper extends BaseMapper<EquipmentCountSu ...@@ -53,7 +53,7 @@ public interface EquipmentCountSummaryMapper extends BaseMapper<EquipmentCountSu
@Param("typeParentId")String typeParentId, @Param("typeParentId")String typeParentId,
@Param("monthList") List<Integer> monthList, @Param("monthList") List<Integer> monthList,
@Param("levelNum")Integer levelNum, @Param("levelNum")Integer levelNum,
@Param("level")Integer level); @Param("level")Integer level,@Param("column")String column,@Param("order")String order);
FinalTjOrgCountDto TjOrgCountSum(@Param("orgId") Long orgId, FinalTjOrgCountDto TjOrgCountSum(@Param("orgId") Long orgId,
......
...@@ -62,7 +62,7 @@ public interface InventorySummaryMapper extends BaseMapper<InventorySummary> { ...@@ -62,7 +62,7 @@ public interface InventorySummaryMapper extends BaseMapper<InventorySummary> {
// @Param("sizeNameList") List<String> sizeNameList, @Param("levelNum") Integer levelNum); // @Param("sizeNameList") List<String> sizeNameList, @Param("levelNum") Integer levelNum);
List<TjOrgEqsDto> getTotalDataDetail(@Param("orgId") String orgId, @Param("typeIdsList") List<String> typeIdsList, List<TjOrgEqsDto> getTotalDataDetail(@Param("orgId") String orgId, @Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList, @Param("levelNum") Integer levelNum, @Param("sizeNameList") List<String> sizeNameList, @Param("levelNum") Integer levelNum,
@Param("level")Integer level); @Param("level")Integer level,@Param("column")String column,@Param("order")String order);
void useViewOrgeqs(@Param("sql") String sql,@Param("orgId") Long orgId,@Param("sql1") String sql1); void useViewOrgeqs(@Param("sql") String sql,@Param("orgId") Long orgId,@Param("sql1") String sql1);
......
...@@ -13,7 +13,6 @@ import java.util.List; ...@@ -13,7 +13,6 @@ import java.util.List;
public interface TjService { public interface TjService {
List<TjOrgEqsDto> showOrgEqsList(InventoryReq req);
FinalTjOrgEqsDto test(TjOrgEqsReq req); FinalTjOrgEqsDto test(TjOrgEqsReq req);
...@@ -66,4 +65,10 @@ public interface TjService { ...@@ -66,4 +65,10 @@ public interface TjService {
void TjOrgEqsExport(TjOrgEqsReq req); void TjOrgEqsExport(TjOrgEqsReq req);
void TjOrgPriceExport(TjOrgPriceReq req);
void TjOrgCountExport(TjOrgCountReq req);
void TjOrgPoliceExport(TjOrgPoliceReq req);
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.WarehouseInfoDto; import com.junmp.jyzb.api.bean.dto.FetchingDataDto.WarehouseInfoDto;
import com.junmp.jyzb.api.bean.dto.WarehouseDto; import com.junmp.jyzb.api.bean.dto.WarehouseDto;
import com.junmp.jyzb.api.bean.query.PolicemanReq; import com.junmp.jyzb.api.bean.query.PolicemanReq;
import com.junmp.jyzb.api.bean.query.TjReq.TjOrgPriceReq;
import com.junmp.jyzb.api.bean.query.WarehouseReq; import com.junmp.jyzb.api.bean.query.WarehouseReq;
import com.junmp.jyzb.api.bean.req.UpdateWarehouseReq; import com.junmp.jyzb.api.bean.req.UpdateWarehouseReq;
import com.junmp.jyzb.entity.Temp.HumidityAndtemperature; import com.junmp.jyzb.entity.Temp.HumidityAndtemperature;
...@@ -56,4 +57,6 @@ public interface WarehouseService extends IService<Warehouse> { ...@@ -56,4 +57,6 @@ public interface WarehouseService extends IService<Warehouse> {
boolean updateHumidityAndtemperature(HumidityAndtemperature req); boolean updateHumidityAndtemperature(HumidityAndtemperature req);
List<HumidityAndtemperature> showHumidityAndtemperature(WarehouseReq req); List<HumidityAndtemperature> showHumidityAndtemperature(WarehouseReq req);
void HumidityAndtemperatureExport(WarehouseReq req);
} }
package com.junmp.jyzb.service.impl; package com.junmp.jyzb.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -27,6 +28,7 @@ import org.springframework.stereotype.Service; ...@@ -27,6 +28,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -110,7 +112,16 @@ public class DeviceConfigServiceImpl extends ServiceImpl<DeviceConfigMapper, Dev ...@@ -110,7 +112,16 @@ public class DeviceConfigServiceImpl extends ServiceImpl<DeviceConfigMapper, Dev
@Override @Override
public List<String> alignDeviceConfigInfo(UpdateDeivceConfigReq req) { public List<String> alignDeviceConfigInfo(UpdateDeivceConfigReq req) {
String date = DateTimeUtil.TimeLongToString(req.getUpdateTime()); String date = DateTimeUtil.TimeLongToString(req.getUpdateTime());
return deviceConfigMapper.alignDeviceConfigInfo(req.getOrgId(), req.getDeviceCode(), date); String deviceConfigString="";
List<String> deviceConfigList = deviceConfigMapper.alignDeviceConfigInfo(req.getOrgId(), req.getDeviceType(), date);
if (CollectionUtil.isNotEmpty(deviceConfigList) && deviceConfigList.size()>1 && req.getDeviceType()==1){
deviceConfigString = deviceConfigList.get(0);
deviceConfigList.clear();
deviceConfigList.add(deviceConfigString);
}
return deviceConfigList;
} }
......
...@@ -17,7 +17,7 @@ import com.junmp.jyzb.api.bean.query.*; ...@@ -17,7 +17,7 @@ import com.junmp.jyzb.api.bean.query.*;
import com.junmp.jyzb.api.bean.query.InAndOutRecordReq.DetailJsonReq; import com.junmp.jyzb.api.bean.query.InAndOutRecordReq.DetailJsonReq;
import com.junmp.jyzb.api.bean.req.UpdateOrderDetailReq; import com.junmp.jyzb.api.bean.req.UpdateOrderDetailReq;
import com.junmp.jyzb.api.bean.req.UpdateOrderReq; import com.junmp.jyzb.api.bean.req.UpdateOrderReq;
import com.junmp.jyzb.api.bean.vo.InOrderInfo; import com.junmp.jyzb.api.bean.vo.InOrderInfoVo;
import com.junmp.jyzb.api.exception.JYZBAppException; import com.junmp.jyzb.api.exception.JYZBAppException;
import com.junmp.jyzb.api.exception.enums.InventoryExceptionEnum; import com.junmp.jyzb.api.exception.enums.InventoryExceptionEnum;
import com.junmp.jyzb.api.exception.enums.OrderExceptionEnum; import com.junmp.jyzb.api.exception.enums.OrderExceptionEnum;
...@@ -1509,9 +1509,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -1509,9 +1509,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
@Override @Override
public void InOrderExport(OrderMainReq req) { public void InOrderExport(OrderMainReq req) {
LambdaQueryWrapper<OrderMain> wrapper = createWrapper(req); LambdaQueryWrapper<OrderMain> wrapper = createWrapper(req);
List<InOrderInfo> collect = list(wrapper).stream().map(orderMain -> { List<InOrderInfoVo> collect = list(wrapper).stream().map(orderMain -> {
InOrderInfo inOrderInfo = new InOrderInfo(); InOrderInfoVo inOrderInfoVo = new InOrderInfoVo();
BeanPlusUtil.copyProperties(orderMain, inOrderInfo); BeanPlusUtil.copyProperties(orderMain, inOrderInfoVo);
//装备名称 //装备名称
String inventoryName = ""; String inventoryName = "";
List<OrderDetail> orderDetailList = orderDetailService.QueryList(orderMain.getId()); List<OrderDetail> orderDetailList = orderDetailService.QueryList(orderMain.getId());
...@@ -1519,13 +1519,13 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -1519,13 +1519,13 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
inventoryName = inventoryName + orderDetail.getTypeName() + "/"; inventoryName = inventoryName + orderDetail.getTypeName() + "/";
} }
String substring = inventoryName.substring(0, inventoryName.length() - 1); String substring = inventoryName.substring(0, inventoryName.length() - 1);
inOrderInfo.setInventoryName(substring); inOrderInfoVo.setInventoryName(substring);
//查询字典表设置入库类型 //查询字典表设置入库类型
// List<SysDictItem> list = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>() // List<SysDictItem> list = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>()
// .eq(SysDictItem::getItemValue, orderMain.getBussinessType())); // .eq(SysDictItem::getItemValue, orderMain.getBussinessType()));
//// inOrderInfo.setOrderType(itemText); //// inOrderInfo.setOrderType(itemText);
// System.out.println("list = " + list); // System.out.println("list = " + list);
return inOrderInfo; return inOrderInfoVo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
//设置导出的单据序号 //设置导出的单据序号
...@@ -1535,7 +1535,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -1535,7 +1535,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
HttpServletResponse response = HttpServletUtil.getResponse(); HttpServletResponse response = HttpServletUtil.getResponse();
ExcelExportParam param = new ExcelExportParam(); ExcelExportParam param = new ExcelExportParam();
param.setDataList(collect); param.setDataList(collect);
param.setClazz(InOrderInfo.class); param.setClazz(InOrderInfoVo.class);
param.setResponse(response); param.setResponse(response);
param.setFileName("入库单据列表.xls"); param.setFileName("入库单据列表.xls");
//对数据进行导出 //对数据进行导出
...@@ -1546,9 +1546,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -1546,9 +1546,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
@Override @Override
public void OutOrderExport(OrderMainReq req) { public void OutOrderExport(OrderMainReq req) {
LambdaQueryWrapper<OrderMain> wrapper = createWrapper(req); LambdaQueryWrapper<OrderMain> wrapper = createWrapper(req);
List<InOrderInfo> collect = list(wrapper).stream().map(orderMain -> { List<InOrderInfoVo> collect = list(wrapper).stream().map(orderMain -> {
InOrderInfo inOrderInfo = new InOrderInfo(); InOrderInfoVo inOrderInfoVo = new InOrderInfoVo();
BeanPlusUtil.copyProperties(orderMain, inOrderInfo); BeanPlusUtil.copyProperties(orderMain, inOrderInfoVo);
//装备名称 //装备名称
String inventoryName = ""; String inventoryName = "";
List<OrderDetail> orderDetailList = orderDetailService.QueryList(orderMain.getId()); List<OrderDetail> orderDetailList = orderDetailService.QueryList(orderMain.getId());
...@@ -1556,13 +1556,13 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -1556,13 +1556,13 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
inventoryName = inventoryName + orderDetail.getTypeName() + "/"; inventoryName = inventoryName + orderDetail.getTypeName() + "/";
} }
String substring = inventoryName.substring(0, inventoryName.length() - 1); String substring = inventoryName.substring(0, inventoryName.length() - 1);
inOrderInfo.setInventoryName(substring); inOrderInfoVo.setInventoryName(substring);
//查询字典表设置出库类型 //查询字典表设置出库类型
// List<SysDictItem> list = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>() // List<SysDictItem> list = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>()
// .eq(SysDictItem::getItemValue, orderMain.getBussinessType())); // .eq(SysDictItem::getItemValue, orderMain.getBussinessType()));
//// inOrderInfo.setOrderType(itemText); //// inOrderInfo.setOrderType(itemText);
// System.out.println("list = " + list); // System.out.println("list = " + list);
return inOrderInfo; return inOrderInfoVo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
//设置导出的单据序号 //设置导出的单据序号
...@@ -1572,7 +1572,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain ...@@ -1572,7 +1572,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
HttpServletResponse response = HttpServletUtil.getResponse(); HttpServletResponse response = HttpServletUtil.getResponse();
ExcelExportParam param = new ExcelExportParam(); ExcelExportParam param = new ExcelExportParam();
param.setDataList(collect); param.setDataList(collect);
param.setClazz(InOrderInfo.class); param.setClazz(InOrderInfoVo.class);
param.setResponse(response); param.setResponse(response);
param.setFileName("出库单据列表.xls"); param.setFileName("出库单据列表.xls");
//对数据进行导出 //对数据进行导出
......
...@@ -8,8 +8,10 @@ import com.junmp.jyzb.api.bean.dto.FetchingDataDto.WarehouseInfoDto; ...@@ -8,8 +8,10 @@ import com.junmp.jyzb.api.bean.dto.FetchingDataDto.WarehouseInfoDto;
import com.junmp.jyzb.api.bean.dto.MQDto; import com.junmp.jyzb.api.bean.dto.MQDto;
import com.junmp.jyzb.api.bean.dto.WarehouseDto; import com.junmp.jyzb.api.bean.dto.WarehouseDto;
import com.junmp.jyzb.api.bean.query.PolicemanReq; import com.junmp.jyzb.api.bean.query.PolicemanReq;
import com.junmp.jyzb.api.bean.query.TjReq.TjOrgPriceReq;
import com.junmp.jyzb.api.bean.query.WarehouseReq; import com.junmp.jyzb.api.bean.query.WarehouseReq;
import com.junmp.jyzb.api.bean.req.UpdateWarehouseReq; import com.junmp.jyzb.api.bean.req.UpdateWarehouseReq;
import com.junmp.jyzb.api.bean.vo.InOrderInfoVo;
import com.junmp.jyzb.api.exception.enums.WarehouseExceptionEnum; import com.junmp.jyzb.api.exception.enums.WarehouseExceptionEnum;
import com.junmp.jyzb.cache.TemperatureRedisCache; import com.junmp.jyzb.cache.TemperatureRedisCache;
import com.junmp.jyzb.entity.*; import com.junmp.jyzb.entity.*;
...@@ -21,12 +23,16 @@ import com.junmp.jyzb.service.WarehouseService; ...@@ -21,12 +23,16 @@ import com.junmp.jyzb.service.WarehouseService;
import com.junmp.jyzb.utils.*; import com.junmp.jyzb.utils.*;
import com.junmp.v2.common.exception.base.ServiceException; import com.junmp.v2.common.exception.base.ServiceException;
import com.junmp.v2.common.util.BeanPlusUtil; import com.junmp.v2.common.util.BeanPlusUtil;
import com.junmp.v2.common.util.HttpServletUtil;
import com.junmp.v2.office.api.OfficeExcelApi;
import com.junmp.v2.office.api.bean.ExcelExportParam;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -50,6 +56,9 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse> ...@@ -50,6 +56,9 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
@Autowired @Autowired
private RabbitMQSendMsg MQ; private RabbitMQSendMsg MQ;
@Resource
private OfficeExcelApi officeExcelApi;
@Override @Override
...@@ -237,5 +246,18 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse> ...@@ -237,5 +246,18 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
return collect; return collect;
} }
@Override
public void HumidityAndtemperatureExport(WarehouseReq req) {
List<HumidityAndtemperature> collect = showHumidityAndtemperature(req);
HttpServletResponse response = HttpServletUtil.getResponse();
ExcelExportParam param = new ExcelExportParam();
param.setDataList(collect);
param.setClazz(InOrderInfoVo.class);
param.setResponse(response);
param.setFileName("入库单据列表.xls");
//对数据进行导出
officeExcelApi.easyExportDownload(param);
}
} }
...@@ -17,7 +17,7 @@ public class BusinessUtil { ...@@ -17,7 +17,7 @@ public class BusinessUtil {
/** /**
* 创建补齐空数据 * 创建补齐空数据(页面显示补齐数据,如每页10条,当前只有6条数据,再创建4条空数据进行补齐)
*/ */
public static <T> List<T> createNullData(Long size,Long pageNo,Long pageSize,Class<T> clazz) { public static <T> List<T> createNullData(Long size,Long pageNo,Long pageSize,Class<T> clazz) {
......
...@@ -59,15 +59,17 @@ ...@@ -59,15 +59,17 @@
) as a ) as a
</select> </select>
<select id="alignDeviceConfigInfo" resultType="java.lang.String"> <select id="alignDeviceConfigInfo" resultType="java.lang.String">
select device_config from base_device_config where org_id=#{orgId} select device_config from base_device_config where org_id=#{orgId} and device_type=#{deviceType}
<!-- <if test="deviceCode != null and deviceCode != ''">--> <!-- <if test="deviceCode != null and deviceCode != ''">-->
<!-- and device_code=#{deviceCode}--> <!-- and device_code=#{deviceCode}-->
<!-- </if>--> <!-- </if>-->
<!-- <if test="deviceCode == null or deviceCode == ''">--> <!-- <if test="deviceCode == null or deviceCode == ''">-->
<!-- and device_type=0--> <!-- and device_type=0-->
<!-- </if>--> <!-- </if>-->
<if test="date != null and date!= ''"> <if test="date != null and date!= ''">
and update_time &gt; #{date} and update_time &gt; #{date}
</if> </if>
order by update_time desc
</select> </select>
</mapper> </mapper>
...@@ -545,6 +545,9 @@ ...@@ -545,6 +545,9 @@
t.size_id,t.size_name,t.type_id,t.type_name t.size_id,t.size_name,t.type_id,t.type_name
ORDER BY ORDER BY
t.type_id,size_id t.type_id,size_id
<if test="column != null and column != '' and order != null and order != '' ">
order by ${column} ${order}
</if>
</select> </select>
......
...@@ -591,5 +591,32 @@ ...@@ -591,5 +591,32 @@
</if> </if>
</select> </select>
<!-- <select id="alignInventoryInfo" resultType="com.junmp.jyzb.api.bean.dto.FetchingDataDto.EquipmentDto"-->
<!-- parameterType="com.junmp.jyzb.api.bean.query.InventoryReq">-->
<!-- SELECT wi.type_id,wi.size_id,wi.epc,-->
<!-- wi.org_id,wi.location_id,wi.location_type,wi.create_time,wi.update_time-->
<!-- FROM `base_warehouse_inventory` wi-->
<!-- join base_inventory i on i.epc=wi.epc-->
<!-- where wi.org_id=#{orgId}-->
<!-- <if test="locationId!= null and locationId != ''">-->
<!-- and wi.location_id=#{locationId}-->
<!-- </if>-->
<!-- <if test="date!= null and date != ''">-->
<!-- and wi.update_time &gt; #{date}-->
<!-- </if>-->
<!-- <if test="typeIdList != null and typeIdList.size()>0">-->
<!-- and wi.type_id in-->
<!-- <foreach collection="typeIdList" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="sizeIdList != null and sizeIdList.size()>0">-->
<!-- and wi.size_id in-->
<!-- <foreach collection="sizeIdList" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </select>-->
</mapper> </mapper>
\ No newline at end of file
...@@ -533,6 +533,9 @@ ...@@ -533,6 +533,9 @@
</foreach> </foreach>
</if> </if>
GROUP BY `po`.`org_id`,`po`.`org_code`,`po`.`org_parent_id`,`po`.`org_name` GROUP BY `po`.`org_id`,`po`.`org_code`,`po`.`org_parent_id`,`po`.`org_name`
<if test="column != null and column != '' and order != null and order != '' ">
order by ${column} ${order}
</if>
</select> </select>
<select id="getSumByViewOrgeqsSum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.FinalTjOrgEqsDto"> <select id="getSumByViewOrgeqsSum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.FinalTjOrgEqsDto">
select sum(total_number) as total_number, select sum(total_number) as total_number,
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
and pe.police_name like CONCAT('%', #{req.policeName}, '%') and pe.police_name like CONCAT('%', #{req.policeName}, '%')
</if> </if>
GROUP BY pe.police_id GROUP BY pe.police_id
<if test="pageNo != null and pageNo != '' and pageSize != null and pageSize != '' ">
limit #{pageNo},#{pageSize}
</if>
</select> </select>
<select id="getCount" resultType="java.lang.Integer" <select id="getCount" resultType="java.lang.Integer"
parameterType="com.junmp.jyzb.api.bean.query.TjReq.TjOrgPoliceReq"> parameterType="com.junmp.jyzb.api.bean.query.TjReq.TjOrgPoliceReq">
......
...@@ -62,7 +62,7 @@ mybatis-plus: ...@@ -62,7 +62,7 @@ mybatis-plus:
lazy-loading-enabled: true lazy-loading-enabled: true
multiple-result-sets-enabled: true multiple-result-sets-enabled: true
map-underscore-to-camel-case: true #开启驼峰命名 map-underscore-to-camel-case: true #开启驼峰命名
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #控制台打印sql语句 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #控制台打印sql语句
global-config: global-config:
banner: false banner: false
enable-sql-runner: true enable-sql-runner: true
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论