
14 changed files with 830 additions and 28 deletions
@ -0,0 +1,64 @@ |
|||||
|
package com.yxt.supervise.gf.api.orderindex; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author feikefei |
||||
|
* @create 2023-09-21-13:58 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "电站返回对象") |
||||
|
@TableName("order_index") |
||||
|
public class OrderIndexDb { |
||||
|
@TableId(value = "id",type = IdType.INPUT) |
||||
|
private Integer id; |
||||
|
private String order_no; |
||||
|
private Integer admin_id; |
||||
|
private Integer customer_id; |
||||
|
private Integer agent_id; |
||||
|
private Integer product_id; |
||||
|
private Integer create_time; |
||||
|
private String data_id; |
||||
|
private String workflow_unique; |
||||
|
private Integer prototype_id; |
||||
|
private String remain_unique; |
||||
|
private Integer is_best; |
||||
|
private Integer order_type; |
||||
|
private Integer update_time; |
||||
|
private Integer company_id; |
||||
|
private String dg_name; |
||||
|
private Integer contract_life; |
||||
|
private Integer contract_group; |
||||
|
private String agent_name; |
||||
|
private Integer area_id; |
||||
|
private String address; |
||||
|
private Integer component_number; |
||||
|
private Integer component_power; |
||||
|
private String admin_name; |
||||
|
private String admin_phone; |
||||
|
private String user_name; |
||||
|
private String user_phone; |
||||
|
private String id_card; |
||||
|
private String product_name; |
||||
|
private String workflow_name; |
||||
|
private Integer node_id; |
||||
|
private Integer is_agree; |
||||
|
private Integer group_id; |
||||
|
private Integer sign; |
||||
|
private String uplode_contract; |
||||
|
private String company_name; |
||||
|
private String province_name; |
||||
|
private String city_name; |
||||
|
private String area_name; |
||||
|
private Integer assets_no; |
||||
|
private Integer change_order_id; |
||||
|
private String p_agent_name; |
||||
|
private String all_power; |
||||
|
private String order_type_text; |
||||
|
private Integer is_save; |
||||
|
private String time; |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.yxt.supervise.gf.biz.orderindex; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* @author feikefei |
||||
|
* @create 2023-09-25-16:54 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface OrderIndexMapper extends BaseMapper<OrderIndexDb> { |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.yxt.supervise.gf.biz.orderindex; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.gf.shanhai.ShRequester; |
||||
|
import com.yxt.supervise.gf.shanhai.req.Order_Index; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* @author feikefei |
||||
|
* @create 2023-09-25-16:44 |
||||
|
*/ |
||||
|
@Api(value = "电站") |
||||
|
@RestController |
||||
|
@RequestMapping("gf/powerStation") |
||||
|
public class OrderIndexRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private OrderIndexService orderIndexService; |
||||
|
|
||||
|
/** |
||||
|
* @Description //描述: group_id 7开发投资 8新增进件审核 9储备发货 10电站施工 11电站并网 12现场验收 13电站运营 group_id:{}有效电站
|
||||
|
* @Param [order_index] |
||||
|
* @return com.yxt.common.core.result.ResultBean |
||||
|
**/ |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody Order_Index order_index){ |
||||
|
return orderIndexService.save(order_index); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/test") |
||||
|
public void excel(@RequestBody Order_Index order_index){ |
||||
|
orderIndexService.selectData(order_index); |
||||
|
} |
||||
|
} |
@ -0,0 +1,318 @@ |
|||||
|
package com.yxt.supervise.gf.biz.orderindex; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.yxt.common.base.utils.DateUtils; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.gf.api.orderindex.OrderIndexDb; |
||||
|
import com.yxt.supervise.gf.shanhai.ShRequester; |
||||
|
import com.yxt.supervise.gf.shanhai.req.Order_Index; |
||||
|
import com.yxt.supervise.gf.shanhai.resp.*; |
||||
|
import org.apache.poi.ss.usermodel.*; |
||||
|
import org.apache.poi.ss.util.CellAddress; |
||||
|
import org.apache.poi.ss.util.CellRangeAddress; |
||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
||||
|
import org.springframework.beans.factory.annotation.Value; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.io.File; |
||||
|
import java.io.FileOutputStream; |
||||
|
import java.io.OutputStream; |
||||
|
import java.text.DecimalFormat; |
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.*; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* @author feikefei |
||||
|
* @create 2023-09-25-16:53 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class OrderIndexService extends ServiceImpl<OrderIndexMapper, OrderIndexDb> { |
||||
|
|
||||
|
@Value("${import.filePath}") |
||||
|
private String filePath; |
||||
|
|
||||
|
public ResultBean save(Order_Index order_index) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String date = DateUtil.format(new Date(), "yyyy-MM-dd"); |
||||
|
BaseResponse<BaseResponseListObj<OrderIndex>> api$system$order$index = ShRequester.getApi$system$order$index(order_index); |
||||
|
List<OrderIndex> list = api$system$order$index.getData().getList(); |
||||
|
for (OrderIndex orderIndex : list) { |
||||
|
OrderIndexDb orderIndex1 = new OrderIndexDb(); |
||||
|
BeanUtil.copyProperties(orderIndex, orderIndex1); |
||||
|
orderIndex1.setTime(date); |
||||
|
baseMapper.insert(orderIndex1); |
||||
|
} |
||||
|
return rb.success().setMsg("添加成功"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @return void |
||||
|
* @Description //描述: 查询电站相关数据
|
||||
|
* @Param [order_index] |
||||
|
**/ |
||||
|
public void selectData(Order_Index order_index) { |
||||
|
//查询开发投资数据
|
||||
|
List<OrderIndexDb> kfsz = baseMapper.selectList(getQueryWrapper(order_index.getSearch_time()).eq("group_id", 7)); |
||||
|
List<OrderIndexDb> jjsh = baseMapper.selectList(getQueryWrapper(order_index.getSearch_time()).eq("group_id", 8)); |
||||
|
List<OrderIndexDb> cbfh = baseMapper.selectList(getQueryWrapper(order_index.getSearch_time()).eq("group_id", 9)); |
||||
|
List<OrderIndexDb> dzsg = baseMapper.selectList(getQueryWrapper(order_index.getSearch_time()).eq("group_id", 10)); |
||||
|
List<OrderIndexDb> dzbw = baseMapper.selectList(getQueryWrapper(order_index.getSearch_time()).eq("group_id", 11)); |
||||
|
List<OrderIndexDb> xcys = baseMapper.selectList(getQueryWrapper(order_index.getSearch_time()).eq("group_id", 12)); |
||||
|
List<OrderIndexDb> dzyy = baseMapper.selectList(getQueryWrapper(order_index.getSearch_time()).eq("group_id", 13)); |
||||
|
exportExcel(kfsz,jjsh,cbfh,dzsg,dzbw,xcys,dzyy); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @return com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<com.yxt.supervise.gf.api.orderindex.OrderIndexDb> |
||||
|
* @Description //描述: 公共方法
|
||||
|
* @Param [search_time] |
||||
|
**/ |
||||
|
private QueryWrapper<OrderIndexDb> getQueryWrapper(String[] search_time) { |
||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
||||
|
Date dateFirst = null; |
||||
|
Date dateLast = null; |
||||
|
try { |
||||
|
dateFirst = sdf.parse(search_time[0]); |
||||
|
dateLast = sdf.parse(search_time[1]); |
||||
|
} catch (Exception e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
long dateFirstTime = dateFirst.getTime() / 1000; |
||||
|
long dateLastTime = dateLast.getTime() / 1000; |
||||
|
QueryWrapper<OrderIndexDb> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.ge("create_time", dateFirstTime).le("create_time", dateLastTime); |
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
public void exportExcel(List<OrderIndexDb> kfsz,List<OrderIndexDb> jjsh,List<OrderIndexDb> cbfh,List<OrderIndexDb> dzsg,List<OrderIndexDb> dzbw,List<OrderIndexDb> xcys,List<OrderIndexDb> dzyy){ |
||||
|
Calendar calendar=Calendar.getInstance(); |
||||
|
int month=calendar.get(Calendar.MONTH); |
||||
|
calendar.set(Calendar.MONTH, month-1); |
||||
|
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); |
||||
|
Date endTime = calendar.getTime(); |
||||
|
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy/MM/dd HH:mm"); |
||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
||||
|
SimpleDateFormat sdf11 = new SimpleDateFormat("yyyy/MM/dd"); |
||||
|
Date date = new Date(); |
||||
|
XSSFWorkbook wb = new XSSFWorkbook(); |
||||
|
Map<String, List<OrderIndexDb>> collect = null; |
||||
|
//设置sheet名称,并创建新的sheet对象
|
||||
|
Sheet stuSheet = wb.createSheet(); |
||||
|
stuSheet.autoSizeColumn(0); |
||||
|
//合并单元格 设置表头信息
|
||||
|
Row headRow = stuSheet.createRow(0); //第一行为头
|
||||
|
Font head1 = wb.createFont(); |
||||
|
head1.setFontHeightInPoints((short) 25); |
||||
|
CellStyle cellStyle = wb.createCellStyle(); |
||||
|
cellStyle.setFont(head1); |
||||
|
cellStyle.setAlignment(HorizontalAlignment.CENTER); //设置水平对齐方式
|
||||
|
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); //设置垂直对齐方式
|
||||
|
CellRangeAddress callRangeAddress = new CellRangeAddress(0, 0, 0, 19); |
||||
|
Cell cell1 = headRow.createCell(0); |
||||
|
cell1.setCellStyle(cellStyle); |
||||
|
cell1.setCellValue("项目各流程通过数据表"); |
||||
|
stuSheet.addMergedRegion(callRangeAddress); |
||||
|
Row createTimeRow = stuSheet.createRow(1); |
||||
|
Font head11 = wb.createFont(); |
||||
|
head11.setFontHeightInPoints((short) 15); |
||||
|
CellStyle cellStyle1 = wb.createCellStyle(); |
||||
|
cellStyle1.setFont(head11); |
||||
|
cellStyle1.setAlignment(HorizontalAlignment.CENTER); //设置水平对齐方式
|
||||
|
cellStyle1.setVerticalAlignment(VerticalAlignment.CENTER); //设置垂直对齐方式
|
||||
|
CellRangeAddress callRangeAddressOne = new CellRangeAddress(1, 1, 0, 17); |
||||
|
Cell cellTime = createTimeRow.createCell(0); |
||||
|
cellTime.setCellStyle(cellStyle1); |
||||
|
cellTime.setCellValue("数据截止日期:" + sdf.format(DateUtil.offsetDay(date, -1)) + " " + "制表时间:" + sdf1.format(date)); |
||||
|
stuSheet.addMergedRegion(callRangeAddressOne); |
||||
|
Row DataTitleRow = stuSheet.createRow(2); |
||||
|
CellRangeAddress callRangeAddressTwo = new CellRangeAddress(2, 3, 0, 0); |
||||
|
CellRangeAddress callRangeAddressTwo1 = new CellRangeAddress(2, 3, 1, 1); |
||||
|
Cell cellTitle = DataTitleRow.createCell(0); |
||||
|
cellTitle.setCellStyle(cellStyle1); |
||||
|
cellTitle.setCellValue("流程"); |
||||
|
stuSheet.addMergedRegion(callRangeAddressTwo); |
||||
|
Cell cellTitleOne = DataTitleRow.createCell(1); |
||||
|
cellTitleOne.setCellStyle(cellStyle1); |
||||
|
cellTitleOne.setCellValue("日期\\数据"); |
||||
|
stuSheet.addMergedRegion(callRangeAddressTwo1); |
||||
|
int j = 0; |
||||
|
String[] head = new String[]{"总数据", "户用合计", "安阳户用", "庄河户用", "曲阜户用", "工商业合计", "安阳工商业", "庄河工商业", "曲阜工商业"}; |
||||
|
Row DataTitleRowTitle = stuSheet.createRow(3); |
||||
|
for (String s : head) { |
||||
|
CellRangeAddress callHead = new CellRangeAddress(2, 2, 2+j, 3+j); |
||||
|
Cell cell = DataTitleRow.createCell(2+j); |
||||
|
cell.setCellValue(s); |
||||
|
cell.setCellStyle(cellStyle1); |
||||
|
stuSheet.addMergedRegion(callHead); |
||||
|
Cell cell2 = DataTitleRowTitle.createCell(2+j); |
||||
|
cell2.setCellValue("户数"); |
||||
|
cell2.setCellStyle(cellStyle1); |
||||
|
Cell cell22 = DataTitleRowTitle.createCell(3+j); |
||||
|
cell22.setCellValue("功率"); |
||||
|
cell22.setCellStyle(cellStyle1); |
||||
|
j=j+2; |
||||
|
} |
||||
|
int i = 0;int k = 0; |
||||
|
String[] leftHead = new String[]{"开发收资", "进件审核", "储备发货", "电站施工", "电站并网", "现场验收", "电站运营"}; |
||||
|
Font headLeft = wb.createFont(); |
||||
|
headLeft.setFontHeightInPoints((short) 18); |
||||
|
CellStyle cellStyleLeft = wb.createCellStyle(); |
||||
|
cellStyleLeft.setFont(headLeft); |
||||
|
cellStyleLeft.setRotation((short) 255); |
||||
|
cellStyleLeft.setAlignment(HorizontalAlignment.CENTER); //设置水平对齐方式
|
||||
|
cellStyleLeft.setVerticalAlignment(VerticalAlignment.CENTER); //设置垂直对齐方式
|
||||
|
for (String s : leftHead) { |
||||
|
Row leftTitleRowTitle = stuSheet.createRow(4+i); |
||||
|
leftTitleRowTitle.setHeight((short) 600); |
||||
|
CellRangeAddress leftCallHead = new CellRangeAddress(4+i, 7+i,0,0); |
||||
|
Cell cell = leftTitleRowTitle.createCell(0); |
||||
|
cell.setCellValue(s); |
||||
|
cell.setCellStyle(cellStyleLeft); |
||||
|
stuSheet.addMergedRegion(leftCallHead); |
||||
|
Cell cellTwo = leftTitleRowTitle.createCell(1); |
||||
|
cellTwo.setCellValue("累计"); |
||||
|
cellTwo.setCellStyle(cellStyle1); |
||||
|
Cell cellTwoData = null; |
||||
|
switch (i){ |
||||
|
case 0: |
||||
|
collect = kfsz.stream().collect(Collectors.groupingBy(it -> it.getOrder_type_text())); |
||||
|
break; |
||||
|
case 4: |
||||
|
collect = jjsh.stream().collect(Collectors.groupingBy(it -> it.getOrder_type_text())); |
||||
|
break; |
||||
|
case 8: |
||||
|
collect = dzsg.stream().collect(Collectors.groupingBy(it -> it.getOrder_type_text())); |
||||
|
break; |
||||
|
case 12: |
||||
|
collect = dzbw.stream().collect(Collectors.groupingBy(it -> it.getOrder_type_text())); |
||||
|
break; |
||||
|
case 16: |
||||
|
collect = xcys.stream().collect(Collectors.groupingBy(it -> it.getOrder_type_text())); |
||||
|
break; |
||||
|
case 20: |
||||
|
collect = dzyy.stream().collect(Collectors.groupingBy(it -> it.getOrder_type_text())); |
||||
|
break; |
||||
|
} |
||||
|
cellTwoData = leftTitleRowTitle.createCell(2); |
||||
|
long h = collect.get("户用") == null ? 0 : (long) collect.get("户用").size(); |
||||
|
long g = collect.get("工商业") == null ? 0 : (long) collect.get("工商业").size(); |
||||
|
cellTwoData.setCellValue(h+g); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(3); |
||||
|
long hg = collect.get("户用") == null ? 0 : (long) collect.get("户用").stream().mapToInt(it -> Integer.parseInt(it.getAll_power())).sum(); |
||||
|
long gg = collect.get("工商业") == null ? 0 : (long) collect.get("工商业").stream().mapToInt(it -> Integer.parseInt(it.getAll_power())).sum(); |
||||
|
cellTwoData.setCellValue(hg+gg); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(4); |
||||
|
cellTwoData.setCellValue(h); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(5); |
||||
|
cellTwoData.setCellValue(hg); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(6); |
||||
|
List<OrderIndexDb> list = collect.get("户用") == null ? null : collect.get("户用"); |
||||
|
List<OrderIndexDb> listG = collect.get("工商业") == null ? null : collect.get("工商业"); |
||||
|
long ha = 0;int hag = 0;long hz = 0;int hzg = 0;long hq = 0;int hqg = 0; |
||||
|
if (list != null){ |
||||
|
ha = list.stream().filter(it -> it.getData_id().contains("安阳")).count(); |
||||
|
hag = list.stream().filter(it -> it.getData_id().contains("安阳")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum(); |
||||
|
hz = list.stream().filter(it -> it.getData_id().contains("庄河")).count(); |
||||
|
hzg = list.stream().filter(it -> it.getData_id().contains("庄河")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum(); |
||||
|
hq = list.stream().filter(it -> it.getData_id().contains("曲阜")).count(); |
||||
|
hqg = list.stream().filter(it -> it.getData_id().contains("曲阜")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum(); |
||||
|
|
||||
|
} |
||||
|
long ga = 0;int gag = 0;long gz = 0;int gzg = 0;long gq = 0;int gqg = 0; |
||||
|
if (listG != null){ |
||||
|
ga = listG.stream().filter(it -> it.getData_id().contains("安阳")).count(); |
||||
|
gag = listG.stream().filter(it -> it.getData_id().contains("安阳")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum(); |
||||
|
gz = listG.stream().filter(it -> it.getData_id().contains("庄河")).count(); |
||||
|
gzg = listG.stream().filter(it -> it.getData_id().contains("庄河")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum(); |
||||
|
gq = listG.stream().filter(it -> it.getData_id().contains("曲阜")).count(); |
||||
|
gqg = listG.stream().filter(it -> it.getData_id().contains("曲阜")).mapToInt(it -> Integer.parseInt(it.getAll_power())).sum(); |
||||
|
|
||||
|
} |
||||
|
cellTwoData.setCellValue(ha); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(7); |
||||
|
cellTwoData.setCellValue(hag); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(8); |
||||
|
cellTwoData.setCellValue(hz); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(9); |
||||
|
cellTwoData.setCellValue(hzg); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(10); |
||||
|
cellTwoData.setCellValue(hq); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(11); |
||||
|
cellTwoData.setCellValue(hqg); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(12); |
||||
|
cellTwoData.setCellValue(g); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(13); |
||||
|
cellTwoData.setCellValue(gg); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
|
||||
|
cellTwoData = leftTitleRowTitle.createCell(14); |
||||
|
cellTwoData.setCellValue(ga); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(15); |
||||
|
cellTwoData.setCellValue(gag); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(16); |
||||
|
cellTwoData.setCellValue(gz); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(17); |
||||
|
cellTwoData.setCellValue(gzg); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(18); |
||||
|
cellTwoData.setCellValue(gq); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
cellTwoData = leftTitleRowTitle.createCell(19); |
||||
|
cellTwoData.setCellValue(gqg); |
||||
|
cellTwoData.setCellStyle(cellStyle1); |
||||
|
Row leftTitleRowTitleTwo = stuSheet.createRow(5+k); |
||||
|
leftTitleRowTitleTwo.setHeight((short) 600); |
||||
|
Cell cellTwo1 = leftTitleRowTitleTwo.createCell(1); |
||||
|
cellTwo1.setCellValue(sdf.format(endTime).split("-")[1]+"月"); |
||||
|
cellTwo1.setCellStyle(cellStyle1); |
||||
|
k++; |
||||
|
Row leftTitleRowTitleTwo1 = stuSheet.createRow(5+k); |
||||
|
leftTitleRowTitleTwo1.setHeight((short) 600); |
||||
|
Cell cellTwo11 = leftTitleRowTitleTwo1.createCell(1); |
||||
|
cellTwo11.setCellValue("第35周"); |
||||
|
cellTwo11.setCellStyle(cellStyle1); |
||||
|
k++; |
||||
|
Row leftTitleRowTitleTwo11 = stuSheet.createRow(5+k); |
||||
|
leftTitleRowTitleTwo11.setHeight((short) 600); |
||||
|
Cell cellTwo111 = leftTitleRowTitleTwo11.createCell(1); |
||||
|
cellTwo111.setCellValue(sdf11.format(endTime).split("/")[1]+"/"+sdf11.format(endTime).split("/")[2]); |
||||
|
cellTwo111.setCellStyle(cellStyle1); |
||||
|
k=k+2; |
||||
|
i=i+4; |
||||
|
} |
||||
|
File file = new File(filePath); |
||||
|
if (!file.exists()) { |
||||
|
file.mkdirs(); |
||||
|
} |
||||
|
//设置文件名
|
||||
|
String fileName = "货物入库质押表" + sdf.format(new Date()) + ".xlsx"; |
||||
|
|
||||
|
String savePath = filePath + File.separator + fileName; |
||||
|
//下载
|
||||
|
try { |
||||
|
OutputStream fileOut = new FileOutputStream(savePath); |
||||
|
wb.write(fileOut); |
||||
|
fileOut.close(); |
||||
|
}catch (Exception e){ |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.supervise.gf.biz.orderindex.OrderIndexMapper"> |
||||
|
</mapper> |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.supervise.gf.shanhai.req; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author feikefei |
||||
|
* @create 2023-09-21-13:52 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "开发投资") |
||||
|
public class Order_Index { |
||||
|
private String page; |
||||
|
private String limit; |
||||
|
private String group_id; |
||||
|
private String[] search_time; |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
package com.yxt.supervise.gf.shanhai.resp; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author feikefei |
||||
|
* @create 2023-09-21-13:58 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "开发投资") |
||||
|
public class OrderIndex { |
||||
|
private Integer id; |
||||
|
private String order_no; |
||||
|
private Integer admin_id; |
||||
|
private Integer customer_id; |
||||
|
private Integer agent_id; |
||||
|
private Integer product_id; |
||||
|
private Integer create_time; |
||||
|
private String data_id; |
||||
|
private String workflow_unique; |
||||
|
private Integer prototype_id; |
||||
|
private String remain_unique; |
||||
|
private Integer is_best; |
||||
|
private Integer order_type; |
||||
|
private Integer update_time; |
||||
|
private Integer company_id; |
||||
|
private String dg_name; |
||||
|
private Integer contract_life; |
||||
|
private Integer contract_group; |
||||
|
private String agent_name; |
||||
|
private Integer area_id; |
||||
|
private String address; |
||||
|
private Integer component_number; |
||||
|
private Integer component_power; |
||||
|
private String admin_name; |
||||
|
private String admin_phone; |
||||
|
private String user_name; |
||||
|
private String user_phone; |
||||
|
private String id_card; |
||||
|
private String product_name; |
||||
|
private String workflow_name; |
||||
|
private Integer node_id; |
||||
|
private Integer is_agree; |
||||
|
private Integer group_id; |
||||
|
private Integer sign; |
||||
|
private String uplode_contract; |
||||
|
private String company_name; |
||||
|
private String province_name; |
||||
|
private String city_name; |
||||
|
private String area_name; |
||||
|
private Integer assets_no; |
||||
|
private Integer change_order_id; |
||||
|
private String p_agent_name; |
||||
|
private String all_power; |
||||
|
private String order_type_text; |
||||
|
private Integer is_save; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.supervise.gf.shanhai.resp; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author feikefei |
||||
|
* @create 2023-09-21-14:47 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "各地区电站对比") |
||||
|
public class StatisticGroupArea { |
||||
|
private String name; |
||||
|
private String level; |
||||
|
private String parent_code; |
||||
|
private String area_id; |
||||
|
private String count; |
||||
|
private String all_power; |
||||
|
private String power; |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.yxt.supervise.gf.shanhai.resp; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author feikefei |
||||
|
* @create 2023-09-21-15:10 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "项目占比") |
||||
|
public class StatisticGroupDataid { |
||||
|
private String count; |
||||
|
private String name; |
||||
|
private String data_id; |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.yxt.supervise.gf.shanhai.resp; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author feikefei |
||||
|
* @create 2023-09-21-15:01 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "节点占比") |
||||
|
public class StatisticGroupNode { |
||||
|
private String name; |
||||
|
private String count; |
||||
|
} |
Loading…
Reference in new issue