/** * 批量新增地点信息同步失败 修改 ETS_FA_NEW_LOC 状态 STATUS:2 同步失败 * * @param errorItemList * @return */ public List getUpdateSynErrorLogModel(String batchId, List<MisLocDTO> errorItemList) { List sqlModelList = new ArrayList(); SQLModel sqlModel = null; for (int i = 0; i < errorItemList.size(); i++) { MisLocDTO errorItem = errorItemList.get(i); sqlModel = new SQLModel(); List sqlArgs = new ArrayList(); String sqlStr = "UPDATE ETS_FA_NEW_LOC\n" + " SET STATUS = 2, MSG = ?\n" + " WHERE BATCH_ID = ?\n" + " AND CODE = ?"; sqlArgs.add("同步地点失败"); sqlArgs.add(batchId); sqlArgs.add(errorItem.getCode()); sqlModel.setSqlStr(sqlStr); sqlModel.setArgs(sqlArgs); sqlModelList.add(sqlModel); } return sqlModelList; }
/** * 批量新增地点信息同步成功 batchId:序列 修改 ETS_FA_NEW_LOC 状态 STATUS:1 同步成功 * * @param batchId 序列 * @param Loglist: list * @return */ public List getUpdateSynLogModel(String batchId, List<MisLocDTO> Loglist) { List sqlModelList = new ArrayList(); SQLModel sqlModel = null; for (int i = 0; i < Loglist.size(); i++) { MisLocDTO dto = Loglist.get(i); sqlModel = new SQLModel(); List sqlArgs = new ArrayList(); String sqlStr = "UPDATE ETS_FA_NEW_LOC\n" + " SET STATUS = 1, MSG = ?\n" + " WHERE BATCH_ID=? \n" + // " AND CODE = ?"; " AND LOCATION_ID = ?"; sqlArgs.add("同步成功"); sqlArgs.add(batchId); sqlArgs.add(dto.getKey()); sqlModel.setSqlStr(sqlStr); sqlModel.setArgs(sqlArgs); sqlModelList.add(sqlModel); } return sqlModelList; }