4144cbcc 张雷

Merge remote-tracking branch 'origin/master' into master

2 个父辈 d38a79b3 8e5b9f5d
正在显示 20 个修改的文件 包含 352 行增加84 行删除
......@@ -44,13 +44,15 @@ public class DigitalUtils {
*/
public static String division(String dividend , String divisor ){
String resultStr = "0";
if( dividend != null && dividend.length()>0 && divisor != null && divisor.length()>0){
if( dividend != null && dividend.length()>0 && divisor != null && divisor.length()>0){
double dividendD = Double.parseDouble(dividend);
double divisorD = Double.parseDouble(divisor);
double result = dividendD /divisorD;
BigDecimal bd = new BigDecimal(result);
BigDecimal roundedResult = bd.setScale(2, BigDecimal.ROUND_HALF_UP);System.out.println(roundedResult);
resultStr = roundedResult.toString();
if(divisorD != 0 ){
double result = dividendD /divisorD;
BigDecimal bd = new BigDecimal(result);
BigDecimal roundedResult = bd.setScale(2, BigDecimal.ROUND_HALF_UP);System.out.println(roundedResult);
resultStr = roundedResult.toString();
}
}
//System.out.print("请输入被除数:");double dividend =scanner.nextDouble();
// System.out.print("请输入除数:");double divisor =scanner.nextDouble();
......
......@@ -4,7 +4,6 @@ import java.io.*;
import java.net.URLEncoder;
import java.util.*;
import java.net.URLDecoder;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
......@@ -325,7 +324,7 @@ public class AjhMeetingMinutesController {
*/
@AutoLog(value = "会议纪要管理-通过会议纪要id下载会议纪要")
@ApiOperation(value="会议纪要管理-通过id下载会议纪要", notes="会议纪要管理-通过id下载会议纪要")
@GetMapping("/exportWordData")
@GetMapping("/exportWord")
public void exportWordData(@RequestParam(name="id",required=true) String meetsId,HttpServletResponse response ) {
String templatePath = "D:\\test\\会议模板-2.docx";//导出模板文件名称
......@@ -414,16 +413,16 @@ public class AjhMeetingMinutesController {
// 输出文件路径 --测试
String outputPath = "D:\\test\\会议纪要导出记录.docx";
/* String outputPath = "D:\\test\\会议纪要导出记录.docx";
FileOutputStream outputFile = new FileOutputStream(outputPath);
document.write( outputFile);
document.write( outputFile);*/
//document.write(response.getOutputStream());
document.write(response.getOutputStream());
// 刷新和关闭输出流
//response.getOutputStream().flush();
//response.getOutputStream().close();
response.getOutputStream().flush();
response.getOutputStream().close();
outputFile.close();
//outputFile.close();
}
catch (Exception e) {
e.printStackTrace();
......
......@@ -2,8 +2,12 @@ package com.skua.modules.algorithm.service;
import com.skua.modules.report.entity.FReportItemv;
import com.skua.modules.report.vo.DepartLoadRateVO;
import com.skua.modules.report.vo.FRportlCommandCenterVO;
import com.skua.modules.report.vo.ReportDateTrendVO;
import com.skua.modules.report.vo.ReportItemvParam;
import java.util.List;
import java.util.Map;
/**
* <pre>
......@@ -17,17 +21,17 @@ public interface ICommandCentreService {
/**
* 指挥中心---运行负荷率分析
* @param loadRateType
* @param reportItemvParam
* @return
*/
public List<DepartLoadRateVO> statisticsByLoadRate(Integer loadRateType);
public List<DepartLoadRateVO> statisticsByLoadRate(ReportItemvParam reportItemvParam);
/**
* 指挥中心---运行负荷率分析 总数查询
* @param loadRateType
* @return
*/
public int statisticsByLoadRateNum(int loadRateType);
public int statisticsByLoadRateNum(int loadRateType,String startDate, String endDate);
/**
......@@ -40,14 +44,24 @@ public interface ICommandCentreService {
public FReportItemv getReportItemvByReitIdAndDate(String reportId, String reportItemCode, String startDate, String endDate);
/**
* 根据reitId查询近7天数据
* @param reportId
* @param reportItemCode
* @param dateTime
* 根据reitId查询近几天数据
* @param reportItemvParam
* @return
*/
public List<String> getReportItemvByReitIdAndDate7Day(String reportId, String reportItemCode, String dateTime);
public List<ReportDateTrendVO> getReportItemvByReitIdAndDate7Day(ReportItemvParam reportItemvParam);
/***
* 查询报表数据,当前月统计、上个月统计、去年当月统计(求和)
* @param reportItemvParam
* @return
*/
public FRportlCommandCenterVO getReportItemvMonthDataByReitId(ReportItemvParam reportItemvParam);
/***
* 查询报表数据,当日平均、上月同期、去年同期统计(求均值)
* @param reportItemvParam
* @return
*/
public FRportlCommandCenterVO getReportItemvDayDataByReitId( ReportItemvParam reportItemvParam);
}
......
package com.skua.modules.algorithm.service.impl;
import com.skua.modules.algorithm.service.ICommandCentreService;
import com.skua.modules.report.entity.FReportItem;
import com.skua.modules.report.entity.FReportItemv;
import com.skua.modules.report.mapper.FReportItemMapper;
import com.skua.modules.report.vo.DepartLoadRateVO;
import com.skua.modules.report.mapper.FReportItemvMapper;
import com.skua.modules.report.vo.FRportlCommandCenterVO;
import com.skua.modules.report.vo.ReportDateTrendVO;
import com.skua.modules.report.vo.ReportItemvParam;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -27,11 +31,11 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
private FReportItemMapper reportItemMapper;
/**
* 指挥中心---运行负荷率分析
* @param loadRateType
* @param reportItemvParam
* @return
*/
public List<DepartLoadRateVO> statisticsByLoadRate(Integer loadRateType){
return fReportItemvMapper.statisticsByLoadRate(loadRateType);
public List<DepartLoadRateVO> statisticsByLoadRate(ReportItemvParam reportItemvParam){
return fReportItemvMapper.statisticsByLoadRate(reportItemvParam.getLoadRateType(),reportItemvParam.getStartDate(),reportItemvParam.getEndDate());
}
/**
......@@ -39,8 +43,8 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
* @param loadRateType
* @return
*/
public int statisticsByLoadRateNum(int loadRateType){
return fReportItemvMapper.statisticsByLoadRateNum(loadRateType);
public int statisticsByLoadRateNum(int loadRateType,String startDate, String endDate){
return fReportItemvMapper.statisticsByLoadRateNum(loadRateType ,startDate, endDate );
}
/**
......@@ -53,29 +57,120 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
public FReportItemv getReportItemvByReitIdAndDate(String reportId, String reportItemCode, String startDate, String endDate){
//根据reportId 与reportItemCode 查询reitId;
List<String> reitIdList = reportItemMapper.getReportItemId(reportId,reportItemCode);
//String reitId = reportItemMapper.getReportItemId(reportId,reportItemCode);
FReportItemv reportItemv = null;
if(reitIdList != null ){
reportItemv = fReportItemvMapper.getReportItemvByReitIdAndDate(reitIdList.get(0) , startDate , endDate);
List<FReportItem> reportItemList = reportItemMapper.getItemInfoByItemCode(reportItemCode,reportId);
if(reportItemList != null && !reportItemList.isEmpty() ){
reportItemv = fReportItemvMapper.getReportItemvByReitIdAndDate(reportItemList.get(0).getId() , startDate , endDate);
}
return reportItemv;
}
/**
* 根据reitId查询近7天数据
* @param reportId
* @param reportItemCode
* @param dateTime
* @param reportItemvParam
* @return
*/
public List<String> getReportItemvByReitIdAndDate7Day(String reportId, String reportItemCode, String dateTime){
public List<ReportDateTrendVO> getReportItemvByReitIdAndDate7Day(ReportItemvParam reportItemvParam){
//根据reportId 与reportItemCode 查询reitId;
List<String> reitIdList = reportItemMapper.getReportItemId(reportId,reportItemCode);
List<String> dataList = null;
if(reitIdList != null ){
dataList = fReportItemvMapper.getReportItemvByReitIdAndDate7Day(reitIdList.get(0) , dateTime);
String reitId = this.getReitId(reportItemvParam);
List<ReportDateTrendVO> dataList = null;
if(reitId != null ){
reportItemvParam.setReitId( reitId );
dataList = fReportItemvMapper.getReportItemvByReitIdAndDate7Day(reportItemvParam);
}
return dataList;
}
/***
* 查询报表数据,当前月统计、上个月统计、去年当月统计(求和)
* @param reportItemvParam
* @return
*/
public FRportlCommandCenterVO getReportItemvMonthDataByReitId(ReportItemvParam reportItemvParam){
FRportlCommandCenterVO fRportlCommandCenterVO = null;
//根据reportId 与reportItemCode 查询reitId;
String reitId = this.getReitId(reportItemvParam);
if(reitId != null ){
reportItemvParam.setReitId( reitId );
fRportlCommandCenterVO = fReportItemvMapper.getReportItemvMonthDataByReitId(reportItemvParam);
}else{
fRportlCommandCenterVO = new FRportlCommandCenterVO("0","0","0");
}
/* String reitId = getReitId(reportItemvParam.getReportItemCode(),reportItemvParam.getReportId());
if(reitId != null ){
reportItemvParam.setReitId( reitId );
fRportlCommandCenterVO = fReportItemvMapper.getReportItemvMonthDataByReitId(reportItemvParam);
}else{
fRportlCommandCenterVO = new FRportlCommandCenterVO("0","0","0");
}*/
return fRportlCommandCenterVO;
}
/***
* 查询报表数据,当日平均、上月同期、去年同期统计(求均值)
* @param reportItemvParam
* @return
*/
public FRportlCommandCenterVO getReportItemvDayDataByReitId( ReportItemvParam reportItemvParam){
/* //根据reportId 与reportItemCode 查询reitId;
List<FReportItem> reportItemList = reportItemMapper.getItemInfoByItemCode(reportItemvParam.getReportItemCode(),reportItemvParam.getReportId());
FRportlCommandCenterVO fRportlCommandCenterVO = null;
if(reportItemList != null && !reportItemList.isEmpty()){
reportItemvParam.setReitId( reportItemList.get(0).getId() );
fRportlCommandCenterVO = fReportItemvMapper.getReportItemvDayDataByReitId(reportItemvParam);
}*/
FRportlCommandCenterVO fRportlCommandCenterVO = null;
//根据reportId 与reportItemCode 查询reitId;
String reitId = this.getReitId(reportItemvParam);
if(reitId != null ){
reportItemvParam.setReitId( reitId );
fRportlCommandCenterVO = fReportItemvMapper.getReportItemvDayDataByReitId(reportItemvParam);
}else{
fRportlCommandCenterVO = new FRportlCommandCenterVO("0","0","0");
}
return fRportlCommandCenterVO;
}
/***
* 根据String itemCode, String reportId 查询reitId字段
* @param reportItemvParam
* @return
*/
private String getReitId( ReportItemvParam reportItemvParam){
List<FReportItem> reitIdList = reportItemMapper.getItemInfoByItemCode(reportItemvParam.getReportItemCode(),reportItemvParam.getReportId());
String reitId = null;
if(reitIdList != null && !reitIdList.isEmpty()){
reitId = reitIdList.get(0).getId();
}
return reitId;
}
/* private String getReitId( String itemCode, String reportId){
JdbcTemplate jdbcTemplate = (JdbcTemplate) SpringContextUtils.getBean("master");
String sql = "select id from f_report_item where report_id = '"+reportId+"' and required='1' and item_code = '"+itemCode+"'";
// String sql = "SELECT column_name FROM table_name WHERE condition";
List<String> reitIdList = jdbcTemplate.query(sql, (rs, rowNum) -> rs.getString("id"));
//该方法会返回查询结果集中的第一条记录对应的指定字段值。
//String sql = "SELECT column_name FROM table_name WHERE condition";
//String reitId = jdbcTemplate.queryForObject(sql, String.class);
System.out.println(reitIdList+"----reitIdList");
String reitId = null;
if(reitIdList != null && !reitIdList.isEmpty()){
reitId = reitIdList.get(0);
}
return reitId;
}*/
}
......
......@@ -26,4 +26,11 @@ public class StackedAreaChartDataVO implements Serializable {
@ApiModelProperty(value = "日历集合")
List<String> dateList;
@ApiModelProperty(value = "日历集合")
List<String> xAxis;
@ApiModelProperty(value = "日历集合")
List<String> yAxis;
}
......
package com.skua.modules.guest.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Stream;
/**
* @author sonin
......@@ -80,6 +82,74 @@ public class DateUtil {
return formattedDate;
}
/***
* 字符串日期格式化
* @param date
* @param format
* @return
*/
public static String formatDate(String date , String format){
if(format == null ){
format = "yyyy-MM-dd";
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat formatSDF = new SimpleDateFormat(format);
// 转化成日期类型
try {
Date startDate = sdf.parse(date);
date = formatSDF.format(startDate);
} catch (ParseException e) {
e.printStackTrace();
}
return date;
}
/**
* 获取两个日期之间的所有日期 (年月日)
*
* @param startTime
* @param endTime
* @return
*/
public static List<String> getBetweenDate(String startTime, String endTime,String format){
if(format == null ){
format = "yyyy-MM-dd";
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat formatSDF = new SimpleDateFormat(format);
// 声明保存日期集合
List<String> list = new ArrayList<String>();
try {
// 转化成日期类型
Date startDate = sdf.parse(startTime);
Date endDate = sdf.parse(endTime);
Date currentDate = new Date();
if(currentDate.getTime() < endDate.getTime() ){
endDate = currentDate;
}
//用Calendar 进行日期比较判断
Calendar calendar = Calendar.getInstance();
while (startDate.getTime() < endDate.getTime()){
// 把日期添加到集合
list.add(formatSDF.format(startDate));
// 设置日期
calendar.setTime(startDate);
//把日期增加一天
calendar.add(Calendar.DATE, 1);
// 获取增加后的日期
startDate=calendar.getTime();
}
} catch (ParseException e) {
e.printStackTrace();
}
return list;
}
/**
* 获取7天日期数据,并指定显示格式
* @param dateFormat
......
......@@ -85,23 +85,26 @@ public class SafetyOffenceRecordController {
String role_ah_id = sysConfigService.queryValueByKey("ROLE_AH_ADMIN");//安环管理员角色编号
String role_cz_id = sysConfigService.queryValueByKey("ROLE_CZ");//厂长角色编号
String userRoleIds = BaseContextHandler.getRoles();
safetyOffenceRecord.setDepartId( "0" );//屏蔽数据使用;非安环管理员、与厂长角色看不到数据
//安装部长角色看集团类型的违法上报
if( userRoleIds != null && userRoleIds.contains( role_ah_id ) ){//判断安环管理员
safetyOffenceRecord.setDepartId( null );
safetyOffenceRecord.setReportType("1");//上报集团--默认
flag = false;
}
if( userRoleIds != null && userRoleIds.contains( role_cz_id ) ){//判断 厂长 ,查询分管的所有长编号
safetyOffenceRecord.setDepartId( BaseContextHandler.getDeparts() );//BaseContextHandler.getRealDepartId()
safetyOffenceRecord.setReportType("2");//上报厂长
flag = true;
}
//各个厂长角色看到厂长类型的违法上报 departId
QueryWrapper<SafetyOffenceRecord> queryWrapper = QueryGenerator.initQueryWrapper(safetyOffenceRecord, req.getParameterMap());
Page<SafetyOffenceRecord> page = new Page<SafetyOffenceRecord>(pageNo, pageSize);
if(flag ){
queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(","));
}
IPage<SafetyOffenceRecord> pageList = safetyOffenceRecordService.page(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
......
......@@ -58,6 +58,7 @@ public class SafetyOffenceRecord {
/**上报类型:1 上报集团 2 上报厂长*/
@Excel(name = "上报类型:1 上报集团 2 上报厂长", width = 15)
@ApiModelProperty(value = "上报类型:1 上报集团 2 上报厂长")
@Dict(dicCode = "safe_offence_report_type")
private String reportType;
/**违章照片*/
@Excel(name = "违章照片", width = 15)
......
......@@ -42,6 +42,7 @@ public class SafetyOffenceStandard {
/**违章标准类型*/
@Excel(name = "违章标准类型", width = 15)
@ApiModelProperty(value = "违章标准类型")
@Dict(dicCode="safe_offence_type")
private String offenceType;
/**备注*/
@Excel(name = "备注", width = 15)
......
......@@ -127,7 +127,7 @@ mybatis-plus:
configuration:
call-setters-on-nulls: true
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#数矿专用配置
skua:
web-url: http://192.168.100.29:3000
......@@ -188,3 +188,6 @@ ar-remote-meeting:
url: https://47.104.179.187:8443/api/
# mqtt服务地址
mqtt-url: tcp://47.104.179.187:1883
......
......@@ -18,13 +18,6 @@ public interface FReportItemMapper extends BaseMapper<FReportItem> {
List<FReportItem> getListByReportId(@Param("reportId") String reportId);
/**
* 根据 itemCode 与reportId 查询id
* @param reportId
* @param reportItemCode
* @return
*/
public List<String> getReportItemId(@Param("reportId") String reportId,@Param("itemCode") String reportItemCode);
void changeStatus(@Param("id") String id, @Param("required") String required);
......
package com.skua.modules.report.mapper;
import com.skua.modules.report.vo.DepartLoadRateVO;
import com.skua.modules.report.vo.FRportlCommandCenterVO;
import com.skua.modules.report.vo.ReportDateTrendVO;
import com.skua.modules.report.vo.ReportItemvParam;
import org.apache.ibatis.annotations.Param;
import com.skua.modules.report.entity.FReportItemv;
......@@ -58,20 +60,34 @@ public interface FReportItemvMapper extends BaseMapper<FReportItemv> {
* @param loadRateType
* @return
*/
public List<DepartLoadRateVO> statisticsByLoadRate(@Param("loadRateType") Integer loadRateType);
public List<DepartLoadRateVO> statisticsByLoadRate(@Param("loadRateType") Integer loadRateType,@Param("startDate") String startDate,@Param("endDate") String endDate);
/**
* 指挥中心---运行负荷率分析 总数查询
* @param loadRateType
* @return
*/
public int statisticsByLoadRateNum(@Param("loadRateType") Integer loadRateType);
public int statisticsByLoadRateNum(@Param("loadRateType") Integer loadRateType,@Param("startDate") String startDate,@Param("endDate") String endDate);
/**
* 根据reitId查询近7天数据
* @param reitId
* @param dateTime
* @param reportItemvParam
* @return
*/
public List<ReportDateTrendVO> getReportItemvByReitIdAndDate7Day(ReportItemvParam reportItemvParam);
/***
* 查询报表数据,当前月统计、上个月统计、去年当月统计(求和)
* @param reportItemvParam
* @return
*/
public FRportlCommandCenterVO getReportItemvMonthDataByReitId( ReportItemvParam reportItemvParam);
/***
* 查询报表数据,当日平均、上月同期、去年同期统计(求均值)
* @param reportItemvParam
* @return
*/
public List<String> getReportItemvByReitIdAndDate7Day(@Param("reitId") String reitId, @Param("dateTime") String dateTime);
public FRportlCommandCenterVO getReportItemvDayDataByReitId(ReportItemvParam reportItemvParam);
}
......
......@@ -19,13 +19,6 @@
</select>
<!-- 根据 itemCode 与reportId 查询id -->
<select id="getReportItemId" resultType="java.lang.String">
select id from f_report_item
where report_id = #{reportId} and required='1' and item_code = #{itemCode}
</select>
<update id="changeStatus">
update f_report_item set required = #{required} where id = #{id}
</update>
......
......@@ -101,10 +101,29 @@
</select>
<!-- 根据reitId查询近7天数据-->
<select id="statisticsByLoadRateNum" resultType="java.lang.Integer">
SELECT sum(item_value) FROM f_report_itemv where reit_id=#{reitId} and DATE_SUB( CURDATE(), INTERVAL 7 DAY ) &lt;= date(data_time)
<select id="getReportItemvByReitIdAndDate7Day" resultType="com.skua.modules.report.vo.ReportDateTrendVO">
SELECT sum(item_value) as 'value' , data_time as 'date' FROM f_report_itemv where reit_id=#{reitId} and data_time &gt;= #{startDate} and data_time &lt;= #{endDate}
group by data_time
</select>
<!--查询报表数据,当前月统计、上个月统计、去年当月统计(求和) -->
<select id="getReportItemvMonthDataByReitId" resultType="com.skua.modules.report.vo.FRportlCommandCenterVO">
select
IFNULL(( SELECT sum(item_value) FROM f_report_itemv where reit_id=#{reitId} and data_time &gt;= #{startDate} and data_time &lt;= #{endDate}),0) as 'value',
IFNULL(( SELECT sum(item_value) FROM f_report_itemv where reit_id=#{reitId} and data_time &gt;= #{lastMonthStartDate} and data_time &lt;= #{lastMonthEndDate}),0) as 'valueTb',
IFNULL(( SELECT sum(item_value) FROM f_report_itemv where reit_id=#{reitId} and data_time &gt;= #{lastYearStartDate} and data_time &lt;= #{lastYearEndDate} ),0) as 'valueHb'
from dual
</select>
<!--查询报表数据,当日平均、上月同期、去年同期统计(求均值) -->
<select id="getReportItemvDayDataByReitId" resultType="com.skua.modules.report.vo.FRportlCommandCenterVO">
select
IFNULL(( SELECT avg(item_value) FROM f_report_itemv where reit_id=#{reitId} and data_time &gt;= #{startDate} and data_time &lt;= #{endDate}),0) as 'value',
IFNULL(( SELECT avg(item_value) FROM f_report_itemv where reit_id=#{reitId} and data_time &gt;= #{lastMonthStartDate} and data_time &lt;= #{lastMonthEndDate}),0) as 'valueTb',
IFNULL(( SELECT avg(item_value) FROM f_report_itemv where reit_id=#{reitId} and data_time &gt;= #{lastYearStartDate} and data_time &lt;= #{lastYearEndDate} ),0) as 'valueHb'
from dual
</select>
</mapper>
......
package com.skua.modules.report.vo;
import com.skua.tool.util.DigitalUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -23,4 +24,20 @@ public class DepartLoadRateVO implements Serializable{
@ApiModelProperty(value = "处理水量(吨/月)")
private String waterYieldMonth;
/***
* 计算精度
*/
public void accuracy(){
String loadRate = getLoadRate();
setLoadRate(DigitalUtils.division(loadRate , "1.0" ));
String qualifyRate = getQualifyRate();
setQualifyRate(DigitalUtils.division(qualifyRate , "1.0" ));
String waterYieldMonth = getWaterYieldMonth();
this.setWaterYieldMonth( DigitalUtils.division(waterYieldMonth , "1.0" ) );
}
}
......
......@@ -16,31 +16,22 @@ public class FRportlCommandCenterVO implements Serializable {
private String title;
@ApiModelProperty(value = "结果")
private String value;
/* @ApiModelProperty(value = "最大值")
private Object maxValue;
@ApiModelProperty(value = "最小值")
private Object minValue;*/
@ApiModelProperty(value = "上月同期")
private String valueTb;
@ApiModelProperty(value = "去年同期")
private String valueHb;
/* @ApiModelProperty(value = "同比比例")
private Object valueTbProportion;
@ApiModelProperty(value = "同比差值")
private Object valueTbDifference;
public FRportlCommandCenterVO() {
}
public FRportlCommandCenterVO(String value) {
this.value = value;
}
@ApiModelProperty(value = "环比比例")
private Object valueHbProportion;
@ApiModelProperty(value = "环比差值")
private Object valueHbDifference;
@ApiModelProperty(value = "上期")
private Object valuePre;
@ApiModelProperty(value = "上期比例")
private Object valuePreProportion;
@ApiModelProperty(value = "上期差值")
private Object valuePreDifference;
@ApiModelProperty(value = "单位")
private String unit;*/
public FRportlCommandCenterVO(String value, String valueTb, String valueHb) {
this.value = value;
this.valueTb = valueTb;
this.valueHb = valueHb;
}
}
......
package com.skua.modules.report.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 统计功能配置表
*/
@Data
@ApiModel(value="控制中心报表---日期趋势对象", description="控制中心报表---日期趋势对象")
public class ReportDateTrendVO implements Serializable{
@ApiModelProperty(value = "当前月数据")
private String date;
@ApiModelProperty(value = "当前月数据")
private String value;
}
......@@ -47,6 +47,10 @@ public class ReportItemvParam implements Serializable{
private java.lang.String lastYearEndDate;
@ApiModelProperty(value = "负载率类型")
private Integer loadRateType;
/**
* 初始化数据
* @param startTime
......@@ -54,7 +58,26 @@ public class ReportItemvParam implements Serializable{
*/
public ReportItemvParam(String reportId ,String reportItemCode ,String startTime , String endTime){
try {
this.reitId = reportId;
this.reportId = reportId;
this.reportItemCode = reportItemCode;
if(startTime != null && startTime.length() > 0 ){
this.startDate = startTime;
this.lastMonthStartDate = DateUtils.formatAddTime(startTime, "yyyy-MM-dd", Calendar.MONTH, -1);
this.lastYearStartDate = DateUtils.formatAddTime(startTime, "yyyy-MM-dd", Calendar.YEAR, -1);
}
if(endTime != null && endTime.length() > 0 ){
this.endDate = endTime;
this.lastMonthEndDate = DateUtils.formatAddTime(endTime, "yyyy-MM-dd", Calendar.MONTH, -1);
this. lastYearEndDate = DateUtils.formatAddTime(endTime, "yyyy-MM-dd", Calendar.YEAR, -1);
}
} catch (ParseException e) {
e.printStackTrace();
}
}
public void initData(String reportId ,String reportItemCode ,String startTime , String endTime){
try {
this.reportId = reportId;
this.reportItemCode = reportItemCode;
if(startTime != null && startTime.length() > 0 ){
this.startDate = startTime;
......@@ -72,4 +95,5 @@ public class ReportItemvParam implements Serializable{
}
}
......
......@@ -491,7 +491,7 @@
</select>
<!-- 获取总的设计规模-->
<select id="" resultType="java.lang.String">
<select id="querySumProScale" resultType="java.lang.String">
select sum(pro_scale) from sys_factory_info
</select>
</mapper>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!