|
@@ -26,78 +26,78 @@ import java.util.*;
|
|
|
public class ShutdowneventService implements BaseService<Shutdownevent, ShutdowneventExample> {
|
|
|
@Resource
|
|
|
private ShutdowneventMapper shutdowneventMapper;
|
|
|
-
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public int deleteByPrimaryKey(String ids) {
|
|
|
-
|
|
|
- List<String> lista=Convert.toListStrArray(ids);
|
|
|
- ShutdowneventExample example=new ShutdowneventExample();
|
|
|
- example.createCriteria().andIdIn(lista);
|
|
|
- return shutdowneventMapper.deleteByExample(example);
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+ List<String> lista=Convert.toListStrArray(ids);
|
|
|
+ ShutdowneventExample example=new ShutdowneventExample();
|
|
|
+ example.createCriteria().andIdIn(lista);
|
|
|
+ return shutdowneventMapper.deleteByExample(example);
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public Shutdownevent selectByPrimaryKey(String id) {
|
|
|
-
|
|
|
- return shutdowneventMapper.selectByPrimaryKey(id);
|
|
|
-
|
|
|
+
|
|
|
+ return shutdowneventMapper.selectByPrimaryKey(id);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public int updateByPrimaryKeySelective(Shutdownevent record) {
|
|
|
return shutdowneventMapper.updateByPrimaryKeySelective(record);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*/
|
|
|
@Override
|
|
|
public int insertSelective(Shutdownevent record) {
|
|
|
-
|
|
|
+
|
|
|
//添加雪花主键id
|
|
|
record.setId(SnowflakeIdWorker.getUUID());
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
return shutdowneventMapper.insertSelective(record);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public int updateByExampleSelective(Shutdownevent record, ShutdowneventExample example) {
|
|
|
-
|
|
|
+
|
|
|
return shutdowneventMapper.updateByExampleSelective(record, example);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public int updateByExample(Shutdownevent record, ShutdowneventExample example) {
|
|
|
-
|
|
|
+
|
|
|
return shutdowneventMapper.updateByExample(record, example);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<Shutdownevent> selectByExample(ShutdowneventExample example) {
|
|
|
-
|
|
|
+
|
|
|
return shutdowneventMapper.selectByExample(example);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public long countByExample(ShutdowneventExample example) {
|
|
|
-
|
|
|
+
|
|
|
return shutdowneventMapper.countByExample(example);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public int deleteByExample(ShutdowneventExample example) {
|
|
|
-
|
|
|
+
|
|
|
return shutdowneventMapper.deleteByExample(example);
|
|
|
}
|
|
|
|
|
@@ -328,9 +328,9 @@ public class ShutdowneventService implements BaseService<Shutdownevent, Shutdown
|
|
|
String eString = formatter.format(endDate);
|
|
|
criteria.andStoptimeGreaterThanOrEqualTo2(bString).andStoptimeLessThanOrEqualTo2(eString);
|
|
|
criteria.andStophoursIsNotNull();
|
|
|
- // criteria.andStoptypeidNotEqualTo("wh");
|
|
|
- // criteria.andStoptypeidNotEqualTo("other");
|
|
|
- // criteria.andStoptypeidNotEqualTo("gzbmq");
|
|
|
+ // criteria.andStoptypeidNotEqualTo("wh");
|
|
|
+ // criteria.andStoptypeidNotEqualTo("other");
|
|
|
+ // criteria.andStoptypeidNotEqualTo("gzbmq");
|
|
|
criteria.andStophoursLessThan(Double.valueOf(24*7));
|
|
|
list= shutdowneventMapper.selectByExample(example);
|
|
|
|
|
@@ -546,27 +546,12 @@ public class ShutdowneventService implements BaseService<Shutdownevent, Shutdown
|
|
|
|
|
|
}
|
|
|
|
|
|
- public PageInfo<ShutdowneventVo> getLongShutdownevent(Tablepar tablepar,String wpId,String wtId, Date beginDate, Date endDate,String type) {
|
|
|
+ public PageInfo<ShutdowneventVo> getLongShutdownevent(int pageNum,int pageSize,String wpId,String wtId, Date beginDate, Date endDate,String type) {
|
|
|
|
|
|
PageInfo<ShutdowneventVo> pageInfo=new PageInfo<>();
|
|
|
List<Shutdownevent> list =new ArrayList<>();
|
|
|
ShutdowneventExample example=new ShutdowneventExample();
|
|
|
String order =null;
|
|
|
- if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
|
|
|
- {
|
|
|
- StringBuilder sb=new StringBuilder();
|
|
|
- sb.append(" ").append(tablepar.getOrderByColumn());
|
|
|
- if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
|
|
|
- {
|
|
|
- sb.append(" ").append(tablepar.getIsAsc());
|
|
|
- }else
|
|
|
- {
|
|
|
- sb.append(" asc ");
|
|
|
- }
|
|
|
- order=String.valueOf(sb);
|
|
|
- }else {
|
|
|
- order=" stoptime desc";
|
|
|
- }
|
|
|
|
|
|
ShutdowneventExample.Criteria criteria =example.createCriteria();
|
|
|
|
|
@@ -584,12 +569,12 @@ public class ShutdowneventService implements BaseService<Shutdownevent, Shutdown
|
|
|
criteria.andStatuscodeEqualTo(Integer.valueOf(type));
|
|
|
}
|
|
|
|
|
|
- criteria.andStophoursGreaterThanOrEqualTo(168.00);//长停168小时
|
|
|
+ criteria.andStophoursGreaterThanOrEqualTo(10.00);//长停168小时
|
|
|
|
|
|
criteria.andStoptimeGreaterThanOrEqualTo(beginDate).andStoptimeLessThanOrEqualTo(endDate);
|
|
|
|
|
|
|
|
|
- PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
list= shutdowneventMapper.selectByExample(example);
|
|
|
List<ShutdowneventVo> sdelist=new ArrayList<>();
|
|
|
|