提交 7513fed1 authored 作者: inroi's avatar inroi

完成代码

上级 911369fa
......@@ -19,8 +19,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.shr.utils.*;
import cn.hutool.core.lang.Console;
/**
* @author Inori
*/
......
......@@ -11,8 +11,6 @@ import com.shr.transfer.task.ToDoTaskListOutVo;
import com.shr.utils.HttpClientUtil;
import com.shr.utils.JsonUtil;
import cn.hutool.core.lang.Console;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
......@@ -50,26 +48,8 @@ public class ToDoTaskServiceImpl implements IToDoTaskService {
List<Map<String, Object>> tempList = new ArrayList<>();
if(rs == null)
{
Console.log("rs为空");
}
else
{
Console.log("rs不为空");
}
if(rs.getRows() == null)
{
Console.log("rs.getRows()未空");
}
for(SortedMap map : rs.getRows())
{
if(map == null)
{
Console.log("map未空");
}
Map<String, Object> reqeust = new HashMap<>();
reqeust.put("taskId",map.get("FASSIGNID"));
reqeust.put("registerCode", "3001");
......@@ -103,26 +83,9 @@ public class ToDoTaskServiceImpl implements IToDoTaskService {
return;
}
if(rs == null)
{
Console.log("rs为空df");
}
else
{
Console.log("rs不为空df");
}
if(rs.getRows() == null)
{
Console.log("rs.getRows()未空df");
}
List<Map<String, Object>> tempList = new ArrayList<>();
for(SortedMap map : rs.getRows())
{
if(map == null)
{
Console.log("map未空df");
}
Map<String, Object> reqeust = new HashMap<>();
reqeust.put("taskId",map.get("ID"));
reqeust.put("registerCode", "3001");
......
......@@ -36,40 +36,19 @@ public class ToDoTaskJob {
dbHelper = new DBHelper(dataSource);
Result result = dbHelper.executeQuery("select T0.FASSIGNID, T0.FSUBJECT_L1 || ' ' || T0.FPRIORPERFORMERNAME_L1 || '的' || T0.FPROCDEFNAME_L1 FSUBJECT_L1, T0.FCreatedTime, T1.FNUMBER FUserNumber, T2.FNUMBER FUserNumber2 from t_wfr_assign_view T0 inner join t_pm_user T1 on T0.FPERSONUSERID = T1.FID inner join t_pm_user T2 on T0.FPRIORPERFORMER = T2.FID where FASSIGNID in (select ID from t_wfr_assignSendInfo where ISSEND = '0')");
if(result == null)
{
Console.log("result为空");
}
else
{
Console.log("result不为空");
}
toDoTaskService.toDoTaskList(result);
dbHelper = new DBHelper(dataSource);
dbHelper.executeUpdate("update t_wfr_assignSendInfo set ISSEND = '1' where ISSEND = '0'", null);
Console.log("定时器结束 toDoTaskList!");
Console.log("定时器开始 toDoTaskDetailList!");
dbHelper = new DBHelper(dataSource);
result = dbHelper.executeQuery("select ID from t_wfr_assignSendInfo where ISSEND = '1' and ISUPDATE = '0' and ID not in (select FASSIGNID from t_wfr_assign_view)", null);
if(result == null)
{
Console.log("result为空df");
}
else
{
Console.log("result不为空df");
}
toDoTaskService.toDoTaskDetailList(result);
dbHelper = new DBHelper(dataSource);
dbHelper.executeUpdate("delete t_wfr_assignSendInfo where ID not in (select FASSIGNID from t_wfr_assign_view)", null);
Console.log("定时器结束 toDoTaskDetailList!");
Console.log("定时器结束 toDoTaskList!");
return RestResponse.success("同步成功");
}
}
......@@ -117,24 +117,7 @@ private Connection con; //连接对象
setSqlValues(pst,sqlValues);
}
rst=pst.executeQuery();
if(rst == null)
{
Console.log("executeQuery.rst为空");
}
else
{
Console.log("executeQuery.rst不为空");
}
result=ResultSupport.toResult(rst); //一定要在关闭数据库之前完成转换
if(result == null)
{
Console.log("executeQuery.result为空");
}
else
{
Console.log("executeQuery.result不为空");
}
result=ResultSupport.toResult(rst); //一定要在关闭数据库之前完成转换
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论