| | |
| | | return selectOne(MesProPalletDO::getCode, code); |
| | | } |
| | | |
| | | default MesProPalletDO selectByTempCode(String tempCode) { |
| | | return selectOne(MesProPalletDO::getTempCode, tempCode); |
| | | } |
| | | |
| | | /** 生成临时托盘码用的全局序号:解析 temp_code 的数字后缀,不存在则返回 0 */ |
| | | @Select("SELECT IFNULL(MAX(CAST(SUBSTRING(temp_code, 4) AS UNSIGNED)), 0) FROM mes_pro_pallet WHERE deleted = 0") |
| | | Integer selectMaxTempCodeSeq(); |
| | | |
| | | @Select("SELECT * FROM mes_pro_pallet WHERE id = #{id} AND deleted = 0 FOR UPDATE") |
| | | MesProPalletDO selectByIdForUpdate(@Param("id") Long id); |
| | | |
| | |
| | | default PageResult<MesProPalletDO> selectPage(MesProPalletPageReqVO reqVO) { |
| | | return selectPage(reqVO, new LambdaQueryWrapperX<MesProPalletDO>() |
| | | .likeIfPresent(MesProPalletDO::getCode, reqVO.getCode()) |
| | | .likeIfPresent(MesProPalletDO::getTempCode, reqVO.getTempCode()) |
| | | .eqIfPresent(MesProPalletDO::getBatchId, reqVO.getBatchId()) |
| | | .likeIfPresent(MesProPalletDO::getBatchCode, reqVO.getBatchCode()) |
| | | .eqIfPresent(MesProPalletDO::getStatus, reqVO.getStatus()) |
| | |
| | | @Select("SELECT IFNULL(MAX(pallet_no), 0) FROM mes_pro_pallet WHERE batch_id = #{batchId}") |
| | | Integer selectMaxPalletNo(@Param("batchId") Long batchId); |
| | | |
| | | @org.apache.ibatis.annotations.Update("UPDATE mes_pro_pallet SET sales_id = #{salesId}, outbound_time = #{outboundTime}, update_time = NOW() " |
| | | + "WHERE id = #{id} AND deleted = 0") |
| | | void markOutbound(@Param("id") Long id, @Param("salesId") Long salesId, |
| | | @Param("outboundTime") java.time.LocalDateTime outboundTime); |
| | | |
| | | @org.apache.ibatis.annotations.Update("UPDATE mes_pro_pallet SET sales_id = NULL, outbound_time = NULL, update_time = NOW() " |
| | | + "WHERE id = #{id} AND deleted = 0") |
| | | void clearOutbound(@Param("id") Long id); |
| | | |
| | | } |