main
周文涛 2 years ago
parent 2019e06fbb
commit 677f6831ff

@ -209,10 +209,19 @@ public class ZxCelueServiceImpl extends ServiceImpl<ZxCelueMapper, ZxCelue> impl
//获取执行时段
if (StringUtils.isNotBlank(zxCelue.getTriggereTime())) {
String[] s = zxCelue.getTriggereTime().split(" ");
String exeTime=null;
if (s.length==6) {
//有秒
String s2 = new DecimalFormat("00").format(Integer.parseInt(s[2]));
String s1 = new DecimalFormat("00").format(Integer.parseInt(s[1]));
String s0 = new DecimalFormat("00").format(Integer.parseInt(s[0]));
String exeTime=s2+":"+s1+":"+s0;
exeTime=s2+":"+s1+":"+s0;
}else {
//没有秒
String s1 = new DecimalFormat("00").format(Integer.parseInt(s[1]));
String s0 = new DecimalFormat("00").format(Integer.parseInt(s[0]));
exeTime=s1+":"+s0+":00";
}
zxCelueDTO.setExeTime(exeTime);
}
return zxCelueDTO;

Loading…
Cancel
Save