| | |
| | | if (!Cools.isEmpty(orderByField)){ |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } else { |
| | | wrapper.orderBy("create_time", false); |
| | | wrapper.orderBy("CREATE_TIME", false); |
| | | } |
| | | return R.ok(basErrLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper.eq("status",0))); |
| | | return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper.eq("STATUS",0))); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderDesc(Collections.singleton("create_time")); |
| | | wrapper.orderDesc(Collections.singleton("CREATE_TIME")); |
| | | return R.ok(taskWrkLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "\"id\"", type = IdType.AUTO) |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @TableField("\"uuid\"") |
| | | @TableField("UUID") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 工作号 |
| | | */ |
| | | @ApiModelProperty(value= "工作号") |
| | | @TableField("\"wrk_no\"") |
| | | @TableField("WRK_NO") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 发生时间 |
| | | */ |
| | | @ApiModelProperty(value= "发生时间") |
| | | @TableField("\"start_time\"") |
| | | @TableField("START_TIME") |
| | | private Date startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value= "结束时间") |
| | | @TableField("\"end_time\"") |
| | | @TableField("END_TIME") |
| | | private Date endTime; |
| | | |
| | | /** |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @TableField("\"wrk_sts\"") |
| | | @TableField("WRK_STS") |
| | | private Long wrkSts; |
| | | |
| | | /** |
| | | * 入出库类型 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型") |
| | | @TableField("\"io_type\"") |
| | | @TableField("IO_TYPE") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 堆垛机 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机") |
| | | @TableField("\"crn_no\"") |
| | | @TableField("CRN_NO") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * plc |
| | | */ |
| | | @ApiModelProperty(value= "plc") |
| | | @TableField("\"plc_no\"") |
| | | @TableField("PLC_NO") |
| | | private Integer plcNo; |
| | | |
| | | /** |
| | | * 目标库位 |
| | | */ |
| | | @ApiModelProperty(value= "目标库位") |
| | | @TableField("\"loc_no\"") |
| | | @TableField("LOC_NO") |
| | | private String locNo; |
| | | |
| | | /** |
| | | * 目标站 |
| | | */ |
| | | @ApiModelProperty(value= "目标站") |
| | | @TableField("\"sta_no\"") |
| | | @TableField("STA_NO") |
| | | private Integer staNo; |
| | | |
| | | /** |
| | | * 源站 |
| | | */ |
| | | @ApiModelProperty(value= "源站") |
| | | @TableField("\"source_sta_no\"") |
| | | @TableField("SOURCE_STA_NO") |
| | | private Integer sourceStaNo; |
| | | |
| | | /** |
| | | * 源库位 |
| | | */ |
| | | @ApiModelProperty(value= "源库位") |
| | | @TableField("\"source_loc_no\"") |
| | | @TableField("SOURCE_LOC_NO") |
| | | private String sourceLocNo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @TableField("\"barcode\"") |
| | | @TableField("BARCODE") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 异常码 |
| | | */ |
| | | @ApiModelProperty(value= "异常码") |
| | | @TableField("\"err_code\"") |
| | | @TableField("ERR_CODE") |
| | | private Integer errCode; |
| | | |
| | | /** |
| | | * 异常 |
| | | */ |
| | | @ApiModelProperty(value= "异常") |
| | | @TableField("\"error\"") |
| | | @TableField("ERROR") |
| | | private String error; |
| | | |
| | | /** |
| | | * 异常情况 1: 未处理 2: 已修复 |
| | | */ |
| | | @ApiModelProperty(value= "异常情况 1: 未处理 2: 已修复 ") |
| | | @TableField("\"status\"") |
| | | @TableField("STATUS") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("\"create_time\"") |
| | | @TableField("CREATE_TIME") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("\"create_by\"") |
| | | @TableField("CREATE_BY") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("\"update_time\"") |
| | | @TableField("UPDATE_TIME") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("\"update_by\"") |
| | | @TableField("UPDATE_BY") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @TableField("\"memo\"") |
| | | @TableField("MEMO") |
| | | private String memo; |
| | | |
| | | public BasErrLog() {} |
| | |
| | | * wms任务号 |
| | | */ |
| | | @ApiModelProperty(value= "wms任务号") |
| | | @TableId(value = "\"task_no\"", type = IdType.INPUT) |
| | | @TableField("\"task_no\"") |
| | | @TableId(value = "TASK_NO", type = IdType.INPUT) |
| | | @TableField("TASK_NO") |
| | | private String taskNo; |
| | | |
| | | /** |
| | | * 任务状态 1: 接收 2: 派发 3: 完结 4: 取消 |
| | | */ |
| | | @ApiModelProperty(value= "任务状态 1: 接收 2: 派发 5: 完结 4: 取消 ") |
| | | @TableField("\"status\"") |
| | | @TableField("STATUS") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @TableField("\"wrk_no\"") |
| | | @TableField("WRK_NO") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | @TableField("\"sc_weight\"") |
| | | private Integer scWeight; |
| | | |
| | | /** |
| | | * 任务时间(接收时间) |
| | | */ |
| | | @ApiModelProperty(value= "任务时间(接收时间)") |
| | | @TableField("\"create_time\"") |
| | | @TableField("CREATE_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value= "任务类型") |
| | | @TableField("\"io_type\"") |
| | | @TableField("IO_TYPE") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | @TableField("\"io_pri\"") |
| | | @TableField("IO_PRI") |
| | | private Integer ioPri; |
| | | |
| | | /** |
| | | * 起点 |
| | | */ |
| | | @ApiModelProperty(value= "起点") |
| | | @TableField("\"start_point\"") |
| | | @TableField("START_POINT") |
| | | private String startPoint; |
| | | |
| | | /** |
| | | * 终点 |
| | | */ |
| | | @ApiModelProperty(value= "终点") |
| | | @TableField("\"target_point\"") |
| | | @TableField("TARGET_POINT") |
| | | private String targetPoint; |
| | | |
| | | @ApiModelProperty(value = "原始起点") |
| | | @TableField("ORIGIN_START_POINT") |
| | | private String originStartPoint; |
| | | |
| | | @ApiModelProperty(value = "原始起点") |
| | | @TableField("ORIGIN_TARGET_POINT") |
| | | private String originTargetPoint; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | @TableField("SC_WEIGHT") |
| | | private Integer scWeight; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("\"modi_user\"") |
| | | @TableField("MODI_USER") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("\"modi_time\"") |
| | | @TableField("MODI_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | |
| | |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @TableField("\"memo\"") |
| | | @TableField("MEMO") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @TableField("\"barcode\"") |
| | | @TableField("BARCODE") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 派发时间 |
| | | */ |
| | | @ApiModelProperty(value= "派发时间") |
| | | @TableField("\"assign_time\"") |
| | | @TableField("ASSIGN_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date assignTime; |
| | | |
| | |
| | | * 执行时间 |
| | | */ |
| | | @ApiModelProperty(value= "执行时间") |
| | | @TableField("\"execute_time\"") |
| | | @TableField("EXECUTE_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date executeTime; |
| | | |
| | |
| | | * 完结时间 |
| | | */ |
| | | @ApiModelProperty(value= "完结时间") |
| | | @TableField("\"complete_time\"") |
| | | @TableField("COMPLETE_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date completeTime; |
| | | |
| | |
| | | * 取消时间 |
| | | */ |
| | | @ApiModelProperty(value= "取消时间") |
| | | @TableField("\"cancel_time\"") |
| | | @TableField("CANCEL_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelTime; |
| | | |
| | |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @TableField("\"wrk_sts\"") |
| | | @TableField("WRK_STS") |
| | | private Integer wrkSts; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @TableField("\"crn_no\"") |
| | | @TableField("CRN_NO") |
| | | private Integer crnNo; |
| | | |
| | | @ApiModelProperty(value = "移库标记") |
| | | @TableField("\"transfer_mark\"") |
| | | @TableField("TRANSFER_MARK") |
| | | private Integer transferMark; |
| | | |
| | | @ApiModelProperty(value = "原始起点") |
| | | @TableField("\"origin_start_point\"") |
| | | private String originStartPoint; |
| | | |
| | | @ApiModelProperty(value = "原始起点") |
| | | @TableField("\"origin_target_point\"") |
| | | private String originTargetPoint; |
| | | |
| | | public TaskWrk() {} |
| | | |
| | |
| | | * wms任务号 |
| | | */ |
| | | @ApiModelProperty(value= "wms任务号") |
| | | @TableField("task_no") |
| | | @TableField("TASK_NO") |
| | | private String taskNo; |
| | | |
| | | /** |
| | | * 任务状态 1: 接收 2: 派发 3: 完结 4: 取消 |
| | | */ |
| | | @ApiModelProperty(value= "任务状态 1: 接收 2: 派发 3: 完结 4: 取消 ") |
| | | @TableField("STATUS") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | @ApiModelProperty(value= "任务号") |
| | | @TableField("wrk_no") |
| | | @TableField("WRK_NO") |
| | | private Integer wrkNo; |
| | | |
| | | /** |
| | | * 任务时间(接收时间) |
| | | */ |
| | | @ApiModelProperty(value= "任务时间(接收时间)") |
| | | @TableField("create_time") |
| | | @TableField("CREATE_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value= "任务类型") |
| | | @TableField("io_type") |
| | | @TableField("IO_TYPE") |
| | | private Integer ioType; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @ApiModelProperty(value= "优先级") |
| | | @TableField("io_pri") |
| | | @TableField("IO_PRI") |
| | | private Double ioPri; |
| | | |
| | | /** |
| | | * 起点 |
| | | */ |
| | | @ApiModelProperty(value= "起点") |
| | | @TableField("start_point") |
| | | @TableField("START_POINT") |
| | | private String startPoint; |
| | | |
| | | /** |
| | | * 终点 |
| | | */ |
| | | @ApiModelProperty(value= "终点") |
| | | @TableField("target_point") |
| | | @TableField("TARGET_POINT") |
| | | private String targetPoint; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | @TableField("MODI_USER") |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | @TableField("MODI_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date modiTime; |
| | | |
| | |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @TableField("MEMO") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @TableField("BARCODE") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 派发时间 |
| | | */ |
| | | @ApiModelProperty(value= "派发时间") |
| | | @TableField("assign_time") |
| | | @TableField("ASSIGN_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date assignTime; |
| | | |
| | |
| | | * 执行时间 |
| | | */ |
| | | @ApiModelProperty(value= "执行时间") |
| | | @TableField("execute_time") |
| | | @TableField("EXECUTE_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date executeTime; |
| | | |
| | |
| | | * 完结时间 |
| | | */ |
| | | @ApiModelProperty(value= "完结时间") |
| | | @TableField("complete_time") |
| | | @TableField("COMPLETE_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date completeTime; |
| | | |
| | |
| | | * 取消时间 |
| | | */ |
| | | @ApiModelProperty(value= "取消时间") |
| | | @TableField("cancel_time") |
| | | @TableField("CANCEL_TIME") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelTime; |
| | | |
| | |
| | | * 工作状态 |
| | | */ |
| | | @ApiModelProperty(value= "工作状态") |
| | | @TableField("wrk_sts") |
| | | @TableField("WRK_STS") |
| | | private Integer wrkSts; |
| | | |
| | | /** |
| | | * 堆垛机号 |
| | | */ |
| | | @ApiModelProperty(value= "堆垛机号") |
| | | @TableField("crn_no") |
| | | @TableField("CRN_NO") |
| | | private Integer crnNo; |
| | | |
| | | /** |
| | | * 指令执行步序 |
| | | */ |
| | | @ApiModelProperty(value= "指令执行步序") |
| | | @TableField("command_step") |
| | | private Integer commandStep; |
| | | // /** |
| | | // * 指令执行步序 |
| | | // */ |
| | | // @ApiModelProperty(value= "指令执行步序") |
| | | // @TableField("COMMAND_STEP") |
| | | // private Integer commandStep; |
| | | |
| | | // @ApiModelProperty(value= "") |
| | | // @TableId(value = "id", type = IdType.AUTO) |
| | |
| | | |
| | | |
| | | @ApiModelProperty(value = "移库标记") |
| | | @TableField("transfer_mark") |
| | | @TableField("TRANSFER_MARK") |
| | | private Integer transferMark; |
| | | |
| | | public TaskWrkLog() {} |
| | | |
| | | public TaskWrkLog(String taskNo,Integer status,Integer wrkNo,Date createTime,Integer ioType,Double ioPri,String startPoint,String targetPoint,Long modiUser,Date modiTime,String memo,String barcode,Date assignTime,Date executeTime,Date completeTime,Date cancelTime,Integer wrkSts,Integer crnNo,Integer commandStep) { |
| | | public TaskWrkLog(String taskNo, Integer status, Integer wrkNo, Date createTime, Integer ioType, Double ioPri, String startPoint, String targetPoint, Long modiUser, Date modiTime, String memo, String barcode, Date assignTime, Date executeTime, Date completeTime, Date cancelTime, Integer wrkSts, Integer crnNo, Integer transferMark) { |
| | | this.taskNo = taskNo; |
| | | this.status = status; |
| | | this.wrkNo = wrkNo; |
| | |
| | | this.cancelTime = cancelTime; |
| | | this.wrkSts = wrkSts; |
| | | this.crnNo = crnNo; |
| | | this.commandStep = commandStep; |
| | | this.transferMark = transferMark; |
| | | } |
| | | |
| | | public TaskWrkLog(TaskWrk taskWrk) { |
| | | this.taskNo = taskWrk.getTaskNo(); |
| | | this.status = taskWrk.getStatus(); |
| | |
| | | |
| | | Integer getStockOutPageCount(Map<String, Object> map); |
| | | |
| | | @Update("update asr_loc_detl set anfme=#{anfme}, modi_time = getDate() where loc_no = #{locNo} and matnr = #{matnr}") |
| | | @Update("update \"SOURCE\".\"asr_loc_detl\" set anfme=#{anfme}, modi_time = getDate() where loc_no = #{locNo} and matnr = #{matnr}") |
| | | int updateAnfme(Double anfme, String locNo, String matnr); |
| | | |
| | | @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}") |
| | | @Update("update \"SOURCE\".\"asr_loc_detl\" set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}") |
| | | int updateLocNo(String newLocNo, String oldLocNo); |
| | | |
| | | @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end}) AND lm.loc_sts = 'F' AND DateDiff(dd, lm.modi_time, getdate()) = 0) ORDER BY lm.modi_time ASC") |
| | | @Select("SELECT ld.loc_no FROM \"SOURCE\".\"asr_loc_detl\" ld LEFT JOIN \"SOURCE\".\"asr_loc_mast\" lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end}) AND lm.loc_sts = 'F' AND DateDiff(dd, lm.modi_time, getdate()) = 0) ORDER BY lm.modi_time ASC") |
| | | List<String> selectSameDetlToday(@Param("matnr") String matnr, @Param("start") Integer start, @Param("end") Integer end); |
| | | |
| | | } |
| | |
| | | @Repository |
| | | public interface LocMastMapper extends BaseMapper<LocMast> { |
| | | |
| | | // @Select("select distinct row1 from asr_loc_mast where crn_no = #{crnNo}") |
| | | @Select("select row1 from ( select distinct row1 from asr_loc_mast where crn_no = #{crnNo} ) a " + |
| | | // @Select("select distinct row1 from "SOURCE"."asr_loc_mast" where crn_no = #{crnNo}") |
| | | @Select("select row1 from ( select distinct row1 from \"SOURCE\".\"asr_loc_mast\" where crn_no = #{crnNo} ) a " + |
| | | "order by case row1 when 1 then 1 when 2 then 0 when 3 then 0 when 4 then 1 " + |
| | | "when 5 then 1 when 6 then 0 when 7 then 0 when 8 then 1 when 9 then 1 when 10 then 0 " + |
| | | "when 11 then 0 when 12 then 1 when 13 then 1 when 14 then 0 when 15 then 0 when 16 then 1 end desc,newid()") |
| | |
| | | |
| | | LocMast queryFreeLocMast(@Param("row") Integer row, @Param("locType1") Short locType1); |
| | | |
| | | @Select("select loc_no from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") |
| | | @Select("select loc_no from \"SOURCE\".\"asr_loc_mast\" where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") |
| | | List<String> queryGroupEmptyStock(Integer crnNo); |
| | | |
| | | @Select("select top 1 bay1 from asr_loc_mast order by bay1 desc") |
| | | @Select("select top 1 bay1 from \"SOURCE\".\"asr_loc_mast\" order by bay1 desc") |
| | | Short selectTotalBay(); |
| | | |
| | | LocMast queryDemoSourceLoc(@Param("crnNo") Integer crnNo); |
| | | |
| | | LocMast queryDemoLoc(@Param("crnNo") Integer crnNo); |
| | | |
| | | @Select("select count(*) as count from asr_loc_mast where 1=1 and loc_sts = 'O' and loc_type1 = #{locType1} and crn_no = #{crnNo}") |
| | | @Select("select count(*) as count from \"SOURCE\".\"asr_loc_mast\" where 1=1 and loc_sts = 'O' and loc_type1 = #{locType1} and crn_no = #{crnNo}") |
| | | Integer selectEmptyLocCount(@Param("locType1") Short locType1, @Param("crnNo") Integer crnNo); |
| | | |
| | | LocMast selectByLocNo(String locNo); |
| | |
| | | @Repository |
| | | public interface WrkDetlLogMapper extends BaseMapper<WrkDetlLog> { |
| | | |
| | | @Insert("insert into asr_wrk_detl_log select * from asr_wrk_detl where wrk_no=#{workNo}") |
| | | @Insert("insert into \"SOURCE\".\"asr_wrk_detl_log\" select * from \"SOURCE\".\"asr_wrk_detl\" where wrk_no=#{workNo}") |
| | | int save(Integer workNo); |
| | | |
| | | } |
| | |
| | | @Repository |
| | | public interface WrkMastLogMapper extends BaseMapper<WrkMastLog> { |
| | | |
| | | @Insert("insert into asr_wrk_mast_log select * from asr_wrk_mast where wrk_no=#{workNo}") |
| | | @Insert("insert into \"SOURCE\".\"asr_wrk_mast_log\" select * from asr_wrk_mast where wrk_no=#{workNo}") |
| | | int save(Integer workNo); |
| | | |
| | | } |
| | |
| | | WrkMast selectWorking(@Param("crnNo")Integer crnNo); |
| | | |
| | | // work log ------------------------------------------------------- |
| | | @Insert("insert into asr_wrk_mast_log select * from asr_wrk_mast where wrk_no=#{workNo}") |
| | | @Insert("insert into \"SOURCE\".\"asr_wrk_mast_log\" select * from \"SOURCE\".\"asr_wrk_mast\" where WRK_NO=#{workNo}") |
| | | int saveWrkMastLog(Integer workNo); |
| | | |
| | | @Insert("insert into asr_wrk_detl_log select * from asr_wrk_detl where wrk_no=#{workNo}") |
| | | @Insert("insert into \"SOURCE\".\"asr_wrk_detl_log\" select * from \"SOURCE\".\"asr_wrk_detl\" where WRK_NO=#{workNo}") |
| | | int saveWrkDetlLog(Integer workNo); |
| | | |
| | | // 通知档 ---------------------------------------------------------------------- |
| | | |
| | | // update 入库通知档 -- Y |
| | | @Update("update cust_wait_pakin set io_status='Y' where zpallet = #{barcode}") |
| | | @Update("update \"SOURCE\".\"cust_wait_pakin\" set io_status='Y' where zpallet = #{barcode}") |
| | | int updateWaitPakInStep1(String barcode); |
| | | |
| | | // update 入库通知档 -- F |
| | | @Update("update cust_wait_pakin set io_status='F' where zpallet = #{barcode}") |
| | | @Update("update \"SOURCE\".\"cust_wait_pakin\" set io_status='F' where zpallet = #{barcode}") |
| | | int updateWaitPakInStep2(String barcode); |
| | | |
| | | // WrkMast selectWorkingPakin(); |
| | |
| | | public void locToLoc(CrnSlave slave, CrnProtocol crnProtocol){ |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | // 获取工作状态为11(生成出库ID)的移库工作档 |
| | | List<TaskWrk> taskWrks = taskWrkMapper.selectList(new EntityWrapper<TaskWrk>() |
| | | .eq("\"crn_no\"",slave.getId()) |
| | | .eq("\"wrk_sts\"",11) |
| | | .eq("\"io_type\"",3) |
| | | .orderBy("\"io_pri\"",false)); |
| | | List<TaskWrk> taskWrks = taskWrkMapper.selectList( |
| | | new EntityWrapper<TaskWrk>() |
| | | .eq("CRN_NO",slave.getId()) |
| | | .eq("WRK_STS",11) |
| | | .eq("IO_TYPE",3) |
| | | .orderBy("IO_PRI",false)); |
| | | for (TaskWrk taskWrk : taskWrks){ |
| | | |
| | | // 双深库位且浅库位有货,则需先对浅库位进行库位移转 |
| | |
| | | @Repository |
| | | public interface OperateLogMapper extends BaseMapper<OperateLog> { |
| | | |
| | | @Select("select count(1) from sys_operate_log where yearweek(date_format(create_time,'%Y-%m-%d')) = yearweek(now());") |
| | | @Select("select count(1) from \"SOURCE\".\"sys_operate_log\" where yearweek(date_format(CREATE_TIME,'%Y-%m-%d')) = yearweek(now());") |
| | | int selectCountByCurrentWeek(); |
| | | |
| | | @Select("select MONTH(create_time) as node , count(1) as val from sys_operate_log where 1 = 1 and year(create_time) = #{year} group by MONTH(create_time)") |
| | | @Select("select MONTH(CREATE_TIME) as node , count(1) as val from \"SOURCE\".\"sys_operate_log\" where 1 = 1 and year(CREATE_TIME) = #{year} group by MONTH(CREATE_TIME)") |
| | | List<Map<String, Object>> getReportByYear(@Param("year") Integer year); |
| | | |
| | | @Select("select DAYOFMONTH(create_time) as node,count(1) as val from sys_operate_log where 1 = 1 and year(create_time) = #{year} and month(create_time) = #{month} group by DAYOFMONTH(create_time)") |
| | | @Select("select DAYOFMONTH(CREATE_TIME) as node,count(1) as val from \"SOURCE\".\"sys_operate_log\" where 1 = 1 and year(CREATE_TIME) = #{year} and month(CREATE_TIME) = #{month} group by DAYOFMONTH(CREATE_TIME)") |
| | | List<Map<String, Object>> getReportByMonth(@Param("year") Integer year, @Param("month") Integer month); |
| | | |
| | | } |
| | |
| | | @Repository |
| | | public interface RoleResourceMapper extends BaseMapper<RoleResource> { |
| | | |
| | | @Select("select sr.* from sys_resource sr left join sys_role_resource srr on srr.resource_id = sr.id left join sys_user su on su.role_id = srr.role_id where 1 = 1 and su.id = #{userId} and sr. level = 3 and sr.resource_id = #{fatherResourceId} and sr. status = 1 order by sr.sort") |
| | | @Select("select sr.* from \"SOURCE\".\"sys_resource\" sr left join \"SOURCE\".\"sys_role_resource\" srr on srr.RESOURCE_ID = sr.ID left join \"SOURCE\".\"sys_user\" su on su.ROLE_ID = srr.ROLE_ID where 1 = 1 and su.ID = #{userId} and sr. LEVEL = 3 and sr.RESOURCE_ID = #{fatherResourceId} and sr. STATUS = 1 order by sr.SORT") |
| | | List<Resource> getMenuButtomResource(@Param("fatherResourceId") Long fatherResourceId, @Param("userId") Long userId); |
| | | |
| | | } |
| | |
| | | @Repository |
| | | public interface UserLoginMapper extends BaseMapper<UserLogin> { |
| | | |
| | | @Select("select count(1) from sys_user_login where yearweek(date_format(create_time,'%Y-%m-%d')) = yearweek(now())") |
| | | @Select("select count(1) from \"SOURCE\".\"sys_user_login\" where yearweek(date_format(CREATE_TIME,'%Y-%m-%d')) = yearweek(now())") |
| | | int selectCountByCurrentWeek(); |
| | | |
| | | } |
| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.ApiConfig"> |
| | | <id column="id" property="id" /> |
| | | <result column="url" property="url" /> |
| | | <result column="status" property="status" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <id column="ID" property="id" /> |
| | | <result column="URL" property="url" /> |
| | | <result column="STATUS" property="status" /> |
| | | <result column="MEMO" property="memo" /> |
| | | <result column="CREATE_TIME" property="createTime" /> |
| | | <result column="UPDATE_TIME" property="updateTime" /> |
| | | <result column="CREATE_BY" property="createBy" /> |
| | | <result column="UPDATE_BY" property="updateBy" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="selectByUrl" resultMap="BaseResultMap"> |
| | | select top 1 * from "SOURCE"."wcs_api_config" |
| | | where "url" = #{url} |
| | | order by "create_time" desc |
| | | where "URL" = #{url} |
| | | order by "CREATE_TIME" desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.TaskWrkLog"> |
| | | <id column="id" property="id" /> |
| | | <result column="task_no" property="taskNo" /> |
| | | <result column="status" property="status" /> |
| | | <result column="wrk_no" property="wrkNo" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="io_type" property="ioType" /> |
| | | <result column="io_pri" property="ioPri" /> |
| | | <result column="start_point" property="startPoint" /> |
| | | <result column="target_point" property="targetPoint" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="barcode" property="barcode" /> |
| | | <result column="assign_time" property="assignTime" /> |
| | | <result column="execute_time" property="executeTime" /> |
| | | <result column="complete_time" property="completeTime" /> |
| | | <result column="cancel_time" property="cancelTime" /> |
| | | <result column="wrk_sts" property="wrkSts" /> |
| | | <result column="crn_no" property="crnNo" /> |
| | | <result column="transfer_mark" property="transferMark" /> |
| | | <result column="TASK_NO" property="taskNo" /> |
| | | <result column="STATUS" property="status" /> |
| | | <result column="WRK_NO" property="wrkNo" /> |
| | | <result column="CREATE_TIME" property="createTime" /> |
| | | <result column="IO_TYPE" property="ioType" /> |
| | | <result column="IO_PRI" property="ioPri" /> |
| | | <result column="START_POINT" property="startPoint" /> |
| | | <result column="TARGET_POINT" property="targetPoint" /> |
| | | <result column="MODI_USER" property="modiUser" /> |
| | | <result column="MODI_TIME" property="modiTime" /> |
| | | <result column="MEMO" property="memo" /> |
| | | <result column="BARCODE" property="barcode" /> |
| | | <result column="ASSIGN_TIME" property="assignTime" /> |
| | | <result column="EXECUTE_TIME" property="executeTime" /> |
| | | <result column="COMPLETE_TIME" property="completeTime" /> |
| | | <result column="CANCEL_TIME" property="cancelTime" /> |
| | | <result column="WRK_STS" property="wrkSts" /> |
| | | <result column="CRN_NO" property="crnNo" /> |
| | | <result column="TRANSFER_MARK" property="transferMark" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.TaskWrk"> |
| | | <result column="task_no" property="taskNo" /> |
| | | <result column="status" property="status" /> |
| | | <result column="wrk_no" property="wrkNo" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="io_type" property="ioType" /> |
| | | <result column="io_pri" property="ioPri" /> |
| | | <result column="start_point" property="startPoint" /> |
| | | <result column="target_point" property="targetPoint" /> |
| | | <result column="origin_start_point" property="originStartPoint" /> |
| | | <result column="origin_target_point" property="originTargetPoint" /> |
| | | <result column="sc_weight" property="scWeight" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="barcode" property="barcode" /> |
| | | <result column="assign_time" property="assignTime" /> |
| | | <result column="execute_time" property="executeTime" /> |
| | | <result column="complete_time" property="completeTime" /> |
| | | <result column="cancel_time" property="cancelTime" /> |
| | | <result column="wrk_sts" property="wrkSts" /> |
| | | <result column="crn_no" property="crnNo" /> |
| | | <result column="transfer_mark" property="transferMark" /> |
| | | <result column="TASK_NO" property="taskNo" /> |
| | | <result column="STATUS" property="status" /> |
| | | <result column="WRK_NO" property="wrkNo" /> |
| | | <result column="CREATE_TIME" property="createTime" /> |
| | | <result column="IO_TYPE" property="ioType" /> |
| | | <result column="IO_PRI" property="ioPri" /> |
| | | <result column="START_POINT" property="startPoint" /> |
| | | <result column="TARGET_POINT" property="targetPoint" /> |
| | | <result column="ORIGIN_START_POINT" property="originStartPoint" /> |
| | | <result column="ORIGIN_TARGET_POINT" property="originTargetPoint" /> |
| | | <result column="SC_WEIGHT" property="scWeight" /> |
| | | <result column="MODI_USER" property="modiUser" /> |
| | | <result column="MODI_TIME" property="modiTime" /> |
| | | <result column="MEMO" property="memo" /> |
| | | <result column="BARCODE" property="barcode" /> |
| | | <result column="ASSIGN_TIME" property="assignTime" /> |
| | | <result column="EXECUTE_TIME" property="executeTime" /> |
| | | <result column="COMPLETE_TIME" property="completeTime" /> |
| | | <result column="CANCEL_TIME" property="cancelTime" /> |
| | | <result column="WRK_STS" property="wrkSts" /> |
| | | <result column="CRN_NO" property="crnNo" /> |
| | | <result column="TRANSFER_MARK" property="transferMark" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="selectByTaskNo" resultMap="BaseResultMap"> |
| | | select top 1 * from "SOURCE"."wcs_task_wrk" |
| | | where 1=1 |
| | | and "task_no" = #{taskNo} |
| | | and "TASK_NO" = #{taskNo} |
| | | </select> |
| | | |
| | | <select id="selectByStartPoint" resultMap="BaseResultMap"> |
| | | select top 1 * from "SOURCE"."wcs_task_wrk" |
| | | where 1=1 |
| | | and "io_type"=3 |
| | | and "start_point" = #{startPoint} |
| | | and "IO_TYPE"=3 |
| | | and "START_POINT" = #{startPoint} |
| | | </select> |
| | | |
| | | <select id="selectByWrkNo" resultMap="BaseResultMap"> |
| | | select top 1 * from "SOURCE"."wcs_task_wrk" |
| | | where 1=1 |
| | | and "wrk_no" = #{wrkNo} |
| | | and "WRK_NO" = #{wrkNo} |
| | | </select> |
| | | |
| | | <select id="selectPakIn" resultMap="BaseResultMap"> |
| | | select top 1 * from "SOURCE"."wcs_task_wrk" |
| | | where "status"=1 |
| | | and "crn_no"=#{crnNo} |
| | | and "wrk_no"=#{workNo} |
| | | and "start_point"=#{startPoint} |
| | | and "io_type"=1 |
| | | order by "io_pri" desc,"create_time","wrk_no" ASC |
| | | where "STATUS"=1 |
| | | and "CRN_NO"=#{crnNo} |
| | | and "WRK_NO"=#{workNo} |
| | | and "START_POINT"=#{startPoint} |
| | | and "IO_TYPE"=1 |
| | | order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC |
| | | </select> |
| | | |
| | | <select id="selectReceive" resultMap="BaseResultMap"> |
| | | select * from "SOURCE"."wcs_task_wrk" |
| | | where 1=1 |
| | | and "status" = 1 |
| | | and "STATUS" = 1 |
| | | </select> |
| | | |
| | | <select id="selectPakOutIoType" resultMap="BaseResultMap"> |
| | | select * from "SOURCE"."wcs_task_wrk" |
| | | where "crn_no"=#{crnNo} |
| | | and "io_type" = 3 |
| | | order by "io_pri" desc,"create_time","wrk_no" ASC |
| | | where "CRN_NO"=#{crnNo} |
| | | and "IO_TYPE" = 3 |
| | | order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC |
| | | </select> |
| | | |
| | | <select id="selectCrnStaWorking" resultMap="BaseResultMap"> |
| | | select * from "SOURCE"."wcs_task_wrk" |
| | | where "crn_no"=#{crnNo} |
| | | and "target_point"=#{targetPoint} |
| | | and "wrk_sts"=13 |
| | | and "io_type" = 2 |
| | | order by "io_pri" desc,"create_time","wrk_no" ASC |
| | | where "CRN_NO"=#{crnNo} |
| | | and "TARGET_POINT"=#{targetPoint} |
| | | and "WRK_STS"=13 |
| | | and "IO_TYPE" = 2 |
| | | order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC |
| | | </select> |
| | | |
| | | <select id="selectPakOut" resultMap="BaseResultMap"> |
| | | select * from "SOURCE"."wcs_task_wrk" |
| | | where "crn_no"=#{crnNo} |
| | | where "CRN_NO"=#{crnNo} |
| | | <if test="targetPoint!=null and targetPoint!='' "> |
| | | and "target_point"=#{targetPoint} |
| | | and "TARGET_POINT"=#{targetPoint} |
| | | </if> |
| | | and "wrk_sts"=11 |
| | | and "io_type" = 2 |
| | | order by "io_pri" desc,"create_time","wrk_no" ASC |
| | | and "WRK_STS"=11 |
| | | and "IO_TYPE" = 2 |
| | | order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC |
| | | </select> |
| | | |
| | | <select id="selectPakOut3" resultMap="BaseResultMap"> |
| | | select * from "SOURCE"."wcs_task_wrk" |
| | | where "crn_no"=#{crnNo} |
| | | where "CRN_NO"=#{crnNo} |
| | | -- and target_point=#{targetPoint} |
| | | and "wrk_sts"=11 |
| | | and "io_type" = 3 |
| | | order by "io_pri" desc,"create_time" ASC |
| | | and "WRK_STS"=11 |
| | | and "IO_TYPE" = 3 |
| | | order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC |
| | | </select> |
| | | |
| | | <select id="selectCrnWorking" resultMap="BaseResultMap"> |
| | | select top 1 * from "SOURCE"."wcs_task_wrk" |
| | | where 1=1 |
| | | and ("wrk_sts"=3 or "wrk_sts"=12) |
| | | and "crn_no"=#{crnNo} |
| | | order by "io_pri" desc,"create_time","wrk_no" ASC |
| | | and ("WRK_STS"=3 or "WRK_STS"=12) |
| | | and "CRN_NO"=#{crnNo} |
| | | order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC |
| | | </select> |
| | | |
| | | <select id="selectCrnNoInWorking" resultMap="BaseResultMap"> |
| | | select top 1 * from "SOURCE"."wcs_task_wrk" |
| | | where 1=1 |
| | | and ("wrk_sts"=3 or "wrk_sts"=12) |
| | | and "crn_no"=#{crnNo} |
| | | and "wrk_no"=#{workNo} |
| | | order by "io_pri" desc,"create_time","wrk_no" ASC |
| | | and ("WRK_STS"=3 or "WRK_STS"=12) |
| | | and "CRN_NO"=#{crnNo} |
| | | and "WRK_NO"=#{workNo} |
| | | order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC |
| | | </select> |
| | | |
| | | <select id="selectToBeHistoryData" resultMap="BaseResultMap"> |
| | | select * from "SOURCE"."wcs_task_wrk" |
| | | where 1=1 |
| | | and (("wrk_sts"=14 and "status"=5) or "status"=7 or "status"=4 or ("wrk_sts"=4 and "status"=5)) |
| | | order by "io_pri" desc,"create_time","wrk_no" ASC |
| | | and (("WRK_STS"=14 and "STATUS"=5) or "STATUS"=7 or "STATUS"=4 |
| | | or ("WRK_STS"=4 and "STATUS"=5)) |
| | | order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC |
| | | </select> |
| | | |
| | | <insert id="saveToHistory"> |
| | | insert into "SOURCE"."wcs_task_wrk_log" select * from "SOURCE"."wcs_task_wrk" where "task_no" = #{taskNo} and ("status"=5 or "status"=4 or "status"=6) |
| | | insert into "SOURCE"."wcs_task_wrk_log" |
| | | select * from "SOURCE"."wcs_task_wrk" |
| | | where "TASK_NO" = #{taskNo} |
| | | and ("STATUS"=5 or "STATUS"=4 or "STATUS"=6) |
| | | </insert> |
| | | |
| | | <select id="selectWorkingTask" resultMap="BaseResultMap"> |
| | | select * from "SOURCE"."wcs_task_wrk" |
| | | where ("wrk_sts"=3 and "io_type" = 1) |
| | | or ("wrk_sts"=12 and "io_type" = 2) |
| | | order by "io_pri" desc,"create_time","wrk_no" ASC |
| | | where ("WRK_STS"=3 and "IO_TYPE" = 1) |
| | | or ("WRK_STS"=12 and "IO_TYPE" = 2) |
| | | order by "IO_PRI" desc,"CREATE_TIME","WRK_NO" ASC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <!-- mapper不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 --> |
| | | <sql id="viewStayTimeConditionSql"> |
| | | <if test="loc_no!=null and loc_no!='' "> |
| | | and asr_loc_mast.loc_no like '%' + #{loc_no} + '%' |
| | | and "SOURCE"."asr_loc_mast".loc_no like '%' + #{loc_no} + '%' |
| | | </if> |
| | | <if test="matnr!=null and matnr!='' "> |
| | | and matnr like '%' + #{matnr} + '%' |
| | |
| | | ( |
| | | SELECT |
| | | GETDATE() AS today |
| | | , CONVERT(decimal, DATEDIFF(second,asr_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , asr_loc_detl.* |
| | | FROM asr_loc_detl |
| | | INNER JOIN asr_loc_mast ON asr_loc_detl.loc_no = asr_loc_mast.loc_no |
| | | , CONVERT(decimal, DATEDIFF(second,"SOURCE"."asr_loc_detl".appe_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , "SOURCE"."asr_loc_detl".* |
| | | FROM "SOURCE"."asr_loc_detl" |
| | | INNER JOIN "SOURCE"."asr_loc_mast" ON "SOURCE"."asr_loc_detl".loc_no = "SOURCE"."asr_loc_mast".loc_no |
| | | where 1=1 |
| | | <include refid="viewStayTimeConditionSql"></include> |
| | | ) t |
| | |
| | | ( |
| | | SELECT |
| | | GETDATE() AS today |
| | | , CONVERT(decimal, DATEDIFF(second,asr_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , dbo.asr_loc_detl.* |
| | | FROM asr_loc_detl |
| | | INNER JOIN asr_loc_mast ON asr_loc_detl.loc_no = asr_loc_mast.loc_no |
| | | , CONVERT(decimal, DATEDIFF(second,"SOURCE"."asr_loc_detl".appe_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , "SOURCE"."asr_loc_detl".* |
| | | FROM "SOURCE"."asr_loc_detl" |
| | | INNER JOIN "SOURCE"."asr_loc_mast" ON "SOURCE"."asr_loc_detl".loc_no = "SOURCE"."asr_loc_mast".loc_no |
| | | where 1=1 |
| | | <include refid="viewStayTimeConditionSql"></include> |
| | | ) t |
| | |
| | | ( |
| | | SELECT |
| | | GETDATE() AS today |
| | | , CONVERT(decimal, DATEDIFF(second,asr_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , dbo.asr_loc_detl.* |
| | | FROM asr_loc_detl |
| | | INNER JOIN asr_loc_mast ON asr_loc_detl.loc_no = asr_loc_mast.loc_no |
| | | , CONVERT(decimal, DATEDIFF(second,"SOURCE"."asr_loc_detl".appe_time, GETDATE()) / 86400.0, 9) AS stay_time |
| | | , "SOURCE"."asr_loc_detl".* |
| | | FROM "SOURCE"."asr_loc_detl" |
| | | INNER JOIN "SOURCE"."asr_loc_mast" ON "SOURCE"."asr_loc_detl".loc_no = "SOURCE"."asr_loc_mast".loc_no |
| | | where 1=1 |
| | | <include refid="viewStayTimeConditionSql"></include> |
| | | ) t |
| | |
| | | </select> |
| | | |
| | | <select id="selectPakOutStep1" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc |
| | | select top 1 * from "SOURCE"."asr_wrk_mast" where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc |
| | | </select> |
| | | |
| | | <select id="selectPakOutStep2" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC |
| | | select top 1 * from "SOURCE"."asr_wrk_mast" where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC |
| | | </select> |
| | | |
| | | <select id="selectLocMove" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from "SOURCE"."asr_wrk_mast" where wrk_sts=11 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectLocMoving" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_sts=12 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from "SOURCE"."asr_wrk_mast" where wrk_sts=12 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectWorking" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where 1=1 and (wrk_sts=3 or wrk_sts=12) and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from "SOURCE"."asr_wrk_mast" where 1=1 and (wrk_sts=3 or wrk_sts=12) and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <!-- <!– 入库任务 –>--> |
| | |
| | | <!-- </select>--> |
| | | |
| | | <select id="selectCrnWorking" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts in (3,4,11,12) and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from "SOURCE"."asr_wrk_mast" where 1=1 and wrk_sts in (3,4,11,12) and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectDevWorking" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts=2 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | select top 1 * from "SOURCE"."asr_wrk_mast" where 1=1 and wrk_sts=2 and crn_no=#{crnNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectPick" resultMap="BaseResultMap"> |
| | | select * from dbo.asr_wrk_mast where 1=1 and wrk_sts = 14 and io_type in (103,104,107) |
| | | select * from "SOURCE"."asr_wrk_mast" where 1=1 and wrk_sts = 14 and io_type in (103,104,107) |
| | | </select> |
| | | |
| | | <select id="selectPakOutStep11" resultMap="BaseResultMap"> |
| | | select * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc |
| | | select * from "SOURCE"."asr_wrk_mast" where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc |
| | | </select> |
| | | |
| | | <!-- 入出库模式相关 --> |
| | | <select id="selectWorkingPakin" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = #{sourceStaNo} order by io_time,wrk_no |
| | | select top 1 * from "SOURCE"."asr_wrk_mast" where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = #{sourceStaNo} order by io_time,wrk_no |
| | | </select> |
| | | |
| | | <select id="selectWorkingPakout" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from dbo.asr_wrk_mast |
| | | from "SOURCE"."asr_wrk_mast" |
| | | where (wrk_sts in (11,12) |
| | | or (wrk_sts in (14,15) and wrk_no in |
| | | ( |
| | | select wrk_no |
| | | from asr_bas_devp |
| | | from "SOURCE"."asr_bas_devp" |
| | | where wrk_no > 0) |
| | | )) |
| | | and io_type != 11 |