| | |
| | | return selectOne(MesProBagCodeDO::getCode, code); |
| | | } |
| | | |
| | | default MesProBagCodeDO selectByCodeForUpdate(String code) { |
| | | return selectOne(new LambdaQueryWrapperX<MesProBagCodeDO>() |
| | | .eq(MesProBagCodeDO::getCode, code).last("FOR UPDATE")); |
| | | } |
| | | |
| | | @org.apache.ibatis.annotations.Update("UPDATE mes_pro_bag_code SET inbound_time = NOW(), inbound_event_id = #{eventId}, inbound_device_code = #{deviceCode}, inbound_line_code = #{lineCode}, update_time = NOW() WHERE id = #{id} AND deleted = 0 AND inbound_event_id IS NULL") |
| | | int markInbound(@org.apache.ibatis.annotations.Param("id") Long id, @org.apache.ibatis.annotations.Param("eventId") Long eventId, |
| | | @org.apache.ibatis.annotations.Param("deviceCode") String deviceCode, @org.apache.ibatis.annotations.Param("lineCode") String lineCode); |
| | | |
| | | default List<MesProBagCodeDO> selectListByUuid(String uuid) { |
| | | return selectList(MesProBagCodeDO::getUuid, uuid); |
| | | } |
| | |
| | | @Param("toStatus") Integer toStatus, @Param("cancelTime") LocalDateTime cancelTime, |
| | | @Param("cancelReason") String cancelReason); |
| | | |
| | | @Update("UPDATE mes_pro_bag_code 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") LocalDateTime outboundTime); |
| | | |
| | | @Update("UPDATE mes_pro_bag_code SET sales_id = NULL, outbound_time = NULL, update_time = NOW() " |
| | | + "WHERE id = #{id} AND deleted = 0") |
| | | void clearOutbound(@Param("id") Long id); |
| | | |
| | | @Select("SELECT COUNT(*) FROM mes_pro_bag_code WHERE batch_id = #{batchId} " + |
| | | "AND deleted = 0 AND status <> 30") |
| | | int selectEffectiveCountByBatchId(@Param("batchId") Long batchId); |