|
@@ -6,6 +6,7 @@ import com.github.zuihou.authority.dao.auth.StationUserLoginInfoMapper;
|
|
|
import com.github.zuihou.authority.dao.auth.UserMapper;
|
|
|
import com.github.zuihou.authority.entity.auth.StationUserLoginInfo;
|
|
|
import com.github.zuihou.authority.entity.auth.User;
|
|
|
+import com.github.zuihou.base.R;
|
|
|
import com.github.zuihou.base.service.SuperServiceImpl;
|
|
|
import com.github.zuihou.business.DemoLine.DemoCacheKey;
|
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
@@ -38,6 +39,7 @@ import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
|
|
|
import com.github.zuihou.tenant.service.CodeRuleService;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -982,7 +984,33 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
}
|
|
|
}
|
|
|
return map;
|
|
|
+ }
|
|
|
|
|
|
+ @Override
|
|
|
+ public R getStationTasks(Map<String, Object> map){
|
|
|
+ List<Map> stationTasks = baseMapper.getStationTasks(map);
|
|
|
+ for(int i = 1; i<= stationTasks.size() ; i++){
|
|
|
+ stationTasks.get(i-1).put("step",i);
|
|
|
+ }
|
|
|
+ return R.success(stationTasks);
|
|
|
+ }
|
|
|
|
|
|
+ @Override
|
|
|
+ public R updateTaskStatus(Map<String, Object> map){
|
|
|
+ TTask tTask = baseMapper.selectById(Long.valueOf(map.get("id").toString()));
|
|
|
+ String type = map.get("updateType").toString();
|
|
|
+ if("begin".equals(type)) {
|
|
|
+ if(null == tTask.getStartTime()) {
|
|
|
+ tTask.setStartTime(Calendar.getInstance().getTime());
|
|
|
+ baseMapper.updateById(tTask);
|
|
|
+ }
|
|
|
+ }else if("end".equals(type)) {
|
|
|
+ if(null == tTask.getEndTime()) {
|
|
|
+ tTask.setEndTime(Calendar.getInstance().getTime());
|
|
|
+ tTask.setStatus("3");
|
|
|
+ baseMapper.updateById(tTask);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return R.success();
|
|
|
}
|
|
|
}
|