RESULT_ID, INBOUND_RESULT_ID, LOAD_ID, RESULT_MATERIAL,INBOUND_GROUP_ID, RESULT_LOAD_TIME, MATERIAL_ID, INBOUND_ABNORMALIS, INBOUND_MATERIAL_NUMBER, RESULT_STATUS_, RESULT_NUMBER, RESULT_DELETED, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK t.RESULT_ID, t.INBOUND_RESULT_ID, t.LOAD_ID, t.RESULT_MATERIAL,INBOUND_GROUP_ID, t.RESULT_LOAD_TIME, t.MATERIAL_ID, t.INBOUND_ABNORMALIS, t.INBOUND_MATERIAL_NUMBER, t.RESULT_STATUS_, t.RESULT_NUMBER, t.RESULT_DELETED, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK SELECT FROM WMSP_INBOUND_SCAN_RESULT SELECT FROM WMSP_INBOUND_SCAN_RESULT t and RESULT_ID = #{resultId} and INBOUND_RESULT_ID = #{inboundResultId} and LOAD_ID = #{loadId} and RESULT_MATERIAL = #{resultMaterial} and INBOUND_GROUP_ID = #{inboundGroupId} and TO_CHAR(RESULT_LOAD_TIME,'yyyy-MM-dd') = #{resultLoadTime} and MATERIAL_ID = #{materialId} and INBOUND_ABNORMALIS = #{inboundAbnormalis} and INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber} and RESULT_STATUS_ = #{resultStatus} and RESULT_NUMBER = #{resultNumber} and RESULT_DELETED = #{resultDeleted} and INSERT_USERNAME = #{insertUsername} and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime} and UPDATE_USERNAME = #{updateUsername} and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime} and INSERT_UPDATE_REMARK = #{insertUpdateRemark} and RESULT_ID = #{resultId} and INBOUND_RESULT_ID = #{inboundResultId} and LOAD_ID = #{loadId} and RESULT_MATERIAL LIKE '%${resultMaterial}%' and INBOUND_GROUP_ID LIKE '%${inboundGroupId}%' and TO_CHAR(RESULT_LOAD_TIME,'yyyy-MM-dd') = #{resultLoadTime} and MATERIAL_ID = #{materialId} and INBOUND_ABNORMALIS = #{inboundAbnormalis} and INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber} and RESULT_STATUS_ = #{resultStatus} and RESULT_NUMBER = #{resultNumber} and RESULT_DELETED = #{resultDeleted} and INSERT_USERNAME LIKE '%${insertUsername}%' and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime} and UPDATE_USERNAME LIKE '%${updateUsername}%' and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime} and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%' delete from WMSP_INBOUND_SCAN_RESULT where RESULT_ID = #{resultId,jdbcType=DECIMAL} delete from WMSP_INBOUND_SCAN_RESULT where 1!=1 or INBOUND_RESULT_ID = #{inboundResultId} or LOAD_ID = #{loadId} or RESULT_MATERIAL = #{resultMaterial} or INBOUND_GROUP_ID = #{inboundGroupId} or TO_CHAR(RESULT_LOAD_TIME,'yyyy-MM-dd') = '#{resultLoadTime}' or MATERIAL_ID = #{materialId} or INBOUND_ABNORMALIS = #{inboundAbnormalis} or INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber} or RESULT_STATUS_ = #{resultStatus} or RESULT_NUMBER = #{resultNumber} or RESULT_DELETED = #{resultDeleted} or INSERT_USERNAME = #{insertUsername} or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}' or UPDATE_USERNAME = #{updateUsername} or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}' or INSERT_UPDATE_REMARK = #{insertUpdateRemark} insert into WMSP_INBOUND_SCAN_RESULT (RESULT_ID, INBOUND_RESULT_ID, LOAD_ID, RESULT_MATERIAL,INBOUND_GROUP_ID, RESULT_LOAD_TIME, MATERIAL_ID, INBOUND_ABNORMALIS, INBOUND_MATERIAL_NUMBER, RESULT_STATUS_, RESULT_NUMBER, RESULT_DELETED, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK) values (#{resultId,jdbcType=DECIMAL}, #{inboundResultId,jdbcType=DECIMAL}, #{loadId,jdbcType=DECIMAL}, #{resultMaterial,jdbcType=VARCHAR},#{inboundGroupId,jdbcType=VARCHAR},, #{resultLoadTime,jdbcType=TIMESTAMP}, #{materialId,jdbcType=DECIMAL}, #{inboundAbnormalis,jdbcType=DECIMAL}, #{inboundMaterialNumber,jdbcType=DECIMAL}, #{resultStatus,jdbcType=DECIMAL}, #{resultNumber,jdbcType=DECIMAL}, #{resultDeleted,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}) insert into WMSP_INBOUND_SCAN_RESULT RESULT_ID, INBOUND_RESULT_ID, LOAD_ID, RESULT_MATERIAL, RESULT_LOAD_TIME, MATERIAL_ID, INBOUND_ABNORMALIS, INBOUND_MATERIAL_NUMBER, RESULT_STATUS_, RESULT_NUMBER, RESULT_DELETED, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, INBOUND_GROUP_ID, SHIFT_ORDER, #{resultId,jdbcType=DECIMAL}, #{inboundResultId,jdbcType=DECIMAL}, #{loadId,jdbcType=DECIMAL}, #{resultMaterial,jdbcType=VARCHAR}, #{resultLoadTime,jdbcType=TIMESTAMP}, #{materialId,jdbcType=DECIMAL}, #{inboundAbnormalis,jdbcType=DECIMAL}, #{inboundMaterialNumber,jdbcType=DECIMAL}, #{resultStatus,jdbcType=DECIMAL}, #{resultNumber,jdbcType=DECIMAL}, #{resultDeleted,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{inboundGroupId,jdbcType=DECIMAL}, #{shiftOrder,jdbcType=VARCHAR}, update WMSP_INBOUND_SCAN_RESULT set INBOUND_RESULT_ID = #{inboundResultId,jdbcType=DECIMAL}, LOAD_ID = #{loadId,jdbcType=DECIMAL}, RESULT_MATERIAL = #{resultMaterial,jdbcType=VARCHAR}, INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=VARCHAR}, RESULT_LOAD_TIME = #{resultLoadTime,jdbcType=TIMESTAMP}, MATERIAL_ID = #{materialId,jdbcType=DECIMAL}, INBOUND_ABNORMALIS = #{inboundAbnormalis,jdbcType=DECIMAL}, INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber,jdbcType=DECIMAL}, RESULT_STATUS_ = #{resultStatus,jdbcType=DECIMAL}, RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL}, RESULT_DELETED = #{resultDeleted,jdbcType=DECIMAL}, INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR}, INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP}, UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR}, UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}, INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR} where RESULT_ID = #{resultId,jdbcType=DECIMAL} update WMSP_INBOUND_SCAN_RESULT INBOUND_RESULT_ID = #{inboundResultId,jdbcType=DECIMAL}, LOAD_ID = #{loadId,jdbcType=DECIMAL}, RESULT_MATERIAL = #{resultMaterial,jdbcType=VARCHAR}, INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=VARCHAR}, RESULT_LOAD_TIME = #{resultLoadTime,jdbcType=TIMESTAMP}, MATERIAL_ID = #{materialId,jdbcType=DECIMAL}, INBOUND_ABNORMALIS = #{inboundAbnormalis,jdbcType=DECIMAL}, INBOUND_MATERIAL_NUMBER = #{inboundMaterialNumber,jdbcType=DECIMAL}, RESULT_STATUS_ = #{resultStatus,jdbcType=DECIMAL}, RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL}, RESULT_DELETED = #{resultDeleted,jdbcType=DECIMAL}, INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR}, INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP}, UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR}, UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}, INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR}, where RESULT_ID = #{resultId,jdbcType=DECIMAL} insert into WMSP_INBOUND_SCAN_RESULT (RESULT_ID, INBOUND_RESULT_ID, LOAD_ID, RESULT_MATERIAL,INBOUND_GROUP_ID, RESULT_LOAD_TIME, MATERIAL_ID, INBOUND_ABNORMALIS, INBOUND_MATERIAL_NUMBER, RESULT_STATUS_, RESULT_NUMBER, RESULT_DELETED, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK) ( select #{item.resultId,jdbcType=DECIMAL}, #{item.inboundResultId,jdbcType=DECIMAL}, #{item.loadId,jdbcType=DECIMAL}, #{item.resultMaterial,jdbcType=VARCHAR},#{item.inboundGroupId,jdbcType=VARCHAR}, #{item.resultLoadTime,jdbcType=TIMESTAMP}, #{item.materialId,jdbcType=DECIMAL}, #{item.inboundAbnormalis,jdbcType=DECIMAL}, #{item.inboundMaterialNumber,jdbcType=DECIMAL}, #{item.resultStatus,jdbcType=DECIMAL}, #{item.resultNumber,jdbcType=DECIMAL}, #{item.resultDeleted,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual ) update WMSP_INBOUND_SCAN_RESULT set RESULT_ID= when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL} ,INBOUND_RESULT_ID= when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundResultId,jdbcType=DECIMAL} ,LOAD_ID= when #{item.resultId,jdbcType=DECIMAL} then #{item.loadId,jdbcType=DECIMAL} ,RESULT_MATERIAL= when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterial,jdbcType=VARCHAR} ,INBOUND_GROUP_ID= when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundGroupId,jdbcType=VARCHAR} ,RESULT_LOAD_TIME= when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadTime,jdbcType=TIMESTAMP} ,MATERIAL_ID= when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL} ,INBOUND_ABNORMALIS= when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundAbnormalis,jdbcType=DECIMAL} ,INBOUND_MATERIAL_NUMBER= when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundMaterialNumber,jdbcType=DECIMAL} ,RESULT_STATUS_= when #{item.resultId,jdbcType=DECIMAL} then #{item.resultStatus,jdbcType=DECIMAL} ,RESULT_NUMBER= when #{item.resultId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=DECIMAL} ,RESULT_DELETED= when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeleted,jdbcType=DECIMAL} ,INSERT_USERNAME= when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR} ,INSERT_TIME= when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP} ,UPDATE_USERNAME= when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR} ,UPDATE_TIME= when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP} ,INSERT_UPDATE_REMARK= when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR} where RESULT_ID in #{item.resultId,jdbcType=DECIMAL} delete from WMSP_INBOUND_SCAN_RESULT where RESULT_ID in #{id} update wmsp_inbound_scan_result wisr set (wisr.inbound_abnormalis) = (select min(wisr.inbound_abnormalis) from wmsp_inbound_scan_result wisr join rms_personnel rp on rp.personnel_id = wisr.load_id where (wisr.load_id = #{loadId} or wisr.load_id = #{otherLoadId}) and wisr.result_number = #{resultNumber}) where wisr.result_number = #{resultNumber} update wmsp_inbound_scan_result wisr set wisr.inbound_result_id=#{InbounId}, wisr.result_number=0, wisr.result_status_=1 where wisr.result_id = #{resultId} update wmsp_inbound_scan_result wisr set wisr.result_number=0, wisr.result_status_=1 where wisr.result_id = #{RESULTID} update wmsp_inbound_stack_result wisr set wisr.stacking_status = 0 where wisr.result_id = #{stackResultId} update wmsp_inbound_scan_result wisr set wisr.result_number=0, wisr.result_status_=1, wisr.INBOUND_RESULT_ID =#{inboundId} where wisr.result_id = #{resultId}