diff --git a/kas-dao/src/main/java/com/unlcn/ils/kas/dao/model/order/PushOrderLog.java b/kas-dao/src/main/java/com/unlcn/ils/kas/dao/model/order/PushOrderLog.java index 75b71e55fdea0dadf2b7bdb949012752516a8779..cc41323cf54225245d9cf424360d4ba3af28aa6f 100644 --- a/kas-dao/src/main/java/com/unlcn/ils/kas/dao/model/order/PushOrderLog.java +++ b/kas-dao/src/main/java/com/unlcn/ils/kas/dao/model/order/PushOrderLog.java @@ -21,58 +21,61 @@ import java.io.Serializable; @TableName("kas_push_order_log") public class PushOrderLog extends Model { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - @TableId(value="id", type= IdType.AUTO) + @TableId(value = "id", type = IdType.AUTO) private Integer id; - /** - * 1为股份;2为控股;3为五十铃 - */ + /** + * 1为股份;2为控股;3为五十铃 + */ private Integer type; - /** - * 数据量 - */ + /** + * 数据量 + */ @TableField("data_num") private Integer dataNum; - /** - * 已经执行数 - */ + /** + * 已经执行数 + */ @TableField("execut_num") private Integer executNum; - /** - * 插入数 - */ + /** + * 插入数 + */ @TableField("insert_num") private Integer insertNum; - /** - * 更新数 - */ + /** + * 更新数 + */ @TableField("update_num") private Integer updateNum; - /** - * 异常数 - */ + + @TableField("ignore_num") + private int ignoreNum; + /** + * 异常数 + */ @TableField("abnormal_num") private Integer abnormalNum; - /** - * 开始执行时间 - */ + /** + * 开始执行时间 + */ @TableField("start_execut_time") private Date startExecutTime; - /** - * 完成执行时间 - */ + /** + * 完成执行时间 + */ @TableField("finsh_execut_time") private Date finshExecutTime; /** * 拉取线程名称 + * * @return */ @TableField("push_thread_name") private String pushThreadName; - public Integer getId() { return id; } @@ -158,19 +161,19 @@ public class PushOrderLog extends Model { return this.id; } + public int getIgnoreNum() { + return ignoreNum; + } + + public void setIgnoreNum(int ignoreNum) { + this.ignoreNum = ignoreNum; + } + @Override public String toString() { - return "PushOrderLog{" + - "id=" + id + - ", type=" + type + - ", dataNum=" + dataNum + - ", executNum=" + executNum + - ", insertNum=" + insertNum + - ", updateNum=" + updateNum + - ", abnormalNum=" + abnormalNum + - ", startExecutTime=" + startExecutTime + - ", finshExecutTime=" + finshExecutTime + - ", pushThreadName='" + pushThreadName + '\'' + - '}'; + return "PushOrderLog [abnormalNum=" + abnormalNum + ", dataNum=" + dataNum + ", executNum=" + executNum + + ", finshExecutTime=" + finshExecutTime + ", id=" + id + ", ignoreNum=" + ignoreNum + ", insertNum=" + + insertNum + ", pushThreadName=" + pushThreadName + ", startExecutTime=" + startExecutTime + ", type=" + type + + ", updateNum=" + updateNum + "]"; } } diff --git a/kas-service/src/main/java/com/unlcn/ils/kas/service/order/impl/SharesOrderServiceImpl.java b/kas-service/src/main/java/com/unlcn/ils/kas/service/order/impl/SharesOrderServiceImpl.java index acc056c10e8f6f31de8c4e6737ac63f0014eadbb..b10a468c8094432d2306c9ebf921d761720d0851 100644 --- a/kas-service/src/main/java/com/unlcn/ils/kas/service/order/impl/SharesOrderServiceImpl.java +++ b/kas-service/src/main/java/com/unlcn/ils/kas/service/order/impl/SharesOrderServiceImpl.java @@ -336,11 +336,13 @@ public class SharesOrderServiceImpl implements SharesOrderService { // 更新在途跟踪表 if (isNotRequireUpdate(orderOtdList)) { // 当数据更新途径不为ERP(为手工或excel导入)且运抵时间不为空时,不更新数据 + LOGGER.info("(" + orderOtd.getSysOrderNo() + ")不可自动更新"); + executWay = "ignore"; } else { orderOtdService.updateById(orderOtd); LOGGER.info("(" + orderOtd.getSysOrderNo() + ")成功更新订单"); + executWay = "update"; } - executWay = "update"; } else { // 保存在途跟踪表 orderOtd.setGmtCreate(new Date()); @@ -355,8 +357,10 @@ public class SharesOrderServiceImpl implements SharesOrderService { executWay = "insert"; } - // 添加计算预计运抵时间的模块 - updateNewestPositionRelInfo(orderOtd.getSysOrderNo()); + if (!"ignore".equalsIgnoreCase(executWay)) { + // 添加计算预计运抵时间的模块 + updateNewestPositionRelInfo(orderOtd.getSysOrderNo()); + } return executWay; } @@ -1496,6 +1500,7 @@ public class SharesOrderServiceImpl implements SharesOrderService { Integer insertNum = 0; // 插入数 Integer updateNum = 0; // 更新数 Integer abnormalNum = 0; // 异常数 + int ignoreNum = 0; // 忽略数 // 获取线程名称 String pushThreadName = Thread.currentThread().getName(); @@ -1543,6 +1548,9 @@ public class SharesOrderServiceImpl implements SharesOrderService { } else if (executWay.equals("update")) { updateNum++; pushOrderLog.setUpdateNum(updateNum); + } else if ("ignore".equalsIgnoreCase(executWay)) { + ignoreNum++; + pushOrderLog.setIgnoreNum(ignoreNum); } executNum++; } catch (Exception e) {